diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 0040506a554..1a0f742ff68 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -5716,9 +5716,41 @@ components: required: - facet type: object + ListStreamIssuePersona: + description: Persona filter for the `issue_stream` data source. + enum: + - all + - browser + - mobile + - backend + type: string + x-enum-varnames: + - ALL + - BROWSER + - MOBILE + - BACKEND + ListStreamIssueState: + description: Issue state filter for the `issue_stream` data source. + enum: + - OPEN + - IGNORED + - ACKNOWLEDGED + - RESOLVED + type: string + x-enum-varnames: + - OPEN + - IGNORED + - ACKNOWLEDGED + - RESOLVED ListStreamQuery: description: Updated list stream widget. properties: + assignee_uuids: + description: Filter by assignee UUIDs. Usable only with `issue_stream`. + items: + description: Assignee UUID. + type: string + type: array clustering_pattern_field_path: description: Specifies the field for logs pattern clustering. Usable only with logs_pattern_stream. example: "message" @@ -5746,16 +5778,35 @@ components: description: Index. type: string type: array + persona: + $ref: "#/components/schemas/ListStreamIssuePersona" query_string: description: Widget query. example: "@service:app" type: string sort: $ref: "#/components/schemas/WidgetFieldSort" + states: + description: Filter by issue states. Usable only with `issue_stream`. + items: + $ref: "#/components/schemas/ListStreamIssueState" + type: array storage: description: Option for storage location. Feature in Private Beta. example: "indexes" type: string + suspected_causes: + description: Filter by suspected causes. Usable only with `issue_stream`. + items: + description: Suspected cause. + type: string + type: array + team_handles: + description: Filter by team handles. Usable only with `issue_stream`. + items: + description: Team handle. + type: string + type: array required: - query_string - data_source @@ -5769,8 +5820,8 @@ components: x-enum-varnames: - EVENT_LIST ListStreamSource: - default: apm_issue_stream - description: Source from which to query items to display in the stream. + default: logs_stream + description: Source from which to query items to display in the stream. apm_issue_stream, rum_issue_stream, and logs_issue_stream are deprecated. Use issue_stream instead. enum: - logs_stream - audit_stream @@ -5785,7 +5836,8 @@ components: - event_stream - rum_stream - llm_observability_stream - example: apm_issue_stream + - issue_stream + example: logs_stream type: string x-enum-varnames: - LOGS_STREAM @@ -5801,6 +5853,7 @@ components: - EVENT_STREAM - RUM_STREAM - LLM_OBSERVABILITY_STREAM + - ISSUE_STREAM ListStreamWidgetDefinition: description: |- The list stream visualization displays a table of recent events in your application that @@ -13124,13 +13177,16 @@ components: type: object SLOCorrectionCreateRequest: description: |- - An object that defines a correction to be applied to an SLO. + An object that defines a correction to be applied to one or more SLOs. properties: data: $ref: "#/components/schemas/SLOCorrectionCreateData" type: object SLOCorrectionCreateRequestAttributes: - description: The attribute object associated with the SLO correction to be created. + description: |- + The attribute object associated with the SLO correction to be created. + + Exactly one of `slo_id` or `slo_query` must be provided. properties: category: $ref: "#/components/schemas/SLOCorrectionCategory" @@ -13154,9 +13210,16 @@ components: example: FREQ=DAILY;INTERVAL=10;COUNT=5 type: string slo_id: - description: ID of the SLO that this correction applies to. + description: ID of the single SLO that this correction applies to. example: sloId type: string + slo_query: + description: |- + Query that matches the SLOs this correction applies to. + The query uses the [Events search syntax](https://docs.datadoghq.com/events/explorer/searching/) + and can filter SLOs by SLO tags. + example: "env:prod service:checkout" + type: string start: description: Starting time of the correction in epoch seconds. example: 1600000000 @@ -13167,7 +13230,6 @@ components: example: UTC type: string required: - - slo_id - start - category type: object @@ -13231,7 +13293,12 @@ components: nullable: true type: string slo_id: - description: ID of the SLO that this correction applies to. + description: ID of the single SLO that this correction applies to. + nullable: true + type: string + slo_query: + description: Query that matches the SLOs this correction applies to. + nullable: true type: string start: description: Starting time of the correction in epoch seconds. @@ -13303,6 +13370,13 @@ components: are `FREQ`, `INTERVAL`, `COUNT`, `UNTIL` and `BYDAY`. example: FREQ=DAILY;INTERVAL=10;COUNT=5 type: string + slo_query: + description: |- + Query that matches the SLOs this correction applies to. + The query uses the [Events search syntax](https://docs.datadoghq.com/events/explorer/searching/) + and can filter SLOs by SLO tags. + example: "env:prod service:checkout" + type: string start: description: Starting time of the correction in epoch seconds. example: 1600000000 @@ -17234,6 +17308,7 @@ components: - $ref: "#/components/schemas/SyntheticsBasicAuthDigest" - $ref: "#/components/schemas/SyntheticsBasicAuthOauthClient" - $ref: "#/components/schemas/SyntheticsBasicAuthOauthROP" + - $ref: "#/components/schemas/SyntheticsBasicAuthJWT" SyntheticsBasicAuthDigest: description: Object to handle digest authentication when performing the test. properties: @@ -17261,6 +17336,78 @@ components: type: string x-enum-varnames: - DIGEST + SyntheticsBasicAuthJWT: + description: Object to handle JWT authentication when performing the test. + properties: + addClaims: + $ref: "#/components/schemas/SyntheticsBasicAuthJWTAddClaims" + algorithm: + $ref: "#/components/schemas/SyntheticsBasicAuthJWTAlgorithm" + expiresIn: + description: Token time-to-live in seconds. + example: 3600 + format: int64 + minimum: 1 + type: integer + header: + description: Custom JWT header as a JSON string. + example: '{"kid": "my-key-id"}' + type: string + payload: + description: JWT claims as a JSON string. + example: '{"sub": "1234567890", "name": "John Doe"}' + type: string + secret: + description: |- + Signing key for the JWT authentication. Use the shared secret for `HS256` + or the private key (PEM format) for `RS256` and `ES256`. + example: "mysecretkey" + type: string + tokenPrefix: + description: Prefix added before the token in the `Authorization` header. Defaults to `Bearer`. + example: "Bearer" + type: string + type: + $ref: "#/components/schemas/SyntheticsBasicAuthJWTType" + required: + - algorithm + - payload + - secret + - type + type: object + SyntheticsBasicAuthJWTAddClaims: + description: Standard JWT claims to automatically inject. + properties: + exp: + description: Whether to inject the `exp` (expiration) claim. + example: true + type: boolean + iat: + description: Whether to inject the `iat` (issued at) claim. + example: true + type: boolean + type: object + SyntheticsBasicAuthJWTAlgorithm: + description: Algorithm to use for the JWT authentication. + enum: + - HS256 + - RS256 + - ES256 + example: "HS256" + type: string + x-enum-varnames: + - HS256 + - RS256 + - ES256 + SyntheticsBasicAuthJWTType: + default: "jwt" + description: The type of authentication to use when performing the test. + enum: + - jwt + example: "jwt" + type: string + x-enum-varnames: + - JWT SyntheticsBasicAuthNTLM: description: Object to handle `NTLM` authentication when performing the test. properties: @@ -22663,12 +22810,48 @@ components: $ref: "#/components/schemas/UsageSpecifiedCustomReportsMeta" type: object UsageSummaryDate: - description: Response with hourly report of all data billed by Datadog all organizations. + description: |- + Response with hourly report of all data billed by Datadog for all organizations. + + Newly added billing dimensions and usage types appear as untyped keys on the + `additionalProperties` map instead of as typed fields. Call + `GET /api/v2/usage/summary/available_fields` to enumerate every key returned + at this response level—both typed fields and `additionalProperties` keys. properties: agent_host_top99p: description: Shows the 99th percentile of all agent hosts over all hours in the current date for all organizations. format: int64 type: integer + ai_credits_agent_builder_ai_credits_sum: + description: |- + Shows the sum of all AI credits used by Agent Builder over all hours in the current date for all organizations. + Values are returned in micro-credits. Divide by 1,000,000 to get AI credits. + format: int64 + type: integer + ai_credits_bits_assistant_ai_credits_sum: + description: |- + Shows the sum of all AI credits used by Bits AI Assistant over all hours in the current date for all organizations. + Values are returned in micro-credits. Divide by 1,000,000 to get AI credits. + format: int64 + type: integer + ai_credits_bits_dev_ai_credits_sum: + description: |- + Shows the sum of all AI credits used by Bits AI Dev over all hours in the current date for all organizations. + Values are returned in micro-credits. Divide by 1,000,000 to get AI credits. + format: int64 + type: integer + ai_credits_bits_sre_ai_credits_sum: + description: |- + Shows the sum of all AI credits used by Bits AI SRE over all hours in the current date for all organizations. + Values are returned in micro-credits. Divide by 1,000,000 to get AI credits. + format: int64 + type: integer + ai_credits_sum: + description: |- + Shows the sum of all AI credits over all hours in the current date for all organizations. + Values are returned in micro-credits. Divide by 1,000,000 to get AI credits. + format: int64 + type: integer apm_azure_app_service_host_top99p: description: Shows the 99th percentile of all Azure app services using APM over all hours in the current date all organizations. format: int64 @@ -22710,6 +22893,10 @@ components: description: Shows the number of organizations that had Audit Trail enabled in the current date. format: int64 type: integer + audit_trail_event_forwarding_events_sum: + description: Shows the sum of all Audit Trail event forwarding events over all hours in the current date for all organizations. + format: int64 + type: integer avg_profiled_fargate_tasks: description: The average total count for Fargate Container Profiler over all hours in the current date for all organizations. format: int64 @@ -23000,6 +23187,14 @@ components: description: Shows the sum of all Data Jobs Monitoring hosts over all hours in the current date for the given org. format: int64 type: integer + data_stream_monitoring_host_count_sum: + description: Shows the sum of all Data Streams Monitoring hosts over all hours in the current date for all organizations. + format: int64 + type: integer + data_stream_monitoring_host_count_top99p: + description: Shows the 99th percentile of all Data Streams Monitoring hosts over all hours in the current date for all organizations. + format: int64 + type: integer date: description: The date for the usage. format: date-time @@ -23013,7 +23208,9 @@ components: format: int64 type: integer do_jobs_monitoring_orchestrators_job_hours_sum: - description: Shows the sum of all orchestrator job hours over all hours in the current date for all organizations. + description: |- + Shows the sum of all orchestrator job hours over all hours in the current date for all organizations. + Values are returned in seconds. Divide by 3,600 to convert to hours. format: int64 type: integer eph_infra_host_agent_sum: @@ -23192,6 +23389,190 @@ components: description: Shows the sum of all log events indexed over all hours in the current date for all organizations. format: int64 type: integer + indexed_points_sum: + description: Shows the sum of all indexed custom metrics points over all hours in the current date for all organizations. + format: int64 + type: integer + infra_cpu_avg: + description: |- + Shows the average of all Infrastructure vCPU cores over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_agent_avg: + description: |- + Shows the average of all default Infrastructure host vCPU cores reported by the Datadog Agent over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_agent_basic_avg: + description: |- + Shows the average of all default basic Infrastructure host vCPU cores reported by the Datadog Agent over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_agent_basic_sum: + description: |- + Shows the sum of all default basic Infrastructure host vCPU cores reported by the Datadog Agent over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_agent_sum: + description: |- + Shows the sum of all default Infrastructure host vCPU cores reported by the Datadog Agent over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_aws_avg: + description: |- + Shows the average of all default Infrastructure host vCPU cores on AWS over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_aws_sum: + description: |- + Shows the sum of all default Infrastructure host vCPU cores on AWS over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_azure_avg: + description: |- + Shows the average of all default Infrastructure host vCPU cores on Azure over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_azure_sum: + description: |- + Shows the sum of all default Infrastructure host vCPU cores on Azure over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_gcp_avg: + description: |- + Shows the average of all default Infrastructure host vCPU cores on GCP over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_gcp_sum: + description: |- + Shows the sum of all default Infrastructure host vCPU cores on GCP over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_nutanix_avg: + description: |- + Shows the average of all default Infrastructure host vCPU cores on Nutanix over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_nutanix_basic_avg: + description: |- + Shows the average of all default basic Infrastructure host vCPU cores on Nutanix over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_nutanix_basic_sum: + description: |- + Shows the sum of all default basic Infrastructure host vCPU cores on Nutanix over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_nutanix_sum: + description: |- + Shows the sum of all default Infrastructure host vCPU cores on Nutanix over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_opentelemetry_avg: + description: |- + Shows the average of all default Infrastructure host vCPU cores reported by OpenTelemetry over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_opentelemetry_sum: + description: |- + Shows the sum of all default Infrastructure host vCPU cores reported by OpenTelemetry over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_agent_avg: + description: |- + Shows the average of all observed Infrastructure host vCPU cores reported by the Datadog Agent over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_agent_sum: + description: |- + Shows the sum of all observed Infrastructure host vCPU cores reported by the Datadog Agent over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_aws_avg: + description: |- + Shows the average of all observed Infrastructure host vCPU cores on AWS over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_aws_sum: + description: |- + Shows the sum of all observed Infrastructure host vCPU cores on AWS over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_azure_avg: + description: |- + Shows the average of all observed Infrastructure host vCPU cores on Azure over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_azure_sum: + description: |- + Shows the sum of all observed Infrastructure host vCPU cores on Azure over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_gcp_avg: + description: |- + Shows the average of all observed Infrastructure host vCPU cores on GCP over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_gcp_sum: + description: |- + Shows the sum of all observed Infrastructure host vCPU cores on GCP over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_nutanix_avg: + description: |- + Shows the average of all observed Infrastructure host vCPU cores on Nutanix over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_nutanix_sum: + description: |- + Shows the sum of all observed Infrastructure host vCPU cores on Nutanix over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_opentelemetry_avg: + description: |- + Shows the average of all observed Infrastructure host vCPU cores reported by OpenTelemetry over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_opentelemetry_sum: + description: |- + Shows the sum of all observed Infrastructure host vCPU cores reported by OpenTelemetry over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_sum: + description: |- + Shows the sum of all Infrastructure vCPU cores over all hours in the current date for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer infra_edge_monitoring_devices_top99p: description: Shows the 99th percentile of all Edge Devices Monitoring devices over all hours in the current date for all organizations. format: int64 @@ -23216,10 +23597,22 @@ components: description: Shows the average number of storage management objects over all hours in the current date for all organizations. format: int64 type: integer + ingest_points_sum: + description: Shows the sum of all ingested custom metrics points over all hours in the current date for all organizations. + format: int64 + type: integer ingested_events_bytes_sum: description: Shows the sum of all log bytes ingested over all hours in the current date for all organizations. format: int64 type: integer + iot_apm_host_sum: + description: Shows the sum of all Application Performance Monitoring IoT hosts over all hours in the current date for all organizations. + format: int64 + type: integer + iot_apm_host_top99p: + description: Shows the 99th percentile of all Application Performance Monitoring IoT hosts over all hours in the current date for all organizations. + format: int64 + type: integer iot_device_sum: description: Shows the sum of all IoT devices over all hours in the current date for all organizations. format: int64 @@ -23228,6 +23621,22 @@ components: description: Shows the 99th percentile of all IoT devices over all hours in the current date all organizations. format: int64 type: integer + llm_observability_15day_retention_spans_sum: + description: Shows the sum of all LLM Observability 15-day retention spans over all hours in the current date for all organizations. + format: int64 + type: integer + llm_observability_30day_retention_spans_sum: + description: Shows the sum of all LLM Observability 30-day retention spans over all hours in the current date for all organizations. + format: int64 + type: integer + llm_observability_60day_retention_spans_sum: + description: Shows the sum of all LLM Observability 60-day retention spans over all hours in the current date for all organizations. + format: int64 + type: integer + llm_observability_90day_retention_spans_sum: + description: Shows the sum of all LLM Observability 90-day retention spans over all hours in the current date for all organizations. + format: int64 + type: integer llm_observability_min_spend_sum: description: Sum of all LLM observability minimum spend over all hours in the current date for all organizations. format: int64 @@ -23236,6 +23645,14 @@ components: description: Sum of all LLM observability sessions over all hours in the current date for all organizations. format: int64 type: integer + logs_archive_search_gb_scanned_sum: + description: Shows the sum of all Logs Archive Search scanned data over all hours in the current date for all organizations. + format: int64 + type: integer + metric_names_sum: + description: Shows the sum of all custom metric names over all hours in the current date for all organizations. + format: int64 + type: integer mobile_rum_lite_session_count_sum: deprecated: true description: Shows the sum of all mobile lite sessions over all hours in the current date for all organizations (To be deprecated on October 1st, 2024). @@ -23644,6 +24061,14 @@ components: description: Shows the sum of all log events analyzed by Cloud SIEM over all hours in the current date for the given org. format: int64 type: integer + snmp_device_count_sum: + description: Shows the sum of all Network Device Monitoring devices over all hours in the current date for all organizations. + format: int64 + type: integer + snmp_device_count_top99p: + description: Shows the 99th percentile of all Network Device Monitoring devices over all hours in the current date for all organizations. + format: int64 + type: integer synthetics_browser_check_calls_count_sum: description: Shows the sum of all Synthetic browser tests over all hours in the current date for all organizations. format: int64 @@ -23686,7 +24111,13 @@ components: type: integer type: object UsageSummaryDateOrg: - description: Global hourly report of all data billed by Datadog for a given organization. + description: |- + Global hourly report of all data billed by Datadog for a given organization. + + Newly added billing dimensions and usage types appear as untyped keys on the + `additionalProperties` map instead of as typed fields. Call + `GET /api/v2/usage/summary/available_fields` to enumerate every key returned + at this response level—both typed fields and `additionalProperties` keys. properties: account_name: description: The account name. @@ -23698,6 +24129,36 @@ components: description: Shows the 99th percentile of all agent hosts over all hours in the current date for the given org. format: int64 type: integer + ai_credits_agent_builder_ai_credits_sum: + description: |- + Shows the sum of all AI credits used by Agent Builder over all hours in the current date for the given org. + Values are returned in micro-credits. Divide by 1,000,000 to get AI credits. + format: int64 + type: integer + ai_credits_bits_assistant_ai_credits_sum: + description: |- + Shows the sum of all AI credits used by Bits AI Assistant over all hours in the current date for the given org. + Values are returned in micro-credits. Divide by 1,000,000 to get AI credits. + format: int64 + type: integer + ai_credits_bits_dev_ai_credits_sum: + description: |- + Shows the sum of all AI credits used by Bits AI Dev over all hours in the current date for the given org. + Values are returned in micro-credits. Divide by 1,000,000 to get AI credits. + format: int64 + type: integer + ai_credits_bits_sre_ai_credits_sum: + description: |- + Shows the sum of all AI credits used by Bits AI SRE over all hours in the current date for the given org. + Values are returned in micro-credits. Divide by 1,000,000 to get AI credits. + format: int64 + type: integer + ai_credits_sum: + description: |- + Shows the sum of all AI credits over all hours in the current date for the given org. + Values are returned in micro-credits. Divide by 1,000,000 to get AI credits. + format: int64 + type: integer apm_azure_app_service_host_top99p: description: Shows the 99th percentile of all Azure app services using APM over all hours in the current date for the given org. format: int64 @@ -23739,6 +24200,10 @@ components: description: Shows whether Audit Trail is enabled for the current date for the given org. format: int64 type: integer + audit_trail_event_forwarding_events_sum: + description: Shows the sum of all Audit Trail event forwarding events over all hours in the current date for the given org. + format: int64 + type: integer avg_profiled_fargate_tasks: description: The average total count for Fargate Container Profiler over all hours in the current month for the given org. format: int64 @@ -24037,6 +24502,14 @@ components: description: Shows the sum of all Data Jobs Monitoring hosts over all hours in the current date for the given org. format: int64 type: integer + data_stream_monitoring_host_count_sum: + description: Shows the sum of all Data Streams Monitoring hosts over all hours in the current date for the given org. + format: int64 + type: integer + data_stream_monitoring_host_count_top99p: + description: Shows the 99th percentile of all Data Streams Monitoring hosts over all hours in the current date for the given org. + format: int64 + type: integer dbm_host_top99p_sum: description: Shows the 99th percentile of all Database Monitoring hosts over all hours in the current month for the given org. format: int64 @@ -24046,7 +24519,9 @@ components: format: int64 type: integer do_jobs_monitoring_orchestrators_job_hours_sum: - description: Shows the sum of all orchestrator job hours over all hours in the current date for the given org. + description: |- + Shows the sum of all orchestrator job hours over all hours in the current date for the given org. + Values are returned in seconds. Divide by 3,600 to convert to hours. format: int64 type: integer eph_infra_host_agent_sum: @@ -24229,6 +24704,190 @@ components: description: Shows the sum of all log events indexed over all hours in the current date for the given org (To be deprecated on October 1st, 2024). format: int64 type: integer + indexed_points_sum: + description: Shows the sum of all indexed custom metrics points over all hours in the current date for the given org. + format: int64 + type: integer + infra_cpu_avg: + description: |- + Shows the average of all Infrastructure vCPU cores over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_agent_avg: + description: |- + Shows the average of all default Infrastructure host vCPU cores reported by the Datadog Agent over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_agent_basic_avg: + description: |- + Shows the average of all default basic Infrastructure host vCPU cores reported by the Datadog Agent over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_agent_basic_sum: + description: |- + Shows the sum of all default basic Infrastructure host vCPU cores reported by the Datadog Agent over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_agent_sum: + description: |- + Shows the sum of all default Infrastructure host vCPU cores reported by the Datadog Agent over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_aws_avg: + description: |- + Shows the average of all default Infrastructure host vCPU cores on AWS over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_aws_sum: + description: |- + Shows the sum of all default Infrastructure host vCPU cores on AWS over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_azure_avg: + description: |- + Shows the average of all default Infrastructure host vCPU cores on Azure over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_azure_sum: + description: |- + Shows the sum of all default Infrastructure host vCPU cores on Azure over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_gcp_avg: + description: |- + Shows the average of all default Infrastructure host vCPU cores on GCP over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_gcp_sum: + description: |- + Shows the sum of all default Infrastructure host vCPU cores on GCP over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_nutanix_avg: + description: |- + Shows the average of all default Infrastructure host vCPU cores on Nutanix over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_nutanix_basic_avg: + description: |- + Shows the average of all default basic Infrastructure host vCPU cores on Nutanix over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_nutanix_basic_sum: + description: |- + Shows the sum of all default basic Infrastructure host vCPU cores on Nutanix over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_nutanix_sum: + description: |- + Shows the sum of all default Infrastructure host vCPU cores on Nutanix over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_opentelemetry_avg: + description: |- + Shows the average of all default Infrastructure host vCPU cores reported by OpenTelemetry over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_opentelemetry_sum: + description: |- + Shows the sum of all default Infrastructure host vCPU cores reported by OpenTelemetry over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_agent_avg: + description: |- + Shows the average of all observed Infrastructure host vCPU cores reported by the Datadog Agent over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_agent_sum: + description: |- + Shows the sum of all observed Infrastructure host vCPU cores reported by the Datadog Agent over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_aws_avg: + description: |- + Shows the average of all observed Infrastructure host vCPU cores on AWS over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_aws_sum: + description: |- + Shows the sum of all observed Infrastructure host vCPU cores on AWS over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_azure_avg: + description: |- + Shows the average of all observed Infrastructure host vCPU cores on Azure over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_azure_sum: + description: |- + Shows the sum of all observed Infrastructure host vCPU cores on Azure over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_gcp_avg: + description: |- + Shows the average of all observed Infrastructure host vCPU cores on GCP over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_gcp_sum: + description: |- + Shows the sum of all observed Infrastructure host vCPU cores on GCP over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_nutanix_avg: + description: |- + Shows the average of all observed Infrastructure host vCPU cores on Nutanix over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_nutanix_sum: + description: |- + Shows the sum of all observed Infrastructure host vCPU cores on Nutanix over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_opentelemetry_avg: + description: |- + Shows the average of all observed Infrastructure host vCPU cores reported by OpenTelemetry over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_opentelemetry_sum: + description: |- + Shows the sum of all observed Infrastructure host vCPU cores reported by OpenTelemetry over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_sum: + description: |- + Shows the sum of all Infrastructure vCPU cores over all hours in the current date for the given org. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer infra_edge_monitoring_devices_top99p: description: Shows the 99th percentile of all Edge Devices Monitoring devices over all hours in the current date for the given org. format: int64 @@ -24253,10 +24912,22 @@ components: description: Shows the average number of storage management objects over all hours in the current date for the given org. format: int64 type: integer + ingest_points_sum: + description: Shows the sum of all ingested custom metrics points over all hours in the current date for the given org. + format: int64 + type: integer ingested_events_bytes_sum: description: Shows the sum of all log bytes ingested over all hours in the current date for the given org. format: int64 type: integer + iot_apm_host_sum: + description: Shows the sum of all Application Performance Monitoring IoT hosts over all hours in the current date for the given org. + format: int64 + type: integer + iot_apm_host_top99p: + description: Shows the 99th percentile of all Application Performance Monitoring IoT hosts over all hours in the current date for the given org. + format: int64 + type: integer iot_device_agg_sum: description: Shows the sum of all IoT devices over all hours in the current date for the given org. format: int64 @@ -24265,6 +24936,22 @@ components: description: Shows the 99th percentile of all IoT devices over all hours in the current date for the given org. format: int64 type: integer + llm_observability_15day_retention_spans_sum: + description: Shows the sum of all LLM Observability 15-day retention spans over all hours in the current date for the given org. + format: int64 + type: integer + llm_observability_30day_retention_spans_sum: + description: Shows the sum of all LLM Observability 30-day retention spans over all hours in the current date for the given org. + format: int64 + type: integer + llm_observability_60day_retention_spans_sum: + description: Shows the sum of all LLM Observability 60-day retention spans over all hours in the current date for the given org. + format: int64 + type: integer + llm_observability_90day_retention_spans_sum: + description: Shows the sum of all LLM Observability 90-day retention spans over all hours in the current date for the given org. + format: int64 + type: integer llm_observability_min_spend_sum: description: Shows the sum of all LLM Observability minimum spend over all hours in the current date for the given org. format: int64 @@ -24273,6 +24960,14 @@ components: description: Shows the sum of all LLM observability sessions over all hours in the current date for the given org. format: int64 type: integer + logs_archive_search_gb_scanned_sum: + description: Shows the sum of all Logs Archive Search scanned data over all hours in the current date for the given org. + format: int64 + type: integer + metric_names_sum: + description: Shows the sum of all custom metric names over all hours in the current date for the given org. + format: int64 + type: integer mobile_rum_lite_session_count_sum: deprecated: true description: Shows the sum of all mobile lite sessions over all hours in the current date for the given org (To be deprecated on October 1st, 2024). @@ -24685,6 +25380,14 @@ components: description: Shows the sum of all log events analyzed by Cloud SIEM over all hours in the current date for the given org. format: int64 type: integer + snmp_device_count_sum: + description: Shows the sum of all Network Device Monitoring devices over all hours in the current date for the given org. + format: int64 + type: integer + snmp_device_count_top99p: + description: Shows the 99th percentile of all Network Device Monitoring devices over all hours in the current date for the given org. + format: int64 + type: integer synthetics_browser_check_calls_count_sum: description: Shows the sum of all Synthetic browser tests over all hours in the current date for the given org. format: int64 @@ -24727,12 +25430,49 @@ components: type: integer type: object UsageSummaryResponse: - description: Response summarizing all usage aggregated across the months in the request for all organizations, and broken down by month and by organization. + description: |- + Response summarizing all usage aggregated across the months in the request for + all organizations, and broken down by month and by organization. + + Newly added billing dimensions and usage types appear as untyped keys on the + `additionalProperties` map instead of as typed fields. Call + `GET /api/v2/usage/summary/available_fields` to enumerate every key returned + at this response level—both typed fields and `additionalProperties` keys. properties: agent_host_top99p_sum: description: Shows the 99th percentile of all agent hosts over all hours in the current month for all organizations. format: int64 type: integer + ai_credits_agent_builder_ai_credits_agg_sum: + description: |- + Shows the sum of all AI credits used by Agent Builder over all hours in the current month for all organizations. + Values are returned in micro-credits. Divide by 1,000,000 to get AI credits. + format: int64 + type: integer + ai_credits_agg_sum: + description: |- + Shows the sum of all AI credits over all hours in the current month for all organizations. + Values are returned in micro-credits. Divide by 1,000,000 to get AI credits. + format: int64 + type: integer + ai_credits_bits_assistant_ai_credits_agg_sum: + description: |- + Shows the sum of all AI credits used by Bits AI Assistant over all hours in the current month for all organizations. + Values are returned in micro-credits. Divide by 1,000,000 to get AI credits. + format: int64 + type: integer + ai_credits_bits_dev_ai_credits_agg_sum: + description: |- + Shows the sum of all AI credits used by Bits AI Dev over all hours in the current month for all organizations. + Values are returned in micro-credits. Divide by 1,000,000 to get AI credits. + format: int64 + type: integer + ai_credits_bits_sre_ai_credits_agg_sum: + description: |- + Shows the sum of all AI credits used by Bits AI SRE over all hours in the current month for all organizations. + Values are returned in micro-credits. Divide by 1,000,000 to get AI credits. + format: int64 + type: integer apm_azure_app_service_host_top99p_sum: description: Shows the 99th percentile of all Azure app services using APM over all hours in the current month all organizations. format: int64 @@ -24774,6 +25514,10 @@ components: description: Shows the total number of organizations that had Audit Trail enabled over a specific number of months. format: int64 type: integer + audit_trail_event_forwarding_events_agg_sum: + description: Shows the sum of all Audit Trail event forwarding events over all hours in the current month for all organizations. + format: int64 + type: integer avg_profiled_fargate_tasks_sum: description: The average total count for Fargate Container Profiler over all hours in the current month for all organizations. format: int64 @@ -25076,6 +25820,14 @@ components: description: Shows the sum of Data Jobs Monitoring hosts over all hours in the current months for all organizations format: int64 type: integer + data_stream_monitoring_host_count_agg_sum: + description: Shows the sum of all Data Streams Monitoring hosts over all hours in the current month for all organizations. + format: int64 + type: integer + data_stream_monitoring_host_count_top99p_sum: + description: Shows the 99th percentile of all Data Streams Monitoring hosts over all hours in the current month for all organizations. + format: int64 + type: integer dbm_host_top99p_sum: description: Shows the 99th percentile of all Database Monitoring hosts over all hours in the current month for all organizations. format: int64 @@ -25085,7 +25837,9 @@ components: format: int64 type: integer do_jobs_monitoring_orchestrators_job_hours_agg_sum: - description: Shows the sum of all orchestrator job hours over all hours in the current month for all organizations. + description: |- + Shows the sum of all orchestrator job hours over all hours in the current month for all organizations. + Values are returned in seconds. Divide by 3,600 to convert to hours. format: int64 type: integer end_date: @@ -25269,6 +26023,190 @@ components: description: Shows the sum of all log events indexed over all hours in the current month for all organizations (To be deprecated on October 1st, 2024). format: int64 type: integer + indexed_points_agg_sum: + description: Shows the sum of all indexed custom metrics points over all hours in the current month for all organizations. + format: int64 + type: integer + infra_cpu_agg_sum: + description: |- + Shows the sum of all Infrastructure vCPU cores over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_avg_sum: + description: |- + Shows the average of all Infrastructure vCPU cores over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_agent_agg_sum: + description: |- + Shows the sum of all default Infrastructure host vCPU cores reported by the Datadog Agent over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_agent_avg_sum: + description: |- + Shows the average of all default Infrastructure host vCPU cores reported by the Datadog Agent over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_agent_basic_agg_sum: + description: |- + Shows the sum of all default basic Infrastructure host vCPU cores reported by the Datadog Agent over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_agent_basic_avg_sum: + description: |- + Shows the average of all default basic Infrastructure host vCPU cores reported by the Datadog Agent over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_aws_agg_sum: + description: |- + Shows the sum of all default Infrastructure host vCPU cores on AWS over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_aws_avg_sum: + description: |- + Shows the average of all default Infrastructure host vCPU cores on AWS over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_azure_agg_sum: + description: |- + Shows the sum of all default Infrastructure host vCPU cores on Azure over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_azure_avg_sum: + description: |- + Shows the average of all default Infrastructure host vCPU cores on Azure over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_gcp_agg_sum: + description: |- + Shows the sum of all default Infrastructure host vCPU cores on GCP over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_gcp_avg_sum: + description: |- + Shows the average of all default Infrastructure host vCPU cores on GCP over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_nutanix_agg_sum: + description: |- + Shows the sum of all default Infrastructure host vCPU cores on Nutanix over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_nutanix_avg_sum: + description: |- + Shows the average of all default Infrastructure host vCPU cores on Nutanix over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_nutanix_basic_agg_sum: + description: |- + Shows the sum of all default basic Infrastructure host vCPU cores on Nutanix over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_nutanix_basic_avg_sum: + description: |- + Shows the average of all default basic Infrastructure host vCPU cores on Nutanix over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_opentelemetry_agg_sum: + description: |- + Shows the sum of all default Infrastructure host vCPU cores reported by OpenTelemetry over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_default_infra_host_vcpu_opentelemetry_avg_sum: + description: |- + Shows the average of all default Infrastructure host vCPU cores reported by OpenTelemetry over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_agent_agg_sum: + description: |- + Shows the sum of all observed Infrastructure host vCPU cores reported by the Datadog Agent over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_agent_avg_sum: + description: |- + Shows the average of all observed Infrastructure host vCPU cores reported by the Datadog Agent over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_aws_agg_sum: + description: |- + Shows the sum of all observed Infrastructure host vCPU cores on AWS over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_aws_avg_sum: + description: |- + Shows the average of all observed Infrastructure host vCPU cores on AWS over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_azure_agg_sum: + description: |- + Shows the sum of all observed Infrastructure host vCPU cores on Azure over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_azure_avg_sum: + description: |- + Shows the average of all observed Infrastructure host vCPU cores on Azure over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_gcp_agg_sum: + description: |- + Shows the sum of all observed Infrastructure host vCPU cores on GCP over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_gcp_avg_sum: + description: |- + Shows the average of all observed Infrastructure host vCPU cores on GCP over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_nutanix_agg_sum: + description: |- + Shows the sum of all observed Infrastructure host vCPU cores on Nutanix over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_nutanix_avg_sum: + description: |- + Shows the average of all observed Infrastructure host vCPU cores on Nutanix over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_opentelemetry_agg_sum: + description: |- + Shows the sum of all observed Infrastructure host vCPU cores reported by OpenTelemetry over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer + infra_cpu_observed_infra_host_vcpu_opentelemetry_avg_sum: + description: |- + Shows the average of all observed Infrastructure host vCPU cores reported by OpenTelemetry over all hours in the current month for all organizations. + Values are returned in millicores. Divide by 1,000 to convert to cores. + format: int64 + type: integer infra_edge_monitoring_devices_top99p_sum: description: Shows the 99th percentile of all Edge Devices Monitoring devices over all hours in the current month for all organizations. format: int64 @@ -25293,10 +26231,22 @@ components: description: Shows the average number of storage management objects over all hours in the current month for all organizations. format: int64 type: integer + ingest_points_agg_sum: + description: Shows the sum of all ingested custom metrics points over all hours in the current month for all organizations. + format: int64 + type: integer ingested_events_bytes_agg_sum: description: Shows the sum of all log bytes ingested over all hours in the current month for all organizations. format: int64 type: integer + iot_apm_host_agg_sum: + description: Shows the sum of all Application Performance Monitoring IoT hosts over all hours in the current month for all organizations. + format: int64 + type: integer + iot_apm_host_top99p_sum: + description: Shows the 99th percentile of all Application Performance Monitoring IoT hosts over all hours in the current month for all organizations. + format: int64 + type: integer iot_device_agg_sum: description: Shows the sum of all IoT devices over all hours in the current month for all organizations. format: int64 @@ -25318,6 +26268,22 @@ components: description: Shows the sum of all live logs bytes ingested over all hours in the current month for all organizations (data available as of December 1, 2020). format: int64 type: integer + llm_observability_15day_retention_spans_agg_sum: + description: Shows the sum of all LLM Observability 15-day retention spans over all hours in the current month for all organizations. + format: int64 + type: integer + llm_observability_30day_retention_spans_agg_sum: + description: Shows the sum of all LLM Observability 30-day retention spans over all hours in the current month for all organizations. + format: int64 + type: integer + llm_observability_60day_retention_spans_agg_sum: + description: Shows the sum of all LLM Observability 60-day retention spans over all hours in the current month for all organizations. + format: int64 + type: integer + llm_observability_90day_retention_spans_agg_sum: + description: Shows the sum of all LLM Observability 90-day retention spans over all hours in the current month for all organizations. + format: int64 + type: integer llm_observability_agg_sum: description: Sum of all LLM observability sessions for all hours in the current month for all organizations. format: int64 @@ -25326,8 +26292,16 @@ components: description: Minimum spend for LLM observability sessions for all hours in the current month for all organizations. format: int64 type: integer + logs_archive_search_gb_scanned_agg_sum: + description: Shows the sum of all Logs Archive Search scanned data over all hours in the current month for all organizations. + format: int64 + type: integer logs_by_retention: $ref: "#/components/schemas/LogsByRetention" + metric_names_agg_sum: + description: Shows the sum of all custom metric names over all hours in the current month for all organizations. + format: int64 + type: integer mobile_rum_lite_session_count_agg_sum: deprecated: true description: Shows the sum of all mobile lite sessions over all hours in the current month for all organizations (To be deprecated on October 1st, 2024). @@ -25744,6 +26718,14 @@ components: description: Shows the sum of all log events analyzed by Cloud SIEM over all hours in the current month for all organizations. format: int64 type: integer + snmp_device_count_agg_sum: + description: Shows the sum of all Network Device Monitoring devices over all hours in the current month for all organizations. + format: int64 + type: integer + snmp_device_count_top99p_sum: + description: Shows the 99th percentile of all Network Device Monitoring devices over all hours in the current month for all organizations. + format: int64 + type: integer start_date: description: Shows the first date of usage in the current month for all organizations. format: date-time @@ -36821,7 +37803,8 @@ paths: - slos_read post: description: |- - Create an SLO Correction. + Create an SLO correction. Use `slo_id` to apply the correction to a single SLO, or `slo_query` to apply the + correction to SLOs that match a query. Exactly one of `slo_id` or `slo_query` is required. operationId: CreateSLOCorrection requestBody: content: @@ -36838,6 +37821,17 @@ paths: start: 1600000000 timezone: UTC type: correction + slo_query: + value: + data: + attributes: + category: "Scheduled Maintenance" + description: "Planned maintenance window for checkout services." + end: 1600003600 + slo_query: "env:prod service:checkout" + start: 1600000000 + timezone: UTC + type: correction schema: $ref: "#/components/schemas/SLOCorrectionCreateRequest" description: Create an SLO Correction @@ -36997,6 +37991,17 @@ paths: start: 1600000000 timezone: UTC type: correction + slo_query: + value: + data: + attributes: + category: "Scheduled Maintenance" + description: "Updated correction for checkout services." + end: 1600003600 + slo_query: "env:prod service:checkout" + start: 1600000000 + timezone: UTC + type: correction schema: $ref: "#/components/schemas/SLOCorrectionUpdateRequest" description: The edited SLO correction object. @@ -42207,6 +43212,12 @@ paths: description: |- Get all usage across your account. + Newly added billing dimensions and usage types appear as untyped keys on the + `additionalProperties` map of `UsageSummaryResponse`, `UsageSummaryDate`, and + `UsageSummaryDateOrg` instead of as typed fields. Call + `GET /api/v2/usage/summary/available_fields` to enumerate every key returned + at each response level—both typed fields and `additionalProperties` keys. + This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/). operationId: GetUsageSummary parameters: @@ -42750,7 +43761,7 @@ paths: operator: OR permissions: - user_access_invite - "/api/v1/user/{user_handle}": + /api/v1/user/{user_handle}: delete: description: |- Delete a user from an organization. diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index a02697caa79..48ab737debc 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -161,6 +161,13 @@ components: schema: example: "2020-11-24T18:46:21+00:00" type: string + ApplicationKeyFilterOwnedByParameter: + description: Filter application keys by owner ID. + in: query + name: filter[owned_by] + required: false + schema: + type: string ApplicationKeyFilterParameter: description: Filter application keys by the specified string. in: query @@ -661,6 +668,13 @@ components: required: true schema: type: string + GoogleChatTargetAudienceIdPathParameter: + description: Your target audience ID. + in: path + name: target_audience_id + required: true + schema: + type: string HistoricalJobID: description: The ID of the job. in: path @@ -800,28 +814,6 @@ components: required: false schema: $ref: "#/components/schemas/IncidentSearchSortOrder" - IncidentServiceIDPathParameter: - description: The ID of the incident service. - in: path - name: service_id - required: true - schema: - type: string - IncidentServiceIncludeQueryParameter: - description: Specifies which types of related objects should be included in the response. - in: query - name: "include" - required: false - schema: - $ref: "#/components/schemas/IncidentRelatedObject" - IncidentServiceSearchQueryParameter: - description: A search query that filters services by name. - in: query - name: "filter" - required: false - schema: - example: "ExampleServiceName" - type: string IncidentTodoIDPathParameter: description: The UUID of the incident todo. in: path @@ -930,6 +922,58 @@ components: required: true schema: $ref: "#/components/schemas/LLMObsIntegrationName" + LLMObsPatternsConfigIDPathParameter: + description: The ID of the patterns configuration. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + in: path + name: config_id + required: true + schema: + type: string + LLMObsPatternsConfigIDQueryParameter: + description: The ID of the patterns configuration. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + in: query + name: config_id + required: true + schema: + type: string + LLMObsPatternsIncludeMetricsQueryParameter: + description: |- + When true, enrich each clustered point with span metrics such as status, + duration, token counts, estimated cost, and evaluations. + in: query + name: include_metrics + schema: + type: boolean + LLMObsPatternsPageSizeQueryParameter: + description: Maximum number of clustered points to return per page. + in: query + name: page_size + schema: + format: int64 + type: integer + LLMObsPatternsPageTokenQueryParameter: + description: Pagination token to retrieve the next page of clustered points. + in: query + name: page_token + schema: + type: string + LLMObsPatternsRunIDQueryParameter: + description: The ID of a specific patterns run. Defaults to the most recent completed run. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + in: query + name: run_id + schema: + type: string + LLMObsPatternsTopicIDQueryParameter: + description: The ID of the topic to retrieve clustered points for. + example: "5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21" + in: query + name: topic_id + required: true + schema: + type: string LLMObsProjectIDPathParameter: description: The ID of the LLM Observability project. example: "a33671aa-24fd-4dcd-9b33-a8ec7dde7751" @@ -1005,6 +1049,13 @@ components: required: true schema: type: string + MicrosoftTeamsTenantIDPathParameter: + description: Your tenant id. + in: path + name: tenant_id + required: true + schema: + type: string MicrosoftTeamsTenantIDQueryParameter: description: Your tenant id. in: query @@ -1559,7 +1610,7 @@ components: schema: type: string RumMetricIDParameter: - description: The name of the rum-based metric. + description: The name of the RUM-based metric. in: path name: metric_id required: true @@ -1572,6 +1623,23 @@ components: required: true schema: $ref: "#/components/schemas/RumPermanentRetentionFilterID" + RumRateLimitScopeIDParameter: + description: |- + The identifier of the scope the rate limit configuration applies to. + For the `application` scope, this is the RUM application ID. + in: path + name: scope_id + required: true + schema: + example: cd73a516-a481-4af5-8352-9b577465c77b + type: string + RumRateLimitScopeTypeParameter: + description: The type of scope the rate limit configuration applies to. + in: path + name: scope_type + required: true + schema: + $ref: "#/components/schemas/RumRateLimitScopeType" RumRetentionFilterIDParameter: description: Retention filter ID. in: path @@ -1579,6 +1647,14 @@ components: required: true schema: type: string + SAMLConfigurationUUIDPathParameter: + description: The UUID of the SAML configuration. + in: path + name: saml_config_uuid + required: true + schema: + example: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + type: string SalesforceIncidentsOrganizationIDPathParameter: description: The Datadog-assigned ID of the connected Salesforce organization. in: path @@ -1661,6 +1737,15 @@ components: required: true schema: type: string + SecurityMonitoringRuleVersion: + description: The historical version number of the rule. + in: path + name: version + required: true + schema: + example: 1 + format: int64 + type: integer SecurityMonitoringSuppressionID: description: The ID of the suppression rule in: path @@ -1712,6 +1797,14 @@ components: schema: example: "my-service" type: string + SharedDashboardDashboardIDPathParameter: + description: ID of the dashboard. + in: path + name: dashboard_id + required: true + schema: + example: abc-def-ghi + type: string SignalID: description: The ID of the signal. in: path @@ -1726,6 +1819,14 @@ components: required: false schema: type: boolean + SlackUserUuidQueryParameter: + description: The UUID of the Datadog user to list Slack bindings for. + in: query + name: user_uuid + required: true + schema: + format: uuid + type: string SloID: description: The ID of the SLO. in: path @@ -1748,6 +1849,14 @@ components: required: true schema: type: string + TagIndexingRuleId: + description: ID of the tag indexing rule. + example: 00000000-0000-0000-0000-000000000001 + in: path + name: id + required: true + schema: + type: string TagKey: description: The Cloud Cost Management tag key. Tag keys can contain forward slashes (for example, `kubernetes/instance`). in: path @@ -1931,12 +2040,7 @@ components: content: "application/json": schema: - properties: - data: - items: - $ref: "#/components/schemas/NotificationRule" - type: array - type: object + $ref: "#/components/schemas/NotificationRulesListResponse" description: The list of notification rules. PreconditionFailedResponse: content: @@ -2671,6 +2775,158 @@ components: type: string x-enum-varnames: - CCM_CONFIG + AWSCcmConfigValidationIssue: + description: A single validation issue found while validating an AWS Cost and Usage Report (CUR) 2.0 configuration. + properties: + code: + $ref: "#/components/schemas/AWSCcmConfigValidationIssueCode" + description: + description: Human-readable description of the validation issue. + example: 'no CUR 2.0 export named "cost-and-usage-report" found' + type: string + required: + - code + - description + type: object + AWSCcmConfigValidationIssueCode: + description: Identifies the specific reason a Cost and Usage Report (CUR) 2.0 configuration failed validation. + enum: + - ISSUE_CODE_UNSPECIFIED + - CREDENTIAL_ERROR + - BUCKET_NAME_INVALID_GOVCLOUD + - S3_LIST_PERMISSION_MISSING + - S3_GET_PERMISSION_MISSING + - S3_BUCKET_REGION_MISMATCH + - S3_BUCKET_NOT_ACCESSIBLE + - EXPORT_LIST_PERMISSION_MISSING + - EXPORT_GET_PERMISSION_MISSING + - EXPORT_NOT_FOUND + - EXPORT_STATUS_UNHEALTHY + - TIME_GRANULARITY_INVALID + - FILE_FORMAT_INVALID + - INCLUDE_RESOURCES_DISABLED + - REFRESH_CADENCE_INVALID + - OVERWRITE_MODE_INVALID + - QUERY_STATEMENT_INVALID + example: "EXPORT_NOT_FOUND" + type: string + x-enum-varnames: + - ISSUE_CODE_UNSPECIFIED + - CREDENTIAL_ERROR + - BUCKET_NAME_INVALID_GOVCLOUD + - S3_LIST_PERMISSION_MISSING + - S3_GET_PERMISSION_MISSING + - S3_BUCKET_REGION_MISMATCH + - S3_BUCKET_NOT_ACCESSIBLE + - EXPORT_LIST_PERMISSION_MISSING + - EXPORT_GET_PERMISSION_MISSING + - EXPORT_NOT_FOUND + - EXPORT_STATUS_UNHEALTHY + - TIME_GRANULARITY_INVALID + - FILE_FORMAT_INVALID + - INCLUDE_RESOURCES_DISABLED + - REFRESH_CADENCE_INVALID + - OVERWRITE_MODE_INVALID + - QUERY_STATEMENT_INVALID + AWSCcmConfigValidationIssues: + description: List of validation issues found for the Cost and Usage Report (CUR) 2.0 configuration. Empty when the configuration is valid. + items: + $ref: "#/components/schemas/AWSCcmConfigValidationIssue" + type: array + AWSCcmConfigValidationRequest: + description: AWS CCM config validation request body. + properties: + data: + $ref: "#/components/schemas/AWSCcmConfigValidationRequestData" + required: + - data + type: object + AWSCcmConfigValidationRequestAttributes: + description: Attributes for an AWS CCM config validation request. + properties: + account_id: + description: Your AWS Account ID without dashes. + example: "123456789012" + type: string + bucket_name: + description: Name of the S3 bucket where the Cost and Usage Report is stored. + example: "billing" + type: string + bucket_region: + description: AWS region of the S3 bucket. + example: "us-east-1" + type: string + report_name: + description: Name of the Cost and Usage Report. + example: "cost-and-usage-report" + type: string + report_prefix: + description: S3 prefix where the Cost and Usage Report is stored. + example: "reports" + type: string + required: + - account_id + - bucket_name + - bucket_region + - report_name + type: object + AWSCcmConfigValidationRequestData: + description: AWS CCM config validation request data. + properties: + attributes: + $ref: "#/components/schemas/AWSCcmConfigValidationRequestAttributes" + type: + $ref: "#/components/schemas/AWSCcmConfigValidationType" + required: + - attributes + - type + type: object + AWSCcmConfigValidationResponse: + description: AWS CCM config validation response body. + properties: + data: + $ref: "#/components/schemas/AWSCcmConfigValidationResponseData" + required: + - data + type: object + AWSCcmConfigValidationResponseAttributes: + description: Attributes for an AWS CCM config validation response. + properties: + account_id: + description: Your AWS Account ID without dashes. + example: "123456789012" + type: string + issues: + $ref: "#/components/schemas/AWSCcmConfigValidationIssues" + required: + - account_id + - issues + type: object + AWSCcmConfigValidationResponseData: + description: AWS CCM config validation response data. + properties: + attributes: + $ref: "#/components/schemas/AWSCcmConfigValidationResponseAttributes" + id: + description: AWS CCM config validation resource identifier. + example: "ccm_config_validation" + type: string + type: + $ref: "#/components/schemas/AWSCcmConfigValidationType" + required: + - attributes + - id + - type + type: object + AWSCcmConfigValidationType: + default: "ccm_config_validation" + description: AWS CCM config validation resource type. + enum: + - ccm_config_validation + example: "ccm_config_validation" + type: string + x-enum-varnames: + - CCM_CONFIG_VALIDATION AWSCloudAuthPersonaMappingAttributesResponse: description: Attributes for AWS cloud authentication persona mapping response properties: @@ -9976,6 +10232,132 @@ components: description: The product code for which the seats were assigned. type: string type: object + AssigneeDataType: + default: assignee + description: Assignee resource type. + enum: + - assignee + example: assignee + type: string + x-enum-varnames: + - ASSIGNEE + AssigneeRequest: + description: Request to assign or unassign security findings. + properties: + data: + $ref: "#/components/schemas/AssigneeRequestData" + required: + - data + type: object + AssigneeRequestData: + description: Data of the assignee request. + properties: + attributes: + $ref: "#/components/schemas/AssigneeRequestDataAttributes" + id: + description: Unique identifier of the assignee request. + example: "00000000-0000-0000-0000-000000000001" + type: string + relationships: + $ref: "#/components/schemas/AssigneeRequestDataRelationships" + type: + $ref: "#/components/schemas/AssigneeDataType" + required: + - relationships + - type + type: object + AssigneeRequestDataAttributes: + description: Attributes of the assignee request. + properties: + assignee_id: + description: Unique identifier of the Datadog user to assign the security findings to. If this field is not provided, the security findings are unassigned. + example: "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0" + type: string + type: object + AssigneeRequestDataRelationships: + description: Relationships of the assignee request. + properties: + findings: + $ref: "#/components/schemas/Findings" + description: Security findings to assign or unassign. + required: + - findings + type: object + AssigneeResponse: + description: Response for the assign or unassign request. + properties: + data: + $ref: "#/components/schemas/AssigneeResponseData" + meta: + $ref: "#/components/schemas/AssigneeResponseMeta" + required: + - data + type: object + AssigneeResponseData: + description: Data of the assignee response. + properties: + attributes: + $ref: "#/components/schemas/AssigneeResponseDataAttributes" + id: + description: Unique identifier of the assignee request. + example: "00000000-0000-0000-0000-000000000001" + type: string + type: + $ref: "#/components/schemas/AssigneeDataType" + required: + - id + - type + - attributes + type: object + AssigneeResponseDataAttributes: + description: Attributes of the assignee response. + properties: + assignee_id: + description: Unique identifier of the Datadog user assigned to the security findings. Omitted when the findings were unassigned. + example: "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0" + type: string + type: object + AssigneeResponseMeta: + description: Per-finding warnings and failures produced while processing the bulk assignee request. + properties: + failures: + description: Findings that could not be assigned or unassigned. + items: + $ref: "#/components/schemas/AssignmentResult" + type: array + warnings: + description: Findings for which the assignment succeeded but a non-critical error occurred during processing. + items: + $ref: "#/components/schemas/AssignmentResult" + type: array + type: object + AssignmentResult: + description: Per-finding outcome of an assign or unassign operation. + properties: + detail: + description: Human-readable explanation of the outcome. + example: "failed to update finding assignee" + type: string + finding_id: + description: Unique identifier of the security finding. + example: "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==" + type: string + status: + description: HTTP-like status code describing the outcome for this finding. + example: 500 + format: int32 + maximum: 599 + type: integer + title: + description: Short label describing the outcome for this finding. + example: "Internal Server Error" + type: string + required: + - finding_id + - status + - title + - detail + type: object AttachCaseRequest: description: Request for attaching security findings to a case. properties: @@ -10047,6 +10429,51 @@ components: - findings - project type: object + AttachServiceNowTicketRequest: + description: Request for attaching security findings to a ServiceNow ticket. + properties: + data: + $ref: "#/components/schemas/AttachServiceNowTicketRequestData" + required: + - data + type: object + AttachServiceNowTicketRequestData: + description: Data of the ServiceNow ticket to attach security findings to. + properties: + attributes: + $ref: "#/components/schemas/AttachServiceNowTicketRequestDataAttributes" + relationships: + $ref: "#/components/schemas/AttachServiceNowTicketRequestDataRelationships" + type: + $ref: "#/components/schemas/ServiceNowTicketsDataType" + required: + - attributes + - relationships + - type + type: object + AttachServiceNowTicketRequestDataAttributes: + description: Attributes of the ServiceNow ticket to attach security findings to. + properties: + servicenow_ticket_url: + description: URL of the ServiceNow incident to attach security findings to. Must be a service-now.com URL pointing to an incident record. + example: "https://example.service-now.com/now/nav/ui/classic/params/target/incident.do?sys_id=abcdef0123456789abcdef0123456789" + type: string + required: + - servicenow_ticket_url + type: object + AttachServiceNowTicketRequestDataRelationships: + description: Relationships of the ServiceNow ticket to attach security findings to. + properties: + findings: + $ref: "#/components/schemas/Findings" + description: Security findings to attach to the ServiceNow ticket. + project: + $ref: "#/components/schemas/CaseManagementProject" + description: Case management project with the ServiceNow integration configured. It is used to attach security findings to the ServiceNow ticket. + required: + - findings + - project + type: object Attachment: description: An attachment response containing the attachment data and related objects. properties: @@ -16935,6 +17362,32 @@ components: required: - type type: object + CloneFormData: + description: The data for cloning a form. + properties: + attributes: + $ref: "#/components/schemas/CloneFormDataAttributes" + type: + $ref: "#/components/schemas/FormType" + required: + - type + type: object + CloneFormDataAttributes: + description: The attributes for cloning a form. + properties: + name: + description: The name for the cloned form. Defaults to "Copy of (source form name)" if not provided. + example: Copy of My Form + type: string + type: object + CloneFormRequest: + description: A request to clone a form. + properties: + data: + $ref: "#/components/schemas/CloneFormData" + required: + - data + type: object CloudAssetType: description: The cloud asset type enum: @@ -17688,7 +18141,8 @@ components: description: "The value of the set action" oneOf: - type: string - - type: integer + - format: int64 + type: integer - type: boolean CloudWorkloadSecurityAgentRuleActions: description: "The array of actions the rule can perform if triggered" @@ -22865,6 +23319,60 @@ components: required: - data type: object + CreateFormData: + description: The data for creating a form. + properties: + attributes: + $ref: "#/components/schemas/CreateFormDataAttributes" + type: + $ref: "#/components/schemas/FormType" + required: + - attributes + - type + type: object + CreateFormDataAttributes: + description: The attributes for creating a form. + properties: + anonymous: + default: false + description: Whether the form accepts anonymous submissions. + example: false + type: boolean + data_definition: + $ref: "#/components/schemas/FormDataDefinition" + description: + description: The description of the form. + example: A form to collect user feedback. + type: string + idp_survey: + default: false + description: Whether the form is an IDP survey. + example: false + type: boolean + name: + description: The name of the form. + example: User Feedback Form + type: string + single_response: + default: false + description: Whether each user can only submit one response. + example: false + type: boolean + ui_definition: + $ref: "#/components/schemas/FormUiDefinition" + required: + - data_definition + - name + - ui_definition + type: object + CreateFormRequest: + description: A request to create a form. + properties: + data: + $ref: "#/components/schemas/CreateFormData" + required: + - data + type: object CreateIncidentNotificationRuleRequest: description: Create request for a notification rule. properties: @@ -23091,6 +23599,8 @@ components: $ref: "#/components/schemas/Enabled" name: $ref: "#/components/schemas/RuleName" + routing: + $ref: "#/components/schemas/NotificationRuleRouting" selectors: $ref: "#/components/schemas/Selectors" targets: @@ -23548,6 +24058,63 @@ components: type: string x-enum-varnames: - CREATE_RULESET + CreateServiceNowTicketRequestArray: + description: List of requests to create ServiceNow tickets for security findings. + properties: + data: + description: Array of ServiceNow ticket creation request data objects. + items: + $ref: "#/components/schemas/CreateServiceNowTicketRequestData" + type: array + required: + - data + type: object + CreateServiceNowTicketRequestData: + description: Data of the ServiceNow ticket to create. + properties: + attributes: + $ref: "#/components/schemas/CreateServiceNowTicketRequestDataAttributes" + relationships: + $ref: "#/components/schemas/CreateServiceNowTicketRequestDataRelationships" + type: + $ref: "#/components/schemas/ServiceNowTicketsDataType" + required: + - relationships + - type + type: object + CreateServiceNowTicketRequestDataAttributes: + description: Attributes of the ServiceNow ticket to create. + properties: + assignee_id: + description: Unique identifier of the Datadog user assigned to the case backing the ServiceNow ticket. + example: "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0" + type: string + description: + description: Description of the ServiceNow ticket. If not provided, the description will be automatically generated. + example: "A description of the ServiceNow ticket." + type: string + priority: + $ref: "#/components/schemas/CasePriority" + description: Datadog case priority mapped to the ServiceNow ticket priority. If not provided, the priority will be automatically set to "NOT_DEFINED". + example: "P4" + title: + description: Title of the ServiceNow ticket. If not provided, the title will be automatically generated. + example: "A title for the ServiceNow ticket." + type: string + type: object + CreateServiceNowTicketRequestDataRelationships: + description: Relationships of the ServiceNow ticket to create. + properties: + findings: + $ref: "#/components/schemas/Findings" + description: Security findings to create a ServiceNow ticket for. + project: + $ref: "#/components/schemas/CaseManagementProject" + description: Case management project configured with the ServiceNow integration. It is used to create the ServiceNow ticket. + required: + - findings + - project + type: object CreateStatusPageRequest: description: Request object for creating a status page. example: @@ -24383,6 +24950,189 @@ components: type: $ref: "#/components/schemas/CSMAgentsType" type: object + CsmAgentlessHostAttributes: + description: Attributes of an agentless host. + properties: + account_id: + description: The ID of the cloud account that the host belongs to. + example: "123456789012" + type: string + cloud_provider: + $ref: "#/components/schemas/CsmCloudProvider" + has_posture_management: + description: Whether CSM Misconfigurations is enabled for this host. `true` if enabled; `false` if disabled. + example: true + type: boolean + has_vulnerability_scanning: + description: Whether CSM Vulnerabilities is enabled for this host. `true` if enabled; `false` if disabled. + example: true + type: boolean + resource_type: + $ref: "#/components/schemas/CsmAgentlessHostResourceType" + required: + - account_id + - cloud_provider + - resource_type + - has_posture_management + - has_vulnerability_scanning + type: object + CsmAgentlessHostData: + description: A single agentless host resource. + properties: + attributes: + $ref: "#/components/schemas/CsmAgentlessHostAttributes" + id: + description: The resource identifier of the agentless host. + example: i-0123456789abcdef0 + type: string + type: + $ref: "#/components/schemas/CsmAgentlessHostType" + required: + - id + - type + - attributes + type: object + CsmAgentlessHostFacetAttributes: + description: Attributes of an agentless host facet. + properties: + bounded: + description: Whether the facet has a bounded set of allowed values. `true` indicates a fixed value set and `false` indicates free-form values. + example: true + type: boolean + bundled: + description: Whether the facet is bundled as part of the default facet set. `true` indicates bundled and `false` indicates custom. + example: true + type: boolean + bundledAndUsed: + description: Whether the facet is both bundled and actively used. `true` indicates in use; `false` indicates unused. + example: true + type: boolean + defaultValues: + $ref: "#/components/schemas/CsmHostFacetDefaultValues" + description: + description: A human-readable description of what the facet represents. + example: The cloud provider of the resource + type: string + editable: + description: Whether the facet can be edited by users. `true` indicates editable; `false` indicates read-only. + example: false + type: boolean + facetType: + description: The UI display type for the facet, such as `list`. + example: list + type: string + groups: + $ref: "#/components/schemas/CsmHostFacetGroups" + name: + description: The display name of the facet. + example: Cloud Provider + type: string + path: + description: The field path used when filtering by this facet. + example: cloud_provider + type: string + source: + description: The data source that provides the facet values. + example: core + type: string + type: + description: The data type of the facet values. + example: string + type: string + values: + $ref: "#/components/schemas/CsmHostFacetValues" + required: + - name + - path + - description + - groups + - bounded + - bundled + - bundledAndUsed + - defaultValues + - editable + - facetType + - source + - type + - values + type: object + CsmAgentlessHostFacetData: + description: A single agentless host facet resource. + properties: + attributes: + $ref: "#/components/schemas/CsmAgentlessHostFacetAttributes" + id: + description: The identifier of the facet, corresponding to the field path. + example: cloud_provider + type: string + type: + $ref: "#/components/schemas/CsmAgentlessHostFacetType" + required: + - id + - type + - attributes + type: object + CsmAgentlessHostFacetItems: + description: The list of available facets for agentless hosts. + items: + $ref: "#/components/schemas/CsmAgentlessHostFacetData" + type: array + CsmAgentlessHostFacetType: + default: agentless_host_facet + description: The JSON:API type for agentless host facet resources. The value should always be `agentless_host_facet`. + enum: + - agentless_host_facet + example: agentless_host_facet + type: string + x-enum-varnames: + - AGENTLESS_HOST_FACET + CsmAgentlessHostFacetsResponse: + description: The response returned when listing facets for agentless hosts. + properties: + data: + $ref: "#/components/schemas/CsmAgentlessHostFacetItems" + required: + - data + type: object + CsmAgentlessHostItems: + description: The list of agentless hosts for the current page. + items: + $ref: "#/components/schemas/CsmAgentlessHostData" + type: array + CsmAgentlessHostResourceType: + description: The type of cloud resource for an agentless host. + enum: + - aws_ec2_instance + - azure_virtual_machine_instance + - gcp_compute_instance + - oci_instance + example: aws_ec2_instance + type: string + x-enum-varnames: + - AWS_EC2_INSTANCE + - AZURE_VIRTUAL_MACHINE_INSTANCE + - GCP_COMPUTE_INSTANCE + - OCI_INSTANCE + CsmAgentlessHostType: + default: agentless_host + description: The JSON:API type for agentless host resources. The value should always be `agentless_host`. + enum: + - agentless_host + example: agentless_host + type: string + x-enum-varnames: + - AGENTLESS_HOST + CsmAgentlessHostsResponse: + description: The response returned when listing agentless hosts. + properties: + data: + $ref: "#/components/schemas/CsmAgentlessHostItems" + meta: + $ref: "#/components/schemas/CsmSettingsMeta" + required: + - data + - meta + type: object CsmAgentsAttributes: description: "A CSM Agent returned by the API." properties: @@ -24501,6 +25251,20 @@ components: data: $ref: "#/components/schemas/CsmCloudAccountsCoverageAnalysisData" type: object + CsmCloudProvider: + description: The cloud provider of a host resource. + enum: + - aws + - gcp + - azure + - oci + example: aws + type: string + x-enum-varnames: + - AWS + - GCP + - AZURE + - OCI CsmCoverageAnalysis: description: CSM Coverage Analysis. properties: @@ -24525,6 +25289,103 @@ components: format: int64 type: integer type: object + CsmFacetInfoType: + default: facet_info + description: The JSON:API type for facet info resources. The value should always be `facet_info`. + enum: + - facet_info + example: facet_info + type: string + x-enum-varnames: + - FACET_INFO + CsmHostFacetDefaultValues: + description: The list of default filter values for the facet. + example: [] + items: + type: string + type: array + CsmHostFacetGroups: + description: The list of UI groups that this facet belongs to. + example: + - agentless + items: + type: string + type: array + CsmHostFacetInfoAttributes: + description: Attributes of a facet info response, containing the value distribution for the requested facet. + properties: + items: + $ref: "#/components/schemas/CsmHostFacetInfoItems" + required: + - items + type: object + CsmHostFacetInfoData: + description: The data wrapper for a facet info response. + properties: + attributes: + $ref: "#/components/schemas/CsmHostFacetInfoAttributes" + id: + description: The identifier of the facet. + example: cloud_provider + type: string + meta: + $ref: "#/components/schemas/CsmHostFacetInfoMeta" + type: + $ref: "#/components/schemas/CsmFacetInfoType" + required: + - id + - type + - attributes + - meta + type: object + CsmHostFacetInfoItem: + description: A single value and its occurrence count for a facet. + properties: + count: + description: The number of resources with this facet value. + example: 100 + format: int64 + type: integer + value: + description: The facet value. + example: aws + type: string + required: + - value + - count + type: object + CsmHostFacetInfoItems: + description: The list of facet value entries for the current page. + items: + $ref: "#/components/schemas/CsmHostFacetInfoItem" + type: array + CsmHostFacetInfoMeta: + description: Metadata for the facet info response. + properties: + total_count: + description: The total number of distinct values for this facet. + example: 4 + format: int64 + type: integer + required: + - total_count + type: object + CsmHostFacetInfoResponse: + description: The response returned when requesting value distribution for a specific facet. + properties: + data: + $ref: "#/components/schemas/CsmHostFacetInfoData" + required: + - data + type: object + CsmHostFacetValues: + description: The list of allowed filter values for bounded facets. Empty for unbounded facets. + example: + - aws + - gcp + items: + type: string + type: array CsmHostsAndContainersCoverageAnalysisAttributes: description: CSM Hosts and Containers Coverage Analysis attributes. properties: @@ -24597,6 +25458,235 @@ components: data: $ref: "#/components/schemas/CsmServerlessCoverageAnalysisData" type: object + CsmSettingsMeta: + description: Pagination metadata for a CSM settings list response. + properties: + page_index: + description: The current page index (zero-based). + example: 0 + format: int64 + type: integer + page_size: + description: The number of resources returned per page. + example: 10 + format: int64 + type: integer + total_filtered: + description: The total number of resources matching the filter criteria. + example: 100 + format: int64 + type: integer + required: + - total_filtered + - page_index + - page_size + type: object + CsmUnifiedHostAttributes: + description: Attributes of a unified host, combining data from agent and agentless sources. + properties: + account_id: + description: The ID of the cloud account that the host belongs to. Present only when the host was discovered through agentless scanning. + example: "123456789012" + nullable: true + type: string + agent_csm_vm_containers_enabled: + description: Whether CSM Vulnerabilities is enabled for containers through the Datadog Agent. `true` if enabled; `false` if disabled. + example: false + nullable: true + type: boolean + agent_csm_vm_hosts_enabled: + description: Whether CSM Vulnerabilities is enabled for hosts through the Datadog Agent. `true` if enabled; `false` if disabled. + example: true + nullable: true + type: boolean + agent_cws_enabled: + description: Whether CSM Threats is enabled for this host through the Datadog Agent. `true` if enabled; `false` if disabled. + example: false + nullable: true + type: boolean + agent_posture_management: + description: Whether CSM Misconfigurations is enabled for this host through the Datadog Agent. `true` if enabled; `false` if disabled. + example: true + nullable: true + type: boolean + agent_version: + description: The version of the Datadog Agent running on this host. + example: 7.50.0 + nullable: true + type: string + agentless_posture_management: + description: Whether CSM Misconfigurations is enabled for this host via agentless scanning. `true` if enabled; `false` if disabled. + example: false + nullable: true + type: boolean + agentless_vulnerability_scanning: + description: Whether CSM Vulnerabilities is enabled for this host via agentless scanning. `true` if enabled; `false` if disabled. + example: true + nullable: true + type: boolean + cloud_provider: + $ref: "#/components/schemas/CsmCloudProvider" + cluster_name: + description: The name of the Kubernetes cluster the host belongs to, if applicable. + example: my-cluster + nullable: true + type: string + datadog_agent_key: + description: The Datadog Agent key associated with this host. Present only for agent-sourced hosts. + example: key123 + nullable: true + type: string + env: + description: The list of environment tags associated with this host. + example: + - prod + items: + type: string + nullable: true + type: array + host_id: + description: The internal Datadog host identifier. Present only for agent-sourced hosts. + example: 12345678 + format: int64 + nullable: true + type: integer + install_method_tool: + description: The tool used to install the Datadog Agent on this host. + example: helm + nullable: true + type: string + os: + description: The operating system of the host. Present only for agent-sourced hosts. + example: linux + nullable: true + type: string + resource_type: + $ref: "#/components/schemas/CsmAgentlessHostResourceType" + source: + $ref: "#/components/schemas/CsmUnifiedHostSource" + required: + - source + type: object + CsmUnifiedHostData: + description: A single unified host resource, combining agent and agentless data. + properties: + attributes: + $ref: "#/components/schemas/CsmUnifiedHostAttributes" + id: + description: The resource identifier of the unified host. + example: i-0123456789abcdef0 + type: string + type: + $ref: "#/components/schemas/CsmUnifiedHostType" + required: + - id + - type + - attributes + type: object + CsmUnifiedHostFacetData: + description: A single unified host facet resource. + properties: + attributes: + $ref: "#/components/schemas/CsmAgentlessHostFacetAttributes" + id: + description: The identifier of the facet, corresponding to the field path. + example: cloud_provider + type: string + type: + $ref: "#/components/schemas/CsmUnifiedHostFacetType" + required: + - id + - type + - attributes + type: object + CsmUnifiedHostFacetItems: + description: The list of available facets for unified hosts. + items: + $ref: "#/components/schemas/CsmUnifiedHostFacetData" + type: array + CsmUnifiedHostFacetType: + default: unified_host_facet + description: The JSON:API type for unified host facet resources. The value should always be `unified_host_facet`. + enum: + - unified_host_facet + example: unified_host_facet + type: string + x-enum-varnames: + - UNIFIED_HOST_FACET + CsmUnifiedHostFacetsResponse: + description: The response returned when listing facets for unified hosts. + properties: + data: + $ref: "#/components/schemas/CsmUnifiedHostFacetItems" + required: + - data + type: object + CsmUnifiedHostItems: + description: The list of unified hosts for the current page. + items: + $ref: "#/components/schemas/CsmUnifiedHostData" + type: array + CsmUnifiedHostSource: + description: The source of a unified host entry, indicating whether it was discovered via agent, agentless scanning, or both. + enum: + - agent + - agentless + - both + example: agent + type: string + x-enum-varnames: + - AGENT + - AGENTLESS + - BOTH + CsmUnifiedHostType: + default: unified_host + description: The JSON:API type for unified host resources. The value should always be `unified_host`. + enum: + - unified_host + example: unified_host + type: string + x-enum-varnames: + - UNIFIED_HOST + CsmUnifiedHostsMeta: + description: Pagination metadata for a unified hosts list response. + properties: + page_index: + description: The current page index (zero-based). + example: 0 + format: int64 + type: integer + page_size: + description: The number of hosts returned per page. + example: 10 + format: int64 + type: integer + total_filtered: + description: The total number of hosts matching the filter criteria. + example: 100 + format: int64 + type: integer + total_pages: + description: The total number of pages available. + example: 10 + format: int64 + type: integer + required: + - total_filtered + - page_index + - page_size + - total_pages + type: object + CsmUnifiedHostsResponse: + description: The response returned when listing unified hosts. + properties: + data: + $ref: "#/components/schemas/CsmUnifiedHostItems" + meta: + $ref: "#/components/schemas/CsmUnifiedHostsMeta" + required: + - data + - meta + type: object CustomAttributeConfig: description: "A custom attribute configuration that defines an organization-specific metadata field on cases. Custom attributes are scoped to a case type and can hold text, URLs, numbers, or predefined select options." properties: @@ -26406,6 +27496,100 @@ components: required: - data type: object + CustomerOrgDisableRequest: + description: Request payload for disabling the authenticated customer organization. + properties: + data: + $ref: "#/components/schemas/CustomerOrgDisableRequestData" + required: + - data + type: object + CustomerOrgDisableRequestAttributes: + description: |- + Optional attributes for a customer org disable request. When supplied, `org_uuid` + must match the authenticated organization or the request is rejected. + properties: + org_uuid: + description: |- + Datadog organization UUID. If supplied, must match the authenticated + organization. + example: "abcdef01-2345-6789-abcd-ef0123456789" + type: string + type: object + CustomerOrgDisableRequestData: + description: Data object for a customer org disable request. + properties: + attributes: + $ref: "#/components/schemas/CustomerOrgDisableRequestAttributes" + id: + description: |- + Optional client-supplied identifier for the request. Useful for client-side + correlation; the server does not use this value. + example: "1" + type: string + type: + $ref: "#/components/schemas/CustomerOrgDisableType" + required: + - type + type: object + CustomerOrgDisableResponse: + description: Response describing the outcome of disabling the customer organization. + properties: + data: + $ref: "#/components/schemas/CustomerOrgDisableResponseData" + required: + - data + type: object + CustomerOrgDisableResponseAttributes: + description: Attributes describing the outcome of the disable action on the customer organization. + properties: + status: + $ref: "#/components/schemas/CustomerOrgDisableStatus" + required: + - status + type: object + CustomerOrgDisableResponseData: + description: Data object returned after disabling the customer organization. + properties: + attributes: + $ref: "#/components/schemas/CustomerOrgDisableResponseAttributes" + id: + description: Identifier of the disabled organization. + example: "abcdef01-2345-6789-abcd-ef0123456789" + type: string + type: + $ref: "#/components/schemas/CustomerOrgDisableResponseType" + required: + - type + - id + - attributes + type: object + CustomerOrgDisableResponseType: + description: JSON:API resource type for a customer org disable response. + enum: + - org_disable + example: "org_disable" + type: string + x-enum-varnames: + - ORG_DISABLE + CustomerOrgDisableStatus: + description: Resulting lifecycle status of the organization after the disable action. + enum: + - disabled + - pending_disable + example: "disabled" + type: string + x-enum-varnames: + - DISABLED + - PENDING_DISABLE + CustomerOrgDisableType: + description: JSON:API resource type for a customer org disable request. + enum: + - customer_org_disable + example: "customer_org_disable" + type: string + x-enum-varnames: + - CUSTOMER_ORG_DISABLE DORACustomTags: description: A list of user-defined tags. The tags must follow the `key:value` pattern. Up to 100 may be added per event. example: @@ -27598,6 +28782,31 @@ components: - bucket_name - bucket_region type: object + DataObservabilityMonitorRunStatus: + description: The status of a data observability monitor run. + enum: + - pending + - ok + - warn + - alert + - error + example: pending + type: string + x-enum-varnames: + - PENDING + - OK + - WARN + - ALERT + - ERROR + DataObservabilityMonitorRunType: + default: monitor_run + description: The JSON:API resource type for a data observability monitor run. + enum: + - monitor_run + example: monitor_run + type: string + x-enum-varnames: + - MONITOR_RUN DataRelationshipsTeams: description: Associates teams with this schedule in a data structure. properties: @@ -28529,6 +29738,26 @@ components: required: - data type: object + DeleteFormData: + description: The data returned when a form is deleted. + properties: + id: + description: The ID of the deleted form. + example: 844dfd88-aa84-4db4-8979-e7bdbb9c1dc3 + format: uuid + type: string + type: + $ref: "#/components/schemas/FormType" + required: + - id + - type + type: object + DeleteFormResponse: + description: A response returned after deleting a form. + properties: + data: + $ref: "#/components/schemas/DeleteFormData" + type: object DeletedSuiteResponseData: description: Data object for a deleted Synthetic test suite. properties: @@ -30132,6 +31361,76 @@ components: - type - attributes type: object + ELFSourcemapAttributes: + description: Attributes of an ELF symbol file. + properties: + arch: + description: The target CPU architecture. + example: arm64 + type: string + created_at: + description: The timestamp when the symbol file was created. + example: "2024-01-01T00:00:00Z" + format: date-time + type: string + file_hash: + description: The SHA256 hash of the ELF file. + example: abc123def456 + type: string + file_name: + description: The ELF file name. + example: libmyapp.so + type: string + gnu_build_id: + description: The GNU build ID (UUID format). + example: 550e8400-e29b-41d4-a716-446655440000 + type: string + go_build_id: + description: The Go build ID (UUID format). + example: 550e8400-e29b-41d4-a716-446655440001 + type: string + mapkind: + description: The type of source map. + example: elf + type: string + origin: + description: The origin of the ELF file. + example: debian + type: string + origin_version: + description: The version of the origin package. + example: 1.0.0 + type: string + size: + description: The size of the ELF file in bytes. + example: 16384 + format: int64 + type: integer + symbol_source: + description: The source of the debug symbols. + example: debuginfo + type: string + required: + - mapkind + - size + - created_at + type: object + ELFSourcemapData: + description: ELF symbol file data object. + properties: + attributes: + $ref: "#/components/schemas/ELFSourcemapAttributes" + id: + description: The unique identifier of the source map. + example: "6" + type: string + type: + $ref: "#/components/schemas/SourcemapDataType" + required: + - id + - type + - attributes + type: object EPSS: description: Vulnerability EPSS severity. properties: @@ -30271,9 +31570,10 @@ components: additionalProperties: {} description: The set of attributes recorded for the entity at this revision. The keys depend on the kind of entity. example: + accounts: + - linked-account-123 display_name: Test User - emails: - - user@example.com + email: user@example.com principal_id: user@example.com type: object EntityData: @@ -33981,6 +35281,9 @@ components: description: Priority of the case. example: "P4" type: string + servicenow_ticket: + $ref: "#/components/schemas/FindingServiceNowTicket" + description: ServiceNow ticket associated with the case. status: description: Status of the case. example: "OPEN" @@ -34170,6 +35473,44 @@ components: example: Soft delete is enabled for Azure Storage type: string type: object + FindingServiceNowTicket: + description: ServiceNow ticket associated with the case. + properties: + result: + $ref: "#/components/schemas/FindingServiceNowTicketResult" + status: + description: Status of the ServiceNow ticket operation. Can be "COMPLETED" if successful, or "FAILED" if the operation failed. + example: "COMPLETED" + type: string + type: object + FindingServiceNowTicketResult: + description: Result of the ServiceNow ticket creation or attachment. + properties: + instance_name: + description: ServiceNow instance name extracted from the ticket URL. + example: "example" + type: string + sys_id: + description: Unique identifier of the ServiceNow incident record. + example: "abcdef0123456789abcdef0123456789" + type: string + sys_target_link: + description: Direct link to the ServiceNow incident record. + example: "https://example.service-now.com/incident.do?sys_id=abcdef0123456789abcdef0123456789" + type: string + sys_target_sys_id: + description: Unique identifier of the target ServiceNow record. + example: "abcdef0123456789abcdef0123456789" + type: string + table_name: + description: ServiceNow table containing the incident record. + example: "incident" + type: string + url: + description: URL of the ServiceNow incident record. + example: "https://example.service-now.com/now/nav/ui/classic/params/target/incident.do?sys_id=abcdef0123456789abcdef0123456789" + type: string + type: object FindingStatus: description: The status of the finding. enum: @@ -35084,155 +36425,6 @@ components: format: int64 type: integer type: object - FleetClusterAttributes: - description: Attributes of a Kubernetes cluster in the fleet. - properties: - agent_versions: - description: Datadog Agent versions running in the cluster. - items: - description: A Datadog Agent version string. - type: string - type: array - api_key_names: - description: API key names used by agents in the cluster. - items: - description: An API key name. - type: string - type: array - api_key_uuids: - description: API key UUIDs used by agents in the cluster. - items: - description: An API key UUID. - type: string - type: array - cloud_providers: - description: Cloud providers hosting the cluster. - items: - description: A cloud provider name. - type: string - type: array - cluster_name: - description: The name of the Kubernetes cluster. - example: "production-us-east-1" - type: string - enabled_products: - description: Datadog products enabled in the cluster. - items: - description: A Datadog product name. - type: string - type: array - envs: - description: Environments associated with the cluster. - items: - description: An environment name. - type: string - type: array - first_seen_at: - description: Timestamp when the cluster was first seen. - format: int64 - type: integer - install_method_tool: - description: The tool used to install agents in the cluster. - example: "helm" - type: string - node_count: - description: Total number of nodes in the cluster. - example: 25 - format: int64 - type: integer - node_count_by_status: - $ref: "#/components/schemas/FleetClusterNodeCountByStatus" - operating_systems: - description: Operating systems of nodes in the cluster. - items: - description: An operating system name. - type: string - type: array - otel_collector_distributions: - description: OpenTelemetry collector distributions in the cluster. - items: - description: An OpenTelemetry collector distribution name. - type: string - type: array - otel_collector_versions: - description: OpenTelemetry collector versions in the cluster. - items: - description: An OpenTelemetry collector version string. - type: string - type: array - pod_count_by_state: - $ref: "#/components/schemas/FleetClusterPodCountByState" - services: - description: Services running in the cluster. - items: - description: A service name. - type: string - type: array - teams: - description: Teams associated with the cluster. - items: - description: A team name. - type: string - type: array - type: object - FleetClusterNodeCountByStatus: - additionalProperties: - format: int64 - type: integer - description: Node counts grouped by status. - type: object - FleetClusterPodCountByState: - additionalProperties: - format: int64 - type: integer - description: Pod counts grouped by state. - type: object - FleetClustersResponse: - description: Response containing a paginated list of fleet clusters. - properties: - data: - $ref: "#/components/schemas/FleetClustersResponseData" - meta: - $ref: "#/components/schemas/FleetClustersResponseMeta" - required: - - data - type: object - FleetClustersResponseData: - description: The response data containing status and clusters array. - properties: - attributes: - $ref: "#/components/schemas/FleetClustersResponseDataAttributes" - id: - description: Status identifier. - example: "done" - type: string - type: - description: Resource type. - example: "status" - type: string - required: - - id - - type - - attributes - type: object - FleetClustersResponseDataAttributes: - description: Attributes of the fleet clusters response containing the list of clusters. - properties: - clusters: - description: Array of clusters matching the query criteria. - items: - $ref: "#/components/schemas/FleetClusterAttributes" - type: array - type: object - FleetClustersResponseMeta: - description: Metadata for the list of clusters response. - properties: - total_filtered_count: - description: Total number of clusters matching the filter criteria across all pages. - example: 12 - format: int64 - type: integer - type: object FleetConfigurationFile: description: A configuration file for an integration. properties: @@ -35582,93 +36774,6 @@ components: example: "postgres" type: string type: object - FleetInstrumentedPodGroupAttributes: - description: Attributes of a group of instrumented pods targeted for SSI injection. - properties: - applied_target: - additionalProperties: {} - description: The SSI injection target configuration applied to the pod group. - type: object - applied_target_name: - description: The name of the applied SSI injection target. - example: "my-injection-target" - type: string - injected_tags: - description: Tags injected into the pods by the Admission Controller. - items: - description: An injected tag string. - type: string - type: array - kube_ownerref_kind: - description: The kind of the Kubernetes owner reference. - example: "Deployment" - type: string - kube_ownerref_name: - description: The name of the Kubernetes owner reference (deployment, statefulset, etc.). - example: "inventory-service" - type: string - lib_injection_annotations: - description: Library injection annotations on the pod group. - items: - description: A library injection annotation string. - type: string - type: array - namespace: - description: The Kubernetes namespace of the pod group. - example: "default" - type: string - pod_count: - description: Total number of pods in the group. - example: 3 - format: int64 - type: integer - pod_names: - description: Names of the individual pods in the group. - items: - description: A Kubernetes pod name. - type: string - type: array - tags: - additionalProperties: - type: string - description: Additional tags associated with the pod group. - type: object - type: object - FleetInstrumentedPodsResponse: - description: Response containing instrumented pods for a Kubernetes cluster. - properties: - data: - $ref: "#/components/schemas/FleetInstrumentedPodsResponseData" - required: - - data - type: object - FleetInstrumentedPodsResponseData: - description: The response data containing the cluster name and instrumented pod groups. - properties: - attributes: - $ref: "#/components/schemas/FleetInstrumentedPodsResponseDataAttributes" - id: - description: The cluster name identifier. - example: "production-us-east-1" - type: string - type: - description: Resource type. - example: "cluster_name" - type: string - required: - - id - - type - - attributes - type: object - FleetInstrumentedPodsResponseDataAttributes: - description: Attributes of the instrumented pods response containing the list of pod groups. - properties: - groups: - description: Array of instrumented pod groups in the cluster. - items: - $ref: "#/components/schemas/FleetInstrumentedPodGroupAttributes" - type: array - type: object FleetIntegrationDetails: description: Detailed information about a single integration. properties: @@ -36070,6 +37175,320 @@ components: format: int64 type: integer type: object + FlutterSourcemapAttributes: + description: Attributes of a Flutter symbol file. + properties: + arch: + description: The target CPU architecture. + example: arm64 + type: string + created_at: + description: The timestamp when the symbol file was created. + example: "2024-01-01T00:00:00Z" + format: date-time + type: string + mapkind: + description: The type of source map. + example: flutter + type: string + service: + description: The service name associated with the symbol file. + example: my-flutter-app + type: string + size: + description: The size of the symbol file in bytes. + example: 8192 + format: int64 + type: integer + variant: + description: The build variant. + example: release + type: string + version: + description: The version of the service associated with the symbol file. + example: 1.0.0 + type: string + required: + - mapkind + - size + - created_at + type: object + FlutterSourcemapData: + description: Flutter symbol file data object. + properties: + attributes: + $ref: "#/components/schemas/FlutterSourcemapAttributes" + id: + description: The unique identifier of the source map. + example: "12" + type: string + type: + $ref: "#/components/schemas/SourcemapDataType" + required: + - id + - type + - attributes + type: object + FormData: + description: A form resource object. + properties: + attributes: + $ref: "#/components/schemas/FormDataAttributes" + id: + description: The ID of the form. + example: 22f6006a-2302-4926-9396-d2dfcf7b0b34 + format: uuid + type: string + type: + $ref: "#/components/schemas/FormType" + required: + - id + - type + - attributes + type: object + FormDataAttributes: + description: The attributes of a form. + properties: + active: + description: Whether the form is currently active. + example: true + type: boolean + anonymous: + description: Whether the form accepts anonymous submissions. + example: false + type: boolean + created_at: + description: The time at which the form was created. + example: "2026-05-29T20:06:13.677353Z" + format: date-time + type: string + datastore_config: + $ref: "#/components/schemas/FormDatastoreConfigAttributes" + description: + description: The description of the form. + example: A form to collect user feedback. + type: string + end_date: + description: The date and time at which the form stops accepting responses. + example: + format: date-time + nullable: true + type: string + has_submitted: + description: Whether the current user has already submitted this form. Only present for forms with `single_response` set to `true`. + nullable: true + type: boolean + idp_survey: + description: Whether the form is an IDP survey. + example: false + type: boolean + modified_at: + description: The time at which the form was last modified. + example: "2026-05-29T20:06:13.677353Z" + format: date-time + type: string + name: + description: The name of the form. + example: User Feedback Form + type: string + org_id: + description: The ID of the organization that owns this form. + example: 2 + format: int64 + type: integer + publication: + $ref: "#/components/schemas/FormPublicationAttributes" + self_service: + description: Whether the form is available in the self-service catalog. + example: false + type: boolean + single_response: + description: Whether each user can only submit one response. + example: false + type: boolean + user_id: + description: The ID of the user who created this form. + example: 10001 + format: int64 + type: integer + user_uuid: + description: The UUID of the user who created this form. + example: 1fc709aa-be19-4539-a47d-52a30d78a978 + format: uuid + type: string + version: + $ref: "#/components/schemas/FormVersionAttributes" + required: + - active + - anonymous + - created_at + - datastore_config + - description + - idp_survey + - modified_at + - name + - org_id + - self_service + - single_response + - user_id + - user_uuid + type: object + FormDataDefinition: + additionalProperties: {} + description: A JSON Schema definition that describes the form's data fields. + properties: + description: + description: A description shown to form respondents. + example: Welcome to the Engineering Experience Survey. + type: string + properties: + additionalProperties: {} + description: A map of field names to their JSON Schema definitions. + type: object + required: + description: List of field names that must be answered. + items: + type: string + type: array + title: + description: The title of the form schema. + example: Developer Experience Survey + type: string + type: + $ref: "#/components/schemas/FormDataDefinitionType" + type: object + FormDataDefinitionType: + default: object + description: The root schema type. + enum: + - object + type: string + x-enum-varnames: + - OBJECT + FormDataList: + description: A list of form resource objects. + items: + $ref: "#/components/schemas/FormData" + type: array + FormDatastoreConfigAttributes: + description: The datastore configuration for a form. + properties: + datastore_id: + description: The ID of the datastore. + example: 5108ea24-dd83-4696-9caa-f069f73d0fad + format: uuid + type: string + primary_column_name: + description: The name of the primary column in the datastore. + example: id + type: string + primary_key_generation_strategy: + description: The strategy used to generate primary keys in the datastore. + example: none + type: string + required: + - datastore_id + - primary_column_name + - primary_key_generation_strategy + type: object + FormPublicationAttributes: + description: The attributes of a form publication. + properties: + created_at: + description: The time at which the publication was created. + example: "2026-05-29T20:06:13.677353Z" + format: date-time + type: string + form_id: + description: The ID of the form. + example: afc67600-0511-43b1-9b18-578fb4979bd3 + format: uuid + type: string + form_version: + description: The version number that was published. + example: 1 + format: int64 + type: integer + id: + description: The ID of the form publication. + example: "42" + type: string + modified_at: + description: The time at which the publication was last modified. + example: "2026-05-29T20:06:13.677353Z" + format: date-time + type: string + org_id: + description: The ID of the organization that owns this publication. + example: 2 + format: int64 + type: integer + publish_seq: + description: The sequential publication number for this form. + example: 1 + format: int64 + type: integer + user_id: + description: The ID of the user who created this publication. + example: 10001 + format: int64 + type: integer + user_uuid: + description: The UUID of the user who created this publication. + example: 1fc709aa-be19-4539-a47d-52a30d78a978 + format: uuid + type: string + required: + - created_at + - form_id + - form_version + - modified_at + - org_id + - publish_seq + - user_id + - user_uuid + type: object + FormPublicationData: + description: A form publication resource object. + properties: + attributes: + $ref: "#/components/schemas/FormPublicationAttributes" + id: + description: The ID of the form publication. + example: "42" + type: string + type: + $ref: "#/components/schemas/FormPublicationType" + required: + - id + - type + - attributes + type: object + FormPublicationResponse: + description: A response containing a single form publication. + properties: + data: + $ref: "#/components/schemas/FormPublicationData" + required: + - data + type: object + FormPublicationType: + default: form_publications + description: The resource type for a form publication. + enum: + - form_publications + example: form_publications + type: string + x-enum-varnames: + - FORM_PUBLICATIONS + FormResponse: + description: A response containing a single form. + properties: + data: + $ref: "#/components/schemas/FormData" + required: + - data + type: object FormTrigger: description: "Trigger a workflow from a Form." properties: @@ -36088,6 +37507,180 @@ components: required: - formTrigger type: object + FormType: + default: forms + description: The resource type for a form. + enum: + - forms + example: forms + type: string + x-enum-varnames: + - FORMS + FormUiDefinition: + additionalProperties: {} + description: UI configuration for rendering form fields, including widget overrides, field ordering, and themes. + properties: + "ui:order": + description: The order in which form fields are displayed. + items: + type: string + type: array + "ui:theme": + $ref: "#/components/schemas/FormUiDefinitionUiTheme" + type: object + FormUiDefinitionUiTheme: + description: The visual theme applied to the form. + properties: + primaryColor: + $ref: "#/components/schemas/FormUiDefinitionUiThemePrimaryColor" + type: object + FormUiDefinitionUiThemePrimaryColor: + description: The primary color of the form theme. + enum: + - gray + - red + - orange + - yellow + - green + - light-blue + - dark-blue + - magenta + - indigo + type: string + x-enum-varnames: + - GRAY + - RED + - ORANGE + - YELLOW + - GREEN + - LIGHT_BLUE + - DARK_BLUE + - MAGENTA + - INDIGO + FormUpdateAttributes: + description: The fields to update on a form. At least one field must be provided. + properties: + datastore_config: + $ref: "#/components/schemas/FormDatastoreConfigAttributes" + description: + description: The updated description of the form. + example: An updated description. + type: string + name: + description: The updated name of the form. + example: Updated Form Name + type: string + type: object + FormVersionAttributes: + description: The attributes of a form version. + properties: + created_at: + description: The time at which the version was created. + example: "2026-05-29T20:06:14.895921Z" + format: date-time + type: string + data_definition: + $ref: "#/components/schemas/FormDataDefinition" + definition_signature: + description: The signature of the version definition. + example: '{"signature":"b7f312957a80cea2c8c9950532b205a90a3f8a7ebb7e52fc25437a25d903d545","version":1}' + type: string + etag: + description: The ETag for optimistic concurrency control. + example: b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d + nullable: true + type: string + id: + description: The ID of the form version. + example: "126" + type: string + modified_at: + description: The time at which the version was last modified. + example: "2026-05-29T20:06:14.949163Z" + format: date-time + type: string + state: + $ref: "#/components/schemas/FormVersionState" + ui_definition: + $ref: "#/components/schemas/FormUiDefinition" + user_id: + description: The ID of the user who created this version. + example: 10001 + format: int64 + type: integer + user_uuid: + description: The UUID of the user who created this version. + example: 1fc709aa-be19-4539-a47d-52a30d78a978 + format: uuid + type: string + version: + description: The sequential version number. + example: 1 + format: int64 + type: integer + required: + - created_at + - data_definition + - definition_signature + - etag + - modified_at + - state + - ui_definition + - user_id + - user_uuid + - version + type: object + FormVersionData: + description: A form version resource object. + properties: + attributes: + $ref: "#/components/schemas/FormVersionAttributes" + id: + description: The ID of the form version. + example: "126" + type: string + type: + $ref: "#/components/schemas/FormVersionType" + required: + - id + - type + - attributes + type: object + FormVersionResponse: + description: A response containing a single form version. + properties: + data: + $ref: "#/components/schemas/FormVersionData" + required: + - data + type: object + FormVersionState: + description: The state of a form version. + enum: + - draft + - frozen + example: frozen + type: string + x-enum-varnames: + - DRAFT + - FROZEN + FormVersionType: + default: form_versions + description: The resource type for a form version. + enum: + - form_versions + example: form_versions + type: string + x-enum-varnames: + - FORM_VERSIONS + FormsResponse: + description: A response containing a list of forms. + properties: + data: + $ref: "#/components/schemas/FormDataList" + required: + - data + type: object FormulaLimit: description: |- Message for specifying limits to the number of values returned by a query. @@ -37524,6 +39117,42 @@ components: meta: $ref: "#/components/schemas/DataDeletionResponseMeta" type: object + GetDataObservabilityMonitorRunStatusResponse: + description: The response for getting the status of a data observability monitor run. + properties: + data: + $ref: "#/components/schemas/GetDataObservabilityMonitorRunStatusResponseData" + required: + - data + type: object + GetDataObservabilityMonitorRunStatusResponseAttributes: + description: The attributes of a data observability monitor run status response. + properties: + error_message: + description: Error message describing why the monitor run failed. Only present when status is error. + example: "run completed but produced no metric data" + type: string + status: + $ref: "#/components/schemas/DataObservabilityMonitorRunStatus" + required: + - status + type: object + GetDataObservabilityMonitorRunStatusResponseData: + description: The data object for a data observability monitor run status response. + properties: + attributes: + $ref: "#/components/schemas/GetDataObservabilityMonitorRunStatusResponseAttributes" + id: + description: The unique identifier of the monitor run. + example: "abc123def456" + type: string + type: + $ref: "#/components/schemas/DataObservabilityMonitorRunType" + required: + - id + - type + - attributes + type: object GetDeviceAttributes: description: The device attributes properties: @@ -38392,6 +40021,64 @@ components: type: string x-enum-varnames: - INCIDENTS_GLOBAL_SETTINGS + GlobalOrg: + description: Organization information for a global organization association. + properties: + name: + description: The name of the organization. + example: Example Org + type: string + public_id: + description: The public identifier of the organization. + example: abcdef12345 + nullable: true + type: string + subdomain: + description: The subdomain used to access the organization, if configured. + example: example + nullable: true + type: string + uuid: + description: The UUID of the organization. + example: "13d10a96-6ff2-49be-be7b-4f56ebb13335" + format: uuid + type: string + required: + - uuid + - name + type: object + GlobalOrgAttributes: + description: Attributes of an organization associated with the authenticated user. + properties: + org: + $ref: "#/components/schemas/GlobalOrg" + redirect_url: + description: The login URL used to switch into the organization, if available. + example: "https://app.datadoghq.com/account/login/password?dd_oid=13d10a96-6ff2-49be-be7b-4f56ebb13335&login_hint=user%40example.com" + nullable: true + type: string + source_region: + description: The source region of the organization. + example: us1.prod.dog + type: string + user: + $ref: "#/components/schemas/GlobalOrgUser" + required: + - user + - org + - source_region + type: object + GlobalOrgData: + description: An organization associated with the authenticated user. + properties: + attributes: + $ref: "#/components/schemas/GlobalOrgAttributes" + type: + $ref: "#/components/schemas/GlobalOrgType" + required: + - type + - attributes + type: object GlobalOrgIdentifier: description: A unique identifier for an organization including its site. properties: @@ -38408,6 +40095,99 @@ components: - org_uuid - org_site type: object + GlobalOrgType: + description: The resource type for global user organizations. + enum: [global_user_orgs] + example: global_user_orgs + type: string + x-enum-varnames: + - GLOBAL_USER_ORGS + GlobalOrgUser: + description: User information for a global organization association. + properties: + handle: + description: The handle of the user. + example: user@example.com + type: string + uuid: + description: The UUID of the user. + example: "cfab5cf9-5472-48ea-a79c-a64045f4f745" + format: uuid + type: string + required: + - uuid + - handle + type: object + GlobalOrgsLinks: + description: Pagination links. + properties: + next: + description: Link to the next page. + example: "https://app.datadoghq.com/api/v2/global_orgs?user_handle=user@example.com&page[limit]=100&page[cursor]=next-page" + nullable: true + type: string + prev: + description: Link to the previous page. + nullable: true + type: string + self: + description: Link to the current page. + example: "https://app.datadoghq.com/api/v2/global_orgs?user_handle=user@example.com&page[limit]=100" + type: string + type: object + GlobalOrgsMeta: + description: Response metadata object. + properties: + page: + $ref: "#/components/schemas/GlobalOrgsMetaPage" + type: object + GlobalOrgsMetaPage: + description: Paging attributes. + properties: + cursor: + description: The cursor used to get the current results, if any. + example: "" + type: string + limit: + description: Number of results returned. + example: 100 + format: int32 + maximum: 1000 + type: integer + next_cursor: + description: The cursor used to get the next results, if any. + example: next-page + nullable: true + type: string + prev_cursor: + description: The cursor used to get the previous results, if any. + nullable: true + type: string + type: + $ref: "#/components/schemas/GlobalOrgsMetaPageType" + type: object + GlobalOrgsMetaPageType: + description: Type of global orgs pagination. + enum: [cursor] + example: cursor + type: string + x-enum-varnames: + - CURSOR + GlobalOrgsResponse: + description: Response containing organizations across regions for the authenticated user. + properties: + data: + description: Organizations across regions for the authenticated user. + items: + $ref: "#/components/schemas/GlobalOrgData" + type: array + links: + $ref: "#/components/schemas/GlobalOrgsLinks" + meta: + $ref: "#/components/schemas/GlobalOrgsMeta" + required: + - data + type: object GlobalVariableData: description: Synthetics global variable data. Wrapper around the global variable object. properties: @@ -38555,6 +40335,84 @@ components: required: - attributes type: object + GoogleChatDelegatedUserAttributes: + description: Google Chat delegated user attributes. + properties: + display_name: + description: The delegated user's display name. + example: "fake-display-name" + type: string + email: + description: The delegated user's email address. + example: "user@example.com" + type: string + features: + description: The list of features enabled for the delegated user. + items: + type: string + type: array + type: object + GoogleChatDelegatedUserData: + description: Google Chat delegated user data from a response. + properties: + attributes: + $ref: "#/components/schemas/GoogleChatDelegatedUserAttributes" + id: + description: The ID of the delegated user. + example: "2b3c4d5e-6f78-9012-bcde-f23456789012" + maxLength: 100 + minLength: 1 + type: string + type: + $ref: "#/components/schemas/GoogleChatDelegatedUserType" + type: object + GoogleChatDelegatedUserResponse: + description: Response containing a Google Chat delegated user. + properties: + data: + $ref: "#/components/schemas/GoogleChatDelegatedUserData" + required: + - data + type: object + GoogleChatDelegatedUserType: + default: google-chat-delegated-user + description: Google Chat delegated user resource type. + enum: + - google-chat-delegated-user + example: google-chat-delegated-user + type: string + x-enum-varnames: + - GOOGLE_CHAT_DELEGATED_USER_TYPE + GoogleChatOrganizationAttributes: + description: Google Chat organization attributes. + properties: + domain_id: + description: The Google Chat organization domain ID. + example: "fake-domain-id" + maxLength: 255 + type: string + domain_name: + description: The Google Chat organization domain name. + example: "example.com" + maxLength: 255 + type: string + type: object + GoogleChatOrganizationData: + description: Google Chat organization data from a response. + properties: + attributes: + $ref: "#/components/schemas/GoogleChatOrganizationAttributes" + id: + description: The ID of the Google Chat organization binding. + example: "5ce87709-a12f-4086-fcc8-147045b73a19" + maxLength: 100 + minLength: 1 + type: string + relationships: + $ref: "#/components/schemas/GoogleChatOrganizationRelationships" + type: + $ref: "#/components/schemas/GoogleChatOrganizationType" + type: object GoogleChatOrganizationHandleResponse: description: Organization handle for monitor notifications to a Google Chat space within a Google organization. properties: @@ -38617,6 +40475,184 @@ components: required: - data type: object + GoogleChatOrganizationRelationships: + description: Google Chat organization relationships. + properties: + delegated_user: + $ref: "#/components/schemas/GoogleChatOrganizationRelationshipsDelegatedUser" + type: object + GoogleChatOrganizationRelationshipsDelegatedUser: + description: The delegated user relationship. + properties: + data: + $ref: "#/components/schemas/GoogleChatOrganizationRelationshipsDelegatedUserData" + type: object + GoogleChatOrganizationRelationshipsDelegatedUserData: + description: Delegated user relationship data. + properties: + id: + description: The ID of the delegated user. + example: "2b3c4d5e-6f78-9012-bcde-f23456789012" + type: string + type: + $ref: "#/components/schemas/GoogleChatDelegatedUserType" + type: object + GoogleChatOrganizationResponse: + description: Response containing a Google Chat organization binding. + properties: + data: + $ref: "#/components/schemas/GoogleChatOrganizationData" + required: + - data + type: object + GoogleChatOrganizationType: + default: google-chat-organization + description: Google Chat organization resource type. + enum: + - google-chat-organization + example: google-chat-organization + type: string + x-enum-varnames: + - GOOGLE_CHAT_ORGANIZATION_TYPE + GoogleChatOrganizationsResponse: + description: Response containing a list of Google Chat organization bindings. + properties: + data: + description: An array of Google Chat organization bindings. + items: + $ref: "#/components/schemas/GoogleChatOrganizationData" + type: array + required: + - data + type: object + GoogleChatTargetAudienceAttributes: + description: Google Chat target audience attributes. + properties: + audience_id: + description: The audience ID. + example: "fake-audience-id-1" + maxLength: 255 + type: string + audience_name: + description: The audience name. + example: "fake audience name 1" + maxLength: 255 + type: string + required: + - audience_name + - audience_id + type: object + GoogleChatTargetAudienceCreateRequest: + description: Create target audience request. + properties: + data: + $ref: "#/components/schemas/GoogleChatTargetAudienceCreateRequestData" + required: + - data + type: object + GoogleChatTargetAudienceCreateRequestAttributes: + description: Attributes for creating a Google Chat target audience. + properties: + audience_id: + description: The audience ID. + example: "fake-audience-id-1" + maxLength: 255 + type: string + audience_name: + description: The audience name. + example: "fake audience name 1" + maxLength: 255 + type: string + required: + - audience_name + - audience_id + type: object + GoogleChatTargetAudienceCreateRequestData: + description: Data for a create target audience request. + properties: + attributes: + $ref: "#/components/schemas/GoogleChatTargetAudienceCreateRequestAttributes" + type: + $ref: "#/components/schemas/GoogleChatTargetAudienceType" + required: + - type + - attributes + type: object + GoogleChatTargetAudienceData: + description: Google Chat target audience data from a response. + properties: + attributes: + $ref: "#/components/schemas/GoogleChatTargetAudienceAttributes" + id: + description: The ID of the target audience. + example: "1f3e5ce6-944a-4075-97ae-105b5920b5cb" + maxLength: 100 + minLength: 1 + type: string + type: + $ref: "#/components/schemas/GoogleChatTargetAudienceType" + type: object + GoogleChatTargetAudienceResponse: + description: Response containing a Google Chat target audience. + properties: + data: + $ref: "#/components/schemas/GoogleChatTargetAudienceData" + required: + - data + type: object + GoogleChatTargetAudienceType: + default: google-chat-target-audience + description: Google Chat target audience resource type. + enum: + - google-chat-target-audience + example: google-chat-target-audience + type: string + x-enum-varnames: + - GOOGLE_CHAT_TARGET_AUDIENCE_TYPE + GoogleChatTargetAudienceUpdateRequest: + description: Update target audience request. + properties: + data: + $ref: "#/components/schemas/GoogleChatTargetAudienceUpdateRequestData" + required: + - data + type: object + GoogleChatTargetAudienceUpdateRequestAttributes: + description: Attributes for updating a Google Chat target audience. + properties: + audience_id: + description: The audience ID. + example: "fake-audience-id-1" + maxLength: 255 + type: string + audience_name: + description: The audience name. + example: "fake audience name 1" + maxLength: 255 + type: string + type: object + GoogleChatTargetAudienceUpdateRequestData: + description: Data for an update target audience request. + properties: + attributes: + $ref: "#/components/schemas/GoogleChatTargetAudienceUpdateRequestAttributes" + type: + $ref: "#/components/schemas/GoogleChatTargetAudienceType" + required: + - type + - attributes + type: object + GoogleChatTargetAudiencesResponse: + description: Response containing a list of Google Chat target audiences. + properties: + data: + description: An array of Google Chat target audiences. + items: + $ref: "#/components/schemas/GoogleChatTargetAudienceData" + type: array + required: + - data + type: object GoogleChatUpdateOrganizationHandleRequest: description: Update organization handle request. properties: @@ -39263,6 +41299,7 @@ components: - 4 - 5 example: 4 + format: int64 type: integer x-enum-varnames: - UNSPECIFIED @@ -39537,6 +41574,90 @@ components: description: The ID of a notification rule. example: aaa-bbb-ccc type: string + IL2CPPSourcemapAttributes: + description: Attributes of an IL2CPP mapping file. + properties: + build_id: + description: The build identifier (UUID format). + example: 550e8400-e29b-41d4-a716-446655440000 + type: string + created_at: + description: The timestamp when the mapping file was created. + example: "2024-01-01T00:00:00Z" + format: date-time + type: string + mapkind: + description: The type of source map. + example: il2cpp + type: string + size: + description: The size of the mapping file in bytes. + example: 4096 + format: int64 + type: integer + required: + - mapkind + - size + - created_at + type: object + IL2CPPSourcemapData: + description: IL2CPP mapping file data object. + properties: + attributes: + $ref: "#/components/schemas/IL2CPPSourcemapAttributes" + id: + description: The unique identifier of the source map. + example: "8" + type: string + type: + $ref: "#/components/schemas/SourcemapDataType" + required: + - id + - type + - attributes + type: object + IOSSourcemapAttributes: + description: Attributes of an iOS dSYM source map. + properties: + created_at: + description: The timestamp when the source map was created. + example: "2024-01-01T00:00:00Z" + format: date-time + type: string + mapkind: + description: The type of source map. + example: ios + type: string + size: + description: The size of the dSYM file in bytes. + example: 4096 + format: int64 + type: integer + uuids: + description: The UUID(s) associated with the dSYM file. + example: 550e8400-e29b-41d4-a716-446655440000 + type: string + required: + - mapkind + - size + - created_at + type: object + IOSSourcemapData: + description: iOS dSYM source map data object. + properties: + attributes: + $ref: "#/components/schemas/IOSSourcemapAttributes" + id: + description: The unique identifier of the source map. + example: "11" + type: string + type: + $ref: "#/components/schemas/SourcemapDataType" + required: + - id + - type + - attributes + type: object IPAllowlistAttributes: description: Attributes of the IP allowlist. properties: @@ -41615,161 +43736,6 @@ components: x-enum-varnames: - CREATED_ASCENDING - CREATED_DESCENDING - IncidentServiceCreateAttributes: - description: The incident service's attributes for a create request. - properties: - name: - description: Name of the incident service. - example: "an example service name" - type: string - required: - - name - type: object - IncidentServiceCreateData: - description: Incident Service payload for create requests. - properties: - attributes: - $ref: "#/components/schemas/IncidentServiceCreateAttributes" - relationships: - $ref: "#/components/schemas/IncidentServiceRelationships" - type: - $ref: "#/components/schemas/IncidentServiceType" - required: - - type - type: object - IncidentServiceCreateRequest: - description: Create request with an incident service payload. - properties: - data: - $ref: "#/components/schemas/IncidentServiceCreateData" - required: - - data - type: object - IncidentServiceIncludedItems: - description: An object related to an incident service which is present in the included payload. - oneOf: - - $ref: "#/components/schemas/User" - IncidentServiceRelationships: - description: The incident service's relationships. - properties: - created_by: - $ref: "#/components/schemas/RelationshipToUser" - last_modified_by: - $ref: "#/components/schemas/RelationshipToUser" - readOnly: true - type: object - IncidentServiceResponse: - description: Response with an incident service payload. - properties: - data: - $ref: "#/components/schemas/IncidentServiceResponseData" - included: - description: Included objects from relationships. - items: - $ref: "#/components/schemas/IncidentServiceIncludedItems" - readOnly: true - type: array - required: - - data - type: object - IncidentServiceResponseAttributes: - description: The incident service's attributes from a response. - properties: - created: - description: Timestamp of when the incident service was created. - format: date-time - readOnly: true - type: string - modified: - description: Timestamp of when the incident service was modified. - format: date-time - readOnly: true - type: string - name: - description: Name of the incident service. - example: "service name" - type: string - type: object - IncidentServiceResponseData: - description: Incident Service data from responses. - properties: - attributes: - $ref: "#/components/schemas/IncidentServiceResponseAttributes" - id: - description: The incident service's ID. - example: "00000000-0000-0000-0000-000000000000" - type: string - relationships: - $ref: "#/components/schemas/IncidentServiceRelationships" - type: - $ref: "#/components/schemas/IncidentServiceType" - required: - - id - - type - type: object - IncidentServiceType: - default: services - description: Incident service resource type. - enum: - - services - example: services - type: string - x-enum-varnames: - - SERVICES - IncidentServiceUpdateAttributes: - description: The incident service's attributes for an update request. - properties: - name: - description: Name of the incident service. - example: "an example service name" - type: string - required: - - name - type: object - IncidentServiceUpdateData: - description: Incident Service payload for update requests. - properties: - attributes: - $ref: "#/components/schemas/IncidentServiceUpdateAttributes" - id: - description: The incident service's ID. - example: "00000000-0000-0000-0000-000000000000" - type: string - relationships: - $ref: "#/components/schemas/IncidentServiceRelationships" - type: - $ref: "#/components/schemas/IncidentServiceType" - required: - - type - type: object - IncidentServiceUpdateRequest: - description: Update request with an incident service payload. - properties: - data: - $ref: "#/components/schemas/IncidentServiceUpdateData" - required: - - data - type: object - IncidentServicesResponse: - description: Response with a list of incident service payloads. - properties: - data: - description: An array of incident services. - example: [{"id": "00000000-0000-0000-0000-000000000000", "type": "services"}] - items: - $ref: "#/components/schemas/IncidentServiceResponseData" - type: array - included: - description: Included related resources which the user requested. - items: - $ref: "#/components/schemas/IncidentServiceIncludedItems" - readOnly: true - type: array - meta: - $ref: "#/components/schemas/IncidentResponseMeta" - required: - - data - type: "object" IncidentSeverity: description: The incident severity. enum: @@ -43703,6 +45669,8 @@ components: description: Key of the case. example: "ET-123" type: string + linear_issue: + $ref: "#/components/schemas/IssueCaseLinearIssue" modified_at: description: Timestamp of when the case was last modified. example: "2025-01-01T00:00:00Z" @@ -43740,6 +45708,10 @@ components: IssueCaseJiraIssue: description: Jira issue of the case. properties: + error_message: + description: Error message set when the Jira issue creation fails. + example: "" + type: string result: $ref: "#/components/schemas/IssueCaseJiraIssueResult" status: @@ -43750,6 +45722,10 @@ components: IssueCaseJiraIssueResult: description: Contains the identifiers and URL for a successfully created Jira issue. properties: + account_id: + description: Jira account identifier. + example: "abcd1234-5678-90ab-cdef-1234567890ab" + type: string issue_id: description: Jira issue identifier. example: "1904866" @@ -43762,11 +45738,53 @@ components: description: Jira issue URL. example: "https://your-jira-instance.atlassian.net/browse/ET-123" type: string + project_id: + description: Jira project identifier. + example: "10001" + type: string project_key: description: Jira project key. example: "ET" type: string type: object + IssueCaseLinearIssue: + description: Linear issue of the case. + properties: + error_message: + description: Error message set when the Linear issue creation fails. + example: "" + type: string + result: + $ref: "#/components/schemas/IssueCaseLinearIssueResult" + status: + description: Creation status of the Linear issue. + example: "COMPLETED" + type: string + type: object + IssueCaseLinearIssueResult: + description: Contains the identifiers and URL for a successfully created Linear issue. + properties: + account_id: + description: Linear account identifier. + example: "abcd1234-5678-90ab-cdef-1234567890ab" + type: string + issue_id: + description: Linear issue identifier. + example: "a1b2c3d4-5678-90ab-cdef-1234567890ab" + type: string + issue_key: + description: Linear issue key. + example: "ENG-123" + type: string + issue_url: + description: Linear issue URL. + example: "https://linear.app/your-workspace/issue/ENG-123" + type: string + team_id: + description: Linear team identifier. + example: "f1e2d3c4-5678-90ab-cdef-1234567890ab" + type: string + type: object IssueCaseReference: description: The case the issue is attached to. properties: @@ -44511,6 +46529,138 @@ components: required: - errors type: object + JSSourcemapAttributes: + description: Attributes of a JavaScript source map. + properties: + absolute_path: + description: The absolute path to the minified JavaScript file. + example: /js/bundle.min.js + type: string + blob_storage_sourcemap_path: + description: The path to the source map in blob storage. + example: org123/1.0.0/bundle.min.js.map + type: string + build_id: + description: The build identifier. + example: abc123 + type: string + created_at: + description: The timestamp when the source map was created. + example: "2024-01-01T00:00:00Z" + format: date-time + type: string + domain: + description: The domain associated with the source map. + example: example.com + type: string + file_name: + description: The file name of the minified JavaScript file. + example: bundle.min.js + type: string + mapkind: + description: The type of source map. + example: js + type: string + service: + description: The service name associated with the source map. + example: my-web-service + type: string + size: + description: The size of the source map file in bytes. + example: 1024 + format: int64 + type: integer + variant: + description: The source map variant. + example: release + type: string + version: + description: The version of the service associated with the source map. + example: 1.0.0 + type: string + version_code: + description: The version code. + example: "100" + type: string + required: + - mapkind + - size + - created_at + type: object + JSSourcemapData: + description: JavaScript source map data object. + properties: + attributes: + $ref: "#/components/schemas/JSSourcemapAttributes" + id: + description: The unique identifier of the source map. + example: "5" + type: string + type: + $ref: "#/components/schemas/SourcemapDataType" + required: + - id + - type + - attributes + type: object + JVMSourcemapAttributes: + description: Attributes of a JVM mapping file. + properties: + build_id: + description: The build identifier (UUID format). + example: 550e8400-e29b-41d4-a716-446655440000 + type: string + created_at: + description: The timestamp when the mapping file was created. + example: "2024-01-01T00:00:00Z" + format: date-time + type: string + mapkind: + description: The type of source map. + example: jvm + type: string + service: + description: The service name associated with the mapping file. + example: my-android-app + type: string + size: + description: The size of the mapping file in bytes. + example: 512 + format: int64 + type: integer + variant: + description: The build variant (e.g., `release`, `debug`). + example: release + type: string + version: + description: The version of the service associated with the mapping file. + example: 1.0.0 + type: string + version_code: + description: The version code. + example: "100" + type: string + required: + - mapkind + - size + - created_at + type: object + JVMSourcemapData: + description: JVM (ProGuard/R8) mapping file data object. + properties: + attributes: + $ref: "#/components/schemas/JVMSourcemapAttributes" + id: + description: The unique identifier of the source map. + example: "9" + type: string + type: + $ref: "#/components/schemas/SourcemapDataType" + required: + - id + - type + - attributes + type: object JiraAccountAttributes: description: Attributes of a Jira account properties: @@ -45306,7 +47456,7 @@ components: attributes: $ref: "#/components/schemas/LLMObsAnnotatedInteractionsDataAttributesResponse" id: - description: The queue ID. + description: The annotation queue ID. example: "00000000-0000-0000-0000-000000000001" type: string type: @@ -45332,6 +47482,35 @@ components: type: string x-enum-varnames: - ANNOTATED_INTERACTIONS + LLMObsAnnotationAssessment: + description: Assessment result for a label value. + enum: + - pass + - fail + example: "pass" + type: string + x-enum-varnames: + - PASS + - FAIL + LLMObsAnnotationError: + description: A partial error for a single annotation that could not be processed. + properties: + annotation_id: + description: ID of the annotation that failed, if applicable. + example: "00000000-0000-0000-0000-000000000000" + type: string + error: + description: Error message. + example: "interaction not found" + type: string + interaction_id: + description: ID of the interaction that failed. + example: "00000000-0000-0000-0000-000000000001" + type: string + required: + - interaction_id + - error + type: object LLMObsAnnotationItem: description: A single annotation on an interaction. properties: @@ -45354,9 +47533,10 @@ components: type: string label_values: additionalProperties: {} - description: The label values for this annotation. + description: Label values for this annotation. example: - quality: "good" + - label_schema_id: "abc-123" + value: "good" type: object modified_at: description: Timestamp when the annotation was last modified. @@ -45376,6 +47556,122 @@ components: - modified_by - modified_at type: object + LLMObsAnnotationItemResponse: + description: A single annotation on an interaction, as returned by the API. + properties: + created_at: + description: Timestamp when the annotation was created. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + created_by: + description: Identifier of the user who created the annotation. + example: "00000000-0000-0000-0000-000000000002" + type: string + id: + description: Unique identifier of the annotation. + example: "annotation-789" + type: string + interaction_id: + description: Identifier of the interaction this annotation belongs to. + example: "interaction-456" + type: string + label_values: + description: |- + Label values for this annotation. Each entry references a label schema by ID + and provides the corresponding value. + example: + - label_schema_id: "abc-123" + value: "good" + items: + $ref: "#/components/schemas/LLMObsAnnotationLabelValueResponse" + type: array + modified_at: + description: Timestamp when the annotation was last modified. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + modified_by: + description: Identifier of the user who last modified the annotation. + example: "00000000-0000-0000-0000-000000000002" + type: string + required: + - id + - interaction_id + - label_values + - created_by + - created_at + - modified_by + - modified_at + type: object + LLMObsAnnotationLabelValue: + description: |- + A single label value entry in an annotation. + The `value` type must match the label schema type: + - `score`: a number within the schema `min`/`max` range (integer if `is_integer` is `true`). + - `categorical`: a string that is one of the schema `values`. + - `boolean`: `true` or `false`. + - `text`: any non-empty string. + properties: + assessment: + $ref: "#/components/schemas/LLMObsAnnotationAssessment" + label_schema_id: + description: ID of the label schema this value corresponds to. + example: "abc-123" + type: string + reasoning: + description: Free text reasoning for this label value. + example: "The response was accurate and well-structured." + type: string + value: + $ref: "#/components/schemas/LLMObsAnnotationLabelValueValue" + required: + - label_schema_id + - value + type: object + LLMObsAnnotationLabelValueResponse: + description: |- + A single label value entry in an annotation response. + In addition to the submitted fields, the server populates `type` and + `name_when_saved` to mirror the schema state at the time the annotation + was created — these help clients display values correctly when the schema + has since changed. + properties: + assessment: + $ref: "#/components/schemas/LLMObsAnnotationAssessment" + label_schema_id: + description: ID of the label schema this value corresponds to. + example: "abc-123" + type: string + name_when_saved: + description: Name of the label schema at the time the annotation was created. + example: "quality" + type: string + reasoning: + description: Free text reasoning for this label value. + example: "The response was accurate and well-structured." + type: string + type: + $ref: "#/components/schemas/LLMObsLabelSchemaType" + value: + $ref: "#/components/schemas/LLMObsAnnotationLabelValueValue" + required: + - label_schema_id + - value + type: object + LLMObsAnnotationLabelValueStringArray: + description: For categorical-type labels allowing multiple selections. + items: + type: string + type: array + LLMObsAnnotationLabelValueValue: + description: The value for this label. Must comply with the label schema type constraints. + example: 0.0 + oneOf: + - $ref: "#/components/schemas/AnyValueNumber" + - $ref: "#/components/schemas/AnyValueString" + - $ref: "#/components/schemas/LLMObsAnnotationLabelValueStringArray" + - $ref: "#/components/schemas/AnyValueBoolean" LLMObsAnnotationQueueDataAttributesRequest: description: Attributes for creating an LLM Observability annotation queue. properties: @@ -45703,6 +47999,85 @@ components: required: - label_schemas type: object + LLMObsAnnotationsDataAttributesRequest: + description: Attributes for creating or updating annotations. + properties: + annotations: + description: List of annotations to create or update. Must contain at least one item. + items: + $ref: "#/components/schemas/LLMObsUpsertAnnotationItem" + minItems: 1 + type: array + required: + - annotations + type: object + LLMObsAnnotationsDataAttributesResponse: + description: Attributes of the annotations response. + properties: + annotations: + description: Successfully created or updated annotations. + items: + $ref: "#/components/schemas/LLMObsAnnotationItemResponse" + type: array + errors: + description: Partial errors for annotations that could not be processed. + items: + $ref: "#/components/schemas/LLMObsAnnotationError" + type: array + required: + - annotations + type: object + LLMObsAnnotationsDataRequest: + description: Data object for creating or updating annotations. + properties: + attributes: + $ref: "#/components/schemas/LLMObsAnnotationsDataAttributesRequest" + type: + $ref: "#/components/schemas/LLMObsAnnotationsType" + required: + - type + - attributes + type: object + LLMObsAnnotationsDataResponse: + description: Data object for the annotations response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsAnnotationsDataAttributesResponse" + id: + description: The annotation queue ID. + example: "00000000-0000-0000-0000-000000000001" + type: string + type: + $ref: "#/components/schemas/LLMObsAnnotationsType" + required: + - id + - type + - attributes + type: object + LLMObsAnnotationsRequest: + description: Request to create or update annotations on interactions in an annotation queue. + properties: + data: + $ref: "#/components/schemas/LLMObsAnnotationsDataRequest" + required: + - data + type: object + LLMObsAnnotationsResponse: + description: Response containing the created or updated annotations. + properties: + data: + $ref: "#/components/schemas/LLMObsAnnotationsDataResponse" + required: + - data + type: object + LLMObsAnnotationsType: + description: Resource type for LLM Observability annotations. + enum: + - annotations + example: annotations + type: string + x-enum-varnames: + - ANNOTATIONS LLMObsAnthropicEffort: description: The effort level for Anthropic inference. enum: @@ -47143,6 +49518,21 @@ components: required: - data type: object + LLMObsDeleteAnnotationError: + description: A partial error for a single annotation that could not be deleted. + properties: + annotation_id: + description: ID of the annotation that could not be deleted. + example: "00000000-0000-0000-0000-000000000000" + type: string + error: + description: Error message. + example: "annotation not found" + type: string + required: + - annotation_id + - error + type: object LLMObsDeleteAnnotationQueueInteractionsDataAttributesRequest: description: Attributes for deleting interactions from an annotation queue. properties: @@ -47178,6 +49568,85 @@ components: required: - data type: object + LLMObsDeleteAnnotationsDataAttributesRequest: + description: Attributes for deleting annotations. + properties: + annotation_ids: + description: IDs of the annotations to delete. Must contain at least one item. + example: + - "00000000-0000-0000-0000-000000000000" + - "00000000-0000-0000-0000-000000000001" + items: + type: string + minItems: 1 + type: array + required: + - annotation_ids + type: object + LLMObsDeleteAnnotationsDataAttributesResponse: + description: Attributes of the annotation deletion response. + properties: + annotation_ids: + description: IDs of the successfully deleted annotations. + example: + - "00000000-0000-0000-0000-000000000000" + items: + type: string + type: array + errors: + description: Errors for annotations that could not be deleted. + items: + $ref: "#/components/schemas/LLMObsDeleteAnnotationError" + type: array + required: + - annotation_ids + - errors + type: object + LLMObsDeleteAnnotationsDataRequest: + description: Data object for deleting annotations. + properties: + attributes: + $ref: "#/components/schemas/LLMObsDeleteAnnotationsDataAttributesRequest" + type: + $ref: "#/components/schemas/LLMObsAnnotationsType" + required: + - type + - attributes + type: object + LLMObsDeleteAnnotationsDataResponse: + description: Data object for the annotation deletion response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsDeleteAnnotationsDataAttributesResponse" + id: + description: The annotation queue ID. + example: "00000000-0000-0000-0000-000000000001" + type: string + type: + $ref: "#/components/schemas/LLMObsAnnotationsType" + required: + - id + - type + - attributes + type: object + LLMObsDeleteAnnotationsRequest: + description: Request to delete annotations from an annotation queue. + properties: + data: + $ref: "#/components/schemas/LLMObsDeleteAnnotationsDataRequest" + required: + - data + type: object + LLMObsDeleteAnnotationsResponse: + description: |- + Response for a batch annotation deletion. Partial errors are listed in the + response if any annotations could not be deleted. + properties: + data: + $ref: "#/components/schemas/LLMObsDeleteAnnotationsDataResponse" + required: + - data + type: object LLMObsDeleteDatasetRecordsDataAttributesRequest: description: Attributes for deleting records from an LLM Observability dataset. properties: @@ -47422,18 +49891,34 @@ components: description: Name of the experiment. example: "My Experiment v1" type: string + parent_experiment_id: + description: Identifier of the parent (baseline) experiment this experiment is run against. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string project_id: description: Identifier of the project this experiment belongs to. example: "a33671aa-24fd-4dcd-9b33-a8ec7dde7751" type: string + run_count: + description: Number of runs configured for this experiment. + format: int32 + maximum: 2147483647 + type: integer required: - project_id - - dataset_id - name type: object LLMObsExperimentDataAttributesResponse: description: Attributes of an LLM Observability experiment. properties: + aggregate_data: + additionalProperties: {} + description: >- + Pre-computed aggregate metrics for this experiment run, including eval score distributions, token costs, and error rates. + nullable: true + type: object + author: + $ref: "#/components/schemas/LLMObsExperimentUser" config: additionalProperties: {} description: Configuration parameters for the experiment. @@ -47448,11 +49933,34 @@ components: description: Identifier of the dataset used in this experiment. example: "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d" type: string + dataset_name: + description: |- + Name of the dataset used in this experiment. + Only present when `include[dataset_names]` is `true`. + nullable: true + type: string + dataset_version: + description: Version of the dataset used in this experiment. + format: int64 + type: integer + deleted_at: + description: Timestamp when the experiment was soft-deleted, if applicable. + format: date-time + nullable: true + type: string description: description: Description of the experiment. example: "" nullable: true type: string + error: + description: Error message describing why the experiment failed, if applicable. + nullable: true + type: string + experiment: + description: Logical name of the experiment, shared across all runs of the same pipeline. + example: "my-pipeline" + type: string metadata: additionalProperties: {} description: Arbitrary metadata associated with the experiment. @@ -47462,10 +49970,22 @@ components: description: Name of the experiment. example: "My Experiment v1" type: string + parent_experiment_id: + description: Identifier of the parent (baseline) experiment this experiment was run against, if any. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + nullable: true + type: string project_id: description: Identifier of the project this experiment belongs to. example: "a33671aa-24fd-4dcd-9b33-a8ec7dde7751" type: string + run_count: + description: Expected number of runs for this experiment. + format: int32 + maximum: 2147483647 + type: integer + status: + $ref: "#/components/schemas/LLMObsExperimentStatus" updated_at: description: Timestamp when the experiment was last updated. example: "2024-01-15T10:30:00Z" @@ -47820,6 +50340,22 @@ components: - duration - status type: object + LLMObsExperimentSpanDataResponse: + description: JSON:API data item wrapping a single experiment span with evaluations. + properties: + attributes: + $ref: "#/components/schemas/LLMObsExperimentSpanWithEvals" + id: + description: Unique identifier of the span. + example: "00000000-0000-0000-0000-000000000001" + type: string + type: + $ref: "#/components/schemas/LLMObsExperimentSpanType" + required: + - id + - type + - attributes + type: object LLMObsExperimentSpanError: description: Error details for an experiment span. properties: @@ -47860,6 +50396,14 @@ components: x-enum-varnames: - OK - ERROR + LLMObsExperimentSpanType: + description: Resource type for a span item in an experiment spans response. + enum: + - experiments + example: experiments + type: string + x-enum-varnames: + - EXPERIMENTS_SPAN LLMObsExperimentSpanWithEvals: description: An experiment span enriched with its associated evaluation metrics. properties: @@ -47917,6 +50461,32 @@ components: example: "abc123def456" type: string type: object + LLMObsExperimentSpansResponse: + description: >- + Response for listing experiment spans (v1). Returns only spans with their evaluation metrics. No summary metrics or pagination are included. Deprecated in favor of `ListLLMObsExperimentEventsV3`. + properties: + data: + description: List of experiment spans with their evaluation metrics. + items: + $ref: "#/components/schemas/LLMObsExperimentSpanDataResponse" + type: array + required: + - data + type: object + LLMObsExperimentStatus: + description: Execution status of an LLM Observability experiment. + enum: + - running + - completed + - failed + - interrupted + example: completed + type: string + x-enum-varnames: + - RUNNING + - COMPLETED + - FAILED + - INTERRUPTED LLMObsExperimentType: description: Resource type of an LLM Observability experiment. enum: @@ -47928,12 +50498,25 @@ components: LLMObsExperimentUpdateDataAttributesRequest: description: Attributes for updating an LLM Observability experiment. properties: + dataset_id: + description: Updated identifier of the dataset used in this experiment. + example: "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d" + type: string description: description: Updated description of the experiment. type: string + error: + description: Error message describing why the experiment failed, if applicable. + type: string + metadata: + additionalProperties: {} + description: Updated arbitrary metadata associated with the experiment. + type: object name: description: Updated name of the experiment. type: string + status: + $ref: "#/components/schemas/LLMObsExperimentStatus" type: object LLMObsExperimentUpdateDataRequest: description: Data object for updating an LLM Observability experiment. @@ -47954,6 +50537,30 @@ components: required: - data type: object + LLMObsExperimentUser: + description: User data for the author of an experiment. Only present when `include[user_data]` is `true`. + properties: + email: + description: Email address of the user. + example: "jane.doe@example.com" + type: string + handle: + description: Username or handle associated with the user's Datadog account. + example: "jane.doe@example.com" + type: string + icon: + description: URL of the user's icon. + example: "https://example.com/icon.png" + type: string + id: + description: Unique identifier of the user. + example: "00000000-0000-0000-0000-000000000010" + type: string + name: + description: Display name of the user. + example: "Jane Doe" + type: string + type: object LLMObsExperimentationAnalyticsAggregate: description: Analytics aggregation parameters. properties: @@ -49121,6 +51728,1017 @@ components: - AUTO - CONCISE - DETAILED + LLMObsPatternsActivityProgress: + description: Progress information for a single step of a patterns run. + properties: + name: + description: Name of the step. + example: generate_topics + type: string + started_at: + description: Timestamp when the step started. Null if the step has not started. + example: "2024-01-15T10:30:00Z" + format: date-time + nullable: true + type: string + status: + description: Status of the step. + example: completed + type: string + required: + - name + - status + type: object + LLMObsPatternsClusteredPoint: + description: A single data point grouped into a topic. + properties: + event_id: + description: Identifier of the source event. + example: "AAAAAYabc123" + type: string + id: + description: Unique identifier of the clustered point. + example: "9b0c1d2e-3f40-5a61-b728-c9d0e1f2a3b4" + type: string + input: + description: Input text of the source span. + example: "How do I get a refund?" + type: string + is_included: + description: Whether the point is included in the patterns dataset. + example: false + type: boolean + is_suggested: + description: Whether the point is suggested for inclusion in the patterns dataset. + example: true + type: boolean + session_id: + description: Identifier of the source session. + example: "session-7c3f5a1b" + type: string + span_id: + description: Identifier of the source span. + example: "1234567890123456789" + type: string + topic_id: + description: Identifier of the topic the point belongs to. + example: "5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21" + type: string + required: + - id + - event_id + - topic_id + - span_id + - session_id + - input + - is_suggested + - is_included + type: object + LLMObsPatternsClusteredPointRef: + description: |- + A clustered point attached inline to a topic. The metric fields are populated + only when the request includes `include_metrics=true`. + properties: + duration: + description: Duration of the source span in nanoseconds. Included only when metrics are requested. + example: 1500000 + format: double + type: number + estimated_total_cost: + description: Estimated total cost of the source span. Included only when metrics are requested. + example: 0.0021 + format: double + type: number + evaluation: + additionalProperties: {} + description: |- + Evaluation results for the source span keyed by evaluation name. Included + only when metrics are requested. + type: object + input_tokens: + description: Number of input tokens of the source span. Included only when metrics are requested. + example: 128 + format: double + type: number + output_tokens: + description: Number of output tokens of the source span. Included only when metrics are requested. + example: 64 + format: double + type: number + span_id: + description: Identifier of the source span. + example: "1234567890123456789" + type: string + status: + description: Status of the source span. Included only when metrics are requested. + example: ok + type: string + total_tokens: + description: Total number of tokens of the source span. Included only when metrics are requested. + example: 192 + format: double + type: number + required: + - span_id + type: object + LLMObsPatternsClusteredPointRefsList: + description: List of clustered points attached to a topic. + items: + $ref: "#/components/schemas/LLMObsPatternsClusteredPointRef" + type: array + LLMObsPatternsClusteredPointsList: + description: List of clustered points. + items: + $ref: "#/components/schemas/LLMObsPatternsClusteredPoint" + type: array + LLMObsPatternsClusteredPointsResponse: + description: Response containing the clustered points of an LLM Observability topic. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsClusteredPointsResponseData" + required: + - data + type: object + LLMObsPatternsClusteredPointsResponseAttributes: + description: Attributes of an LLM Observability patterns clustered points response. + properties: + next_page_token: + description: Pagination token for the next page of points. Null if there are no more pages. + example: "eyJvZmZzZXQiOjUwfQ==" + nullable: true + type: string + points: + $ref: "#/components/schemas/LLMObsPatternsClusteredPointsList" + topic_id: + description: Identifier of the topic the points belong to. + example: "5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21" + type: string + required: + - topic_id + - next_page_token + - points + type: object + LLMObsPatternsClusteredPointsResponseData: + description: Data object of an LLM Observability patterns clustered points response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsClusteredPointsResponseAttributes" + id: + description: Identifier of the topic the points belong to. + example: "5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21" + type: string + type: + $ref: "#/components/schemas/LLMObsPatternsClusteredPointsType" + required: + - id + - type + - attributes + type: object + LLMObsPatternsClusteredPointsType: + description: Resource type of an LLM Observability patterns clustered points response. + enum: + - clustered_points_response + example: clustered_points_response + type: string + x-enum-varnames: + - CLUSTERED_POINTS_RESPONSE + LLMObsPatternsConfigAttributes: + description: Attributes of an LLM Observability patterns configuration. + properties: + account_id: + description: Integration account ID for a bring-your-own-model configuration. + example: "1000000001" + nullable: true + type: string + created_at: + description: Timestamp when the configuration was created. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + evp_query: + description: Query that selects the spans the patterns run analyzes. + example: "@ml_app:support-bot" + type: string + hierarchy_depth: + description: Depth of the topic hierarchy to generate. + example: 2 + format: int32 + maximum: 2147483647 + type: integer + integration_provider: + description: Integration provider for a bring-your-own-model configuration. + example: openai + nullable: true + type: string + model_name: + description: Model name for a bring-your-own-model configuration. + example: gpt-4o + nullable: true + type: string + name: + description: Name of the configuration. + example: "Support chatbot topics" + type: string + num_records: + description: Maximum number of records to process for the run. + example: 1000 + format: int32 + maximum: 2147483647 + type: integer + sampling_ratio: + description: Fraction of matching spans to sample for the run. + example: 0.1 + format: double + type: number + scope: + description: Scope of the configuration. + example: "" + type: string + template: + description: Template used to guide topic generation. + example: "" + nullable: true + type: string + updated_at: + description: Timestamp when the configuration was last updated. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + required: + - name + - evp_query + - sampling_ratio + - num_records + - hierarchy_depth + - scope + - created_at + - updated_at + type: object + LLMObsPatternsConfigItem: + description: A single LLM Observability patterns configuration in a list response. + properties: + account_id: + description: Integration account ID for a bring-your-own-model configuration. + example: "1000000001" + nullable: true + type: string + created_at: + description: Timestamp when the configuration was created. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + evp_query: + description: Query that selects the spans the patterns run analyzes. + example: "@ml_app:support-bot" + type: string + hierarchy_depth: + description: Depth of the topic hierarchy to generate. + example: 2 + format: int32 + maximum: 2147483647 + type: integer + id: + description: Unique identifier of the configuration. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + type: string + integration_provider: + description: Integration provider for a bring-your-own-model configuration. + example: openai + nullable: true + type: string + model_name: + description: Model name for a bring-your-own-model configuration. + example: gpt-4o + nullable: true + type: string + name: + description: Name of the configuration. + example: "Support chatbot topics" + type: string + num_records: + description: Maximum number of records to process for the run. + example: 1000 + format: int32 + maximum: 2147483647 + type: integer + sampling_ratio: + description: Fraction of matching spans to sample for the run. + example: 0.1 + format: double + type: number + scope: + description: Scope of the configuration. + example: "" + type: string + template: + description: Template used to guide topic generation. + example: "" + nullable: true + type: string + updated_at: + description: Timestamp when the configuration was last updated. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + required: + - id + - name + - evp_query + - sampling_ratio + - num_records + - hierarchy_depth + - scope + - created_at + - updated_at + type: object + LLMObsPatternsConfigItemsList: + description: List of patterns configurations. + items: + $ref: "#/components/schemas/LLMObsPatternsConfigItem" + type: array + LLMObsPatternsConfigResponse: + description: Response containing a single LLM Observability patterns configuration. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsConfigResponseData" + required: + - data + type: object + LLMObsPatternsConfigResponseData: + description: Data object of an LLM Observability patterns configuration. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsConfigAttributes" + id: + description: Unique identifier of the configuration. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + type: string + type: + $ref: "#/components/schemas/LLMObsPatternsConfigType" + required: + - id + - type + - attributes + type: object + LLMObsPatternsConfigSnapshot: + description: Snapshot of the configuration used for a patterns run. + properties: + account_id: + description: Integration account ID used for a bring-your-own-model run. + example: "1000000001" + type: string + evp_query: + description: Query that selected the spans for the run. + example: "@ml_app:support-bot" + type: string + hierarchy_depth: + description: Depth of the topic hierarchy generated. + example: 2 + format: int32 + maximum: 2147483647 + type: integer + integration_provider: + description: Integration provider used for a bring-your-own-model run. + example: openai + type: string + model_name: + description: Model name used for a bring-your-own-model run. + example: gpt-4o + type: string + num_records: + description: Maximum number of records processed for the run. + example: 1000 + format: int32 + maximum: 2147483647 + type: integer + sampling_ratio: + description: Fraction of matching spans sampled for the run. + example: 0.1 + format: double + type: number + type: object + LLMObsPatternsConfigType: + description: Resource type of an LLM Observability patterns configuration. + enum: + - topic_discovery_configs + example: topic_discovery_configs + type: string + x-enum-varnames: + - TOPIC_DISCOVERY_CONFIGS + LLMObsPatternsConfigUpsertRequest: + description: Request to create or update an LLM Observability patterns configuration. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsConfigUpsertRequestData" + required: + - data + type: object + LLMObsPatternsConfigUpsertRequestAttributes: + description: Attributes for creating or updating an LLM Observability patterns configuration. + properties: + account_id: + description: Integration account ID for a bring-your-own-model configuration. + example: "1000000001" + type: string + config_id: + description: The ID of an existing configuration to update. If omitted, a new configuration is created. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + type: string + evp_query: + description: Query that selects the spans the patterns run analyzes. + example: "@ml_app:support-bot" + type: string + hierarchy_depth: + description: Depth of the topic hierarchy to generate. + example: 2 + format: int32 + maximum: 2147483647 + type: integer + integration_provider: + description: Integration provider for a bring-your-own-model configuration. + example: openai + type: string + model_name: + description: Model name for a bring-your-own-model configuration. + example: gpt-4o + type: string + name: + description: Name of the configuration. + example: "Support chatbot topics" + type: string + num_records: + description: Maximum number of records to process for the run. + example: 1000 + format: int32 + maximum: 2147483647 + type: integer + sampling_ratio: + description: Fraction of matching spans to sample for the run. + example: 0.1 + format: double + type: number + scope: + description: Scope of the configuration. + example: "" + type: string + template: + description: Template used to guide topic generation. + example: "" + type: string + required: + - name + - evp_query + - sampling_ratio + - num_records + - hierarchy_depth + type: object + LLMObsPatternsConfigUpsertRequestData: + description: Data object for creating or updating an LLM Observability patterns configuration. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsConfigUpsertRequestAttributes" + type: + $ref: "#/components/schemas/LLMObsPatternsConfigType" + required: + - type + - attributes + type: object + LLMObsPatternsConfigsListType: + description: Resource type of a list of LLM Observability patterns configurations. + enum: + - list_topic_discovery_configs_response + example: list_topic_discovery_configs_response + type: string + x-enum-varnames: + - LIST_TOPIC_DISCOVERY_CONFIGS_RESPONSE + LLMObsPatternsConfigsResponse: + description: Response containing a list of LLM Observability patterns configurations. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsConfigsResponseData" + required: + - data + type: object + LLMObsPatternsConfigsResponseAttributes: + description: Attributes of a list of LLM Observability patterns configurations. + properties: + configs: + $ref: "#/components/schemas/LLMObsPatternsConfigItemsList" + required: + - configs + type: object + LLMObsPatternsConfigsResponseData: + description: Data object of a list of LLM Observability patterns configurations. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsConfigsResponseAttributes" + id: + description: Identifier of the list response. + example: "1000000001" + type: string + type: + $ref: "#/components/schemas/LLMObsPatternsConfigsListType" + required: + - id + - type + - attributes + type: object + LLMObsPatternsProgressList: + description: List of step-by-step progress entries for a patterns run. + items: + $ref: "#/components/schemas/LLMObsPatternsActivityProgress" + type: array + LLMObsPatternsRequestType: + description: Resource type for triggering an LLM Observability patterns run. + enum: + - topic_discovery + example: topic_discovery + type: string + x-enum-varnames: + - TOPIC_DISCOVERY + LLMObsPatternsRunStatusResponse: + description: Response containing the status of an LLM Observability patterns run. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsRunStatusResponseData" + required: + - data + type: object + LLMObsPatternsRunStatusResponseAttributes: + description: Attributes of an LLM Observability patterns run status. + properties: + created_at: + description: Timestamp when the run was created. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + progress: + $ref: "#/components/schemas/LLMObsPatternsProgressList" + status: + description: Overall status of the run. + example: running + type: string + step: + description: The current step of the run. + example: generate_topics + type: string + required: + - created_at + - status + - step + - progress + type: object + LLMObsPatternsRunStatusResponseData: + description: Data object of an LLM Observability patterns run status response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsRunStatusResponseAttributes" + id: + description: The ID of the patterns run. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + type: + $ref: "#/components/schemas/LLMObsPatternsRunStatusType" + required: + - id + - type + - attributes + type: object + LLMObsPatternsRunStatusType: + description: Resource type of an LLM Observability patterns run status. + enum: + - topic_discovery_run_status + example: topic_discovery_run_status + type: string + x-enum-varnames: + - TOPIC_DISCOVERY_RUN_STATUS + LLMObsPatternsRunSummary: + description: Summary of an LLM Observability patterns run. + properties: + completed_at: + description: Timestamp when the run completed. Null if the run has not completed. + example: "2024-01-15T10:45:00Z" + format: date-time + nullable: true + type: string + config_snapshot: + $ref: "#/components/schemas/LLMObsPatternsConfigSnapshot" + created_at: + description: Timestamp when the run was created. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + id: + description: Unique identifier of the run. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + status: + description: Status of the run. + example: completed + type: string + required: + - id + - status + - created_at + type: object + LLMObsPatternsRunsList: + description: List of patterns runs. + items: + $ref: "#/components/schemas/LLMObsPatternsRunSummary" + type: array + LLMObsPatternsRunsListType: + description: Resource type of a list of LLM Observability patterns runs. + enum: + - list_topic_discovery_runs_response + example: list_topic_discovery_runs_response + type: string + x-enum-varnames: + - LIST_TOPIC_DISCOVERY_RUNS_RESPONSE + LLMObsPatternsRunsResponse: + description: Response containing the completed runs of an LLM Observability patterns configuration. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsRunsResponseData" + required: + - data + type: object + LLMObsPatternsRunsResponseAttributes: + description: Attributes of an LLM Observability patterns runs response. + properties: + runs: + $ref: "#/components/schemas/LLMObsPatternsRunsList" + required: + - runs + type: object + LLMObsPatternsRunsResponseData: + description: Data object of an LLM Observability patterns runs response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsRunsResponseAttributes" + id: + description: Identifier of the configuration the runs belong to. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + type: string + type: + $ref: "#/components/schemas/LLMObsPatternsRunsListType" + required: + - id + - type + - attributes + type: object + LLMObsPatternsTopic: + description: A topic discovered by an LLM Observability patterns run. + properties: + created_at: + description: Timestamp when the topic was created. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + description: + description: Description of the topic. + example: "Questions about invoices, charges, and refunds." + type: string + first_seen_at: + description: Timestamp when the topic was first seen. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + hierarchy_level: + description: Level of the topic in the hierarchy. Level 0 is a leaf topic. + example: 0 + format: int64 + type: integer + id: + description: Unique identifier of the topic. + example: "5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21" + type: string + is_validated: + description: Whether the topic has been validated. + example: true + type: boolean + name: + description: Name of the topic. + example: "Billing questions" + type: string + parent_topic_id: + description: Identifier of the parent topic. Empty for top-level topics. + example: "" + type: string + point_count: + description: Number of data points assigned to the topic. + example: 125 + format: int64 + type: integer + run_id: + description: Identifier of the run that produced the topic. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + required: + - id + - run_id + - parent_topic_id + - hierarchy_level + - name + - description + - is_validated + - created_at + - point_count + - first_seen_at + type: object + LLMObsPatternsTopicWithClusteredPoints: + description: |- + A topic discovered by an LLM Observability patterns run, including the + clustered points attached to leaf topics. + properties: + cluster_points: + $ref: "#/components/schemas/LLMObsPatternsClusteredPointRefsList" + created_at: + description: Timestamp when the topic was created. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + description: + description: Description of the topic. + example: "Questions about invoices, charges, and refunds." + type: string + first_seen_at: + description: Timestamp when the topic was first seen. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + hierarchy_level: + description: Level of the topic in the hierarchy. Level 0 is a leaf topic. + example: 0 + format: int64 + type: integer + id: + description: Unique identifier of the topic. + example: "5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21" + type: string + is_validated: + description: Whether the topic has been validated. + example: true + type: boolean + name: + description: Name of the topic. + example: "Billing questions" + type: string + parent_topic_id: + description: Identifier of the parent topic. Empty for top-level topics. + example: "" + type: string + point_count: + description: Number of data points assigned to the topic. + example: 125 + format: int64 + type: integer + run_id: + description: Identifier of the run that produced the topic. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + required: + - id + - run_id + - parent_topic_id + - hierarchy_level + - name + - description + - is_validated + - created_at + - point_count + - first_seen_at + type: object + LLMObsPatternsTopicsList: + description: List of discovered topics. + items: + $ref: "#/components/schemas/LLMObsPatternsTopic" + type: array + LLMObsPatternsTopicsResponse: + description: Response containing the topics discovered by an LLM Observability patterns run. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsTopicsResponseData" + required: + - data + type: object + LLMObsPatternsTopicsResponseAttributes: + description: Attributes of an LLM Observability patterns topics response. + properties: + completed_at: + description: Timestamp when the run completed. Null if the run has not completed. + example: "2024-01-15T10:45:00Z" + format: date-time + nullable: true + type: string + config_id: + description: Identifier of the configuration that produced the run. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + type: string + config_snapshot: + $ref: "#/components/schemas/LLMObsPatternsConfigSnapshot" + created_at: + description: Timestamp when the run was created. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + previous_run_id: + description: Identifier of the run that completed immediately before this one. Empty if none. + example: "" + type: string + run_id: + description: Identifier of the run that produced the topics. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + topics: + $ref: "#/components/schemas/LLMObsPatternsTopicsList" + required: + - run_id + - config_id + - previous_run_id + - created_at + - topics + type: object + LLMObsPatternsTopicsResponseData: + description: Data object of an LLM Observability patterns topics response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsTopicsResponseAttributes" + id: + description: Identifier of the run the topics belong to. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + type: + $ref: "#/components/schemas/LLMObsPatternsTopicsType" + required: + - id + - type + - attributes + type: object + LLMObsPatternsTopicsType: + description: Resource type of an LLM Observability patterns topics response. + enum: + - get_topics_response + example: get_topics_response + type: string + x-enum-varnames: + - GET_TOPICS_RESPONSE + LLMObsPatternsTopicsWithClusteredPointsList: + description: List of discovered topics with their clustered points. + items: + $ref: "#/components/schemas/LLMObsPatternsTopicWithClusteredPoints" + type: array + LLMObsPatternsTopicsWithClusteredPointsResponse: + description: |- + Response containing the topics, and the clustered points of their leaf topics, + discovered by an LLM Observability patterns run. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsTopicsWithClusteredPointsResponseData" + required: + - data + type: object + LLMObsPatternsTopicsWithClusteredPointsResponseAttributes: + description: Attributes of an LLM Observability patterns topics-with-clustered-points response. + properties: + completed_at: + description: Timestamp when the run completed. Null if the run has not completed. + example: "2024-01-15T10:45:00Z" + format: date-time + nullable: true + type: string + config_id: + description: Identifier of the configuration that produced the run. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + type: string + config_snapshot: + $ref: "#/components/schemas/LLMObsPatternsConfigSnapshot" + created_at: + description: Timestamp when the run was created. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + previous_run_id: + description: Identifier of the run that completed immediately before this one. Empty if none. + example: "" + type: string + run_id: + description: Identifier of the run that produced the topics. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + topics: + $ref: "#/components/schemas/LLMObsPatternsTopicsWithClusteredPointsList" + required: + - run_id + - config_id + - previous_run_id + - created_at + - topics + type: object + LLMObsPatternsTopicsWithClusteredPointsResponseData: + description: Data object of an LLM Observability patterns topics-with-clustered-points response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsTopicsWithClusteredPointsResponseAttributes" + id: + description: Identifier of the run the topics belong to. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + type: + $ref: "#/components/schemas/LLMObsPatternsTopicsWithClusteredPointsType" + required: + - id + - type + - attributes + type: object + LLMObsPatternsTopicsWithClusteredPointsType: + description: Resource type of an LLM Observability patterns topics-with-clustered-points response. + enum: + - get_topics_with_cluster_points_response + example: get_topics_with_cluster_points_response + type: string + x-enum-varnames: + - GET_TOPICS_WITH_CLUSTER_POINTS_RESPONSE + LLMObsPatternsTriggerRequest: + description: Request to trigger an LLM Observability patterns run. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsTriggerRequestData" + required: + - data + type: object + LLMObsPatternsTriggerRequestAttributes: + description: Attributes for triggering an LLM Observability patterns run. + properties: + config_id: + description: The ID of the patterns configuration to run. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + type: string + required: + - config_id + type: object + LLMObsPatternsTriggerRequestData: + description: Data object for triggering an LLM Observability patterns run. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsTriggerRequestAttributes" + type: + $ref: "#/components/schemas/LLMObsPatternsRequestType" + required: + - type + - attributes + type: object + LLMObsPatternsTriggerResponse: + description: Response after triggering an LLM Observability patterns run. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsTriggerResponseData" + required: + - data + type: object + LLMObsPatternsTriggerResponseAttributes: + description: Attributes of an LLM Observability patterns trigger response. + properties: + config_id: + description: The ID of the patterns configuration that was run. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + type: string + run_id: + description: The ID of the patterns run that was started. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + status: + description: Status of the patterns run. + example: started + type: string + required: + - run_id + - config_id + - status + type: object + LLMObsPatternsTriggerResponseData: + description: Data object of an LLM Observability patterns trigger response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsTriggerResponseAttributes" + id: + description: The ID of the patterns configuration that was run. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + type: string + type: + $ref: "#/components/schemas/LLMObsPatternsTriggerResponseType" + required: + - id + - type + - attributes + type: object + LLMObsPatternsTriggerResponseType: + description: Resource type of an LLM Observability patterns trigger response. + enum: + - topic_discovery_run + example: topic_discovery_run + type: string + x-enum-varnames: + - TOPIC_DISCOVERY_RUN LLMObsProjectDataAttributesRequest: description: Attributes for creating an LLM Observability project. properties: @@ -49748,6 +53366,32 @@ components: - TRACE - EXPERIMENT_TRACE - SESSION + LLMObsUpsertAnnotationItem: + description: |- + A single annotation to create or update. The annotation is matched by + `interaction_id` and the requesting user's identity. + properties: + interaction_id: + description: ID of the interaction to annotate. + example: "00000000-0000-0000-0000-000000000001" + type: string + label_values: + description: |- + Label values for this annotation. Each entry references a label schema by ID + and provides the corresponding value validated against the schema type constraints. + example: + - label_schema_id: "abc-123" + value: "good" + - label_schema_id: "ef56gh78" + value: "positive" + items: + $ref: "#/components/schemas/LLMObsAnnotationLabelValue" + minItems: 1 + type: array + required: + - interaction_id + - label_values + type: object LLMObsVertexAIMetadata: description: Vertex AI-specific metadata for an integration account or inference request. properties: @@ -49795,6 +53439,16 @@ components: - PHP - KOTLIN - SWIFT + LatestVersionMatchPolicy: + description: The policy for matching the latest form version during an upsert operation. + enum: + - none + - if_etag_match + example: none + type: string + x-enum-varnames: + - NONE + - IF_ETAG_MATCH LaunchDarklyAPIKey: description: The definition of the `LaunchDarklyAPIKey` object. properties: @@ -50036,6 +53690,72 @@ components: required: - name type: object + LicensesListResponse: + description: The top-level response object returned by the licenses list endpoint, containing the array of supported SPDX licenses. + properties: + data: + $ref: "#/components/schemas/LicensesListResponseData" + required: + - data + type: object + LicensesListResponseData: + description: The data object in a licenses list response, containing the list of SPDX licenses. + properties: + attributes: + $ref: "#/components/schemas/LicensesListResponseDataAttributes" + id: + description: The unique identifier for this licenses list response. + example: 0190a3d4-1234-7000-8000-000000000000 + type: string + type: + $ref: "#/components/schemas/LicensesListResponseDataType" + required: + - id + - type + - attributes + type: object + LicensesListResponseDataAttributes: + description: The attributes of the licenses list response, containing the array of SPDX licenses. + properties: + licenses: + $ref: "#/components/schemas/LicensesListResponseDataAttributesLicenses" + required: + - licenses + type: object + LicensesListResponseDataAttributesLicenses: + description: The list of SPDX licenses returned by the API. + items: + $ref: "#/components/schemas/LicensesListResponseDataAttributesLicensesItems" + type: array + LicensesListResponseDataAttributesLicensesItems: + description: An SPDX license entry returned by the licenses list endpoint. + properties: + display_name: + description: The human-readable name of the license. + example: MIT License + type: string + identifier: + description: The SPDX identifier of the license. + example: MIT + type: string + short_name: + description: The short name of the license, typically matching the SPDX identifier. + example: MIT + type: string + required: + - display_name + - identifier + - short_name + type: object + LicensesListResponseDataType: + default: licenserequest + description: The type identifier for license list responses. + enum: + - licenserequest + example: licenserequest + type: string + x-enum-varnames: + - LICENSEREQUEST Links: description: The JSON:API links related to pagination. properties: @@ -51067,6 +54787,33 @@ components: meta: $ref: "#/components/schemas/ServiceAccessTokenResponseMeta" type: object + ListSharedDashboardsResponse: + description: Response containing shared dashboards for a dashboard. + properties: + data: + description: Shared dashboards for the dashboard. + items: + $ref: "#/components/schemas/SharedDashboardResponse" + type: array + included: + description: Users and dashboards related to the shared dashboards. + items: + $ref: "#/components/schemas/SharedDashboardIncluded" + type: array + required: + - data + - included + type: object + ListSourcemapsResponse: + description: Response containing a paginated list of source maps. + properties: + data: + $ref: "#/components/schemas/SourcemapsData" + meta: + $ref: "#/components/schemas/SourcemapsListMeta" + required: + - data + type: object ListTagsResponse: description: List tags response. properties: @@ -51361,10 +55108,24 @@ components: If it is set to "false", the tags will be deleted when the logs are sent to the archive. example: false type: boolean + lookup_attributes: + description: An array of attributes to use as lookup keys for the archive. + example: ["trace_id", "user_id"] + items: + description: A lookup attribute name. + type: string + type: array name: description: The archive name. example: Nginx Archive type: string + partitioning_attributes: + description: An array of attributes to use as partition keys for the archive. The attribute used most frequently for querying should be first. + example: ["service", "status"] + items: + description: A partition attribute name. + type: string + type: array query: description: The archive query/filter. Logs matching this query are included in the archive. example: source:nginx @@ -51420,10 +55181,24 @@ components: If it is set to "false", the tags will be deleted when the logs are sent to the archive. example: false type: boolean + lookup_attributes: + description: An array of attributes to use as lookup keys for the archive. + example: ["trace_id", "user_id"] + items: + description: A lookup attribute name. + type: string + type: array name: description: The archive name. example: Nginx Archive type: string + partitioning_attributes: + description: An array of attributes to use as partition keys for the archive. The attribute used most frequently for querying should be first. + example: ["service", "status"] + items: + description: A partition attribute name. + type: string + type: array query: description: The archive query/filter. Logs matching this query are included in the archive. example: source:nginx @@ -52812,6 +56587,178 @@ components: type: string x-enum-varnames: - MANAGED_ORGS + MaxSessionDurationType: + description: Data type of a maximum session duration update. + enum: [max_session_duration] + example: max_session_duration + type: string + x-enum-varnames: + - MAX_SESSION_DURATION + MaxSessionDurationUpdateAttributes: + description: Attributes for the maximum session duration update request. + properties: + max_session_duration: + description: The maximum session duration, in seconds. + example: 604800 + format: int64 + minimum: 1 + type: integer + required: [max_session_duration] + type: object + MaxSessionDurationUpdateData: + description: The data object for a maximum session duration update request. + properties: + attributes: + $ref: "#/components/schemas/MaxSessionDurationUpdateAttributes" + type: + $ref: "#/components/schemas/MaxSessionDurationType" + required: [type, attributes] + type: object + MaxSessionDurationUpdateRequest: + description: A request to update the maximum session duration for an organization. + properties: + data: + $ref: "#/components/schemas/MaxSessionDurationUpdateData" + required: [data] + type: object + McpScanRequest: + description: The top-level request object for submitting an MCP SCA dependency scan. + properties: + data: + $ref: "#/components/schemas/McpScanRequestData" + required: + - data + type: object + McpScanRequestData: + description: The data object in an MCP SCA scan request, containing the scan attributes and request type. + properties: + attributes: + $ref: "#/components/schemas/McpScanRequestDataAttributes" + id: + description: An optional identifier for this scan request. + type: string + type: + $ref: "#/components/schemas/McpScanRequestDataType" + required: + - type + - attributes + type: object + McpScanRequestDataAttributes: + description: The attributes of an MCP SCA scan request, describing the libraries to scan and their context. + properties: + commit_hash: + description: The commit hash of the source code being scanned. + example: 0e9fc8de83eaabecd722e1cd0ed44fb489fe15fc + type: string + libraries: + $ref: "#/components/schemas/McpScanRequestDataAttributesLibraries" + resource_name: + description: The name of the resource (typically the repository or project name) being scanned. + example: my-org/my-repo + type: string + required: + - resource_name + - commit_hash + - libraries + type: object + McpScanRequestDataAttributesLibraries: + description: The list of libraries to scan for vulnerabilities. + items: + $ref: "#/components/schemas/McpScanRequestDataAttributesLibrariesItems" + type: array + McpScanRequestDataAttributesLibrariesItems: + description: A library declaration to include in the dependency scan. + properties: + exclusions: + $ref: "#/components/schemas/McpScanRequestDataAttributesLibrariesItemsExclusions" + is_dev: + description: Whether this library is a development-only dependency. + example: false + type: boolean + is_direct: + description: Whether this library is a direct (rather than transitive) dependency. + example: true + type: boolean + package_manager: + description: The package manager that produced this library entry (for example, `npm`, `pip`, `nuget`). + example: nuget + type: string + purl: + description: The Package URL (PURL) uniquely identifying the library and its version. + example: pkg:nuget/Newtonsoft.Json@13.0.1 + type: string + target_frameworks: + $ref: "#/components/schemas/McpScanRequestDataAttributesLibrariesItemsTargetFrameworks" + required: + - purl + - is_dev + - is_direct + - package_manager + type: object + McpScanRequestDataAttributesLibrariesItemsExclusions: + description: The list of dependency PURLs to exclude when resolving transitive dependencies for this library. + items: + description: A dependency PURL to exclude. + type: string + type: array + McpScanRequestDataAttributesLibrariesItemsTargetFrameworks: + description: The list of target framework identifiers associated with the library. + items: + description: A target framework identifier (for example, `net8.0`). + type: string + type: array + McpScanRequestDataType: + default: mcpscanrequest + description: The type identifier for MCP SCA scan requests. + enum: + - mcpscanrequest + example: mcpscanrequest + type: string + x-enum-varnames: + - MCPSCANREQUEST + McpScanRequestResponse: + description: The top-level response object returned when an MCP SCA dependency scan request has been accepted. + properties: + data: + $ref: "#/components/schemas/McpScanRequestResponseData" + required: + - data + type: object + McpScanRequestResponseData: + description: The data object returned when a scan request has been accepted. + properties: + attributes: + $ref: "#/components/schemas/McpScanRequestResponseDataAttributes" + id: + description: The job identifier assigned to the scan. + example: 0190a3d4-1234-7000-8000-000000000000 + type: string + type: + $ref: "#/components/schemas/McpScanRequestResponseDataType" + required: + - id + - type + - attributes + type: object + McpScanRequestResponseDataAttributes: + description: The attributes returned when a scan request has been accepted, containing the job identifier used to poll for results. + properties: + job_id: + description: The job identifier assigned to the scan, used to retrieve the scan result. + example: 0190a3d4-1234-7000-8000-000000000000 + type: string + required: + - job_id + type: object + McpScanRequestResponseDataType: + default: mcpscanrequestresponse + description: The type identifier for MCP SCA scan request responses. + enum: + - mcpscanrequestresponse + example: mcpscanrequestresponse + type: string + x-enum-varnames: + - MCPSCANREQUESTRESPONSE MemberTeam: description: A member team properties: @@ -56305,6 +60252,241 @@ components: - type - id type: object + NDKSourcemapAttributes: + description: Attributes of an Android NDK symbol file. + properties: + arch: + description: The target CPU architecture. + example: arm64-v8a + type: string + build_id: + description: The build identifier (UUID format). + example: 550e8400-e29b-41d4-a716-446655440000 + type: string + created_at: + description: The timestamp when the symbol file was created. + example: "2024-01-01T00:00:00Z" + format: date-time + type: string + file_name: + description: The NDK library file name. + example: libmyapp.so + type: string + mapkind: + description: The type of source map. + example: ndk + type: string + size: + description: The size of the symbol file in bytes. + example: 32768 + format: int64 + type: integer + required: + - mapkind + - size + - created_at + type: object + NDKSourcemapData: + description: Android NDK symbol file data object. + properties: + attributes: + $ref: "#/components/schemas/NDKSourcemapAttributes" + id: + description: The unique identifier of the source map. + example: "7" + type: string + type: + $ref: "#/components/schemas/SourcemapDataType" + required: + - id + - type + - attributes + type: object + NetworkHealthInsight: + description: A single network health insight describing a service-to-service connectivity issue. + properties: + attributes: + $ref: "#/components/schemas/NetworkHealthInsightAttributes" + id: + description: Unique identifier for this network health insight. + example: example-insight-id + type: string + type: + $ref: "#/components/schemas/NetworkHealthInsightsType" + required: + - type + - id + - attributes + type: object + NetworkHealthInsightAttributes: + description: Detailed attributes of a network health insight. + properties: + account_id: + description: AWS account identifier where the certificate is located. Only set for `tls-cert` insights. + example: "123456789012" + type: string + certificate_id: + description: ARN or identifier of the certificate. Only set for `tls-cert` insights. + example: "arn:aws:acm:us-east-1:123456789012:certificate/abcd1234-a123-456b-a123-12345678901f" + type: string + certificate_lifetime_percent: + description: |- + Percentage of the certificate's validity period that has elapsed, ranging from 0 to 100. + Only set for `tls-cert` insights. + example: 96.7 + format: double + type: number + client_region: + description: AWS region where the client is located. Only set for `tls-cert` insights. + example: us-west-2 + type: string + client_service: + description: |- + Name of the service making the request (DNS query or TLS-secured connection). + Set to `N/A` when the client service cannot be determined. + example: network-logger + type: string + days_until_expiration: + description: |- + Number of days remaining until the certificate expires. Negative values indicate the + certificate has already expired. Only set for `tls-cert` insights. + example: 3 + format: int64 + type: integer + dns_query: + description: Domain name that was being resolved when the DNS failure occurred. Only set for `dns` insights. + example: kafka-broker.internal.domain.com + type: string + dns_server: + description: DNS server that received the failing query. Only set for `dns` insights. + example: cluster-dns + type: string + domain_name: + description: Domain name covered by the certificate. Only set for `tls-cert` insights. + example: api.example.com + type: string + failure_magnitude: + description: |- + Count of failed events observed during the query window. Only set for `dns`, `tcp`, + and `security-group` insights. + example: 150 + format: int64 + minimum: 0 + type: integer + failure_rate: + description: |- + Percentage of requests that failed during the query window, ranging from 0 to 100. + Only set for `dns`, `tcp`, and `security-group` insights. + example: 91 + format: double + maximum: 100 + minimum: 0 + type: number + failure_type: + $ref: "#/components/schemas/NetworkHealthInsightFailureType" + loadbalancer_id: + description: ARN of the load balancer using the certificate. Only set for `tls-cert` insights. + example: "arn:aws:elasticloadbalancing:us-east-1:123456789012:loadbalancer/app/my-lb/50dc6c495c0c9188" + type: string + server_region: + description: AWS region where the server or load balancer is located. Only set for `tls-cert` insights. + example: us-east-1 + type: string + server_service: + description: Name of the target service the client was trying to reach. + example: kafka + type: string + total_requests: + description: |- + Total number of requests observed during the query window. Provides context for + `failure_magnitude` and `failure_rate`. Only set for `dns`, `tcp`, and `security-group` insights. + example: 1200 + format: int64 + minimum: 0 + type: integer + traffic_volume: + $ref: "#/components/schemas/NetworkHealthInsightTrafficVolume" + type: + $ref: "#/components/schemas/NetworkHealthInsightCategory" + type: object + NetworkHealthInsightCategory: + description: |- + Category of network health insight. Indicates whether the insight relates to a DNS issue (`dns`), + a TCP issue (`tcp`), a TLS certificate issue (`tls-cert`), or a security group denial (`security-group`). + enum: + - dns + - tcp + - tls-cert + - security-group + example: dns + type: string + x-enum-varnames: + - DNS + - TCP + - TLS_CERT + - SECURITY_GROUP + NetworkHealthInsightFailureType: + description: |- + Specific failure type within the insight category. For DNS insights: `timeout`, `nxdomain`, + `servfail`, or `general_failure`. For TLS certificate insights: `expired` or `expiring_soon`. + For security group insights: `denied`. + enum: + - timeout + - nxdomain + - servfail + - general_failure + - expired + - expiring_soon + - denied + example: nxdomain + type: string + x-enum-varnames: + - TIMEOUT + - NXDOMAIN + - SERVFAIL + - GENERAL_FAILURE + - EXPIRED + - EXPIRING_SOON + - DENIED + NetworkHealthInsightTrafficVolume: + description: Network traffic volume metrics between the client and server services during the query window. + properties: + bytes_read: + description: Total bytes read from the server to the client during the query window. + example: 1800000 + format: int64 + type: integer + bytes_written: + description: Total bytes written from the client to the server during the query window. + example: 2500000 + format: int64 + type: integer + total_traffic: + description: Sum of bytes written and bytes read across the query window. + example: 4300000 + format: int64 + type: integer + type: object + NetworkHealthInsightsResponse: + description: Response containing a list of network health insights for the organization. + properties: + data: + description: Array of network health insights returned for the query window. + items: + $ref: "#/components/schemas/NetworkHealthInsight" + type: array + required: + - data + type: object + NetworkHealthInsightsType: + default: network-health-insights + description: The resource type for network health insights. Always `network-health-insights`. + enum: + - network-health-insights + example: network-health-insights + type: string + x-enum-varnames: + - NETWORK_HEALTH_INSIGHTS NodeType: additionalProperties: {} description: A tree-sitter node type definition for a given language, describing the node's structure, subtypes, and fields. @@ -56603,6 +60785,76 @@ components: - targets - version type: object + NotificationRulePreviewNotificationStatus: + description: The notification status for the given rule type. `SUCCESS` means a matching event was found and the notification was sent successfully. `DEFAULT` means no matching event was found and a default placeholder notification was sent instead. `ERROR` means an error occurred while sending the notification. + enum: + - SUCCESS + - DEFAULT + - ERROR + example: SUCCESS + type: string + x-enum-varnames: + - SUCCESS + - DEFAULT + - ERROR + NotificationRulePreviewResponse: + description: Response from the notification preview request. + properties: + data: + $ref: "#/components/schemas/NotificationRulePreviewResponseData" + required: + - data + type: object + NotificationRulePreviewResponseAttributes: + description: Attributes of the notification preview response. + properties: + preview_results: + $ref: "#/components/schemas/NotificationRulePreviewResults" + required: + - preview_results + type: object + NotificationRulePreviewResponseData: + description: The notification preview response data. + properties: + attributes: + $ref: "#/components/schemas/NotificationRulePreviewResponseAttributes" + id: + description: The ID of the notification preview response. + example: rka-loa-zwu + type: string + type: + $ref: "#/components/schemas/NotificationRulePreviewResponseType" + required: + - type + - attributes + type: object + NotificationRulePreviewResponseType: + description: The type of the notification preview response. + enum: + - notification_preview_response + example: notification_preview_response + type: string + x-enum-varnames: + - NOTIFICATION_PREVIEW_RESPONSE + NotificationRulePreviewResult: + description: The preview result for a single rule type. + properties: + notification_status: + $ref: "#/components/schemas/NotificationRulePreviewNotificationStatus" + rule_type: + $ref: "#/components/schemas/RuleTypesItems" + required: + - rule_type + - notification_status + type: object + NotificationRulePreviewResults: + description: List of preview results for each rule type matched by the notification rule. + example: + - notification_status: DEFAULT + rule_type: log_detection + items: + $ref: "#/components/schemas/NotificationRulePreviewResult" + type: array NotificationRuleQuery: description: The query is composed of one or several key:value pairs, which can be used to filter security issues on tags and attributes. example: (source:production_service OR env:prod) @@ -56613,6 +60865,30 @@ components: data: $ref: "#/components/schemas/NotificationRule" type: object + NotificationRuleRouting: + description: Routing configuration for the notification rule. + properties: + mode: + $ref: "#/components/schemas/NotificationRuleRoutingMode" + required: + - mode + type: object + NotificationRuleRoutingMode: + description: The routing mode for the notification rule. `manual` sends notifications to the configured targets. + enum: + - manual + example: manual + type: string + x-enum-varnames: + - MANUAL + NotificationRulesListResponse: + description: The list of notification rules. + properties: + data: + items: + $ref: "#/components/schemas/NotificationRule" + type: array + type: object NotificationRulesType: description: The rule type associated to notification rules. enum: @@ -56736,6 +61012,59 @@ components: - id - type type: object + OAuth2WellKnownSitesAttributes: + description: Attributes containing the list of public OAuth2 sites. + properties: + sites: + description: Array of public OAuth2 site URLs for the environment. + example: + - datadoghq.com + - datadoghq.eu + - us5.datadoghq.com + - us3.datadoghq.com + - ap1.datadoghq.com + - ap2.datadoghq.com + items: + description: Public OAuth2 site URL. + example: app.datadoghq.com + type: string + type: array + required: + - sites + type: object + OAuth2WellKnownSitesData: + description: Data object containing OAuth2 well-known sites information. + properties: + attributes: + $ref: "#/components/schemas/OAuth2WellKnownSitesAttributes" + id: + description: Environment identifier. + example: prod + type: string + type: + $ref: "#/components/schemas/OAuth2WellKnownSitesEnvType" + required: + - id + - type + - attributes + type: object + OAuth2WellKnownSitesEnvType: + default: env + description: JSON:API resource type for OAuth2 well-known sites environment. + enum: + - env + example: env + type: string + x-enum-varnames: + - ENV + OAuth2WellKnownSitesResponse: + description: Response payload containing the list of public OAuth2 sites for discovery. + properties: + data: + $ref: "#/components/schemas/OAuth2WellKnownSitesData" + required: + - data + type: object OAuthClientRegistrationError: description: Error payload returned by OAuth2 dynamic client registration as defined by RFC 7591. properties: @@ -58035,6 +62364,7 @@ components: - $ref: "#/components/schemas/ObservabilityPipelineDedupeProcessor" - $ref: "#/components/schemas/ObservabilityPipelineEnrichmentTableProcessor" - $ref: "#/components/schemas/ObservabilityPipelineGenerateMetricsProcessor" + - $ref: "#/components/schemas/ObservabilityPipelineGenerateMetricsV2Processor" - $ref: "#/components/schemas/ObservabilityPipelineOcsfMapperProcessor" - $ref: "#/components/schemas/ObservabilityPipelineParseGrokProcessor" - $ref: "#/components/schemas/ObservabilityPipelineParseJSONProcessor" @@ -59174,6 +63504,50 @@ components: type: string x-enum-varnames: - GENERATE_DATADOG_METRICS + ObservabilityPipelineGenerateMetricsV2Processor: + description: |- + The `generate_metrics` processor creates custom metrics from logs. + Metrics can be counters, gauges, or distributions and optionally grouped by log fields. + The generated metrics must be routed to a metrics destination using the input `.metrics`. + + **Supported pipeline types:** logs + properties: + display_name: + $ref: "#/components/schemas/ObservabilityPipelineComponentDisplayName" + enabled: + description: Indicates whether the processor is enabled. + example: true + type: boolean + id: + description: The unique identifier for this component. Used to reference this component in other parts of the pipeline. + example: generate-metrics-processor + type: string + include: + description: A Datadog search query used to determine which logs this processor targets. + example: "service:my-service" + type: string + metrics: + description: Configuration for generating individual metrics. + items: + $ref: "#/components/schemas/ObservabilityPipelineGeneratedMetric" + type: array + type: + $ref: "#/components/schemas/ObservabilityPipelineGenerateMetricsV2ProcessorType" + required: + - id + - type + - enabled + type: object + x-pipeline-types: [logs] + ObservabilityPipelineGenerateMetricsV2ProcessorType: + default: generate_metrics + description: The processor type. Always `generate_metrics`. + enum: + - generate_metrics + example: generate_metrics + type: string + x-enum-varnames: + - GENERATE_METRICS ObservabilityPipelineGeneratedMetric: description: |- Defines a log-based custom metric, including its name, type, filter, value computation strategy, @@ -63527,7 +67901,8 @@ components: OrgConfigGetResponse: description: A response with a single Org Config. properties: - data: {$ref: "#/components/schemas/OrgConfigRead"} + data: + $ref: "#/components/schemas/OrgConfigRead" required: [data] type: object OrgConfigListResponse: @@ -63535,19 +67910,22 @@ components: properties: data: description: An array of Org Configs. - items: {$ref: "#/components/schemas/OrgConfigRead"} + items: + $ref: "#/components/schemas/OrgConfigRead" type: array required: [data] type: object OrgConfigRead: description: A single Org Config. properties: - attributes: {$ref: "#/components/schemas/OrgConfigReadAttributes"} + attributes: + $ref: "#/components/schemas/OrgConfigReadAttributes" id: description: A unique identifier for an Org Config. example: abcd1234 type: string - type: {$ref: "#/components/schemas/OrgConfigType"} + type: + $ref: "#/components/schemas/OrgConfigType" required: [id, type, attributes] type: object OrgConfigReadAttributes: @@ -63584,8 +67962,10 @@ components: OrgConfigWrite: description: An Org Config write operation. properties: - attributes: {$ref: "#/components/schemas/OrgConfigWriteAttributes"} - type: {$ref: "#/components/schemas/OrgConfigType"} + attributes: + $ref: "#/components/schemas/OrgConfigWriteAttributes" + type: + $ref: "#/components/schemas/OrgConfigType" required: [type, attributes] type: object OrgConfigWriteAttributes: @@ -63598,7 +67978,8 @@ components: OrgConfigWriteRequest: description: A request to update an Org Config. properties: - data: {$ref: "#/components/schemas/OrgConfigWrite"} + data: + $ref: "#/components/schemas/OrgConfigWrite" required: [data] type: object OrgConnection: @@ -64797,6 +69178,73 @@ components: type: string x-enum-varnames: - ORGS + OrgSAMLPreferencesAttributes: + description: Attributes for updating an organization's SAML preferences. + properties: + default_role_uuids: + description: |- + The UUID of the default role assigned to just-in-time provisioned users. + Exactly one role UUID must be provided. + example: + - 8dd1cf3c-0c75-11ea-ad28-fb5701eabc7d + items: + description: The UUID of a role. + example: 8dd1cf3c-0c75-11ea-ad28-fb5701eabc7d + format: uuid + type: string + maxItems: 1 + minItems: 1 + type: array + jit_domains: + description: |- + Email domains for which users are automatically provisioned on first SAML login + (just-in-time provisioning). + example: + - example.com + items: + description: An email domain for just-in-time user provisioning. + example: example.com + maxLength: 256 + minLength: 1 + type: string + maxItems: 50 + type: array + required: + - jit_domains + - default_role_uuids + type: object + OrgSAMLPreferencesData: + description: Data for updating an organization's SAML preferences. + properties: + attributes: + $ref: "#/components/schemas/OrgSAMLPreferencesAttributes" + id: + description: The identifier of the SAML preferences resource. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: + $ref: "#/components/schemas/OrgSAMLPreferencesType" + required: + - type + - attributes + type: object + OrgSAMLPreferencesType: + default: saml_preferences + description: SAML preferences resource type. + enum: + - saml_preferences + example: saml_preferences + type: string + x-enum-varnames: + - SAML_PREFERENCES + OrgSAMLPreferencesUpdateRequest: + description: Request to update an organization's SAML preferences. + properties: + data: + $ref: "#/components/schemas/OrgSAMLPreferencesData" + required: + - data + type: object Organization: description: Organization object. properties: @@ -65110,6 +69558,569 @@ components: required: - data type: object + OwnershipEvidenceAttributes: + description: The attributes of an ownership evidence response. + properties: + evidence_versions: + $ref: "#/components/schemas/OwnershipEvidenceVersions" + required: + - evidence_versions + type: object + OwnershipEvidenceData: + description: The data wrapper for an ownership evidence response. + properties: + attributes: + $ref: "#/components/schemas/OwnershipEvidenceAttributes" + id: + description: The identifier of the resource the evidence applies to. + example: test-resource + type: string + type: + $ref: "#/components/schemas/OwnershipEvidenceType" + required: + - id + - type + - attributes + type: object + OwnershipEvidenceResponse: + description: The response returned when retrieving the evidence backing an ownership inference for an owner type. + properties: + data: + $ref: "#/components/schemas/OwnershipEvidenceData" + required: + - data + type: object + OwnershipEvidenceType: + default: ownership_evidence + description: The type of the ownership evidence resource. The value should always be `ownership_evidence`. + enum: + - ownership_evidence + example: ownership_evidence + type: string + x-enum-varnames: + - OWNERSHIP_EVIDENCE + OwnershipEvidenceVersion: + additionalProperties: {} + description: A single evidence version entry describing how an inference was produced. + example: + pipeline_id: p1 + version: v3 + type: object + OwnershipEvidenceVersions: + description: The list of evidence versions associated with an inference. + example: + - pipeline_id: p1 + version: v3 + items: + $ref: "#/components/schemas/OwnershipEvidenceVersion" + nullable: true + type: array + OwnershipFeedbackAction: + description: The feedback action to apply to an inference. + enum: + - confirm + - reject + - correct + - persist + example: confirm + type: string + x-enum-varnames: + - CONFIRM + - REJECT + - CORRECT + - PERSIST + OwnershipFeedbackRequest: + description: The request body for submitting ownership feedback. + properties: + data: + $ref: "#/components/schemas/OwnershipFeedbackRequestData" + required: + - data + type: object + OwnershipFeedbackRequestAttributes: + description: The attributes of an ownership feedback request. + properties: + action: + $ref: "#/components/schemas/OwnershipFeedbackAction" + actor_handle: + description: The handle of the actor submitting the feedback. + example: user@example.com + type: string + actor_type: + description: The type of actor submitting the feedback, for example `user` or `service`. + example: user + type: string + corrected_owner_handle: + description: The corrected owner handle. Required when `action` is `correct`. + example: team-b + nullable: true + type: string + corrected_owner_type: + description: The corrected owner type. Required when `action` is `correct`. + example: team + nullable: true + type: string + inference_checksum: + description: The checksum of the inference being acted upon. Must match the current inference checksum or the request returns a conflict. + example: abc123 + type: string + reason: + description: An optional free-form reason explaining the feedback. + example: Confirmed by team lead. + nullable: true + type: string + required: + - action + - actor_handle + - actor_type + - inference_checksum + type: object + OwnershipFeedbackRequestData: + description: The data wrapper for an ownership feedback request. + properties: + attributes: + $ref: "#/components/schemas/OwnershipFeedbackRequestAttributes" + type: + $ref: "#/components/schemas/OwnershipFeedbackType" + required: + - type + - attributes + type: object + OwnershipFeedbackResponse: + description: The response returned after applying ownership feedback to an inference. + properties: + data: + $ref: "#/components/schemas/OwnershipFeedbackResultData" + required: + - data + type: object + OwnershipFeedbackResultAttributes: + description: The attributes of an ownership feedback result. + properties: + action: + $ref: "#/components/schemas/OwnershipFeedbackAction" + checksum: + description: The checksum of the inference after the feedback was applied. + example: abc123 + type: string + new_status: + $ref: "#/components/schemas/OwnershipInferenceStatus" + owner_type: + $ref: "#/components/schemas/OwnershipOwnerType" + previous_status: + $ref: "#/components/schemas/OwnershipInferenceStatus" + primary_contact_ref: + description: The primary contact reference for the inferred owner after the feedback was applied, formatted as `ref:handle/`. + example: ref:handle/team-a + nullable: true + type: string + updated_at: + description: The time when the inference was updated by the feedback. + example: "2026-01-15T10:00:00Z" + format: date-time + type: string + required: + - action + - previous_status + - new_status + - owner_type + - checksum + - updated_at + type: object + OwnershipFeedbackResultData: + description: The data wrapper for an ownership feedback result response. + properties: + attributes: + $ref: "#/components/schemas/OwnershipFeedbackResultAttributes" + id: + description: The identifier of the resource that the feedback was applied to. + example: res-1 + type: string + type: + $ref: "#/components/schemas/OwnershipFeedbackResultType" + required: + - id + - type + - attributes + type: object + OwnershipFeedbackResultType: + default: ownership_feedback_result + description: The type of the ownership feedback result resource. The value should always be `ownership_feedback_result`. + enum: + - ownership_feedback_result + example: ownership_feedback_result + type: string + x-enum-varnames: + - OWNERSHIP_FEEDBACK_RESULT + OwnershipFeedbackType: + default: ownership_feedback + description: The type of the ownership feedback request resource. The value should always be `ownership_feedback`. + enum: + - ownership_feedback + example: ownership_feedback + type: string + x-enum-varnames: + - OWNERSHIP_FEEDBACK + OwnershipHistoryAttributes: + description: The attributes of an ownership history response. + properties: + items: + $ref: "#/components/schemas/OwnershipHistoryItems" + pagination: + $ref: "#/components/schemas/OwnershipHistoryPagination" + required: + - items + - pagination + type: object + OwnershipHistoryData: + description: The data wrapper for an ownership history response. + properties: + attributes: + $ref: "#/components/schemas/OwnershipHistoryAttributes" + id: + description: The resource identifier for which history is returned. + example: res-1 + type: string + type: + $ref: "#/components/schemas/OwnershipHistoryType" + required: + - id + - type + - attributes + type: object + OwnershipHistoryItem: + description: A single ownership inference history entry. + properties: + checksum: + description: A checksum identifying the state of the inference at this point in time. + example: "" + type: string + confidence: + description: The confidence score of the inference, expressed as a numeric string with up to four decimal places. + example: "0.9000" + type: string + created_at: + description: The time this history entry was created. + example: "2026-01-15T10:00:00Z" + format: date-time + type: string + evidence_versions: + $ref: "#/components/schemas/OwnershipEvidenceVersions" + explanation: + description: A human-readable explanation of how the inference was produced. + example: "" + type: string + failed_at: + description: The time when this inference failed, if applicable. + example: "2026-01-15T10:00:00Z" + format: date-time + nullable: true + type: string + failure_reason: + description: The reason why this inference failed, if applicable. + example: missing evidence + nullable: true + type: string + id: + description: The unique identifier of the history entry. + example: 100 + format: int64 + type: integer + owner_type: + $ref: "#/components/schemas/OwnershipOwnerType" + primary_contact_ref: + description: The primary contact reference for the inferred owner, formatted as `ref:handle/`. + example: ref:handle/team-a + nullable: true + type: string + resource_id: + description: The identifier of the resource that the inference applies to. + example: res-1 + type: string + retry_schedule: + description: The scheduled retry time for a failed inference, if applicable. + example: "2026-01-15T11:00:00Z" + format: date-time + nullable: true + type: string + sources: + $ref: "#/components/schemas/OwnershipInferenceSources" + status: + $ref: "#/components/schemas/OwnershipInferenceStatus" + required: + - id + - resource_id + - owner_type + - confidence + - explanation + - evidence_versions + - sources + - checksum + - status + - created_at + type: object + OwnershipHistoryItems: + description: The list of history entries returned for this page. + items: + $ref: "#/components/schemas/OwnershipHistoryItem" + type: array + OwnershipHistoryPagination: + description: Cursor-based pagination metadata for the history response. + properties: + has_more: + description: Whether more history entries are available beyond this page. + example: false + type: boolean + next_cursor: + description: An opaque, base64-encoded cursor token. Pass it as the `cursor` query parameter to retrieve the next page. Absent or `null` when there are no further pages. + example: eyJpZCI6OTh9 + nullable: true + type: string + required: + - has_more + type: object + OwnershipHistoryResponse: + description: The response returned when listing the inference history for a resource. + properties: + data: + $ref: "#/components/schemas/OwnershipHistoryData" + required: + - data + type: object + OwnershipHistoryType: + default: ownership_history + description: The type of the ownership history resource. The value should always be `ownership_history`. + enum: + - ownership_history + example: ownership_history + type: string + x-enum-varnames: + - OWNERSHIP_HISTORY + OwnershipInferenceAttributes: + description: The attributes of a single ownership inference. + properties: + checksum: + description: A checksum that uniquely identifies the current state of the inference. Required when submitting feedback. + example: abc123 + type: string + confidence: + description: The confidence score of the inference, expressed as a numeric string with up to four decimal places. + example: "0.9500" + type: string + created_at: + description: The time when the inference was created. + example: "2026-01-15T10:00:00Z" + format: date-time + type: string + evidence_versions: + $ref: "#/components/schemas/OwnershipEvidenceVersions" + explanation: + description: A human-readable explanation of how the inference was produced. + example: High confidence match + type: string + owner_type: + $ref: "#/components/schemas/OwnershipOwnerType" + primary_contact_ref: + description: The primary contact reference for the inferred owner, formatted as `ref:handle/`. + example: ref:handle/team-a + nullable: true + type: string + sources: + $ref: "#/components/schemas/OwnershipInferenceSources" + status: + $ref: "#/components/schemas/OwnershipInferenceStatus" + updated_at: + description: The time when the inference was last updated. + example: "2026-01-15T10:00:00Z" + format: date-time + type: string + required: + - owner_type + - confidence + - explanation + - evidence_versions + - sources + - status + - checksum + - created_at + - updated_at + type: object + OwnershipInferenceData: + description: The data wrapper for a single ownership inference response. + properties: + attributes: + $ref: "#/components/schemas/OwnershipInferenceAttributes" + id: + description: The identifier of the inference, formatted as `resource_id:owner_type`. + example: test-resource:team + type: string + type: + $ref: "#/components/schemas/OwnershipInferenceType" + required: + - id + - type + - attributes + type: object + OwnershipInferenceItem: + description: A single ownership inference, scoped to a specific owner type. + properties: + checksum: + description: A checksum that uniquely identifies the current state of the inference. Required when submitting feedback. + example: abc123 + type: string + confidence: + description: The confidence score of the inference, expressed as a numeric string with up to four decimal places. + example: "0.9500" + type: string + created_at: + description: The time when the inference was created. + example: "2026-01-15T10:00:00Z" + format: date-time + type: string + evidence_versions: + $ref: "#/components/schemas/OwnershipEvidenceVersions" + explanation: + description: A human-readable explanation of how the inference was produced. + example: High confidence match + type: string + id: + description: The identifier of the inference, formatted as `resource_id:owner_type`. + example: test-resource:team + type: string + owner_type: + $ref: "#/components/schemas/OwnershipOwnerType" + primary_contact_ref: + description: The primary contact reference for the inferred owner, formatted as `ref:handle/`. + example: ref:handle/team-a + nullable: true + type: string + sources: + $ref: "#/components/schemas/OwnershipInferenceSources" + status: + $ref: "#/components/schemas/OwnershipInferenceStatus" + updated_at: + description: The time when the inference was last updated. + example: "2026-01-15T10:00:00Z" + format: date-time + type: string + required: + - id + - owner_type + - confidence + - explanation + - evidence_versions + - sources + - status + - checksum + - created_at + - updated_at + type: object + OwnershipInferenceItems: + description: The list of inferences for a resource, with one inference per owner type. + items: + $ref: "#/components/schemas/OwnershipInferenceItem" + type: array + OwnershipInferenceListAttributes: + description: The attributes of the ownership inferences collection response. + properties: + items: + $ref: "#/components/schemas/OwnershipInferenceItems" + required: + - items + type: object + OwnershipInferenceListData: + description: The data wrapper for the ownership inferences collection response. + properties: + attributes: + $ref: "#/components/schemas/OwnershipInferenceListAttributes" + id: + description: The resource identifier associated with the returned inferences. + example: test-resource + type: string + type: + $ref: "#/components/schemas/OwnershipInferencesType" + required: + - id + - type + - attributes + type: object + OwnershipInferenceListResponse: + description: The response returned when listing all current ownership inferences for a resource. + properties: + data: + $ref: "#/components/schemas/OwnershipInferenceListData" + required: + - data + type: object + OwnershipInferenceResponse: + description: The response returned when retrieving a single ownership inference for an owner type. + properties: + data: + $ref: "#/components/schemas/OwnershipInferenceData" + required: + - data + type: object + OwnershipInferenceSource: + additionalProperties: {} + description: A source describing how an inference was derived. + example: + kind: code_owners + type: object + OwnershipInferenceSources: + description: The list of sources backing an ownership inference. Empty when the inference status is not whitelisted to expose sources. + example: + - kind: code_owners + items: + $ref: "#/components/schemas/OwnershipInferenceSource" + type: array + OwnershipInferenceStatus: + description: The lifecycle status of an ownership inference. + enum: + - suggested + - persisted + - overridden + - failed + - unknown + example: suggested + type: string + x-enum-varnames: + - SUGGESTED + - PERSISTED + - OVERRIDDEN + - FAILED + - UNKNOWN + OwnershipInferenceType: + default: ownership_inference + description: The type of the ownership inference resource. The value should always be `ownership_inference`. + enum: + - ownership_inference + example: ownership_inference + type: string + x-enum-varnames: + - OWNERSHIP_INFERENCE + OwnershipInferencesType: + default: ownership_inferences + description: The type of the ownership inferences collection resource. The value should always be `ownership_inferences`. + enum: + - ownership_inferences + example: ownership_inferences + type: string + x-enum-varnames: + - OWNERSHIP_INFERENCES + OwnershipOwnerType: + description: The owner type for an ownership inference. + enum: + - user + - team + - service + - unknown + example: team + type: string + x-enum-varnames: + - USER + - TEAM + - SERVICE + - UNKNOWN PageAnnotationsAttributes: description: Attributes of the annotations on a page. properties: @@ -65719,6 +70730,8 @@ components: $ref: "#/components/schemas/Enabled" name: $ref: "#/components/schemas/RuleName" + routing: + $ref: "#/components/schemas/NotificationRuleRouting" selectors: $ref: "#/components/schemas/Selectors" targets: @@ -67860,6 +72873,7 @@ components: description: Notification destinations (1=email, 2=slack, 3=in-app). items: description: Notification channel identifier (1=email, 2=slack, 3=in-app). + format: int64 type: integer type: array enabled: @@ -68119,6 +73133,36 @@ components: data: $ref: "#/components/schemas/Deployment" type: object + PublishFormData: + description: The data for publishing a form version. + properties: + attributes: + $ref: "#/components/schemas/PublishFormDataAttributes" + type: + $ref: "#/components/schemas/FormPublicationType" + required: + - type + - attributes + type: object + PublishFormDataAttributes: + description: The attributes for publishing a form version. + properties: + version: + description: The version number to publish. + example: 1 + format: int64 + type: integer + required: + - version + type: object + PublishFormRequest: + description: A request to publish a form version. + properties: + data: + $ref: "#/components/schemas/PublishFormData" + required: + - data + type: object PublishRequestType: default: publishRequest description: The publish-request resource type. @@ -69314,6 +74358,72 @@ components: - value - unit type: object + ReactNativeSourcemapAttributes: + description: Attributes of a React Native source map. + properties: + build_number: + description: The build number. + example: "100" + type: string + bundle_name: + description: The bundle name. + example: com.example.app + type: string + bundle_version: + description: The bundle version. + example: "1.0" + type: string + created_at: + description: The timestamp when the source map was created. + example: "2024-01-01T00:00:00Z" + format: date-time + type: string + debug_id: + description: The debug identifier (UUID format). + example: 550e8400-e29b-41d4-a716-446655440000 + type: string + mapkind: + description: The type of source map. + example: react + type: string + platform: + description: The platform the source map was built for (e.g., `ios`, `android`). + example: ios + type: string + service: + description: The service name associated with the source map. + example: my-react-native-app + type: string + size: + description: The size of the source map file in bytes. + example: 2048 + format: int64 + type: integer + version: + description: The version of the service associated with the source map. + example: 1.0.0 + type: string + required: + - mapkind + - size + - created_at + type: object + ReactNativeSourcemapData: + description: React Native source map data object. + properties: + attributes: + $ref: "#/components/schemas/ReactNativeSourcemapAttributes" + id: + description: The unique identifier of the source map. + example: "10" + type: string + type: + $ref: "#/components/schemas/SourcemapDataType" + required: + - id + - type + - attributes + type: object ReadinessGate: description: Used to merge multiple branches into a single branch. properties: @@ -70320,6 +75430,428 @@ components: type: string x-enum-varnames: - RULESET + ReportScheduleAuthor: + description: A user included as a related JSON:API resource. + properties: + attributes: + $ref: "#/components/schemas/ReportScheduleAuthorAttributes" + id: + description: The user UUID. + example: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + type: string + type: + $ref: "#/components/schemas/ReportScheduleAuthorType" + required: + - type + - id + - attributes + type: object + ReportScheduleAuthorAttributes: + description: Attributes of the report author. + properties: + email: + description: The email address of the report author, or `null` if unavailable. + example: "user@example.com" + nullable: true + type: string + name: + description: The display name of the report author, or `null` if unavailable. + example: "Example User" + nullable: true + type: string + required: + - name + - email + type: object + ReportScheduleAuthorRelationship: + description: Relationship to the author of the report schedule. + properties: + data: + $ref: "#/components/schemas/ReportScheduleAuthorRelationshipData" + required: + - data + type: object + ReportScheduleAuthorRelationshipData: + description: Relationship data for the author of the report schedule. + properties: + id: + description: The user UUID of the report schedule author. + example: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + type: string + type: + $ref: "#/components/schemas/ReportScheduleAuthorType" + required: + - id + - type + type: object + ReportScheduleAuthorType: + description: JSON:API resource type for the included report author. + enum: + - users + example: users + type: string + x-enum-varnames: + - USERS + ReportScheduleCreateRequest: + description: Request body for creating a report schedule. + properties: + data: + $ref: "#/components/schemas/ReportScheduleCreateRequestData" + required: + - data + type: object + ReportScheduleCreateRequestAttributes: + description: The configuration of the report schedule to create. + properties: + delivery_format: + $ref: "#/components/schemas/ReportScheduleDeliveryFormat" + description: + description: A description of the report, up to 4096 characters. + example: "Weekly summary of infrastructure health." + maxLength: 4096 + type: string + recipients: + description: |- + The recipients of the report. Each entry is an email address, a Slack channel + reference in the form `slack:{team_id}.{channel_id}.{channel_name}`, or a Microsoft + Teams channel reference in the form `teams:{tenant_id}|{team_id}|{channel_id}`. + example: + - "user@example.com" + - "slack:T01234567.C01234567.alerts" + - "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2" + items: + description: A single recipient (email address, Slack channel reference, or Microsoft Teams channel reference). + type: string + type: array + resource_id: + description: The identifier of the dashboard or integration dashboard to render in the report. + example: "abc-def-ghi" + type: string + resource_type: + $ref: "#/components/schemas/ReportScheduleResourceType" + rrule: + description: The recurrence rule for the schedule, expressed as an iCalendar `RRULE` string. + example: "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0" + type: string + tab_id: + description: The identifier of the dashboard tab to render, when the dashboard has tabs. + example: "66666666-7777-8888-9999-000000000000" + format: uuid + type: string + template_variables: + description: The dashboard template variables applied when rendering the report. + items: + $ref: "#/components/schemas/ReportScheduleTemplateVariable" + type: array + timeframe: + description: The relative timeframe of data to include in the report. + example: "calendar_month" + type: string + timezone: + description: The IANA time zone identifier the recurrence rule is evaluated in. + example: "America/New_York" + type: string + title: + description: The title of the report, between 1 and 78 characters. + example: "Weekly Infrastructure Report" + maxLength: 78 + minLength: 1 + type: string + required: + - resource_id + - resource_type + - recipients + - rrule + - timezone + - template_variables + - timeframe + - title + - description + type: object + ReportScheduleCreateRequestData: + description: The JSON:API data object for a report schedule creation request. + properties: + attributes: + $ref: "#/components/schemas/ReportScheduleCreateRequestAttributes" + type: + $ref: "#/components/schemas/ReportScheduleType" + required: + - type + - attributes + type: object + ReportScheduleDeliveryFormat: + description: |- + How a PDF-export report is delivered. `pdf` attaches a PDF file, `png` embeds + an inline PNG image, and `pdf_and_png` delivers both. + enum: + - pdf + - png + - pdf_and_png + example: pdf + type: string + x-enum-varnames: + - PDF + - PNG + - PDF_AND_PNG + ReportScheduleIncludedResource: + description: A related resource included with a report schedule. + oneOf: + - $ref: "#/components/schemas/ReportScheduleAuthor" + ReportSchedulePatchRequest: + description: Request body for updating a report schedule. + properties: + data: + $ref: "#/components/schemas/ReportSchedulePatchRequestData" + required: + - data + type: object + ReportSchedulePatchRequestAttributes: + description: |- + The updated configuration of the report schedule. These values replace the existing + ones; the targeted resource (`resource_id` and `resource_type`) cannot be changed. + properties: + delivery_format: + $ref: "#/components/schemas/ReportScheduleDeliveryFormat" + description: + description: A description of the report, up to 4096 characters. + example: "Updated weekly summary of infrastructure health." + maxLength: 4096 + type: string + recipients: + description: |- + The recipients of the report. Each entry is an email address, a Slack channel + reference in the form `slack:{team_id}.{channel_id}.{channel_name}`, or a Microsoft + Teams channel reference in the form `teams:{tenant_id}|{team_id}|{channel_id}`. + example: + - "user@example.com" + - "slack:T01234567.C01234567.alerts" + - "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2" + items: + description: A single recipient (email address, Slack channel reference, or Microsoft Teams channel reference). + type: string + type: array + rrule: + description: The recurrence rule for the schedule, expressed as an iCalendar `RRULE` string. + example: "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0" + type: string + tab_id: + description: The identifier of the dashboard tab to render, when the dashboard has tabs. + example: "66666666-7777-8888-9999-000000000000" + format: uuid + type: string + template_variables: + description: The dashboard template variables applied when rendering the report. + items: + $ref: "#/components/schemas/ReportScheduleTemplateVariable" + type: array + timeframe: + description: The relative timeframe of data to include in the report. + example: "calendar_month" + type: string + timezone: + description: The IANA time zone identifier the recurrence rule is evaluated in. + example: "America/New_York" + type: string + title: + description: The title of the report, between 1 and 78 characters. + example: "Weekly Infrastructure Report" + maxLength: 78 + minLength: 1 + type: string + required: + - recipients + - rrule + - timezone + - template_variables + - timeframe + - title + - description + type: object + ReportSchedulePatchRequestData: + description: The JSON:API data object for a report schedule update request. + properties: + attributes: + $ref: "#/components/schemas/ReportSchedulePatchRequestAttributes" + type: + $ref: "#/components/schemas/ReportScheduleType" + required: + - type + - attributes + type: object + ReportScheduleResourceType: + description: The type of dashboard resource the report schedule targets. + enum: + - dashboard + - integration_dashboard + example: dashboard + type: string + x-enum-varnames: + - DASHBOARD + - INTEGRATION_DASHBOARD + ReportScheduleResponse: + description: Response containing a single report schedule. + properties: + data: + $ref: "#/components/schemas/ReportScheduleResponseData" + included: + description: Related resources included with the report schedule, such as the author. + items: + $ref: "#/components/schemas/ReportScheduleIncludedResource" + type: array + required: + - data + type: object + ReportScheduleResponseAttributes: + description: The configuration and derived state of a report schedule. + properties: + delivery_format: + $ref: "#/components/schemas/ReportScheduleResponseAttributesDeliveryFormat" + description: + description: The description of the report. + example: "Weekly summary of infrastructure health." + type: string + next_recurrence: + description: The Unix timestamp, in milliseconds, of the next scheduled delivery, or `null` if none is scheduled. + example: 1780923600000 + format: int64 + nullable: true + type: integer + recipients: + description: The recipients of the report (email addresses, Slack channel references, or Microsoft Teams channel references). + example: + - "user@example.com" + - "slack:T01234567.C01234567.alerts" + - "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2" + items: + description: A single recipient (email address, Slack channel reference, or Microsoft Teams channel reference). + type: string + type: array + resource_id: + description: The identifier of the resource rendered in the report. + example: "abc-def-ghi" + type: string + resource_type: + $ref: "#/components/schemas/ReportScheduleResourceType" + rrule: + description: The recurrence rule for the schedule, expressed as an iCalendar `RRULE` string. + example: "FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0" + type: string + status: + $ref: "#/components/schemas/ReportScheduleStatus" + tab_id: + description: The identifier of the dashboard tab rendered in the report, or `null` if not set. + example: "66666666-7777-8888-9999-000000000000" + nullable: true + type: string + template_variables: + description: The dashboard template variables applied when rendering the report. + items: + $ref: "#/components/schemas/ReportScheduleTemplateVariable" + type: array + timeframe: + description: The relative timeframe of data included in the report, or `null` if not set. + example: "1w" + nullable: true + type: string + timezone: + description: The IANA time zone identifier the recurrence rule is evaluated in. + example: "America/New_York" + type: string + title: + description: The title of the report. + example: "Weekly Infrastructure Report" + type: string + required: + - status + - resource_id + - resource_type + - recipients + - rrule + - timezone + - template_variables + - title + - description + - timeframe + - next_recurrence + - tab_id + type: object + ReportScheduleResponseAttributesDeliveryFormat: + description: The delivery format for dashboard report schedules, or `null` if not set. + enum: + - pdf + - png + - pdf_and_png + example: pdf + nullable: true + type: string + x-enum-varnames: + - PDF + - PNG + - PDF_AND_PNG + ReportScheduleResponseData: + description: The JSON:API data object representing a report schedule. + properties: + attributes: + $ref: "#/components/schemas/ReportScheduleResponseAttributes" + id: + description: The unique identifier of the report schedule. + example: "11111111-2222-3333-4444-555555555555" + type: string + relationships: + $ref: "#/components/schemas/ReportScheduleResponseRelationships" + type: + $ref: "#/components/schemas/ReportScheduleType" + required: + - id + - type + - attributes + - relationships + type: object + ReportScheduleResponseRelationships: + description: Relationships for the report schedule. + properties: + author: + $ref: "#/components/schemas/ReportScheduleAuthorRelationship" + required: + - author + type: object + ReportScheduleStatus: + description: Whether the schedule is currently delivering reports (`active`) or paused (`inactive`). + enum: + - active + - inactive + example: active + type: string + x-enum-varnames: + - ACTIVE + - INACTIVE + ReportScheduleTemplateVariable: + description: A dashboard template variable applied when rendering the report. + properties: + name: + description: The name of the template variable. + example: env + type: string + values: + description: The selected values for the template variable. + example: + - "prod" + items: + description: A single selected template variable value. + type: string + type: array + required: + - name + - values + type: object + ReportScheduleType: + description: JSON:API resource type for report schedules. + enum: + - schedule + example: schedule + type: string + x-enum-varnames: + - SCHEDULE ResolveVulnerableSymbolsRequest: description: The top-level request object for resolving vulnerable symbols in a set of packages. properties: @@ -71962,6 +77494,7 @@ components: - iac_misconfiguration - sast_vulnerability - secret_vulnerability + example: log_detection type: string x-enum-varnames: - APPLICATION_SECURITY @@ -72570,7 +78103,7 @@ components: type: number type: object RumMetricCompute: - description: The compute rule to compute the rum-based metric. + description: The compute rule to compute the RUM-based metric. properties: aggregation_type: $ref: "#/components/schemas/RumMetricComputeAggregationType" @@ -72578,7 +78111,7 @@ components: $ref: "#/components/schemas/RumMetricComputeIncludePercentiles" path: description: |- - The path to the value the rum-based metric will aggregate on. + The path to the value the RUM-based metric will aggregate on. Only present when `aggregation_type` is `distribution`. example: "@duration" type: string @@ -72598,7 +78131,7 @@ components: example: true type: boolean RumMetricCreateAttributes: - description: The object describing the Datadog rum-based metric to create. + description: The object describing the Datadog RUM-based metric to create. properties: compute: $ref: "#/components/schemas/RumMetricCompute" @@ -72618,7 +78151,7 @@ components: - compute type: object RumMetricCreateData: - description: The new rum-based metric properties. + description: The new RUM-based metric properties. properties: attributes: $ref: "#/components/schemas/RumMetricCreateAttributes" @@ -72632,7 +78165,7 @@ components: - attributes type: object RumMetricCreateRequest: - description: The new rum-based metric body. + description: The new RUM-based metric body. properties: data: $ref: "#/components/schemas/RumMetricCreateData" @@ -72646,7 +78179,7 @@ components: type: string x-enum-varnames: ["SESSION", "VIEW", "ACTION", "ERROR", "RESOURCE", "LONG_TASK", "VITAL"] RumMetricFilter: - description: The rum-based metric filter. Events matching this filter will be aggregated in this metric. + description: The RUM-based metric filter. Events matching this filter will be aggregated in this metric. properties: query: default: "*" @@ -72660,7 +78193,7 @@ components: description: A group by rule. properties: path: - description: The path to the value the rum-based metric will be aggregated over. + description: The path to the value the RUM-based metric will be aggregated over. example: "@browser.name" type: string tag_name: @@ -72671,17 +78204,17 @@ components: - path type: object RumMetricID: - description: The name of the rum-based metric. + description: The name of the RUM-based metric. example: "rum.sessions.webui.count" type: string RumMetricResponse: - description: The rum-based metric object. + description: The RUM-based metric object. properties: data: $ref: "#/components/schemas/RumMetricResponseData" type: object RumMetricResponseAttributes: - description: The object describing a Datadog rum-based metric. + description: The object describing a Datadog RUM-based metric. properties: compute: $ref: "#/components/schemas/RumMetricResponseCompute" @@ -72698,7 +78231,7 @@ components: $ref: "#/components/schemas/RumMetricResponseUniqueness" type: object RumMetricResponseCompute: - description: The compute rule to compute the rum-based metric. + description: The compute rule to compute the RUM-based metric. properties: aggregation_type: $ref: "#/components/schemas/RumMetricComputeAggregationType" @@ -72706,13 +78239,13 @@ components: $ref: "#/components/schemas/RumMetricComputeIncludePercentiles" path: description: |- - The path to the value the rum-based metric will aggregate on. + The path to the value the RUM-based metric will aggregate on. Only present when `aggregation_type` is `distribution`. example: "@duration" type: string type: object RumMetricResponseData: - description: The rum-based metric properties. + description: The RUM-based metric properties. properties: attributes: $ref: "#/components/schemas/RumMetricResponseAttributes" @@ -72722,7 +78255,7 @@ components: $ref: "#/components/schemas/RumMetricType" type: object RumMetricResponseFilter: - description: The rum-based metric filter. RUM events matching this filter will be aggregated in this metric. + description: The RUM-based metric filter. RUM events matching this filter will be aggregated in this metric. properties: query: description: The search query - following the RUM search syntax. @@ -72733,7 +78266,7 @@ components: description: A group by rule. properties: path: - description: The path to the value the rum-based metric will be aggregated over. + description: The path to the value the RUM-based metric will be aggregated over. example: "@http.status_code" type: string tag_name: @@ -72770,7 +78303,7 @@ components: type: string x-enum-varnames: ["WHEN_MATCH", "WHEN_END"] RumMetricUpdateAttributes: - description: The rum-based metric properties that will be updated. + description: The RUM-based metric properties that will be updated. properties: compute: $ref: "#/components/schemas/RumMetricUpdateCompute" @@ -72783,13 +78316,13 @@ components: type: array type: object RumMetricUpdateCompute: - description: The compute rule to compute the rum-based metric. + description: The compute rule to compute the RUM-based metric. properties: include_percentiles: $ref: "#/components/schemas/RumMetricComputeIncludePercentiles" type: object RumMetricUpdateData: - description: The new rum-based metric properties. + description: The new RUM-based metric properties. properties: attributes: $ref: "#/components/schemas/RumMetricUpdateAttributes" @@ -72802,7 +78335,7 @@ components: - attributes type: object RumMetricUpdateRequest: - description: The new rum-based metric body. + description: The new RUM-based metric body. properties: data: $ref: "#/components/schemas/RumMetricUpdateData" @@ -72810,10 +78343,10 @@ components: - data type: object RumMetricsResponse: - description: All the available rum-based metric objects. + description: All the available RUM-based metric objects. properties: data: - description: A list of rum-based metric objects. + description: A list of RUM-based metric objects. items: $ref: "#/components/schemas/RumMetricResponseData" type: array @@ -72912,6 +78445,179 @@ components: $ref: "#/components/schemas/RumPermanentRetentionFilterData" type: array type: object + RumRateLimitAdaptiveConfig: + description: The configuration used when `mode` is `adaptive`. + properties: + max_retention_rate: + description: The maximum fraction of sessions to retain, in the range `(0, 1]`. + example: 0.5 + exclusiveMinimum: true + format: double + maximum: 1 + minimum: 0 + type: number + required: + - max_retention_rate + type: object + RumRateLimitConfigAttributes: + description: The RUM rate limit configuration properties. + properties: + adaptive: + $ref: "#/components/schemas/RumRateLimitAdaptiveConfig" + custom: + $ref: "#/components/schemas/RumRateLimitCustomConfig" + mode: + $ref: "#/components/schemas/RumRateLimitMode" + org_id: + description: The ID of the organization the rate limit configuration belongs to. + example: 2 + format: int64 + type: integer + updated_at: + description: The date the rate limit configuration was last updated. + example: "2026-03-04T15:37:54.951447Z" + type: string + updated_by: + description: The handle of the user who last updated the rate limit configuration. + example: test@example.com + type: string + required: + - mode + - org_id + type: object + RumRateLimitConfigData: + description: The RUM rate limit configuration object. + properties: + attributes: + $ref: "#/components/schemas/RumRateLimitConfigAttributes" + id: + description: The identifier of the scope the rate limit configuration applies to. + example: cd73a516-a481-4af5-8352-9b577465c77b + type: string + type: + $ref: "#/components/schemas/RumRateLimitConfigType" + required: + - id + - type + - attributes + type: object + RumRateLimitConfigResponse: + description: The RUM rate limit configuration response. + properties: + data: + $ref: "#/components/schemas/RumRateLimitConfigData" + required: + - data + type: object + RumRateLimitConfigType: + default: rum_rate_limit_config + description: The type of the resource, always `rum_rate_limit_config`. + enum: + - rum_rate_limit_config + example: rum_rate_limit_config + type: string + x-enum-varnames: ["RUM_RATE_LIMIT_CONFIG"] + RumRateLimitConfigUpdateAttributes: + description: The RUM rate limit configuration properties to create or update. + properties: + adaptive: + $ref: "#/components/schemas/RumRateLimitAdaptiveConfig" + custom: + $ref: "#/components/schemas/RumRateLimitCustomConfig" + mode: + $ref: "#/components/schemas/RumRateLimitMode" + required: + - mode + type: object + RumRateLimitConfigUpdateData: + description: The RUM rate limit configuration to create or update. + properties: + attributes: + $ref: "#/components/schemas/RumRateLimitConfigUpdateAttributes" + id: + description: |- + The identifier of the scope the rate limit configuration applies to. + Must match `scope_id` in the path. + example: cd73a516-a481-4af5-8352-9b577465c77b + type: string + type: + $ref: "#/components/schemas/RumRateLimitConfigType" + required: + - id + - type + - attributes + type: object + RumRateLimitConfigUpdateRequest: + description: The body of a request to create or update a RUM rate limit configuration. + properties: + data: + $ref: "#/components/schemas/RumRateLimitConfigUpdateData" + required: + - data + type: object + RumRateLimitCustomConfig: + description: The configuration used when `mode` is `custom`. + properties: + daily_reset_time: + description: The time of day when the daily quota resets, in `HH:MM` 24-hour format. + example: "08:00" + pattern: "^([01]\\d|2[0-3]):[0-5]\\d$" + type: string + daily_reset_timezone: + description: The timezone offset used for the daily reset time, in `±HH:MM` format. + example: "+09:00" + pattern: "^[+-](0\\d|1[0-4]):[0-5]\\d$" + type: string + quota_reached_action: + $ref: "#/components/schemas/RumRateLimitQuotaReachedAction" + session_limit: + description: The maximum number of sessions allowed within the window. + example: 1000000 + format: int64 + minimum: 1 + type: integer + window_type: + $ref: "#/components/schemas/RumRateLimitWindowType" + required: + - window_type + - session_limit + - daily_reset_time + - daily_reset_timezone + - quota_reached_action + type: object + RumRateLimitMode: + description: |- + The rate limit mode. `custom` enforces a fixed session limit, while + `adaptive` dynamically adjusts retention. + enum: + - custom + - adaptive + example: custom + type: string + x-enum-varnames: ["CUSTOM", "ADAPTIVE"] + RumRateLimitQuotaReachedAction: + description: The action to take when the session quota is reached. + enum: + - stop + - slowdown + example: stop + type: string + x-enum-varnames: ["STOP", "SLOWDOWN"] + RumRateLimitScopeType: + default: application + description: The type of scope the rate limit configuration applies to. + enum: + - application + example: application + type: string + x-enum-varnames: ["APPLICATION"] + RumRateLimitWindowType: + description: The window type over which the session limit is enforced. + enum: + - daily + example: daily + type: string + x-enum-varnames: ["DAILY"] RumRetentionFilterAttributes: description: The object describing attributes of a RUM retention filter. properties: @@ -73094,6 +78800,27 @@ components: $ref: "#/components/schemas/RumRetentionFilterData" type: array type: object + RunDataObservabilityMonitorResponse: + description: The response returned when a data observability monitor run is triggered. + properties: + data: + $ref: "#/components/schemas/RunDataObservabilityMonitorResponseData" + required: + - data + type: object + RunDataObservabilityMonitorResponseData: + description: The data object returned when a data observability monitor run is triggered. + properties: + id: + description: The unique identifier of the monitor run. + example: "abc123def456" + type: string + type: + $ref: "#/components/schemas/DataObservabilityMonitorRunType" + required: + - id + - type + type: object RunHistoricalJobRequest: description: Run a historical job request. properties: @@ -73166,6 +78893,169 @@ components: type: string x-enum-varnames: - SAML_ASSERTION_ATTRIBUTES + SAMLConfiguration: + description: A SAML configuration object. + properties: + attributes: + $ref: "#/components/schemas/SAMLConfigurationAttributes" + id: + description: The UUID of the SAML configuration. + example: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + type: string + relationships: + $ref: "#/components/schemas/SAMLConfigurationRelationships" + type: + $ref: "#/components/schemas/SAMLConfigurationsType" + required: + - id + - type + type: object + SAMLConfigurationAttributes: + description: Attributes of a SAML configuration. + properties: + assertion_consumer_service: + description: The assertion consumer service (ACS) URLs that the identity provider posts SAML responses to. + example: + - https://app.datadoghq.com/account/saml/assertion + items: + description: An assertion consumer service URL. + example: https://app.datadoghq.com/account/saml/assertion + type: string + type: array + created_at: + description: Creation time of the SAML configuration. + format: date-time + readOnly: true + type: string + entity_id: + description: The service provider entity ID Datadog presents to the identity provider. + example: https://app.datadoghq.com/account/saml/metadata.xml?id=00000000-0000-0000-0000-000000000000 + type: string + expires_at: + description: Expiration time of the uploaded identity provider metadata. + example: "2010-10-26T13:31:15+00:00" + format: date-time + nullable: true + type: string + idp_initiated: + description: Whether identity-provider-initiated login is enabled for the organization. + example: true + type: boolean + jit_domains: + description: |- + Email domains for which users are automatically provisioned on first SAML login + (just-in-time provisioning). + example: + - example.com + items: + description: An email domain for just-in-time user provisioning. + example: example.com + type: string + type: array + modified_at: + description: Time of the last SAML configuration modification. + format: date-time + readOnly: true + type: string + sso_url: + description: |- + The single sign-on URL users can visit to start a SAML login. + Returns `null` when the organization is identity-provider-initiated and has no subdomain. + example: https://app.datadoghq.com/account/login/id/00000000-0000-0000-0000-000000000000 + nullable: true + type: string + type: object + SAMLConfigurationRelationships: + description: Relationships of a SAML configuration. + properties: + default_roles: + $ref: "#/components/schemas/RelationshipToRoles" + type: object + SAMLConfigurationResponse: + description: Response containing a single SAML configuration. + properties: + data: + $ref: "#/components/schemas/SAMLConfiguration" + included: + description: Resources related to the SAML configuration, such as the default roles. + items: + $ref: "#/components/schemas/Role" + type: array + required: + - data + type: object + SAMLConfigurationUpdateAttributes: + description: Attributes for updating a SAML configuration. + properties: + idp_initiated: + description: Whether identity-provider-initiated login is enabled for the organization. + example: true + type: boolean + jit_domains: + description: |- + Email domains for which users are automatically provisioned on first SAML login + (just-in-time provisioning). A default role is required to enable just-in-time provisioning. + example: + - example.com + items: + description: An email domain for just-in-time user provisioning. + example: example.com + maxLength: 255 + minLength: 1 + type: string + maxItems: 50 + minItems: 0 + type: array + type: object + SAMLConfigurationUpdateData: + description: Data for updating a SAML configuration. + properties: + attributes: + $ref: "#/components/schemas/SAMLConfigurationUpdateAttributes" + id: + description: The UUID of the SAML configuration to update. Must match the UUID in the URL path. + example: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + maxLength: 39 + type: string + relationships: + $ref: "#/components/schemas/SAMLConfigurationRelationships" + type: + $ref: "#/components/schemas/SAMLConfigurationsType" + required: + - id + - type + type: object + SAMLConfigurationUpdateRequest: + description: Request to update a SAML configuration. + properties: + data: + $ref: "#/components/schemas/SAMLConfigurationUpdateData" + required: + - data + type: object + SAMLConfigurationsResponse: + description: Response containing a list of SAML configurations. + properties: + data: + description: Array of SAML configurations. An organization has at most one SAML configuration. + items: + $ref: "#/components/schemas/SAMLConfiguration" + type: array + included: + description: Resources related to the SAML configurations, such as the default roles. + items: + $ref: "#/components/schemas/Role" + type: array + type: object + SAMLConfigurationsType: + default: saml_configurations + description: SAML configurations resource type. + enum: + - saml_configurations + example: saml_configurations + type: string + x-enum-varnames: + - SAML_CONFIGURATIONS SBOM: description: A single SBOM properties: @@ -74469,6 +80359,13 @@ components: type: $ref: "#/components/schemas/ScalarFormulaResponseType" type: object + ScanResultResponse: + description: |- + The raw scan result document produced by the SCA processor. + The contents reflect the vulnerabilities and metadata produced for the libraries + submitted in the original scan request. + oneOf: + - $ref: "#/components/schemas/AnyValueObject" ScannedAssetMetadata: description: The metadata of a scanned asset. properties: @@ -83298,6 +89195,15 @@ components: description: Link to the Incident created on ServiceNow type: string type: object + ServiceNowTicketsDataType: + default: servicenow_tickets + description: ServiceNow tickets resource type. + enum: + - servicenow_tickets + example: servicenow_tickets + type: string + x-enum-varnames: + - SERVICENOW_TICKETS ServiceNowUserAttributes: description: Attributes of a ServiceNow user properties: @@ -83374,6 +89280,104 @@ components: required: - data type: object + ServiceRepositoryInfoDataType: + description: The resource type for service repository info objects. + enum: + - service_repository_info + example: service_repository_info + type: string + x-enum-varnames: + - SERVICE_REPOSITORY_INFO + ServiceRepositoryInfoRequest: + description: Request body for retrieving service repository information. + properties: + data: + $ref: "#/components/schemas/ServiceRepositoryInfoRequestData" + required: + - data + type: object + ServiceRepositoryInfoRequestAttributes: + description: Attributes for the service repository info request. + properties: + service: + description: The name of the service. + example: my-web-service + type: string + version: + description: The version of the service. + example: 1.0.0 + type: string + required: + - service + - version + type: object + ServiceRepositoryInfoRequestData: + description: Data object for the service repository info request. + properties: + attributes: + $ref: "#/components/schemas/ServiceRepositoryInfoRequestAttributes" + type: + $ref: "#/components/schemas/ServiceRepositoryInfoDataType" + required: + - type + - attributes + type: object + ServiceRepositoryInfoResponse: + description: Response containing service repository information. + properties: + data: + $ref: "#/components/schemas/ServiceRepositoryInfoResponseData" + required: + - data + type: object + ServiceRepositoryInfoResponseAttributes: + description: Attributes of the service repository information. + properties: + commit_sha: + description: The SHA of the commit associated with the service version. + example: abc123def456789 + type: string + repository_url: + description: The URL of the source code repository. + example: https://github.com/my-org/my-repo + type: string + status: + $ref: "#/components/schemas/ServiceRepositoryInfoStatus" + required: + - status + type: object + ServiceRepositoryInfoResponseData: + description: Data object for the service repository info response. + properties: + attributes: + $ref: "#/components/schemas/ServiceRepositoryInfoResponseAttributes" + id: + description: The identifier composed of the service name and version. + example: my-web-service:1.0.0 + type: string + type: + $ref: "#/components/schemas/ServiceRepositoryInfoDataType" + required: + - id + - type + - attributes + type: object + ServiceRepositoryInfoStatus: + description: The status of the service repository info lookup. + enum: + - success + - not_found + - no_repository + - internal_error + - unknown + example: success + type: string + x-enum-varnames: + - SUCCESS + - NOT_FOUND + - NO_REPOSITORY + - INTERNAL_ERROR + - UNKNOWN SessionIdArray: description: A collection of session identifiers used for bulk add or remove operations on a playlist. properties: @@ -83397,6 +89401,347 @@ components: required: - type type: object + SharedDashboardGlobalTime: + additionalProperties: {} + description: Default time range configuration for the shared dashboard. + example: + live_span: 1h + nullable: true + type: object + SharedDashboardIncluded: + description: Resource included with a shared dashboard. + oneOf: + - $ref: "#/components/schemas/SharedDashboardIncludedDashboard" + - $ref: "#/components/schemas/SharedDashboardIncludedUser" + SharedDashboardIncludedDashboard: + description: Included dashboard resource. + properties: + attributes: + $ref: "#/components/schemas/SharedDashboardIncludedDashboardAttributes" + id: + description: ID of the dashboard. + example: abc-def-ghi + type: string + type: + $ref: "#/components/schemas/SharedDashboardIncludedDashboardType" + required: + - id + - type + - attributes + type: object + SharedDashboardIncludedDashboardAttributes: + description: Attributes of the included dashboard. + properties: + title: + description: Dashboard title. + example: Q1 Metrics Dashboard + type: string + required: + - title + type: object + SharedDashboardIncludedDashboardType: + default: dashboard + description: Included dashboard resource type. + enum: + - dashboard + example: dashboard + type: string + x-enum-varnames: + - DASHBOARD + SharedDashboardIncludedUser: + description: Included user resource. + properties: + attributes: + $ref: "#/components/schemas/SharedDashboardIncludedUserAttributes" + id: + description: ID of the user. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: + $ref: "#/components/schemas/UserResourceType" + required: + - id + - type + - attributes + type: object + SharedDashboardIncludedUserAttributes: + description: Attributes of the included user. + properties: + handle: + description: User handle. + example: jane.doe@example.com + type: string + name: + description: User display name. + example: Jane Doe + type: string + required: + - handle + - name + type: object + SharedDashboardInvitee: + description: Invitee that can access an invite-only shared dashboard. + properties: + access_expiration: + description: Time when the invitee's access expires. + example: "2026-01-15T09:30:00.000Z" + format: date-time + nullable: true + type: string + created_at: + description: Time when the invitee was added. + example: "2026-01-01T00:00:00.000Z" + format: date-time + type: string + email: + description: Email address of the invitee. + example: jane.doe@example.com + type: string + required: + - email + - access_expiration + - created_at + type: object + SharedDashboardRelationshipDashboard: + description: Dashboard associated with the shared dashboard. + properties: + data: + $ref: "#/components/schemas/SharedDashboardRelationshipDashboardData" + required: + - data + type: object + SharedDashboardRelationshipDashboardData: + description: Dashboard relationship data. + properties: + id: + description: ID of the dashboard. + example: abc-def-ghi + type: string + type: + $ref: "#/components/schemas/SharedDashboardIncludedDashboardType" + required: + - id + - type + type: object + SharedDashboardRelationshipSharer: + description: User who shared the dashboard. + properties: + data: + $ref: "#/components/schemas/UserRelationshipData" + required: + - data + type: object + SharedDashboardRelationships: + description: Relationships of a shared dashboard. + properties: + dashboard: + $ref: "#/components/schemas/SharedDashboardRelationshipDashboard" + sharer: + $ref: "#/components/schemas/SharedDashboardRelationshipSharer" + required: + - dashboard + - sharer + type: object + SharedDashboardResponse: + description: A shared dashboard response resource. + properties: + attributes: + $ref: "#/components/schemas/SharedDashboardResponseAttributes" + id: + description: ID of the shared dashboard. + example: "12345" + type: string + relationships: + $ref: "#/components/schemas/SharedDashboardRelationships" + type: + $ref: "#/components/schemas/SharedDashboardType" + required: + - id + - type + - attributes + - relationships + type: object + SharedDashboardResponseAttributes: + description: Attributes of a shared dashboard response. + properties: + created_at: + description: Time when the shared dashboard was created. + example: "2026-01-01T00:00:00.000Z" + format: date-time + type: string + embeddable_domains: + description: Domains where embed-type shared dashboards can be embedded. + example: ["https://example.com"] + items: + description: An embeddable domain. + type: string + type: array + expiration: + description: Time when the shared dashboard expires. + example: "2026-02-01T00:00:00.000Z" + format: date-time + nullable: true + type: string + global_time: + $ref: "#/components/schemas/SharedDashboardGlobalTime" + global_time_selectable: + description: Whether viewers can select a different global time setting. + example: false + type: boolean + invitees: + description: Invitees for invite-only shared dashboards. + items: + $ref: "#/components/schemas/SharedDashboardInvitee" + type: array + last_accessed: + description: Time when the shared dashboard was last accessed. + example: "2026-01-15T09:30:00.000Z" + format: date-time + nullable: true + type: string + selectable_template_vars: + description: Template variables that viewers can modify. + items: + $ref: "#/components/schemas/SharedDashboardSelectableTemplateVariable" + type: array + share_type: + $ref: "#/components/schemas/SharedDashboardShareType" + sharer_disabled: + description: Whether the user who shared the dashboard is disabled. + example: false + type: boolean + status: + $ref: "#/components/schemas/SharedDashboardStatus" + title: + description: Display title for the shared dashboard. + example: Q1 Metrics Dashboard + type: string + token: + description: Token assigned to the shared dashboard. + example: abc-123-token + type: string + url: + description: URL for the shared dashboard. + example: https://p.datadoghq.com/sb/abc-123-token + type: string + viewing_preferences: + $ref: "#/components/schemas/SharedDashboardViewingPreferences" + required: + - token + - title + - url + - viewing_preferences + - global_time_selectable + - global_time + - selectable_template_vars + - created_at + - last_accessed + - status + - share_type + - invitees + - embeddable_domains + - expiration + - sharer_disabled + type: object + SharedDashboardSelectableTemplateVariable: + description: A template variable that viewers can modify on the shared dashboard. + properties: + allow_any_value: + description: Whether viewers can see all tag values for the template variable and specify any value. + example: false + type: boolean + default_values: + description: Default selected values for the variable. + example: ["prod"] + items: + description: A default value for the template variable. + type: string + type: array + name: + description: Name of the template variable. + example: environment + type: string + prefix: + description: Tag prefix for the variable. + example: env + type: string + type: + description: Type of the template variable. + example: group + type: string + visible_tags: + description: Restricts which tag values are visible to the viewer. + example: ["prod"] + items: + description: A visible tag value for the template variable. + type: string + type: array + required: + - name + - prefix + - type + - allow_any_value + - default_values + - visible_tags + type: object + SharedDashboardShareType: + description: Type of dashboard sharing. + enum: + - open + - invite + - embed + - secure-embed + example: invite + type: string + x-enum-varnames: + - OPEN + - INVITE + - EMBED + - SECURE_EMBED + SharedDashboardStatus: + description: Status of the shared dashboard. + enum: + - active + - paused + example: active + type: string + x-enum-varnames: + - ACTIVE + - PAUSED + SharedDashboardType: + default: shared_dashboard + description: Shared dashboard resource type. + enum: + - shared_dashboard + example: shared_dashboard + type: string + x-enum-varnames: + - SHARED_DASHBOARD + SharedDashboardViewingPreferences: + description: Display settings for the shared dashboard. + properties: + high_density: + description: Whether widgets are displayed in high-density mode. + example: false + type: boolean + theme: + $ref: "#/components/schemas/SharedDashboardViewingPreferencesTheme" + required: + - high_density + - theme + type: object + SharedDashboardViewingPreferencesTheme: + description: The theme of the shared dashboard view. `system` follows the viewer's system default. + enum: + - system + - light + - dark + example: system + type: string + x-enum-varnames: + - SYSTEM + - LIGHT + - DARK Shift: description: An on-call shift with its associated data and relationships. example: @@ -83893,6 +90238,14 @@ components: type: string x-enum-varnames: - AGGREGATED_DNS + SingleEntityContextResponse: + description: Response from the single entity context endpoint, containing the matching entity. + properties: + data: + $ref: "#/components/schemas/EntityContextEntity" + required: + - data + type: object SlackIntegrationMetadata: description: Incident integration metadata for the Slack integration. properties: @@ -83940,6 +90293,37 @@ components: required: - slackTrigger type: object + SlackUserBindingData: + description: Slack team ID data from a response. + properties: + id: + description: The Slack team ID. + example: "T01234567" + type: string + type: + $ref: "#/components/schemas/SlackUserBindingType" + type: object + SlackUserBindingType: + default: team_id + description: Slack user binding resource type. + enum: + - team_id + example: team_id + type: string + x-enum-varnames: + - TEAM_ID + SlackUserBindingsResponse: + description: Response with a list of Slack user bindings. + properties: + data: + description: An array of Slack user bindings. + example: [{"id": "T01234567", "type": "team_id"}, {"id": "T09876543", "type": "team_id"}] + items: + $ref: "#/components/schemas/SlackUserBindingData" + type: array + required: + - data + type: object SloDataSource: default: slo description: A data source for SLO queries. @@ -84377,6 +90761,180 @@ components: x-enum-varnames: - DESC - ASC + SourcemapDataType: + description: The resource type for source map objects. + enum: + - sourcemaps + example: sourcemaps + type: string + x-enum-varnames: + - SOURCEMAPS + SourcemapFileAttributes: + description: Attributes of a JavaScript source map file. + properties: + file: + description: The name of the minified JavaScript file. + example: bundle.js + type: string + mappings: + description: |- + The Base64 VLQ encoded string that maps positions in the minified + file to positions in the original source files. + example: AAAA,OAAO,CAAC,GAAG + type: string + minifiedLineLengths: + description: List of character counts for each line in the minified file. + example: + - 50 + - 30 + items: + format: int64 + type: integer + type: array + names: + description: List of symbol names referenced in the mappings. + example: + - console + - log + items: {} + type: array + sourceRoot: + description: The root path prepended to source file paths. + example: / + type: string + sources: + description: List of original source file paths. + example: + - src/index.js + - src/utils.js + items: + type: string + type: array + sourcesContent: + description: List of original source file contents corresponding to the paths in `sources`. + example: + - "console.log('index');" + - "export function util() {}" + items: + type: string + type: array + version: + description: The version of the source map format (typically 3). + example: 3 + format: int64 + type: integer + required: + - file + - version + - sourceRoot + - sources + - sourcesContent + - names + - mappings + - minifiedLineLengths + type: object + SourcemapFileData: + description: JavaScript source map file data object. + properties: + attributes: + $ref: "#/components/schemas/SourcemapFileAttributes" + id: + description: The unique identifier of the source map file, typically the path to the file. + example: path/to/sourcemap.js.map + type: string + type: + $ref: "#/components/schemas/SourcemapFileDataType" + required: + - id + - type + - attributes + type: object + SourcemapFileDataType: + description: The resource type for source map file objects. + enum: + - sourcemap_files + example: sourcemap_files + type: string + x-enum-varnames: + - SOURCEMAP_FILES + SourcemapFileResponse: + description: Response containing a JavaScript source map file. + properties: + data: + $ref: "#/components/schemas/SourcemapFileData" + required: + - data + type: object + SourcemapItem: + description: A source map data object representing one of the supported map kinds. + oneOf: + - $ref: "#/components/schemas/JSSourcemapData" + - $ref: "#/components/schemas/ReactNativeSourcemapData" + - $ref: "#/components/schemas/IOSSourcemapData" + - $ref: "#/components/schemas/JVMSourcemapData" + - $ref: "#/components/schemas/FlutterSourcemapData" + - $ref: "#/components/schemas/ELFSourcemapData" + - $ref: "#/components/schemas/NDKSourcemapData" + - $ref: "#/components/schemas/IL2CPPSourcemapData" + SourcemapMapKind: + description: The type of source map. + enum: + - js + - jvm + - ios + - react + - flutter + - elf + - ndk + - il2cpp + example: js + type: string + x-enum-varnames: + - JS + - JVM + - IOS + - REACT + - FLUTTER + - ELF + - NDK + - IL2CPP + SourcemapsData: + description: List of source map data objects. + items: + $ref: "#/components/schemas/SourcemapItem" + type: array + SourcemapsListMeta: + description: Pagination metadata for the source maps list response. + properties: + page: + $ref: "#/components/schemas/SourcemapsListMetaPage" + required: + - page + type: object + SourcemapsListMetaPage: + description: Page information for the source maps list response. + properties: + has_more_results: + description: Whether there are more results available beyond the current page. + example: false + type: boolean + total_filtered_count: + description: Total number of source maps matching the filter criteria. + example: 100 + format: int64 + type: integer + required: + - total_filtered_count + - has_more_results + type: object + SourcemapsResponse: + description: Response containing a list of affected source maps. + properties: + data: + $ref: "#/components/schemas/SourcemapsData" + required: + - data + type: object Span: description: Object description of a spans after being processed and stored by Datadog. properties: @@ -86462,6 +93020,89 @@ components: required: - data type: object + StegadographyGetWidgetsRequest: + description: Multipart form data containing the PNG image to scan for watermarks. + properties: + image: + description: PNG image file to scan for embedded watermarks. + example: "screenshot.png" + format: binary + type: string + required: + - image + type: object + StegadographyGetWidgetsResponse: + description: Response containing watermarked widgets recovered from an image. + properties: + data: + $ref: "#/components/schemas/StegadographyWidgetItems" + required: + - data + type: object + StegadographyWidget: + description: A single watermarked widget resource recovered from an image. + properties: + attributes: + $ref: "#/components/schemas/StegadographyWidgetAttributes" + id: + description: Composite identifier formed from the organization ID and watermark, separated by a colon. + example: "abc123:0123456789abcdef" + type: string + type: + $ref: "#/components/schemas/StegadographyWidgetType" + required: + - id + - type + - attributes + type: object + StegadographyWidgetAttributes: + description: Attributes of a watermarked widget recovered from an image. + properties: + locationx: + description: Horizontal pixel coordinate where the watermark was found in the image. + example: 100 + format: int64 + type: integer + locationy: + description: Vertical pixel coordinate where the watermark was found in the image. + example: 200 + format: int64 + type: integer + rawData: + description: JSON-encoded string representing the widget state. + example: '{"widgetType":"timeseries","requests":[]}' + type: string + watermark: + description: Hex-encoded watermark string identifying the widget. + example: "0123456789abcdef" + type: string + required: + - rawData + - watermark + - locationx + - locationy + type: object + StegadographyWidgetItems: + description: List of watermarked widget resources recovered from an image. + example: + - attributes: + locationx: 100 + locationy: 200 + rawData: '{"widgetType":"timeseries","requests":[]}' + watermark: "0123456789abcdef" + id: "abc123:0123456789abcdef" + type: widget + items: + $ref: "#/components/schemas/StegadographyWidget" + type: array + StegadographyWidgetType: + description: Stegadography widget resource type. + enum: + - widget + example: widget + type: string + x-enum-varnames: + - WIDGET Step: description: A Step is a sub-component of a workflow. Each Step performs an action. properties: @@ -91013,6 +97654,822 @@ components: type: string x-enum-varnames: - TAG + TagIndexingRuleAttributes: + description: Attributes of a tag indexing rule. + properties: + created_at: + description: Timestamp when the rule was created. + example: "2024-01-15T12:00:00.000Z" + format: date-time + readOnly: true + type: string + created_by_handle: + description: Handle of the user who created the rule. + example: user@datadoghq.com + readOnly: true + type: string + exclude_tags_mode: + description: >- + When true, the rule excludes the listed tags and indexes all others. When false (default), the rule includes only the listed tags. + example: false + type: boolean + ignored_metric_name_matches: + description: Metric name prefixes excluded from the rule's scope. + example: + - "dd.test.excluded.*" + items: + type: string + type: array + metric_name_matches: + description: Metric name prefixes (glob patterns) this rule applies to. + example: + - "dd.test.*" + items: + type: string + type: array + modified_at: + description: Timestamp when the rule was last modified. + example: "2024-01-15T12:00:00.000Z" + format: date-time + readOnly: true + type: string + modified_by_handle: + description: Handle of the user who last modified the rule. + example: user@datadoghq.com + readOnly: true + type: string + name: + description: Human-readable name for the rule. + example: my-indexing-rule + type: string + options: + $ref: "#/components/schemas/TagIndexingRuleOptions" + rule_order: + description: >- + Evaluation order within the org. Lower values are evaluated first. Assigned server-side on create (max+1); pass on update to change the rule's position. + example: 1 + format: int64 + readOnly: true + type: integer + tags: + description: Tag keys managed by this rule. + example: + - env + - service + items: + type: string + type: array + type: object + TagIndexingRuleCreateAttributes: + description: Attributes for creating a tag indexing rule. + properties: + exclude_tags_mode: + description: >- + When true, the rule excludes the listed tags and indexes all others. When false (default), the rule includes only the listed tags. + example: false + type: boolean + ignored_metric_name_matches: + description: Metric name prefixes excluded from the rule's scope. + items: + type: string + type: array + metric_name_matches: + description: Metric name prefixes (glob patterns) this rule applies to. + example: + - "dd.test.*" + items: + type: string + type: array + name: + description: Human-readable name for the rule. + example: my-indexing-rule + type: string + options: + $ref: "#/components/schemas/TagIndexingRuleOptions" + tags: + description: Tag keys managed by this rule. + example: + - env + - service + items: + type: string + type: array + required: + - name + - metric_name_matches + type: object + TagIndexingRuleCreateData: + description: Data object for creating a tag indexing rule. + properties: + attributes: + $ref: "#/components/schemas/TagIndexingRuleCreateAttributes" + type: + $ref: "#/components/schemas/TagIndexingRuleType" + required: + - type + - attributes + type: object + TagIndexingRuleCreateRequest: + description: Request body for creating a tag indexing rule. + properties: + data: + $ref: "#/components/schemas/TagIndexingRuleCreateData" + required: + - data + type: object + TagIndexingRuleData: + description: A tag indexing rule resource object. + properties: + attributes: + $ref: "#/components/schemas/TagIndexingRuleAttributes" + id: + description: The unique identifier (UUID) of the tag indexing rule. + example: "00000000-0000-0000-0000-000000000001" + type: string + type: + $ref: "#/components/schemas/TagIndexingRuleType" + type: object + TagIndexingRuleDynamicTags: + description: Configuration for including dynamically queried tags. + properties: + queried_tags_window_seconds: + description: Window in seconds for evaluating queried tags. + example: 3600 + format: int64 + type: integer + related_asset_tags: + description: When true, tags from related assets are included. + example: false + type: boolean + type: object + TagIndexingRuleExemptionAttributes: + description: Attributes of a tag indexing rule exemption. + properties: + created_at: + description: Timestamp when the exemption was created. + example: "2024-01-15T12:00:00.000Z" + format: date-time + readOnly: true + type: string + created_by_handle: + description: Handle of the user who created the exemption. + example: user@datadoghq.com + readOnly: true + type: string + kind: + description: >- + Discriminates between an explicit exemption (`exemption`) and a pre-existing legacy tag configuration acting as an implicit exclusion (`legacy_tag_configuration`). + example: exemption + type: string + reason: + description: The reason the metric is exempt from tag indexing rules. + example: This metric has a pre-existing tag configuration. + type: string + type: object + TagIndexingRuleExemptionCreateAttributes: + description: Attributes for creating a tag indexing rule exemption. + properties: + reason: + description: The reason the metric is exempt from tag indexing rules. + example: This metric has a pre-existing tag configuration. + type: string + required: + - reason + type: object + TagIndexingRuleExemptionCreateData: + description: Data object for creating a tag indexing rule exemption. + properties: + attributes: + $ref: "#/components/schemas/TagIndexingRuleExemptionCreateAttributes" + type: + $ref: "#/components/schemas/TagIndexingRuleExemptionType" + required: + - type + - attributes + type: object + TagIndexingRuleExemptionCreateRequest: + description: Request body for creating a tag indexing rule exemption. + properties: + data: + $ref: "#/components/schemas/TagIndexingRuleExemptionCreateData" + required: + - data + type: object + TagIndexingRuleExemptionData: + description: A tag indexing rule exemption resource object. + properties: + attributes: + $ref: "#/components/schemas/TagIndexingRuleExemptionAttributes" + id: + description: The metric name, used as the resource ID. + example: dd.test.metric + type: string + type: + $ref: "#/components/schemas/TagIndexingRuleExemptionType" + type: object + TagIndexingRuleExemptionResponse: + description: Response containing a tag indexing rule exemption. + properties: + data: + $ref: "#/components/schemas/TagIndexingRuleExemptionData" + readOnly: true + type: object + TagIndexingRuleExemptionType: + default: tag_indexing_rule_exemptions + description: The tag indexing rule exemption resource type. + enum: + - tag_indexing_rule_exemptions + example: tag_indexing_rule_exemptions + type: string + x-enum-varnames: + - TAG_INDEXING_RULE_EXEMPTIONS + TagIndexingRuleMetricMatch: + description: Criteria for matching metrics based on query state. + properties: + is_queried: + description: Match metrics that are being queried. + type: boolean + not_queried: + description: Match metrics that are not being queried. + type: boolean + not_used_in_assets: + description: Match metrics not used in any dashboards or monitors. + type: boolean + queried_window_seconds: + description: Window in seconds for evaluating query state. + example: 3600 + format: int64 + type: integer + used_in_assets: + description: Match metrics used in dashboards or monitors. + type: boolean + type: object + TagIndexingRuleOptions: + description: Versioned configuration options for a tag indexing rule. + properties: + data: + $ref: "#/components/schemas/TagIndexingRuleOptionsData" + version: + description: Options schema version. Only `1` is supported. + example: 1 + format: int64 + type: integer + type: object + TagIndexingRuleOptionsData: + description: Data payload for tag indexing rule options. + properties: + dynamic_tags: + $ref: "#/components/schemas/TagIndexingRuleDynamicTags" + manage_preexisting_metrics: + description: >- + When true, the rule applies to metrics that were ingested before the rule was created. + example: true + type: boolean + metric_match: + $ref: "#/components/schemas/TagIndexingRuleMetricMatch" + override_previous_rules: + description: >- + When true, this rule's tag list overrides tags configured by earlier rules for the same metric. When false (default), tags from all matching rules are combined. + example: false + type: boolean + type: object + TagIndexingRuleOrderAttributes: + description: Attributes for the reorder operation. + properties: + rule_ids: + description: >- + Ordered list of tag indexing rule UUIDs. The server assigns rule_order 1, 2, … matching position in this list. + example: + - "00000000-0000-0000-0000-000000000001" + - "00000000-0000-0000-0000-000000000002" + items: + type: string + type: array + type: object + TagIndexingRuleOrderData: + description: Data object for the reorder operation. + properties: + attributes: + $ref: "#/components/schemas/TagIndexingRuleOrderAttributes" + type: + $ref: "#/components/schemas/TagIndexingRuleType" + required: + - type + - attributes + type: object + TagIndexingRuleOrderRequest: + description: Request body for reordering tag indexing rules. + properties: + data: + $ref: "#/components/schemas/TagIndexingRuleOrderData" + required: + - data + type: object + TagIndexingRuleResponse: + description: Response containing a single tag indexing rule. + properties: + data: + $ref: "#/components/schemas/TagIndexingRuleData" + readOnly: true + type: object + TagIndexingRuleType: + default: tag_indexing_rules + description: The tag indexing rule resource type. + enum: + - tag_indexing_rules + example: tag_indexing_rules + type: string + x-enum-varnames: + - TAG_INDEXING_RULES + TagIndexingRuleUpdateAttributes: + description: Attributes for updating a tag indexing rule. All fields are optional; omitted fields are unchanged. + properties: + exclude_tags_mode: + description: >- + When true, the rule excludes the listed tags and indexes all others. + type: boolean + ignored_metric_name_matches: + description: Metric name prefixes excluded from the rule's scope. + items: + type: string + type: array + metric_name_matches: + description: Metric name prefixes (glob patterns) this rule applies to. + example: + - "dd.test.*" + items: + type: string + type: array + name: + description: Human-readable name for the rule. + example: my-indexing-rule + type: string + options: + $ref: "#/components/schemas/TagIndexingRuleOptions" + rule_order: + description: >- + Desired evaluation order. Returns 409 if the value conflicts with another rule; use POST /api/v2/metrics/tag-indexing-rules/order for atomic re-sequencing. + example: 2 + format: int64 + type: integer + tags: + description: Tag keys managed by this rule. + example: + - env + - service + items: + type: string + type: array + type: object + TagIndexingRuleUpdateData: + description: Data object for updating a tag indexing rule. + properties: + attributes: + $ref: "#/components/schemas/TagIndexingRuleUpdateAttributes" + type: + $ref: "#/components/schemas/TagIndexingRuleType" + required: + - type + type: object + TagIndexingRuleUpdateRequest: + description: Request body for updating a tag indexing rule. + properties: + data: + $ref: "#/components/schemas/TagIndexingRuleUpdateData" + required: + - data + type: object + TagIndexingRulesResponse: + description: Response containing a page of tag indexing rules. + properties: + data: + description: Array of tag indexing rule objects. + items: + $ref: "#/components/schemas/TagIndexingRuleData" + type: array + links: + $ref: "#/components/schemas/MetricsListResponseLinks" + meta: + $ref: "#/components/schemas/TagIndexingRulesResponseMeta" + readOnly: true + type: object + TagIndexingRulesResponseMeta: + description: Pagination metadata for a list of tag indexing rules. + properties: + total: + description: Total number of tag indexing rules in the org. + example: 5 + format: int64 + type: integer + type: object + TagPoliciesListResponse: + description: A page of tag policies. + properties: + data: + $ref: "#/components/schemas/TagPolicyDataArray" + included: + $ref: "#/components/schemas/TagPolicyIncludedResources" + required: + - data + type: object + TagPolicyAttributes: + description: The attributes of a tag policy resource. + properties: + created_at: + description: The RFC 3339 timestamp at which the policy was created. + example: "2026-05-21T22:11:06.108696Z" + format: date-time + type: string + created_by: + description: The identifier of the user who created the policy. + example: "test-user" + type: string + deleted_at: + description: The RFC 3339 timestamp at which the policy was soft-deleted. `null` if the policy has not been deleted. Only present when `include_deleted=true` is requested. + format: date-time + nullable: true + type: string + deleted_by: + description: The identifier of the user who soft-deleted the policy. `null` if the policy has not been deleted. + nullable: true + type: string + enabled: + description: Whether the policy is currently enforced. + example: true + type: boolean + modified_at: + description: The RFC 3339 timestamp at which the policy was last modified. + example: "2026-05-21T22:11:06.108696Z" + format: date-time + type: string + modified_by: + description: The identifier of the user who last modified the policy. + example: "test-user" + type: string + negated: + description: When `true`, the policy matches tag values that do NOT match any of the supplied patterns. + example: false + type: boolean + policy_name: + description: Human-readable name for the tag policy. + example: "Service tag must be one of api or web" + type: string + policy_type: + $ref: "#/components/schemas/TagPolicyType" + required: + description: When `true`, telemetry without this tag is treated as a violation. + example: true + type: boolean + scope: + description: The scope the policy applies within. + example: "env" + type: string + source: + $ref: "#/components/schemas/TagPolicySource" + tag_key: + description: The tag key that the policy governs. + example: "service" + type: string + tag_value_patterns: + description: The patterns that valid values for the tag key must match. + example: + - "api" + - "web" + items: + description: A pattern that valid tag values must match. + type: string + type: array + version: + description: A monotonically increasing version counter that is incremented on each update. + example: 1 + format: int64 + type: integer + required: + - policy_name + - source + - scope + - tag_key + - tag_value_patterns + - negated + - required + - enabled + - policy_type + - version + - created_at + - created_by + - modified_at + - modified_by + type: object + TagPolicyCreateAttributes: + description: Attributes that can be supplied when creating a tag policy. + properties: + enabled: + description: Whether the policy is currently enforced. Defaults to `true` for newly created policies. + example: true + type: boolean + negated: + description: When `true`, the policy matches tag values that do NOT match any of the supplied patterns. Defaults to `false`. + example: false + type: boolean + policy_name: + description: Human-readable name for the tag policy. + example: "Service tag must be one of api or web" + type: string + policy_type: + $ref: "#/components/schemas/TagPolicyCreateType" + required: + description: When `true`, telemetry without this tag is treated as a violation. Defaults to `false`. + example: true + type: boolean + scope: + description: |- + The scope the policy applies within. Typically an environment, team, or + organization-level identifier used to limit where the policy is enforced. + example: "env" + type: string + source: + $ref: "#/components/schemas/TagPolicySource" + tag_key: + description: The tag key that the policy governs (for example, `service`). + example: "service" + type: string + tag_value_patterns: + description: |- + One or more patterns that valid values for the tag key must match. At least one + pattern is required. + example: + - "api" + - "web" + items: + description: A pattern that valid tag values must match. + type: string + minItems: 1 + type: array + required: + - policy_name + - source + - scope + - tag_key + - tag_value_patterns + - policy_type + type: object + TagPolicyCreateData: + description: Data object for creating a tag policy. + properties: + attributes: + $ref: "#/components/schemas/TagPolicyCreateAttributes" + type: + $ref: "#/components/schemas/TagPolicyResourceType" + required: + - type + - attributes + type: object + TagPolicyCreateRequest: + description: Payload for creating a new tag policy. + properties: + data: + $ref: "#/components/schemas/TagPolicyCreateData" + required: + - data + type: object + TagPolicyCreateType: + description: |- + The policy type allowed when creating a tag policy. Only `surfacing` is accepted at + creation time. + enum: + - surfacing + example: "surfacing" + type: string + x-enum-varnames: + - SURFACING + TagPolicyData: + description: A tag policy resource. + properties: + attributes: + $ref: "#/components/schemas/TagPolicyAttributes" + id: + description: The unique identifier of the tag policy. + example: "123" + type: string + relationships: + $ref: "#/components/schemas/TagPolicyRelationships" + type: + $ref: "#/components/schemas/TagPolicyResourceType" + required: + - type + - id + - attributes + type: object + TagPolicyDataArray: + description: An array of tag policy data objects. + items: + $ref: "#/components/schemas/TagPolicyData" + type: array + TagPolicyInclude: + description: A related resource to include alongside a tag policy in the response. Currently the only supported value is `score`. + enum: + - score + example: "score" + type: string + x-enum-varnames: + - SCORE + TagPolicyIncludedResources: + description: Related resources fetched alongside the primary tag policies. Populated when an `include` query parameter is supplied. + items: + $ref: "#/components/schemas/TagPolicyScoreData" + type: array + TagPolicyRelationships: + description: Related resources for a tag policy. Only present when the corresponding `include` query parameter is supplied. + properties: + score: + $ref: "#/components/schemas/TagPolicyScoreRelationship" + type: object + TagPolicyResourceType: + description: JSON:API resource type for a tag policy. + enum: + - tag_policy + example: "tag_policy" + type: string + x-enum-varnames: + - TAG_POLICY + TagPolicyResponse: + description: A single tag policy. + properties: + data: + $ref: "#/components/schemas/TagPolicyData" + included: + $ref: "#/components/schemas/TagPolicyIncludedResources" + required: + - data + type: object + TagPolicyScoreAttributes: + description: Attributes of a tag policy compliance score. + properties: + score: + description: |- + The compliance score for the policy over the requested time window, as a percentage + between 0 and 100. `null` indicates that no relevant telemetry was found. + example: 80 + format: double + nullable: true + type: number + ts_end: + description: End of the time window the score was computed over, as a Unix timestamp in milliseconds. + example: 1779401466097 + format: int64 + type: integer + ts_start: + description: Start of the time window the score was computed over, as a Unix timestamp in milliseconds. + example: 1779315066097 + format: int64 + type: integer + version: + description: The version of the tag policy that the score was computed against. + example: 1 + format: int64 + type: integer + required: + - score + - ts_start + - ts_end + - version + type: object + TagPolicyScoreData: + description: A compliance score resource for a tag policy. + properties: + attributes: + $ref: "#/components/schemas/TagPolicyScoreAttributes" + id: + description: The unique identifier of the compliance score resource. + example: "123-v1-1779315066097-1779401466097" + type: string + type: + $ref: "#/components/schemas/TagPolicyScoreResourceType" + required: + - type + - id + - attributes + type: object + TagPolicyScoreRelationship: + description: A relationship to the compliance score resource for this policy. + properties: + data: + $ref: "#/components/schemas/TagPolicyScoreRelationshipData" + required: + - data + type: object + TagPolicyScoreRelationshipData: + description: Identifier of the related compliance score resource. + properties: + id: + description: The unique identifier of the related compliance score resource. + example: "123-v1-1779315066097-1779401466097" + type: string + type: + $ref: "#/components/schemas/TagPolicyScoreResourceType" + required: + - type + - id + type: object + TagPolicyScoreResourceType: + description: JSON:API resource type for a tag policy compliance score. + enum: + - tag_policy_score + example: "tag_policy_score" + type: string + x-enum-varnames: + - TAG_POLICY_SCORE + TagPolicyScoreResponse: + description: A tag policy compliance score. + properties: + data: + $ref: "#/components/schemas/TagPolicyScoreData" + required: + - data + type: object + TagPolicySource: + description: The telemetry source that a tag policy applies to. + enum: + - logs + - spans + - metrics + - rum + - feed + example: "logs" + type: string + x-enum-varnames: + - LOGS + - SPANS + - METRICS + - RUM + - FEED + TagPolicyType: + description: |- + How the policy is enforced. `blocking` rejects telemetry that violates the policy. + `surfacing` only highlights non-compliant telemetry without blocking it. + enum: + - blocking + - surfacing + example: "surfacing" + type: string + x-enum-varnames: + - BLOCKING + - SURFACING + TagPolicyUpdateAttributes: + description: |- + Mutable attributes of a tag policy. Each field is optional; omitting a field leaves its + current value unchanged. The `source` of a policy cannot be changed. + properties: + enabled: + description: Whether the policy is currently enforced. + type: boolean + negated: + description: When `true`, the policy matches tag values that do NOT match any of the supplied patterns. + type: boolean + policy_name: + description: Human-readable name for the tag policy. + type: string + policy_type: + $ref: "#/components/schemas/TagPolicyType" + required: + description: When `true`, telemetry without this tag is treated as a violation. + type: boolean + scope: + description: The scope the policy applies within. + type: string + tag_key: + description: The tag key that the policy governs. + type: string + tag_value_patterns: + description: One or more patterns that valid values for the tag key must match. + items: + description: A pattern that valid tag values must match. + type: string + type: array + type: object + TagPolicyUpdateData: + description: Data object for updating a tag policy. + properties: + attributes: + $ref: "#/components/schemas/TagPolicyUpdateAttributes" + id: + description: The unique identifier of the tag policy being updated. + example: "123" + type: string + type: + $ref: "#/components/schemas/TagPolicyResourceType" + required: + - type + - id + type: object + TagPolicyUpdateRequest: + description: Payload for updating an existing tag policy. Only the supplied fields are modified. + properties: + data: + $ref: "#/components/schemas/TagPolicyUpdateData" + required: + - data + type: object TagsEventAttribute: description: Array of tags associated with your event. example: ["team:A"] @@ -95176,6 +102633,38 @@ components: - id - success type: object + UpdateFormData: + description: The data for updating a form. + properties: + attributes: + $ref: "#/components/schemas/UpdateFormDataAttributes" + id: + description: The ID of the form. + example: 22f6006a-2302-4926-9396-d2dfcf7b0b34 + format: uuid + type: string + type: + $ref: "#/components/schemas/FormType" + required: + - type + - attributes + type: object + UpdateFormDataAttributes: + description: The attributes for updating a form. + properties: + form_update: + $ref: "#/components/schemas/FormUpdateAttributes" + required: + - form_update + type: object + UpdateFormRequest: + description: A request to update a form. + properties: + data: + $ref: "#/components/schemas/UpdateFormData" + required: + - data + type: object UpdateOnCallNotificationRuleRequest: description: A top-level wrapper for updating a notification rule for a user example: @@ -95888,6 +103377,49 @@ components: - key - type type: object + UpsertAndPublishFormVersionData: + description: The data for upserting and publishing a form version. + properties: + attributes: + $ref: "#/components/schemas/UpsertAndPublishFormVersionDataAttributes" + type: + $ref: "#/components/schemas/FormVersionType" + required: + - type + - attributes + type: object + UpsertAndPublishFormVersionDataAttributes: + description: The attributes for upserting and publishing a form version. + properties: + data_definition: + $ref: "#/components/schemas/FormDataDefinition" + ui_definition: + $ref: "#/components/schemas/FormUiDefinition" + upsert_params: + $ref: "#/components/schemas/UpsertAndPublishFormVersionUpsertParams" + required: + - data_definition + - ui_definition + - upsert_params + type: object + UpsertAndPublishFormVersionRequest: + description: A request to upsert and publish a form version in a single transaction. + properties: + data: + $ref: "#/components/schemas/UpsertAndPublishFormVersionData" + required: + - data + type: object + UpsertAndPublishFormVersionUpsertParams: + description: Concurrency control parameters for the upsert and publish operation. + properties: + etag: + description: The ETag of the latest version used for optimistic concurrency control. + example: b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d + type: string + required: + - etag + type: object UpsertCatalogEntityRequest: description: Create or update entity request. oneOf: @@ -95958,6 +103490,59 @@ components: - id - attributes type: object + UpsertFormVersionData: + description: The data for creating or updating a form version. + properties: + attributes: + $ref: "#/components/schemas/UpsertFormVersionDataAttributes" + type: + $ref: "#/components/schemas/FormVersionType" + required: + - type + - attributes + type: object + UpsertFormVersionDataAttributes: + description: The attributes for creating or updating a form version. + properties: + data_definition: + $ref: "#/components/schemas/FormDataDefinition" + state: + $ref: "#/components/schemas/FormVersionState" + ui_definition: + $ref: "#/components/schemas/FormUiDefinition" + upsert_params: + $ref: "#/components/schemas/UpsertFormVersionUpsertParams" + required: + - state + - data_definition + - ui_definition + - upsert_params + type: object + UpsertFormVersionRequest: + description: A request to create or update a form version. + properties: + data: + $ref: "#/components/schemas/UpsertFormVersionData" + required: + - data + type: object + UpsertFormVersionUpsertParams: + description: Concurrency control parameters for the form version upsert operation. + properties: + etag: + description: The ETag of the latest version. Required when `match_policy` is `if_etag_match`. + example: b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d + nullable: true + type: string + insert_only: + description: If true, only a new version may be inserted; updating the current draft is not allowed. + example: false + type: boolean + match_policy: + $ref: "#/components/schemas/LatestVersionMatchPolicy" + required: + - match_policy + type: object UpsertOAuthScopesRestrictionData: description: Data object of an upsert OAuth2 scopes restriction request. properties: @@ -96148,6 +103733,67 @@ components: $ref: "#/components/schemas/UsageDataObject" type: array type: object + UsageSummaryAvailableFieldsAttributes: + description: |- + The lists of field names returned by `GET /api/v1/usage/summary` at each + of its three response levels. Each list contains every key the data endpoint + emits—both typed fields declared in the OpenAPI spec and untyped keys + exposed through `additionalProperties`. + properties: + date_fields: + description: |- + Sorted list of every key returned inside each `UsageSummaryDate` + entry of `usage[]` (typed fields and `additionalProperties` keys + combined). + items: + type: string + type: array + date_org_fields: + description: |- + Sorted list of every key returned inside each `UsageSummaryDateOrg` + entry of `usage[].orgs[]` (typed fields and `additionalProperties` + keys combined). + items: + type: string + type: array + response_fields: + description: |- + Sorted list of every key returned as a direct property of + `UsageSummaryResponse` (typed fields and `additionalProperties` + keys combined). + items: + type: string + type: array + type: object + UsageSummaryAvailableFieldsBody: + description: Available-fields data. + properties: + attributes: + $ref: "#/components/schemas/UsageSummaryAvailableFieldsAttributes" + id: + description: The identifier for the discovery scope. Always `"all"`. + example: all + type: string + type: + $ref: "#/components/schemas/UsageSummaryAvailableFieldsType" + type: object + UsageSummaryAvailableFieldsResponse: + description: |- + Response listing every field name returned by `GET /api/v1/usage/summary` + at each of its three response levels. Includes both typed fields and untyped + `additionalProperties` keys. + properties: + data: + $ref: "#/components/schemas/UsageSummaryAvailableFieldsBody" + type: object + UsageSummaryAvailableFieldsType: + default: usage_summary_available_fields + description: Type of available-fields data. + enum: + - usage_summary_available_fields + type: string + x-enum-varnames: + - USAGE_SUMMARY_AVAILABLE_FIELDS UsageTimeSeriesObject: description: Usage timeseries data. properties: @@ -99138,165 +106784,6 @@ paths: x-unstable: |- This endpoint is in Preview and may introduce breaking changes. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/unstable/fleet/clusters: - get: - description: |- - Retrieve a paginated list of Kubernetes clusters in the fleet. - - This endpoint returns clusters with metadata including node counts, agent versions, - enabled products, and associated services. Use the `page_number` and `page_size` - query parameters to paginate through results. - operationId: ListFleetClusters - parameters: - - description: Page number for pagination (starts at 0). - in: query - name: page_number - required: false - schema: - default: 0 - format: int64 - minimum: 0 - type: integer - - description: Number of results per page (must be greater than 0 and less than or equal to 100). - in: query - name: page_size - required: false - schema: - default: 10 - format: int64 - maximum: 100 - minimum: 1 - type: integer - - description: Attribute to sort by. - in: query - name: sort_attribute - required: false - schema: - type: string - - description: Sort order (true for descending, false for ascending). - in: query - name: sort_descending - required: false - schema: - type: boolean - - description: Filter string for narrowing down cluster results. - example: "cluster_name:production" - in: query - name: filter - required: false - schema: - type: string - - description: Comma-separated list of tags to filter clusters. - in: query - name: tags - required: false - schema: - type: string - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - clusters: - - agent_versions: - - "7.50.0" - cluster_name: production-us-east-1 - enabled_products: - - apm - node_count: 25 - id: done - type: status - meta: - total_filtered_count: 1 - schema: - $ref: "#/components/schemas/FleetClustersResponse" - 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: [] - summary: List all fleet clusters - tags: - - Fleet Automation - "x-permission": - operator: AND - permissions: - - hosts_read - x-unstable: |- - This endpoint is in Preview and may introduce breaking changes. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/unstable/fleet/clusters/{cluster_name}/instrumented_pods: - get: - description: |- - Retrieve the list of pods targeted for Single Step Instrumentation (SSI) injection - in a specific Kubernetes cluster. - - This endpoint returns pod groups organized by owner reference (deployment, statefulset, etc.) - with their injection annotations and applied targets. Use the clusters list endpoint - to discover available cluster names. - operationId: ListFleetInstrumentedPods - parameters: - - description: The name of the Kubernetes cluster. - in: path - name: cluster_name - required: true - schema: - type: string - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - groups: - - kube_ownerref_kind: Deployment - kube_ownerref_name: inventory-service - namespace: default - pod_count: 3 - id: production-us-east-1 - type: cluster_name - schema: - $ref: "#/components/schemas/FleetInstrumentedPodsResponse" - 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: [] - summary: List instrumented pods for a cluster - tags: - - Fleet Automation - "x-permission": - operator: AND - permissions: - - hosts_read - x-unstable: |- - This endpoint is in Preview and may introduce breaking changes. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/unstable/fleet/deployments: get: description: |- @@ -100742,7 +108229,7 @@ paths: operator: OR permissions: - apps_datastore_manage - "/api/v2/actions-datastores/{datastore_id}": + /api/v2/actions-datastores/{datastore_id}: delete: description: Deletes a datastore by its unique identifier. operationId: DeleteDatastore @@ -100886,7 +108373,7 @@ paths: operator: OR permissions: - apps_datastore_manage - "/api/v2/actions-datastores/{datastore_id}/items": + /api/v2/actions-datastores/{datastore_id}/items: delete: description: Deletes an item from a datastore by its key. operationId: DeleteDatastoreItem @@ -101098,7 +108585,7 @@ paths: operator: OR permissions: - apps_datastore_write - "/api/v2/actions-datastores/{datastore_id}/items/bulk": + /api/v2/actions-datastores/{datastore_id}/items/bulk: delete: description: >- Deletes multiple items from a datastore by their keys in a single operation. @@ -104118,7 +111605,7 @@ paths: - apps_write - connections_resolve - workflows_run - "/api/v2/app-builder/apps/{app_id}": + /api/v2/app-builder/apps/{app_id}: delete: description: Delete a single app. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key). Alternatively, you can configure these permissions [in the UI](https://docs.datadoghq.com/account_management/api-app-keys/#actions-api-access). operationId: DeleteApp @@ -104320,7 +111807,7 @@ paths: - apps_write - connections_resolve - workflows_run - "/api/v2/app-builder/apps/{app_id}/deployment": + /api/v2/app-builder/apps/{app_id}/deployment: delete: description: Unpublish an app, removing the live version of the app. Unpublishing creates a new instance of a `deployment` object on the app, with a nil `app_version_id` (`00000000-0000-0000-0000-000000000000`). The app can still be updated and published again in the future. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key). Alternatively, you can configure these permissions [in the UI](https://docs.datadoghq.com/account_management/api-app-keys/#actions-api-access). operationId: UnpublishApp @@ -104429,7 +111916,7 @@ paths: operator: OR permissions: - apps_write - "/api/v2/app-builder/apps/{app_id}/favorite": + /api/v2/app-builder/apps/{app_id}/favorite: patch: description: Add or remove an app from the current user's favorites. Favorited apps can be filtered for using the `filter[favorite]` query parameter on the [List Apps](https://docs.datadoghq.com/api/latest/app-builder/#list-apps) endpoint. operationId: UpdateAppFavorite @@ -104485,7 +111972,7 @@ paths: operator: OR permissions: - apps_run - "/api/v2/app-builder/apps/{app_id}/protection-level": + /api/v2/app-builder/apps/{app_id}/protection-level: patch: description: Update the publication protection level of an app. When set to `approval_required`, future publishes must go through an approval workflow before going live. operationId: UpdateProtectionLevel @@ -104559,7 +112046,7 @@ paths: operator: OR permissions: - apps_write - "/api/v2/app-builder/apps/{app_id}/publish-request": + /api/v2/app-builder/apps/{app_id}/publish-request: post: description: Create a publish request to ask for approval to publish an app whose protection level is `approval_required`. Publishing happens automatically once the request is approved by a user with the appropriate permissions. operationId: CreatePublishRequest @@ -104632,7 +112119,7 @@ paths: operator: OR permissions: - apps_write - "/api/v2/app-builder/apps/{app_id}/revert": + /api/v2/app-builder/apps/{app_id}/revert: post: description: Revert an app to a previous version. The version to revert to is selected through the `version` query parameter. The reverted version becomes the new latest version of the app. operationId: RevertApp @@ -104700,7 +112187,7 @@ paths: operator: OR permissions: - apps_write - "/api/v2/app-builder/apps/{app_id}/self-service": + /api/v2/app-builder/apps/{app_id}/self-service: patch: description: Enable or disable self-service for an app. Self-service apps can be discovered and run by users in your organization without explicit access being granted. operationId: UpdateAppSelfService @@ -104756,7 +112243,7 @@ paths: operator: OR permissions: - apps_write - "/api/v2/app-builder/apps/{app_id}/tags": + /api/v2/app-builder/apps/{app_id}/tags: patch: description: Replace the tags on an app. The provided list overwrites the existing tags entirely; tags not present in the request body are removed. operationId: UpdateAppTags @@ -104814,7 +112301,7 @@ paths: operator: OR permissions: - apps_write - "/api/v2/app-builder/apps/{app_id}/version-name": + /api/v2/app-builder/apps/{app_id}/version-name: patch: description: Assign a human-readable name to a specific version of an app. The version is selected through the `version` query parameter. operationId: UpdateAppVersionName @@ -104877,7 +112364,7 @@ paths: operator: OR permissions: - apps_write - "/api/v2/app-builder/apps/{app_id}/versions": + /api/v2/app-builder/apps/{app_id}/versions: get: description: List the versions of an app. This endpoint is paginated. operationId: ListAppVersions @@ -104957,7 +112444,7 @@ paths: permissions: - apps_run - connections_read - "/api/v2/app-builder/blueprint/{blueprint_id}": + /api/v2/app-builder/blueprint/{blueprint_id}: get: description: Retrieve an app blueprint by its ID. operationId: GetBlueprint @@ -105070,7 +112557,7 @@ paths: - apps_write - connections_read - connections_write - "/api/v2/app-builder/blueprints/integration-id/{integration_id}": + /api/v2/app-builder/blueprints/integration-id/{integration_id}: get: description: List app blueprints associated with a specific integration ID. operationId: GetBlueprintsByIntegrationId @@ -105121,7 +112608,7 @@ paths: - apps_write - connections_read - connections_write - "/api/v2/app-builder/blueprints/slugs/{slugs}": + /api/v2/app-builder/blueprints/slugs/{slugs}: get: description: Retrieve app blueprints by their slugs. operationId: GetBlueprintsBySlugs @@ -105214,6 +112701,7 @@ paths: - $ref: "#/components/parameters/ApplicationKeyFilterParameter" - $ref: "#/components/parameters/ApplicationKeyFilterCreatedAtStartParameter" - $ref: "#/components/parameters/ApplicationKeyFilterCreatedAtEndParameter" + - $ref: "#/components/parameters/ApplicationKeyFilterOwnedByParameter" - $ref: "#/components/parameters/ApplicationKeyIncludeParameter" responses: "200": @@ -106329,6 +113817,7 @@ paths: name: limit required: false schema: + format: int64 type: integer responses: "200": @@ -109473,6 +116962,7 @@ paths: required: false schema: default: 100 + format: int64 type: integer - description: Zero-based page number for pagination. in: query @@ -109480,6 +116970,7 @@ paths: required: false schema: default: 0 + format: int64 type: integer - description: "If `true`, returns timeline cells in chronological order (oldest first). Defaults to `false` (newest first)." in: query @@ -112695,6 +120186,7 @@ paths: required: false schema: example: 200 + format: int64 type: integer - description: Pagination offset. Defaults to `0`. in: query @@ -112702,6 +120194,7 @@ paths: required: false schema: example: 0 + format: int64 type: integer - description: Optional repeated cloud or SaaS provider filters, such as `aws`, `gcp`, `azure`, `Oracle`, `datadog`, `OpenAI`, or `Anthropic`. explode: true @@ -116036,6 +123529,11 @@ paths: name: filter[provider] schema: type: string + - description: Filter results to tag keys that have data for a specific Cloud Cost Management metric (for example, `aws.cost.net.amortized`). When omitted, all tag keys for the requested period are returned. + in: query + name: filter[metric] + schema: + type: string responses: "200": content: @@ -116579,6 +124077,863 @@ paths: $ref: "#/components/responses/TooManyRequestsResponse" summary: Get all CSM Serverless Agents tags: ["CSM Agents"] + /api/v2/csm/ownership/{resource_id}: + get: + description: Get all current ownership inferences for a resource, one per owner type (`user`, `team`, `service`, `unknown`). + operationId: ListOwnershipInferences + parameters: + - description: The identifier of the resource to retrieve ownership inferences for. + in: path + name: resource_id + required: true + schema: + example: test-resource + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + items: + - checksum: abc123 + confidence: "0.9500" + created_at: "2026-01-15T10:00:00Z" + evidence_versions: + - pipeline_id: p1 + explanation: High confidence match + id: test-resource:team + owner_type: team + primary_contact_ref: ref:handle/team-a + sources: [] + status: suggested + updated_at: "2026-01-15T10:00:00Z" + id: test-resource + type: ownership_inferences + schema: + $ref: "#/components/schemas/OwnershipInferenceListResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List ownership inferences for a resource + tags: ["CSM Ownership"] + x-unstable: |- + **Note**: This endpoint is in Preview and may be subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/csm/ownership/{resource_id}/history: + get: + description: List inference history entries for a resource across all owner types, ordered from most recent to oldest. Uses cursor-based pagination. + operationId: ListOwnershipHistory + parameters: + - description: The identifier of the resource to retrieve inference history for. + in: path + name: resource_id + required: true + schema: + example: res-1 + type: string + - description: An opaque, base64-encoded cursor token returned by a previous call in `pagination.next_cursor`. Omit to fetch the first page. + in: query + name: cursor + required: false + schema: + example: eyJpZCI6OTh9 + type: string + - description: The maximum number of history entries to return per page. + in: query + name: limit + required: false + schema: + default: 25 + example: 25 + format: int32 + maximum: 100 + minimum: 1 + type: integer + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + items: + - checksum: "" + confidence: "0.9000" + created_at: "2026-01-15T10:00:00Z" + evidence_versions: + explanation: "" + failed_at: + failure_reason: + id: 100 + owner_type: team + primary_contact_ref: ref:handle/team-a + resource_id: res-1 + retry_schedule: + sources: [] + status: suggested + pagination: + has_more: false + next_cursor: + id: res-1 + type: ownership_history + schema: + $ref: "#/components/schemas/OwnershipHistoryResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List ownership inference history for a resource + tags: ["CSM Ownership"] + x-unstable: |- + **Note**: This endpoint is in Preview and may be subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/csm/ownership/{resource_id}/{owner_type}: + get: + description: |- + Get the current ownership inference for a resource for a specific owner type. + + This endpoint supports ETag-based caching. Pass the previously returned `ETag` value in the `If-None-Match` request header to receive a `304 Not Modified` response when the inference has not changed. + operationId: GetOwnershipInference + parameters: + - description: The identifier of the resource to retrieve the ownership inference for. + in: path + name: resource_id + required: true + schema: + example: test-resource + type: string + - description: The owner type of the inference to retrieve. + in: path + name: owner_type + required: true + schema: + $ref: "#/components/schemas/OwnershipOwnerType" + - description: A previously returned `ETag` value. When supplied and the resource has not changed, the endpoint returns `304 Not Modified`. + in: header + name: If-None-Match + required: false + schema: + example: '"abc123"' + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + checksum: abc123 + confidence: "0.9500" + created_at: "2026-01-15T10:00:00Z" + evidence_versions: + - pipeline_id: p1 + explanation: High confidence match + owner_type: team + primary_contact_ref: ref:handle/team-a + sources: [] + status: suggested + updated_at: "2026-01-15T10:00:00Z" + id: test-resource:team + type: ownership_inference + schema: + $ref: "#/components/schemas/OwnershipInferenceResponse" + description: OK + headers: + Cache-Control: + description: The cache control directives applied to the response. + schema: + example: private, max-age=60 + type: string + ETag: + description: A strong validator that identifies the current state of the inference. + schema: + example: '"abc123"' + type: string + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get an ownership inference by owner type + tags: ["CSM Ownership"] + x-unstable: |- + **Note**: This endpoint is in Preview and may be subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/csm/ownership/{resource_id}/{owner_type}/evidence: + get: + description: |- + Get the evidence versions backing the current ownership inference for a resource and owner type. + + This endpoint supports weak ETag caching. Pass the previously returned `ETag` value in the `If-None-Match` request header to receive a `304 Not Modified` response when the evidence has not changed. + operationId: GetOwnershipEvidence + parameters: + - description: The identifier of the resource to retrieve evidence for. + in: path + name: resource_id + required: true + schema: + example: test-resource + type: string + - description: The owner type of the inference to retrieve evidence for. + in: path + name: owner_type + required: true + schema: + $ref: "#/components/schemas/OwnershipOwnerType" + - description: A previously returned weak `ETag` value. When supplied and the evidence has not changed, the endpoint returns `304 Not Modified`. + in: header + name: If-None-Match + required: false + schema: + example: W/"f2e126916327bda8" + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + evidence_versions: + - pipeline_id: p1 + version: v3 + id: test-resource + type: ownership_evidence + schema: + $ref: "#/components/schemas/OwnershipEvidenceResponse" + description: OK + headers: + ETag: + description: A weak validator that identifies the current state of the evidence. + schema: + example: W/"f2e126916327bda8" + type: string + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get the evidence for an ownership inference + tags: ["CSM Ownership"] + x-unstable: |- + **Note**: This endpoint is in Preview and may be subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/csm/ownership/{resource_id}/{owner_type}/feedback: + post: + description: |- + Submit feedback on the current ownership inference for a resource and owner type. Valid actions are `confirm`, `reject`, `correct`, and `persist`. + + The request must include the current inference `checksum` in `inference_checksum`. If the checksum does not match the current inference state, the endpoint returns `409 Conflict`. + + When `action` is `correct`, `corrected_owner_handle` and `corrected_owner_type` are required. + operationId: CreateOwnershipFeedback + parameters: + - description: The identifier of the resource that the feedback applies to. + in: path + name: resource_id + required: true + schema: + example: res-1 + type: string + - description: The type of owner that the feedback applies to. + in: path + name: owner_type + required: true + schema: + $ref: "#/components/schemas/OwnershipOwnerType" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + action: confirm + actor_handle: user@example.com + actor_type: user + inference_checksum: abc123 + type: ownership_feedback + schema: + $ref: "#/components/schemas/OwnershipFeedbackRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + action: confirm + checksum: abc123 + new_status: suggested + owner_type: team + previous_status: suggested + primary_contact_ref: ref:handle/team-a + updated_at: "2026-01-15T10:00:00Z" + id: res-1 + type: ownership_feedback_result + schema: + $ref: "#/components/schemas/OwnershipFeedbackResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/OwnershipInferenceResponse" + description: Conflict + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Submit feedback on an ownership inference + tags: ["CSM Ownership"] + x-unstable: |- + **Note**: This endpoint is in Preview and may be subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/csm/ownership/{resource_id}/{owner_type}/history: + get: + description: List inference history entries for a resource filtered by owner type, ordered from most recent to oldest. Uses cursor-based pagination. + operationId: ListOwnershipHistoryByOwnerType + parameters: + - description: The identifier of the resource to retrieve inference history for. + in: path + name: resource_id + required: true + schema: + example: res-1 + type: string + - description: The owner type to filter history by. + in: path + name: owner_type + required: true + schema: + $ref: "#/components/schemas/OwnershipOwnerType" + - description: An opaque, base64-encoded cursor token returned by a previous call in `pagination.next_cursor`. Omit to fetch the first page. + in: query + name: cursor + required: false + schema: + example: eyJpZCI6OTh9 + type: string + - description: The maximum number of history entries to return per page. + in: query + name: limit + required: false + schema: + default: 25 + example: 25 + format: int32 + maximum: 100 + minimum: 1 + type: integer + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + items: + - checksum: "" + confidence: "0.9000" + created_at: "2026-01-15T10:00:00Z" + evidence_versions: + explanation: "" + failed_at: + failure_reason: + id: 100 + owner_type: team + primary_contact_ref: ref:handle/team-a + resource_id: res-1 + retry_schedule: + sources: [] + status: suggested + pagination: + has_more: false + next_cursor: + id: res-1 + type: ownership_history + schema: + $ref: "#/components/schemas/OwnershipHistoryResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List ownership history by owner type + tags: ["CSM Ownership"] + x-unstable: |- + **Note**: This endpoint is in Preview and may be subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/csm/settings/agentless_hosts: + get: + description: Get the list of agentless hosts for CSM, with optional pagination and filtering. + operationId: ListCSMAgentlessHosts + parameters: + - description: The page index for pagination (zero-based). + in: query + name: page + required: false + schema: + default: 0 + example: 0 + format: int32 + maximum: 1000000 + minimum: 0 + type: integer + - description: The number of agentless hosts to return per page. + in: query + name: size + required: false + schema: + default: 10 + example: 10 + format: int32 + maximum: 100 + minimum: 1 + type: integer + - description: A search query string to filter agentless hosts. + in: query + name: query + required: false + schema: + example: "cloud_provider:aws" + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + account_id: "123456789012" + cloud_provider: aws + has_posture_management: true + has_vulnerability_scanning: true + resource_type: aws_ec2_instance + id: i-0123456789abcdef0 + type: agentless_host + meta: + page_index: 0 + page_size: 10 + total_filtered: 1 + schema: + $ref: "#/components/schemas/CsmAgentlessHostsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List agentless hosts + tags: ["CSM Settings"] + x-unstable: |- + **Note**: This endpoint is in Preview and may be subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/csm/settings/agentless_hosts/facet_info: + get: + description: Get the value distribution for a specific agentless host facet, with optional search and filtering. + operationId: GetCSMAgentlessHostFacetInfo + parameters: + - description: The facet identifier to retrieve value distribution for. Valid values are `resource_name`, `account_id`, `resource_type`, `cloud_provider`, `has_vulnerability_scanning`, and `has_posture_management`. + in: query + name: facet + required: true + schema: + example: cloud_provider + type: string + - description: A search string to filter the facet values. + in: query + name: search + required: false + schema: + example: aws + type: string + - description: A filter query to scope the facet value counts. + in: query + name: query + required: false + schema: + example: "cloud_provider:aws" + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + items: + - count: 100 + value: aws + - count: 50 + value: gcp + id: cloud_provider + meta: + total_count: 2 + type: facet_info + schema: + $ref: "#/components/schemas/CsmHostFacetInfoResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get agentless host facet info + tags: ["CSM Settings"] + x-unstable: |- + **Note**: This endpoint is in Preview and may be subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/csm/settings/agentless_hosts/facets: + get: + description: Get the list of available facets for filtering agentless hosts. + operationId: ListCSMAgentlessHostFacets + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + bounded: true + bundled: true + bundledAndUsed: true + defaultValues: [] + description: The cloud provider of the resource. + editable: false + facetType: list + groups: + - agentless + name: Cloud Provider + path: cloud_provider + source: core + type: string + values: + - aws + - gcp + - azure + - oci + id: cloud_provider + type: agentless_host_facet + schema: + $ref: "#/components/schemas/CsmAgentlessHostFacetsResponse" + description: OK + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List agentless host facets + tags: ["CSM Settings"] + x-unstable: |- + **Note**: This endpoint is in Preview and may be subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/csm/settings/hosts: + get: + description: Get the list of unified hosts for CSM, combining agent and agentless host data, with optional pagination and filtering. + operationId: ListCSMUnifiedHosts + parameters: + - description: The page index for pagination (zero-based). + in: query + name: page + required: false + schema: + default: 0 + example: 0 + format: int32 + maximum: 1000000 + minimum: 0 + type: integer + - description: The number of hosts to return per page. + in: query + name: size + required: false + schema: + default: 10 + example: 10 + format: int32 + maximum: 100 + minimum: 1 + type: integer + - description: A search query string to filter unified hosts. + in: query + name: query + required: false + schema: + example: "source:agent" + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + agent_cws_enabled: false + agent_posture_management: true + agent_version: 7.50.0 + datadog_agent_key: key123 + os: linux + source: agent + id: agent-host + type: unified_host + - attributes: + account_id: "123456789012" + agentless_posture_management: true + agentless_vulnerability_scanning: true + cloud_provider: aws + resource_type: aws_ec2_instance + source: agentless + id: i-0123456789abcdef0 + type: unified_host + meta: + page_index: 0 + page_size: 10 + total_filtered: 2 + total_pages: 1 + schema: + $ref: "#/components/schemas/CsmUnifiedHostsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List unified hosts + tags: ["CSM Settings"] + x-unstable: |- + **Note**: This endpoint is in Preview and may be subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/csm/settings/hosts/facet_info: + get: + description: Get the value distribution for a specific unified host facet, with optional search and filtering. + operationId: GetCSMUnifiedHostFacetInfo + parameters: + - description: The facet identifier to retrieve value distribution for. Valid values include `resource_name`, `account_id`, `resource_type`, `cloud_provider`, `agentless_vulnerability_scanning`, `agentless_posture_management`, `hostname`, `agent_version`, `os`, `cluster_name`, `agent_posture_management`, `agent_cws_enabled`, `agent_csm_vm_hosts_enabled`, and `agent_csm_vm_containers_enabled`. + in: query + name: facet + required: true + schema: + example: cloud_provider + type: string + - description: A search string to filter the facet values. + in: query + name: search + required: false + schema: + example: aws + type: string + - description: A filter query to scope the facet value counts. + in: query + name: query + required: false + schema: + example: "cloud_provider:aws" + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + items: + - count: 100 + value: aws + - count: 50 + value: gcp + id: cloud_provider + meta: + total_count: 2 + type: facet_info + schema: + $ref: "#/components/schemas/CsmHostFacetInfoResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get unified host facet info + tags: ["CSM Settings"] + x-unstable: |- + **Note**: This endpoint is in Preview and may be subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/csm/settings/hosts/facets: + get: + description: Get the list of available facets for filtering unified hosts. + operationId: ListCSMUnifiedHostFacets + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + bounded: true + bundled: true + bundledAndUsed: true + defaultValues: [] + description: The cloud provider of the resource. + editable: false + facetType: list + groups: + - hosts + name: Cloud Provider + path: cloud_provider + source: core + type: string + values: + - aws + - gcp + - azure + - oci + id: cloud_provider + type: unified_host_facet + schema: + $ref: "#/components/schemas/CsmUnifiedHostFacetsResponse" + description: OK + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List unified host facets + tags: ["CSM Settings"] + x-unstable: |- + **Note**: This endpoint is in Preview and may be subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/current_user: get: description: |- @@ -117212,6 +125567,95 @@ paths: tags: - Dashboard Lists x-codegen-request-body-name: body + /api/v2/dashboard/{dashboard_id}/shared: + get: + description: Retrieve shared dashboards associated with the specified dashboard. + operationId: ListSharedDashboardsByDashboardId + parameters: + - $ref: "#/components/parameters/SharedDashboardDashboardIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + created_at: "2026-01-01T00:00:00.000Z" + embeddable_domains: [] + expiration: + global_time: + live_span: 1h + global_time_selectable: false + invitees: + - access_expiration: + created_at: "2026-01-01T00:00:00.000Z" + email: jane.doe@example.com + last_accessed: + selectable_template_vars: [] + share_type: invite + sharer_disabled: false + status: active + title: Q1 Metrics Dashboard + token: abc-123-token + url: https://p.datadoghq.com/sb/abc-123-token + viewing_preferences: + high_density: false + theme: system + id: "12345" + relationships: + dashboard: + data: + id: abc-def-ghi + type: dashboard + sharer: + data: + id: 00000000-0000-0000-0000-000000000000 + type: user + type: shared_dashboard + included: + - attributes: + title: Q1 Metrics Dashboard + id: abc-def-ghi + type: dashboard + - attributes: + handle: jane.doe@example.com + name: Jane Doe + id: 00000000-0000-0000-0000-000000000000 + type: user + schema: + $ref: "#/components/schemas/ListSharedDashboardsResponse" + description: OK + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Dashboard Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - dashboards_read + summary: List shared dashboards for a dashboard + tags: + - Dashboard Sharing + "x-permission": + operator: OR + permissions: + - dashboards_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/dashboard/{dashboard_id}/shared/secure-embed: post: description: >- @@ -117664,6 +126108,105 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/data-observability/monitors/runs/{run_id}/status: + get: + description: Retrieves the current status of a data observability monitor run. Poll this endpoint after triggering a run to determine when evaluation is complete. + operationId: GetDataObservabilityMonitorRunStatus + parameters: + - description: The ID of the monitor run to retrieve status for. + example: "abc123def456" + in: path + name: run_id + required: true + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + status: ok + id: "abc123def456" + type: monitor_run + schema: + $ref: "#/components/schemas/GetDataObservabilityMonitorRunStatusResponse" + description: OK + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - data_observability_monitors_write + - monitors_write + summary: Get data observability monitor run status + tags: + - Data Observability + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/data-observability/monitors/{monitor_id}/run: + post: + description: Manually triggers a run for a data observability monitor. Only monitors that are not scheduled (manually-runnable) can be triggered this way. + operationId: RunDataObservabilityMonitor + parameters: + - description: The ID of the data observability monitor to run. + example: 12345 + in: path + name: monitor_id + required: true + schema: + format: int64 + type: integer + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + id: "abc123def456" + type: monitor_run + schema: + $ref: "#/components/schemas/RunDataObservabilityMonitorResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - data_observability_monitors_write + - monitors_write + summary: Run a data observability monitor + tags: + - Data Observability + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/datasets: get: description: Get all datasets that have been configured for an organization. @@ -120655,6 +129198,7 @@ paths: name: limit schema: default: 100 + format: int64 maximum: 1000 minimum: 1 type: integer @@ -120664,6 +129208,7 @@ paths: name: offset schema: default: 0 + format: int64 minimum: 0 type: integer responses: @@ -120807,6 +129352,7 @@ paths: name: limit schema: default: 100 + format: int64 maximum: 1000 minimum: 1 type: integer @@ -120816,6 +129362,7 @@ paths: name: offset schema: default: 0 + format: int64 minimum: 0 type: integer responses: @@ -121920,6 +130467,829 @@ paths: permissions: - feature_flag_config_write - feature_flag_environment_config_read + /api/v2/forms: + get: + description: Get all forms for the authenticated user's organization. + operationId: ListForms + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + active: true + anonymous: false + created_at: "2026-05-29T20:06:14.895284Z" + datastore_config: + datastore_id: 00000000-0000-0000-0000-000000000000 + primary_column_name: "" + primary_key_generation_strategy: "" + description: A form to collect user feedback. + end_date: + idp_survey: false + modified_at: "2026-05-29T20:06:14.895285Z" + name: User Feedback Form + org_id: 2 + self_service: false + single_response: false + user_id: 10001 + user_uuid: 1fc709aa-be19-4539-a47d-52a30d78a978 + id: 22f6006a-2302-4926-9396-d2dfcf7b0b34 + type: forms + schema: + $ref: "#/components/schemas/FormsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List forms + tags: + - Forms + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Create a new form. The form is created in draft mode and must be published before it can be used. This also creates a new datastore for form responses and links it to the form. + operationId: CreateForm + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + anonymous: false + data_definition: {} + description: A form to collect user feedback. + idp_survey: false + name: User Feedback Form + single_response: false + ui_definition: {} + type: forms + schema: + $ref: "#/components/schemas/CreateFormRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + active: true + anonymous: false + created_at: "2026-05-29T20:06:14.895284Z" + datastore_config: + datastore_id: 5108ea24-dd83-4696-9caa-f069f73d0fad + primary_column_name: id + primary_key_generation_strategy: none + description: A form to collect user feedback. + end_date: + idp_survey: false + modified_at: "2026-05-29T20:06:14.895285Z" + name: User Feedback Form + org_id: 2 + self_service: false + single_response: false + user_id: 10001 + user_uuid: 1fc709aa-be19-4539-a47d-52a30d78a978 + id: 22f6006a-2302-4926-9396-d2dfcf7b0b34 + type: forms + schema: + $ref: "#/components/schemas/FormResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create a form + tags: + - Forms + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/forms/create_and_publish: + post: + description: Creates a new form and immediately publishes its initial version. This also creates a new datastore for form responses and links it to the form. + operationId: CreateAndPublishForm + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + anonymous: false + data_definition: {} + description: A form to collect user feedback. + idp_survey: false + name: User Feedback Form + single_response: false + ui_definition: {} + type: forms + schema: + $ref: "#/components/schemas/CreateFormRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + active: true + anonymous: false + created_at: "2026-05-29T20:06:14.895284Z" + datastore_config: + datastore_id: 5108ea24-dd83-4696-9caa-f069f73d0fad + primary_column_name: id + primary_key_generation_strategy: none + description: A form to collect user feedback. + end_date: + idp_survey: false + modified_at: "2026-05-29T20:06:14.895285Z" + name: User Feedback Form + org_id: 2 + self_service: false + single_response: false + user_id: 10001 + user_uuid: 1fc709aa-be19-4539-a47d-52a30d78a978 + id: 22f6006a-2302-4926-9396-d2dfcf7b0b34 + type: forms + schema: + $ref: "#/components/schemas/FormResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create and publish a form + tags: + - Forms + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/forms/{form_id}: + delete: + description: Delete a form by its ID. This will also try to delete the associated datastore. + operationId: DeleteForm + parameters: + - description: The ID of the form. + example: 844dfd88-aa84-4db4-8979-e7bdbb9c1dc3 + in: path + name: form_id + required: true + schema: + format: uuid + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + id: 844dfd88-aa84-4db4-8979-e7bdbb9c1dc3 + type: forms + schema: + $ref: "#/components/schemas/DeleteFormResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Delete a form + tags: + - Forms + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get a form definition by its ID. + operationId: GetForm + parameters: + - description: The ID of the form. + example: 22f6006a-2302-4926-9396-d2dfcf7b0b34 + in: path + name: form_id + required: true + schema: + format: uuid + type: string + - description: The version of the form to retrieve. Use 'latest' for the most recent draft, 'published' for the last published version, or a specific version number. + in: query + name: version + required: false + schema: + default: latest + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + active: true + anonymous: false + created_at: "2026-05-29T20:06:14.895284Z" + datastore_config: + datastore_id: 5108ea24-dd83-4696-9caa-f069f73d0fad + primary_column_name: id + primary_key_generation_strategy: none + description: A form to collect user feedback. + end_date: + idp_survey: false + modified_at: "2026-05-29T20:06:14.895285Z" + name: User Feedback Form + org_id: 2 + self_service: false + single_response: false + user_id: 10001 + user_uuid: 1fc709aa-be19-4539-a47d-52a30d78a978 + id: 22f6006a-2302-4926-9396-d2dfcf7b0b34 + type: forms + schema: + $ref: "#/components/schemas/FormResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get a form + tags: + - Forms + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + patch: + description: Update a form's properties such as its name, description, or datastore configuration. + operationId: UpdateForm + parameters: + - description: The ID of the form. + example: 22f6006a-2302-4926-9396-d2dfcf7b0b34 + in: path + name: form_id + required: true + schema: + format: uuid + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + form_update: + description: An updated description. + name: Updated Form Name + type: forms + schema: + $ref: "#/components/schemas/UpdateFormRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + active: true + anonymous: false + created_at: "2026-05-29T20:06:14.895284Z" + datastore_config: + datastore_id: 5108ea24-dd83-4696-9caa-f069f73d0fad + primary_column_name: id + primary_key_generation_strategy: none + description: An updated description. + end_date: + idp_survey: false + modified_at: "2026-05-29T20:06:15.000000Z" + name: Updated Form Name + org_id: 2 + self_service: false + single_response: false + user_id: 10001 + user_uuid: 1fc709aa-be19-4539-a47d-52a30d78a978 + id: 22f6006a-2302-4926-9396-d2dfcf7b0b34 + type: forms + schema: + $ref: "#/components/schemas/FormResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update a form + tags: + - Forms + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/forms/{form_id}/clone: + post: + description: Clone an existing form. The clone is created in draft mode using the source form's latest version. + operationId: CloneForm + parameters: + - description: The ID of the form to clone. + example: 22f6006a-2302-4926-9396-d2dfcf7b0b34 + in: path + name: form_id + required: true + schema: + format: uuid + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + name: Copy of My Form + type: forms + schema: + $ref: "#/components/schemas/CloneFormRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + active: true + anonymous: false + created_at: "2026-05-30T10:00:00.000000Z" + datastore_config: + datastore_id: a2b3c4d5-e6f7-8901-2345-6789abcdef01 + primary_column_name: id + primary_key_generation_strategy: none + description: A form to collect user feedback. + end_date: + idp_survey: false + modified_at: "2026-05-30T10:00:00.000000Z" + name: Copy of My Form + org_id: 2 + self_service: false + single_response: false + user_id: 10001 + user_uuid: 1fc709aa-be19-4539-a47d-52a30d78a978 + id: 7a1e9054-5f6a-4b08-9e3d-c2f189a3bce0 + type: forms + schema: + $ref: "#/components/schemas/FormResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Clone a form + tags: + - Forms + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/forms/{form_id}/publish: + post: + description: Publish a specific version of a form, making it available for submissions. + operationId: PublishForm + parameters: + - description: The ID of the form. + example: 22f6006a-2302-4926-9396-d2dfcf7b0b34 + in: path + name: form_id + required: true + schema: + format: uuid + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + version: 1 + type: form_publications + schema: + $ref: "#/components/schemas/PublishFormRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2026-05-29T20:06:13.677353Z" + form_id: afc67600-0511-43b1-9b18-578fb4979bd3 + form_version: 1 + id: "42" + modified_at: "2026-05-29T20:06:13.677353Z" + org_id: 2 + publish_seq: 1 + user_id: 10001 + user_uuid: 1fc709aa-be19-4539-a47d-52a30d78a978 + id: "42" + type: form_publications + schema: + $ref: "#/components/schemas/FormPublicationResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Publish a form version + tags: + - Forms + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/forms/{form_id}/versions: + post: + description: |- + Create or update the latest draft version of a form. The `upsert_params` field controls + optimistic concurrency behavior. + operationId: UpsertFormVersion + parameters: + - description: The ID of the form. + example: 22f6006a-2302-4926-9396-d2dfcf7b0b34 + in: path + name: form_id + required: true + schema: + format: uuid + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + data_definition: {} + state: draft + ui_definition: {} + upsert_params: + match_policy: none + type: form_versions + schema: + $ref: "#/components/schemas/UpsertFormVersionRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2026-05-29T20:06:14.895921Z" + data_definition: + $ref: "#/components/schemas/FormDataDefinition" + definition_signature: '{"signature":"b7f312957a80cea2c8c9950532b205a90a3f8a7ebb7e52fc25437a25d903d545","version":1}' + etag: b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d + modified_at: "2026-05-29T20:06:14.949163Z" + state: draft + ui_definition: {} + user_id: 10001 + user_uuid: 1fc709aa-be19-4539-a47d-52a30d78a978 + version: 2 + id: "126" + type: form_versions + schema: + $ref: "#/components/schemas/FormVersionResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create or update a form version + tags: + - Forms + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/forms/{form_id}/versions/upsert_and_publish: + post: + description: Upsert the latest form version and publish it in a single atomic transaction. + operationId: UpsertAndPublishFormVersion + parameters: + - description: The ID of the form. + example: 22f6006a-2302-4926-9396-d2dfcf7b0b34 + in: path + name: form_id + required: true + schema: + format: uuid + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + data_definition: {} + ui_definition: {} + upsert_params: + etag: b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d + type: form_versions + schema: + $ref: "#/components/schemas/UpsertAndPublishFormVersionRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + active: true + anonymous: false + created_at: "2026-05-29T20:06:14.895284Z" + datastore_config: + datastore_id: 5108ea24-dd83-4696-9caa-f069f73d0fad + primary_column_name: id + primary_key_generation_strategy: none + description: A form to collect user feedback. + end_date: + idp_survey: false + modified_at: "2026-05-29T20:06:15.000000Z" + name: User Feedback Form + org_id: 2 + self_service: false + single_response: false + user_id: 10001 + user_uuid: 1fc709aa-be19-4539-a47d-52a30d78a978 + id: 22f6006a-2302-4926-9396-d2dfcf7b0b34 + type: forms + schema: + $ref: "#/components/schemas/FormResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Upsert and publish a form version + tags: + - Forms + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/global_orgs: + get: + description: |- + Returns organizations across regions for the authenticated user. The `user_handle` query parameter must match the authenticated user's handle. + operationId: ListGlobalOrgs + parameters: + - description: The handle of the authenticated user. + in: query + name: user_handle + required: true + schema: + example: user@example.com + type: string + - description: Maximum number of results returned. + in: query + name: page[limit] + required: false + schema: + default: 100 + format: int32 + maximum: 1000 + minimum: 1 + type: integer + - description: |- + String to query the next page of results. + This key is provided with each valid response from the API in `meta.page.next_cursor`. + in: query + name: page[cursor] + required: false + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + org: + name: Example Org + public_id: abcdef12345 + subdomain: example + uuid: "13d10a96-6ff2-49be-be7b-4f56ebb13335" + redirect_url: "https://app.datadoghq.com/account/login/password?dd_oid=13d10a96-6ff2-49be-be7b-4f56ebb13335&login_hint=user%40example.com" + source_region: us1.prod.dog + user: + handle: user@example.com + uuid: "cfab5cf9-5472-48ea-a79c-a64045f4f745" + type: global_user_orgs + links: + next: "https://app.datadoghq.com/api/v2/global_orgs?user_handle=user@example.com&page[limit]=100&page[cursor]=next-page" + self: "https://app.datadoghq.com/api/v2/global_orgs?user_handle=user@example.com&page[limit]=100" + meta: + page: + cursor: "" + limit: 100 + next_cursor: next-page + type: cursor + schema: + $ref: "#/components/schemas/GlobalOrgsResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_read + summary: List global orgs + tags: + - Organizations + x-pagination: + cursorParam: page[cursor] + cursorPath: meta.page.next_cursor + limitParam: page[limit] + resultsPath: data + "x-permission": + operator: OR + permissions: + - user_access_read /api/v2/hamr: get: description: |- @@ -126305,6 +135675,76 @@ paths: operator: OR permissions: - aws_configuration_read + /api/v2/integration/aws/validate_ccm_config: + post: + description: |- + Validate a Cloud Cost Management config for an AWS account using Cost and Usage Report + (CUR) 2.0 against Datadog's ingest requirements without persisting it. + operationId: ValidateAWSCCMConfig + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + account_id: "123456789012" + bucket_name: billing + bucket_region: us-east-1 + report_name: cost-and-usage-report + report_prefix: reports + type: ccm_config_validation + schema: + $ref: "#/components/schemas/AWSCcmConfigValidationRequest" + description: Validate a Cloud Cost Management config for an AWS account integration config. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + account_id: "123456789012" + issues: + - code: EXPORT_NOT_FOUND + description: 'no CUR 2.0 export named "cost-and-usage-report" found' + id: ccm_config_validation + type: ccm_config_validation + schema: + $ref: "#/components/schemas/AWSCcmConfigValidationResponse" + description: AWS CCM Config validation result + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + $ref: "#/components/responses/ForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "503": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Service Unavailable + summary: Validate AWS CCM config + tags: + - AWS Integration + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - cloud_cost_management_read + - cloud_cost_management_write + x-unstable: |- + **Note**: This endpoint is in Preview and may be subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/integration/gcp/accounts: get: description: List all GCP STS-enabled service accounts configured in your Datadog account. @@ -126586,6 +136026,43 @@ paths: operator: OR permissions: - gcp_configuration_edit + /api/v2/integration/google-chat/organizations: + get: + description: Get a list of all Google Chat organization bindings in the Datadog Google Chat integration. + operationId: ListGoogleChatOrganizations + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + domain_id: fake-domain-id + domain_name: example.com + id: 00000000-0000-0000-0000-000000000001 + relationships: + delegated_user: + data: + id: 00000000-0000-0000-0000-000000000002 + type: google-chat-delegated-user + type: google-chat-organization + - attributes: + domain_id: fake-domain-id-2 + domain_name: example2.com + id: 00000000-0000-0000-0000-000000000003 + type: google-chat-organization + schema: + $ref: "#/components/schemas/GoogleChatOrganizationsResponse" + description: OK + "403": + $ref: "#/components/responses/ForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get all Google Chat organization bindings + tags: + - Google Chat Integration /api/v2/integration/google-chat/organizations/app/named-spaces/{domain_name}/{space_display_name}: get: description: Get the resource name and organization binding ID of a space in the Datadog Google Chat integration. @@ -126622,6 +136099,110 @@ paths: summary: Get space information by display name tags: - Google Chat Integration + /api/v2/integration/google-chat/organizations/{organization_binding_id}: + delete: + description: Delete a Google Chat organization binding from the Datadog Google Chat integration. + operationId: DeleteGoogleChatOrganization + parameters: + - $ref: "#/components/parameters/GoogleChatOrganizationBindingIdPathParameter" + responses: + "204": + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Delete a Google Chat organization binding + tags: + - Google Chat Integration + get: + description: Get a Google Chat organization binding from the Datadog Google Chat integration. + operationId: GetGoogleChatOrganization + parameters: + - $ref: "#/components/parameters/GoogleChatOrganizationBindingIdPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + domain_id: fake-domain-id + domain_name: example.com + id: 00000000-0000-0000-0000-000000000001 + relationships: + delegated_user: + data: + id: 00000000-0000-0000-0000-000000000002 + type: google-chat-delegated-user + type: google-chat-organization + schema: + $ref: "#/components/schemas/GoogleChatOrganizationResponse" + description: OK + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get a Google Chat organization binding + tags: + - Google Chat Integration + /api/v2/integration/google-chat/organizations/{organization_binding_id}/delegated-user: + delete: + description: Delete the delegated user for a Google Chat organization binding from the Datadog Google Chat integration. + operationId: DeleteGoogleChatDelegatedUser + parameters: + - $ref: "#/components/parameters/GoogleChatOrganizationBindingIdPathParameter" + responses: + "204": + description: OK + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Delete the delegated user + tags: + - Google Chat Integration + get: + description: Get the delegated user for a Google Chat organization binding in the Datadog Google Chat integration. + operationId: GetGoogleChatDelegatedUser + parameters: + - $ref: "#/components/parameters/GoogleChatOrganizationBindingIdPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + display_name: fake-display-name + email: user@example.com + features: + - incident-automatic-space-creation + - workflow-space-creation + id: 00000000-0000-0000-0000-000000000002 + type: google-chat-delegated-user + schema: + $ref: "#/components/schemas/GoogleChatDelegatedUserResponse" + description: OK + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get the delegated user + tags: + - Google Chat Integration /api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles: get: description: Get a list of all organization handles from the Datadog Google Chat integration. @@ -126822,6 +136403,191 @@ paths: tags: - Google Chat Integration x-codegen-request-body-name: body + /api/v2/integration/google-chat/organizations/{organization_binding_id}/target-audiences: + get: + description: Get a list of all target audiences for a Google Chat organization binding in the Datadog Google Chat integration. + operationId: ListGoogleChatTargetAudiences + parameters: + - $ref: "#/components/parameters/GoogleChatOrganizationBindingIdPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + audience_id: fake-audience-id-1 + audience_name: fake audience name 1 + id: 00000000-0000-0000-0000-000000000004 + type: google-chat-target-audience + - attributes: + audience_id: fake-audience-id-2 + audience_name: fake-audience-name-2 + id: 00000000-0000-0000-0000-000000000005 + type: google-chat-target-audience + schema: + $ref: "#/components/schemas/GoogleChatTargetAudiencesResponse" + description: OK + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get all target audiences + tags: + - Google Chat Integration + post: + description: Create a target audience for a Google Chat organization binding in the Datadog Google Chat integration. + operationId: CreateGoogleChatTargetAudience + parameters: + - $ref: "#/components/parameters/GoogleChatOrganizationBindingIdPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + audience_id: fake-audience-id-1 + audience_name: fake audience name 1 + type: google-chat-target-audience + schema: + $ref: "#/components/schemas/GoogleChatTargetAudienceCreateRequest" + description: Target audience payload. + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + audience_id: fake-audience-id-1 + audience_name: fake audience name 1 + id: 00000000-0000-0000-0000-000000000004 + type: google-chat-target-audience + schema: + $ref: "#/components/schemas/GoogleChatTargetAudienceResponse" + description: CREATED + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "409": + $ref: "#/components/responses/ConflictResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create a target audience + tags: + - Google Chat Integration + x-codegen-request-body-name: body + /api/v2/integration/google-chat/organizations/{organization_binding_id}/target-audiences/{target_audience_id}: + delete: + description: Delete a target audience from a Google Chat organization binding in the Datadog Google Chat integration. + operationId: DeleteGoogleChatTargetAudience + parameters: + - $ref: "#/components/parameters/GoogleChatOrganizationBindingIdPathParameter" + - $ref: "#/components/parameters/GoogleChatTargetAudienceIdPathParameter" + responses: + "204": + description: OK + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Delete a target audience + tags: + - Google Chat Integration + get: + description: Get a target audience for a Google Chat organization binding in the Datadog Google Chat integration. + operationId: GetGoogleChatTargetAudience + parameters: + - $ref: "#/components/parameters/GoogleChatOrganizationBindingIdPathParameter" + - $ref: "#/components/parameters/GoogleChatTargetAudienceIdPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + audience_id: fake-audience-id-1 + audience_name: fake audience name 1 + id: 00000000-0000-0000-0000-000000000004 + type: google-chat-target-audience + schema: + $ref: "#/components/schemas/GoogleChatTargetAudienceResponse" + description: OK + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get a target audience + tags: + - Google Chat Integration + patch: + description: Update a target audience for a Google Chat organization binding in the Datadog Google Chat integration. + operationId: UpdateGoogleChatTargetAudience + parameters: + - $ref: "#/components/parameters/GoogleChatOrganizationBindingIdPathParameter" + - $ref: "#/components/parameters/GoogleChatTargetAudienceIdPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + audience_id: updated-audience-id + audience_name: updated-audience-name + type: google-chat-target-audience + schema: + $ref: "#/components/schemas/GoogleChatTargetAudienceUpdateRequest" + description: Target audience payload. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + audience_id: updated-audience-id + audience_name: updated-audience-name + id: 00000000-0000-0000-0000-000000000004 + type: google-chat-target-audience + schema: + $ref: "#/components/schemas/GoogleChatTargetAudienceResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update a target audience + tags: + - Google Chat Integration + x-codegen-request-body-name: body /api/v2/integration/jira/accounts: get: description: |- @@ -127362,6 +137128,26 @@ paths: tags: - Microsoft Teams Integration x-codegen-request-body-name: body + /api/v2/integration/ms-teams/configuration/user-binding/{tenant_id}: + delete: + description: Delete the user binding for a given tenant from the Datadog Microsoft Teams integration. + operationId: DeleteMSTeamsUserBinding + parameters: + - $ref: "#/components/parameters/MicrosoftTeamsTenantIDPathParameter" + responses: + "204": + description: No Content + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "412": + $ref: "#/components/responses/PreconditionFailedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Delete user binding + tags: + - Microsoft Teams Integration /api/v2/integration/ms-teams/configuration/workflows-webhook-handles: get: description: Get a list of all Workflows webhook handles from the Datadog Microsoft Teams integration. @@ -128846,6 +138632,36 @@ paths: summary: List ServiceNow users tags: - ServiceNow Integration + /api/v2/integration/slack/user-bindings: + get: + description: List all Slack user bindings for a given Datadog user from the Datadog Slack integration. + operationId: ListSlackUserBindings + parameters: + - $ref: "#/components/parameters/SlackUserUuidQueryParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - id: T01234567 + type: team_id + - id: T09876543 + type: team_id + schema: + $ref: "#/components/schemas/SlackUserBindingsResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List Slack user bindings + tags: + - Slack Integration /api/v2/integration/statuspage/account: delete: description: Delete the Statuspage account configured for your organization. @@ -130892,7 +140708,9 @@ paths: If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/llm-obs/v1/annotated-interactions: get: - description: Returns annotated interactions across all annotation queues for the given content IDs. Results include queue metadata (ID and name) for each interaction. + description: |- + Returns annotated interactions across all annotation queues for the given content IDs. + Results include queue metadata (ID and name) for each interaction. operationId: GetLLMObsAnnotatedInteractionsByTraceIDs parameters: - description: One or more content IDs to retrieve annotated interactions for. At least one is required. @@ -130937,7 +140755,8 @@ paths: id: annotation-789 interaction_id: interaction-456 label_values: - quality: good + - label_schema_id: abc-123 + value: good modified_at: "0001-01-01T00:00:00Z" modified_by: "00000000-0000-0000-0000-000000000002" content_id: trace-abc-123 @@ -131000,7 +140819,8 @@ paths: name: projectId schema: type: string - - description: Filter annotation queues by queue IDs (comma-separated). Cannot be used together with `projectId`. + - description: >- + Filter annotation queues by queue IDs (comma-separated). Cannot be used together with `projectId`. in: query name: queueIds schema: @@ -131330,6 +141150,181 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotations: + post: + description: |- + Create or update annotations on interactions in a queue. Each annotation is matched + by `interaction_id` and the requesting user's identity. + Results and errors in the response are linked to request items by `interaction_id`. + Errors for individual items are returned in the `errors` field without blocking the rest of the batch. + operationId: UpsertLLMObsAnnotations + parameters: + - $ref: "#/components/parameters/LLMObsAnnotationQueueIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + annotations: + - interaction_id: 00000000-0000-0000-0000-000000000001 + label_values: + - label_schema_id: abc-123 + value: good + - label_schema_id: ef56gh78 + value: positive + type: annotations + schema: + $ref: "#/components/schemas/LLMObsAnnotationsRequest" + description: Payload for creating or updating annotations. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + annotations: + - created_at: "2024-01-15T10:30:00Z" + created_by: 00000000-0000-0000-0000-000000000002 + id: 00000000-0000-0000-0000-000000000000 + interaction_id: 00000000-0000-0000-0000-000000000001 + label_values: + - label_schema_id: abc-123 + value: good + modified_at: "2024-01-15T10:30:00Z" + modified_by: 00000000-0000-0000-0000-000000000002 + id: 00000000-0000-0000-0000-000000000001 + type: annotations + schema: + $ref: "#/components/schemas/LLMObsAnnotationsResponse" + description: OK — annotations created or updated. Per-item errors are listed in `errors`. + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found — the queue does not exist. + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create or update annotations + tags: + - LLM Observability + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotations/delete: + post: + description: Delete one or more annotations from an annotation queue. + operationId: DeleteLLMObsAnnotations + parameters: + - $ref: "#/components/parameters/LLMObsAnnotationQueueIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + annotation_ids: + - 00000000-0000-0000-0000-000000000000 + type: annotations + schema: + $ref: "#/components/schemas/LLMObsDeleteAnnotationsRequest" + description: Delete annotations payload. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + annotation_ids: + - 00000000-0000-0000-0000-000000000000 + errors: [] + id: 00000000-0000-0000-0000-000000000001 + type: annotations + partial_failure: + summary: Some annotation IDs were not found + value: + data: + attributes: + annotation_ids: + - 00000000-0000-0000-0000-000000000000 + errors: + - annotation_id: 00000000-0000-0000-0000-000000000001 + error: annotation not found + id: 00000000-0000-0000-0000-000000000001 + type: annotations + schema: + $ref: "#/components/schemas/LLMObsDeleteAnnotationsResponse" + description: >- + OK — annotations deleted. Errors for annotations that could not be deleted are listed in `errors`. + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found — the queue does not exist. + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Delete annotations + tags: + - LLM Observability + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/llm-obs/v1/annotation-queues/{queue_id}/interactions: post: description: |- @@ -132034,16 +142029,59 @@ paths: name: filter[id] schema: type: string - - description: Use the Pagination cursor to retrieve the next page of results. + - description: Filter experiments by their exact run name. + in: query + name: filter[name] + schema: + type: string + - description: >- + Filter by logical experiment name. This is the `name` field set when creating an experiment through `POST /experiments`. Returns all experiment runs that share the same name, enabling cross-commit and cross-branch comparisons. + in: query + name: filter[experiment] + schema: + type: string + - description: |- + Filter by JSONB metadata containment. Provide a JSON object string where + experiments whose metadata contains all specified key-value pairs are returned. + For example: `{"commit":"abc123","branch":"main"}`. + in: query + name: filter[metadata] + schema: + type: string + - description: >- + Filter experiments by the ID of their parent (baseline) experiment. Returns all experiments that were run against the given baseline. Can be specified multiple times. + in: query + name: filter[parent_experiment_id] + schema: + type: string + - description: When `true`, return only soft-deleted experiments. Defaults to `false`. + in: query + name: filter[is_deleted] + schema: + type: boolean + - description: When `true`, enrich each experiment with its author's user data in the `author` field. + in: query + name: include[user_data] + schema: + type: boolean + - description: When `true`, enrich each experiment with its dataset name in the `dataset_name` field. + in: query + name: include[dataset_names] + schema: + type: boolean + - description: Use the pagination cursor returned in `meta.after` to retrieve the next page of results. in: query name: page[cursor] schema: type: string - - description: Maximum number of results to return per page. + - description: |- + Maximum number of results to return per page. Values above 5000 are clamped + to 5000. Defaults to 5000. in: query name: page[limit] schema: format: int64 + maximum: 5000 type: integer responses: "200": @@ -132314,6 +142352,76 @@ paths: **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/llm-obs/v1/experiments/{experiment_id}/events: + get: + deprecated: true + description: >- + Retrieve spans with their evaluation metrics for a given experiment. Returns spans only, with no summary metrics and no pagination. Deprecated in favor of `ListLLMObsExperimentEventsV3`. + operationId: ListLLMObsExperimentEventsV1 + parameters: + - $ref: "#/components/parameters/LLMObsExperimentIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + duration: 1500000000.0 + eval_metrics: [] + name: llm_call + span_id: span-7a1b2c3d + start_ns: 1705314600000000000 + status: ok + tags: [] + trace_id: abc123def456 + id: 00000000-0000-0000-0000-000000000001 + type: experiments + schema: + $ref: "#/components/schemas/LLMObsExperimentSpansResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List LLM Observability experiment spans (v1) + tags: + - LLM Observability + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). post: description: Push spans and metrics for an LLM Observability experiment. operationId: CreateLLMObsExperimentEvents @@ -133104,33 +143212,16 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/llm-obs/v1/{project_id}/datasets: + /api/v2/llm-obs/v1/topic-discovery-clustered-points: get: - description: List all LLM Observability datasets for a project, sorted by creation date, newest first. - operationId: ListLLMObsDatasets + description: |- + List the data points grouped into a topic. For a parent topic, points from all + of its leaf topics are returned. + operationId: ListLLMObsPatternsClusteredPoints parameters: - - $ref: "#/components/parameters/LLMObsProjectIDPathParameter" - - description: Filter datasets by name. - in: query - name: filter[name] - schema: - type: string - - description: Filter datasets by dataset ID. - in: query - name: filter[id] - schema: - type: string - - description: Use the Pagination cursor to retrieve the next page of results. - in: query - name: page[cursor] - schema: - type: string - - description: Maximum number of results to return per page. - in: query - name: page[limit] - schema: - format: int64 - type: integer + - $ref: "#/components/parameters/LLMObsPatternsTopicIDQueryParameter" + - $ref: "#/components/parameters/LLMObsPatternsPageSizeQueryParameter" + - $ref: "#/components/parameters/LLMObsPatternsPageTokenQueryParameter" responses: "200": content: @@ -133139,17 +143230,760 @@ paths: default: value: data: - - attributes: - created_at: "2024-01-01T00:00:00+00:00" - current_version: 1 - description: "" - metadata: - name: My LLM Dataset - updated_at: "2024-01-01T00:00:00+00:00" - id: 00000000-0000-0000-0000-000000000005 - type: datasets + attributes: + next_page_token: "eyJvZmZzZXQiOjUwfQ==" + points: + - event_id: AAAAAYabc123 + id: 9b0c1d2e-3f40-5a61-b728-c9d0e1f2a3b4 + input: "How do I get a refund?" + is_included: false + is_suggested: true + session_id: session-7c3f5a1b + span_id: "1234567890123456789" + topic_id: 5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21 + topic_id: 5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21 + id: 5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21 + type: clustered_points_response schema: - $ref: "#/components/schemas/LLMObsDatasetsResponse" + $ref: "#/components/schemas/LLMObsPatternsClusteredPointsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List patterns clustered points + tags: + - LLM Observability + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/llm-obs/v1/topic-discovery-configs: + get: + description: List all patterns configurations for the organization. + operationId: ListLLMObsPatternsConfigs + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + configs: + - created_at: "2024-01-15T10:30:00Z" + evp_query: "@ml_app:support-bot" + hierarchy_depth: 2 + id: a7c8d9e0-1234-5678-9abc-def012345678 + name: Support chatbot topics + num_records: 1000 + sampling_ratio: 0.1 + scope: "" + updated_at: "2024-01-15T10:30:00Z" + id: "1000000001" + type: list_topic_discovery_configs_response + schema: + $ref: "#/components/schemas/LLMObsPatternsConfigsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List patterns configurations + tags: + - LLM Observability + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + put: + description: Create a new patterns configuration, or update an existing one when a configuration ID is provided. + operationId: UpsertLLMObsPatternsConfig + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + evp_query: "@ml_app:support-bot" + hierarchy_depth: 2 + name: Support chatbot topics + num_records: 1000 + sampling_ratio: 0.1 + type: topic_discovery_configs + schema: + $ref: "#/components/schemas/LLMObsPatternsConfigUpsertRequest" + description: Patterns configuration payload. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-15T10:30:00Z" + evp_query: "@ml_app:support-bot" + hierarchy_depth: 2 + name: Support chatbot topics + num_records: 1000 + sampling_ratio: 0.1 + scope: "" + updated_at: "2024-01-15T10:30:00Z" + id: a7c8d9e0-1234-5678-9abc-def012345678 + type: topic_discovery_configs + schema: + $ref: "#/components/schemas/LLMObsPatternsConfigResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create or update a patterns configuration + tags: + - LLM Observability + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/llm-obs/v1/topic-discovery-configs/latest: + get: + description: Retrieve the patterns configuration for the organization. + operationId: GetLLMObsPatternsConfig + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-15T10:30:00Z" + evp_query: "@ml_app:support-bot" + hierarchy_depth: 2 + name: Support chatbot topics + num_records: 1000 + sampling_ratio: 0.1 + scope: "" + updated_at: "2024-01-15T10:30:00Z" + id: a7c8d9e0-1234-5678-9abc-def012345678 + type: topic_discovery_configs + schema: + $ref: "#/components/schemas/LLMObsPatternsConfigResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get a patterns configuration + tags: + - LLM Observability + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/llm-obs/v1/topic-discovery-configs/{config_id}: + delete: + description: Delete a patterns configuration by its ID. + operationId: DeleteLLMObsPatternsConfig + parameters: + - $ref: "#/components/parameters/LLMObsPatternsConfigIDPathParameter" + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Delete a patterns configuration + tags: + - LLM Observability + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/llm-obs/v1/topic-discovery-runs: + get: + description: List the completed patterns runs for a configuration. + operationId: ListLLMObsPatternsRuns + parameters: + - $ref: "#/components/parameters/LLMObsPatternsConfigIDQueryParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + runs: + - completed_at: "2024-01-15T10:45:00Z" + created_at: "2024-01-15T10:30:00Z" + id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + status: completed + id: a7c8d9e0-1234-5678-9abc-def012345678 + type: list_topic_discovery_runs_response + schema: + $ref: "#/components/schemas/LLMObsPatternsRunsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List patterns runs + tags: + - LLM Observability + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Start a patterns run for a given configuration. The run executes asynchronously. + operationId: TriggerLLMObsPatterns + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + config_id: a7c8d9e0-1234-5678-9abc-def012345678 + type: topic_discovery + schema: + $ref: "#/components/schemas/LLMObsPatternsTriggerRequest" + description: Trigger patterns payload. + required: true + responses: + "202": + content: + application/json: + examples: + default: + value: + data: + attributes: + config_id: a7c8d9e0-1234-5678-9abc-def012345678 + run_id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + status: started + id: a7c8d9e0-1234-5678-9abc-def012345678 + type: topic_discovery_run + schema: + $ref: "#/components/schemas/LLMObsPatternsTriggerResponse" + description: Accepted + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Trigger a patterns run + tags: + - LLM Observability + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/llm-obs/v1/topic-discovery-runs/status: + get: + description: |- + Retrieve the status and step-by-step progress of the current or most recent + patterns run for a configuration. + operationId: GetLLMObsPatternsRunStatus + parameters: + - $ref: "#/components/parameters/LLMObsPatternsConfigIDQueryParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-15T10:30:00Z" + progress: + - name: query_evp + started_at: "2024-01-15T10:30:05Z" + status: completed + - name: generate_topics + started_at: "2024-01-15T10:32:00Z" + status: running + status: running + step: generate_topics + id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + type: topic_discovery_run_status + schema: + $ref: "#/components/schemas/LLMObsPatternsRunStatusResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get patterns run status + tags: + - LLM Observability + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/llm-obs/v1/topic-discovery-topics: + get: + description: |- + List the topics discovered by a patterns run. When no run is specified, + the most recent completed run is used. + operationId: ListLLMObsPatternsTopics + parameters: + - $ref: "#/components/parameters/LLMObsPatternsConfigIDQueryParameter" + - $ref: "#/components/parameters/LLMObsPatternsRunIDQueryParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + completed_at: "2024-01-15T10:45:00Z" + config_id: a7c8d9e0-1234-5678-9abc-def012345678 + created_at: "2024-01-15T10:30:00Z" + previous_run_id: "" + run_id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + topics: + - created_at: "2024-01-15T10:44:00Z" + description: "Questions about invoices, charges, and refunds." + first_seen_at: "2024-01-15T10:44:00Z" + hierarchy_level: 0 + id: 5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21 + is_validated: true + name: Billing questions + parent_topic_id: "" + point_count: 125 + run_id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + type: get_topics_response + schema: + $ref: "#/components/schemas/LLMObsPatternsTopicsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List patterns topics + tags: + - LLM Observability + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/llm-obs/v1/topic-discovery-topics/with-cluster-points: + get: + description: |- + List the topics discovered by a patterns run, with the clustered points attached + inline to each leaf topic. When no run is specified, the most recent completed + run is used. + operationId: ListLLMObsPatternsTopicsWithClusteredPoints + parameters: + - $ref: "#/components/parameters/LLMObsPatternsConfigIDQueryParameter" + - $ref: "#/components/parameters/LLMObsPatternsRunIDQueryParameter" + - $ref: "#/components/parameters/LLMObsPatternsIncludeMetricsQueryParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + completed_at: "2024-01-15T10:45:00Z" + config_id: a7c8d9e0-1234-5678-9abc-def012345678 + created_at: "2024-01-15T10:30:00Z" + previous_run_id: "" + run_id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + topics: + - cluster_points: + - duration: 1500000 + estimated_total_cost: 0.0021 + evaluation: + sentiment: positive + input_tokens: 128 + output_tokens: 64 + span_id: "1234567890123456789" + status: ok + total_tokens: 192 + created_at: "2024-01-15T10:44:00Z" + description: "Questions about invoices, charges, and refunds." + first_seen_at: "2024-01-15T10:44:00Z" + hierarchy_level: 0 + id: 5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21 + is_validated: true + name: Billing questions + parent_topic_id: "" + point_count: 125 + run_id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + type: get_topics_with_cluster_points_response + schema: + $ref: "#/components/schemas/LLMObsPatternsTopicsWithClusteredPointsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List patterns topics with clustered points + tags: + - LLM Observability + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/llm-obs/v1/{project_id}/datasets: + get: + description: List all LLM Observability datasets for a project, sorted by creation date, newest first. + operationId: ListLLMObsDatasets + parameters: + - $ref: "#/components/parameters/LLMObsProjectIDPathParameter" + - description: Filter datasets by name. + in: query + name: filter[name] + schema: + type: string + - description: Filter datasets by dataset ID. + in: query + name: filter[id] + schema: + type: string + - description: Use the Pagination cursor to retrieve the next page of results. + in: query + name: page[cursor] + schema: + type: string + - description: Maximum number of results to return per page. + in: query + name: page[limit] + schema: + format: int64 + type: integer + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + created_at: "2024-01-01T00:00:00+00:00" + current_version: 1 + description: "" + metadata: + name: My LLM Dataset + updated_at: "2024-01-01T00:00:00+00:00" + id: 00000000-0000-0000-0000-000000000005 + type: datasets + schema: + $ref: "#/components/schemas/LLMObsDatasetsResponse" description: OK "400": content: @@ -134399,6 +145233,80 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/llm-obs/v2/experiments/{experiment_id}/events: + get: + deprecated: true + description: >- + Retrieve spans and experiment-level summary metrics for a given experiment. Returns the full events payload without pagination. Deprecated: use `ListLLMObsExperimentEventsV3` instead. + operationId: ListLLMObsExperimentEventsV2 + parameters: + - $ref: "#/components/parameters/LLMObsExperimentIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + spans: + - duration: 1500000000.0 + eval_metrics: [] + id: 00000000-0000-0000-0000-000000000002 + name: llm_call + span_id: span-7a1b2c3d + start_ns: 1705314600000000000 + status: ok + tags: [] + trace_id: abc123def456 + summary_metrics: [] + id: 00000000-0000-0000-0000-000000000001 + type: experiment_events + schema: + $ref: "#/components/schemas/LLMObsExperimentEventsV2Response" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List LLM Observability experiment events (v2) + tags: + - LLM Observability + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/llm-obs/v2/{project_id}/datasets/{dataset_id}/records/upload: post: description: |- @@ -134590,6 +145498,47 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/login/org_configs/max_session_duration: + put: + description: |- + Update the maximum session duration for the current organization. + The duration is specified in seconds. + operationId: UpdateLoginOrgConfigsMaxSessionDuration + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + max_session_duration: 604800 + type: max_session_duration + schema: + $ref: "#/components/schemas/MaxSessionDurationUpdateRequest" + required: true + responses: + "204": + description: No Content + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - org_management + summary: Update the maximum session duration + tags: [Organizations] + "x-permission": + operator: OR + permissions: + - org_management /api/v2/logs: post: description: |- @@ -137069,7 +148018,10 @@ paths: - metrics_read /api/v2/metrics/config/bulk-tags: delete: + deprecated: true description: |- + **Note**: This endpoint is deprecated. Use [Tag Indexing Rules](/api/latest/metrics/#create-a-tag-indexing-rule) (`POST /api/v2/metrics/tag-indexing-rules`) instead. + 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. @@ -137140,8 +148092,12 @@ paths: operator: OR permissions: - metric_tags_write + x-sunset: "2027-01-01" post: + deprecated: true description: |- + **Note**: This endpoint is deprecated. Use [Tag Indexing Rules](/api/latest/metrics/#create-a-tag-indexing-rule) (`POST /api/v2/metrics/tag-indexing-rules`) instead. + 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. @@ -137220,6 +148176,420 @@ paths: operator: OR permissions: - metric_tags_write + x-sunset: "2027-01-01" + /api/v2/metrics/tag-indexing-rules: + get: + description: List tag indexing rules for an org, sorted by `rule_order`, with offset/limit pagination. + operationId: ListTagIndexingRules + parameters: + - description: Page size (1–1000, default 100). + in: query + name: page[limit] + schema: + format: int64 + type: integer + - description: Page offset from the start of the list (default 0). + in: query + name: page[offset] + schema: + format: int64 + type: integer + - description: Substring filter on rule name. + in: query + name: search + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + exclude_tags_mode: false + metric_name_matches: + - "dd.test.*" + name: my-indexing-rule + rule_order: 1 + tags: + - env + - service + id: "00000000-0000-0000-0000-000000000001" + type: tag_indexing_rules + meta: + total: 1 + schema: + $ref: "#/components/schemas/TagIndexingRulesResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Too Many Requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - metrics_read + summary: List tag indexing rules + tags: + - Metrics + "x-permission": + operator: OR + permissions: + - metrics_read + post: + description: |- + Create a tag indexing rule for the org. `rule_order` is assigned server-side as max+1 + among existing rules; use the reorder endpoint to change the evaluation order. + Requires the `Manage Tags for Metrics` permission. + operationId: CreateTagIndexingRule + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + metric_name_matches: + - "dd.test.*" + name: my-indexing-rule + tags: + - env + - service + type: tag_indexing_rules + schema: + $ref: "#/components/schemas/TagIndexingRuleCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-15T12:00:00.000Z" + exclude_tags_mode: false + metric_name_matches: + - "dd.test.*" + name: my-indexing-rule + rule_order: 1 + tags: + - env + - service + id: "00000000-0000-0000-0000-000000000001" + type: tag_indexing_rules + schema: + $ref: "#/components/schemas/TagIndexingRuleResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Too Many Requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - metric_tags_write + summary: Create a tag indexing rule + tags: + - Metrics + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - metric_tags_write + /api/v2/metrics/tag-indexing-rules/order: + post: + description: |- + Atomically re-sequence the tag indexing rules for an org to match the supplied list of rule UUIDs. + The server assigns `rule_order` 1, 2, … matching each rule UUID by position in the list. + Requires the `Manage Tags for Metrics` permission. + operationId: ReorderTagIndexingRules + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + rule_ids: + - "00000000-0000-0000-0000-000000000001" + - "00000000-0000-0000-0000-000000000002" + type: tag_indexing_rules + schema: + $ref: "#/components/schemas/TagIndexingRuleOrderRequest" + required: true + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Too Many Requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - metric_tags_write + summary: Reorder tag indexing rules + tags: + - Metrics + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - metric_tags_write + /api/v2/metrics/tag-indexing-rules/{id}: + delete: + description: |- + Soft-delete a tag indexing rule. Idempotent: returns 204 whether the rule existed or was already deleted. + Remaining rules in the org are automatically re-sequenced to keep `rule_order` dense and 1-based. + Requires the `Manage Tags for Metrics` permission. + operationId: DeleteTagIndexingRule + parameters: + - $ref: "#/components/parameters/TagIndexingRuleId" + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Too Many Requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - metric_tags_write + summary: Delete a tag indexing rule + tags: + - Metrics + "x-permission": + operator: OR + permissions: + - metric_tags_write + get: + description: Get a single tag indexing rule by its UUID. + operationId: GetTagIndexingRule + parameters: + - $ref: "#/components/parameters/TagIndexingRuleId" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-15T12:00:00.000Z" + exclude_tags_mode: false + metric_name_matches: + - "dd.test.*" + name: my-indexing-rule + rule_order: 1 + tags: + - env + - service + id: "00000000-0000-0000-0000-000000000001" + type: tag_indexing_rules + schema: + $ref: "#/components/schemas/TagIndexingRuleResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Too Many Requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - metrics_read + summary: Get a tag indexing rule + tags: + - Metrics + "x-permission": + operator: OR + permissions: + - metrics_read + put: + description: |- + Partially update a tag indexing rule. Fields omitted from the request body are left unchanged. + Setting `rule_order` to a value already used by another rule returns 409; use the + reorder endpoint for atomic re-sequencing. Requires the `Manage Tags for Metrics` permission. + operationId: UpdateTagIndexingRule + parameters: + - $ref: "#/components/parameters/TagIndexingRuleId" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + name: my-updated-rule + tags: + - env + - service + - version + type: tag_indexing_rules + schema: + $ref: "#/components/schemas/TagIndexingRuleUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + exclude_tags_mode: false + metric_name_matches: + - "dd.test.*" + name: my-updated-rule + rule_order: 1 + tags: + - env + - service + - version + id: "00000000-0000-0000-0000-000000000001" + type: tag_indexing_rules + schema: + $ref: "#/components/schemas/TagIndexingRuleResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Conflict + "429": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Too Many Requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - metric_tags_write + summary: Update a tag indexing rule + tags: + - Metrics + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - metric_tags_write /api/v2/metrics/{metric_name}/active-configurations: get: description: |- @@ -137607,6 +148977,231 @@ paths: operator: OR permissions: - metrics_read + /api/v2/metrics/{metric_name}/tag-indexing-rule-exemptions: + delete: + description: |- + Remove a metric's exemption from tag indexing rules. Idempotent: returns 204 whether or not + an exemption existed. Any associated legacy tag configuration record is also removed. + Requires the `Manage Tags for Metrics` permission. + operationId: DeleteTagIndexingRuleExemption + parameters: + - $ref: "#/components/parameters/MetricName" + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Too Many Requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - metric_tags_write + summary: Delete a tag indexing rule exemption + tags: + - Metrics + "x-permission": + operator: OR + permissions: + - metric_tags_write + get: + description: |- + Returns why a metric is excluded from tag indexing rules. + Returns 200 with `kind=exemption` when an explicit exemption exists, 200 with + `kind=legacy_tag_configuration` when the metric has a legacy tag configuration acting as an + implicit exclusion, or 404 when neither applies. + operationId: GetTagIndexingRuleExemption + parameters: + - $ref: "#/components/parameters/MetricName" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-15T12:00:00.000Z" + created_by_handle: user@datadoghq.com + kind: exemption + reason: This metric has a pre-existing tag configuration. + id: dd.test.metric + type: tag_indexing_rule_exemptions + schema: + $ref: "#/components/schemas/TagIndexingRuleExemptionResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Too Many Requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - metrics_read + summary: Get a tag indexing rule exemption + tags: + - Metrics + "x-permission": + operator: OR + permissions: + - metrics_read + post: + description: |- + Exempt a metric from all tag indexing rules. The response includes the created + exemption resource. Requires the `Manage Tags for Metrics` permission. + operationId: CreateTagIndexingRuleExemption + parameters: + - $ref: "#/components/parameters/MetricName" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + reason: This metric has a pre-existing tag configuration. + type: tag_indexing_rule_exemptions + schema: + $ref: "#/components/schemas/TagIndexingRuleExemptionCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-15T12:00:00.000Z" + created_by_handle: user@datadoghq.com + kind: exemption + reason: This metric has a pre-existing tag configuration. + id: dd.test.metric + type: tag_indexing_rule_exemptions + schema: + $ref: "#/components/schemas/TagIndexingRuleExemptionResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Too Many Requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - metric_tags_write + summary: Create a tag indexing rule exemption + tags: + - Metrics + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - metric_tags_write + /api/v2/metrics/{metric_name}/tag-indexing-rules: + get: + description: |- + List the tag indexing rules that apply to a given metric, sorted by `rule_order`. + Matching is performed server-side using each rule's `metric_name_matches` glob patterns. + operationId: ListTagIndexingRulesForMetric + parameters: + - $ref: "#/components/parameters/MetricName" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + meta: + total: 0 + schema: + $ref: "#/components/schemas/TagIndexingRulesResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Too Many Requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - metrics_read + summary: List tag indexing rules for a metric + tags: + - Metrics + "x-permission": + operator: OR + permissions: + - metrics_read /api/v2/metrics/{metric_name}/tags: delete: description: |- @@ -137855,9 +149450,9 @@ paths: /api/v2/metrics/{metric_name}/volumes: get: description: |- - View hourly average metric volumes for the given metric name over the look back period. - - Custom metrics generated in-app from other products will return `null` for ingested volumes. + View hourly average cardinality for the given metric name over the look back period. + For Metric Name Pricing customers, view total point volume for the given metric name + over the look back period. operationId: ListVolumesByMetricName parameters: - $ref: "#/components/parameters/MetricName" @@ -138231,6 +149826,7 @@ paths: required: false schema: default: 25 + format: int64 maximum: 100 type: integer - description: Page number (1-indexed). @@ -138239,6 +149835,7 @@ paths: required: false schema: default: 1 + format: int64 type: integer responses: "200": @@ -138554,6 +150151,7 @@ paths: required: false schema: default: 25 + format: int64 maximum: 100 type: integer - description: Page number (1-indexed). @@ -138562,6 +150160,7 @@ paths: required: false schema: default: 1 + format: int64 type: integer responses: "200": @@ -140322,6 +151921,118 @@ paths: summary: Update the tags for an interface tags: - Network Device Monitoring + /api/v2/network-health-insights: + get: + description: |- + Return network health insights for the organization within the given time window. + Insights are produced by analyzing DNS failures pre-classified by `network-dns-logger`, + TLS certificate metrics, and denied security group connections. Each insight + identifies the client and server services involved, the type of issue, and the + magnitude of the failure observed during the query window. + operationId: ListNetworkHealthInsights + parameters: + - description: |- + 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]`. + example: "1716800000" + in: query + name: from + required: false + schema: + type: string + - description: |- + 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 the current time. + If neither `from` nor `to` are provided, the query window will be `[now - 15m, now]`. + example: "1716800900" + in: query + name: to + required: false + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + client_service: "network-logger" + dns_query: "kafka-broker.internal.domain.com" + dns_server: "cluster-dns" + failure_magnitude: 150 + failure_rate: 91 + failure_type: "nxdomain" + server_service: "kafka" + total_requests: 1200 + traffic_volume: + bytes_read: 1800000 + bytes_written: 2500000 + total_traffic: 4300000 + type: "dns" + id: "example-insight-id" + type: "network-health-insights" + - attributes: + account_id: "123456789012" + certificate_id: "arn:aws:acm:us-east-1:123456789012:certificate/abcd1234-a123-456b-a123-12345678901f" + certificate_lifetime_percent: 96.7 + client_region: "us-west-2" + client_service: "N/A" + days_until_expiration: 3 + domain_name: "api.example.com" + failure_type: "expiring_soon" + loadbalancer_id: "arn:aws:elasticloadbalancing:us-east-1:123456789012:loadbalancer/app/my-lb/50dc6c495c0c9188" + server_region: "us-east-1" + server_service: "web-frontend" + type: "tls-cert" + id: "example-cert-insight-id" + type: "network-health-insights" + - attributes: + client_service: "web-frontend" + failure_magnitude: 85 + failure_rate: 68.5 + failure_type: "denied" + server_service: "database" + total_requests: 124 + type: "security-group" + id: "example-security-group-insight-id" + type: "network-health-insights" + schema: + $ref: "#/components/schemas/NetworkHealthInsightsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + summary: List network health insights + tags: + - Network Health Insights + x-permission: + operator: OR + permissions: + - network_health_insights_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/network/connections/aggregate: get: description: Get all aggregated connections. @@ -140460,6 +152171,40 @@ paths: summary: Get all aggregated DNS traffic tags: - Cloud Network Monitoring + /api/v2/oauth2/.well-known/sites: + get: + description: Retrieve the list of public OAuth2 sites available for the current environment. This endpoint is used for OAuth2 discovery and returns sites where users can authenticate. + operationId: GetOAuth2WellKnownSites + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + sites: + - datadoghq.com + - datadoghq.eu + - us5.datadoghq.com + - us3.datadoghq.com + - ap1.datadoghq.com + - ap2.datadoghq.com + id: prod + type: env + schema: + $ref: "#/components/schemas/OAuth2WellKnownSitesResponse" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: [] + summary: Get OAuth2 well-known sites + tags: + - OAuth2 Client Public + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/oauth2/clients/{client_uuid}/scopes_restriction: delete: description: Delete the scopes restriction configured for the OAuth2 client. @@ -142770,6 +154515,139 @@ paths: permissions: - org_management - org_connections_write + /api/v2/org/disable: + post: + description: |- + Disable the Datadog organization associated with the authenticated user or API key. + The request body uses JSON:API format. If `org_uuid` is supplied, it must match + the authenticated org or the request is rejected. Successful calls disable the org + and return the resulting state from the downstream service. Requires the + `org_management` permission. + operationId: DisableCustomerOrg + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + org_uuid: "abcdef01-2345-6789-abcd-ef0123456789" + id: "1" + type: "customer_org_disable" + schema: + $ref: "#/components/schemas/CustomerOrgDisableRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + status: "disabled" + id: "abcdef01-2345-6789-abcd-ef0123456789" + type: "org_disable" + schema: + $ref: "#/components/schemas/CustomerOrgDisableResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - org_management + summary: Disable the authenticated customer organization + tags: + - Customer Org + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/org/saml_configurations: + patch: + description: |- + Update the SAML preferences for the current organization. + + Use this endpoint to set the just-in-time (JIT) provisioning domains and the default role + assigned to just-in-time provisioned users. + operationId: UpdateOrgSamlConfigurations + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + default_role_uuids: + - 8dd1cf3c-0c75-11ea-ad28-fb5701eabc7d + jit_domains: + - example.com + type: saml_preferences + schema: + $ref: "#/components/schemas/OrgSAMLPreferencesUpdateRequest" + required: true + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update organization SAML preferences + tags: + - Organizations + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - org_management + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/org_configs: get: description: Returns all Org Configs (name, description, and value). @@ -142789,12 +154667,17 @@ paths: value_type: bool id: abcd1234 type: org_configs - schema: {$ref: "#/components/schemas/OrgConfigListResponse"} + schema: + $ref: "#/components/schemas/OrgConfigListResponse" description: OK - "400": {$ref: "#/components/responses/BadRequestResponse"} - "401": {$ref: "#/components/responses/UnauthorizedResponse"} - "403": {$ref: "#/components/responses/ForbiddenResponse"} - "429": {$ref: "#/components/responses/TooManyRequestsResponse"} + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" summary: List Org Configs tags: [Organizations] "x-permission": @@ -142804,7 +154687,8 @@ paths: get: description: Return the name, description, and value of a specific Org Config. operationId: GetOrgConfig - parameters: [$ref: "#/components/parameters/OrgConfigName"] + parameters: + - $ref: "#/components/parameters/OrgConfigName" responses: "200": content: @@ -142820,13 +154704,19 @@ paths: value_type: bool id: abcd1234 type: org_configs - schema: {$ref: "#/components/schemas/OrgConfigGetResponse"} + schema: + $ref: "#/components/schemas/OrgConfigGetResponse" 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"} + "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" summary: Get a specific Org Config value tags: [Organizations] "x-permission": @@ -142835,7 +154725,8 @@ paths: patch: description: Update the value of a specific Org Config. operationId: UpdateOrgConfig - parameters: [$ref: "#/components/parameters/OrgConfigName"] + parameters: + - $ref: "#/components/parameters/OrgConfigName" requestBody: content: application/json: @@ -142846,7 +154737,8 @@ paths: attributes: value: UTC type: org_configs - schema: {$ref: "#/components/schemas/OrgConfigWriteRequest"} + schema: + $ref: "#/components/schemas/OrgConfigWriteRequest" required: true responses: "200": @@ -142863,13 +154755,19 @@ paths: value_type: bool id: abcd1234 type: org_configs - schema: {$ref: "#/components/schemas/OrgConfigGetResponse"} + schema: + $ref: "#/components/schemas/OrgConfigGetResponse" 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"} + "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" summary: Update a specific Org Config tags: [Organizations] "x-permission": @@ -148633,6 +160531,7 @@ paths: name: page[limit] schema: example: 10 + format: int64 type: integer - description: Filter by application ID. in: query @@ -148794,6 +160693,227 @@ paths: summary: Update replay heatmap snapshot tags: - Rum Replay Heatmaps + /api/v2/reporting/schedule: + post: + description: |- + Create a new scheduled report. A schedule renders a dashboard or integration dashboard + on a recurring cadence and delivers it to the configured recipients over email, Slack, + or Microsoft Teams. + Requires the `generate_dashboard_reports` permission. + operationId: CreateReportSchedule + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + delivery_format: pdf + description: "Weekly summary of infrastructure health." + recipients: + - "user@example.com" + - "slack:T01234567.C01234567.alerts" + - "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2" + resource_id: "abc-def-ghi" + resource_type: dashboard + rrule: "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0" + template_variables: + - name: "env" + values: + - "prod" + timeframe: "1w" + timezone: "America/New_York" + title: "Weekly Infrastructure Report" + type: schedule + schema: + $ref: "#/components/schemas/ReportScheduleCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + delivery_format: pdf + description: "Weekly summary of infrastructure health." + next_recurrence: 1780923600000 + recipients: + - "user@example.com" + - "slack:T01234567.C01234567.alerts" + - "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2" + resource_id: "abc-def-ghi" + resource_type: dashboard + rrule: "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0" + status: active + tab_id: "66666666-7777-8888-9999-000000000000" + template_variables: + - name: "env" + values: + - "prod" + timeframe: "1w" + timezone: "America/New_York" + title: "Weekly Infrastructure Report" + id: "11111111-2222-3333-4444-555555555555" + relationships: + author: + data: + id: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + type: users + type: schedule + included: + - attributes: + email: "user@example.com" + name: "Example User" + id: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + type: users + schema: + $ref: "#/components/schemas/ReportScheduleResponse" + description: CREATED + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create a report schedule + tags: + - Report Schedules + x-codegen-request-body-name: body + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/reporting/schedule/{schedule_uuid}: + patch: + description: |- + Update an existing scheduled report by its identifier. The editable attributes + are replaced with the supplied values; the targeted resource (`resource_id` and + `resource_type`) cannot be changed after creation. + Requires the `generate_dashboard_reports` permission and schedule ownership. + operationId: PatchReportSchedule + parameters: + - description: The unique identifier of the report schedule to update. + example: "11111111-2222-3333-4444-555555555555" + in: path + name: schedule_uuid + required: true + schema: + format: uuid + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + delivery_format: pdf + description: "Updated weekly summary of infrastructure health." + recipients: + - "user@example.com" + - "slack:T01234567.C01234567.alerts" + - "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2" + rrule: "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0" + template_variables: + - name: "env" + values: + - "prod" + timeframe: "1w" + timezone: "America/New_York" + title: "Weekly Infrastructure Report" + type: schedule + schema: + $ref: "#/components/schemas/ReportSchedulePatchRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + delivery_format: pdf + description: "Updated weekly summary of infrastructure health." + next_recurrence: 1780923600000 + recipients: + - "user@example.com" + - "slack:T01234567.C01234567.alerts" + - "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2" + resource_id: "abc-def-ghi" + resource_type: dashboard + rrule: "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0" + status: active + tab_id: "66666666-7777-8888-9999-000000000000" + template_variables: + - name: "env" + values: + - "prod" + timeframe: "1w" + timezone: "America/New_York" + title: "Weekly Infrastructure Report" + id: "11111111-2222-3333-4444-555555555555" + relationships: + author: + data: + id: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + type: users + type: schedule + included: + - attributes: + email: "user@example.com" + name: "Example User" + id: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + type: users + schema: + $ref: "#/components/schemas/ReportScheduleResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update a report schedule + tags: + - Report Schedules + x-codegen-request-body-name: body + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/restriction_policy/{resource_id}: delete: description: Deletes the restriction policy associated with a specified resource. @@ -150434,7 +162554,7 @@ paths: - rum_apps_write /api/v2/rum/config/metrics: get: - description: Get the list of configured rum-based metrics with their definitions. + description: Get the list of configured RUM-based metrics with their definitions. operationId: ListRumMetrics responses: "200": @@ -150466,13 +162586,13 @@ paths: $ref: "#/components/responses/NotAuthorizedResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" - summary: Get all rum-based metrics + summary: Get all RUM-based metrics tags: - Rum Metrics post: description: |- Create a metric based on your organization's RUM data. - Returns the rum-based metric object from the request body when the request is successful. + Returns the RUM-based metric object from the request body when the request is successful. operationId: CreateRumMetric requestBody: content: @@ -150498,7 +162618,7 @@ paths: type: rum_metrics schema: $ref: "#/components/schemas/RumMetricCreateRequest" - description: The definition of the new rum-based metric. + description: The definition of the new RUM-based metric. required: true responses: "201": @@ -150534,13 +162654,13 @@ paths: $ref: "#/components/responses/ConflictResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" - summary: Create a rum-based metric + summary: Create a RUM-based metric tags: - Rum Metrics x-codegen-request-body-name: body /api/v2/rum/config/metrics/{metric_id}: delete: - description: Delete a specific rum-based metric from your organization. + description: Delete a specific RUM-based metric from your organization. operationId: DeleteRumMetric parameters: - $ref: "#/components/parameters/RumMetricIDParameter" @@ -150553,11 +162673,11 @@ paths: $ref: "#/components/responses/NotFoundResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" - summary: Delete a rum-based metric + summary: Delete a RUM-based metric tags: - Rum Metrics get: - description: Get a specific rum-based metric from your organization. + description: Get a specific RUM-based metric from your organization. operationId: GetRumMetric parameters: - $ref: "#/components/parameters/RumMetricIDParameter" @@ -150593,13 +162713,13 @@ paths: $ref: "#/components/responses/NotFoundResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" - summary: Get a rum-based metric + summary: Get a RUM-based metric tags: - Rum Metrics patch: description: |- - Update a specific rum-based metric from your organization. - Returns the rum-based metric object from the request body when the request is successful. + Update a specific RUM-based metric from your organization. + Returns the RUM-based metric object from the request body when the request is successful. operationId: UpdateRumMetric parameters: - $ref: "#/components/parameters/RumMetricIDParameter" @@ -150622,7 +162742,7 @@ paths: type: rum_metrics schema: $ref: "#/components/schemas/RumMetricUpdateRequest" - description: New definition of the rum-based metric. + description: New definition of the RUM-based metric. required: true responses: "200": @@ -150660,10 +162780,146 @@ paths: $ref: "#/components/responses/ConflictResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" - summary: Update a rum-based metric + summary: Update a RUM-based metric tags: - Rum Metrics x-codegen-request-body-name: body + /api/v2/rum/config/rate-limit/{scope_type}/{scope_id}: + delete: + description: Delete the RUM rate limit configuration for a given scope. + operationId: DeleteRumRateLimitConfig + parameters: + - $ref: "#/components/parameters/RumRateLimitScopeTypeParameter" + - $ref: "#/components/parameters/RumRateLimitScopeIDParameter" + responses: + "204": + description: No Content + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Delete a RUM rate limit configuration + tags: + - Rum Rate Limit + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get the RUM rate limit configuration for a given scope. + operationId: GetRumRateLimitConfig + parameters: + - $ref: "#/components/parameters/RumRateLimitScopeTypeParameter" + - $ref: "#/components/parameters/RumRateLimitScopeIDParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + custom: + daily_reset_time: "08:00" + daily_reset_timezone: "+09:00" + quota_reached_action: stop + session_limit: 1000000 + window_type: daily + mode: custom + org_id: 2 + updated_at: "2026-03-04T15:37:54.951447Z" + updated_by: test@example.com + id: cd73a516-a481-4af5-8352-9b577465c77b + type: rum_rate_limit_config + schema: + $ref: "#/components/schemas/RumRateLimitConfigResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get a RUM rate limit configuration + tags: + - Rum Rate Limit + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + put: + description: |- + Create or update the RUM rate limit configuration for a given scope. + Returns the rate limit configuration object when the request is successful. + operationId: UpdateRumRateLimitConfig + parameters: + - $ref: "#/components/parameters/RumRateLimitScopeTypeParameter" + - $ref: "#/components/parameters/RumRateLimitScopeIDParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + custom: + daily_reset_time: "08:00" + daily_reset_timezone: "+09:00" + quota_reached_action: stop + session_limit: 1000000 + window_type: daily + mode: custom + id: cd73a516-a481-4af5-8352-9b577465c77b + type: rum_rate_limit_config + schema: + $ref: "#/components/schemas/RumRateLimitConfigUpdateRequest" + description: The definition of the RUM rate limit configuration to create or update. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + custom: + daily_reset_time: "08:00" + daily_reset_timezone: "+09:00" + quota_reached_action: stop + session_limit: 1000000 + window_type: daily + mode: custom + org_id: 2 + updated_at: "2026-03-04T21:52:53.526022Z" + updated_by: test@example.com + id: cd73a516-a481-4af5-8352-9b577465c77b + type: rum_rate_limit_config + schema: + $ref: "#/components/schemas/RumRateLimitConfigResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create or update a RUM rate limit configuration + tags: + - Rum Rate Limit + x-codegen-request-body-name: body + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/rum/events: get: description: |- @@ -151112,12 +163368,14 @@ paths: name: page[number] schema: example: 0 + format: int64 type: integer - description: Number of items per page. in: query name: page[size] schema: example: 25 + format: int64 type: integer responses: "200": @@ -151140,7 +163398,7 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: List rum replay playlists + summary: List RUM replay playlists tags: - Rum Replay Playlists post: @@ -151184,7 +163442,7 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Create rum replay playlist + summary: Create RUM replay playlist tags: - Rum Replay Playlists /api/v2/rum/replay/playlists/{playlist_id}: @@ -151198,6 +163456,7 @@ paths: required: true schema: example: 1234567 + format: int64 type: integer responses: "204": @@ -151208,7 +163467,7 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Delete rum replay playlist + summary: Delete RUM replay playlist tags: - Rum Replay Playlists get: @@ -151221,6 +163480,7 @@ paths: required: true schema: example: 1234567 + format: int64 type: integer responses: "200": @@ -151243,7 +163503,7 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Get rum replay playlist + summary: Get RUM replay playlist tags: - Rum Replay Playlists put: @@ -151256,6 +163516,7 @@ paths: required: true schema: example: 1234567 + format: int64 type: integer requestBody: content: @@ -151295,7 +163556,7 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Update rum replay playlist + summary: Update RUM replay playlist tags: - Rum Replay Playlists /api/v2/rum/replay/playlists/{playlist_id}/sessions: @@ -151309,6 +163570,7 @@ paths: required: true schema: example: 1234567 + format: int64 type: integer requestBody: content: @@ -151331,7 +163593,7 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Bulk remove rum replay playlist sessions + summary: Bulk remove RUM replay playlist sessions tags: - Rum Replay Playlists get: @@ -151344,18 +163606,21 @@ paths: required: true schema: example: 1234567 + format: int64 type: integer - description: Page number for pagination (0-indexed). in: query name: page[number] schema: example: 0 + format: int64 type: integer - description: Number of items per page. in: query name: page[size] schema: example: 25 + format: int64 type: integer responses: "200": @@ -151378,7 +163643,7 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: List rum replay playlist sessions + summary: List RUM replay playlist sessions tags: - Rum Replay Playlists /api/v2/rum/replay/playlists/{playlist_id}/sessions/{session_id}: @@ -151392,6 +163657,7 @@ paths: required: true schema: example: 1234567 + format: int64 type: integer - description: Unique identifier of the session. in: path @@ -151409,7 +163675,7 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Remove rum replay session from playlist + summary: Remove RUM replay session from playlist tags: - Rum Replay Playlists put: @@ -151436,6 +163702,7 @@ paths: required: true schema: example: 1234567 + format: int64 type: integer - description: Unique identifier of the session. in: path @@ -151479,7 +163746,7 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Add rum replay session to playlist + summary: Add RUM replay session to playlist tags: - Rum Replay Playlists /api/v2/rum/replay/sessions/{session_id}/views/{view_id}/segments: @@ -151519,6 +163786,7 @@ paths: name: max_list_size schema: example: 1048576 + format: int64 type: integer - description: Paging token for pagination. in: query @@ -151548,12 +163816,14 @@ paths: name: page[size] schema: example: 25 + format: int64 type: integer - description: Page number for pagination (0-indexed). in: query name: page[number] schema: example: 0 + format: int64 type: integer - description: Unique identifier of the session. in: path @@ -151585,7 +163855,7 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: List rum replay session watchers + summary: List RUM replay session watchers tags: - Rum Replay Viewership /api/v2/rum/replay/sessions/{session_id}/watches: @@ -151609,7 +163879,7 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Delete rum replay session watch + summary: Delete RUM replay session watch tags: - Rum Replay Viewership post: @@ -151661,7 +163931,7 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: Create rum replay session watch + summary: Create RUM replay session watch tags: - Rum Replay Viewership /api/v2/rum/replay/viewership-history/sessions: @@ -151681,6 +163951,7 @@ paths: name: page[number] schema: example: 0 + format: int64 type: integer - description: Filter by user UUID. Defaults to current user if not specified. in: query @@ -151706,6 +163977,7 @@ paths: name: page[size] schema: example: 25 + format: int64 type: integer - description: Filter by application ID. in: query @@ -151734,9 +164006,60 @@ paths: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: [] - summary: List rum replay viewership history sessions + summary: List RUM replay viewership history sessions tags: - Rum Replay Viewership + /api/v2/saml_configurations: + get: + description: Get the list of SAML configurations for the current organization. An organization has at most one SAML configuration. + operationId: ListSAMLConfigurations + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + assertion_consumer_service: + - https://app.datadoghq.com/account/saml/assertion + entity_id: https://app.datadoghq.com/account/saml/metadata.xml?id=00000000-0000-0000-0000-000000000000 + expires_at: "2010-10-26T13:31:15+00:00" + idp_initiated: true + jit_domains: + - example.com + sso_url: https://app.datadoghq.com/account/login/id/00000000-0000-0000-0000-000000000000 + id: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + relationships: + default_roles: + data: + - id: 8dd1cf3c-0c75-11ea-ad28-fb5701eabc7d + type: roles + type: saml_configurations + included: + - attributes: + name: Datadog Standard Role + id: 8dd1cf3c-0c75-11ea-ad28-fb5701eabc7d + type: roles + schema: + $ref: "#/components/schemas/SAMLConfigurationsResponse" + description: OK + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Authentication Error + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List SAML configurations + tags: + - Organizations + "x-permission": + operator: OR + permissions: + - org_management /api/v2/saml_configurations/idp_metadata: post: description: |- @@ -151778,6 +164101,162 @@ paths: operator: OR permissions: - org_management + /api/v2/saml_configurations/{saml_config_uuid}: + get: + description: Get a single SAML configuration for the current organization by its UUID. + operationId: GetSAMLConfiguration + parameters: + - $ref: "#/components/parameters/SAMLConfigurationUUIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + assertion_consumer_service: + - https://app.datadoghq.com/account/saml/assertion + entity_id: https://app.datadoghq.com/account/saml/metadata.xml?id=00000000-0000-0000-0000-000000000000 + expires_at: "2010-10-26T13:31:15+00:00" + idp_initiated: true + jit_domains: + - example.com + sso_url: https://app.datadoghq.com/account/login/id/00000000-0000-0000-0000-000000000000 + id: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + relationships: + default_roles: + data: + - id: 8dd1cf3c-0c75-11ea-ad28-fb5701eabc7d + type: roles + type: saml_configurations + included: + - attributes: + name: Datadog Standard Role + id: 8dd1cf3c-0c75-11ea-ad28-fb5701eabc7d + type: roles + schema: + $ref: "#/components/schemas/SAMLConfigurationResponse" + description: OK + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Authentication Error + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get a SAML configuration + tags: + - Organizations + "x-permission": + operator: OR + permissions: + - org_management + patch: + description: |- + Update a single SAML configuration for the current organization. + + Use this endpoint to enable or disable identity-provider-initiated login, set the + just-in-time provisioning domains, and set the default role assigned to + just-in-time provisioned users. A default role is required to enable just-in-time provisioning. + operationId: UpdateSAMLConfiguration + parameters: + - $ref: "#/components/parameters/SAMLConfigurationUUIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + idp_initiated: true + jit_domains: + - example.com + id: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + relationships: + default_roles: + data: + - id: 8dd1cf3c-0c75-11ea-ad28-fb5701eabc7d + type: roles + type: saml_configurations + schema: + $ref: "#/components/schemas/SAMLConfigurationUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + assertion_consumer_service: + - https://app.datadoghq.com/account/saml/assertion + entity_id: https://app.datadoghq.com/account/saml/metadata.xml?id=00000000-0000-0000-0000-000000000000 + expires_at: "2010-10-26T13:31:15+00:00" + idp_initiated: true + jit_domains: + - example.com + sso_url: https://app.datadoghq.com/account/login/id/00000000-0000-0000-0000-000000000000 + id: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + relationships: + default_roles: + data: + - id: 8dd1cf3c-0c75-11ea-ad28-fb5701eabc7d + type: roles + type: saml_configurations + included: + - attributes: + name: Datadog Standard Role + id: 8dd1cf3c-0c75-11ea-ad28-fb5701eabc7d + type: roles + schema: + $ref: "#/components/schemas/SAMLConfigurationResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Authentication Error + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not Found + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Unprocessable Entity + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update a SAML configuration + tags: + - Organizations + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - org_management /api/v2/scorecard/campaigns: get: description: Fetches all scorecard campaigns. @@ -152826,6 +165305,7 @@ paths: required: false schema: default: 0 + format: int64 type: integer - description: Number of scores to return. Max is 1000. in: query @@ -152833,6 +165313,7 @@ paths: required: false schema: default: 100 + format: int64 type: integer responses: "200": @@ -152940,6 +165421,7 @@ paths: name: page[limit] required: false schema: + format: int64 type: integer - description: Cursor for pagination. in: query @@ -153067,6 +165549,7 @@ paths: schema: default: 10 example: 10 + format: int64 type: integer - description: Page number to return (1-indexed). in: query @@ -153075,6 +165558,7 @@ paths: schema: default: 1 example: 1 + format: int64 type: integer - description: Query ID for pagination consistency. in: query @@ -153408,6 +165892,69 @@ paths: permissions: - security_monitoring_findings_read - appsec_vm_read + /api/v2/security/findings/assignee: + patch: + description: >- + Assign or unassign security findings. + + You can assign up to 100 security findings per request. Set `assignee_id` to the unique identifier of the Datadog user you want to assign the findings to. Omit `assignee_id` (or set it to `null`) to unassign the findings. Per-finding warnings and failures are returned in the response `meta` object. + operationId: UpdateFindingsAssignee + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + assignee_id: "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0" + id: "00000000-0000-0000-0000-000000000001" + relationships: + findings: + data: + - id: "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==" + type: "findings" + type: "assignee" + schema: + $ref: "#/components/schemas/AssigneeRequest" + required: true + responses: + "202": + content: + application/json: + examples: + default: + value: + data: + attributes: + assignee_id: "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0" + id: "00000000-0000-0000-0000-000000000001" + type: "assignee" + schema: + $ref: "#/components/schemas/AssigneeResponse" + description: Accepted + "400": + $ref: "#/components/responses/BadRequestResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Assign or unassign security findings + tags: + - "Security Monitoring" + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - security_monitoring_findings_write + - appsec_vm_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/security/findings/cases: delete: description: >- @@ -153875,6 +166422,150 @@ paths: permissions: - security_monitoring_findings_read - appsec_vm_read + /api/v2/security/findings/servicenow_tickets: + patch: + description: >- + Attach security findings to a ServiceNow ticket by providing the ServiceNow ticket URL. + + You can attach up to 50 security findings per ServiceNow ticket. If the ServiceNow ticket is not linked to any case, this operation will create a case for the security findings and link the ServiceNow ticket to the newly created case. Security findings that are already attached to another ServiceNow ticket will be detached from their previous ServiceNow ticket and attached to the specified ServiceNow ticket. + operationId: AttachServiceNowTicket + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + servicenow_ticket_url: https://example.service-now.com/now/nav/ui/classic/params/target/incident.do?sys_id=abcdef0123456789abcdef0123456789 + relationships: + findings: + data: + - id: ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw== + type: findings + project: + data: + id: aeadc05e-98a8-11ec-ac2c-da7ad0900001 + type: projects + type: servicenow_tickets + schema: + $ref: "#/components/schemas/AttachServiceNowTicketRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-01T00:00:00+00:00" + description: A description of the ServiceNow ticket. + modified_at: "2024-01-01T00:00:00+00:00" + priority: P4 + status: OPEN + title: A title for the ServiceNow ticket. + id: 00000000-0000-0000-0000-000000000006 + type: cases + schema: + $ref: "#/components/schemas/FindingCaseResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Attach security findings to a ServiceNow ticket + tags: + - "Security Monitoring" + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - security_monitoring_findings_write + - appsec_vm_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: >- + Create ServiceNow tickets for security findings. + + This operation creates a case in Datadog and a ServiceNow ticket linked to that case for bidirectional sync between Datadog and ServiceNow. You can create up to 50 ServiceNow tickets per request and associate up to 50 security findings per ServiceNow ticket. Security findings that are already attached to another ServiceNow ticket will be detached from their previous ServiceNow ticket and attached to the newly created ServiceNow ticket. + operationId: CreateServiceNowTickets + requestBody: + content: + application/json: + examples: + default: + value: + data: + - attributes: + assignee_id: f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0 + description: A description of the ServiceNow ticket. + priority: NOT_DEFINED + title: A title for the ServiceNow ticket. + relationships: + findings: + data: + - id: ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw== + type: findings + project: + data: + id: aeadc05e-98a8-11ec-ac2c-da7ad0900001 + type: projects + type: servicenow_tickets + schema: + $ref: "#/components/schemas/CreateServiceNowTicketRequestArray" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + - attributes: + created_at: "2024-01-01T00:00:00+00:00" + description: A description of the ServiceNow ticket. + modified_at: "2024-01-01T00:00:00+00:00" + priority: P4 + status: OPEN + title: A title for the ServiceNow ticket. + id: 00000000-0000-0000-0000-000000000005 + type: cases + schema: + $ref: "#/components/schemas/FindingCaseResponseArray" + description: Created + "400": + $ref: "#/components/responses/BadRequestResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Create ServiceNow tickets for security findings + tags: + - "Security Monitoring" + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - security_monitoring_findings_write + - appsec_vm_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/security/sboms: get: description: |- @@ -156388,6 +169079,73 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/security_monitoring/configuration/notification_rules/send_notification_preview: + post: + description: Send a notification preview to test that a notification rule's targets are properly configured. + operationId: SendSecurityMonitoringNotificationPreview + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + enabled: true + name: Rule 1 + selectors: + query: env:prod + rule_types: + - log_detection + severities: + - critical + trigger_source: security_signals + targets: + - "@john.doe@email.com" + type: notification_rules + schema: + $ref: "#/components/schemas/CreateNotificationRuleParameters" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + preview_results: + - notification_status: DEFAULT + rule_type: log_detection + id: rka-loa-zwu + type: notification_preview_response + schema: + $ref: "#/components/schemas/NotificationRulePreviewResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_notification_profiles_write + summary: Test a notification rule + tags: + - Security Monitoring + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - security_monitoring_notification_profiles_write /api/v2/security_monitoring/configuration/security_filters: get: description: Get the list of configured security filters with their definitions. @@ -158037,9 +170795,10 @@ paths: - attributes: revisions: - attributes: + accounts: + - linked-account-123 display_name: Test User - emails: - - user@example.com + email: user@example.com principal_id: user@example.com first_seen_at: "2026-04-01T00:00:00Z" last_seen_at: "2026-05-01T00:00:00Z" @@ -158070,7 +170829,98 @@ paths: permissions: - siem_entities_read x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/security_monitoring/entity_context/{id}: + get: + description: |- + Get a single entity from the Cloud SIEM entity context store by its identifier, returning the historical + revisions of the entity in the requested time range. The endpoint can either return revisions across an + interval (`from` / `to`) or the snapshot of the entity at a single point in time (`as_of`); the two modes + are mutually exclusive. + operationId: GetSingleEntityContext + parameters: + - description: The unique identifier of the entity to retrieve. + in: path + name: id + required: true + schema: + example: user@example.com + type: string + - description: |- + The start of the time range to query, as an RFC3339 timestamp or a relative time (for example, `now-7d`). + Defaults to `now-7d`. Ignored when `as_of` is set. + in: query + name: from + required: false + schema: + default: now-7d + example: now-7d + type: string + - description: |- + The end of the time range to query, as an RFC3339 timestamp or a relative time (for example, `now`). + Defaults to `now`. Ignored when `as_of` is set. + in: query + name: to + required: false + schema: + default: now + example: now + type: string + - description: |- + A point in time at which to query the entity revisions, as an RFC3339 timestamp, a Unix timestamp + (in seconds), or a relative time (for example, `now-1d`). When set, `from` and `to` are ignored. + Cannot be combined with custom `from` / `to` values. + example: now-1d + in: query + name: as_of + required: false + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + revisions: + - attributes: + accounts: + - linked-account-123 + display_name: Test User + email: user@example.com + principal_id: user@example.com + first_seen_at: "2026-04-01T00:00:00Z" + last_seen_at: "2026-05-01T00:00:00Z" + id: user@example.com + type: siem_entity_identity + schema: + $ref: "#/components/schemas/SingleEntityContextResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - siem_entities_read + summary: Get a single entity context + tags: ["Security Monitoring"] + x-permission: + operator: OR + permissions: + - siem_entities_read + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/security_monitoring/rules: get: @@ -158876,6 +171726,60 @@ paths: operator: OR permissions: - security_monitoring_rules_read + /api/v2/security_monitoring/rules/{rule_id}/restore/{version}: + post: + description: |- + Restores a custom detection rule to a previously saved historical version. + Only custom rules can be restored. Default and partner rules return 400. + The restore creates a new version entry; it does not overwrite history. + operationId: RestoreSecurityMonitoringRule + parameters: + - $ref: "#/components/parameters/SecurityMonitoringRuleID" + - $ref: "#/components/parameters/SecurityMonitoringRuleVersion" + responses: + "200": + content: + "application/json": + examples: + default: + value: + cases: + - condition: "a > 0" + name: "" + notifications: [] + status: info + id: abc-123 + isEnabled: true + message: Test rule + name: My security monitoring rule. + tags: [] + type: log_detection + schema: + $ref: "#/components/schemas/SecurityMonitoringRuleResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "409": + $ref: "#/components/responses/ConflictResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_rules_write + summary: Restore a rule to a historical version + tags: ["Security Monitoring"] + "x-permission": + operator: OR + permissions: + - security_monitoring_rules_write + x-unstable: |- + **Note**: This endpoint is in beta and may be subject to changes. /api/v2/security_monitoring/rules/{rule_id}/test: post: description: |- @@ -161573,123 +174477,6 @@ paths: operator: OR permissions: - service_account_write - /api/v2/services: - get: - deprecated: true - description: >- - 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. - operationId: ListIncidentServices - parameters: - - $ref: "#/components/parameters/IncidentServiceIncludeQueryParameter" - - $ref: "#/components/parameters/PageSize" - - $ref: "#/components/parameters/PageOffset" - - $ref: "#/components/parameters/IncidentServiceSearchQueryParameter" - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - - attributes: - name: test-service - id: 00000000-0000-0000-0000-000000000002 - type: services - schema: - $ref: "#/components/schemas/IncidentServicesResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - incident_read - summary: Get a list of all incident services - tags: - - Incident Services - "x-permission": - operator: OR - permissions: - - incident_read - x-unstable: |- - **Note**: This endpoint is deprecated. - post: - deprecated: true - description: Creates a new incident service. - operationId: CreateIncidentService - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - name: an example service name - relationships: - created_by: - data: - id: 00000000-0000-0000-2345-000000000000 - type: users - last_modified_by: - data: - id: 00000000-0000-0000-2345-000000000000 - type: users - type: services - schema: - $ref: "#/components/schemas/IncidentServiceCreateRequest" - description: Incident Service Payload. - required: true - responses: - "201": - content: - application/json: - examples: - default: - value: - data: - attributes: - name: test-service - id: 00000000-0000-0000-0000-000000000001 - type: services - schema: - $ref: "#/components/schemas/IncidentServiceResponse" - description: CREATED - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - incident_settings_write - summary: Create a new incident service - tags: - - Incident Services - x-codegen-request-body-name: body - "x-permission": - operator: OR - permissions: - - incident_settings_write - x-unstable: |- - **Note**: This endpoint is deprecated. /api/v2/services/definitions: get: description: Get a list of all service definitions from the Datadog Service Catalog. @@ -161902,159 +174689,6 @@ paths: operator: OR permissions: - apm_service_catalog_read - /api/v2/services/{service_id}: - delete: - deprecated: true - description: Deletes an existing incident service. - operationId: DeleteIncidentService - parameters: - - $ref: "#/components/parameters/IncidentServiceIDPathParameter" - responses: - "204": - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - incident_settings_write - summary: Delete an existing incident service - tags: - - Incident Services - "x-permission": - operator: OR - permissions: - - incident_settings_write - x-unstable: |- - **Note**: This endpoint is deprecated. - get: - deprecated: true - description: |- - 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. - operationId: GetIncidentService - parameters: - - $ref: "#/components/parameters/IncidentServiceIDPathParameter" - - $ref: "#/components/parameters/IncidentServiceIncludeQueryParameter" - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - name: test-service - id: 00000000-0000-0000-0000-000000000004 - type: services - schema: - $ref: "#/components/schemas/IncidentServiceResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - incident_read - summary: Get details of an incident service - tags: - - Incident Services - "x-permission": - operator: OR - permissions: - - incident_read - x-unstable: |- - **Note**: This endpoint is deprecated. - patch: - deprecated: true - description: >- - Updates an existing incident service. Only provide the attributes which should be updated as this request is a partial update. - operationId: UpdateIncidentService - parameters: - - $ref: "#/components/parameters/IncidentServiceIDPathParameter" - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - name: an example service name - id: 00000000-0000-0000-0000-000000000000 - relationships: - created_by: - data: - id: 00000000-0000-0000-2345-000000000000 - type: users - last_modified_by: - data: - id: 00000000-0000-0000-2345-000000000000 - type: users - type: services - schema: - $ref: "#/components/schemas/IncidentServiceUpdateRequest" - description: Incident Service Payload. - required: true - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - name: test-service - id: 00000000-0000-0000-0000-000000000003 - type: services - schema: - $ref: "#/components/schemas/IncidentServiceResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - incident_settings_write - summary: Update an existing incident service - tags: - - Incident Services - x-codegen-request-body-name: body - "x-permission": - operator: OR - permissions: - - incident_settings_write - x-unstable: |- - **Note**: This endpoint is deprecated. /api/v2/siem-historical-detections/histsignals: get: description: List hist signals. @@ -162792,6 +175426,841 @@ paths: x-unstable: |- **Note**: This endpoint is in public beta and it's subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/sourcemaps: + delete: + description: |- + Deletes source maps matching the specified filter criteria. Supports + dry-run mode to preview which source maps would be deleted without + performing the actual deletion. + operationId: DeleteSourcemaps + parameters: + - description: |- + The type of source map. Valid values are `js`, `jvm`, `ios`, + `react`, `flutter`, `elf`, `ndk`, `il2cpp`. + in: query + name: mapkind + required: true + schema: + $ref: "#/components/schemas/SourcemapMapKind" + - description: |- + When set to `true`, returns the source maps that would be deleted + without performing the actual deletion. When set to `false`, + performs the deletion. + in: query + name: dry_run + required: true + schema: + example: true + type: boolean + - description: |- + Filter by service names (multiple values allowed). Required for + `js`, `jvm`, `react`, and `flutter` map kinds. + explode: true + in: query + name: filter[service] + schema: + example: + - my-web-service + items: + type: string + type: array + style: form + - description: |- + Filter by version values (multiple values allowed, maximum 10). + Required for `js`, `jvm`, `react`, and `flutter` map kinds. + explode: true + in: query + name: filter[version] + schema: + example: + - 1.0.0 + items: + type: string + type: array + style: form + - description: Filter by variant values (multiple values allowed). Supported for `jvm`. + explode: true + in: query + name: filter[variant] + schema: + items: + type: string + type: array + style: form + - description: Filter by source map ID values (multiple values allowed). Supported for all map kinds. + explode: true + in: query + name: filter[id] + schema: + items: + type: string + type: array + style: form + - description: Filter by build ID values (multiple values allowed). Supported for `jvm`, `ndk`, and `il2cpp`. + explode: true + in: query + name: filter[build_id] + schema: + items: + type: string + type: array + style: form + - description: Filter by UUID values (multiple values allowed). Supported for `ios`. + explode: true + in: query + name: filter[uuid] + schema: + items: + type: string + type: array + style: form + - description: Filter by platform values (multiple values allowed). Supported for `react`. + explode: true + in: query + name: filter[platform] + schema: + items: + type: string + type: array + style: form + - description: Filter by build number values (multiple values allowed). Supported for `react`. + explode: true + in: query + name: filter[build_number] + schema: + items: + type: string + type: array + style: form + - description: Filter by bundle name values (multiple values allowed). Supported for `react`. + explode: true + in: query + name: filter[bundle_name] + schema: + items: + type: string + type: array + style: form + - description: |- + Filter by architecture values (multiple values allowed). Supported + for `flutter`, `elf`, and `ndk`. + explode: true + in: query + name: filter[arch] + schema: + items: + type: string + type: array + style: form + - description: Filter by symbol source values (multiple values allowed). Supported for `elf`. + explode: true + in: query + name: filter[symbol_source] + schema: + items: + type: string + type: array + style: form + - description: Filter by origin values (multiple values allowed). Supported for `elf`. + explode: true + in: query + name: filter[origin] + schema: + items: + type: string + type: array + style: form + - description: Filter by origin version values (multiple values allowed). Supported for `elf`. + explode: true + in: query + name: filter[origin_version] + schema: + items: + type: string + type: array + style: form + - description: Filter by filename (single value). Supported for `js`, `elf`, and `ndk`. + in: query + name: filter[filename] + schema: + type: string + - description: Filter by debug ID (single value). Supported for `react`. + in: query + name: filter[debug_id] + schema: + type: string + - description: Filter by GNU build ID (single value). Supported for `elf`. + in: query + name: filter[gnu_build_id] + schema: + type: string + - description: Filter by Go build ID (single value). Supported for `elf`. + in: query + name: filter[go_build_id] + schema: + type: string + - description: Filter by file hash (single value). Supported for `elf`. + in: query + name: filter[file_hash] + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + absolute_path: /js/bundle.min.js + created_at: "2024-01-01T00:00:00Z" + mapkind: js + service: my-web-service + size: 1024 + version: 1.0.0 + id: "5" + type: sourcemaps + schema: + $ref: "#/components/schemas/SourcemapsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + summary: Delete source maps + tags: + - RUM + x-permission: + operator: OR + permissions: + - rum_delete_data + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: |- + Retrieves the content of a specific JavaScript source map file by its + filename, service name, and version. + operationId: GetSourcemaps + parameters: + - description: The path to the source map file. + in: query + name: filename + required: true + schema: + example: js/bundle.min.js.map + type: string + - description: The service name associated with the source map. + in: query + name: service + required: true + schema: + example: my-web-service + type: string + - description: The version of the service associated with the source map. + in: query + name: version + required: true + schema: + example: 1.0.0 + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + file: bundle.js + mappings: AAAA,OAAO,CAAC,GAAG + minifiedLineLengths: + - 50 + - 30 + names: + - console + - log + sourceRoot: / + sources: + - src/index.js + - src/utils.js + sourcesContent: + - "console.log('index');" + - "export function util() {}" + version: 3 + id: path/to/sourcemap.js.map + type: sourcemap_files + schema: + $ref: "#/components/schemas/SourcemapFileResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + summary: Get a JavaScript source map + tags: + - RUM + x-permission: + operator: OR + permissions: + - rum_apps_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/sourcemaps/list: + get: + description: Retrieves a paginated list of source maps matching the specified filter criteria. + operationId: ListSourcemaps + parameters: + - description: The type of source map. Defaults to `js`. + in: query + name: mapkind + schema: + $ref: "#/components/schemas/SourcemapMapKind" + - description: The number of results to return per page. Must be at least 1. + in: query + name: page[size] + schema: + default: 20 + example: 20 + format: int64 + type: integer + - description: The page number to retrieve, starting from 1. + in: query + name: page[number] + schema: + default: 1 + example: 1 + format: int64 + type: integer + - description: |- + Filter by service names (multiple values allowed). Required for + `js`, `jvm`, `react`, and `flutter` map kinds. + explode: true + in: query + name: filter[service] + schema: + example: + - my-web-service + items: + type: string + type: array + style: form + - description: |- + Filter by version values (multiple values allowed). Required for + `js`, `jvm`, `react`, and `flutter` map kinds. + explode: true + in: query + name: filter[version] + schema: + example: + - 1.0.0 + items: + type: string + type: array + style: form + - description: Filter by variant values (multiple values allowed). Supported for `jvm`. + explode: true + in: query + name: filter[variant] + schema: + items: + type: string + type: array + style: form + - description: Filter by source map ID values (multiple values allowed). Supported for all map kinds. + explode: true + in: query + name: filter[id] + schema: + items: + type: string + type: array + style: form + - description: Filter by build ID values (multiple values allowed). Supported for `jvm`, `ndk`, and `il2cpp`. + explode: true + in: query + name: filter[build_id] + schema: + items: + type: string + type: array + style: form + - description: Filter by UUID values (multiple values allowed). Supported for `ios`. + explode: true + in: query + name: filter[uuid] + schema: + items: + type: string + type: array + style: form + - description: Filter by platform values (multiple values allowed). Supported for `react`. + explode: true + in: query + name: filter[platform] + schema: + items: + type: string + type: array + style: form + - description: Filter by build number values (multiple values allowed). Supported for `react`. + explode: true + in: query + name: filter[build_number] + schema: + items: + type: string + type: array + style: form + - description: Filter by bundle name values (multiple values allowed). Supported for `react`. + explode: true + in: query + name: filter[bundle_name] + schema: + items: + type: string + type: array + style: form + - description: |- + Filter by architecture values (multiple values allowed). Supported + for `flutter`, `elf`, and `ndk`. + explode: true + in: query + name: filter[arch] + schema: + items: + type: string + type: array + style: form + - description: Filter by symbol source values (multiple values allowed). Supported for `elf`. + explode: true + in: query + name: filter[symbol_source] + schema: + items: + type: string + type: array + style: form + - description: Filter by origin values (multiple values allowed). Supported for `elf`. + explode: true + in: query + name: filter[origin] + schema: + items: + type: string + type: array + style: form + - description: Filter by origin version values (multiple values allowed). Supported for `elf`. + explode: true + in: query + name: filter[origin_version] + schema: + items: + type: string + type: array + style: form + - description: Filter by filename (single value). Supported for `js`, `elf`, and `ndk`. + in: query + name: filter[filename] + schema: + type: string + - description: Filter by debug ID (single value). Supported for `react`. + in: query + name: filter[debug_id] + schema: + type: string + - description: Filter by GNU build ID (single value). Supported for `elf`. + in: query + name: filter[gnu_build_id] + schema: + type: string + - description: Filter by Go build ID (single value). Supported for `elf`. + in: query + name: filter[go_build_id] + schema: + type: string + - description: Filter by file hash (single value). Supported for `elf`. + in: query + name: filter[file_hash] + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + absolute_path: /js/bundle.min.js + created_at: "2024-01-01T00:00:00Z" + mapkind: js + service: my-web-service + size: 1024 + version: 1.0.0 + id: "5" + type: sourcemaps + meta: + page: + has_more_results: false + total_filtered_count: 1 + schema: + $ref: "#/components/schemas/ListSourcemapsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "413": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Request Entity Too Large + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + summary: List source maps + tags: + - RUM + x-permission: + operator: OR + permissions: + - rum_apps_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/sourcemaps/restore: + patch: + description: |- + Restores previously deleted source maps matching the specified filter + criteria. Supports dry-run mode to preview which source maps would be + restored without performing the actual restoration. + operationId: RestoreSourcemaps + parameters: + - description: |- + The type of source map. Valid values are `js`, `jvm`, `ios`, + `react`, `flutter`, `elf`, `ndk`, `il2cpp`. + in: query + name: mapkind + required: true + schema: + $ref: "#/components/schemas/SourcemapMapKind" + - description: |- + When set to `true`, returns the source maps that would be restored + without performing the actual restoration. When set to `false`, + performs the restoration. + in: query + name: dry_run + required: true + schema: + example: true + type: boolean + - description: |- + Filter by service names (multiple values allowed). Required for + `js`, `jvm`, `react`, and `flutter` map kinds. + explode: true + in: query + name: filter[service] + schema: + example: + - my-web-service + items: + type: string + type: array + style: form + - description: |- + Filter by version values (multiple values allowed, maximum 10). + Required for `js`, `jvm`, `react`, and `flutter` map kinds. + explode: true + in: query + name: filter[version] + schema: + example: + - 1.0.0 + items: + type: string + type: array + style: form + - description: Filter by variant values (multiple values allowed). Supported for `jvm`. + explode: true + in: query + name: filter[variant] + schema: + items: + type: string + type: array + style: form + - description: Filter by source map ID values (multiple values allowed). Supported for all map kinds. + explode: true + in: query + name: filter[id] + schema: + items: + type: string + type: array + style: form + - description: Filter by build ID values (multiple values allowed). Supported for `jvm`, `ndk`, and `il2cpp`. + explode: true + in: query + name: filter[build_id] + schema: + items: + type: string + type: array + style: form + - description: Filter by UUID values (multiple values allowed). Supported for `ios`. + explode: true + in: query + name: filter[uuid] + schema: + items: + type: string + type: array + style: form + - description: Filter by platform values (multiple values allowed). Supported for `react`. + explode: true + in: query + name: filter[platform] + schema: + items: + type: string + type: array + style: form + - description: Filter by build number values (multiple values allowed). Supported for `react`. + explode: true + in: query + name: filter[build_number] + schema: + items: + type: string + type: array + style: form + - description: Filter by bundle name values (multiple values allowed). Supported for `react`. + explode: true + in: query + name: filter[bundle_name] + schema: + items: + type: string + type: array + style: form + - description: |- + Filter by architecture values (multiple values allowed). Supported + for `flutter`, `elf`, and `ndk`. + explode: true + in: query + name: filter[arch] + schema: + items: + type: string + type: array + style: form + - description: Filter by symbol source values (multiple values allowed). Supported for `elf`. + explode: true + in: query + name: filter[symbol_source] + schema: + items: + type: string + type: array + style: form + - description: Filter by origin values (multiple values allowed). Supported for `elf`. + explode: true + in: query + name: filter[origin] + schema: + items: + type: string + type: array + style: form + - description: Filter by origin version values (multiple values allowed). Supported for `elf`. + explode: true + in: query + name: filter[origin_version] + schema: + items: + type: string + type: array + style: form + - description: Filter by filename (single value). Supported for `js`, `elf`, and `ndk`. + in: query + name: filter[filename] + schema: + type: string + - description: Filter by debug ID (single value). Supported for `react`. + in: query + name: filter[debug_id] + schema: + type: string + - description: Filter by GNU build ID (single value). Supported for `elf`. + in: query + name: filter[gnu_build_id] + schema: + type: string + - description: Filter by Go build ID (single value). Supported for `elf`. + in: query + name: filter[go_build_id] + schema: + type: string + - description: Filter by file hash (single value). Supported for `elf`. + in: query + name: filter[file_hash] + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + absolute_path: /js/bundle.min.js + created_at: "2024-01-01T00:00:00Z" + mapkind: js + service: my-web-service + size: 1024 + version: 1.0.0 + id: "5" + type: sourcemaps + schema: + $ref: "#/components/schemas/SourcemapsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + summary: Restore source maps + tags: + - RUM + x-permission: + operator: OR + permissions: + - rum_delete_data + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/sourcemaps/service_repository_info: + post: + description: Returns the repository URL and commit SHA associated with a given service and version. + operationId: GetServiceRepositoryInfo + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + service: my-web-service + version: 1.0.0 + type: service_repository_info + schema: + $ref: "#/components/schemas/ServiceRepositoryInfoRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + commit_sha: abc123def456789 + repository_url: https://github.com/my-org/my-repo + status: success + id: my-web-service:1.0.0 + type: service_repository_info + schema: + $ref: "#/components/schemas/ServiceRepositoryInfoResponse" + description: OK + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + summary: Get service repository information + tags: + - RUM + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - rum_apps_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/spa/recommendations/{service}: get: description: This endpoint is currently experimental and restricted to Datadog internal use only. Retrieve resource recommendations for a Spark job. The caller (Spark Gateway or DJM UI) provides a service name and SPA returns structured recommendations for driver and executor resources. The version with a shard should be preferred, where possible, as it gives more accurate results. @@ -163178,6 +176647,138 @@ paths: tags: - Static Analysis x-unstable: "**Note**: This endpoint may be subject to changes." + /api/v2/static-analysis-sca/dependencies/scan: + post: + operationId: CreateSCAScan + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + commit_hash: 0e9fc8de83eaabecd722e1cd0ed44fb489fe15fc + libraries: + - exclusions: [] + is_dev: false + is_direct: true + package_manager: nuget + purl: pkg:nuget/Newtonsoft.Json@13.0.1 + target_frameworks: + - net8.0 + resource_name: my-org/my-repo + type: mcpscanrequest + schema: + $ref: "#/components/schemas/McpScanRequest" + required: true + responses: + "202": + content: + application/json: + examples: + default: + value: + data: + attributes: + job_id: 0190a3d4-1234-7000-8000-000000000000 + id: 0190a3d4-1234-7000-8000-000000000000 + type: mcpscanrequestresponse + schema: + $ref: "#/components/schemas/McpScanRequestResponse" + description: Accepted + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - code_analysis_read + summary: Submit libraries for vulnerability scanning + tags: + - Static Analysis + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/static-analysis-sca/dependencies/scan/{job_id}: + get: + operationId: GetSCAScan + parameters: + - description: The job identifier returned when the scan was submitted. + in: path + name: job_id + required: true + schema: + example: 0190a3d4-1234-7000-8000-000000000000 + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + vulnerabilities: [] + schema: + $ref: "#/components/schemas/ScanResultResponse" + description: OK + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - code_analysis_read + summary: Retrieve a dependency scan result + tags: + - Static Analysis + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/static-analysis-sca/licenses/list: + get: + operationId: ListSCALicenses + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + licenses: + - display_name: MIT License + identifier: MIT + short_name: MIT + id: 0190a3d4-1234-7000-8000-000000000000 + type: licenserequest + schema: + $ref: "#/components/schemas/LicensesListResponse" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get the list of SPDX licenses + tags: + - Static Analysis + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/static-analysis-sca/vulnerabilities/resolve-vulnerable-symbols: post: operationId: CreateSCAResolveVulnerableSymbols @@ -164741,6 +178342,7 @@ paths: required: false schema: default: 0 + format: int64 type: integer - description: Pagination limit in: query @@ -164748,6 +178350,7 @@ paths: required: false schema: default: 10 + format: int64 type: integer responses: "200": @@ -165443,12 +179046,14 @@ paths: name: page[offset] schema: default: 0 + format: int64 type: integer - description: The number of status pages to return per page. in: query name: page[limit] schema: default: 50 + format: int64 type: integer - description: Filter status pages by exact domain prefix match. Returns at most one result. in: query @@ -165589,12 +179194,14 @@ paths: name: page[offset] schema: default: 0 + format: int64 type: integer - description: The number of degradations to return per page. in: query name: page[limit] schema: default: 50 + format: int64 type: integer - description: "Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page." in: query @@ -165660,12 +179267,14 @@ paths: name: page[offset] schema: default: 0 + format: int64 type: integer - description: The number of maintenances to return per page. in: query name: page[limit] schema: default: 50 + format: int64 type: integer - description: "Comma-separated list of resources to include. Supported values: created_by_user, last_modified_by_user, status_page." in: query @@ -166854,6 +180463,75 @@ paths: - status_pages_settings_write - status_pages_public_page_publish - status_pages_internal_page_publish + /api/v2/stegadography/get-widgets: + post: + description: |- + Extracts watermarks from a PNG image and returns the cached widget data + associated with each watermark found. The image must be uploaded as a + `multipart/form-data` request with the file in the `image` field. + Only widgets belonging to the authenticated organization are returned. + operationId: GetStegadographyWidgets + requestBody: + content: + multipart/form-data: + examples: + default: + value: + image: "screenshot.png" + schema: + $ref: "#/components/schemas/StegadographyGetWidgetsRequest" + description: PNG image to extract watermarks from. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + locationx: 100 + locationy: 200 + rawData: '{"widgetType":"timeseries","requests":[]}' + watermark: "0123456789abcdef" + id: "abc123:0123456789abcdef" + type: widget + schema: + $ref: "#/components/schemas/StegadographyGetWidgetsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "415": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unsupported Media Type + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get widgets from an image + tags: + - Stegadography /api/v2/synthetics/api-multistep/subtests/{public_id}: get: description: |- @@ -169325,6 +183003,559 @@ paths: operator: OR permissions: - synthetics_global_variable_write + /api/v2/tag-policies: + get: + description: |- + Retrieve all tag policies for the organization. Optionally include disabled or deleted + policies, filter by telemetry source, and include each policy's current compliance score + via the `include=score` query parameter. + operationId: ListTagPolicies + parameters: + - description: Whether to include policies that are currently disabled. Defaults to `false`. + example: false + in: query + name: include_disabled + required: false + schema: + type: boolean + - description: Whether to include policies that have been soft-deleted. Defaults to `false`. + example: false + in: query + name: include_deleted + required: false + schema: + type: boolean + - description: Comma-separated list of related resources to include alongside each policy in the response. Currently the only supported value is `score`. + example: "score" + in: query + name: include + required: false + schema: + $ref: "#/components/schemas/TagPolicyInclude" + - description: Restrict the result set to policies whose source matches the given value. + in: query + name: filter[source] + required: false + schema: + $ref: "#/components/schemas/TagPolicySource" + - description: Start of the time window used for compliance score computation, as a Unix timestamp in milliseconds. Defaults to a recent window appropriate for the source. + example: 1779315066097 + in: query + name: ts_start + required: false + schema: + format: int64 + type: integer + - description: End of the time window used for compliance score computation, as a Unix timestamp in milliseconds. Must be in the past and greater than `ts_start`. + example: 1779401466097 + in: query + name: ts_end + required: false + schema: + format: int64 + type: integer + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + created_at: "2026-05-21T22:11:06.108696Z" + created_by: "test-user" + enabled: true + modified_at: "2026-05-21T22:11:06.108696Z" + modified_by: "test-user" + negated: false + policy_name: "Service tag must be one of api or web" + policy_type: "surfacing" + required: true + scope: "env" + source: "logs" + tag_key: "service" + tag_value_patterns: + - "api" + - "web" + version: 1 + id: "123" + relationships: + score: + data: + id: "123-v1-1779315066097-1779401466097" + type: "tag_policy_score" + type: "tag_policy" + included: + - attributes: + score: 80 + ts_end: 1779401466097 + ts_start: 1779315066097 + version: 1 + id: "123-v1-1779315066097-1779401466097" + type: "tag_policy_score" + schema: + $ref: "#/components/schemas/TagPoliciesListResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List tag policies + tags: + - Tag Policies + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: |- + Create a new tag policy for the organization. The caller's organization is derived from + the authenticated user; cross-organization creation is not supported. Fields such as + `policy_id`, `version`, and the timestamp/audit fields are assigned by the server. + operationId: CreateTagPolicy + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + enabled: true + negated: false + policy_name: "Service tag must be one of api or web" + policy_type: "surfacing" + required: true + scope: "env" + source: "logs" + tag_key: "service" + tag_value_patterns: + - "api" + - "web" + type: "tag_policy" + schema: + $ref: "#/components/schemas/TagPolicyCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2026-05-21T22:11:06.108696Z" + created_by: "test-user" + enabled: true + modified_at: "2026-05-21T22:11:06.108696Z" + modified_by: "test-user" + negated: false + policy_name: "Service tag must be one of api or web" + policy_type: "surfacing" + required: true + scope: "env" + source: "logs" + tag_key: "service" + tag_value_patterns: + - "api" + - "web" + version: 1 + id: "123" + type: "tag_policy" + schema: + $ref: "#/components/schemas/TagPolicyResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Conflict + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create a tag policy + tags: + - Tag Policies + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/tag-policies/{policy_id}: + delete: + description: |- + Delete a tag policy. By default the policy is soft-deleted so it can be recovered later + and so that historical score data remains queryable. Pass `hard_delete=true` to remove + the policy permanently. + operationId: DeleteTagPolicy + parameters: + - description: The unique identifier of the tag policy to delete. + example: "123" + in: path + name: policy_id + required: true + schema: + type: string + - description: Whether to permanently delete the policy instead of performing a soft delete. Defaults to `false`. + example: false + in: query + name: hard_delete + required: false + schema: + type: boolean + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Delete a tag policy + tags: + - Tag Policies + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: |- + Retrieve a single tag policy by ID. Optionally include the policy's current compliance + score via the `include=score` query parameter. Policies belonging to other organizations + cannot be retrieved. + operationId: GetTagPolicy + parameters: + - description: The unique identifier of the tag policy. + example: "123" + in: path + name: policy_id + required: true + schema: + type: string + - description: Comma-separated list of related resources to include alongside the policy. Currently the only supported value is `score`. + example: "score" + in: query + name: include + required: false + schema: + $ref: "#/components/schemas/TagPolicyInclude" + - description: Start of the time window used for compliance score computation, as a Unix timestamp in milliseconds. + example: 1779315066097 + in: query + name: ts_start + required: false + schema: + format: int64 + type: integer + - description: End of the time window used for compliance score computation, as a Unix timestamp in milliseconds. Must be in the past and greater than `ts_start`. + example: 1779401466097 + in: query + name: ts_end + required: false + schema: + format: int64 + type: integer + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2026-05-21T22:11:06.108696Z" + created_by: "test-user" + enabled: true + modified_at: "2026-05-21T22:11:06.108696Z" + modified_by: "test-user" + negated: false + policy_name: "Service tag must be one of api or web" + policy_type: "surfacing" + required: true + scope: "env" + source: "logs" + tag_key: "service" + tag_value_patterns: + - "api" + - "web" + version: 1 + id: "123" + relationships: + score: + data: + id: "123-v1-1779315066097-1779401466097" + type: "tag_policy_score" + type: "tag_policy" + included: + - attributes: + score: 80 + ts_end: 1779401466097 + ts_start: 1779315066097 + version: 1 + id: "123-v1-1779315066097-1779401466097" + type: "tag_policy_score" + schema: + $ref: "#/components/schemas/TagPolicyResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get a tag policy + tags: + - Tag Policies + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + patch: + description: |- + Update one or more attributes of an existing tag policy. Only the fields supplied in the + request body are modified; omitted fields retain their current values. The policy's + `source` cannot be changed after creation. + operationId: UpdateTagPolicy + parameters: + - description: The unique identifier of the tag policy to update. + example: "123" + in: path + name: policy_id + required: true + schema: + type: string + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + enabled: true + policy_name: "Service tag must be one of api, web, or worker" + id: "123" + type: "tag_policy" + schema: + $ref: "#/components/schemas/TagPolicyUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2026-05-21T22:11:06.108696Z" + created_by: "test-user" + enabled: true + modified_at: "2026-05-21T22:25:01.000000Z" + modified_by: "test-user" + negated: false + policy_name: "Service tag must be one of api, web, or worker" + policy_type: "surfacing" + required: true + scope: "env" + source: "logs" + tag_key: "service" + tag_value_patterns: + - "api" + - "web" + version: 2 + id: "123" + type: "tag_policy" + schema: + $ref: "#/components/schemas/TagPolicyResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update a tag policy + tags: + - Tag Policies + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/tag-policies/{policy_id}/score: + get: + description: |- + Retrieve the compliance score for a single tag policy. The score is computed over the + requested time window (or a source-appropriate default) and represents the percentage of + telemetry within that window that conforms to the policy. A `null` score indicates that + no relevant telemetry was found. + operationId: GetTagPolicyScore + parameters: + - description: The unique identifier of the tag policy. + example: "123" + in: path + name: policy_id + required: true + schema: + type: string + - description: Start of the time window used for compliance score computation, as a Unix timestamp in milliseconds. + example: 1779315066097 + in: query + name: ts_start + required: false + schema: + format: int64 + type: integer + - description: End of the time window used for compliance score computation, as a Unix timestamp in milliseconds. Must be in the past and greater than `ts_start`. + example: 1779401466097 + in: query + name: ts_end + required: false + schema: + format: int64 + type: integer + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + score: 80 + ts_end: 1779401466097 + ts_start: 1779315066097 + version: 1 + id: "123-v1-1779315066097-1779401466097" + type: "tag_policy_score" + schema: + $ref: "#/components/schemas/TagPolicyScoreResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get a tag policy compliance score + tags: + - Tag Policies + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/tags/enrichment: get: description: List all tag pipeline rulesets - Retrieve a list of all tag pipeline rulesets for the organization @@ -172293,7 +186524,327 @@ paths: - AuthZ: - usage_read - billing_read - summary: Get historical cost across your account + summary: Get historical cost across your account + tags: + - Usage Metering + "x-permission": + operator: AND + permissions: + - usage_read + - billing_read + /api/v2/usage/hourly_usage: + get: + description: Get hourly usage by product family. + operationId: GetHourlyUsage + parameters: + - description: "Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour." + in: query + name: filter[timestamp][start] + required: true + schema: + format: date-time + type: string + - description: "Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour." + in: query + name: filter[timestamp][end] + required: false + schema: + format: date-time + type: string + - description: |- + Comma separated list of product families to retrieve. Available families are `all`, `ai`, `analyzed_logs`, + `application_performance_monitoring`, `application_security`, `audit_trail`, `bits_ai`, `serverless`, `ci_app`, + `cloud_cost_management`, `cloud_siem`, `csm_container_enterprise`, `csm_host_enterprise`, `csm_host_pro`, `cspm`, + `custom_events`, `cws`, `data_observability`, `dbm`, `digital_experience_management`, `error_tracking`, + `fargate`, `infra_hosts`, `incident_management`, `indexed_logs`, `indexed_spans`, `infrastructure_monitoring`, + `ingested_spans`, `iot`, `lambda_traced_invocations`, `llm_observability`, `log_management`, `logs`, + `network_flows`, `network_hosts`, `network_monitoring`, `observability_pipelines`, `online_archive`, + `platform_capabilities`, `product_analytics`, `profiling`, `rum`, `rum_browser_sessions`, `rum_mobile_sessions`, + `sds`, `security`, `snmp`, `software_delivery`, `synthetics_api`, `synthetics_browser`, + `synthetics_mobile`, `synthetics_parallel_testing`, `timeseries`, `vuln_management` and `workflow_executions`. + The following product family has been **deprecated**: `audit_logs`. + in: query + name: filter[product_families] + required: true + schema: + type: string + - description: "Include child org usage in the response. Defaults to false." + in: query + name: filter[include_descendants] + required: false + schema: + default: false + type: boolean + - description: "Boolean to specify whether to include accounts connected to the current account as partner customers in the Datadog partner network program. Defaults to false." + in: query + name: filter[include_connected_accounts] + required: false + schema: + default: false + type: boolean + - description: "Include breakdown of usage by subcategories where applicable (for product family logs only). Defaults to false." + in: query + name: filter[include_breakdown] + required: false + schema: + default: false + type: boolean + - description: |- + 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`. + in: query + name: filter[versions] + required: false + schema: + type: string + - description: "Maximum number of results to return (between 1 and 500) - defaults to 500 if limit not specified." + in: query + name: page[limit] + required: false + schema: + default: 500 + format: int32 + maximum: 500 + minimum: 1 + type: integer + - description: "List following results with a next_record_id provided in the previous query." + in: query + name: page[next_record_id] + required: false + schema: + type: string + responses: + "200": + content: + application/json;datetime-format=rfc3339: + examples: + default: + value: + data: + - id: abc-123 + type: usage_timeseries + schema: + $ref: "#/components/schemas/HourlyUsageResponse" + description: OK + "400": + content: + application/json;datetime-format=rfc3339: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "403": + content: + application/json;datetime-format=rfc3339: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden - User is not authorized + "429": + content: + application/json;datetime-format=rfc3339: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Too many requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - usage_read + summary: Get hourly usage by product family + tags: + - Usage Metering + "x-permission": + operator: OR + permissions: + - usage_read + /api/v2/usage/lambda_traced_invocations: + get: + deprecated: true + description: |- + Get hourly usage for Lambda traced invocations. + **Note:** This endpoint has been deprecated.. Hourly usage data for all products is now available in the [Get hourly usage by product family API](https://docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family) + operationId: GetUsageLambdaTracedInvocations + parameters: + - description: "Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour." + in: query + name: start_hr + required: true + schema: + format: date-time + type: string + - description: |- + Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending + **before** this hour. + in: query + name: end_hr + required: false + schema: + format: date-time + type: string + responses: + "200": + content: + application/json;datetime-format=rfc3339: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/UsageLambdaTracedInvocationsResponse" + description: OK + "400": + content: + application/json;datetime-format=rfc3339: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "403": + content: + application/json;datetime-format=rfc3339: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden - User is not authorized + "429": + content: + application/json;datetime-format=rfc3339: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Too many requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - usage_read + summary: Get hourly usage for Lambda traced invocations + tags: + - Usage Metering + "x-permission": + operator: OR + permissions: + - usage_read + /api/v2/usage/observability_pipelines: + get: + deprecated: true + description: |- + Get hourly usage for observability pipelines. + **Note:** This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](https://docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family) + operationId: GetUsageObservabilityPipelines + parameters: + - description: "Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour." + in: query + name: start_hr + required: true + schema: + format: date-time + type: string + - description: |- + Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending + **before** this hour. + in: query + name: end_hr + required: false + schema: + format: date-time + type: string + responses: + "200": + content: + application/json;datetime-format=rfc3339: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/UsageObservabilityPipelinesResponse" + description: OK + "400": + content: + application/json;datetime-format=rfc3339: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "403": + content: + application/json;datetime-format=rfc3339: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden - User is not authorized + "429": + content: + application/json;datetime-format=rfc3339: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Too many requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - usage_read + summary: Get hourly usage for observability pipelines + tags: + - Usage Metering + "x-permission": + operator: OR + permissions: + - usage_read + /api/v2/usage/projected_cost: + get: + description: |- + Get projected cost across multi-org and single root-org accounts. + Projected cost data is only available for the current month and becomes available around the 12th of the month. + + This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/). + operationId: GetProjectedCost + parameters: + - description: "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`." + in: query + name: view + required: false + schema: + type: string + - description: "Boolean to specify whether to include accounts connected to the current account as partner customers in the Datadog partner network program. Defaults to `false`." + in: query + name: include_connected_accounts + required: false + schema: + default: false + type: boolean + responses: + "200": + content: + application/json;datetime-format=rfc3339: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/ProjectedCostResponse" + description: OK + "400": + content: + application/json;datetime-format=rfc3339: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request + "403": + content: + application/json;datetime-format=rfc3339: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden - User is not authorized + "429": + content: + application/json;datetime-format=rfc3339: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Too many requests + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - usage_read + - billing_read + summary: Get projected cost across your account tags: - Usage Metering "x-permission": @@ -172301,281 +186852,17 @@ paths: permissions: - usage_read - billing_read - /api/v2/usage/hourly_usage: - get: - description: Get hourly usage by product family. - operationId: GetHourlyUsage - parameters: - - description: "Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour." - in: query - name: filter[timestamp][start] - required: true - schema: - format: date-time - type: string - - description: "Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour." - in: query - name: filter[timestamp][end] - required: false - schema: - format: date-time - type: string - - description: |- - Comma separated list of product families to retrieve. Available families are `all`, `analyzed_logs`, - `application_security`, `audit_trail`, `bits_ai`, `serverless`, `ci_app`, `cloud_cost_management`, `cloud_siem`, - `csm_container_enterprise`, `csm_host_enterprise`, `cspm`, `custom_events`, `cws`, `dbm`, `error_tracking`, - `fargate`, `infra_hosts`, `incident_management`, `indexed_logs`, `indexed_spans`, `ingested_spans`, `iot`, - `lambda_traced_invocations`, `llm_observability`, `logs`, `network_flows`, `network_hosts`, `network_monitoring`, - `observability_pipelines`, `online_archive`, `profiling`, `product_analytics`, `rum`, `rum_browser_sessions`, - `rum_mobile_sessions`, `sds`, `snmp`, `software_delivery`, `synthetics_api`, `synthetics_browser`, - `synthetics_mobile`, `synthetics_parallel_testing`, `timeseries`, `vuln_management` and `workflow_executions`. - The following product family has been **deprecated**: `audit_logs`. - in: query - name: filter[product_families] - required: true - schema: - type: string - - description: "Include child org usage in the response. Defaults to false." - in: query - name: filter[include_descendants] - required: false - schema: - default: false - type: boolean - - description: "Boolean to specify whether to include accounts connected to the current account as partner customers in the Datadog partner network program. Defaults to false." - in: query - name: filter[include_connected_accounts] - required: false - schema: - default: false - type: boolean - - description: "Include breakdown of usage by subcategories where applicable (for product family logs only). Defaults to false." - in: query - name: filter[include_breakdown] - required: false - schema: - default: false - type: boolean - - description: |- - 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`. - in: query - name: filter[versions] - required: false - schema: - type: string - - description: "Maximum number of results to return (between 1 and 500) - defaults to 500 if limit not specified." - in: query - name: page[limit] - required: false - schema: - default: 500 - format: int32 - maximum: 500 - minimum: 1 - type: integer - - description: "List following results with a next_record_id provided in the previous query." - in: query - name: page[next_record_id] - required: false - schema: - type: string - responses: - "200": - content: - application/json;datetime-format=rfc3339: - examples: - default: - value: - data: - - id: abc-123 - type: usage_timeseries - schema: - $ref: "#/components/schemas/HourlyUsageResponse" - description: OK - "400": - content: - application/json;datetime-format=rfc3339: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Bad Request - "403": - content: - application/json;datetime-format=rfc3339: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Forbidden - User is not authorized - "429": - content: - application/json;datetime-format=rfc3339: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Too many requests - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - usage_read - summary: Get hourly usage by product family - tags: - - Usage Metering - "x-permission": - operator: OR - permissions: - - usage_read - /api/v2/usage/lambda_traced_invocations: - get: - deprecated: true - description: |- - Get hourly usage for Lambda traced invocations. - **Note:** This endpoint has been deprecated.. Hourly usage data for all products is now available in the [Get hourly usage by product family API](https://docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family) - operationId: GetUsageLambdaTracedInvocations - parameters: - - description: "Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour." - in: query - name: start_hr - required: true - schema: - format: date-time - type: string - - description: |- - Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending - **before** this hour. - in: query - name: end_hr - required: false - schema: - format: date-time - type: string - responses: - "200": - content: - application/json;datetime-format=rfc3339: - examples: - default: - value: - data: [] - schema: - $ref: "#/components/schemas/UsageLambdaTracedInvocationsResponse" - description: OK - "400": - content: - application/json;datetime-format=rfc3339: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Bad Request - "403": - content: - application/json;datetime-format=rfc3339: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Forbidden - User is not authorized - "429": - content: - application/json;datetime-format=rfc3339: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Too many requests - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - usage_read - summary: Get hourly usage for Lambda traced invocations - tags: - - Usage Metering - "x-permission": - operator: OR - permissions: - - usage_read - /api/v2/usage/observability_pipelines: + /api/v2/usage/summary/available_fields: get: - deprecated: true description: |- - Get hourly usage for observability pipelines. - **Note:** This endpoint has been deprecated. Hourly usage data for all products is now available in the [Get hourly usage by product family API](https://docs.datadoghq.com/api/latest/usage-metering/#get-hourly-usage-by-product-family) - operationId: GetUsageObservabilityPipelines - parameters: - - description: "Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour." - in: query - name: start_hr - required: true - schema: - format: date-time - type: string - - description: |- - Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending - **before** this hour. - in: query - name: end_hr - required: false - schema: - format: date-time - type: string - responses: - "200": - content: - application/json;datetime-format=rfc3339: - examples: - default: - value: - data: [] - schema: - $ref: "#/components/schemas/UsageObservabilityPipelinesResponse" - description: OK - "400": - content: - application/json;datetime-format=rfc3339: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Bad Request - "403": - content: - application/json;datetime-format=rfc3339: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Forbidden - User is not authorized - "429": - content: - application/json;datetime-format=rfc3339: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Too many requests - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - usage_read - summary: Get hourly usage for observability pipelines - tags: - - Usage Metering - "x-permission": - operator: OR - permissions: - - usage_read - /api/v2/usage/projected_cost: - get: - description: |- - Get projected cost across multi-org and single root-org accounts. - Projected cost data is only available for the current month and becomes available around the 12th of the month. + List the field names returned by `GET /api/v1/usage/summary` at each of its + three response levels. Each list contains every key the data endpoint + emits—both typed fields declared in the OpenAPI spec and untyped keys + exposed through `additionalProperties` (the latter used for billing + dimensions and usage types added after the v1 schema freeze). This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/). - operationId: GetProjectedCost - parameters: - - description: "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`." - in: query - name: view - required: false - schema: - type: string - - description: "Boolean to specify whether to include accounts connected to the current account as partner customers in the Datadog partner network program. Defaults to `false`." - in: query - name: include_connected_accounts - required: false - schema: - default: false - type: boolean + operationId: GetUsageSummaryAvailableFields responses: "200": content: @@ -172583,42 +186870,49 @@ paths: examples: default: value: - data: [] - schema: - $ref: "#/components/schemas/ProjectedCostResponse" - description: OK - "400": - content: - application/json;datetime-format=rfc3339: + data: + attributes: + date_fields: + - agent_host_top99p + - aws_host_top99p + - ccm_anthropic_spend_last + date_org_fields: + - agent_host_top99p + - aws_host_top99p + - ccm_anthropic_spend_last + response_fields: + - agent_host_top99p_sum + - aws_host_top99p_sum + - ccm_anthropic_spend_last_sum + id: all + type: usage_summary_available_fields schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Bad Request + $ref: "#/components/schemas/UsageSummaryAvailableFieldsResponse" + description: OK. "403": content: application/json;datetime-format=rfc3339: schema: $ref: "#/components/schemas/APIErrorResponse" - description: Forbidden - User is not authorized + description: Forbidden - User is not authorized. "429": content: application/json;datetime-format=rfc3339: schema: $ref: "#/components/schemas/APIErrorResponse" - description: Too many requests + description: Too many requests. security: - apiKeyAuth: [] appKeyAuth: [] - AuthZ: - usage_read - - billing_read - summary: Get projected cost across your account + summary: Get available fields for usage summary tags: - Usage Metering "x-permission": - operator: AND + operator: OR permissions: - usage_read - - billing_read /api/v2/usage/usage-attribution-types: get: description: |- @@ -173720,6 +188014,7 @@ paths: name: page[number] schema: default: 0 + format: int64 minimum: 0 type: integer - description: Number of widgets per page. @@ -173727,6 +188022,7 @@ paths: name: page[size] schema: default: 50 + format: int64 maximum: 100 type: integer responses: @@ -174731,6 +189027,18 @@ tags: all in a unified view for seamless collaboration and faster remediation. Go to https://docs.datadoghq.com/security/cloud_security_management to learn more. name: "CSM Coverage Analysis" + - description: |- + Datadog Cloud Security Management (CSM) Ownership infers the most likely owner + for a cloud resource by combining ownership signals from across the platform, + and lets you review the inference, inspect its evidence, and submit feedback to + persist, override, or correct the inferred owner. + For more information, see [Cloud Security Management](https://docs.datadoghq.com/security/cloud_security_management). + name: "CSM Ownership" + - description: |- + Datadog Cloud Security Management (CSM) Settings APIs allow you to list and filter + your cloud hosts monitored by CSM, covering both agentless and agent-based discovery. + For more information, see [Cloud Security Management](https://docs.datadoghq.com/security/cloud_security_management). + name: "CSM Settings" - description: |- Workload Protection monitors file, network, and process activity across your environment to detect real-time threats to your infrastructure. See [Workload Protection](https://docs.datadoghq.com/security/workload_protection/) for more information on setting up Workload Protection. @@ -174777,6 +189085,10 @@ tags: - description: |- The Containers API allows you to query container data for your organization. See the [Container Monitoring page](https://docs.datadoghq.com/containers/) for more information. name: Containers + - description: |- + Programmatic management of a customer's Datadog organization. Use this API to perform + self-service organization lifecycle actions such as disabling the authenticated org. + name: Customer Org - description: |- Search, send, or delete events for DORA Metrics to measure and improve your software delivery performance. See the [DORA Metrics page](https://docs.datadoghq.com/dora_metrics/) for more information. @@ -174797,6 +189109,8 @@ tags: - **Embed** sharing must be enabled under **Organization Settings** > **Public Sharing** > **Shared Dashboards**. - You need [an API key and an application key](https://docs.datadoghq.com/account_management/api-app-keys/) to interact with these endpoints. name: Dashboard Secure Embed + - description: Manage dashboard sharing configurations. + name: Dashboard Sharing - description: |- Get usage statistics for the dashboards in your organization, including view counts, last-edit times, widget counts, and quality scores. See the @@ -174806,6 +189120,8 @@ tags: - description: |- The Data Deletion API allows the user to target and delete data from the allowed products. It's currently enabled for Logs and RUM and depends on `logs_delete_data` and `rum_delete_data` permissions respectively. name: Data Deletion + - description: Manage and run data observability monitors. + name: Data Observability - description: |- Data Access Controls in Datadog is a feature that allows administrators and access managers to regulate access to sensitive data. By defining Restricted Datasets, you can ensure that only specific teams or roles can @@ -174857,6 +189173,10 @@ tags: Package Upgrade Deployments (`/upgrade`): - Upgrade the Datadog Agent to specific versions name: Fleet Automation + - description: |- + The Datadog Forms API lets you create and manage forms within the App Builder platform. + You can configure form settings, manage versions, and publish forms. + name: Forms - description: |- Configure your Datadog-Google Cloud Platform (GCP) integration directly through the Datadog API. Read more about the [Datadog-Google Cloud Platform integration](https://docs.datadoghq.com/integrations/google_cloud_platform). @@ -174883,8 +189203,6 @@ tags: This is an enterprise-only feature. Request access by contacting Datadog support, or see the [IP Allowlist page](https://docs.datadoghq.com/account_management/org_settings/ip_allowlist/) for more information. name: IP Allowlist - - description: Create, update, delete, and retrieve services which can be associated with incidents. See the [Incident Management page](https://docs.datadoghq.com/service_management/incident_management/) for more information. - name: Incident Services - description: Manage incident response, as well as associated attachments, metadata, and todos. See the [Incident Management page](https://docs.datadoghq.com/service_management/incident_management/) for more information. name: Incidents - description: |- @@ -174993,6 +189311,11 @@ tags: - description: |- The Network Device Monitoring API allows you to fetch devices and interfaces and their attributes. See the [Network Device Monitoring page](https://docs.datadoghq.com/network_monitoring/) for more information. name: Network Device Monitoring + - description: |- + Analyze network health by surfacing actionable insights for services experiencing connectivity issues. + Insights are derived from DNS failure data (timeouts, NXDOMAIN, SERVFAIL, general failures), + TLS certificate health (expired, expiring soon), and security group denials. + name: Network Health Insights - description: |- Configure OAuth2 clients for Datadog. Supports RFC 7591 Dynamic Client Registration and management of OAuth2 client scopes restrictions. @@ -175069,6 +189392,11 @@ tags: name: RUM Insights - description: View and manage Reference Tables in your organization. name: Reference Tables + - description: |- + Create and manage scheduled reports. A scheduled report renders a dashboard or integration + dashboard on a recurring cadence and delivers it to a set of recipients over email, Slack, + or Microsoft Teams. + name: Report Schedules - description: |- A restriction policy defines the access control rules for a resource, mapping a set of relations (such as editor and viewer) to a set of allowed principals (such as roles, teams, or users). @@ -175090,11 +189418,14 @@ tags: - description: Auto-generated tag Rum Audience Management name: Rum Audience Management - description: |- - Manage configuration of [rum-based metrics](https://app.datadoghq.com/rum/generate-metrics) for your organization. + Manage configuration of [RUM-based metrics](https://app.datadoghq.com/rum/generate-metrics) for your organization. externalDocs: description: Find out more at url: https://docs.datadoghq.com/real_user_monitoring/platform/generate_metrics/ name: Rum Metrics + - description: |- + Manage RUM rate limit configurations for your organization's RUM applications. + name: Rum Rate Limit - description: Manage heatmap snapshots for RUM replay sessions. Create, update, delete, and retrieve snapshots to visualize user interactions on specific views. name: Rum Replay Heatmaps - description: Create and manage playlists of RUM replay sessions. Organize, categorize, and share collections of replay sessions for analysis and collaboration. @@ -175141,6 +189472,13 @@ tags: name: Service Level Objectives - description: Manage your ServiceNow Integration. ServiceNow is a cloud-based platform that helps organizations manage digital workflows for enterprise operations. name: ServiceNow Integration + - description: |- + Configure your [Datadog Slack integration](https://docs.datadoghq.com/integrations/slack/) + directly through the Datadog API. + externalDocs: + description: For more information about the Datadog Slack integration, see the integration page. + url: https://docs.datadoghq.com/integrations/slack/ + name: Slack Integration - description: |- API to create, update, retrieve, and delete Software Catalog entities. externalDocs: @@ -175167,6 +189505,8 @@ tags: externalDocs: url: https://docs.datadoghq.com/api/latest/statuspage-integration name: Statuspage Integration + - description: Extract watermarks embedded in dashboard screenshots to retrieve cached widget state. + name: Stegadography - description: |- Enable Storage Management for S3 buckets, GCS buckets, and Azure containers. Each configuration registers the destination that holds inventory reports for the storage being monitored. name: Storage Management @@ -175179,6 +189519,13 @@ tags: You can use the Datadog API to create, manage, and organize tests and test suites programmatically. For more information, see the [Synthetic Monitoring documentation](https://docs.datadoghq.com/synthetics/). name: Synthetics + - description: |- + Tag Policies define rules that govern which tag values are accepted for a given tag key, + scoped to a particular telemetry source (such as logs, spans, or metrics). Policies can be + `blocking` (data not matching the policy is rejected) or `surfacing` (matching data is + highlighted but not blocked). Each policy reports a compliance `score` derived from how + much recent telemetry adheres to the policy. + name: Tag Policies - description: View and manage teams within Datadog. See the [Teams page](https://docs.datadoghq.com/account_management/teams/) for more information. name: Teams - description: |- diff --git a/.generator/src/generator/templates/modelSimple.j2 b/.generator/src/generator/templates/modelSimple.j2 index 7d8a556535e..60e2acc14ce 100644 --- a/.generator/src/generator/templates/modelSimple.j2 +++ b/.generator/src/generator/templates/modelSimple.j2 @@ -258,6 +258,9 @@ public class {{ name }} {%- if model.get("x-generate-alias-as-model") %} extends {%- else %} this.{{ variableName }} = {{ variableName }}; {%- endif %} + {%- if model.get("x-keep-typed-in-additional-properties") and model.additionalProperties is not false %} + putAdditionalProperty(JSON_PROPERTY_{{ attr|snake_case|upper }}, {%- if not isRequired and isNullable %} this.{{ variableName }}.orElse(null){%- else %} {{ variableName }}{%- endif %}); + {%- endif %} } {%- endif %} {%- endfor %} diff --git a/examples/v1/dashboards/CreateDashboard_2932151909.java b/examples/v1/dashboards/CreateDashboard_2844071429.java similarity index 97% rename from examples/v1/dashboards/CreateDashboard_2932151909.java rename to examples/v1/dashboards/CreateDashboard_2844071429.java index f427047d394..c00fae9367c 100644 --- a/examples/v1/dashboards/CreateDashboard_2932151909.java +++ b/examples/v1/dashboards/CreateDashboard_2844071429.java @@ -1,4 +1,4 @@ -// Create a new dashboard with sankey widget and rum data source +// Create a new dashboard with sankey widget and RUM data source import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v1/service-level-objective-corrections/CreateSLOCorrection_2888963657.java b/examples/v1/service-level-objective-corrections/CreateSLOCorrection_2888963657.java new file mode 100644 index 00000000000..39f1c682fdf --- /dev/null +++ b/examples/v1/service-level-objective-corrections/CreateSLOCorrection_2888963657.java @@ -0,0 +1,45 @@ +// Create an SLO correction with slo_query returns "OK" response +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v1.api.ServiceLevelObjectiveCorrectionsApi; +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.time.OffsetDateTime; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + ServiceLevelObjectiveCorrectionsApi apiInstance = + new ServiceLevelObjectiveCorrectionsApi(defaultClient); + + SLOCorrectionCreateRequest body = + new SLOCorrectionCreateRequest() + .data( + new SLOCorrectionCreateData() + .attributes( + new SLOCorrectionCreateRequestAttributes() + .category(SLOCorrectionCategory.SCHEDULED_MAINTENANCE) + .description("Example-Service-Level-Objective-Correction") + .end(OffsetDateTime.now().plusHours(1).toInstant().getEpochSecond()) + .sloQuery("env:prod service:checkout") + .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("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v1/service-level-objective-corrections/UpdateSLOCorrection_2949191256.java b/examples/v1/service-level-objective-corrections/UpdateSLOCorrection_2949191256.java new file mode 100644 index 00000000000..1d37062481a --- /dev/null +++ b/examples/v1/service-level-objective-corrections/UpdateSLOCorrection_2949191256.java @@ -0,0 +1,49 @@ +// Update an SLO correction with slo_query returns "OK" response +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +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.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.time.OffsetDateTime; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + ServiceLevelObjectiveCorrectionsApi apiInstance = + new ServiceLevelObjectiveCorrectionsApi(defaultClient); + + // there is a valid "correction_with_query" in the system + String CORRECTION_WITH_QUERY_DATA_ID = System.getenv("CORRECTION_WITH_QUERY_DATA_ID"); + + SLOCorrectionUpdateRequest body = + new SLOCorrectionUpdateRequest() + .data( + new SLOCorrectionUpdateData() + .attributes( + new SLOCorrectionUpdateRequestAttributes() + .category(SLOCorrectionCategory.SCHEDULED_MAINTENANCE) + .description("Example-Service-Level-Objective-Correction") + .end(OffsetDateTime.now().plusHours(1).toInstant().getEpochSecond()) + .sloQuery("env:staging service:checkout") + .start(OffsetDateTime.now().toInstant().getEpochSecond()) + .timezone("UTC")) + .type(SLOCorrectionType.CORRECTION)); + + try { + SLOCorrectionResponse result = + apiInstance.updateSLOCorrection(CORRECTION_WITH_QUERY_DATA_ID, body); + System.out.println(result); + } catch (ApiException e) { + 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(); + } + } +} diff --git a/examples/v2/aws-integration/ValidateAWSCCMConfig.java b/examples/v2/aws-integration/ValidateAWSCCMConfig.java new file mode 100644 index 00000000000..941fa4435d0 --- /dev/null +++ b/examples/v2/aws-integration/ValidateAWSCCMConfig.java @@ -0,0 +1,42 @@ +// Validate AWS CCM config returns "AWS CCM Config validation result" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.AwsIntegrationApi; +import com.datadog.api.client.v2.model.AWSCcmConfigValidationRequest; +import com.datadog.api.client.v2.model.AWSCcmConfigValidationRequestAttributes; +import com.datadog.api.client.v2.model.AWSCcmConfigValidationRequestData; +import com.datadog.api.client.v2.model.AWSCcmConfigValidationResponse; +import com.datadog.api.client.v2.model.AWSCcmConfigValidationType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.validateAWSCCMConfig", true); + AwsIntegrationApi apiInstance = new AwsIntegrationApi(defaultClient); + + AWSCcmConfigValidationRequest body = + new AWSCcmConfigValidationRequest() + .data( + new AWSCcmConfigValidationRequestData() + .attributes( + new AWSCcmConfigValidationRequestAttributes() + .accountId("123456789012") + .bucketName("billing") + .bucketRegion("us-east-1") + .reportName("cost-and-usage-report") + .reportPrefix("reports")) + .type(AWSCcmConfigValidationType.CCM_CONFIG_VALIDATION)); + + try { + AWSCcmConfigValidationResponse result = apiInstance.validateAWSCCMConfig(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AwsIntegrationApi#validateAWSCCMConfig"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/csm-ownership/CreateOwnershipFeedback.java b/examples/v2/csm-ownership/CreateOwnershipFeedback.java new file mode 100644 index 00000000000..3038b405394 --- /dev/null +++ b/examples/v2/csm-ownership/CreateOwnershipFeedback.java @@ -0,0 +1,47 @@ +// Submit feedback on an ownership inference returns "Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CsmOwnershipApi; +import com.datadog.api.client.v2.model.OwnershipFeedbackAction; +import com.datadog.api.client.v2.model.OwnershipFeedbackRequest; +import com.datadog.api.client.v2.model.OwnershipFeedbackRequestAttributes; +import com.datadog.api.client.v2.model.OwnershipFeedbackRequestData; +import com.datadog.api.client.v2.model.OwnershipFeedbackResponse; +import com.datadog.api.client.v2.model.OwnershipFeedbackType; +import com.datadog.api.client.v2.model.OwnershipOwnerType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createOwnershipFeedback", true); + CsmOwnershipApi apiInstance = new CsmOwnershipApi(defaultClient); + + OwnershipFeedbackRequest body = + new OwnershipFeedbackRequest() + .data( + new OwnershipFeedbackRequestData() + .attributes( + new OwnershipFeedbackRequestAttributes() + .action(OwnershipFeedbackAction.CONFIRM) + .actorHandle("user@example.com") + .actorType("user") + .correctedOwnerHandle("team-b") + .correctedOwnerType("team") + .inferenceChecksum("abc123") + .reason("Confirmed by team lead.")) + .type(OwnershipFeedbackType.OWNERSHIP_FEEDBACK)); + + try { + OwnershipFeedbackResponse result = + apiInstance.createOwnershipFeedback("res-1", OwnershipOwnerType.TEAM, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CsmOwnershipApi#createOwnershipFeedback"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/csm-ownership/GetOwnershipEvidence.java b/examples/v2/csm-ownership/GetOwnershipEvidence.java new file mode 100644 index 00000000000..9c76f6f7afd --- /dev/null +++ b/examples/v2/csm-ownership/GetOwnershipEvidence.java @@ -0,0 +1,27 @@ +// Get the evidence for an ownership inference returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CsmOwnershipApi; +import com.datadog.api.client.v2.model.OwnershipEvidenceResponse; +import com.datadog.api.client.v2.model.OwnershipOwnerType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getOwnershipEvidence", true); + CsmOwnershipApi apiInstance = new CsmOwnershipApi(defaultClient); + + try { + OwnershipEvidenceResponse result = + apiInstance.getOwnershipEvidence("test-resource", OwnershipOwnerType.TEAM); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CsmOwnershipApi#getOwnershipEvidence"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/csm-ownership/GetOwnershipInference.java b/examples/v2/csm-ownership/GetOwnershipInference.java new file mode 100644 index 00000000000..7b0989237f2 --- /dev/null +++ b/examples/v2/csm-ownership/GetOwnershipInference.java @@ -0,0 +1,27 @@ +// Get an ownership inference by owner type returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CsmOwnershipApi; +import com.datadog.api.client.v2.model.OwnershipInferenceResponse; +import com.datadog.api.client.v2.model.OwnershipOwnerType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getOwnershipInference", true); + CsmOwnershipApi apiInstance = new CsmOwnershipApi(defaultClient); + + try { + OwnershipInferenceResponse result = + apiInstance.getOwnershipInference("test-resource", OwnershipOwnerType.TEAM); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CsmOwnershipApi#getOwnershipInference"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/csm-ownership/ListOwnershipHistory.java b/examples/v2/csm-ownership/ListOwnershipHistory.java new file mode 100644 index 00000000000..5b9c23a1e23 --- /dev/null +++ b/examples/v2/csm-ownership/ListOwnershipHistory.java @@ -0,0 +1,25 @@ +// List ownership inference history for a resource returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CsmOwnershipApi; +import com.datadog.api.client.v2.model.OwnershipHistoryResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listOwnershipHistory", true); + CsmOwnershipApi apiInstance = new CsmOwnershipApi(defaultClient); + + try { + OwnershipHistoryResponse result = apiInstance.listOwnershipHistory("res-1"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CsmOwnershipApi#listOwnershipHistory"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/csm-ownership/ListOwnershipHistoryByOwnerType.java b/examples/v2/csm-ownership/ListOwnershipHistoryByOwnerType.java new file mode 100644 index 00000000000..5c28017cdeb --- /dev/null +++ b/examples/v2/csm-ownership/ListOwnershipHistoryByOwnerType.java @@ -0,0 +1,27 @@ +// List ownership history by owner type returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CsmOwnershipApi; +import com.datadog.api.client.v2.model.OwnershipHistoryResponse; +import com.datadog.api.client.v2.model.OwnershipOwnerType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listOwnershipHistoryByOwnerType", true); + CsmOwnershipApi apiInstance = new CsmOwnershipApi(defaultClient); + + try { + OwnershipHistoryResponse result = + apiInstance.listOwnershipHistoryByOwnerType("res-1", OwnershipOwnerType.TEAM); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CsmOwnershipApi#listOwnershipHistoryByOwnerType"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/csm-ownership/ListOwnershipInferences.java b/examples/v2/csm-ownership/ListOwnershipInferences.java new file mode 100644 index 00000000000..a89248f787e --- /dev/null +++ b/examples/v2/csm-ownership/ListOwnershipInferences.java @@ -0,0 +1,25 @@ +// List ownership inferences for a resource returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CsmOwnershipApi; +import com.datadog.api.client.v2.model.OwnershipInferenceListResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listOwnershipInferences", true); + CsmOwnershipApi apiInstance = new CsmOwnershipApi(defaultClient); + + try { + OwnershipInferenceListResponse result = apiInstance.listOwnershipInferences("test-resource"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CsmOwnershipApi#listOwnershipInferences"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/csm-settings/GetCSMAgentlessHostFacetInfo.java b/examples/v2/csm-settings/GetCSMAgentlessHostFacetInfo.java new file mode 100644 index 00000000000..6ddf557ceed --- /dev/null +++ b/examples/v2/csm-settings/GetCSMAgentlessHostFacetInfo.java @@ -0,0 +1,25 @@ +// Get agentless host facet info returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CsmSettingsApi; +import com.datadog.api.client.v2.model.CsmHostFacetInfoResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getCSMAgentlessHostFacetInfo", true); + CsmSettingsApi apiInstance = new CsmSettingsApi(defaultClient); + + try { + CsmHostFacetInfoResponse result = apiInstance.getCSMAgentlessHostFacetInfo("cloud_provider"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CsmSettingsApi#getCSMAgentlessHostFacetInfo"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/csm-settings/GetCSMUnifiedHostFacetInfo.java b/examples/v2/csm-settings/GetCSMUnifiedHostFacetInfo.java new file mode 100644 index 00000000000..14b60f09e1d --- /dev/null +++ b/examples/v2/csm-settings/GetCSMUnifiedHostFacetInfo.java @@ -0,0 +1,25 @@ +// Get unified host facet info returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CsmSettingsApi; +import com.datadog.api.client.v2.model.CsmHostFacetInfoResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getCSMUnifiedHostFacetInfo", true); + CsmSettingsApi apiInstance = new CsmSettingsApi(defaultClient); + + try { + CsmHostFacetInfoResponse result = apiInstance.getCSMUnifiedHostFacetInfo("cloud_provider"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CsmSettingsApi#getCSMUnifiedHostFacetInfo"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/csm-settings/ListCSMAgentlessHostFacets.java b/examples/v2/csm-settings/ListCSMAgentlessHostFacets.java new file mode 100644 index 00000000000..9891179e38c --- /dev/null +++ b/examples/v2/csm-settings/ListCSMAgentlessHostFacets.java @@ -0,0 +1,25 @@ +// List agentless host facets returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CsmSettingsApi; +import com.datadog.api.client.v2.model.CsmAgentlessHostFacetsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listCSMAgentlessHostFacets", true); + CsmSettingsApi apiInstance = new CsmSettingsApi(defaultClient); + + try { + CsmAgentlessHostFacetsResponse result = apiInstance.listCSMAgentlessHostFacets(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CsmSettingsApi#listCSMAgentlessHostFacets"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/csm-settings/ListCSMAgentlessHosts.java b/examples/v2/csm-settings/ListCSMAgentlessHosts.java new file mode 100644 index 00000000000..0cc7fcf2cba --- /dev/null +++ b/examples/v2/csm-settings/ListCSMAgentlessHosts.java @@ -0,0 +1,25 @@ +// List agentless hosts returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CsmSettingsApi; +import com.datadog.api.client.v2.model.CsmAgentlessHostsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listCSMAgentlessHosts", true); + CsmSettingsApi apiInstance = new CsmSettingsApi(defaultClient); + + try { + CsmAgentlessHostsResponse result = apiInstance.listCSMAgentlessHosts(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CsmSettingsApi#listCSMAgentlessHosts"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/csm-settings/ListCSMUnifiedHostFacets.java b/examples/v2/csm-settings/ListCSMUnifiedHostFacets.java new file mode 100644 index 00000000000..4c703838c3a --- /dev/null +++ b/examples/v2/csm-settings/ListCSMUnifiedHostFacets.java @@ -0,0 +1,25 @@ +// List unified host facets returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CsmSettingsApi; +import com.datadog.api.client.v2.model.CsmUnifiedHostFacetsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listCSMUnifiedHostFacets", true); + CsmSettingsApi apiInstance = new CsmSettingsApi(defaultClient); + + try { + CsmUnifiedHostFacetsResponse result = apiInstance.listCSMUnifiedHostFacets(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CsmSettingsApi#listCSMUnifiedHostFacets"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/fleet-automation/ListFleetClusters.java b/examples/v2/csm-settings/ListCSMUnifiedHosts.java similarity index 52% rename from examples/v2/fleet-automation/ListFleetClusters.java rename to examples/v2/csm-settings/ListCSMUnifiedHosts.java index 83848117e67..ddc574c4a86 100644 --- a/examples/v2/fleet-automation/ListFleetClusters.java +++ b/examples/v2/csm-settings/ListCSMUnifiedHosts.java @@ -1,21 +1,21 @@ -// List all fleet clusters returns "OK" response +// List unified hosts returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.FleetAutomationApi; -import com.datadog.api.client.v2.model.FleetClustersResponse; +import com.datadog.api.client.v2.api.CsmSettingsApi; +import com.datadog.api.client.v2.model.CsmUnifiedHostsResponse; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.listFleetClusters", true); - FleetAutomationApi apiInstance = new FleetAutomationApi(defaultClient); + defaultClient.setUnstableOperationEnabled("v2.listCSMUnifiedHosts", true); + CsmSettingsApi apiInstance = new CsmSettingsApi(defaultClient); try { - FleetClustersResponse result = apiInstance.listFleetClusters(); + CsmUnifiedHostsResponse result = apiInstance.listCSMUnifiedHosts(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling FleetAutomationApi#listFleetClusters"); + System.err.println("Exception when calling CsmSettingsApi#listCSMUnifiedHosts"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/examples/v2/customer-org/DisableCustomerOrg.java b/examples/v2/customer-org/DisableCustomerOrg.java new file mode 100644 index 00000000000..773133361af --- /dev/null +++ b/examples/v2/customer-org/DisableCustomerOrg.java @@ -0,0 +1,39 @@ +// Disable the authenticated customer organization returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.CustomerOrgApi; +import com.datadog.api.client.v2.model.CustomerOrgDisableRequest; +import com.datadog.api.client.v2.model.CustomerOrgDisableRequestAttributes; +import com.datadog.api.client.v2.model.CustomerOrgDisableRequestData; +import com.datadog.api.client.v2.model.CustomerOrgDisableResponse; +import com.datadog.api.client.v2.model.CustomerOrgDisableType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.disableCustomerOrg", true); + CustomerOrgApi apiInstance = new CustomerOrgApi(defaultClient); + + CustomerOrgDisableRequest body = + new CustomerOrgDisableRequest() + .data( + new CustomerOrgDisableRequestData() + .attributes( + new CustomerOrgDisableRequestAttributes() + .orgUuid("abcdef01-2345-6789-abcd-ef0123456789")) + .id("1") + .type(CustomerOrgDisableType.CUSTOMER_ORG_DISABLE)); + + try { + CustomerOrgDisableResponse result = apiInstance.disableCustomerOrg(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CustomerOrgApi#disableCustomerOrg"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/dashboard-sharing/ListSharedDashboardsByDashboardId.java b/examples/v2/dashboard-sharing/ListSharedDashboardsByDashboardId.java new file mode 100644 index 00000000000..83a1e729ce7 --- /dev/null +++ b/examples/v2/dashboard-sharing/ListSharedDashboardsByDashboardId.java @@ -0,0 +1,27 @@ +// List shared dashboards for a dashboard returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.DashboardSharingApi; +import com.datadog.api.client.v2.model.ListSharedDashboardsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listSharedDashboardsByDashboardId", true); + DashboardSharingApi apiInstance = new DashboardSharingApi(defaultClient); + + try { + ListSharedDashboardsResponse result = + apiInstance.listSharedDashboardsByDashboardId("abc-def-ghi"); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling DashboardSharingApi#listSharedDashboardsByDashboardId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/feature-flags/ListFeatureFlags.java b/examples/v2/feature-flags/ListFeatureFlags.java index cc834cf588a..4d362347249 100644 --- a/examples/v2/feature-flags/ListFeatureFlags.java +++ b/examples/v2/feature-flags/ListFeatureFlags.java @@ -13,7 +13,7 @@ public static void main(String[] args) { try { ListFeatureFlagsResponse result = - apiInstance.listFeatureFlags(new ListFeatureFlagsOptionalParameters().limit(10)); + apiInstance.listFeatureFlags(new ListFeatureFlagsOptionalParameters().limit(10L)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FeatureFlagsApi#listFeatureFlags"); diff --git a/examples/v2/fleet-automation/ListFleetInstrumentedPods.java b/examples/v2/fleet-automation/ListFleetInstrumentedPods.java deleted file mode 100644 index 0264981d8a2..00000000000 --- a/examples/v2/fleet-automation/ListFleetInstrumentedPods.java +++ /dev/null @@ -1,25 +0,0 @@ -// List instrumented pods for a cluster returns "OK" response - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.FleetAutomationApi; -import com.datadog.api.client.v2.model.FleetInstrumentedPodsResponse; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.listFleetInstrumentedPods", true); - FleetAutomationApi apiInstance = new FleetAutomationApi(defaultClient); - - try { - FleetInstrumentedPodsResponse result = apiInstance.listFleetInstrumentedPods("cluster_name"); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FleetAutomationApi#listFleetInstrumentedPods"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/forms/CloneForm.java b/examples/v2/forms/CloneForm.java new file mode 100644 index 00000000000..78e1b57a1c6 --- /dev/null +++ b/examples/v2/forms/CloneForm.java @@ -0,0 +1,38 @@ +// Clone a form returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.FormsApi; +import com.datadog.api.client.v2.model.CloneFormData; +import com.datadog.api.client.v2.model.CloneFormDataAttributes; +import com.datadog.api.client.v2.model.CloneFormRequest; +import com.datadog.api.client.v2.model.FormResponse; +import com.datadog.api.client.v2.model.FormType; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.cloneForm", true); + FormsApi apiInstance = new FormsApi(defaultClient); + + CloneFormRequest body = + new CloneFormRequest() + .data( + new CloneFormData() + .attributes(new CloneFormDataAttributes().name("Copy of My Form")) + .type(FormType.FORMS)); + + try { + FormResponse result = + apiInstance.cloneForm(UUID.fromString("22f6006a-2302-4926-9396-d2dfcf7b0b34"), body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FormsApi#cloneForm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/forms/CreateAndPublishForm.java b/examples/v2/forms/CreateAndPublishForm.java new file mode 100644 index 00000000000..aa914e91638 --- /dev/null +++ b/examples/v2/forms/CreateAndPublishForm.java @@ -0,0 +1,46 @@ +// Create and publish a form returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.FormsApi; +import com.datadog.api.client.v2.model.CreateFormData; +import com.datadog.api.client.v2.model.CreateFormDataAttributes; +import com.datadog.api.client.v2.model.CreateFormRequest; +import com.datadog.api.client.v2.model.FormDataDefinition; +import com.datadog.api.client.v2.model.FormResponse; +import com.datadog.api.client.v2.model.FormType; +import com.datadog.api.client.v2.model.FormUiDefinition; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createAndPublishForm", true); + FormsApi apiInstance = new FormsApi(defaultClient); + + CreateFormRequest body = + new CreateFormRequest() + .data( + new CreateFormData() + .attributes( + new CreateFormDataAttributes() + .anonymous(false) + .dataDefinition(new FormDataDefinition()) + .description("A form to collect user feedback.") + .idpSurvey(false) + .name("User Feedback Form") + .singleResponse(false) + .uiDefinition(new FormUiDefinition())) + .type(FormType.FORMS)); + + try { + FormResponse result = apiInstance.createAndPublishForm(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FormsApi#createAndPublishForm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/forms/CreateForm.java b/examples/v2/forms/CreateForm.java new file mode 100644 index 00000000000..9bb42778a6e --- /dev/null +++ b/examples/v2/forms/CreateForm.java @@ -0,0 +1,46 @@ +// Create a form returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.FormsApi; +import com.datadog.api.client.v2.model.CreateFormData; +import com.datadog.api.client.v2.model.CreateFormDataAttributes; +import com.datadog.api.client.v2.model.CreateFormRequest; +import com.datadog.api.client.v2.model.FormDataDefinition; +import com.datadog.api.client.v2.model.FormResponse; +import com.datadog.api.client.v2.model.FormType; +import com.datadog.api.client.v2.model.FormUiDefinition; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createForm", true); + FormsApi apiInstance = new FormsApi(defaultClient); + + CreateFormRequest body = + new CreateFormRequest() + .data( + new CreateFormData() + .attributes( + new CreateFormDataAttributes() + .anonymous(false) + .dataDefinition(new FormDataDefinition()) + .description("A form to collect user feedback.") + .idpSurvey(false) + .name("User Feedback Form") + .singleResponse(false) + .uiDefinition(new FormUiDefinition())) + .type(FormType.FORMS)); + + try { + FormResponse result = apiInstance.createForm(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FormsApi#createForm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/forms/DeleteForm.java b/examples/v2/forms/DeleteForm.java new file mode 100644 index 00000000000..bc1026c6949 --- /dev/null +++ b/examples/v2/forms/DeleteForm.java @@ -0,0 +1,34 @@ +// Delete a form returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.FormsApi; +import com.datadog.api.client.v2.model.DeleteFormResponse; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.deleteForm", true); + FormsApi apiInstance = new FormsApi(defaultClient); + + // there is a valid "form" in the system + UUID FORM_DATA_ID = null; + try { + FORM_DATA_ID = UUID.fromString(System.getenv("FORM_DATA_ID")); + } catch (IllegalArgumentException e) { + System.err.println("Error parsing UUID: " + e.getMessage()); + } + + try { + DeleteFormResponse result = apiInstance.deleteForm(FORM_DATA_ID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FormsApi#deleteForm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/forms/GetForm.java b/examples/v2/forms/GetForm.java new file mode 100644 index 00000000000..8f11f283ee3 --- /dev/null +++ b/examples/v2/forms/GetForm.java @@ -0,0 +1,34 @@ +// Get a form returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.FormsApi; +import com.datadog.api.client.v2.model.FormResponse; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getForm", true); + FormsApi apiInstance = new FormsApi(defaultClient); + + // there is a valid "form" in the system + UUID FORM_DATA_ID = null; + try { + FORM_DATA_ID = UUID.fromString(System.getenv("FORM_DATA_ID")); + } catch (IllegalArgumentException e) { + System.err.println("Error parsing UUID: " + e.getMessage()); + } + + try { + FormResponse result = apiInstance.getForm(FORM_DATA_ID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FormsApi#getForm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/forms/ListForms.java b/examples/v2/forms/ListForms.java new file mode 100644 index 00000000000..4712389e19e --- /dev/null +++ b/examples/v2/forms/ListForms.java @@ -0,0 +1,25 @@ +// List forms returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.FormsApi; +import com.datadog.api.client.v2.model.FormsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listForms", true); + FormsApi apiInstance = new FormsApi(defaultClient); + + try { + FormsResponse result = apiInstance.listForms(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FormsApi#listForms"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/forms/PublishForm.java b/examples/v2/forms/PublishForm.java new file mode 100644 index 00000000000..3b4c11ca682 --- /dev/null +++ b/examples/v2/forms/PublishForm.java @@ -0,0 +1,45 @@ +// Publish a form version returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.FormsApi; +import com.datadog.api.client.v2.model.FormPublicationResponse; +import com.datadog.api.client.v2.model.FormPublicationType; +import com.datadog.api.client.v2.model.PublishFormData; +import com.datadog.api.client.v2.model.PublishFormDataAttributes; +import com.datadog.api.client.v2.model.PublishFormRequest; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.publishForm", true); + FormsApi apiInstance = new FormsApi(defaultClient); + + // there is a valid "form" in the system + UUID FORM_DATA_ID = null; + try { + FORM_DATA_ID = UUID.fromString(System.getenv("FORM_DATA_ID")); + } catch (IllegalArgumentException e) { + System.err.println("Error parsing UUID: " + e.getMessage()); + } + + PublishFormRequest body = + new PublishFormRequest() + .data( + new PublishFormData() + .attributes(new PublishFormDataAttributes().version(1L)) + .type(FormPublicationType.FORM_PUBLICATIONS)); + + try { + FormPublicationResponse result = apiInstance.publishForm(FORM_DATA_ID, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FormsApi#publishForm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/forms/UpdateForm.java b/examples/v2/forms/UpdateForm.java new file mode 100644 index 00000000000..dc344de91e3 --- /dev/null +++ b/examples/v2/forms/UpdateForm.java @@ -0,0 +1,60 @@ +// Update a form returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.FormsApi; +import com.datadog.api.client.v2.model.FormDatastoreConfigAttributes; +import com.datadog.api.client.v2.model.FormResponse; +import com.datadog.api.client.v2.model.FormType; +import com.datadog.api.client.v2.model.FormUpdateAttributes; +import com.datadog.api.client.v2.model.UpdateFormData; +import com.datadog.api.client.v2.model.UpdateFormDataAttributes; +import com.datadog.api.client.v2.model.UpdateFormRequest; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.updateForm", true); + FormsApi apiInstance = new FormsApi(defaultClient); + + // there is a valid "form" in the system + UUID FORM_DATA_ID = null; + try { + FORM_DATA_ID = UUID.fromString(System.getenv("FORM_DATA_ID")); + } catch (IllegalArgumentException e) { + System.err.println("Error parsing UUID: " + e.getMessage()); + } + + UpdateFormRequest body = + new UpdateFormRequest() + .data( + new UpdateFormData() + .attributes( + new UpdateFormDataAttributes() + .formUpdate( + new FormUpdateAttributes() + .datastoreConfig( + new FormDatastoreConfigAttributes() + .datastoreId( + UUID.fromString( + "5108ea24-dd83-4696-9caa-f069f73d0fad")) + .primaryColumnName("id") + .primaryKeyGenerationStrategy("none")) + .description("An updated description.") + .name("Updated Form Name"))) + .id(FORM_DATA_ID) + .type(FormType.FORMS)); + + try { + FormResponse result = apiInstance.updateForm(FORM_DATA_ID, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FormsApi#updateForm"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/forms/UpsertAndPublishFormVersion.java b/examples/v2/forms/UpsertAndPublishFormVersion.java new file mode 100644 index 00000000000..357b59039a1 --- /dev/null +++ b/examples/v2/forms/UpsertAndPublishFormVersion.java @@ -0,0 +1,67 @@ +// Upsert and publish a form version returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.FormsApi; +import com.datadog.api.client.v2.model.FormDataDefinition; +import com.datadog.api.client.v2.model.FormDataDefinitionType; +import com.datadog.api.client.v2.model.FormResponse; +import com.datadog.api.client.v2.model.FormUiDefinition; +import com.datadog.api.client.v2.model.FormUiDefinitionUiTheme; +import com.datadog.api.client.v2.model.FormUiDefinitionUiThemePrimaryColor; +import com.datadog.api.client.v2.model.FormVersionType; +import com.datadog.api.client.v2.model.UpsertAndPublishFormVersionData; +import com.datadog.api.client.v2.model.UpsertAndPublishFormVersionDataAttributes; +import com.datadog.api.client.v2.model.UpsertAndPublishFormVersionRequest; +import com.datadog.api.client.v2.model.UpsertAndPublishFormVersionUpsertParams; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.upsertAndPublishFormVersion", true); + FormsApi apiInstance = new FormsApi(defaultClient); + + // there is a valid "form" in the system + UUID FORM_DATA_ID = null; + try { + FORM_DATA_ID = UUID.fromString(System.getenv("FORM_DATA_ID")); + } catch (IllegalArgumentException e) { + System.err.println("Error parsing UUID: " + e.getMessage()); + } + + UpsertAndPublishFormVersionRequest body = + new UpsertAndPublishFormVersionRequest() + .data( + new UpsertAndPublishFormVersionData() + .attributes( + new UpsertAndPublishFormVersionDataAttributes() + .dataDefinition( + new FormDataDefinition() + .description("Welcome to the Engineering Experience Survey.") + .title("Developer Experience Survey") + .type(FormDataDefinitionType.OBJECT)) + .uiDefinition( + new FormUiDefinition() + .uiTheme( + new FormUiDefinitionUiTheme() + .primaryColor( + FormUiDefinitionUiThemePrimaryColor.GRAY))) + .upsertParams( + new UpsertAndPublishFormVersionUpsertParams() + .etag( + "b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d"))) + .type(FormVersionType.FORM_VERSIONS)); + + try { + FormResponse result = apiInstance.upsertAndPublishFormVersion(FORM_DATA_ID, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FormsApi#upsertAndPublishFormVersion"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/forms/UpsertFormVersion.java b/examples/v2/forms/UpsertFormVersion.java new file mode 100644 index 00000000000..09a1091022c --- /dev/null +++ b/examples/v2/forms/UpsertFormVersion.java @@ -0,0 +1,72 @@ +// Create or update a form version returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.FormsApi; +import com.datadog.api.client.v2.model.FormDataDefinition; +import com.datadog.api.client.v2.model.FormDataDefinitionType; +import com.datadog.api.client.v2.model.FormUiDefinition; +import com.datadog.api.client.v2.model.FormUiDefinitionUiTheme; +import com.datadog.api.client.v2.model.FormUiDefinitionUiThemePrimaryColor; +import com.datadog.api.client.v2.model.FormVersionResponse; +import com.datadog.api.client.v2.model.FormVersionState; +import com.datadog.api.client.v2.model.FormVersionType; +import com.datadog.api.client.v2.model.LatestVersionMatchPolicy; +import com.datadog.api.client.v2.model.UpsertFormVersionData; +import com.datadog.api.client.v2.model.UpsertFormVersionDataAttributes; +import com.datadog.api.client.v2.model.UpsertFormVersionRequest; +import com.datadog.api.client.v2.model.UpsertFormVersionUpsertParams; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.upsertFormVersion", true); + FormsApi apiInstance = new FormsApi(defaultClient); + + // there is a valid "form" in the system + UUID FORM_DATA_ID = null; + try { + FORM_DATA_ID = UUID.fromString(System.getenv("FORM_DATA_ID")); + } catch (IllegalArgumentException e) { + System.err.println("Error parsing UUID: " + e.getMessage()); + } + + UpsertFormVersionRequest body = + new UpsertFormVersionRequest() + .data( + new UpsertFormVersionData() + .attributes( + new UpsertFormVersionDataAttributes() + .dataDefinition( + new FormDataDefinition() + .description("Welcome to the Engineering Experience Survey.") + .title("Developer Experience Survey") + .type(FormDataDefinitionType.OBJECT)) + .state(FormVersionState.FROZEN) + .uiDefinition( + new FormUiDefinition() + .uiTheme( + new FormUiDefinitionUiTheme() + .primaryColor( + FormUiDefinitionUiThemePrimaryColor.GRAY))) + .upsertParams( + new UpsertFormVersionUpsertParams() + .etag( + "b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d") + .insertOnly(false) + .matchPolicy(LatestVersionMatchPolicy.NONE))) + .type(FormVersionType.FORM_VERSIONS)); + + try { + FormVersionResponse result = apiInstance.upsertFormVersion(FORM_DATA_ID, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FormsApi#upsertFormVersion"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/google-chat-integration/CreateGoogleChatTargetAudience.java b/examples/v2/google-chat-integration/CreateGoogleChatTargetAudience.java new file mode 100644 index 00000000000..c332b8e7cae --- /dev/null +++ b/examples/v2/google-chat-integration/CreateGoogleChatTargetAudience.java @@ -0,0 +1,40 @@ +// Create a target audience returns "CREATED" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.GoogleChatIntegrationApi; +import com.datadog.api.client.v2.model.GoogleChatTargetAudienceCreateRequest; +import com.datadog.api.client.v2.model.GoogleChatTargetAudienceCreateRequestAttributes; +import com.datadog.api.client.v2.model.GoogleChatTargetAudienceCreateRequestData; +import com.datadog.api.client.v2.model.GoogleChatTargetAudienceResponse; +import com.datadog.api.client.v2.model.GoogleChatTargetAudienceType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + GoogleChatIntegrationApi apiInstance = new GoogleChatIntegrationApi(defaultClient); + + GoogleChatTargetAudienceCreateRequest body = + new GoogleChatTargetAudienceCreateRequest() + .data( + new GoogleChatTargetAudienceCreateRequestData() + .attributes( + new GoogleChatTargetAudienceCreateRequestAttributes() + .audienceId("fake-audience-id-1") + .audienceName("fake audience name 1")) + .type(GoogleChatTargetAudienceType.GOOGLE_CHAT_TARGET_AUDIENCE_TYPE)); + + try { + GoogleChatTargetAudienceResponse result = + apiInstance.createGoogleChatTargetAudience("organization_binding_id", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling GoogleChatIntegrationApi#createGoogleChatTargetAudience"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/google-chat-integration/DeleteGoogleChatDelegatedUser.java b/examples/v2/google-chat-integration/DeleteGoogleChatDelegatedUser.java new file mode 100644 index 00000000000..0f034ed34e0 --- /dev/null +++ b/examples/v2/google-chat-integration/DeleteGoogleChatDelegatedUser.java @@ -0,0 +1,23 @@ +// Delete the delegated user returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.GoogleChatIntegrationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + GoogleChatIntegrationApi apiInstance = new GoogleChatIntegrationApi(defaultClient); + + try { + apiInstance.deleteGoogleChatDelegatedUser("organization_binding_id"); + } catch (ApiException e) { + System.err.println( + "Exception when calling GoogleChatIntegrationApi#deleteGoogleChatDelegatedUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/google-chat-integration/DeleteGoogleChatOrganization.java b/examples/v2/google-chat-integration/DeleteGoogleChatOrganization.java new file mode 100644 index 00000000000..30308296bc5 --- /dev/null +++ b/examples/v2/google-chat-integration/DeleteGoogleChatOrganization.java @@ -0,0 +1,23 @@ +// Delete a Google Chat organization binding returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.GoogleChatIntegrationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + GoogleChatIntegrationApi apiInstance = new GoogleChatIntegrationApi(defaultClient); + + try { + apiInstance.deleteGoogleChatOrganization("organization_binding_id"); + } catch (ApiException e) { + System.err.println( + "Exception when calling GoogleChatIntegrationApi#deleteGoogleChatOrganization"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/google-chat-integration/DeleteGoogleChatTargetAudience.java b/examples/v2/google-chat-integration/DeleteGoogleChatTargetAudience.java new file mode 100644 index 00000000000..7fccf9817db --- /dev/null +++ b/examples/v2/google-chat-integration/DeleteGoogleChatTargetAudience.java @@ -0,0 +1,23 @@ +// Delete a target audience returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.GoogleChatIntegrationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + GoogleChatIntegrationApi apiInstance = new GoogleChatIntegrationApi(defaultClient); + + try { + apiInstance.deleteGoogleChatTargetAudience("organization_binding_id", "target_audience_id"); + } catch (ApiException e) { + System.err.println( + "Exception when calling GoogleChatIntegrationApi#deleteGoogleChatTargetAudience"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/google-chat-integration/GetGoogleChatDelegatedUser.java b/examples/v2/google-chat-integration/GetGoogleChatDelegatedUser.java new file mode 100644 index 00000000000..53fe13e449c --- /dev/null +++ b/examples/v2/google-chat-integration/GetGoogleChatDelegatedUser.java @@ -0,0 +1,26 @@ +// Get the delegated user returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.GoogleChatIntegrationApi; +import com.datadog.api.client.v2.model.GoogleChatDelegatedUserResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + GoogleChatIntegrationApi apiInstance = new GoogleChatIntegrationApi(defaultClient); + + try { + GoogleChatDelegatedUserResponse result = + apiInstance.getGoogleChatDelegatedUser("organization_binding_id"); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling GoogleChatIntegrationApi#getGoogleChatDelegatedUser"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/google-chat-integration/GetGoogleChatOrganization.java b/examples/v2/google-chat-integration/GetGoogleChatOrganization.java new file mode 100644 index 00000000000..98535e1b035 --- /dev/null +++ b/examples/v2/google-chat-integration/GetGoogleChatOrganization.java @@ -0,0 +1,26 @@ +// Get a Google Chat organization binding returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.GoogleChatIntegrationApi; +import com.datadog.api.client.v2.model.GoogleChatOrganizationResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + GoogleChatIntegrationApi apiInstance = new GoogleChatIntegrationApi(defaultClient); + + try { + GoogleChatOrganizationResponse result = + apiInstance.getGoogleChatOrganization("organization_binding_id"); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling GoogleChatIntegrationApi#getGoogleChatOrganization"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/google-chat-integration/GetGoogleChatTargetAudience.java b/examples/v2/google-chat-integration/GetGoogleChatTargetAudience.java new file mode 100644 index 00000000000..16aaea85d57 --- /dev/null +++ b/examples/v2/google-chat-integration/GetGoogleChatTargetAudience.java @@ -0,0 +1,26 @@ +// Get a target audience returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.GoogleChatIntegrationApi; +import com.datadog.api.client.v2.model.GoogleChatTargetAudienceResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + GoogleChatIntegrationApi apiInstance = new GoogleChatIntegrationApi(defaultClient); + + try { + GoogleChatTargetAudienceResponse result = + apiInstance.getGoogleChatTargetAudience("organization_binding_id", "target_audience_id"); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling GoogleChatIntegrationApi#getGoogleChatTargetAudience"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/google-chat-integration/ListGoogleChatOrganizations.java b/examples/v2/google-chat-integration/ListGoogleChatOrganizations.java new file mode 100644 index 00000000000..2c808b522a4 --- /dev/null +++ b/examples/v2/google-chat-integration/ListGoogleChatOrganizations.java @@ -0,0 +1,25 @@ +// Get all Google Chat organization bindings returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.GoogleChatIntegrationApi; +import com.datadog.api.client.v2.model.GoogleChatOrganizationsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + GoogleChatIntegrationApi apiInstance = new GoogleChatIntegrationApi(defaultClient); + + try { + GoogleChatOrganizationsResponse result = apiInstance.listGoogleChatOrganizations(); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling GoogleChatIntegrationApi#listGoogleChatOrganizations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/google-chat-integration/ListGoogleChatTargetAudiences.java b/examples/v2/google-chat-integration/ListGoogleChatTargetAudiences.java new file mode 100644 index 00000000000..31904f15504 --- /dev/null +++ b/examples/v2/google-chat-integration/ListGoogleChatTargetAudiences.java @@ -0,0 +1,26 @@ +// Get all target audiences returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.GoogleChatIntegrationApi; +import com.datadog.api.client.v2.model.GoogleChatTargetAudiencesResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + GoogleChatIntegrationApi apiInstance = new GoogleChatIntegrationApi(defaultClient); + + try { + GoogleChatTargetAudiencesResponse result = + apiInstance.listGoogleChatTargetAudiences("organization_binding_id"); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling GoogleChatIntegrationApi#listGoogleChatTargetAudiences"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/google-chat-integration/UpdateGoogleChatTargetAudience.java b/examples/v2/google-chat-integration/UpdateGoogleChatTargetAudience.java new file mode 100644 index 00000000000..b0f75da654b --- /dev/null +++ b/examples/v2/google-chat-integration/UpdateGoogleChatTargetAudience.java @@ -0,0 +1,41 @@ +// Update a target audience returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.GoogleChatIntegrationApi; +import com.datadog.api.client.v2.model.GoogleChatTargetAudienceResponse; +import com.datadog.api.client.v2.model.GoogleChatTargetAudienceType; +import com.datadog.api.client.v2.model.GoogleChatTargetAudienceUpdateRequest; +import com.datadog.api.client.v2.model.GoogleChatTargetAudienceUpdateRequestAttributes; +import com.datadog.api.client.v2.model.GoogleChatTargetAudienceUpdateRequestData; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + GoogleChatIntegrationApi apiInstance = new GoogleChatIntegrationApi(defaultClient); + + GoogleChatTargetAudienceUpdateRequest body = + new GoogleChatTargetAudienceUpdateRequest() + .data( + new GoogleChatTargetAudienceUpdateRequestData() + .attributes( + new GoogleChatTargetAudienceUpdateRequestAttributes() + .audienceId("fake-audience-id-1") + .audienceName("fake audience name 1")) + .type(GoogleChatTargetAudienceType.GOOGLE_CHAT_TARGET_AUDIENCE_TYPE)); + + try { + GoogleChatTargetAudienceResponse result = + apiInstance.updateGoogleChatTargetAudience( + "organization_binding_id", "target_audience_id", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling GoogleChatIntegrationApi#updateGoogleChatTargetAudience"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/incident-services/CreateIncidentService.java b/examples/v2/incident-services/CreateIncidentService.java deleted file mode 100644 index 62211a577f9..00000000000 --- a/examples/v2/incident-services/CreateIncidentService.java +++ /dev/null @@ -1,37 +0,0 @@ -// 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.v2.api.IncidentServicesApi; -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; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - 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-Incident-Service"))); - - try { - IncidentServiceResponse result = apiInstance.createIncidentService(body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling IncidentServicesApi#createIncidentService"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/incident-services/DeleteIncidentService.java b/examples/v2/incident-services/DeleteIncidentService.java deleted file mode 100644 index 3d594329482..00000000000 --- a/examples/v2/incident-services/DeleteIncidentService.java +++ /dev/null @@ -1,26 +0,0 @@ -// 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.v2.api.IncidentServicesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.deleteIncidentService", true); - IncidentServicesApi apiInstance = new IncidentServicesApi(defaultClient); - - // there is a valid "service" in the system - String SERVICE_DATA_ID = System.getenv("SERVICE_DATA_ID"); - - try { - apiInstance.deleteIncidentService(SERVICE_DATA_ID); - } catch (ApiException e) { - System.err.println("Exception when calling IncidentServicesApi#deleteIncidentService"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/incident-services/GetIncidentService.java b/examples/v2/incident-services/GetIncidentService.java deleted file mode 100644 index 66ca3a15e6c..00000000000 --- a/examples/v2/incident-services/GetIncidentService.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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.v2.api.IncidentServicesApi; -import com.datadog.api.client.v2.model.IncidentServiceResponse; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.getIncidentService", true); - IncidentServicesApi apiInstance = new IncidentServicesApi(defaultClient); - - // there is a valid "service" in the system - String SERVICE_DATA_ID = System.getenv("SERVICE_DATA_ID"); - - try { - IncidentServiceResponse result = apiInstance.getIncidentService(SERVICE_DATA_ID); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling IncidentServicesApi#getIncidentService"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/incident-services/ListIncidentServices.java b/examples/v2/incident-services/ListIncidentServices.java deleted file mode 100644 index be92966f783..00000000000 --- a/examples/v2/incident-services/ListIncidentServices.java +++ /dev/null @@ -1,31 +0,0 @@ -// 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.v2.api.IncidentServicesApi; -import com.datadog.api.client.v2.api.IncidentServicesApi.ListIncidentServicesOptionalParameters; -import com.datadog.api.client.v2.model.IncidentServicesResponse; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.listIncidentServices", true); - IncidentServicesApi apiInstance = new IncidentServicesApi(defaultClient); - - // there is a valid "service" in the system - String SERVICE_DATA_ATTRIBUTES_NAME = System.getenv("SERVICE_DATA_ATTRIBUTES_NAME"); - - try { - 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"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/incident-services/UpdateIncidentService.java b/examples/v2/incident-services/UpdateIncidentService.java deleted file mode 100644 index 50975c21f18..00000000000 --- a/examples/v2/incident-services/UpdateIncidentService.java +++ /dev/null @@ -1,41 +0,0 @@ -// 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.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; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = ApiClient.getDefaultApiClient(); - defaultClient.setUnstableOperationEnabled("v2.updateIncidentService", true); - IncidentServicesApi apiInstance = new IncidentServicesApi(defaultClient); - - // there is a valid "service" in the system - 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"))); - - try { - IncidentServiceResponse result = apiInstance.updateIncidentService(SERVICE_DATA_ID, body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling IncidentServicesApi#updateIncidentService"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} diff --git a/examples/v2/llm-observability/CreateLLMObsExperiment.java b/examples/v2/llm-observability/CreateLLMObsExperiment.java index 10f50e2fc43..578228a43af 100644 --- a/examples/v2/llm-observability/CreateLLMObsExperiment.java +++ b/examples/v2/llm-observability/CreateLLMObsExperiment.java @@ -23,6 +23,7 @@ public static void main(String[] args) { new LLMObsExperimentDataAttributesRequest() .datasetId("9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d") .name("My Experiment v1") + .parentExperimentId("3fd6b5e0-8910-4b1c-a7d0-5b84de329012") .projectId("a33671aa-24fd-4dcd-9b33-a8ec7dde7751")) .type(LLMObsExperimentType.EXPERIMENTS)); diff --git a/examples/v2/llm-observability/DeleteLLMObsAnnotations.java b/examples/v2/llm-observability/DeleteLLMObsAnnotations.java new file mode 100644 index 00000000000..ea03ce6587b --- /dev/null +++ b/examples/v2/llm-observability/DeleteLLMObsAnnotations.java @@ -0,0 +1,45 @@ +// Delete annotations returns "OK — annotations deleted. Errors for annotations that could not be +// deleted are listed in +// `errors`." response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsAnnotationsType; +import com.datadog.api.client.v2.model.LLMObsDeleteAnnotationsDataAttributesRequest; +import com.datadog.api.client.v2.model.LLMObsDeleteAnnotationsDataRequest; +import com.datadog.api.client.v2.model.LLMObsDeleteAnnotationsRequest; +import com.datadog.api.client.v2.model.LLMObsDeleteAnnotationsResponse; +import java.util.Arrays; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.deleteLLMObsAnnotations", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + LLMObsDeleteAnnotationsRequest body = + new LLMObsDeleteAnnotationsRequest() + .data( + new LLMObsDeleteAnnotationsDataRequest() + .attributes( + new LLMObsDeleteAnnotationsDataAttributesRequest() + .annotationIds( + Arrays.asList( + "00000000-0000-0000-0000-000000000000", + "00000000-0000-0000-0000-000000000001"))) + .type(LLMObsAnnotationsType.ANNOTATIONS)); + + try { + LLMObsDeleteAnnotationsResponse result = + apiInstance.deleteLLMObsAnnotations("00000000-0000-0000-0000-000000000001", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LlmObservabilityApi#deleteLLMObsAnnotations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/DeleteLLMObsPatternsConfig.java b/examples/v2/llm-observability/DeleteLLMObsPatternsConfig.java new file mode 100644 index 00000000000..26d7cb6460c --- /dev/null +++ b/examples/v2/llm-observability/DeleteLLMObsPatternsConfig.java @@ -0,0 +1,23 @@ +// Delete a patterns configuration returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.deleteLLMObsPatternsConfig", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + try { + apiInstance.deleteLLMObsPatternsConfig("a7c8d9e0-1234-5678-9abc-def012345678"); + } catch (ApiException e) { + System.err.println("Exception when calling LlmObservabilityApi#deleteLLMObsPatternsConfig"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/GetLLMObsPatternsConfig.java b/examples/v2/llm-observability/GetLLMObsPatternsConfig.java new file mode 100644 index 00000000000..adb6d8b0312 --- /dev/null +++ b/examples/v2/llm-observability/GetLLMObsPatternsConfig.java @@ -0,0 +1,25 @@ +// Get a patterns configuration returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsPatternsConfigResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getLLMObsPatternsConfig", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + try { + LLMObsPatternsConfigResponse result = apiInstance.getLLMObsPatternsConfig(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LlmObservabilityApi#getLLMObsPatternsConfig"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/GetLLMObsPatternsRunStatus.java b/examples/v2/llm-observability/GetLLMObsPatternsRunStatus.java new file mode 100644 index 00000000000..8c0090a8665 --- /dev/null +++ b/examples/v2/llm-observability/GetLLMObsPatternsRunStatus.java @@ -0,0 +1,26 @@ +// Get patterns run status returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsPatternsRunStatusResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getLLMObsPatternsRunStatus", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + try { + LLMObsPatternsRunStatusResponse result = + apiInstance.getLLMObsPatternsRunStatus("a7c8d9e0-1234-5678-9abc-def012345678"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LlmObservabilityApi#getLLMObsPatternsRunStatus"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/ListLLMObsExperimentEventsV1.java b/examples/v2/llm-observability/ListLLMObsExperimentEventsV1.java new file mode 100644 index 00000000000..40b478f38c1 --- /dev/null +++ b/examples/v2/llm-observability/ListLLMObsExperimentEventsV1.java @@ -0,0 +1,26 @@ +// List LLM Observability experiment spans (v1) returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsExperimentSpansResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listLLMObsExperimentEventsV1", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + try { + LLMObsExperimentSpansResponse result = + apiInstance.listLLMObsExperimentEventsV1("3fd6b5e0-8910-4b1c-a7d0-5b84de329012"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LlmObservabilityApi#listLLMObsExperimentEventsV1"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/ListLLMObsExperimentEventsV2.java b/examples/v2/llm-observability/ListLLMObsExperimentEventsV2.java new file mode 100644 index 00000000000..ba97f4c50cb --- /dev/null +++ b/examples/v2/llm-observability/ListLLMObsExperimentEventsV2.java @@ -0,0 +1,26 @@ +// List LLM Observability experiment events (v2) returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsExperimentEventsV2Response; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listLLMObsExperimentEventsV2", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + try { + LLMObsExperimentEventsV2Response result = + apiInstance.listLLMObsExperimentEventsV2("3fd6b5e0-8910-4b1c-a7d0-5b84de329012"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LlmObservabilityApi#listLLMObsExperimentEventsV2"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/ListLLMObsPatternsClusteredPoints.java b/examples/v2/llm-observability/ListLLMObsPatternsClusteredPoints.java new file mode 100644 index 00000000000..59067f4e95b --- /dev/null +++ b/examples/v2/llm-observability/ListLLMObsPatternsClusteredPoints.java @@ -0,0 +1,27 @@ +// List patterns clustered points returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsPatternsClusteredPointsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listLLMObsPatternsClusteredPoints", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + try { + LLMObsPatternsClusteredPointsResponse result = + apiInstance.listLLMObsPatternsClusteredPoints("5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21"); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling LlmObservabilityApi#listLLMObsPatternsClusteredPoints"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/ListLLMObsPatternsConfigs.java b/examples/v2/llm-observability/ListLLMObsPatternsConfigs.java new file mode 100644 index 00000000000..8174539d1e3 --- /dev/null +++ b/examples/v2/llm-observability/ListLLMObsPatternsConfigs.java @@ -0,0 +1,25 @@ +// List patterns configurations returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsPatternsConfigsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listLLMObsPatternsConfigs", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + try { + LLMObsPatternsConfigsResponse result = apiInstance.listLLMObsPatternsConfigs(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LlmObservabilityApi#listLLMObsPatternsConfigs"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/ListLLMObsPatternsRuns.java b/examples/v2/llm-observability/ListLLMObsPatternsRuns.java new file mode 100644 index 00000000000..c956eadb34e --- /dev/null +++ b/examples/v2/llm-observability/ListLLMObsPatternsRuns.java @@ -0,0 +1,26 @@ +// List patterns runs returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsPatternsRunsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listLLMObsPatternsRuns", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + try { + LLMObsPatternsRunsResponse result = + apiInstance.listLLMObsPatternsRuns("a7c8d9e0-1234-5678-9abc-def012345678"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LlmObservabilityApi#listLLMObsPatternsRuns"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/ListLLMObsPatternsTopics.java b/examples/v2/llm-observability/ListLLMObsPatternsTopics.java new file mode 100644 index 00000000000..2374bcbeb6f --- /dev/null +++ b/examples/v2/llm-observability/ListLLMObsPatternsTopics.java @@ -0,0 +1,26 @@ +// List patterns topics returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsPatternsTopicsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listLLMObsPatternsTopics", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + try { + LLMObsPatternsTopicsResponse result = + apiInstance.listLLMObsPatternsTopics("a7c8d9e0-1234-5678-9abc-def012345678"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LlmObservabilityApi#listLLMObsPatternsTopics"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/ListLLMObsPatternsTopicsWithClusteredPoints.java b/examples/v2/llm-observability/ListLLMObsPatternsTopicsWithClusteredPoints.java new file mode 100644 index 00000000000..ea9a17d5851 --- /dev/null +++ b/examples/v2/llm-observability/ListLLMObsPatternsTopicsWithClusteredPoints.java @@ -0,0 +1,29 @@ +// List patterns topics with clustered points returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsPatternsTopicsWithClusteredPointsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled( + "v2.listLLMObsPatternsTopicsWithClusteredPoints", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + try { + LLMObsPatternsTopicsWithClusteredPointsResponse result = + apiInstance.listLLMObsPatternsTopicsWithClusteredPoints( + "a7c8d9e0-1234-5678-9abc-def012345678"); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling LlmObservabilityApi#listLLMObsPatternsTopicsWithClusteredPoints"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/TriggerLLMObsPatterns.java b/examples/v2/llm-observability/TriggerLLMObsPatterns.java new file mode 100644 index 00000000000..f1fb3165a61 --- /dev/null +++ b/examples/v2/llm-observability/TriggerLLMObsPatterns.java @@ -0,0 +1,38 @@ +// Trigger a patterns run returns "Accepted" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsPatternsRequestType; +import com.datadog.api.client.v2.model.LLMObsPatternsTriggerRequest; +import com.datadog.api.client.v2.model.LLMObsPatternsTriggerRequestAttributes; +import com.datadog.api.client.v2.model.LLMObsPatternsTriggerRequestData; +import com.datadog.api.client.v2.model.LLMObsPatternsTriggerResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.triggerLLMObsPatterns", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + LLMObsPatternsTriggerRequest body = + new LLMObsPatternsTriggerRequest() + .data( + new LLMObsPatternsTriggerRequestData() + .attributes( + new LLMObsPatternsTriggerRequestAttributes() + .configId("a7c8d9e0-1234-5678-9abc-def012345678")) + .type(LLMObsPatternsRequestType.TOPIC_DISCOVERY)); + + try { + LLMObsPatternsTriggerResponse result = apiInstance.triggerLLMObsPatterns(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LlmObservabilityApi#triggerLLMObsPatterns"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/UpdateLLMObsExperiment.java b/examples/v2/llm-observability/UpdateLLMObsExperiment.java index 7c6a1824f00..d7e193515ea 100644 --- a/examples/v2/llm-observability/UpdateLLMObsExperiment.java +++ b/examples/v2/llm-observability/UpdateLLMObsExperiment.java @@ -4,6 +4,7 @@ import com.datadog.api.client.ApiException; import com.datadog.api.client.v2.api.LlmObservabilityApi; import com.datadog.api.client.v2.model.LLMObsExperimentResponse; +import com.datadog.api.client.v2.model.LLMObsExperimentStatus; import com.datadog.api.client.v2.model.LLMObsExperimentType; import com.datadog.api.client.v2.model.LLMObsExperimentUpdateDataAttributesRequest; import com.datadog.api.client.v2.model.LLMObsExperimentUpdateDataRequest; @@ -19,7 +20,10 @@ public static void main(String[] args) { new LLMObsExperimentUpdateRequest() .data( new LLMObsExperimentUpdateDataRequest() - .attributes(new LLMObsExperimentUpdateDataAttributesRequest()) + .attributes( + new LLMObsExperimentUpdateDataAttributesRequest() + .datasetId("9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d") + .status(LLMObsExperimentStatus.COMPLETED)) .type(LLMObsExperimentType.EXPERIMENTS)); try { diff --git a/examples/v2/llm-observability/UpsertLLMObsAnnotations.java b/examples/v2/llm-observability/UpsertLLMObsAnnotations.java new file mode 100644 index 00000000000..9a252be4615 --- /dev/null +++ b/examples/v2/llm-observability/UpsertLLMObsAnnotations.java @@ -0,0 +1,61 @@ +// Create or update annotations returns "OK — annotations created or updated. Per-item errors are +// listed in `errors`." +// response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsAnnotationLabelValue; +import com.datadog.api.client.v2.model.LLMObsAnnotationLabelValueValue; +import com.datadog.api.client.v2.model.LLMObsAnnotationsDataAttributesRequest; +import com.datadog.api.client.v2.model.LLMObsAnnotationsDataRequest; +import com.datadog.api.client.v2.model.LLMObsAnnotationsRequest; +import com.datadog.api.client.v2.model.LLMObsAnnotationsResponse; +import com.datadog.api.client.v2.model.LLMObsAnnotationsType; +import com.datadog.api.client.v2.model.LLMObsUpsertAnnotationItem; +import java.util.Arrays; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.upsertLLMObsAnnotations", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + LLMObsAnnotationsRequest body = + new LLMObsAnnotationsRequest() + .data( + new LLMObsAnnotationsDataRequest() + .attributes( + new LLMObsAnnotationsDataAttributesRequest() + .annotations( + Collections.singletonList( + new LLMObsUpsertAnnotationItem() + .interactionId("00000000-0000-0000-0000-000000000001") + .labelValues( + Arrays.asList( + new LLMObsAnnotationLabelValue() + .labelSchemaId("abc-123") + .value( + new LLMObsAnnotationLabelValueValue( + "good")), + new LLMObsAnnotationLabelValue() + .labelSchemaId("ef56gh78") + .value( + new LLMObsAnnotationLabelValueValue( + "positive"))))))) + .type(LLMObsAnnotationsType.ANNOTATIONS)); + + try { + LLMObsAnnotationsResponse result = + apiInstance.upsertLLMObsAnnotations("00000000-0000-0000-0000-000000000001", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LlmObservabilityApi#upsertLLMObsAnnotations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/UpsertLLMObsPatternsConfig.java b/examples/v2/llm-observability/UpsertLLMObsPatternsConfig.java new file mode 100644 index 00000000000..bba7e0b0c08 --- /dev/null +++ b/examples/v2/llm-observability/UpsertLLMObsPatternsConfig.java @@ -0,0 +1,48 @@ +// Create or update a patterns configuration returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsPatternsConfigResponse; +import com.datadog.api.client.v2.model.LLMObsPatternsConfigType; +import com.datadog.api.client.v2.model.LLMObsPatternsConfigUpsertRequest; +import com.datadog.api.client.v2.model.LLMObsPatternsConfigUpsertRequestAttributes; +import com.datadog.api.client.v2.model.LLMObsPatternsConfigUpsertRequestData; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.upsertLLMObsPatternsConfig", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + LLMObsPatternsConfigUpsertRequest body = + new LLMObsPatternsConfigUpsertRequest() + .data( + new LLMObsPatternsConfigUpsertRequestData() + .attributes( + new LLMObsPatternsConfigUpsertRequestAttributes() + .accountId("1000000001") + .configId("a7c8d9e0-1234-5678-9abc-def012345678") + .evpQuery("@ml_app:support-bot") + .hierarchyDepth(2) + .integrationProvider("openai") + .modelName("gpt-4o") + .name("Support chatbot topics") + .numRecords(1000) + .samplingRatio(0.1) + .scope("") + .template("")) + .type(LLMObsPatternsConfigType.TOPIC_DISCOVERY_CONFIGS)); + + try { + LLMObsPatternsConfigResponse result = apiInstance.upsertLLMObsPatternsConfig(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LlmObservabilityApi#upsertLLMObsPatternsConfig"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/logs-archives/CreateLogsArchive.java b/examples/v2/logs-archives/CreateLogsArchive.java index 0da27b9690c..45351b7b8a3 100644 --- a/examples/v2/logs-archives/CreateLogsArchive.java +++ b/examples/v2/logs-archives/CreateLogsArchive.java @@ -37,7 +37,9 @@ public static void main(String[] args) { .storageAccount("account-name") .type(LogsArchiveDestinationAzureType.AZURE))) .includeTags(false) + .lookupAttributes(Arrays.asList("trace_id", "user_id")) .name("Nginx Archive") + .partitioningAttributes(Arrays.asList("service", "status")) .query("source:nginx") .rehydrationMaxScanSizeInGb(100L) .rehydrationTags(Arrays.asList("team:intake", "team:app"))) diff --git a/examples/v2/logs-archives/UpdateLogsArchive.java b/examples/v2/logs-archives/UpdateLogsArchive.java index 9e00f697e00..81da74b352c 100644 --- a/examples/v2/logs-archives/UpdateLogsArchive.java +++ b/examples/v2/logs-archives/UpdateLogsArchive.java @@ -37,7 +37,9 @@ public static void main(String[] args) { .storageAccount("account-name") .type(LogsArchiveDestinationAzureType.AZURE))) .includeTags(false) + .lookupAttributes(Arrays.asList("trace_id", "user_id")) .name("Nginx Archive") + .partitioningAttributes(Arrays.asList("service", "status")) .query("source:nginx") .rehydrationMaxScanSizeInGb(100L) .rehydrationTags(Arrays.asList("team:intake", "team:app"))) diff --git a/examples/v2/metrics/CreateTagIndexingRule.java b/examples/v2/metrics/CreateTagIndexingRule.java new file mode 100644 index 00000000000..ea78a005f60 --- /dev/null +++ b/examples/v2/metrics/CreateTagIndexingRule.java @@ -0,0 +1,60 @@ +// Create a tag indexing rule returns "Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.MetricsApi; +import com.datadog.api.client.v2.model.TagIndexingRuleCreateAttributes; +import com.datadog.api.client.v2.model.TagIndexingRuleCreateData; +import com.datadog.api.client.v2.model.TagIndexingRuleCreateRequest; +import com.datadog.api.client.v2.model.TagIndexingRuleDynamicTags; +import com.datadog.api.client.v2.model.TagIndexingRuleMetricMatch; +import com.datadog.api.client.v2.model.TagIndexingRuleOptions; +import com.datadog.api.client.v2.model.TagIndexingRuleOptionsData; +import com.datadog.api.client.v2.model.TagIndexingRuleResponse; +import com.datadog.api.client.v2.model.TagIndexingRuleType; +import java.util.Arrays; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + MetricsApi apiInstance = new MetricsApi(defaultClient); + + TagIndexingRuleCreateRequest body = + new TagIndexingRuleCreateRequest() + .data( + new TagIndexingRuleCreateData() + .attributes( + new TagIndexingRuleCreateAttributes() + .excludeTagsMode(false) + .metricNameMatches(Collections.singletonList("dd.test.*")) + .name("my-indexing-rule") + .options( + new TagIndexingRuleOptions() + .data( + new TagIndexingRuleOptionsData() + .dynamicTags( + new TagIndexingRuleDynamicTags() + .queriedTagsWindowSeconds(3600L) + .relatedAssetTags(false)) + .managePreexistingMetrics(true) + .metricMatch( + new TagIndexingRuleMetricMatch() + .queriedWindowSeconds(3600L)) + .overridePreviousRules(false)) + .version(1L)) + .tags(Arrays.asList("env", "service"))) + .type(TagIndexingRuleType.TAG_INDEXING_RULES)); + + try { + TagIndexingRuleResponse result = apiInstance.createTagIndexingRule(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MetricsApi#createTagIndexingRule"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/metrics/CreateTagIndexingRuleExemption.java b/examples/v2/metrics/CreateTagIndexingRuleExemption.java new file mode 100644 index 00000000000..061312b37d7 --- /dev/null +++ b/examples/v2/metrics/CreateTagIndexingRuleExemption.java @@ -0,0 +1,38 @@ +// Create a tag indexing rule exemption returns "Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.MetricsApi; +import com.datadog.api.client.v2.model.TagIndexingRuleExemptionCreateAttributes; +import com.datadog.api.client.v2.model.TagIndexingRuleExemptionCreateData; +import com.datadog.api.client.v2.model.TagIndexingRuleExemptionCreateRequest; +import com.datadog.api.client.v2.model.TagIndexingRuleExemptionResponse; +import com.datadog.api.client.v2.model.TagIndexingRuleExemptionType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + MetricsApi apiInstance = new MetricsApi(defaultClient); + + TagIndexingRuleExemptionCreateRequest body = + new TagIndexingRuleExemptionCreateRequest() + .data( + new TagIndexingRuleExemptionCreateData() + .attributes( + new TagIndexingRuleExemptionCreateAttributes() + .reason("This metric has a pre-existing tag configuration.")) + .type(TagIndexingRuleExemptionType.TAG_INDEXING_RULE_EXEMPTIONS)); + + try { + TagIndexingRuleExemptionResponse result = + apiInstance.createTagIndexingRuleExemption("dist.http.endpoint.request", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MetricsApi#createTagIndexingRuleExemption"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/metrics/DeleteTagIndexingRule.java b/examples/v2/metrics/DeleteTagIndexingRule.java new file mode 100644 index 00000000000..be70d463e73 --- /dev/null +++ b/examples/v2/metrics/DeleteTagIndexingRule.java @@ -0,0 +1,25 @@ +// Delete a tag indexing rule returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.MetricsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + MetricsApi apiInstance = new MetricsApi(defaultClient); + + // there is a valid "tag_indexing_rule" in the system + String TAG_INDEXING_RULE_DATA_ID = System.getenv("TAG_INDEXING_RULE_DATA_ID"); + + try { + apiInstance.deleteTagIndexingRule(TAG_INDEXING_RULE_DATA_ID); + } catch (ApiException e) { + System.err.println("Exception when calling MetricsApi#deleteTagIndexingRule"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/metrics/DeleteTagIndexingRuleExemption.java b/examples/v2/metrics/DeleteTagIndexingRuleExemption.java new file mode 100644 index 00000000000..280095d680d --- /dev/null +++ b/examples/v2/metrics/DeleteTagIndexingRuleExemption.java @@ -0,0 +1,22 @@ +// Delete a tag indexing rule exemption returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.MetricsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + MetricsApi apiInstance = new MetricsApi(defaultClient); + + try { + apiInstance.deleteTagIndexingRuleExemption("dist.http.endpoint.request"); + } catch (ApiException e) { + System.err.println("Exception when calling MetricsApi#deleteTagIndexingRuleExemption"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/metrics/GetTagIndexingRule.java b/examples/v2/metrics/GetTagIndexingRule.java new file mode 100644 index 00000000000..c6b56820744 --- /dev/null +++ b/examples/v2/metrics/GetTagIndexingRule.java @@ -0,0 +1,27 @@ +// Get a tag indexing rule returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.MetricsApi; +import com.datadog.api.client.v2.model.TagIndexingRuleResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + MetricsApi apiInstance = new MetricsApi(defaultClient); + + // there is a valid "tag_indexing_rule" in the system + String TAG_INDEXING_RULE_DATA_ID = System.getenv("TAG_INDEXING_RULE_DATA_ID"); + + try { + TagIndexingRuleResponse result = apiInstance.getTagIndexingRule(TAG_INDEXING_RULE_DATA_ID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MetricsApi#getTagIndexingRule"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/metrics/GetTagIndexingRuleExemption.java b/examples/v2/metrics/GetTagIndexingRuleExemption.java new file mode 100644 index 00000000000..5b5da0607a2 --- /dev/null +++ b/examples/v2/metrics/GetTagIndexingRuleExemption.java @@ -0,0 +1,25 @@ +// Get a tag indexing rule exemption returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.MetricsApi; +import com.datadog.api.client.v2.model.TagIndexingRuleExemptionResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + MetricsApi apiInstance = new MetricsApi(defaultClient); + + try { + TagIndexingRuleExemptionResponse result = + apiInstance.getTagIndexingRuleExemption("dist.http.endpoint.request"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MetricsApi#getTagIndexingRuleExemption"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/metrics/ListTagIndexingRules.java b/examples/v2/metrics/ListTagIndexingRules.java new file mode 100644 index 00000000000..f94eac60d3c --- /dev/null +++ b/examples/v2/metrics/ListTagIndexingRules.java @@ -0,0 +1,24 @@ +// List tag indexing rules returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.MetricsApi; +import com.datadog.api.client.v2.model.TagIndexingRulesResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + MetricsApi apiInstance = new MetricsApi(defaultClient); + + try { + TagIndexingRulesResponse result = apiInstance.listTagIndexingRules(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MetricsApi#listTagIndexingRules"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/metrics/ListTagIndexingRulesForMetric.java b/examples/v2/metrics/ListTagIndexingRulesForMetric.java new file mode 100644 index 00000000000..28b71c0e312 --- /dev/null +++ b/examples/v2/metrics/ListTagIndexingRulesForMetric.java @@ -0,0 +1,24 @@ +// List tag indexing rules for a metric returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.MetricsApi; +import com.datadog.api.client.v2.model.TagIndexingRulesResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + MetricsApi apiInstance = new MetricsApi(defaultClient); + + try { + TagIndexingRulesResponse result = apiInstance.listTagIndexingRulesForMetric("ExampleMetric"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MetricsApi#listTagIndexingRulesForMetric"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/metrics/QueryScalarData_2312509843.java b/examples/v2/metrics/QueryScalarData_2086017331.java similarity index 98% rename from examples/v2/metrics/QueryScalarData_2312509843.java rename to examples/v2/metrics/QueryScalarData_2086017331.java index f9f1bbd05eb..76a410e5071 100644 --- a/examples/v2/metrics/QueryScalarData_2312509843.java +++ b/examples/v2/metrics/QueryScalarData_2086017331.java @@ -1,4 +1,4 @@ -// Scalar cross product query with rum data source returns "OK" response +// Scalar cross product query with RUM data source returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/metrics/QueryTimeseriesData_123149143.java b/examples/v2/metrics/QueryTimeseriesData_4190640887.java similarity index 98% rename from examples/v2/metrics/QueryTimeseriesData_123149143.java rename to examples/v2/metrics/QueryTimeseriesData_4190640887.java index b13f32094b2..7d8a327bbe7 100644 --- a/examples/v2/metrics/QueryTimeseriesData_123149143.java +++ b/examples/v2/metrics/QueryTimeseriesData_4190640887.java @@ -1,4 +1,4 @@ -// Timeseries cross product query with rum data source returns "OK" response +// Timeseries cross product query with RUM data source returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/metrics/ReorderTagIndexingRules.java b/examples/v2/metrics/ReorderTagIndexingRules.java new file mode 100644 index 00000000000..b8b54bc56e6 --- /dev/null +++ b/examples/v2/metrics/ReorderTagIndexingRules.java @@ -0,0 +1,39 @@ +// Reorder tag indexing rules returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.MetricsApi; +import com.datadog.api.client.v2.model.TagIndexingRuleOrderAttributes; +import com.datadog.api.client.v2.model.TagIndexingRuleOrderData; +import com.datadog.api.client.v2.model.TagIndexingRuleOrderRequest; +import com.datadog.api.client.v2.model.TagIndexingRuleType; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + MetricsApi apiInstance = new MetricsApi(defaultClient); + + // there is a valid "tag_indexing_rule" in the system + String TAG_INDEXING_RULE_DATA_ID = System.getenv("TAG_INDEXING_RULE_DATA_ID"); + + TagIndexingRuleOrderRequest body = + new TagIndexingRuleOrderRequest() + .data( + new TagIndexingRuleOrderData() + .attributes( + new TagIndexingRuleOrderAttributes() + .ruleIds(Collections.singletonList(TAG_INDEXING_RULE_DATA_ID))) + .type(TagIndexingRuleType.TAG_INDEXING_RULES)); + + try { + apiInstance.reorderTagIndexingRules(body); + } catch (ApiException e) { + System.err.println("Exception when calling MetricsApi#reorderTagIndexingRules"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/metrics/UpdateTagIndexingRule.java b/examples/v2/metrics/UpdateTagIndexingRule.java new file mode 100644 index 00000000000..45290d28583 --- /dev/null +++ b/examples/v2/metrics/UpdateTagIndexingRule.java @@ -0,0 +1,64 @@ +// Update a tag indexing rule returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.MetricsApi; +import com.datadog.api.client.v2.model.TagIndexingRuleDynamicTags; +import com.datadog.api.client.v2.model.TagIndexingRuleMetricMatch; +import com.datadog.api.client.v2.model.TagIndexingRuleOptions; +import com.datadog.api.client.v2.model.TagIndexingRuleOptionsData; +import com.datadog.api.client.v2.model.TagIndexingRuleResponse; +import com.datadog.api.client.v2.model.TagIndexingRuleType; +import com.datadog.api.client.v2.model.TagIndexingRuleUpdateAttributes; +import com.datadog.api.client.v2.model.TagIndexingRuleUpdateData; +import com.datadog.api.client.v2.model.TagIndexingRuleUpdateRequest; +import java.util.Arrays; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + MetricsApi apiInstance = new MetricsApi(defaultClient); + + // there is a valid "tag_indexing_rule" in the system + String TAG_INDEXING_RULE_DATA_ID = System.getenv("TAG_INDEXING_RULE_DATA_ID"); + + TagIndexingRuleUpdateRequest body = + new TagIndexingRuleUpdateRequest() + .data( + new TagIndexingRuleUpdateData() + .attributes( + new TagIndexingRuleUpdateAttributes() + .metricNameMatches(Collections.singletonList("dd.test.*")) + .name("my-indexing-rule") + .options( + new TagIndexingRuleOptions() + .data( + new TagIndexingRuleOptionsData() + .dynamicTags( + new TagIndexingRuleDynamicTags() + .queriedTagsWindowSeconds(3600L) + .relatedAssetTags(false)) + .managePreexistingMetrics(true) + .metricMatch( + new TagIndexingRuleMetricMatch() + .queriedWindowSeconds(3600L)) + .overridePreviousRules(false)) + .version(1L)) + .ruleOrder(2L) + .tags(Arrays.asList("env", "service"))) + .type(TagIndexingRuleType.TAG_INDEXING_RULES)); + + try { + TagIndexingRuleResponse result = + apiInstance.updateTagIndexingRule(TAG_INDEXING_RULE_DATA_ID, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MetricsApi#updateTagIndexingRule"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/microsoft-teams-integration/DeleteMSTeamsUserBinding.java b/examples/v2/microsoft-teams-integration/DeleteMSTeamsUserBinding.java new file mode 100644 index 00000000000..bb24a006ab5 --- /dev/null +++ b/examples/v2/microsoft-teams-integration/DeleteMSTeamsUserBinding.java @@ -0,0 +1,23 @@ +// Delete user binding returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.MicrosoftTeamsIntegrationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + MicrosoftTeamsIntegrationApi apiInstance = new MicrosoftTeamsIntegrationApi(defaultClient); + + try { + apiInstance.deleteMSTeamsUserBinding("tenant_id"); + } catch (ApiException e) { + System.err.println( + "Exception when calling MicrosoftTeamsIntegrationApi#deleteMSTeamsUserBinding"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/network-health-insights/ListNetworkHealthInsights.java b/examples/v2/network-health-insights/ListNetworkHealthInsights.java new file mode 100644 index 00000000000..3a715b15ece --- /dev/null +++ b/examples/v2/network-health-insights/ListNetworkHealthInsights.java @@ -0,0 +1,26 @@ +// List network health insights returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.NetworkHealthInsightsApi; +import com.datadog.api.client.v2.model.NetworkHealthInsightsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listNetworkHealthInsights", true); + NetworkHealthInsightsApi apiInstance = new NetworkHealthInsightsApi(defaultClient); + + try { + NetworkHealthInsightsResponse result = apiInstance.listNetworkHealthInsights(); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling NetworkHealthInsightsApi#listNetworkHealthInsights"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/organizations/GetSAMLConfiguration.java b/examples/v2/organizations/GetSAMLConfiguration.java new file mode 100644 index 00000000000..6b5b6cd2ede --- /dev/null +++ b/examples/v2/organizations/GetSAMLConfiguration.java @@ -0,0 +1,25 @@ +// Get a SAML configuration returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.OrganizationsApi; +import com.datadog.api.client.v2.model.SAMLConfigurationResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + OrganizationsApi apiInstance = new OrganizationsApi(defaultClient); + + try { + SAMLConfigurationResponse result = + apiInstance.getSAMLConfiguration("3653d3c6-0c75-11ea-ad28-fb5701eabc7d"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationsApi#getSAMLConfiguration"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/organizations/ListGlobalOrgs.java b/examples/v2/organizations/ListGlobalOrgs.java new file mode 100644 index 00000000000..3dd23d0acf9 --- /dev/null +++ b/examples/v2/organizations/ListGlobalOrgs.java @@ -0,0 +1,24 @@ +// List global orgs returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.OrganizationsApi; +import com.datadog.api.client.v2.model.GlobalOrgsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + OrganizationsApi apiInstance = new OrganizationsApi(defaultClient); + + try { + GlobalOrgsResponse result = apiInstance.listGlobalOrgs("user@example.com"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationsApi#listGlobalOrgs"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/organizations/ListGlobalOrgs_465966063.java b/examples/v2/organizations/ListGlobalOrgs_465966063.java new file mode 100644 index 00000000000..1165077ba05 --- /dev/null +++ b/examples/v2/organizations/ListGlobalOrgs_465966063.java @@ -0,0 +1,26 @@ +// List global orgs returns "OK" response with pagination + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.PaginationIterable; +import com.datadog.api.client.v2.api.OrganizationsApi; +import com.datadog.api.client.v2.model.GlobalOrgData; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + OrganizationsApi apiInstance = new OrganizationsApi(defaultClient); + + try { + PaginationIterable iterable = + apiInstance.listGlobalOrgsWithPagination("user@example.com"); + + for (GlobalOrgData item : iterable) { + System.out.println(item); + } + } catch (RuntimeException e) { + System.err.println("Exception when calling OrganizationsApi#listGlobalOrgsWithPagination"); + System.err.println("Reason: " + e.getMessage()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/organizations/ListSAMLConfigurations.java b/examples/v2/organizations/ListSAMLConfigurations.java new file mode 100644 index 00000000000..c94bc0334d8 --- /dev/null +++ b/examples/v2/organizations/ListSAMLConfigurations.java @@ -0,0 +1,24 @@ +// List SAML configurations returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.OrganizationsApi; +import com.datadog.api.client.v2.model.SAMLConfigurationsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + OrganizationsApi apiInstance = new OrganizationsApi(defaultClient); + + try { + SAMLConfigurationsResponse result = apiInstance.listSAMLConfigurations(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationsApi#listSAMLConfigurations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/organizations/UpdateLoginOrgConfigsMaxSessionDuration.java b/examples/v2/organizations/UpdateLoginOrgConfigsMaxSessionDuration.java new file mode 100644 index 00000000000..3557378d4fb --- /dev/null +++ b/examples/v2/organizations/UpdateLoginOrgConfigsMaxSessionDuration.java @@ -0,0 +1,35 @@ +// Update the maximum session duration returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.OrganizationsApi; +import com.datadog.api.client.v2.model.MaxSessionDurationType; +import com.datadog.api.client.v2.model.MaxSessionDurationUpdateAttributes; +import com.datadog.api.client.v2.model.MaxSessionDurationUpdateData; +import com.datadog.api.client.v2.model.MaxSessionDurationUpdateRequest; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + OrganizationsApi apiInstance = new OrganizationsApi(defaultClient); + + MaxSessionDurationUpdateRequest body = + new MaxSessionDurationUpdateRequest() + .data( + new MaxSessionDurationUpdateData() + .attributes( + new MaxSessionDurationUpdateAttributes().maxSessionDuration(604800L)) + .type(MaxSessionDurationType.MAX_SESSION_DURATION)); + + try { + apiInstance.updateLoginOrgConfigsMaxSessionDuration(body); + } catch (ApiException e) { + System.err.println( + "Exception when calling OrganizationsApi#updateLoginOrgConfigsMaxSessionDuration"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/organizations/UpdateOrgSamlConfigurations.java b/examples/v2/organizations/UpdateOrgSamlConfigurations.java new file mode 100644 index 00000000000..64b0fbb054d --- /dev/null +++ b/examples/v2/organizations/UpdateOrgSamlConfigurations.java @@ -0,0 +1,42 @@ +// Update organization SAML preferences returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.OrganizationsApi; +import com.datadog.api.client.v2.model.OrgSAMLPreferencesAttributes; +import com.datadog.api.client.v2.model.OrgSAMLPreferencesData; +import com.datadog.api.client.v2.model.OrgSAMLPreferencesType; +import com.datadog.api.client.v2.model.OrgSAMLPreferencesUpdateRequest; +import java.util.Collections; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.updateOrgSamlConfigurations", true); + OrganizationsApi apiInstance = new OrganizationsApi(defaultClient); + + OrgSAMLPreferencesUpdateRequest body = + new OrgSAMLPreferencesUpdateRequest() + .data( + new OrgSAMLPreferencesData() + .attributes( + new OrgSAMLPreferencesAttributes() + .defaultRoleUuids( + Collections.singletonList( + UUID.fromString("8dd1cf3c-0c75-11ea-ad28-fb5701eabc7d"))) + .jitDomains(Collections.singletonList("example.com"))) + .id("00000000-0000-0000-0000-000000000000") + .type(OrgSAMLPreferencesType.SAML_PREFERENCES)); + + try { + apiInstance.updateOrgSamlConfigurations(body); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationsApi#updateOrgSamlConfigurations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/organizations/UpdateSAMLConfiguration.java b/examples/v2/organizations/UpdateSAMLConfiguration.java new file mode 100644 index 00000000000..d1f4d93f50c --- /dev/null +++ b/examples/v2/organizations/UpdateSAMLConfiguration.java @@ -0,0 +1,54 @@ +// Update a SAML configuration returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.OrganizationsApi; +import com.datadog.api.client.v2.model.RelationshipToRoleData; +import com.datadog.api.client.v2.model.RelationshipToRoles; +import com.datadog.api.client.v2.model.RolesType; +import com.datadog.api.client.v2.model.SAMLConfigurationRelationships; +import com.datadog.api.client.v2.model.SAMLConfigurationResponse; +import com.datadog.api.client.v2.model.SAMLConfigurationUpdateAttributes; +import com.datadog.api.client.v2.model.SAMLConfigurationUpdateData; +import com.datadog.api.client.v2.model.SAMLConfigurationUpdateRequest; +import com.datadog.api.client.v2.model.SAMLConfigurationsType; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + OrganizationsApi apiInstance = new OrganizationsApi(defaultClient); + + SAMLConfigurationUpdateRequest body = + new SAMLConfigurationUpdateRequest() + .data( + new SAMLConfigurationUpdateData() + .attributes( + new SAMLConfigurationUpdateAttributes() + .idpInitiated(true) + .jitDomains(Collections.singletonList("example.com"))) + .id("3653d3c6-0c75-11ea-ad28-fb5701eabc7d") + .relationships( + new SAMLConfigurationRelationships() + .defaultRoles( + new RelationshipToRoles() + .data( + Collections.singletonList( + new RelationshipToRoleData() + .id("3653d3c6-0c75-11ea-ad28-fb5701eabc7d") + .type(RolesType.ROLES))))) + .type(SAMLConfigurationsType.SAML_CONFIGURATIONS)); + + try { + SAMLConfigurationResponse result = + apiInstance.updateSAMLConfiguration("3653d3c6-0c75-11ea-ad28-fb5701eabc7d", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationsApi#updateSAMLConfiguration"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/report-schedules/CreateReportSchedule.java b/examples/v2/report-schedules/CreateReportSchedule.java new file mode 100644 index 00000000000..ae1765e6dcc --- /dev/null +++ b/examples/v2/report-schedules/CreateReportSchedule.java @@ -0,0 +1,66 @@ +// Create a report schedule returns "CREATED" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.ReportSchedulesApi; +import com.datadog.api.client.v2.model.ReportScheduleCreateRequest; +import com.datadog.api.client.v2.model.ReportScheduleCreateRequestAttributes; +import com.datadog.api.client.v2.model.ReportScheduleCreateRequestData; +import com.datadog.api.client.v2.model.ReportScheduleDeliveryFormat; +import com.datadog.api.client.v2.model.ReportScheduleResourceType; +import com.datadog.api.client.v2.model.ReportScheduleResponse; +import com.datadog.api.client.v2.model.ReportScheduleTemplateVariable; +import com.datadog.api.client.v2.model.ReportScheduleType; +import java.util.Arrays; +import java.util.Collections; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createReportSchedule", true); + ReportSchedulesApi apiInstance = new ReportSchedulesApi(defaultClient); + + ReportScheduleCreateRequest body = + new ReportScheduleCreateRequest() + .data( + new ReportScheduleCreateRequestData() + .attributes( + new ReportScheduleCreateRequestAttributes() + .deliveryFormat(ReportScheduleDeliveryFormat.PDF) + .description("Weekly summary of infrastructure health.") + .recipients( + Arrays.asList( + "user@example.com", + "slack:T01234567.C01234567.alerts", + "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2")) + .resourceId("abc-def-ghi") + .resourceType(ReportScheduleResourceType.DASHBOARD) + .rrule( + """ +DTSTART;TZID=America/New_York:20260601T090000 +RRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0 +""") + .tabId(UUID.fromString("66666666-7777-8888-9999-000000000000")) + .templateVariables( + Collections.singletonList( + new ReportScheduleTemplateVariable() + .name("env") + .values(Collections.singletonList("prod")))) + .timeframe("calendar_month") + .timezone("America/New_York") + .title("Weekly Infrastructure Report")) + .type(ReportScheduleType.SCHEDULE)); + + try { + ReportScheduleResponse result = apiInstance.createReportSchedule(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ReportSchedulesApi#createReportSchedule"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/report-schedules/PatchReportSchedule.java b/examples/v2/report-schedules/PatchReportSchedule.java new file mode 100644 index 00000000000..3188235269c --- /dev/null +++ b/examples/v2/report-schedules/PatchReportSchedule.java @@ -0,0 +1,65 @@ +// Update a report schedule returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.ReportSchedulesApi; +import com.datadog.api.client.v2.model.ReportScheduleDeliveryFormat; +import com.datadog.api.client.v2.model.ReportSchedulePatchRequest; +import com.datadog.api.client.v2.model.ReportSchedulePatchRequestAttributes; +import com.datadog.api.client.v2.model.ReportSchedulePatchRequestData; +import com.datadog.api.client.v2.model.ReportScheduleResponse; +import com.datadog.api.client.v2.model.ReportScheduleTemplateVariable; +import com.datadog.api.client.v2.model.ReportScheduleType; +import java.util.Arrays; +import java.util.Collections; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.patchReportSchedule", true); + ReportSchedulesApi apiInstance = new ReportSchedulesApi(defaultClient); + + ReportSchedulePatchRequest body = + new ReportSchedulePatchRequest() + .data( + new ReportSchedulePatchRequestData() + .attributes( + new ReportSchedulePatchRequestAttributes() + .deliveryFormat(ReportScheduleDeliveryFormat.PDF) + .description("Updated weekly summary of infrastructure health.") + .recipients( + Arrays.asList( + "user@example.com", + "slack:T01234567.C01234567.alerts", + "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2")) + .rrule( + """ +DTSTART;TZID=America/New_York:20260601T090000 +RRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0 +""") + .tabId(UUID.fromString("66666666-7777-8888-9999-000000000000")) + .templateVariables( + Collections.singletonList( + new ReportScheduleTemplateVariable() + .name("env") + .values(Collections.singletonList("prod")))) + .timeframe("calendar_month") + .timezone("America/New_York") + .title("Weekly Infrastructure Report")) + .type(ReportScheduleType.SCHEDULE)); + + try { + ReportScheduleResponse result = + apiInstance.patchReportSchedule( + UUID.fromString("11111111-2222-3333-4444-555555555555"), body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ReportSchedulesApi#patchReportSchedule"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-metrics/CreateRumMetric.java b/examples/v2/rum-metrics/CreateRumMetric.java index 3a282e7b826..77c1311dd40 100644 --- a/examples/v2/rum-metrics/CreateRumMetric.java +++ b/examples/v2/rum-metrics/CreateRumMetric.java @@ -1,4 +1,4 @@ -// Create a rum-based metric returns "Created" response +// Create a RUM-based metric returns "Created" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/rum-metrics/DeleteRumMetric.java b/examples/v2/rum-metrics/DeleteRumMetric.java index b7b753ed3ca..4ae73ed6772 100644 --- a/examples/v2/rum-metrics/DeleteRumMetric.java +++ b/examples/v2/rum-metrics/DeleteRumMetric.java @@ -1,4 +1,4 @@ -// Delete a rum-based metric returns "No Content" response +// Delete a RUM-based metric returns "No Content" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/rum-metrics/GetRumMetric.java b/examples/v2/rum-metrics/GetRumMetric.java index 07155d9c0b3..5f02793503b 100644 --- a/examples/v2/rum-metrics/GetRumMetric.java +++ b/examples/v2/rum-metrics/GetRumMetric.java @@ -1,4 +1,4 @@ -// Get a rum-based metric returns "OK" response +// Get a RUM-based metric returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/rum-metrics/ListRumMetrics.java b/examples/v2/rum-metrics/ListRumMetrics.java index 0225cf6b02d..a0e8ca52d18 100644 --- a/examples/v2/rum-metrics/ListRumMetrics.java +++ b/examples/v2/rum-metrics/ListRumMetrics.java @@ -1,4 +1,4 @@ -// Get all rum-based metrics returns "OK" response +// Get all RUM-based metrics returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/rum-metrics/UpdateRumMetric.java b/examples/v2/rum-metrics/UpdateRumMetric.java index b6d3f2468fc..e1f0eafd65c 100644 --- a/examples/v2/rum-metrics/UpdateRumMetric.java +++ b/examples/v2/rum-metrics/UpdateRumMetric.java @@ -1,4 +1,4 @@ -// Update a rum-based metric returns "OK" response +// Update a RUM-based metric returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/rum-rate-limit/DeleteRumRateLimitConfig.java b/examples/v2/rum-rate-limit/DeleteRumRateLimitConfig.java new file mode 100644 index 00000000000..0fac6c3a80b --- /dev/null +++ b/examples/v2/rum-rate-limit/DeleteRumRateLimitConfig.java @@ -0,0 +1,25 @@ +// Delete a RUM rate limit configuration returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumRateLimitApi; +import com.datadog.api.client.v2.model.RumRateLimitScopeType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.deleteRumRateLimitConfig", true); + RumRateLimitApi apiInstance = new RumRateLimitApi(defaultClient); + + try { + apiInstance.deleteRumRateLimitConfig( + RumRateLimitScopeType.APPLICATION, "cd73a516-a481-4af5-8352-9b577465c77b"); + } catch (ApiException e) { + System.err.println("Exception when calling RumRateLimitApi#deleteRumRateLimitConfig"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-rate-limit/GetRumRateLimitConfig.java b/examples/v2/rum-rate-limit/GetRumRateLimitConfig.java new file mode 100644 index 00000000000..4a40cd73a42 --- /dev/null +++ b/examples/v2/rum-rate-limit/GetRumRateLimitConfig.java @@ -0,0 +1,28 @@ +// Get a RUM rate limit configuration returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumRateLimitApi; +import com.datadog.api.client.v2.model.RumRateLimitConfigResponse; +import com.datadog.api.client.v2.model.RumRateLimitScopeType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getRumRateLimitConfig", true); + RumRateLimitApi apiInstance = new RumRateLimitApi(defaultClient); + + try { + RumRateLimitConfigResponse result = + apiInstance.getRumRateLimitConfig( + RumRateLimitScopeType.APPLICATION, "cd73a516-a481-4af5-8352-9b577465c77b"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumRateLimitApi#getRumRateLimitConfig"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-rate-limit/UpdateRumRateLimitConfig.java b/examples/v2/rum-rate-limit/UpdateRumRateLimitConfig.java new file mode 100644 index 00000000000..0cde3d3a98a --- /dev/null +++ b/examples/v2/rum-rate-limit/UpdateRumRateLimitConfig.java @@ -0,0 +1,55 @@ +// Create or update a RUM rate limit configuration returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumRateLimitApi; +import com.datadog.api.client.v2.model.RumRateLimitAdaptiveConfig; +import com.datadog.api.client.v2.model.RumRateLimitConfigResponse; +import com.datadog.api.client.v2.model.RumRateLimitConfigType; +import com.datadog.api.client.v2.model.RumRateLimitConfigUpdateAttributes; +import com.datadog.api.client.v2.model.RumRateLimitConfigUpdateData; +import com.datadog.api.client.v2.model.RumRateLimitConfigUpdateRequest; +import com.datadog.api.client.v2.model.RumRateLimitCustomConfig; +import com.datadog.api.client.v2.model.RumRateLimitMode; +import com.datadog.api.client.v2.model.RumRateLimitQuotaReachedAction; +import com.datadog.api.client.v2.model.RumRateLimitScopeType; +import com.datadog.api.client.v2.model.RumRateLimitWindowType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.updateRumRateLimitConfig", true); + RumRateLimitApi apiInstance = new RumRateLimitApi(defaultClient); + + RumRateLimitConfigUpdateRequest body = + new RumRateLimitConfigUpdateRequest() + .data( + new RumRateLimitConfigUpdateData() + .attributes( + new RumRateLimitConfigUpdateAttributes() + .adaptive(new RumRateLimitAdaptiveConfig().maxRetentionRate(0.5)) + .custom( + new RumRateLimitCustomConfig() + .dailyResetTime("08:00") + .dailyResetTimezone("+09:00") + .quotaReachedAction(RumRateLimitQuotaReachedAction.STOP) + .sessionLimit(1000000L) + .windowType(RumRateLimitWindowType.DAILY)) + .mode(RumRateLimitMode.CUSTOM)) + .id("cd73a516-a481-4af5-8352-9b577465c77b") + .type(RumRateLimitConfigType.RUM_RATE_LIMIT_CONFIG)); + + try { + RumRateLimitConfigResponse result = + apiInstance.updateRumRateLimitConfig( + RumRateLimitScopeType.APPLICATION, "cd73a516-a481-4af5-8352-9b577465c77b", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumRateLimitApi#updateRumRateLimitConfig"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-replay-playlists/AddRumReplaySessionToPlaylist.java b/examples/v2/rum-replay-playlists/AddRumReplaySessionToPlaylist.java index c7d6e93ebb4..68a4e3de0e7 100644 --- a/examples/v2/rum-replay-playlists/AddRumReplaySessionToPlaylist.java +++ b/examples/v2/rum-replay-playlists/AddRumReplaySessionToPlaylist.java @@ -1,4 +1,4 @@ -// Add rum replay session to playlist returns "OK" response +// Add RUM replay session to playlist returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; @@ -13,7 +13,7 @@ public static void main(String[] args) { try { PlaylistsSession result = apiInstance.addRumReplaySessionToPlaylist( - 1704067200000L, 1234567, "00000000-0000-0000-0000-000000000001"); + 1704067200000L, 1234567L, "00000000-0000-0000-0000-000000000001"); System.out.println(result); } catch (ApiException e) { System.err.println( diff --git a/examples/v2/rum-replay-playlists/BulkRemoveRumReplayPlaylistSessions.java b/examples/v2/rum-replay-playlists/BulkRemoveRumReplayPlaylistSessions.java index 5088a739a31..5595799e8c5 100644 --- a/examples/v2/rum-replay-playlists/BulkRemoveRumReplayPlaylistSessions.java +++ b/examples/v2/rum-replay-playlists/BulkRemoveRumReplayPlaylistSessions.java @@ -1,4 +1,4 @@ -// Bulk remove rum replay playlist sessions returns "No Content" response +// Bulk remove RUM replay playlist sessions returns "No Content" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; @@ -22,7 +22,7 @@ public static void main(String[] args) { .type(ViewershipHistorySessionDataType.RUM_REPLAY_SESSION))); try { - apiInstance.bulkRemoveRumReplayPlaylistSessions(1234567, body); + apiInstance.bulkRemoveRumReplayPlaylistSessions(1234567L, body); } catch (ApiException e) { System.err.println( "Exception when calling RumReplayPlaylistsApi#bulkRemoveRumReplayPlaylistSessions"); diff --git a/examples/v2/rum-replay-playlists/CreateRumReplayPlaylist.java b/examples/v2/rum-replay-playlists/CreateRumReplayPlaylist.java index ad3e4655b7f..f2155d52669 100644 --- a/examples/v2/rum-replay-playlists/CreateRumReplayPlaylist.java +++ b/examples/v2/rum-replay-playlists/CreateRumReplayPlaylist.java @@ -1,4 +1,4 @@ -// Create rum replay playlist returns "Created" response +// Create RUM replay playlist returns "Created" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/rum-replay-playlists/DeleteRumReplayPlaylist.java b/examples/v2/rum-replay-playlists/DeleteRumReplayPlaylist.java index 592938cd19f..670a312caf2 100644 --- a/examples/v2/rum-replay-playlists/DeleteRumReplayPlaylist.java +++ b/examples/v2/rum-replay-playlists/DeleteRumReplayPlaylist.java @@ -1,4 +1,4 @@ -// Delete rum replay playlist returns "No Content" response +// Delete RUM replay playlist returns "No Content" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; @@ -10,7 +10,7 @@ public static void main(String[] args) { RumReplayPlaylistsApi apiInstance = new RumReplayPlaylistsApi(defaultClient); try { - apiInstance.deleteRumReplayPlaylist(1234567); + apiInstance.deleteRumReplayPlaylist(1234567L); } catch (ApiException e) { System.err.println("Exception when calling RumReplayPlaylistsApi#deleteRumReplayPlaylist"); System.err.println("Status code: " + e.getCode()); diff --git a/examples/v2/rum-replay-playlists/GetRumReplayPlaylist.java b/examples/v2/rum-replay-playlists/GetRumReplayPlaylist.java index 82680706bf4..ae1e0d9f2d6 100644 --- a/examples/v2/rum-replay-playlists/GetRumReplayPlaylist.java +++ b/examples/v2/rum-replay-playlists/GetRumReplayPlaylist.java @@ -1,4 +1,4 @@ -// Get rum replay playlist returns "OK" response +// Get RUM replay playlist returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; @@ -11,7 +11,7 @@ public static void main(String[] args) { RumReplayPlaylistsApi apiInstance = new RumReplayPlaylistsApi(defaultClient); try { - Playlist result = apiInstance.getRumReplayPlaylist(1234567); + Playlist result = apiInstance.getRumReplayPlaylist(1234567L); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling RumReplayPlaylistsApi#getRumReplayPlaylist"); diff --git a/examples/v2/rum-replay-playlists/ListRumReplayPlaylistSessions.java b/examples/v2/rum-replay-playlists/ListRumReplayPlaylistSessions.java index 657b4c8eb07..960845669c4 100644 --- a/examples/v2/rum-replay-playlists/ListRumReplayPlaylistSessions.java +++ b/examples/v2/rum-replay-playlists/ListRumReplayPlaylistSessions.java @@ -1,4 +1,4 @@ -// List rum replay playlist sessions returns "OK" response +// List RUM replay playlist sessions returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; @@ -11,7 +11,7 @@ public static void main(String[] args) { RumReplayPlaylistsApi apiInstance = new RumReplayPlaylistsApi(defaultClient); try { - PlaylistsSessionArray result = apiInstance.listRumReplayPlaylistSessions(1234567); + PlaylistsSessionArray result = apiInstance.listRumReplayPlaylistSessions(1234567L); System.out.println(result); } catch (ApiException e) { System.err.println( diff --git a/examples/v2/rum-replay-playlists/ListRumReplayPlaylists.java b/examples/v2/rum-replay-playlists/ListRumReplayPlaylists.java index 36c9a4ad076..93bc5ae3d3e 100644 --- a/examples/v2/rum-replay-playlists/ListRumReplayPlaylists.java +++ b/examples/v2/rum-replay-playlists/ListRumReplayPlaylists.java @@ -1,4 +1,4 @@ -// List rum replay playlists returns "OK" response +// List RUM replay playlists returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/rum-replay-playlists/RemoveRumReplaySessionFromPlaylist.java b/examples/v2/rum-replay-playlists/RemoveRumReplaySessionFromPlaylist.java index e486a9d493e..1782558e51a 100644 --- a/examples/v2/rum-replay-playlists/RemoveRumReplaySessionFromPlaylist.java +++ b/examples/v2/rum-replay-playlists/RemoveRumReplaySessionFromPlaylist.java @@ -1,4 +1,4 @@ -// Remove rum replay session from playlist returns "No Content" response +// Remove RUM replay session from playlist returns "No Content" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; @@ -11,7 +11,7 @@ public static void main(String[] args) { try { apiInstance.removeRumReplaySessionFromPlaylist( - 1234567, "00000000-0000-0000-0000-000000000001"); + 1234567L, "00000000-0000-0000-0000-000000000001"); } catch (ApiException e) { System.err.println( "Exception when calling RumReplayPlaylistsApi#removeRumReplaySessionFromPlaylist"); diff --git a/examples/v2/rum-replay-playlists/UpdateRumReplayPlaylist.java b/examples/v2/rum-replay-playlists/UpdateRumReplayPlaylist.java index eb7bfd0172a..62bccaffc2c 100644 --- a/examples/v2/rum-replay-playlists/UpdateRumReplayPlaylist.java +++ b/examples/v2/rum-replay-playlists/UpdateRumReplayPlaylist.java @@ -1,4 +1,4 @@ -// Update rum replay playlist returns "OK" response +// Update RUM replay playlist returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; @@ -29,7 +29,7 @@ public static void main(String[] args) { .type(PlaylistDataType.RUM_REPLAY_PLAYLIST)); try { - Playlist result = apiInstance.updateRumReplayPlaylist(1234567, body); + Playlist result = apiInstance.updateRumReplayPlaylist(1234567L, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling RumReplayPlaylistsApi#updateRumReplayPlaylist"); diff --git a/examples/v2/rum-replay-viewership/CreateRumReplaySessionWatch.java b/examples/v2/rum-replay-viewership/CreateRumReplaySessionWatch.java index 05b8c82a21d..19144915715 100644 --- a/examples/v2/rum-replay-viewership/CreateRumReplaySessionWatch.java +++ b/examples/v2/rum-replay-viewership/CreateRumReplaySessionWatch.java @@ -1,4 +1,4 @@ -// Create rum replay session watch returns "Created" response +// Create RUM replay session watch returns "Created" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/rum-replay-viewership/DeleteRumReplaySessionWatch.java b/examples/v2/rum-replay-viewership/DeleteRumReplaySessionWatch.java index 8cdb823d2a7..343a8e21929 100644 --- a/examples/v2/rum-replay-viewership/DeleteRumReplaySessionWatch.java +++ b/examples/v2/rum-replay-viewership/DeleteRumReplaySessionWatch.java @@ -1,4 +1,4 @@ -// Delete rum replay session watch returns "No Content" response +// Delete RUM replay session watch returns "No Content" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/rum-replay-viewership/ListRumReplaySessionWatchers.java b/examples/v2/rum-replay-viewership/ListRumReplaySessionWatchers.java index 791a087a1e3..de64b3610e6 100644 --- a/examples/v2/rum-replay-viewership/ListRumReplaySessionWatchers.java +++ b/examples/v2/rum-replay-viewership/ListRumReplaySessionWatchers.java @@ -1,4 +1,4 @@ -// List rum replay session watchers returns "OK" response +// List RUM replay session watchers returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/rum-replay-viewership/ListRumReplayViewershipHistorySessions.java b/examples/v2/rum-replay-viewership/ListRumReplayViewershipHistorySessions.java index e2ce0709b44..bb34cf1ab7e 100644 --- a/examples/v2/rum-replay-viewership/ListRumReplayViewershipHistorySessions.java +++ b/examples/v2/rum-replay-viewership/ListRumReplayViewershipHistorySessions.java @@ -1,4 +1,4 @@ -// List rum replay viewership history sessions returns "OK" response +// List RUM replay viewership history sessions returns "OK" response import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; diff --git a/examples/v2/seats/GetSeatsUsers.java b/examples/v2/seats/GetSeatsUsers.java index f38b8a88b58..9730d4ad1aa 100644 --- a/examples/v2/seats/GetSeatsUsers.java +++ b/examples/v2/seats/GetSeatsUsers.java @@ -14,7 +14,7 @@ public static void main(String[] args) { try { SeatUserDataArray result = apiInstance.getSeatsUsers( - "incident_response", new GetSeatsUsersOptionalParameters().pageLimit(100)); + "incident_response", new GetSeatsUsersOptionalParameters().pageLimit(100L)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling SeatsApi#getSeatsUsers"); diff --git a/examples/v2/security-monitoring/AttachServiceNowTicket.java b/examples/v2/security-monitoring/AttachServiceNowTicket.java new file mode 100644 index 00000000000..132bbc36da9 --- /dev/null +++ b/examples/v2/security-monitoring/AttachServiceNowTicket.java @@ -0,0 +1,62 @@ +// Attach security findings to a ServiceNow ticket returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.AttachServiceNowTicketRequest; +import com.datadog.api.client.v2.model.AttachServiceNowTicketRequestData; +import com.datadog.api.client.v2.model.AttachServiceNowTicketRequestDataAttributes; +import com.datadog.api.client.v2.model.AttachServiceNowTicketRequestDataRelationships; +import com.datadog.api.client.v2.model.CaseManagementProject; +import com.datadog.api.client.v2.model.CaseManagementProjectData; +import com.datadog.api.client.v2.model.CaseManagementProjectDataType; +import com.datadog.api.client.v2.model.FindingCaseResponse; +import com.datadog.api.client.v2.model.FindingData; +import com.datadog.api.client.v2.model.FindingDataType; +import com.datadog.api.client.v2.model.Findings; +import com.datadog.api.client.v2.model.ServiceNowTicketsDataType; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.attachServiceNowTicket", true); + SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); + + AttachServiceNowTicketRequest body = + new AttachServiceNowTicketRequest() + .data( + new AttachServiceNowTicketRequestData() + .attributes( + new AttachServiceNowTicketRequestDataAttributes() + .servicenowTicketUrl( + "https://example.service-now.com/now/nav/ui/classic/params/target/incident.do?sys_id=abcdef0123456789abcdef0123456789")) + .relationships( + new AttachServiceNowTicketRequestDataRelationships() + .findings( + new Findings() + .data( + Collections.singletonList( + new FindingData() + .id("ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==") + .type(FindingDataType.FINDINGS)))) + .project( + new CaseManagementProject() + .data( + new CaseManagementProjectData() + .id("aeadc05e-98a8-11ec-ac2c-da7ad0900001") + .type(CaseManagementProjectDataType.PROJECTS)))) + .type(ServiceNowTicketsDataType.SERVICENOW_TICKETS)); + + try { + FindingCaseResponse result = apiInstance.attachServiceNowTicket(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SecurityMonitoringApi#attachServiceNowTicket"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/security-monitoring/CreateServiceNowTickets.java b/examples/v2/security-monitoring/CreateServiceNowTickets.java new file mode 100644 index 00000000000..8554e9ef525 --- /dev/null +++ b/examples/v2/security-monitoring/CreateServiceNowTickets.java @@ -0,0 +1,67 @@ +// Create ServiceNow tickets for security findings returns "Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.CaseManagementProject; +import com.datadog.api.client.v2.model.CaseManagementProjectData; +import com.datadog.api.client.v2.model.CaseManagementProjectDataType; +import com.datadog.api.client.v2.model.CasePriority; +import com.datadog.api.client.v2.model.CreateServiceNowTicketRequestArray; +import com.datadog.api.client.v2.model.CreateServiceNowTicketRequestData; +import com.datadog.api.client.v2.model.CreateServiceNowTicketRequestDataAttributes; +import com.datadog.api.client.v2.model.CreateServiceNowTicketRequestDataRelationships; +import com.datadog.api.client.v2.model.FindingCaseResponseArray; +import com.datadog.api.client.v2.model.FindingData; +import com.datadog.api.client.v2.model.FindingDataType; +import com.datadog.api.client.v2.model.Findings; +import com.datadog.api.client.v2.model.ServiceNowTicketsDataType; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createServiceNowTickets", true); + SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); + + CreateServiceNowTicketRequestArray body = + new CreateServiceNowTicketRequestArray() + .data( + Collections.singletonList( + new CreateServiceNowTicketRequestData() + .attributes( + new CreateServiceNowTicketRequestDataAttributes() + .assigneeId("f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0") + .description("A description of the ServiceNow ticket.") + .priority(CasePriority.NOT_DEFINED) + .title("A title for the ServiceNow ticket.")) + .relationships( + new CreateServiceNowTicketRequestDataRelationships() + .findings( + new Findings() + .data( + Collections.singletonList( + new FindingData() + .id( + "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==") + .type(FindingDataType.FINDINGS)))) + .project( + new CaseManagementProject() + .data( + new CaseManagementProjectData() + .id("aeadc05e-98a8-11ec-ac2c-da7ad0900001") + .type(CaseManagementProjectDataType.PROJECTS)))) + .type(ServiceNowTicketsDataType.SERVICENOW_TICKETS))); + + try { + FindingCaseResponseArray result = apiInstance.createServiceNowTickets(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SecurityMonitoringApi#createServiceNowTickets"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/security-monitoring/GetSignalNotificationRules.java b/examples/v2/security-monitoring/GetSignalNotificationRules.java index db47c8967f1..9376c22dedb 100644 --- a/examples/v2/security-monitoring/GetSignalNotificationRules.java +++ b/examples/v2/security-monitoring/GetSignalNotificationRules.java @@ -4,6 +4,7 @@ import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.NotificationRulesListResponse; public class Example { public static void main(String[] args) { @@ -11,7 +12,8 @@ public static void main(String[] args) { SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); try { - apiInstance.getSignalNotificationRules(); + NotificationRulesListResponse result = apiInstance.getSignalNotificationRules(); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling SecurityMonitoringApi#getSignalNotificationRules"); System.err.println("Status code: " + e.getCode()); diff --git a/examples/v2/security-monitoring/GetSingleEntityContext.java b/examples/v2/security-monitoring/GetSingleEntityContext.java new file mode 100644 index 00000000000..9d460032fdf --- /dev/null +++ b/examples/v2/security-monitoring/GetSingleEntityContext.java @@ -0,0 +1,25 @@ +// Get a single entity context returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.SingleEntityContextResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getSingleEntityContext", true); + SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); + + try { + SingleEntityContextResponse result = apiInstance.getSingleEntityContext("user@example.com"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SecurityMonitoringApi#getSingleEntityContext"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/security-monitoring/GetVulnerabilityNotificationRules.java b/examples/v2/security-monitoring/GetVulnerabilityNotificationRules.java index bb6b715806d..264215b7626 100644 --- a/examples/v2/security-monitoring/GetVulnerabilityNotificationRules.java +++ b/examples/v2/security-monitoring/GetVulnerabilityNotificationRules.java @@ -4,6 +4,7 @@ import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.NotificationRulesListResponse; public class Example { public static void main(String[] args) { @@ -11,7 +12,8 @@ public static void main(String[] args) { SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); try { - apiInstance.getVulnerabilityNotificationRules(); + NotificationRulesListResponse result = apiInstance.getVulnerabilityNotificationRules(); + System.out.println(result); } catch (ApiException e) { System.err.println( "Exception when calling SecurityMonitoringApi#getVulnerabilityNotificationRules"); diff --git a/examples/v2/security-monitoring/RestoreSecurityMonitoringRule.java b/examples/v2/security-monitoring/RestoreSecurityMonitoringRule.java new file mode 100644 index 00000000000..d2cdb594268 --- /dev/null +++ b/examples/v2/security-monitoring/RestoreSecurityMonitoringRule.java @@ -0,0 +1,30 @@ +// Restore a rule to a historical version returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.SecurityMonitoringRuleResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.restoreSecurityMonitoringRule", true); + SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); + + // there is a valid "security_rule" in the system + String SECURITY_RULE_ID = System.getenv("SECURITY_RULE_ID"); + + try { + SecurityMonitoringRuleResponse result = + apiInstance.restoreSecurityMonitoringRule(SECURITY_RULE_ID, 1L); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling SecurityMonitoringApi#restoreSecurityMonitoringRule"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/security-monitoring/SendSecurityMonitoringNotificationPreview.java b/examples/v2/security-monitoring/SendSecurityMonitoringNotificationPreview.java new file mode 100644 index 00000000000..42751f06a6c --- /dev/null +++ b/examples/v2/security-monitoring/SendSecurityMonitoringNotificationPreview.java @@ -0,0 +1,53 @@ +// Test a notification rule returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.CreateNotificationRuleParameters; +import com.datadog.api.client.v2.model.CreateNotificationRuleParametersData; +import com.datadog.api.client.v2.model.CreateNotificationRuleParametersDataAttributes; +import com.datadog.api.client.v2.model.NotificationRulePreviewResponse; +import com.datadog.api.client.v2.model.NotificationRulesType; +import com.datadog.api.client.v2.model.RuleSeverity; +import com.datadog.api.client.v2.model.RuleTypesItems; +import com.datadog.api.client.v2.model.Selectors; +import com.datadog.api.client.v2.model.TriggerSource; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); + + CreateNotificationRuleParameters body = + new CreateNotificationRuleParameters() + .data( + new CreateNotificationRuleParametersData() + .attributes( + new CreateNotificationRuleParametersDataAttributes() + .enabled(true) + .name("Rule 1") + .selectors( + new Selectors() + .query("env:prod") + .ruleTypes( + Collections.singletonList(RuleTypesItems.LOG_DETECTION)) + .severities(Collections.singletonList(RuleSeverity.CRITICAL)) + .triggerSource(TriggerSource.SECURITY_SIGNALS)) + .targets(Collections.singletonList("@john.doe@email.com"))) + .type(NotificationRulesType.NOTIFICATION_RULES)); + + try { + NotificationRulePreviewResponse result = + apiInstance.sendSecurityMonitoringNotificationPreview(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling SecurityMonitoringApi#sendSecurityMonitoringNotificationPreview"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/security-monitoring/UpdateFindingsAssignee.java b/examples/v2/security-monitoring/UpdateFindingsAssignee.java new file mode 100644 index 00000000000..53aed0cd08c --- /dev/null +++ b/examples/v2/security-monitoring/UpdateFindingsAssignee.java @@ -0,0 +1,53 @@ +// Assign or unassign security findings returns "Accepted" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SecurityMonitoringApi; +import com.datadog.api.client.v2.model.AssigneeDataType; +import com.datadog.api.client.v2.model.AssigneeRequest; +import com.datadog.api.client.v2.model.AssigneeRequestData; +import com.datadog.api.client.v2.model.AssigneeRequestDataAttributes; +import com.datadog.api.client.v2.model.AssigneeRequestDataRelationships; +import com.datadog.api.client.v2.model.AssigneeResponse; +import com.datadog.api.client.v2.model.FindingData; +import com.datadog.api.client.v2.model.FindingDataType; +import com.datadog.api.client.v2.model.Findings; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.updateFindingsAssignee", true); + SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient); + + AssigneeRequest body = + new AssigneeRequest() + .data( + new AssigneeRequestData() + .attributes( + new AssigneeRequestDataAttributes() + .assigneeId("f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0")) + .id("00000000-0000-0000-0000-000000000001") + .relationships( + new AssigneeRequestDataRelationships() + .findings( + new Findings() + .data( + Collections.singletonList( + new FindingData() + .id("ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==") + .type(FindingDataType.FINDINGS))))) + .type(AssigneeDataType.ASSIGNEE)); + + try { + AssigneeResponse result = apiInstance.updateFindingsAssignee(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SecurityMonitoringApi#updateFindingsAssignee"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/slack-integration/ListSlackUserBindings.java b/examples/v2/slack-integration/ListSlackUserBindings.java new file mode 100644 index 00000000000..fc6278d3b90 --- /dev/null +++ b/examples/v2/slack-integration/ListSlackUserBindings.java @@ -0,0 +1,27 @@ +// List Slack user bindings returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SlackIntegrationApi; +import com.datadog.api.client.v2.model.SlackUserBindingsResponse; +import java.util.UUID; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + SlackIntegrationApi apiInstance = new SlackIntegrationApi(defaultClient); + + try { + SlackUserBindingsResponse result = + apiInstance.listSlackUserBindings( + UUID.fromString("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d")); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SlackIntegrationApi#listSlackUserBindings"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/static-analysis/CreateSCAScan.java b/examples/v2/static-analysis/CreateSCAScan.java new file mode 100644 index 00000000000..22e68ef06b3 --- /dev/null +++ b/examples/v2/static-analysis/CreateSCAScan.java @@ -0,0 +1,48 @@ +// Submit libraries for vulnerability scanning returns "Accepted" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.StaticAnalysisApi; +import com.datadog.api.client.v2.model.McpScanRequest; +import com.datadog.api.client.v2.model.McpScanRequestData; +import com.datadog.api.client.v2.model.McpScanRequestDataAttributes; +import com.datadog.api.client.v2.model.McpScanRequestDataAttributesLibrariesItems; +import com.datadog.api.client.v2.model.McpScanRequestDataType; +import com.datadog.api.client.v2.model.McpScanRequestResponse; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createSCAScan", true); + StaticAnalysisApi apiInstance = new StaticAnalysisApi(defaultClient); + + McpScanRequest body = + new McpScanRequest() + .data( + new McpScanRequestData() + .attributes( + new McpScanRequestDataAttributes() + .commitHash("0e9fc8de83eaabecd722e1cd0ed44fb489fe15fc") + .libraries( + Collections.singletonList( + new McpScanRequestDataAttributesLibrariesItems() + .isDev(false) + .isDirect(true) + .packageManager("nuget") + .purl("pkg:nuget/Newtonsoft.Json@13.0.1"))) + .resourceName("my-org/my-repo")) + .type(McpScanRequestDataType.MCPSCANREQUEST)); + + try { + McpScanRequestResponse result = apiInstance.createSCAScan(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StaticAnalysisApi#createSCAScan"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/static-analysis/GetSCAScan.java b/examples/v2/static-analysis/GetSCAScan.java new file mode 100644 index 00000000000..50e6149ec1e --- /dev/null +++ b/examples/v2/static-analysis/GetSCAScan.java @@ -0,0 +1,25 @@ +// Retrieve a dependency scan result returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.StaticAnalysisApi; +import com.datadog.api.client.v2.model.ScanResultResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getSCAScan", true); + StaticAnalysisApi apiInstance = new StaticAnalysisApi(defaultClient); + + try { + ScanResultResponse result = apiInstance.getSCAScan("0190a3d4-1234-7000-8000-000000000000"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StaticAnalysisApi#getSCAScan"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/static-analysis/ListSCALicenses.java b/examples/v2/static-analysis/ListSCALicenses.java new file mode 100644 index 00000000000..8748e228d56 --- /dev/null +++ b/examples/v2/static-analysis/ListSCALicenses.java @@ -0,0 +1,25 @@ +// Get the list of SPDX licenses returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.StaticAnalysisApi; +import com.datadog.api.client.v2.model.LicensesListResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listSCALicenses", true); + StaticAnalysisApi apiInstance = new StaticAnalysisApi(defaultClient); + + try { + LicensesListResponse result = apiInstance.listSCALicenses(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StaticAnalysisApi#listSCALicenses"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/stegadography/GetStegadographyWidgets.java b/examples/v2/stegadography/GetStegadographyWidgets.java new file mode 100644 index 00000000000..228c04771fe --- /dev/null +++ b/examples/v2/stegadography/GetStegadographyWidgets.java @@ -0,0 +1,26 @@ +// Get widgets from an image returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.StegadographyApi; +import com.datadog.api.client.v2.model.StegadographyGetWidgetsResponse; +import java.io.File; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + StegadographyApi apiInstance = new StegadographyApi(defaultClient); + + try { + StegadographyGetWidgetsResponse result = + apiInstance.getStegadographyWidgets(new File("fixtures/stegadography/image.png")); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling StegadographyApi#getStegadographyWidgets"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/tag-policies/CreateTagPolicy.java b/examples/v2/tag-policies/CreateTagPolicy.java new file mode 100644 index 00000000000..46f272e6715 --- /dev/null +++ b/examples/v2/tag-policies/CreateTagPolicy.java @@ -0,0 +1,49 @@ +// Create a tag policy returns "Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.TagPoliciesApi; +import com.datadog.api.client.v2.model.TagPolicyCreateAttributes; +import com.datadog.api.client.v2.model.TagPolicyCreateData; +import com.datadog.api.client.v2.model.TagPolicyCreateRequest; +import com.datadog.api.client.v2.model.TagPolicyCreateType; +import com.datadog.api.client.v2.model.TagPolicyResourceType; +import com.datadog.api.client.v2.model.TagPolicyResponse; +import com.datadog.api.client.v2.model.TagPolicySource; +import java.util.Arrays; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createTagPolicy", true); + TagPoliciesApi apiInstance = new TagPoliciesApi(defaultClient); + + TagPolicyCreateRequest body = + new TagPolicyCreateRequest() + .data( + new TagPolicyCreateData() + .attributes( + new TagPolicyCreateAttributes() + .enabled(true) + .negated(false) + .policyName("Service tag must be one of api or web") + .policyType(TagPolicyCreateType.SURFACING) + .required(true) + .scope("env") + .source(TagPolicySource.LOGS) + .tagKey("service") + .tagValuePatterns(Arrays.asList("api", "web"))) + .type(TagPolicyResourceType.TAG_POLICY)); + + try { + TagPolicyResponse result = apiInstance.createTagPolicy(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TagPoliciesApi#createTagPolicy"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/tag-policies/DeleteTagPolicy.java b/examples/v2/tag-policies/DeleteTagPolicy.java new file mode 100644 index 00000000000..1f99a8f9079 --- /dev/null +++ b/examples/v2/tag-policies/DeleteTagPolicy.java @@ -0,0 +1,23 @@ +// Delete a tag policy returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.TagPoliciesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.deleteTagPolicy", true); + TagPoliciesApi apiInstance = new TagPoliciesApi(defaultClient); + + try { + apiInstance.deleteTagPolicy("123"); + } catch (ApiException e) { + System.err.println("Exception when calling TagPoliciesApi#deleteTagPolicy"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/tag-policies/GetTagPolicy.java b/examples/v2/tag-policies/GetTagPolicy.java new file mode 100644 index 00000000000..b14c1c0139a --- /dev/null +++ b/examples/v2/tag-policies/GetTagPolicy.java @@ -0,0 +1,25 @@ +// Get a tag policy returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.TagPoliciesApi; +import com.datadog.api.client.v2.model.TagPolicyResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getTagPolicy", true); + TagPoliciesApi apiInstance = new TagPoliciesApi(defaultClient); + + try { + TagPolicyResponse result = apiInstance.getTagPolicy("123"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TagPoliciesApi#getTagPolicy"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/tag-policies/GetTagPolicyScore.java b/examples/v2/tag-policies/GetTagPolicyScore.java new file mode 100644 index 00000000000..1574f9a5832 --- /dev/null +++ b/examples/v2/tag-policies/GetTagPolicyScore.java @@ -0,0 +1,25 @@ +// Get a tag policy compliance score returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.TagPoliciesApi; +import com.datadog.api.client.v2.model.TagPolicyScoreResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getTagPolicyScore", true); + TagPoliciesApi apiInstance = new TagPoliciesApi(defaultClient); + + try { + TagPolicyScoreResponse result = apiInstance.getTagPolicyScore("123"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TagPoliciesApi#getTagPolicyScore"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/tag-policies/ListTagPolicies.java b/examples/v2/tag-policies/ListTagPolicies.java new file mode 100644 index 00000000000..7aa01b75df1 --- /dev/null +++ b/examples/v2/tag-policies/ListTagPolicies.java @@ -0,0 +1,25 @@ +// List tag policies returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.TagPoliciesApi; +import com.datadog.api.client.v2.model.TagPoliciesListResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listTagPolicies", true); + TagPoliciesApi apiInstance = new TagPoliciesApi(defaultClient); + + try { + TagPoliciesListResponse result = apiInstance.listTagPolicies(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TagPoliciesApi#listTagPolicies"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/tag-policies/UpdateTagPolicy.java b/examples/v2/tag-policies/UpdateTagPolicy.java new file mode 100644 index 00000000000..07bcef5ef2c --- /dev/null +++ b/examples/v2/tag-policies/UpdateTagPolicy.java @@ -0,0 +1,38 @@ +// Update a tag policy returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.TagPoliciesApi; +import com.datadog.api.client.v2.model.TagPolicyResourceType; +import com.datadog.api.client.v2.model.TagPolicyResponse; +import com.datadog.api.client.v2.model.TagPolicyType; +import com.datadog.api.client.v2.model.TagPolicyUpdateAttributes; +import com.datadog.api.client.v2.model.TagPolicyUpdateData; +import com.datadog.api.client.v2.model.TagPolicyUpdateRequest; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.updateTagPolicy", true); + TagPoliciesApi apiInstance = new TagPoliciesApi(defaultClient); + + TagPolicyUpdateRequest body = + new TagPolicyUpdateRequest() + .data( + new TagPolicyUpdateData() + .attributes(new TagPolicyUpdateAttributes().policyType(TagPolicyType.SURFACING)) + .id("123") + .type(TagPolicyResourceType.TAG_POLICY)); + + try { + TagPolicyResponse result = apiInstance.updateTagPolicy("123", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TagPoliciesApi#updateTagPolicy"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/usage-metering/GetUsageSummaryAvailableFields.java b/examples/v2/usage-metering/GetUsageSummaryAvailableFields.java new file mode 100644 index 00000000000..d999b726140 --- /dev/null +++ b/examples/v2/usage-metering/GetUsageSummaryAvailableFields.java @@ -0,0 +1,24 @@ +// Get available fields for usage summary returns "OK." response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.UsageMeteringApi; +import com.datadog.api.client.v2.model.UsageSummaryAvailableFieldsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); + + try { + UsageSummaryAvailableFieldsResponse result = apiInstance.getUsageSummaryAvailableFields(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsageMeteringApi#getUsageSummaryAvailableFields"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/usage-metering/GetUsageSummaryAvailableFields_2682263043.java b/examples/v2/usage-metering/GetUsageSummaryAvailableFields_2682263043.java new file mode 100644 index 00000000000..6afd6c313c4 --- /dev/null +++ b/examples/v2/usage-metering/GetUsageSummaryAvailableFields_2682263043.java @@ -0,0 +1,24 @@ +// Get available fields for usage summary returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.UsageMeteringApi; +import com.datadog.api.client.v2.model.UsageSummaryAvailableFieldsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); + + try { + UsageSummaryAvailableFieldsResponse result = apiInstance.getUsageSummaryAvailableFields(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsageMeteringApi#getUsageSummaryAvailableFields"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index 5a6f55591da..b9e556907cd 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -766,9 +766,7 @@ public class ApiClient { put("v2.listFleetAgents", false); put("v2.listFleetAgentTracers", false); put("v2.listFleetAgentVersions", false); - put("v2.listFleetClusters", false); put("v2.listFleetDeployments", false); - put("v2.listFleetInstrumentedPods", false); put("v2.listFleetSchedules", false); put("v2.listFleetTracers", false); put("v2.triggerFleetSchedule", false); @@ -786,11 +784,13 @@ public class ApiClient { put("v2.createLLMObsProject", false); put("v2.deleteLLMObsAnnotationQueue", false); put("v2.deleteLLMObsAnnotationQueueInteractions", false); + put("v2.deleteLLMObsAnnotations", false); put("v2.deleteLLMObsCustomEvalConfig", false); put("v2.deleteLLMObsData", false); put("v2.deleteLLMObsDatasetRecords", false); put("v2.deleteLLMObsDatasets", false); put("v2.deleteLLMObsExperiments", false); + put("v2.deleteLLMObsPatternsConfig", false); put("v2.deleteLLMObsProjects", false); put("v2.exportLLMObsDataset", false); put("v2.getLLMObsAnnotatedInteractions", false); @@ -798,14 +798,23 @@ public class ApiClient { put("v2.getLLMObsAnnotationQueueLabelSchema", false); put("v2.getLLMObsCustomEvalConfig", false); put("v2.getLLMObsDatasetDraftState", false); + put("v2.getLLMObsPatternsConfig", false); + put("v2.getLLMObsPatternsRunStatus", false); put("v2.listLLMObsAnnotationQueues", false); put("v2.listLLMObsDatasetRecords", false); put("v2.listLLMObsDatasets", false); put("v2.listLLMObsDatasetVersions", false); put("v2.listLLMObsExperimentEvents", false); + put("v2.listLLMObsExperimentEventsV1", false); + put("v2.listLLMObsExperimentEventsV2", false); put("v2.listLLMObsExperiments", false); put("v2.listLLMObsIntegrationAccounts", false); put("v2.listLLMObsIntegrationModels", false); + put("v2.listLLMObsPatternsClusteredPoints", false); + put("v2.listLLMObsPatternsConfigs", false); + put("v2.listLLMObsPatternsRuns", false); + put("v2.listLLMObsPatternsTopics", false); + put("v2.listLLMObsPatternsTopicsWithClusteredPoints", false); put("v2.listLLMObsProjects", false); put("v2.listLLMObsSpans", false); put("v2.lockLLMObsDatasetDraftState", false); @@ -813,6 +822,7 @@ public class ApiClient { put("v2.searchLLMObsExperimentation", false); put("v2.searchLLMObsSpans", false); put("v2.simpleSearchLLMObsExperimentation", false); + put("v2.triggerLLMObsPatterns", false); put("v2.unlockLLMObsDatasetDraftState", false); put("v2.updateLLMObsAnnotationQueue", false); put("v2.updateLLMObsAnnotationQueueLabelSchema", false); @@ -822,6 +832,8 @@ public class ApiClient { put("v2.updateLLMObsExperiment", false); put("v2.updateLLMObsProject", false); put("v2.uploadLLMObsDatasetRecordsFile", false); + put("v2.upsertLLMObsAnnotations", false); + put("v2.upsertLLMObsPatternsConfig", false); put("v2.createAnnotation", false); put("v2.deleteAnnotation", false); put("v2.getPageAnnotations", false); @@ -891,6 +903,7 @@ public class ApiClient { put("v2.getAWSCloudAuthPersonaMapping", false); put("v2.listAWSCloudAuthPersonaMappings", false); put("v2.activateContentPack", false); + put("v2.attachServiceNowTicket", false); put("v2.batchGetSecurityMonitoringDatasetDependencies", false); put("v2.bulkCreateSampleLogGenerationSubscriptions", false); put("v2.bulkExportSecurityMonitoringTerraformResources", false); @@ -900,6 +913,7 @@ public class ApiClient { put("v2.createSampleLogGenerationSubscription", false); put("v2.createSecurityMonitoringDataset", false); put("v2.createSecurityMonitoringIntegrationConfig", false); + put("v2.createServiceNowTickets", false); put("v2.createStaticAnalysisAst", false); put("v2.createStaticAnalysisServerAnalysis", false); put("v2.deactivateContentPack", false); @@ -922,6 +936,7 @@ public class ApiClient { put("v2.getSecurityMonitoringHistsignalsByJobId", false); put("v2.getSecurityMonitoringIntegrationConfig", false); put("v2.getSignalEntities", false); + put("v2.getSingleEntityContext", false); put("v2.getStaticAnalysisDefaultRulesets", false); put("v2.getStaticAnalysisNodeTypes", false); put("v2.getStaticAnalysisRuleset", false); @@ -939,8 +954,10 @@ public class ApiClient { put("v2.listVulnerabilities", false); put("v2.listVulnerableAssets", false); put("v2.muteFindings", false); + put("v2.restoreSecurityMonitoringRule", false); put("v2.runHistoricalJob", false); put("v2.searchSecurityMonitoringHistsignals", false); + put("v2.updateFindingsAssignee", false); put("v2.updateSecurityMonitoringDataset", false); put("v2.updateSecurityMonitoringIntegrationConfig", false); put("v2.validateSecurityMonitoringIntegrationConfig", false); @@ -965,12 +982,27 @@ public class ApiClient { put("v2.listCostTagMetadataMonths", false); put("v2.listCostTagMetadataOrchestrators", false); put("v2.searchCostRecommendations", false); + put("v2.createOwnershipFeedback", false); + put("v2.getOwnershipEvidence", false); + put("v2.getOwnershipInference", false); + put("v2.listOwnershipHistory", false); + put("v2.listOwnershipHistoryByOwnerType", false); + put("v2.listOwnershipInferences", false); + put("v2.getCSMAgentlessHostFacetInfo", false); + put("v2.getCSMUnifiedHostFacetInfo", false); + put("v2.listCSMAgentlessHostFacets", false); + put("v2.listCSMAgentlessHosts", false); + put("v2.listCSMUnifiedHostFacets", false); + put("v2.listCSMUnifiedHosts", false); + put("v2.listSharedDashboardsByDashboardId", false); put("v2.createDashboardSecureEmbed", false); put("v2.deleteDashboardSecureEmbed", false); put("v2.getDashboardSecureEmbed", false); put("v2.updateDashboardSecureEmbed", false); put("v2.getDashboardUsage", false); put("v2.listDashboardsUsage", false); + put("v2.getDataObservabilityMonitorRunStatus", false); + put("v2.runDataObservabilityMonitor", false); put("v2.createDataset", false); put("v2.deleteDataset", false); put("v2.getAllDatasets", false); @@ -991,6 +1023,17 @@ public class ApiClient { put("v2.triggerDeploymentGatesEvaluation", false); put("v2.updateDeploymentGate", false); put("v2.updateDeploymentRule", false); + put("v2.cloneForm", false); + put("v2.createAndPublishForm", false); + put("v2.createForm", false); + put("v2.deleteForm", false); + put("v2.getForm", false); + put("v2.listForms", false); + put("v2.publishForm", false); + put("v2.updateForm", false); + put("v2.upsertAndPublishFormVersion", false); + put("v2.upsertFormVersion", false); + put("v2.updateOrgSamlConfigurations", false); put("v2.createHamrOrgConnection", false); put("v2.getHamrOrgConnection", false); put("v2.deleteEntityIntegrationConfig", false); @@ -1053,6 +1096,7 @@ public class ApiClient { put("v2.deleteAWSAccountCCMConfig", false); put("v2.getAWSAccountCCMConfig", false); put("v2.updateAWSAccountCCMConfig", false); + put("v2.validateAWSCCMConfig", false); put("v2.createJiraIssueTemplate", false); put("v2.deleteJiraAccount", false); put("v2.deleteJiraIssueTemplate", false); @@ -1096,10 +1140,13 @@ public class ApiClient { put("v2.updateMonitorUserTemplate", false); put("v2.validateExistingMonitorUserTemplate", false); put("v2.validateMonitorUserTemplate", false); + put("v2.listNetworkHealthInsights", false); put("v2.deleteScopesRestriction", false); + put("v2.getOAuth2WellKnownSites", false); put("v2.getScopesRestriction", false); put("v2.registerOAuthClient", false); put("v2.upsertScopesRestriction", false); + put("v2.disableCustomerOrg", false); put("v2.bulkUpdateOrgGroupMemberships", false); put("v2.createOrgGroup", false); put("v2.createOrgGroupPolicy", false); @@ -1133,17 +1180,22 @@ public class ApiClient { put("v2.updateConnection", false); put("v2.getPrunedTraceByID", false); put("v2.getTraceByID", false); + put("v2.createReportSchedule", false); + put("v2.patchReportSchedule", false); + put("v2.deleteSourcemaps", false); + put("v2.getServiceRepositoryInfo", false); + put("v2.getSourcemaps", false); + put("v2.listSourcemaps", false); + put("v2.restoreSourcemaps", false); + put("v2.deleteRumRateLimitConfig", false); + put("v2.getRumRateLimitConfig", false); + put("v2.updateRumRateLimitConfig", false); put("v2.queryAggregatedLongTasks", false); put("v2.queryAggregatedSignalsProblems", false); put("v2.queryAggregatedWaterfall", false); put("v2.createScorecardOutcomesBatch", false); put("v2.getEntityRiskScore", false); put("v2.listEntityRiskScores", false); - put("v2.createIncidentService", false); - put("v2.deleteIncidentService", false); - put("v2.getIncidentService", false); - put("v2.listIncidentServices", false); - put("v2.updateIncidentService", false); put("v2.createSLOReportJob", false); put("v2.getSLOReport", false); put("v2.getSLOReportJobStatus", false); @@ -1159,6 +1211,7 @@ public class ApiClient { put("v2.createCustomRuleset", false); put("v2.createSCAResolveVulnerableSymbols", false); put("v2.createSCAResult", false); + put("v2.createSCAScan", false); put("v2.deleteAiCustomRule", false); put("v2.deleteAiCustomRuleset", false); put("v2.deleteAiMemoryViolationResult", false); @@ -1170,15 +1223,23 @@ public class ApiClient { put("v2.getCustomRule", false); put("v2.getCustomRuleRevision", false); put("v2.getCustomRuleset", false); + put("v2.getSCAScan", false); put("v2.listAiCustomRuleRevisions", false); put("v2.listAiCustomRulesets", false); put("v2.listAiMemoryViolationResults", false); put("v2.listAiPrompts", false); put("v2.listCustomRuleRevisions", false); put("v2.listCustomRulesets", false); + put("v2.listSCALicenses", false); put("v2.revertCustomRuleRevision", false); put("v2.updateAiCustomRuleset", false); put("v2.updateCustomRuleset", false); + put("v2.createTagPolicy", false); + put("v2.deleteTagPolicy", false); + put("v2.getTagPolicy", false); + put("v2.getTagPolicyScore", false); + put("v2.listTagPolicies", false); + put("v2.updateTagPolicy", false); put("v2.addMemberTeam", false); put("v2.listMemberTeams", false); put("v2.removeMemberTeam", false); 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 a8f0191c017..5df5d697189 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 @@ -82,7 +82,9 @@ public CompletableFuture createSLOCorrectionAsync( } /** - * Create an SLO Correction. + * Create an SLO correction. Use slo_id to apply the correction to a single SLO, or + * slo_query to apply the correction to SLOs that match a query. Exactly one of + * slo_id or slo_query is required. * * @param body Create an SLO Correction (required) * @return ApiResponse<SLOCorrectionResponse> 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 5bdf391fb33..43c0042b0f6 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 @@ -7231,6 +7231,12 @@ public CompletableFuture getUsageSummaryAsync( /** * Get all usage across your account. * + *

Newly added billing dimensions and usage types appear as untyped keys on the + * additionalProperties map of UsageSummaryResponse, UsageSummaryDate + * , and UsageSummaryDateOrg instead of as typed fields. Call + * GET /api/v2/usage/summary/available_fields to enumerate every key returned at each + * response level—both typed fields and additionalProperties keys. + * *

This endpoint is only accessible for parent-level * organizations. diff --git a/src/main/java/com/datadog/api/client/v1/model/ListStreamIssuePersona.java b/src/main/java/com/datadog/api/client/v1/model/ListStreamIssuePersona.java new file mode 100644 index 00000000000..4dfd8008360 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/ListStreamIssuePersona.java @@ -0,0 +1,59 @@ +/* + * 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.v1.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Persona filter for the issue_stream data source. */ +@JsonSerialize(using = ListStreamIssuePersona.ListStreamIssuePersonaSerializer.class) +public class ListStreamIssuePersona extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("all", "browser", "mobile", "backend")); + + public static final ListStreamIssuePersona ALL = new ListStreamIssuePersona("all"); + public static final ListStreamIssuePersona BROWSER = new ListStreamIssuePersona("browser"); + public static final ListStreamIssuePersona MOBILE = new ListStreamIssuePersona("mobile"); + public static final ListStreamIssuePersona BACKEND = new ListStreamIssuePersona("backend"); + + ListStreamIssuePersona(String value) { + super(value, allowedValues); + } + + public static class ListStreamIssuePersonaSerializer + extends StdSerializer { + public ListStreamIssuePersonaSerializer(Class t) { + super(t); + } + + public ListStreamIssuePersonaSerializer() { + this(null); + } + + @Override + public void serialize( + ListStreamIssuePersona value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ListStreamIssuePersona fromValue(String value) { + return new ListStreamIssuePersona(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v1/model/ListStreamIssueState.java b/src/main/java/com/datadog/api/client/v1/model/ListStreamIssueState.java new file mode 100644 index 00000000000..39056bf5458 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/ListStreamIssueState.java @@ -0,0 +1,58 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v1.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Issue state filter for the issue_stream data source. */ +@JsonSerialize(using = ListStreamIssueState.ListStreamIssueStateSerializer.class) +public class ListStreamIssueState extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("OPEN", "IGNORED", "ACKNOWLEDGED", "RESOLVED")); + + public static final ListStreamIssueState OPEN = new ListStreamIssueState("OPEN"); + public static final ListStreamIssueState IGNORED = new ListStreamIssueState("IGNORED"); + public static final ListStreamIssueState ACKNOWLEDGED = new ListStreamIssueState("ACKNOWLEDGED"); + public static final ListStreamIssueState RESOLVED = new ListStreamIssueState("RESOLVED"); + + ListStreamIssueState(String value) { + super(value, allowedValues); + } + + public static class ListStreamIssueStateSerializer extends StdSerializer { + public ListStreamIssueStateSerializer(Class t) { + super(t); + } + + public ListStreamIssueStateSerializer() { + this(null); + } + + @Override + public void serialize( + ListStreamIssueState value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ListStreamIssueState fromValue(String value) { + return new ListStreamIssueState(value); + } +} 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 9396163d2a9..2b2d13f72d5 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 @@ -21,20 +21,28 @@ /** Updated list stream widget. */ @JsonPropertyOrder({ + ListStreamQuery.JSON_PROPERTY_ASSIGNEE_UUIDS, ListStreamQuery.JSON_PROPERTY_CLUSTERING_PATTERN_FIELD_PATH, ListStreamQuery.JSON_PROPERTY_COMPUTE, ListStreamQuery.JSON_PROPERTY_DATA_SOURCE, ListStreamQuery.JSON_PROPERTY_EVENT_SIZE, ListStreamQuery.JSON_PROPERTY_GROUP_BY, ListStreamQuery.JSON_PROPERTY_INDEXES, + ListStreamQuery.JSON_PROPERTY_PERSONA, ListStreamQuery.JSON_PROPERTY_QUERY_STRING, ListStreamQuery.JSON_PROPERTY_SORT, - ListStreamQuery.JSON_PROPERTY_STORAGE + ListStreamQuery.JSON_PROPERTY_STATES, + ListStreamQuery.JSON_PROPERTY_STORAGE, + ListStreamQuery.JSON_PROPERTY_SUSPECTED_CAUSES, + ListStreamQuery.JSON_PROPERTY_TEAM_HANDLES }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class ListStreamQuery { @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ASSIGNEE_UUIDS = "assignee_uuids"; + private List assigneeUuids = null; + public static final String JSON_PROPERTY_CLUSTERING_PATTERN_FIELD_PATH = "clustering_pattern_field_path"; private String clusteringPatternFieldPath; @@ -43,7 +51,7 @@ public class ListStreamQuery { private List compute = null; public static final String JSON_PROPERTY_DATA_SOURCE = "data_source"; - private ListStreamSource dataSource = ListStreamSource.APM_ISSUE_STREAM; + private ListStreamSource dataSource = ListStreamSource.LOGS_STREAM; public static final String JSON_PROPERTY_EVENT_SIZE = "event_size"; private WidgetEventSize eventSize; @@ -54,15 +62,27 @@ public class ListStreamQuery { public static final String JSON_PROPERTY_INDEXES = "indexes"; private List indexes = null; + public static final String JSON_PROPERTY_PERSONA = "persona"; + private ListStreamIssuePersona persona; + public static final String JSON_PROPERTY_QUERY_STRING = "query_string"; private String queryString; public static final String JSON_PROPERTY_SORT = "sort"; private WidgetFieldSort sort; + public static final String JSON_PROPERTY_STATES = "states"; + private List states = null; + public static final String JSON_PROPERTY_STORAGE = "storage"; private String storage; + public static final String JSON_PROPERTY_SUSPECTED_CAUSES = "suspected_causes"; + private List suspectedCauses = null; + + public static final String JSON_PROPERTY_TEAM_HANDLES = "team_handles"; + private List teamHandles = null; + public ListStreamQuery() {} @JsonCreator @@ -74,6 +94,35 @@ public ListStreamQuery( this.queryString = queryString; } + public ListStreamQuery assigneeUuids(List assigneeUuids) { + this.assigneeUuids = assigneeUuids; + return this; + } + + public ListStreamQuery addAssigneeUuidsItem(String assigneeUuidsItem) { + if (this.assigneeUuids == null) { + this.assigneeUuids = new ArrayList<>(); + } + this.assigneeUuids.add(assigneeUuidsItem); + return this; + } + + /** + * Filter by assignee UUIDs. Usable only with issue_stream. + * + * @return assigneeUuids + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ASSIGNEE_UUIDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAssigneeUuids() { + return assigneeUuids; + } + + public void setAssigneeUuids(List assigneeUuids) { + this.assigneeUuids = assigneeUuids; + } + public ListStreamQuery clusteringPatternFieldPath(String clusteringPatternFieldPath) { this.clusteringPatternFieldPath = clusteringPatternFieldPath; return this; @@ -136,7 +185,8 @@ 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. apm_issue_stream, rum_issue_stream, + * and logs_issue_stream are deprecated. Use issue_stream instead. * * @return dataSource */ @@ -242,6 +292,31 @@ public void setIndexes(List indexes) { this.indexes = indexes; } + public ListStreamQuery persona(ListStreamIssuePersona persona) { + this.persona = persona; + this.unparsed |= !persona.isValid(); + return this; + } + + /** + * Persona filter for the issue_stream data source. + * + * @return persona + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PERSONA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ListStreamIssuePersona getPersona() { + return persona; + } + + public void setPersona(ListStreamIssuePersona persona) { + if (!persona.isValid()) { + this.unparsed = true; + } + this.persona = persona; + } + public ListStreamQuery queryString(String queryString) { this.queryString = queryString; return this; @@ -284,6 +359,36 @@ public void setSort(WidgetFieldSort sort) { this.sort = sort; } + public ListStreamQuery states(List states) { + this.states = states; + return this; + } + + public ListStreamQuery addStatesItem(ListStreamIssueState statesItem) { + if (this.states == null) { + this.states = new ArrayList<>(); + } + this.states.add(statesItem); + this.unparsed |= !statesItem.isValid(); + return this; + } + + /** + * Filter by issue states. Usable only with issue_stream. + * + * @return states + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getStates() { + return states; + } + + public void setStates(List states) { + this.states = states; + } + public ListStreamQuery storage(String storage) { this.storage = storage; return this; @@ -305,6 +410,64 @@ public void setStorage(String storage) { this.storage = storage; } + public ListStreamQuery suspectedCauses(List suspectedCauses) { + this.suspectedCauses = suspectedCauses; + return this; + } + + public ListStreamQuery addSuspectedCausesItem(String suspectedCausesItem) { + if (this.suspectedCauses == null) { + this.suspectedCauses = new ArrayList<>(); + } + this.suspectedCauses.add(suspectedCausesItem); + return this; + } + + /** + * Filter by suspected causes. Usable only with issue_stream. + * + * @return suspectedCauses + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUSPECTED_CAUSES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getSuspectedCauses() { + return suspectedCauses; + } + + public void setSuspectedCauses(List suspectedCauses) { + this.suspectedCauses = suspectedCauses; + } + + public ListStreamQuery teamHandles(List teamHandles) { + this.teamHandles = teamHandles; + return this; + } + + public ListStreamQuery addTeamHandlesItem(String teamHandlesItem) { + if (this.teamHandles == null) { + this.teamHandles = new ArrayList<>(); + } + this.teamHandles.add(teamHandlesItem); + return this; + } + + /** + * Filter by team handles. Usable only with issue_stream. + * + * @return teamHandles + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEAM_HANDLES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTeamHandles() { + return teamHandles; + } + + public void setTeamHandles(List teamHandles) { + this.teamHandles = teamHandles; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -361,31 +524,41 @@ public boolean equals(Object o) { return false; } ListStreamQuery listStreamQuery = (ListStreamQuery) o; - return Objects.equals( + return Objects.equals(this.assigneeUuids, listStreamQuery.assigneeUuids) + && Objects.equals( this.clusteringPatternFieldPath, listStreamQuery.clusteringPatternFieldPath) && 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.persona, listStreamQuery.persona) && Objects.equals(this.queryString, listStreamQuery.queryString) && Objects.equals(this.sort, listStreamQuery.sort) + && Objects.equals(this.states, listStreamQuery.states) && Objects.equals(this.storage, listStreamQuery.storage) + && Objects.equals(this.suspectedCauses, listStreamQuery.suspectedCauses) + && Objects.equals(this.teamHandles, listStreamQuery.teamHandles) && Objects.equals(this.additionalProperties, listStreamQuery.additionalProperties); } @Override public int hashCode() { return Objects.hash( + assigneeUuids, clusteringPatternFieldPath, compute, dataSource, eventSize, groupBy, indexes, + persona, queryString, sort, + states, storage, + suspectedCauses, + teamHandles, additionalProperties); } @@ -393,6 +566,7 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ListStreamQuery {\n"); + sb.append(" assigneeUuids: ").append(toIndentedString(assigneeUuids)).append("\n"); sb.append(" clusteringPatternFieldPath: ") .append(toIndentedString(clusteringPatternFieldPath)) .append("\n"); @@ -401,9 +575,13 @@ public String toString() { sb.append(" eventSize: ").append(toIndentedString(eventSize)).append("\n"); sb.append(" groupBy: ").append(toIndentedString(groupBy)).append("\n"); sb.append(" indexes: ").append(toIndentedString(indexes)).append("\n"); + sb.append(" persona: ").append(toIndentedString(persona)).append("\n"); sb.append(" queryString: ").append(toIndentedString(queryString)).append("\n"); sb.append(" sort: ").append(toIndentedString(sort)).append("\n"); + sb.append(" states: ").append(toIndentedString(states)).append("\n"); sb.append(" storage: ").append(toIndentedString(storage)).append("\n"); + sb.append(" suspectedCauses: ").append(toIndentedString(suspectedCauses)).append("\n"); + sb.append(" teamHandles: ").append(toIndentedString(teamHandles)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); 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 a97672ff7b8..fad871580c8 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 @@ -18,7 +18,10 @@ import java.util.HashSet; import java.util.Set; -/** Source from which to query items to display in the stream. */ +/** + * Source from which to query items to display in the stream. apm_issue_stream, rum_issue_stream, + * and logs_issue_stream are deprecated. Use issue_stream instead. + */ @JsonSerialize(using = ListStreamSource.ListStreamSourceSerializer.class) public class ListStreamSource extends ModelEnum { @@ -37,7 +40,8 @@ public class ListStreamSource extends ModelEnum { "logs_transaction_stream", "event_stream", "rum_stream", - "llm_observability_stream")); + "llm_observability_stream", + "issue_stream")); public static final ListStreamSource LOGS_STREAM = new ListStreamSource("logs_stream"); public static final ListStreamSource AUDIT_STREAM = new ListStreamSource("audit_stream"); @@ -57,6 +61,7 @@ public class ListStreamSource extends ModelEnum { public static final ListStreamSource RUM_STREAM = new ListStreamSource("rum_stream"); public static final ListStreamSource LLM_OBSERVABILITY_STREAM = new ListStreamSource("llm_observability_stream"); + public static final ListStreamSource ISSUE_STREAM = new ListStreamSource("issue_stream"); ListStreamSource(String value) { super(value, allowedValues); 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 cf63600bde4..1baf69070f0 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 @@ -50,6 +50,8 @@ public SLOCorrectionCreateData attributes(SLOCorrectionCreateRequestAttributes a /** * The attribute object associated with the SLO correction to be created. * + *

Exactly one of slo_id or slo_query must be provided. + * * @return attributes */ @jakarta.annotation.Nullable 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 13073ccc12d..c0f63ef3b99 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 @@ -16,7 +16,7 @@ import java.util.Map; import java.util.Objects; -/** An object that defines a correction to be applied to an SLO. */ +/** An object that defines a correction to be applied to one or more SLOs. */ @JsonPropertyOrder({SLOCorrectionCreateRequest.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") 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 b01e8881bea..c208c87eb4f 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 @@ -17,7 +17,11 @@ import java.util.Map; import java.util.Objects; -/** The attribute object associated with the SLO correction to be created. */ +/** + * The attribute object associated with the SLO correction to be created. + * + *

Exactly one of slo_id or slo_query must be provided. + */ @JsonPropertyOrder({ SLOCorrectionCreateRequestAttributes.JSON_PROPERTY_CATEGORY, SLOCorrectionCreateRequestAttributes.JSON_PROPERTY_DESCRIPTION, @@ -25,6 +29,7 @@ SLOCorrectionCreateRequestAttributes.JSON_PROPERTY_END, SLOCorrectionCreateRequestAttributes.JSON_PROPERTY_RRULE, SLOCorrectionCreateRequestAttributes.JSON_PROPERTY_SLO_ID, + SLOCorrectionCreateRequestAttributes.JSON_PROPERTY_SLO_QUERY, SLOCorrectionCreateRequestAttributes.JSON_PROPERTY_START, SLOCorrectionCreateRequestAttributes.JSON_PROPERTY_TIMEZONE }) @@ -50,6 +55,9 @@ public class SLOCorrectionCreateRequestAttributes { public static final String JSON_PROPERTY_SLO_ID = "slo_id"; private String sloId; + public static final String JSON_PROPERTY_SLO_QUERY = "slo_query"; + private String sloQuery; + public static final String JSON_PROPERTY_START = "start"; private Long start; @@ -61,11 +69,9 @@ 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; } @@ -185,12 +191,13 @@ public SLOCorrectionCreateRequestAttributes sloId(String sloId) { } /** - * ID of the SLO that this correction applies to. + * ID of the single SLO that this correction applies to. * * @return sloId */ + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_SLO_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getSloId() { return sloId; } @@ -199,6 +206,29 @@ public void setSloId(String sloId) { this.sloId = sloId; } + public SLOCorrectionCreateRequestAttributes sloQuery(String sloQuery) { + this.sloQuery = sloQuery; + return this; + } + + /** + * Query that matches the SLOs this correction applies to. The query uses the Events search syntax and can + * filter SLOs by SLO tags. + * + * @return sloQuery + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SLO_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSloQuery() { + return sloQuery; + } + + public void setSloQuery(String sloQuery) { + this.sloQuery = sloQuery; + } + public SLOCorrectionCreateRequestAttributes start(Long start) { this.start = start; return this; @@ -303,6 +333,7 @@ public boolean equals(Object o) { && Objects.equals(this.end, sloCorrectionCreateRequestAttributes.end) && Objects.equals(this.rrule, sloCorrectionCreateRequestAttributes.rrule) && Objects.equals(this.sloId, sloCorrectionCreateRequestAttributes.sloId) + && Objects.equals(this.sloQuery, sloCorrectionCreateRequestAttributes.sloQuery) && Objects.equals(this.start, sloCorrectionCreateRequestAttributes.start) && Objects.equals(this.timezone, sloCorrectionCreateRequestAttributes.timezone) && Objects.equals( @@ -312,7 +343,16 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - category, description, duration, end, rrule, sloId, start, timezone, additionalProperties); + category, + description, + duration, + end, + rrule, + sloId, + sloQuery, + start, + timezone, + additionalProperties); } @Override @@ -325,6 +365,7 @@ public String toString() { sb.append(" end: ").append(toIndentedString(end)).append("\n"); sb.append(" rrule: ").append(toIndentedString(rrule)).append("\n"); sb.append(" sloId: ").append(toIndentedString(sloId)).append("\n"); + sb.append(" sloQuery: ").append(toIndentedString(sloQuery)).append("\n"); sb.append(" start: ").append(toIndentedString(start)).append("\n"); sb.append(" timezone: ").append(toIndentedString(timezone)).append("\n"); sb.append(" additionalProperties: ") 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 3d6a1f987d5..f68a9d21678 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 @@ -29,6 +29,7 @@ SLOCorrectionResponseAttributes.JSON_PROPERTY_MODIFIER, SLOCorrectionResponseAttributes.JSON_PROPERTY_RRULE, SLOCorrectionResponseAttributes.JSON_PROPERTY_SLO_ID, + SLOCorrectionResponseAttributes.JSON_PROPERTY_SLO_QUERY, SLOCorrectionResponseAttributes.JSON_PROPERTY_START, SLOCorrectionResponseAttributes.JSON_PROPERTY_TIMEZONE }) @@ -65,7 +66,10 @@ public class SLOCorrectionResponseAttributes { private JsonNullable rrule = JsonNullable.undefined(); public static final String JSON_PROPERTY_SLO_ID = "slo_id"; - private String sloId; + private JsonNullable sloId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SLO_QUERY = "slo_query"; + private JsonNullable sloQuery = JsonNullable.undefined(); public static final String JSON_PROPERTY_START = "start"; private Long start; @@ -322,26 +326,67 @@ public void setRrule(String rrule) { } public SLOCorrectionResponseAttributes sloId(String sloId) { - this.sloId = sloId; + this.sloId = JsonNullable.of(sloId); return this; } /** - * ID of the SLO that this correction applies to. + * ID of the single SLO that this correction applies to. * * @return sloId */ @jakarta.annotation.Nullable + @JsonIgnore + public String getSloId() { + return sloId.orElse(null); + } + @JsonProperty(JSON_PROPERTY_SLO_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getSloId() { + public JsonNullable getSloId_JsonNullable() { return sloId; } - public void setSloId(String sloId) { + @JsonProperty(JSON_PROPERTY_SLO_ID) + public void setSloId_JsonNullable(JsonNullable sloId) { this.sloId = sloId; } + public void setSloId(String sloId) { + this.sloId = JsonNullable.of(sloId); + } + + public SLOCorrectionResponseAttributes sloQuery(String sloQuery) { + this.sloQuery = JsonNullable.of(sloQuery); + return this; + } + + /** + * Query that matches the SLOs this correction applies to. + * + * @return sloQuery + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getSloQuery() { + return sloQuery.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SLO_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getSloQuery_JsonNullable() { + return sloQuery; + } + + @JsonProperty(JSON_PROPERTY_SLO_QUERY) + public void setSloQuery_JsonNullable(JsonNullable sloQuery) { + this.sloQuery = sloQuery; + } + + public void setSloQuery(String sloQuery) { + this.sloQuery = JsonNullable.of(sloQuery); + } + public SLOCorrectionResponseAttributes start(Long start) { this.start = start; return this; @@ -451,6 +496,7 @@ public boolean equals(Object o) { && Objects.equals(this.modifier, sloCorrectionResponseAttributes.modifier) && Objects.equals(this.rrule, sloCorrectionResponseAttributes.rrule) && Objects.equals(this.sloId, sloCorrectionResponseAttributes.sloId) + && Objects.equals(this.sloQuery, sloCorrectionResponseAttributes.sloQuery) && Objects.equals(this.start, sloCorrectionResponseAttributes.start) && Objects.equals(this.timezone, sloCorrectionResponseAttributes.timezone) && Objects.equals( @@ -470,6 +516,7 @@ public int hashCode() { modifier, rrule, sloId, + sloQuery, start, timezone, additionalProperties); @@ -489,6 +536,7 @@ public String toString() { sb.append(" modifier: ").append(toIndentedString(modifier)).append("\n"); sb.append(" rrule: ").append(toIndentedString(rrule)).append("\n"); sb.append(" sloId: ").append(toIndentedString(sloId)).append("\n"); + sb.append(" sloQuery: ").append(toIndentedString(sloQuery)).append("\n"); sb.append(" start: ").append(toIndentedString(start)).append("\n"); sb.append(" timezone: ").append(toIndentedString(timezone)).append("\n"); sb.append(" additionalProperties: ") 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 0f5869054aa..8d2ecc69a4b 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 @@ -23,6 +23,7 @@ SLOCorrectionUpdateRequestAttributes.JSON_PROPERTY_DURATION, SLOCorrectionUpdateRequestAttributes.JSON_PROPERTY_END, SLOCorrectionUpdateRequestAttributes.JSON_PROPERTY_RRULE, + SLOCorrectionUpdateRequestAttributes.JSON_PROPERTY_SLO_QUERY, SLOCorrectionUpdateRequestAttributes.JSON_PROPERTY_START, SLOCorrectionUpdateRequestAttributes.JSON_PROPERTY_TIMEZONE }) @@ -45,6 +46,9 @@ public class SLOCorrectionUpdateRequestAttributes { public static final String JSON_PROPERTY_RRULE = "rrule"; private String rrule; + public static final String JSON_PROPERTY_SLO_QUERY = "slo_query"; + private String sloQuery; + public static final String JSON_PROPERTY_START = "start"; private Long start; @@ -162,6 +166,29 @@ public void setRrule(String rrule) { this.rrule = rrule; } + public SLOCorrectionUpdateRequestAttributes sloQuery(String sloQuery) { + this.sloQuery = sloQuery; + return this; + } + + /** + * Query that matches the SLOs this correction applies to. The query uses the Events search syntax and can + * filter SLOs by SLO tags. + * + * @return sloQuery + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SLO_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSloQuery() { + return sloQuery; + } + + public void setSloQuery(String sloQuery) { + this.sloQuery = sloQuery; + } + public SLOCorrectionUpdateRequestAttributes start(Long start) { this.start = start; return this; @@ -266,6 +293,7 @@ public boolean equals(Object o) { && Objects.equals(this.duration, sloCorrectionUpdateRequestAttributes.duration) && Objects.equals(this.end, sloCorrectionUpdateRequestAttributes.end) && Objects.equals(this.rrule, sloCorrectionUpdateRequestAttributes.rrule) + && Objects.equals(this.sloQuery, sloCorrectionUpdateRequestAttributes.sloQuery) && Objects.equals(this.start, sloCorrectionUpdateRequestAttributes.start) && Objects.equals(this.timezone, sloCorrectionUpdateRequestAttributes.timezone) && Objects.equals( @@ -275,7 +303,15 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - category, description, duration, end, rrule, start, timezone, additionalProperties); + category, + description, + duration, + end, + rrule, + sloQuery, + start, + timezone, + additionalProperties); } @Override @@ -287,6 +323,7 @@ public String toString() { sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); sb.append(" end: ").append(toIndentedString(end)).append("\n"); sb.append(" rrule: ").append(toIndentedString(rrule)).append("\n"); + sb.append(" sloQuery: ").append(toIndentedString(sloQuery)).append("\n"); sb.append(" start: ").append(toIndentedString(start)).append("\n"); sb.append(" timezone: ").append(toIndentedString(timezone)).append("\n"); sb.append(" additionalProperties: ") 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..ff5909d887e 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 @@ -349,6 +349,51 @@ public SyntheticsBasicAuth deserialize(JsonParser jp, DeserializationContext ctx log.log(Level.FINER, "Input data does not match schema 'SyntheticsBasicAuthOauthROP'", e); } + // deserialize SyntheticsBasicAuthJWT + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SyntheticsBasicAuthJWT.class.equals(Integer.class) + || SyntheticsBasicAuthJWT.class.equals(Long.class) + || SyntheticsBasicAuthJWT.class.equals(Float.class) + || SyntheticsBasicAuthJWT.class.equals(Double.class) + || SyntheticsBasicAuthJWT.class.equals(Boolean.class) + || SyntheticsBasicAuthJWT.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((SyntheticsBasicAuthJWT.class.equals(Integer.class) + || SyntheticsBasicAuthJWT.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((SyntheticsBasicAuthJWT.class.equals(Float.class) + || SyntheticsBasicAuthJWT.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (SyntheticsBasicAuthJWT.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (SyntheticsBasicAuthJWT.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SyntheticsBasicAuthJWT.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((SyntheticsBasicAuthJWT) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SyntheticsBasicAuthJWT'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SyntheticsBasicAuthJWT'", e); + } + SyntheticsBasicAuth ret = new SyntheticsBasicAuth(); if (match == 1) { ret.setActualInstance(deserialized); @@ -408,6 +453,11 @@ public SyntheticsBasicAuth(SyntheticsBasicAuthOauthROP o) { setActualInstance(o); } + public SyntheticsBasicAuth(SyntheticsBasicAuthJWT o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + static { schemas.put("SyntheticsBasicAuthWeb", new GenericType() {}); schemas.put("SyntheticsBasicAuthSigv4", new GenericType() {}); @@ -416,6 +466,7 @@ public SyntheticsBasicAuth(SyntheticsBasicAuthOauthROP o) { schemas.put( "SyntheticsBasicAuthOauthClient", new GenericType() {}); schemas.put("SyntheticsBasicAuthOauthROP", new GenericType() {}); + schemas.put("SyntheticsBasicAuthJWT", new GenericType() {}); JSON.registerDescendants(SyntheticsBasicAuth.class, Collections.unmodifiableMap(schemas)); } @@ -428,7 +479,7 @@ public Map getSchemas() { * 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 + * SyntheticsBasicAuthOauthROP, SyntheticsBasicAuthJWT * *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a * composed schema (allOf, anyOf, oneOf). @@ -460,6 +511,10 @@ public void setActualInstance(Object instance) { super.setActualInstance(instance); return; } + if (JSON.isInstanceOf(SyntheticsBasicAuthJWT.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { super.setActualInstance(instance); @@ -468,17 +523,17 @@ public void setActualInstance(Object instance) { throw new RuntimeException( "Invalid instance type. Must be SyntheticsBasicAuthWeb, SyntheticsBasicAuthSigv4," + " SyntheticsBasicAuthNTLM, SyntheticsBasicAuthDigest, SyntheticsBasicAuthOauthClient," - + " SyntheticsBasicAuthOauthROP"); + + " SyntheticsBasicAuthOauthROP, SyntheticsBasicAuthJWT"); } /** * Get the actual instance, which can be the following: SyntheticsBasicAuthWeb, * SyntheticsBasicAuthSigv4, SyntheticsBasicAuthNTLM, SyntheticsBasicAuthDigest, - * SyntheticsBasicAuthOauthClient, SyntheticsBasicAuthOauthROP + * SyntheticsBasicAuthOauthClient, SyntheticsBasicAuthOauthROP, SyntheticsBasicAuthJWT * * @return The actual instance (SyntheticsBasicAuthWeb, SyntheticsBasicAuthSigv4, * SyntheticsBasicAuthNTLM, SyntheticsBasicAuthDigest, SyntheticsBasicAuthOauthClient, - * SyntheticsBasicAuthOauthROP) + * SyntheticsBasicAuthOauthROP, SyntheticsBasicAuthJWT) */ @Override public Object getActualInstance() { @@ -551,4 +606,15 @@ public SyntheticsBasicAuthOauthClient getSyntheticsBasicAuthOauthClient() public SyntheticsBasicAuthOauthROP getSyntheticsBasicAuthOauthROP() throws ClassCastException { return (SyntheticsBasicAuthOauthROP) super.getActualInstance(); } + + /** + * Get the actual instance of `SyntheticsBasicAuthJWT`. If the actual instance is not + * `SyntheticsBasicAuthJWT`, the ClassCastException will be thrown. + * + * @return The actual instance of `SyntheticsBasicAuthJWT` + * @throws ClassCastException if the instance is not `SyntheticsBasicAuthJWT` + */ + public SyntheticsBasicAuthJWT getSyntheticsBasicAuthJWT() throws ClassCastException { + return (SyntheticsBasicAuthJWT) super.getActualInstance(); + } } diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthJWT.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthJWT.java new file mode 100644 index 00000000000..eb2f613efaa --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthJWT.java @@ -0,0 +1,360 @@ +/* + * 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.v1.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Object to handle JWT authentication when performing the test. */ +@JsonPropertyOrder({ + SyntheticsBasicAuthJWT.JSON_PROPERTY_ADD_CLAIMS, + SyntheticsBasicAuthJWT.JSON_PROPERTY_ALGORITHM, + SyntheticsBasicAuthJWT.JSON_PROPERTY_EXPIRES_IN, + SyntheticsBasicAuthJWT.JSON_PROPERTY_HEADER, + SyntheticsBasicAuthJWT.JSON_PROPERTY_PAYLOAD, + SyntheticsBasicAuthJWT.JSON_PROPERTY_SECRET, + SyntheticsBasicAuthJWT.JSON_PROPERTY_TOKEN_PREFIX, + SyntheticsBasicAuthJWT.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SyntheticsBasicAuthJWT { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ADD_CLAIMS = "addClaims"; + private SyntheticsBasicAuthJWTAddClaims addClaims; + + public static final String JSON_PROPERTY_ALGORITHM = "algorithm"; + private SyntheticsBasicAuthJWTAlgorithm algorithm; + + public static final String JSON_PROPERTY_EXPIRES_IN = "expiresIn"; + private Long expiresIn; + + public static final String JSON_PROPERTY_HEADER = "header"; + private String header; + + public static final String JSON_PROPERTY_PAYLOAD = "payload"; + private String payload; + + public static final String JSON_PROPERTY_SECRET = "secret"; + private String secret; + + public static final String JSON_PROPERTY_TOKEN_PREFIX = "tokenPrefix"; + private String tokenPrefix; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SyntheticsBasicAuthJWTType type = SyntheticsBasicAuthJWTType.JWT; + + public SyntheticsBasicAuthJWT() {} + + @JsonCreator + public SyntheticsBasicAuthJWT( + @JsonProperty(required = true, value = JSON_PROPERTY_ALGORITHM) + SyntheticsBasicAuthJWTAlgorithm algorithm, + @JsonProperty(required = true, value = JSON_PROPERTY_PAYLOAD) String payload, + @JsonProperty(required = true, value = JSON_PROPERTY_SECRET) String secret, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SyntheticsBasicAuthJWTType type) { + this.algorithm = algorithm; + this.unparsed |= !algorithm.isValid(); + this.payload = payload; + this.secret = secret; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public SyntheticsBasicAuthJWT addClaims(SyntheticsBasicAuthJWTAddClaims addClaims) { + this.addClaims = addClaims; + this.unparsed |= addClaims.unparsed; + return this; + } + + /** + * Standard JWT claims to automatically inject. + * + * @return addClaims + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADD_CLAIMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsBasicAuthJWTAddClaims getAddClaims() { + return addClaims; + } + + public void setAddClaims(SyntheticsBasicAuthJWTAddClaims addClaims) { + this.addClaims = addClaims; + } + + public SyntheticsBasicAuthJWT algorithm(SyntheticsBasicAuthJWTAlgorithm algorithm) { + this.algorithm = algorithm; + this.unparsed |= !algorithm.isValid(); + return this; + } + + /** + * Algorithm to use for the JWT authentication. + * + * @return algorithm + */ + @JsonProperty(JSON_PROPERTY_ALGORITHM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SyntheticsBasicAuthJWTAlgorithm getAlgorithm() { + return algorithm; + } + + public void setAlgorithm(SyntheticsBasicAuthJWTAlgorithm algorithm) { + if (!algorithm.isValid()) { + this.unparsed = true; + } + this.algorithm = algorithm; + } + + public SyntheticsBasicAuthJWT expiresIn(Long expiresIn) { + this.expiresIn = expiresIn; + return this; + } + + /** + * Token time-to-live in seconds. minimum: 1 + * + * @return expiresIn + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPIRES_IN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getExpiresIn() { + return expiresIn; + } + + public void setExpiresIn(Long expiresIn) { + this.expiresIn = expiresIn; + } + + public SyntheticsBasicAuthJWT header(String header) { + this.header = header; + return this; + } + + /** + * Custom JWT header as a JSON string. + * + * @return header + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HEADER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getHeader() { + return header; + } + + public void setHeader(String header) { + this.header = header; + } + + public SyntheticsBasicAuthJWT payload(String payload) { + this.payload = payload; + return this; + } + + /** + * JWT claims as a JSON string. + * + * @return payload + */ + @JsonProperty(JSON_PROPERTY_PAYLOAD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPayload() { + return payload; + } + + public void setPayload(String payload) { + this.payload = payload; + } + + public SyntheticsBasicAuthJWT secret(String secret) { + this.secret = secret; + return this; + } + + /** + * Signing key for the JWT authentication. Use the shared secret for HS256 or the + * private key (PEM format) for RS256 and ES256. + * + * @return secret + */ + @JsonProperty(JSON_PROPERTY_SECRET) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSecret() { + return secret; + } + + public void setSecret(String secret) { + this.secret = secret; + } + + public SyntheticsBasicAuthJWT tokenPrefix(String tokenPrefix) { + this.tokenPrefix = tokenPrefix; + return this; + } + + /** + * Prefix added before the token in the Authorization header. Defaults to + * Bearer. + * + * @return tokenPrefix + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOKEN_PREFIX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTokenPrefix() { + return tokenPrefix; + } + + public void setTokenPrefix(String tokenPrefix) { + this.tokenPrefix = tokenPrefix; + } + + public SyntheticsBasicAuthJWT type(SyntheticsBasicAuthJWTType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of authentication to use when performing the test. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SyntheticsBasicAuthJWTType getType() { + return type; + } + + public void setType(SyntheticsBasicAuthJWTType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SyntheticsBasicAuthJWT + */ + @JsonAnySetter + public SyntheticsBasicAuthJWT putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SyntheticsBasicAuthJWT object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyntheticsBasicAuthJWT syntheticsBasicAuthJwt = (SyntheticsBasicAuthJWT) o; + return Objects.equals(this.addClaims, syntheticsBasicAuthJwt.addClaims) + && Objects.equals(this.algorithm, syntheticsBasicAuthJwt.algorithm) + && Objects.equals(this.expiresIn, syntheticsBasicAuthJwt.expiresIn) + && Objects.equals(this.header, syntheticsBasicAuthJwt.header) + && Objects.equals(this.payload, syntheticsBasicAuthJwt.payload) + && Objects.equals(this.secret, syntheticsBasicAuthJwt.secret) + && Objects.equals(this.tokenPrefix, syntheticsBasicAuthJwt.tokenPrefix) + && Objects.equals(this.type, syntheticsBasicAuthJwt.type) + && Objects.equals(this.additionalProperties, syntheticsBasicAuthJwt.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + addClaims, + algorithm, + expiresIn, + header, + payload, + secret, + tokenPrefix, + type, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyntheticsBasicAuthJWT {\n"); + sb.append(" addClaims: ").append(toIndentedString(addClaims)).append("\n"); + sb.append(" algorithm: ").append(toIndentedString(algorithm)).append("\n"); + sb.append(" expiresIn: ").append(toIndentedString(expiresIn)).append("\n"); + sb.append(" header: ").append(toIndentedString(header)).append("\n"); + sb.append(" payload: ").append(toIndentedString(payload)).append("\n"); + sb.append(" secret: ").append(toIndentedString(secret)).append("\n"); + sb.append(" tokenPrefix: ").append(toIndentedString(tokenPrefix)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthJWTAddClaims.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthJWTAddClaims.java new file mode 100644 index 00000000000..acadcd893f0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthJWTAddClaims.java @@ -0,0 +1,166 @@ +/* + * 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.v1.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.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; + +/** Standard JWT claims to automatically inject. */ +@JsonPropertyOrder({ + SyntheticsBasicAuthJWTAddClaims.JSON_PROPERTY_EXP, + SyntheticsBasicAuthJWTAddClaims.JSON_PROPERTY_IAT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SyntheticsBasicAuthJWTAddClaims { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EXP = "exp"; + private Boolean exp; + + public static final String JSON_PROPERTY_IAT = "iat"; + private Boolean iat; + + public SyntheticsBasicAuthJWTAddClaims exp(Boolean exp) { + this.exp = exp; + return this; + } + + /** + * Whether to inject the exp (expiration) claim. + * + * @return exp + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getExp() { + return exp; + } + + public void setExp(Boolean exp) { + this.exp = exp; + } + + public SyntheticsBasicAuthJWTAddClaims iat(Boolean iat) { + this.iat = iat; + return this; + } + + /** + * Whether to inject the iat (issued at) claim. + * + * @return iat + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIat() { + return iat; + } + + public void setIat(Boolean iat) { + this.iat = iat; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SyntheticsBasicAuthJWTAddClaims + */ + @JsonAnySetter + public SyntheticsBasicAuthJWTAddClaims putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SyntheticsBasicAuthJWTAddClaims object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyntheticsBasicAuthJWTAddClaims syntheticsBasicAuthJwtAddClaims = + (SyntheticsBasicAuthJWTAddClaims) o; + return Objects.equals(this.exp, syntheticsBasicAuthJwtAddClaims.exp) + && Objects.equals(this.iat, syntheticsBasicAuthJwtAddClaims.iat) + && Objects.equals( + this.additionalProperties, syntheticsBasicAuthJwtAddClaims.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(exp, iat, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyntheticsBasicAuthJWTAddClaims {\n"); + sb.append(" exp: ").append(toIndentedString(exp)).append("\n"); + sb.append(" iat: ").append(toIndentedString(iat)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthJWTAlgorithm.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthJWTAlgorithm.java new file mode 100644 index 00000000000..11af0c4f405 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthJWTAlgorithm.java @@ -0,0 +1,62 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v1.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Algorithm to use for the JWT authentication. */ +@JsonSerialize( + using = SyntheticsBasicAuthJWTAlgorithm.SyntheticsBasicAuthJWTAlgorithmSerializer.class) +public class SyntheticsBasicAuthJWTAlgorithm extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("HS256", "RS256", "ES256")); + + public static final SyntheticsBasicAuthJWTAlgorithm HS256 = + new SyntheticsBasicAuthJWTAlgorithm("HS256"); + public static final SyntheticsBasicAuthJWTAlgorithm RS256 = + new SyntheticsBasicAuthJWTAlgorithm("RS256"); + public static final SyntheticsBasicAuthJWTAlgorithm ES256 = + new SyntheticsBasicAuthJWTAlgorithm("ES256"); + + SyntheticsBasicAuthJWTAlgorithm(String value) { + super(value, allowedValues); + } + + public static class SyntheticsBasicAuthJWTAlgorithmSerializer + extends StdSerializer { + public SyntheticsBasicAuthJWTAlgorithmSerializer(Class t) { + super(t); + } + + public SyntheticsBasicAuthJWTAlgorithmSerializer() { + this(null); + } + + @Override + public void serialize( + SyntheticsBasicAuthJWTAlgorithm value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SyntheticsBasicAuthJWTAlgorithm fromValue(String value) { + return new SyntheticsBasicAuthJWTAlgorithm(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthJWTType.java b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthJWTType.java new file mode 100644 index 00000000000..aaf8a72f0a2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/SyntheticsBasicAuthJWTType.java @@ -0,0 +1,55 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v1.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The type of authentication to use when performing the test. */ +@JsonSerialize(using = SyntheticsBasicAuthJWTType.SyntheticsBasicAuthJWTTypeSerializer.class) +public class SyntheticsBasicAuthJWTType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("jwt")); + + public static final SyntheticsBasicAuthJWTType JWT = new SyntheticsBasicAuthJWTType("jwt"); + + SyntheticsBasicAuthJWTType(String value) { + super(value, allowedValues); + } + + public static class SyntheticsBasicAuthJWTTypeSerializer + extends StdSerializer { + public SyntheticsBasicAuthJWTTypeSerializer(Class t) { + super(t); + } + + public SyntheticsBasicAuthJWTTypeSerializer() { + this(null); + } + + @Override + public void serialize( + SyntheticsBasicAuthJWTType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SyntheticsBasicAuthJWTType fromValue(String value) { + return new SyntheticsBasicAuthJWTType(value); + } +} 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 ede38ac27fe..a2b272d361d 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 @@ -19,9 +19,21 @@ import java.util.Map; import java.util.Objects; -/** Response with hourly report of all data billed by Datadog all organizations. */ +/** + * Response with hourly report of all data billed by Datadog for all organizations. + * + *

Newly added billing dimensions and usage types appear as untyped keys on the + * additionalProperties map instead of as typed fields. Call + * GET /api/v2/usage/summary/available_fields to enumerate every key returned at this + * response level—both typed fields and additionalProperties keys. + */ @JsonPropertyOrder({ UsageSummaryDate.JSON_PROPERTY_AGENT_HOST_TOP99P, + UsageSummaryDate.JSON_PROPERTY_AI_CREDITS_AGENT_BUILDER_AI_CREDITS_SUM, + UsageSummaryDate.JSON_PROPERTY_AI_CREDITS_BITS_ASSISTANT_AI_CREDITS_SUM, + UsageSummaryDate.JSON_PROPERTY_AI_CREDITS_BITS_DEV_AI_CREDITS_SUM, + UsageSummaryDate.JSON_PROPERTY_AI_CREDITS_BITS_SRE_AI_CREDITS_SUM, + UsageSummaryDate.JSON_PROPERTY_AI_CREDITS_SUM, UsageSummaryDate.JSON_PROPERTY_APM_AZURE_APP_SERVICE_HOST_TOP99P, UsageSummaryDate.JSON_PROPERTY_APM_DEVSECOPS_HOST_TOP99P, UsageSummaryDate.JSON_PROPERTY_APM_ENTERPRISE_STANDALONE_HOSTS_TOP99P, @@ -32,6 +44,7 @@ UsageSummaryDate.JSON_PROPERTY_ASM_SERVERLESS_SUM, UsageSummaryDate.JSON_PROPERTY_AUDIT_LOGS_LINES_INDEXED_SUM, UsageSummaryDate.JSON_PROPERTY_AUDIT_TRAIL_ENABLED_HWM, + UsageSummaryDate.JSON_PROPERTY_AUDIT_TRAIL_EVENT_FORWARDING_EVENTS_SUM, UsageSummaryDate.JSON_PROPERTY_AVG_PROFILED_FARGATE_TASKS, UsageSummaryDate.JSON_PROPERTY_AWS_HOST_TOP99P, UsageSummaryDate.JSON_PROPERTY_AWS_LAMBDA_FUNC_COUNT, @@ -104,6 +117,8 @@ UsageSummaryDate.JSON_PROPERTY_CWS_FARGATE_TASK_AVG, UsageSummaryDate.JSON_PROPERTY_CWS_HOST_TOP99P, UsageSummaryDate.JSON_PROPERTY_DATA_JOBS_MONITORING_HOST_HR_SUM, + UsageSummaryDate.JSON_PROPERTY_DATA_STREAM_MONITORING_HOST_COUNT_SUM, + UsageSummaryDate.JSON_PROPERTY_DATA_STREAM_MONITORING_HOST_COUNT_TOP99P, UsageSummaryDate.JSON_PROPERTY_DATE, UsageSummaryDate.JSON_PROPERTY_DBM_HOST_TOP99P, UsageSummaryDate.JSON_PROPERTY_DBM_QUERIES_COUNT_AVG, @@ -152,17 +167,57 @@ UsageSummaryDate.JSON_PROPERTY_INCIDENT_MANAGEMENT_MONTHLY_ACTIVE_USERS_HWM, UsageSummaryDate.JSON_PROPERTY_INCIDENT_MANAGEMENT_SEATS_HWM, UsageSummaryDate.JSON_PROPERTY_INDEXED_EVENTS_COUNT_SUM, + UsageSummaryDate.JSON_PROPERTY_INDEXED_POINTS_SUM, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_AVG, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_AVG, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_BASIC_AVG, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_BASIC_SUM, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_SUM, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AWS_AVG, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AWS_SUM, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AZURE_AVG, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AZURE_SUM, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_GCP_AVG, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_GCP_SUM, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_AVG, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_BASIC_AVG, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_BASIC_SUM, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_SUM, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_OPENTELEMETRY_AVG, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_OPENTELEMETRY_SUM, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AGENT_AVG, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AGENT_SUM, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AWS_AVG, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AWS_SUM, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AZURE_AVG, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AZURE_SUM, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_GCP_AVG, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_GCP_SUM, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_NUTANIX_AVG, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_NUTANIX_SUM, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_OPENTELEMETRY_AVG, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_OPENTELEMETRY_SUM, + UsageSummaryDate.JSON_PROPERTY_INFRA_CPU_SUM, UsageSummaryDate.JSON_PROPERTY_INFRA_EDGE_MONITORING_DEVICES_TOP99P, UsageSummaryDate.JSON_PROPERTY_INFRA_HOST_BASIC_INFRA_BASIC_AGENT_TOP99P, UsageSummaryDate.JSON_PROPERTY_INFRA_HOST_BASIC_INFRA_BASIC_VSPHERE_TOP99P, UsageSummaryDate.JSON_PROPERTY_INFRA_HOST_BASIC_TOP99P, UsageSummaryDate.JSON_PROPERTY_INFRA_HOST_TOP99P, UsageSummaryDate.JSON_PROPERTY_INFRA_STORAGE_MGMT_OBJECTS_COUNT_AVG, + UsageSummaryDate.JSON_PROPERTY_INGEST_POINTS_SUM, UsageSummaryDate.JSON_PROPERTY_INGESTED_EVENTS_BYTES_SUM, + UsageSummaryDate.JSON_PROPERTY_IOT_APM_HOST_SUM, + UsageSummaryDate.JSON_PROPERTY_IOT_APM_HOST_TOP99P, UsageSummaryDate.JSON_PROPERTY_IOT_DEVICE_SUM, UsageSummaryDate.JSON_PROPERTY_IOT_DEVICE_TOP99P, + UsageSummaryDate.JSON_PROPERTY_LLM_OBSERVABILITY_15DAY_RETENTION_SPANS_SUM, + UsageSummaryDate.JSON_PROPERTY_LLM_OBSERVABILITY_30DAY_RETENTION_SPANS_SUM, + UsageSummaryDate.JSON_PROPERTY_LLM_OBSERVABILITY_60DAY_RETENTION_SPANS_SUM, + UsageSummaryDate.JSON_PROPERTY_LLM_OBSERVABILITY_90DAY_RETENTION_SPANS_SUM, UsageSummaryDate.JSON_PROPERTY_LLM_OBSERVABILITY_MIN_SPEND_SUM, UsageSummaryDate.JSON_PROPERTY_LLM_OBSERVABILITY_SUM, + UsageSummaryDate.JSON_PROPERTY_LOGS_ARCHIVE_SEARCH_GB_SCANNED_SUM, + UsageSummaryDate.JSON_PROPERTY_METRIC_NAMES_SUM, UsageSummaryDate.JSON_PROPERTY_MOBILE_RUM_LITE_SESSION_COUNT_SUM, UsageSummaryDate.JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_ANDROID_SUM, UsageSummaryDate.JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_FLUTTER_SUM, @@ -266,6 +321,8 @@ UsageSummaryDate.JSON_PROPERTY_SIEM_12MO_RETENTION_SUM, UsageSummaryDate.JSON_PROPERTY_SIEM_6MO_RETENTION_SUM, UsageSummaryDate.JSON_PROPERTY_SIEM_ANALYZED_LOGS_ADD_ON_COUNT_SUM, + UsageSummaryDate.JSON_PROPERTY_SNMP_DEVICE_COUNT_SUM, + UsageSummaryDate.JSON_PROPERTY_SNMP_DEVICE_COUNT_TOP99P, UsageSummaryDate.JSON_PROPERTY_SYNTHETICS_BROWSER_CHECK_CALLS_COUNT_SUM, UsageSummaryDate.JSON_PROPERTY_SYNTHETICS_CHECK_CALLS_COUNT_SUM, UsageSummaryDate.JSON_PROPERTY_SYNTHETICS_MOBILE_TEST_RUNS_SUM, @@ -284,6 +341,25 @@ public class UsageSummaryDate { public static final String JSON_PROPERTY_AGENT_HOST_TOP99P = "agent_host_top99p"; private Long agentHostTop99p; + public static final String JSON_PROPERTY_AI_CREDITS_AGENT_BUILDER_AI_CREDITS_SUM = + "ai_credits_agent_builder_ai_credits_sum"; + private Long aiCreditsAgentBuilderAiCreditsSum; + + public static final String JSON_PROPERTY_AI_CREDITS_BITS_ASSISTANT_AI_CREDITS_SUM = + "ai_credits_bits_assistant_ai_credits_sum"; + private Long aiCreditsBitsAssistantAiCreditsSum; + + public static final String JSON_PROPERTY_AI_CREDITS_BITS_DEV_AI_CREDITS_SUM = + "ai_credits_bits_dev_ai_credits_sum"; + private Long aiCreditsBitsDevAiCreditsSum; + + public static final String JSON_PROPERTY_AI_CREDITS_BITS_SRE_AI_CREDITS_SUM = + "ai_credits_bits_sre_ai_credits_sum"; + private Long aiCreditsBitsSreAiCreditsSum; + + public static final String JSON_PROPERTY_AI_CREDITS_SUM = "ai_credits_sum"; + private Long aiCreditsSum; + public static final String JSON_PROPERTY_APM_AZURE_APP_SERVICE_HOST_TOP99P = "apm_azure_app_service_host_top99p"; private Long apmAzureAppServiceHostTop99p; @@ -318,6 +394,10 @@ public class UsageSummaryDate { public static final String JSON_PROPERTY_AUDIT_TRAIL_ENABLED_HWM = "audit_trail_enabled_hwm"; private Long auditTrailEnabledHwm; + public static final String JSON_PROPERTY_AUDIT_TRAIL_EVENT_FORWARDING_EVENTS_SUM = + "audit_trail_event_forwarding_events_sum"; + private Long auditTrailEventForwardingEventsSum; + public static final String JSON_PROPERTY_AVG_PROFILED_FARGATE_TASKS = "avg_profiled_fargate_tasks"; private Long avgProfiledFargateTasks; @@ -571,6 +651,14 @@ public class UsageSummaryDate { "data_jobs_monitoring_host_hr_sum"; private Long dataJobsMonitoringHostHrSum; + public static final String JSON_PROPERTY_DATA_STREAM_MONITORING_HOST_COUNT_SUM = + "data_stream_monitoring_host_count_sum"; + private Long dataStreamMonitoringHostCountSum; + + public static final String JSON_PROPERTY_DATA_STREAM_MONITORING_HOST_COUNT_TOP99P = + "data_stream_monitoring_host_count_top99p"; + private Long dataStreamMonitoringHostCountTop99p; + public static final String JSON_PROPERTY_DATE = "date"; private OffsetDateTime date; @@ -745,6 +833,127 @@ public class UsageSummaryDate { public static final String JSON_PROPERTY_INDEXED_EVENTS_COUNT_SUM = "indexed_events_count_sum"; private Long indexedEventsCountSum; + public static final String JSON_PROPERTY_INDEXED_POINTS_SUM = "indexed_points_sum"; + private Long indexedPointsSum; + + public static final String JSON_PROPERTY_INFRA_CPU_AVG = "infra_cpu_avg"; + private Long infraCpuAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_AVG = + "infra_cpu_default_infra_host_vcpu_agent_avg"; + private Long infraCpuDefaultInfraHostVcpuAgentAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_BASIC_AVG = + "infra_cpu_default_infra_host_vcpu_agent_basic_avg"; + private Long infraCpuDefaultInfraHostVcpuAgentBasicAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_BASIC_SUM = + "infra_cpu_default_infra_host_vcpu_agent_basic_sum"; + private Long infraCpuDefaultInfraHostVcpuAgentBasicSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_SUM = + "infra_cpu_default_infra_host_vcpu_agent_sum"; + private Long infraCpuDefaultInfraHostVcpuAgentSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AWS_AVG = + "infra_cpu_default_infra_host_vcpu_aws_avg"; + private Long infraCpuDefaultInfraHostVcpuAwsAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AWS_SUM = + "infra_cpu_default_infra_host_vcpu_aws_sum"; + private Long infraCpuDefaultInfraHostVcpuAwsSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AZURE_AVG = + "infra_cpu_default_infra_host_vcpu_azure_avg"; + private Long infraCpuDefaultInfraHostVcpuAzureAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AZURE_SUM = + "infra_cpu_default_infra_host_vcpu_azure_sum"; + private Long infraCpuDefaultInfraHostVcpuAzureSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_GCP_AVG = + "infra_cpu_default_infra_host_vcpu_gcp_avg"; + private Long infraCpuDefaultInfraHostVcpuGcpAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_GCP_SUM = + "infra_cpu_default_infra_host_vcpu_gcp_sum"; + private Long infraCpuDefaultInfraHostVcpuGcpSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_AVG = + "infra_cpu_default_infra_host_vcpu_nutanix_avg"; + private Long infraCpuDefaultInfraHostVcpuNutanixAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_BASIC_AVG = + "infra_cpu_default_infra_host_vcpu_nutanix_basic_avg"; + private Long infraCpuDefaultInfraHostVcpuNutanixBasicAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_BASIC_SUM = + "infra_cpu_default_infra_host_vcpu_nutanix_basic_sum"; + private Long infraCpuDefaultInfraHostVcpuNutanixBasicSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_SUM = + "infra_cpu_default_infra_host_vcpu_nutanix_sum"; + private Long infraCpuDefaultInfraHostVcpuNutanixSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_OPENTELEMETRY_AVG = + "infra_cpu_default_infra_host_vcpu_opentelemetry_avg"; + private Long infraCpuDefaultInfraHostVcpuOpentelemetryAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_OPENTELEMETRY_SUM = + "infra_cpu_default_infra_host_vcpu_opentelemetry_sum"; + private Long infraCpuDefaultInfraHostVcpuOpentelemetrySum; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AGENT_AVG = + "infra_cpu_observed_infra_host_vcpu_agent_avg"; + private Long infraCpuObservedInfraHostVcpuAgentAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AGENT_SUM = + "infra_cpu_observed_infra_host_vcpu_agent_sum"; + private Long infraCpuObservedInfraHostVcpuAgentSum; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AWS_AVG = + "infra_cpu_observed_infra_host_vcpu_aws_avg"; + private Long infraCpuObservedInfraHostVcpuAwsAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AWS_SUM = + "infra_cpu_observed_infra_host_vcpu_aws_sum"; + private Long infraCpuObservedInfraHostVcpuAwsSum; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AZURE_AVG = + "infra_cpu_observed_infra_host_vcpu_azure_avg"; + private Long infraCpuObservedInfraHostVcpuAzureAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AZURE_SUM = + "infra_cpu_observed_infra_host_vcpu_azure_sum"; + private Long infraCpuObservedInfraHostVcpuAzureSum; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_GCP_AVG = + "infra_cpu_observed_infra_host_vcpu_gcp_avg"; + private Long infraCpuObservedInfraHostVcpuGcpAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_GCP_SUM = + "infra_cpu_observed_infra_host_vcpu_gcp_sum"; + private Long infraCpuObservedInfraHostVcpuGcpSum; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_NUTANIX_AVG = + "infra_cpu_observed_infra_host_vcpu_nutanix_avg"; + private Long infraCpuObservedInfraHostVcpuNutanixAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_NUTANIX_SUM = + "infra_cpu_observed_infra_host_vcpu_nutanix_sum"; + private Long infraCpuObservedInfraHostVcpuNutanixSum; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_OPENTELEMETRY_AVG = + "infra_cpu_observed_infra_host_vcpu_opentelemetry_avg"; + private Long infraCpuObservedInfraHostVcpuOpentelemetryAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_OPENTELEMETRY_SUM = + "infra_cpu_observed_infra_host_vcpu_opentelemetry_sum"; + private Long infraCpuObservedInfraHostVcpuOpentelemetrySum; + + public static final String JSON_PROPERTY_INFRA_CPU_SUM = "infra_cpu_sum"; + private Long infraCpuSum; + public static final String JSON_PROPERTY_INFRA_EDGE_MONITORING_DEVICES_TOP99P = "infra_edge_monitoring_devices_top99p"; private Long infraEdgeMonitoringDevicesTop99p; @@ -767,15 +976,40 @@ public class UsageSummaryDate { "infra_storage_mgmt_objects_count_avg"; private Long infraStorageMgmtObjectsCountAvg; + public static final String JSON_PROPERTY_INGEST_POINTS_SUM = "ingest_points_sum"; + private Long ingestPointsSum; + public static final String JSON_PROPERTY_INGESTED_EVENTS_BYTES_SUM = "ingested_events_bytes_sum"; private Long ingestedEventsBytesSum; + public static final String JSON_PROPERTY_IOT_APM_HOST_SUM = "iot_apm_host_sum"; + private Long iotApmHostSum; + + public static final String JSON_PROPERTY_IOT_APM_HOST_TOP99P = "iot_apm_host_top99p"; + private Long iotApmHostTop99p; + public static final String JSON_PROPERTY_IOT_DEVICE_SUM = "iot_device_sum"; private Long iotDeviceSum; public static final String JSON_PROPERTY_IOT_DEVICE_TOP99P = "iot_device_top99p"; private Long iotDeviceTop99p; + public static final String JSON_PROPERTY_LLM_OBSERVABILITY_15DAY_RETENTION_SPANS_SUM = + "llm_observability_15day_retention_spans_sum"; + private Long llmObservability15dayRetentionSpansSum; + + public static final String JSON_PROPERTY_LLM_OBSERVABILITY_30DAY_RETENTION_SPANS_SUM = + "llm_observability_30day_retention_spans_sum"; + private Long llmObservability30dayRetentionSpansSum; + + public static final String JSON_PROPERTY_LLM_OBSERVABILITY_60DAY_RETENTION_SPANS_SUM = + "llm_observability_60day_retention_spans_sum"; + private Long llmObservability60dayRetentionSpansSum; + + public static final String JSON_PROPERTY_LLM_OBSERVABILITY_90DAY_RETENTION_SPANS_SUM = + "llm_observability_90day_retention_spans_sum"; + private Long llmObservability90dayRetentionSpansSum; + public static final String JSON_PROPERTY_LLM_OBSERVABILITY_MIN_SPEND_SUM = "llm_observability_min_spend_sum"; private Long llmObservabilityMinSpendSum; @@ -783,6 +1017,13 @@ public class UsageSummaryDate { public static final String JSON_PROPERTY_LLM_OBSERVABILITY_SUM = "llm_observability_sum"; private Long llmObservabilitySum; + public static final String JSON_PROPERTY_LOGS_ARCHIVE_SEARCH_GB_SCANNED_SUM = + "logs_archive_search_gb_scanned_sum"; + private Long logsArchiveSearchGbScannedSum; + + public static final String JSON_PROPERTY_METRIC_NAMES_SUM = "metric_names_sum"; + private Long metricNamesSum; + public static final String JSON_PROPERTY_MOBILE_RUM_LITE_SESSION_COUNT_SUM = "mobile_rum_lite_session_count_sum"; private Long mobileRumLiteSessionCountSum; @@ -1166,6 +1407,12 @@ public class UsageSummaryDate { "siem_analyzed_logs_add_on_count_sum"; private Long siemAnalyzedLogsAddOnCountSum; + public static final String JSON_PROPERTY_SNMP_DEVICE_COUNT_SUM = "snmp_device_count_sum"; + private Long snmpDeviceCountSum; + + public static final String JSON_PROPERTY_SNMP_DEVICE_COUNT_TOP99P = "snmp_device_count_top99p"; + private Long snmpDeviceCountTop99p; + public static final String JSON_PROPERTY_SYNTHETICS_BROWSER_CHECK_CALLS_COUNT_SUM = "synthetics_browser_check_calls_count_sum"; private Long syntheticsBrowserCheckCallsCountSum; @@ -1227,6 +1474,119 @@ public void setAgentHostTop99p(Long agentHostTop99p) { this.agentHostTop99p = agentHostTop99p; } + public UsageSummaryDate aiCreditsAgentBuilderAiCreditsSum( + Long aiCreditsAgentBuilderAiCreditsSum) { + this.aiCreditsAgentBuilderAiCreditsSum = aiCreditsAgentBuilderAiCreditsSum; + return this; + } + + /** + * Shows the sum of all AI credits used by Agent Builder over all hours in the current date for + * all organizations. Values are returned in micro-credits. Divide by 1,000,000 to get AI credits. + * + * @return aiCreditsAgentBuilderAiCreditsSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AI_CREDITS_AGENT_BUILDER_AI_CREDITS_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getAiCreditsAgentBuilderAiCreditsSum() { + return aiCreditsAgentBuilderAiCreditsSum; + } + + public void setAiCreditsAgentBuilderAiCreditsSum(Long aiCreditsAgentBuilderAiCreditsSum) { + this.aiCreditsAgentBuilderAiCreditsSum = aiCreditsAgentBuilderAiCreditsSum; + } + + public UsageSummaryDate aiCreditsBitsAssistantAiCreditsSum( + Long aiCreditsBitsAssistantAiCreditsSum) { + this.aiCreditsBitsAssistantAiCreditsSum = aiCreditsBitsAssistantAiCreditsSum; + return this; + } + + /** + * Shows the sum of all AI credits used by Bits AI Assistant over all hours in the current date + * for all organizations. Values are returned in micro-credits. Divide by 1,000,000 to get AI + * credits. + * + * @return aiCreditsBitsAssistantAiCreditsSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AI_CREDITS_BITS_ASSISTANT_AI_CREDITS_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getAiCreditsBitsAssistantAiCreditsSum() { + return aiCreditsBitsAssistantAiCreditsSum; + } + + public void setAiCreditsBitsAssistantAiCreditsSum(Long aiCreditsBitsAssistantAiCreditsSum) { + this.aiCreditsBitsAssistantAiCreditsSum = aiCreditsBitsAssistantAiCreditsSum; + } + + public UsageSummaryDate aiCreditsBitsDevAiCreditsSum(Long aiCreditsBitsDevAiCreditsSum) { + this.aiCreditsBitsDevAiCreditsSum = aiCreditsBitsDevAiCreditsSum; + return this; + } + + /** + * Shows the sum of all AI credits used by Bits AI Dev over all hours in the current date for all + * organizations. Values are returned in micro-credits. Divide by 1,000,000 to get AI credits. + * + * @return aiCreditsBitsDevAiCreditsSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AI_CREDITS_BITS_DEV_AI_CREDITS_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getAiCreditsBitsDevAiCreditsSum() { + return aiCreditsBitsDevAiCreditsSum; + } + + public void setAiCreditsBitsDevAiCreditsSum(Long aiCreditsBitsDevAiCreditsSum) { + this.aiCreditsBitsDevAiCreditsSum = aiCreditsBitsDevAiCreditsSum; + } + + public UsageSummaryDate aiCreditsBitsSreAiCreditsSum(Long aiCreditsBitsSreAiCreditsSum) { + this.aiCreditsBitsSreAiCreditsSum = aiCreditsBitsSreAiCreditsSum; + return this; + } + + /** + * Shows the sum of all AI credits used by Bits AI SRE over all hours in the current date for all + * organizations. Values are returned in micro-credits. Divide by 1,000,000 to get AI credits. + * + * @return aiCreditsBitsSreAiCreditsSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AI_CREDITS_BITS_SRE_AI_CREDITS_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getAiCreditsBitsSreAiCreditsSum() { + return aiCreditsBitsSreAiCreditsSum; + } + + public void setAiCreditsBitsSreAiCreditsSum(Long aiCreditsBitsSreAiCreditsSum) { + this.aiCreditsBitsSreAiCreditsSum = aiCreditsBitsSreAiCreditsSum; + } + + public UsageSummaryDate aiCreditsSum(Long aiCreditsSum) { + this.aiCreditsSum = aiCreditsSum; + return this; + } + + /** + * Shows the sum of all AI credits over all hours in the current date for all organizations. + * Values are returned in micro-credits. Divide by 1,000,000 to get AI credits. + * + * @return aiCreditsSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AI_CREDITS_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getAiCreditsSum() { + return aiCreditsSum; + } + + public void setAiCreditsSum(Long aiCreditsSum) { + this.aiCreditsSum = aiCreditsSum; + } + public UsageSummaryDate apmAzureAppServiceHostTop99p(Long apmAzureAppServiceHostTop99p) { this.apmAzureAppServiceHostTop99p = apmAzureAppServiceHostTop99p; return this; @@ -1450,6 +1810,29 @@ public void setAuditTrailEnabledHwm(Long auditTrailEnabledHwm) { this.auditTrailEnabledHwm = auditTrailEnabledHwm; } + public UsageSummaryDate auditTrailEventForwardingEventsSum( + Long auditTrailEventForwardingEventsSum) { + this.auditTrailEventForwardingEventsSum = auditTrailEventForwardingEventsSum; + return this; + } + + /** + * Shows the sum of all Audit Trail event forwarding events over all hours in the current date for + * all organizations. + * + * @return auditTrailEventForwardingEventsSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUDIT_TRAIL_EVENT_FORWARDING_EVENTS_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getAuditTrailEventForwardingEventsSum() { + return auditTrailEventForwardingEventsSum; + } + + public void setAuditTrailEventForwardingEventsSum(Long auditTrailEventForwardingEventsSum) { + this.auditTrailEventForwardingEventsSum = auditTrailEventForwardingEventsSum; + } + public UsageSummaryDate avgProfiledFargateTasks(Long avgProfiledFargateTasks) { this.avgProfiledFargateTasks = avgProfiledFargateTasks; return this; @@ -3058,6 +3441,51 @@ public void setDataJobsMonitoringHostHrSum(Long dataJobsMonitoringHostHrSum) { this.dataJobsMonitoringHostHrSum = dataJobsMonitoringHostHrSum; } + public UsageSummaryDate dataStreamMonitoringHostCountSum(Long dataStreamMonitoringHostCountSum) { + this.dataStreamMonitoringHostCountSum = dataStreamMonitoringHostCountSum; + return this; + } + + /** + * Shows the sum of all Data Streams Monitoring hosts over all hours in the current date for all + * organizations. + * + * @return dataStreamMonitoringHostCountSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA_STREAM_MONITORING_HOST_COUNT_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getDataStreamMonitoringHostCountSum() { + return dataStreamMonitoringHostCountSum; + } + + public void setDataStreamMonitoringHostCountSum(Long dataStreamMonitoringHostCountSum) { + this.dataStreamMonitoringHostCountSum = dataStreamMonitoringHostCountSum; + } + + public UsageSummaryDate dataStreamMonitoringHostCountTop99p( + Long dataStreamMonitoringHostCountTop99p) { + this.dataStreamMonitoringHostCountTop99p = dataStreamMonitoringHostCountTop99p; + return this; + } + + /** + * Shows the 99th percentile of all Data Streams Monitoring hosts over all hours in the current + * date for all organizations. + * + * @return dataStreamMonitoringHostCountTop99p + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA_STREAM_MONITORING_HOST_COUNT_TOP99P) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getDataStreamMonitoringHostCountTop99p() { + return dataStreamMonitoringHostCountTop99p; + } + + public void setDataStreamMonitoringHostCountTop99p(Long dataStreamMonitoringHostCountTop99p) { + this.dataStreamMonitoringHostCountTop99p = dataStreamMonitoringHostCountTop99p; + } + public UsageSummaryDate date(OffsetDateTime date) { this.date = date; return this; @@ -3131,7 +3559,7 @@ public UsageSummaryDate doJobsMonitoringOrchestratorsJobHoursSum( /** * Shows the sum of all orchestrator job hours over all hours in the current date for all - * organizations. + * organizations. Values are returned in seconds. Divide by 3,600 to convert to hours. * * @return doJobsMonitoringOrchestratorsJobHoursSum */ @@ -4136,234 +4564,1154 @@ public void setIndexedEventsCountSum(Long indexedEventsCountSum) { this.indexedEventsCountSum = indexedEventsCountSum; } - public UsageSummaryDate infraEdgeMonitoringDevicesTop99p(Long infraEdgeMonitoringDevicesTop99p) { - this.infraEdgeMonitoringDevicesTop99p = infraEdgeMonitoringDevicesTop99p; + public UsageSummaryDate indexedPointsSum(Long indexedPointsSum) { + this.indexedPointsSum = indexedPointsSum; return this; } /** - * Shows the 99th percentile of all Edge Devices Monitoring devices over all hours in the current - * date for all organizations. + * Shows the sum of all indexed custom metrics points over all hours in the current date for all + * organizations. * - * @return infraEdgeMonitoringDevicesTop99p + * @return indexedPointsSum */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INFRA_EDGE_MONITORING_DEVICES_TOP99P) + @JsonProperty(JSON_PROPERTY_INDEXED_POINTS_SUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInfraEdgeMonitoringDevicesTop99p() { - return infraEdgeMonitoringDevicesTop99p; + public Long getIndexedPointsSum() { + return indexedPointsSum; } - public void setInfraEdgeMonitoringDevicesTop99p(Long infraEdgeMonitoringDevicesTop99p) { - this.infraEdgeMonitoringDevicesTop99p = infraEdgeMonitoringDevicesTop99p; + public void setIndexedPointsSum(Long indexedPointsSum) { + this.indexedPointsSum = indexedPointsSum; } - public UsageSummaryDate infraHostBasicInfraBasicAgentTop99p( - Long infraHostBasicInfraBasicAgentTop99p) { - this.infraHostBasicInfraBasicAgentTop99p = infraHostBasicInfraBasicAgentTop99p; + public UsageSummaryDate infraCpuAvg(Long infraCpuAvg) { + this.infraCpuAvg = infraCpuAvg; return this; } /** - * Shows the 99th percentile of all distinct infrastructure hosts for Basic tier with the Datadog - * Agent over all hours in the current date for all organizations. + * Shows the average of all Infrastructure vCPU cores over all hours in the current date for all + * organizations. Values are returned in millicores. Divide by 1,000 to convert to cores. * - * @return infraHostBasicInfraBasicAgentTop99p + * @return infraCpuAvg */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INFRA_HOST_BASIC_INFRA_BASIC_AGENT_TOP99P) + @JsonProperty(JSON_PROPERTY_INFRA_CPU_AVG) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInfraHostBasicInfraBasicAgentTop99p() { - return infraHostBasicInfraBasicAgentTop99p; + public Long getInfraCpuAvg() { + return infraCpuAvg; } - public void setInfraHostBasicInfraBasicAgentTop99p(Long infraHostBasicInfraBasicAgentTop99p) { - this.infraHostBasicInfraBasicAgentTop99p = infraHostBasicInfraBasicAgentTop99p; + public void setInfraCpuAvg(Long infraCpuAvg) { + this.infraCpuAvg = infraCpuAvg; } - public UsageSummaryDate infraHostBasicInfraBasicVsphereTop99p( - Long infraHostBasicInfraBasicVsphereTop99p) { - this.infraHostBasicInfraBasicVsphereTop99p = infraHostBasicInfraBasicVsphereTop99p; + public UsageSummaryDate infraCpuDefaultInfraHostVcpuAgentAvg( + Long infraCpuDefaultInfraHostVcpuAgentAvg) { + this.infraCpuDefaultInfraHostVcpuAgentAvg = infraCpuDefaultInfraHostVcpuAgentAvg; return this; } /** - * Shows the 99th percentile of all distinct infrastructure hosts for Basic tier on vSphere over - * all hours in the current date for all organizations. + * Shows the average of all default Infrastructure host vCPU cores reported by the Datadog Agent + * over all hours in the current date for all organizations. Values are returned in millicores. + * Divide by 1,000 to convert to cores. * - * @return infraHostBasicInfraBasicVsphereTop99p + * @return infraCpuDefaultInfraHostVcpuAgentAvg */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INFRA_HOST_BASIC_INFRA_BASIC_VSPHERE_TOP99P) + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_AVG) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInfraHostBasicInfraBasicVsphereTop99p() { - return infraHostBasicInfraBasicVsphereTop99p; + public Long getInfraCpuDefaultInfraHostVcpuAgentAvg() { + return infraCpuDefaultInfraHostVcpuAgentAvg; } - public void setInfraHostBasicInfraBasicVsphereTop99p(Long infraHostBasicInfraBasicVsphereTop99p) { - this.infraHostBasicInfraBasicVsphereTop99p = infraHostBasicInfraBasicVsphereTop99p; + public void setInfraCpuDefaultInfraHostVcpuAgentAvg(Long infraCpuDefaultInfraHostVcpuAgentAvg) { + this.infraCpuDefaultInfraHostVcpuAgentAvg = infraCpuDefaultInfraHostVcpuAgentAvg; } - public UsageSummaryDate infraHostBasicTop99p(Long infraHostBasicTop99p) { - this.infraHostBasicTop99p = infraHostBasicTop99p; + public UsageSummaryDate infraCpuDefaultInfraHostVcpuAgentBasicAvg( + Long infraCpuDefaultInfraHostVcpuAgentBasicAvg) { + this.infraCpuDefaultInfraHostVcpuAgentBasicAvg = infraCpuDefaultInfraHostVcpuAgentBasicAvg; return this; } /** - * Shows the 99th percentile of all distinct infrastructure hosts for Basic tier over all hours in - * the current date for all organizations. + * Shows the average of all default basic Infrastructure host vCPU cores reported by the Datadog + * Agent over all hours in the current date for all organizations. Values are returned in + * millicores. Divide by 1,000 to convert to cores. * - * @return infraHostBasicTop99p + * @return infraCpuDefaultInfraHostVcpuAgentBasicAvg */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INFRA_HOST_BASIC_TOP99P) + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_BASIC_AVG) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInfraHostBasicTop99p() { - return infraHostBasicTop99p; + public Long getInfraCpuDefaultInfraHostVcpuAgentBasicAvg() { + return infraCpuDefaultInfraHostVcpuAgentBasicAvg; } - public void setInfraHostBasicTop99p(Long infraHostBasicTop99p) { - this.infraHostBasicTop99p = infraHostBasicTop99p; + public void setInfraCpuDefaultInfraHostVcpuAgentBasicAvg( + Long infraCpuDefaultInfraHostVcpuAgentBasicAvg) { + this.infraCpuDefaultInfraHostVcpuAgentBasicAvg = infraCpuDefaultInfraHostVcpuAgentBasicAvg; } - public UsageSummaryDate infraHostTop99p(Long infraHostTop99p) { - this.infraHostTop99p = infraHostTop99p; + public UsageSummaryDate infraCpuDefaultInfraHostVcpuAgentBasicSum( + Long infraCpuDefaultInfraHostVcpuAgentBasicSum) { + this.infraCpuDefaultInfraHostVcpuAgentBasicSum = infraCpuDefaultInfraHostVcpuAgentBasicSum; return this; } /** - * Shows the 99th percentile of all distinct infrastructure hosts over all hours in the current - * date for all organizations. + * Shows the sum of all default basic Infrastructure host vCPU cores reported by the Datadog Agent + * over all hours in the current date for all organizations. Values are returned in millicores. + * Divide by 1,000 to convert to cores. * - * @return infraHostTop99p + * @return infraCpuDefaultInfraHostVcpuAgentBasicSum */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INFRA_HOST_TOP99P) + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_BASIC_SUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInfraHostTop99p() { - return infraHostTop99p; + public Long getInfraCpuDefaultInfraHostVcpuAgentBasicSum() { + return infraCpuDefaultInfraHostVcpuAgentBasicSum; } - public void setInfraHostTop99p(Long infraHostTop99p) { - this.infraHostTop99p = infraHostTop99p; + public void setInfraCpuDefaultInfraHostVcpuAgentBasicSum( + Long infraCpuDefaultInfraHostVcpuAgentBasicSum) { + this.infraCpuDefaultInfraHostVcpuAgentBasicSum = infraCpuDefaultInfraHostVcpuAgentBasicSum; } - public UsageSummaryDate infraStorageMgmtObjectsCountAvg(Long infraStorageMgmtObjectsCountAvg) { - this.infraStorageMgmtObjectsCountAvg = infraStorageMgmtObjectsCountAvg; + public UsageSummaryDate infraCpuDefaultInfraHostVcpuAgentSum( + Long infraCpuDefaultInfraHostVcpuAgentSum) { + this.infraCpuDefaultInfraHostVcpuAgentSum = infraCpuDefaultInfraHostVcpuAgentSum; return this; } /** - * Shows the average number of storage management objects over all hours in the current date for - * all organizations. + * Shows the sum of all default Infrastructure host vCPU cores reported by the Datadog Agent over + * all hours in the current date for all organizations. Values are returned in millicores. Divide + * by 1,000 to convert to cores. * - * @return infraStorageMgmtObjectsCountAvg + * @return infraCpuDefaultInfraHostVcpuAgentSum */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INFRA_STORAGE_MGMT_OBJECTS_COUNT_AVG) + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_SUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInfraStorageMgmtObjectsCountAvg() { - return infraStorageMgmtObjectsCountAvg; + public Long getInfraCpuDefaultInfraHostVcpuAgentSum() { + return infraCpuDefaultInfraHostVcpuAgentSum; } - public void setInfraStorageMgmtObjectsCountAvg(Long infraStorageMgmtObjectsCountAvg) { - this.infraStorageMgmtObjectsCountAvg = infraStorageMgmtObjectsCountAvg; + public void setInfraCpuDefaultInfraHostVcpuAgentSum(Long infraCpuDefaultInfraHostVcpuAgentSum) { + this.infraCpuDefaultInfraHostVcpuAgentSum = infraCpuDefaultInfraHostVcpuAgentSum; } - public UsageSummaryDate ingestedEventsBytesSum(Long ingestedEventsBytesSum) { - this.ingestedEventsBytesSum = ingestedEventsBytesSum; + public UsageSummaryDate infraCpuDefaultInfraHostVcpuAwsAvg( + Long infraCpuDefaultInfraHostVcpuAwsAvg) { + this.infraCpuDefaultInfraHostVcpuAwsAvg = infraCpuDefaultInfraHostVcpuAwsAvg; return this; } /** - * Shows the sum of all log bytes ingested over all hours in the current date for all - * organizations. + * Shows the average of all default Infrastructure host vCPU cores on AWS over all hours in the + * current date for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. * - * @return ingestedEventsBytesSum + * @return infraCpuDefaultInfraHostVcpuAwsAvg */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INGESTED_EVENTS_BYTES_SUM) + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AWS_AVG) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIngestedEventsBytesSum() { - return ingestedEventsBytesSum; + public Long getInfraCpuDefaultInfraHostVcpuAwsAvg() { + return infraCpuDefaultInfraHostVcpuAwsAvg; } - public void setIngestedEventsBytesSum(Long ingestedEventsBytesSum) { - this.ingestedEventsBytesSum = ingestedEventsBytesSum; + public void setInfraCpuDefaultInfraHostVcpuAwsAvg(Long infraCpuDefaultInfraHostVcpuAwsAvg) { + this.infraCpuDefaultInfraHostVcpuAwsAvg = infraCpuDefaultInfraHostVcpuAwsAvg; } - public UsageSummaryDate iotDeviceSum(Long iotDeviceSum) { - this.iotDeviceSum = iotDeviceSum; + public UsageSummaryDate infraCpuDefaultInfraHostVcpuAwsSum( + Long infraCpuDefaultInfraHostVcpuAwsSum) { + this.infraCpuDefaultInfraHostVcpuAwsSum = infraCpuDefaultInfraHostVcpuAwsSum; return this; } /** - * Shows the sum of all IoT devices over all hours in the current date for all organizations. + * Shows the sum of all default Infrastructure host vCPU cores on AWS over all hours in the + * current date for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. * - * @return iotDeviceSum + * @return infraCpuDefaultInfraHostVcpuAwsSum */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IOT_DEVICE_SUM) + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AWS_SUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIotDeviceSum() { - return iotDeviceSum; + public Long getInfraCpuDefaultInfraHostVcpuAwsSum() { + return infraCpuDefaultInfraHostVcpuAwsSum; } - public void setIotDeviceSum(Long iotDeviceSum) { - this.iotDeviceSum = iotDeviceSum; + public void setInfraCpuDefaultInfraHostVcpuAwsSum(Long infraCpuDefaultInfraHostVcpuAwsSum) { + this.infraCpuDefaultInfraHostVcpuAwsSum = infraCpuDefaultInfraHostVcpuAwsSum; } - public UsageSummaryDate iotDeviceTop99p(Long iotDeviceTop99p) { - this.iotDeviceTop99p = iotDeviceTop99p; + public UsageSummaryDate infraCpuDefaultInfraHostVcpuAzureAvg( + Long infraCpuDefaultInfraHostVcpuAzureAvg) { + this.infraCpuDefaultInfraHostVcpuAzureAvg = infraCpuDefaultInfraHostVcpuAzureAvg; return this; } /** - * Shows the 99th percentile of all IoT devices over all hours in the current date all - * organizations. + * Shows the average of all default Infrastructure host vCPU cores on Azure over all hours in the + * current date for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. * - * @return iotDeviceTop99p + * @return infraCpuDefaultInfraHostVcpuAzureAvg */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IOT_DEVICE_TOP99P) + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AZURE_AVG) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIotDeviceTop99p() { - return iotDeviceTop99p; + public Long getInfraCpuDefaultInfraHostVcpuAzureAvg() { + return infraCpuDefaultInfraHostVcpuAzureAvg; } - public void setIotDeviceTop99p(Long iotDeviceTop99p) { - this.iotDeviceTop99p = iotDeviceTop99p; + public void setInfraCpuDefaultInfraHostVcpuAzureAvg(Long infraCpuDefaultInfraHostVcpuAzureAvg) { + this.infraCpuDefaultInfraHostVcpuAzureAvg = infraCpuDefaultInfraHostVcpuAzureAvg; } - public UsageSummaryDate llmObservabilityMinSpendSum(Long llmObservabilityMinSpendSum) { - this.llmObservabilityMinSpendSum = llmObservabilityMinSpendSum; + public UsageSummaryDate infraCpuDefaultInfraHostVcpuAzureSum( + Long infraCpuDefaultInfraHostVcpuAzureSum) { + this.infraCpuDefaultInfraHostVcpuAzureSum = infraCpuDefaultInfraHostVcpuAzureSum; return this; } /** - * Sum of all LLM observability minimum spend over all hours in the current date for all - * organizations. + * Shows the sum of all default Infrastructure host vCPU cores on Azure over all hours in the + * current date for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. * - * @return llmObservabilityMinSpendSum + * @return infraCpuDefaultInfraHostVcpuAzureSum */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LLM_OBSERVABILITY_MIN_SPEND_SUM) + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AZURE_SUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLlmObservabilityMinSpendSum() { - return llmObservabilityMinSpendSum; + public Long getInfraCpuDefaultInfraHostVcpuAzureSum() { + return infraCpuDefaultInfraHostVcpuAzureSum; } - public void setLlmObservabilityMinSpendSum(Long llmObservabilityMinSpendSum) { - this.llmObservabilityMinSpendSum = llmObservabilityMinSpendSum; + public void setInfraCpuDefaultInfraHostVcpuAzureSum(Long infraCpuDefaultInfraHostVcpuAzureSum) { + this.infraCpuDefaultInfraHostVcpuAzureSum = infraCpuDefaultInfraHostVcpuAzureSum; } - public UsageSummaryDate llmObservabilitySum(Long llmObservabilitySum) { - this.llmObservabilitySum = llmObservabilitySum; + public UsageSummaryDate infraCpuDefaultInfraHostVcpuGcpAvg( + Long infraCpuDefaultInfraHostVcpuGcpAvg) { + this.infraCpuDefaultInfraHostVcpuGcpAvg = infraCpuDefaultInfraHostVcpuGcpAvg; return this; } /** - * Sum of all LLM observability sessions over all hours in the current date for all organizations. + * Shows the average of all default Infrastructure host vCPU cores on GCP over all hours in the + * current date for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuDefaultInfraHostVcpuGcpAvg + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_GCP_AVG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuGcpAvg() { + return infraCpuDefaultInfraHostVcpuGcpAvg; + } + + public void setInfraCpuDefaultInfraHostVcpuGcpAvg(Long infraCpuDefaultInfraHostVcpuGcpAvg) { + this.infraCpuDefaultInfraHostVcpuGcpAvg = infraCpuDefaultInfraHostVcpuGcpAvg; + } + + public UsageSummaryDate infraCpuDefaultInfraHostVcpuGcpSum( + Long infraCpuDefaultInfraHostVcpuGcpSum) { + this.infraCpuDefaultInfraHostVcpuGcpSum = infraCpuDefaultInfraHostVcpuGcpSum; + return this; + } + + /** + * Shows the sum of all default Infrastructure host vCPU cores on GCP over all hours in the + * current date for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuDefaultInfraHostVcpuGcpSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_GCP_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuGcpSum() { + return infraCpuDefaultInfraHostVcpuGcpSum; + } + + public void setInfraCpuDefaultInfraHostVcpuGcpSum(Long infraCpuDefaultInfraHostVcpuGcpSum) { + this.infraCpuDefaultInfraHostVcpuGcpSum = infraCpuDefaultInfraHostVcpuGcpSum; + } + + public UsageSummaryDate infraCpuDefaultInfraHostVcpuNutanixAvg( + Long infraCpuDefaultInfraHostVcpuNutanixAvg) { + this.infraCpuDefaultInfraHostVcpuNutanixAvg = infraCpuDefaultInfraHostVcpuNutanixAvg; + return this; + } + + /** + * Shows the average of all default Infrastructure host vCPU cores on Nutanix over all hours in + * the current date for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuDefaultInfraHostVcpuNutanixAvg + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_AVG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuNutanixAvg() { + return infraCpuDefaultInfraHostVcpuNutanixAvg; + } + + public void setInfraCpuDefaultInfraHostVcpuNutanixAvg( + Long infraCpuDefaultInfraHostVcpuNutanixAvg) { + this.infraCpuDefaultInfraHostVcpuNutanixAvg = infraCpuDefaultInfraHostVcpuNutanixAvg; + } + + public UsageSummaryDate infraCpuDefaultInfraHostVcpuNutanixBasicAvg( + Long infraCpuDefaultInfraHostVcpuNutanixBasicAvg) { + this.infraCpuDefaultInfraHostVcpuNutanixBasicAvg = infraCpuDefaultInfraHostVcpuNutanixBasicAvg; + return this; + } + + /** + * Shows the average of all default basic Infrastructure host vCPU cores on Nutanix over all hours + * in the current date for all organizations. Values are returned in millicores. Divide by 1,000 + * to convert to cores. + * + * @return infraCpuDefaultInfraHostVcpuNutanixBasicAvg + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_BASIC_AVG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuNutanixBasicAvg() { + return infraCpuDefaultInfraHostVcpuNutanixBasicAvg; + } + + public void setInfraCpuDefaultInfraHostVcpuNutanixBasicAvg( + Long infraCpuDefaultInfraHostVcpuNutanixBasicAvg) { + this.infraCpuDefaultInfraHostVcpuNutanixBasicAvg = infraCpuDefaultInfraHostVcpuNutanixBasicAvg; + } + + public UsageSummaryDate infraCpuDefaultInfraHostVcpuNutanixBasicSum( + Long infraCpuDefaultInfraHostVcpuNutanixBasicSum) { + this.infraCpuDefaultInfraHostVcpuNutanixBasicSum = infraCpuDefaultInfraHostVcpuNutanixBasicSum; + return this; + } + + /** + * Shows the sum of all default basic Infrastructure host vCPU cores on Nutanix over all hours in + * the current date for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuDefaultInfraHostVcpuNutanixBasicSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_BASIC_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuNutanixBasicSum() { + return infraCpuDefaultInfraHostVcpuNutanixBasicSum; + } + + public void setInfraCpuDefaultInfraHostVcpuNutanixBasicSum( + Long infraCpuDefaultInfraHostVcpuNutanixBasicSum) { + this.infraCpuDefaultInfraHostVcpuNutanixBasicSum = infraCpuDefaultInfraHostVcpuNutanixBasicSum; + } + + public UsageSummaryDate infraCpuDefaultInfraHostVcpuNutanixSum( + Long infraCpuDefaultInfraHostVcpuNutanixSum) { + this.infraCpuDefaultInfraHostVcpuNutanixSum = infraCpuDefaultInfraHostVcpuNutanixSum; + return this; + } + + /** + * Shows the sum of all default Infrastructure host vCPU cores on Nutanix over all hours in the + * current date for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuDefaultInfraHostVcpuNutanixSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuNutanixSum() { + return infraCpuDefaultInfraHostVcpuNutanixSum; + } + + public void setInfraCpuDefaultInfraHostVcpuNutanixSum( + Long infraCpuDefaultInfraHostVcpuNutanixSum) { + this.infraCpuDefaultInfraHostVcpuNutanixSum = infraCpuDefaultInfraHostVcpuNutanixSum; + } + + public UsageSummaryDate infraCpuDefaultInfraHostVcpuOpentelemetryAvg( + Long infraCpuDefaultInfraHostVcpuOpentelemetryAvg) { + this.infraCpuDefaultInfraHostVcpuOpentelemetryAvg = + infraCpuDefaultInfraHostVcpuOpentelemetryAvg; + return this; + } + + /** + * Shows the average of all default Infrastructure host vCPU cores reported by OpenTelemetry over + * all hours in the current date for all organizations. Values are returned in millicores. Divide + * by 1,000 to convert to cores. + * + * @return infraCpuDefaultInfraHostVcpuOpentelemetryAvg + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_OPENTELEMETRY_AVG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuOpentelemetryAvg() { + return infraCpuDefaultInfraHostVcpuOpentelemetryAvg; + } + + public void setInfraCpuDefaultInfraHostVcpuOpentelemetryAvg( + Long infraCpuDefaultInfraHostVcpuOpentelemetryAvg) { + this.infraCpuDefaultInfraHostVcpuOpentelemetryAvg = + infraCpuDefaultInfraHostVcpuOpentelemetryAvg; + } + + public UsageSummaryDate infraCpuDefaultInfraHostVcpuOpentelemetrySum( + Long infraCpuDefaultInfraHostVcpuOpentelemetrySum) { + this.infraCpuDefaultInfraHostVcpuOpentelemetrySum = + infraCpuDefaultInfraHostVcpuOpentelemetrySum; + return this; + } + + /** + * Shows the sum of all default Infrastructure host vCPU cores reported by OpenTelemetry over all + * hours in the current date for all organizations. Values are returned in millicores. Divide by + * 1,000 to convert to cores. + * + * @return infraCpuDefaultInfraHostVcpuOpentelemetrySum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_OPENTELEMETRY_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuOpentelemetrySum() { + return infraCpuDefaultInfraHostVcpuOpentelemetrySum; + } + + public void setInfraCpuDefaultInfraHostVcpuOpentelemetrySum( + Long infraCpuDefaultInfraHostVcpuOpentelemetrySum) { + this.infraCpuDefaultInfraHostVcpuOpentelemetrySum = + infraCpuDefaultInfraHostVcpuOpentelemetrySum; + } + + public UsageSummaryDate infraCpuObservedInfraHostVcpuAgentAvg( + Long infraCpuObservedInfraHostVcpuAgentAvg) { + this.infraCpuObservedInfraHostVcpuAgentAvg = infraCpuObservedInfraHostVcpuAgentAvg; + return this; + } + + /** + * Shows the average of all observed Infrastructure host vCPU cores reported by the Datadog Agent + * over all hours in the current date for all organizations. Values are returned in millicores. + * Divide by 1,000 to convert to cores. + * + * @return infraCpuObservedInfraHostVcpuAgentAvg + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AGENT_AVG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuAgentAvg() { + return infraCpuObservedInfraHostVcpuAgentAvg; + } + + public void setInfraCpuObservedInfraHostVcpuAgentAvg(Long infraCpuObservedInfraHostVcpuAgentAvg) { + this.infraCpuObservedInfraHostVcpuAgentAvg = infraCpuObservedInfraHostVcpuAgentAvg; + } + + public UsageSummaryDate infraCpuObservedInfraHostVcpuAgentSum( + Long infraCpuObservedInfraHostVcpuAgentSum) { + this.infraCpuObservedInfraHostVcpuAgentSum = infraCpuObservedInfraHostVcpuAgentSum; + return this; + } + + /** + * Shows the sum of all observed Infrastructure host vCPU cores reported by the Datadog Agent over + * all hours in the current date for all organizations. Values are returned in millicores. Divide + * by 1,000 to convert to cores. + * + * @return infraCpuObservedInfraHostVcpuAgentSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AGENT_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuAgentSum() { + return infraCpuObservedInfraHostVcpuAgentSum; + } + + public void setInfraCpuObservedInfraHostVcpuAgentSum(Long infraCpuObservedInfraHostVcpuAgentSum) { + this.infraCpuObservedInfraHostVcpuAgentSum = infraCpuObservedInfraHostVcpuAgentSum; + } + + public UsageSummaryDate infraCpuObservedInfraHostVcpuAwsAvg( + Long infraCpuObservedInfraHostVcpuAwsAvg) { + this.infraCpuObservedInfraHostVcpuAwsAvg = infraCpuObservedInfraHostVcpuAwsAvg; + return this; + } + + /** + * Shows the average of all observed Infrastructure host vCPU cores on AWS over all hours in the + * current date for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuObservedInfraHostVcpuAwsAvg + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AWS_AVG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuAwsAvg() { + return infraCpuObservedInfraHostVcpuAwsAvg; + } + + public void setInfraCpuObservedInfraHostVcpuAwsAvg(Long infraCpuObservedInfraHostVcpuAwsAvg) { + this.infraCpuObservedInfraHostVcpuAwsAvg = infraCpuObservedInfraHostVcpuAwsAvg; + } + + public UsageSummaryDate infraCpuObservedInfraHostVcpuAwsSum( + Long infraCpuObservedInfraHostVcpuAwsSum) { + this.infraCpuObservedInfraHostVcpuAwsSum = infraCpuObservedInfraHostVcpuAwsSum; + return this; + } + + /** + * Shows the sum of all observed Infrastructure host vCPU cores on AWS over all hours in the + * current date for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuObservedInfraHostVcpuAwsSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AWS_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuAwsSum() { + return infraCpuObservedInfraHostVcpuAwsSum; + } + + public void setInfraCpuObservedInfraHostVcpuAwsSum(Long infraCpuObservedInfraHostVcpuAwsSum) { + this.infraCpuObservedInfraHostVcpuAwsSum = infraCpuObservedInfraHostVcpuAwsSum; + } + + public UsageSummaryDate infraCpuObservedInfraHostVcpuAzureAvg( + Long infraCpuObservedInfraHostVcpuAzureAvg) { + this.infraCpuObservedInfraHostVcpuAzureAvg = infraCpuObservedInfraHostVcpuAzureAvg; + return this; + } + + /** + * Shows the average of all observed Infrastructure host vCPU cores on Azure over all hours in the + * current date for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuObservedInfraHostVcpuAzureAvg + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AZURE_AVG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuAzureAvg() { + return infraCpuObservedInfraHostVcpuAzureAvg; + } + + public void setInfraCpuObservedInfraHostVcpuAzureAvg(Long infraCpuObservedInfraHostVcpuAzureAvg) { + this.infraCpuObservedInfraHostVcpuAzureAvg = infraCpuObservedInfraHostVcpuAzureAvg; + } + + public UsageSummaryDate infraCpuObservedInfraHostVcpuAzureSum( + Long infraCpuObservedInfraHostVcpuAzureSum) { + this.infraCpuObservedInfraHostVcpuAzureSum = infraCpuObservedInfraHostVcpuAzureSum; + return this; + } + + /** + * Shows the sum of all observed Infrastructure host vCPU cores on Azure over all hours in the + * current date for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuObservedInfraHostVcpuAzureSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AZURE_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuAzureSum() { + return infraCpuObservedInfraHostVcpuAzureSum; + } + + public void setInfraCpuObservedInfraHostVcpuAzureSum(Long infraCpuObservedInfraHostVcpuAzureSum) { + this.infraCpuObservedInfraHostVcpuAzureSum = infraCpuObservedInfraHostVcpuAzureSum; + } + + public UsageSummaryDate infraCpuObservedInfraHostVcpuGcpAvg( + Long infraCpuObservedInfraHostVcpuGcpAvg) { + this.infraCpuObservedInfraHostVcpuGcpAvg = infraCpuObservedInfraHostVcpuGcpAvg; + return this; + } + + /** + * Shows the average of all observed Infrastructure host vCPU cores on GCP over all hours in the + * current date for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuObservedInfraHostVcpuGcpAvg + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_GCP_AVG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuGcpAvg() { + return infraCpuObservedInfraHostVcpuGcpAvg; + } + + public void setInfraCpuObservedInfraHostVcpuGcpAvg(Long infraCpuObservedInfraHostVcpuGcpAvg) { + this.infraCpuObservedInfraHostVcpuGcpAvg = infraCpuObservedInfraHostVcpuGcpAvg; + } + + public UsageSummaryDate infraCpuObservedInfraHostVcpuGcpSum( + Long infraCpuObservedInfraHostVcpuGcpSum) { + this.infraCpuObservedInfraHostVcpuGcpSum = infraCpuObservedInfraHostVcpuGcpSum; + return this; + } + + /** + * Shows the sum of all observed Infrastructure host vCPU cores on GCP over all hours in the + * current date for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuObservedInfraHostVcpuGcpSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_GCP_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuGcpSum() { + return infraCpuObservedInfraHostVcpuGcpSum; + } + + public void setInfraCpuObservedInfraHostVcpuGcpSum(Long infraCpuObservedInfraHostVcpuGcpSum) { + this.infraCpuObservedInfraHostVcpuGcpSum = infraCpuObservedInfraHostVcpuGcpSum; + } + + public UsageSummaryDate infraCpuObservedInfraHostVcpuNutanixAvg( + Long infraCpuObservedInfraHostVcpuNutanixAvg) { + this.infraCpuObservedInfraHostVcpuNutanixAvg = infraCpuObservedInfraHostVcpuNutanixAvg; + return this; + } + + /** + * Shows the average of all observed Infrastructure host vCPU cores on Nutanix over all hours in + * the current date for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuObservedInfraHostVcpuNutanixAvg + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_NUTANIX_AVG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuNutanixAvg() { + return infraCpuObservedInfraHostVcpuNutanixAvg; + } + + public void setInfraCpuObservedInfraHostVcpuNutanixAvg( + Long infraCpuObservedInfraHostVcpuNutanixAvg) { + this.infraCpuObservedInfraHostVcpuNutanixAvg = infraCpuObservedInfraHostVcpuNutanixAvg; + } + + public UsageSummaryDate infraCpuObservedInfraHostVcpuNutanixSum( + Long infraCpuObservedInfraHostVcpuNutanixSum) { + this.infraCpuObservedInfraHostVcpuNutanixSum = infraCpuObservedInfraHostVcpuNutanixSum; + return this; + } + + /** + * Shows the sum of all observed Infrastructure host vCPU cores on Nutanix over all hours in the + * current date for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuObservedInfraHostVcpuNutanixSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_NUTANIX_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuNutanixSum() { + return infraCpuObservedInfraHostVcpuNutanixSum; + } + + public void setInfraCpuObservedInfraHostVcpuNutanixSum( + Long infraCpuObservedInfraHostVcpuNutanixSum) { + this.infraCpuObservedInfraHostVcpuNutanixSum = infraCpuObservedInfraHostVcpuNutanixSum; + } + + public UsageSummaryDate infraCpuObservedInfraHostVcpuOpentelemetryAvg( + Long infraCpuObservedInfraHostVcpuOpentelemetryAvg) { + this.infraCpuObservedInfraHostVcpuOpentelemetryAvg = + infraCpuObservedInfraHostVcpuOpentelemetryAvg; + return this; + } + + /** + * Shows the average of all observed Infrastructure host vCPU cores reported by OpenTelemetry over + * all hours in the current date for all organizations. Values are returned in millicores. Divide + * by 1,000 to convert to cores. + * + * @return infraCpuObservedInfraHostVcpuOpentelemetryAvg + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_OPENTELEMETRY_AVG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuOpentelemetryAvg() { + return infraCpuObservedInfraHostVcpuOpentelemetryAvg; + } + + public void setInfraCpuObservedInfraHostVcpuOpentelemetryAvg( + Long infraCpuObservedInfraHostVcpuOpentelemetryAvg) { + this.infraCpuObservedInfraHostVcpuOpentelemetryAvg = + infraCpuObservedInfraHostVcpuOpentelemetryAvg; + } + + public UsageSummaryDate infraCpuObservedInfraHostVcpuOpentelemetrySum( + Long infraCpuObservedInfraHostVcpuOpentelemetrySum) { + this.infraCpuObservedInfraHostVcpuOpentelemetrySum = + infraCpuObservedInfraHostVcpuOpentelemetrySum; + return this; + } + + /** + * Shows the sum of all observed Infrastructure host vCPU cores reported by OpenTelemetry over all + * hours in the current date for all organizations. Values are returned in millicores. Divide by + * 1,000 to convert to cores. + * + * @return infraCpuObservedInfraHostVcpuOpentelemetrySum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_OPENTELEMETRY_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuOpentelemetrySum() { + return infraCpuObservedInfraHostVcpuOpentelemetrySum; + } + + public void setInfraCpuObservedInfraHostVcpuOpentelemetrySum( + Long infraCpuObservedInfraHostVcpuOpentelemetrySum) { + this.infraCpuObservedInfraHostVcpuOpentelemetrySum = + infraCpuObservedInfraHostVcpuOpentelemetrySum; + } + + public UsageSummaryDate infraCpuSum(Long infraCpuSum) { + this.infraCpuSum = infraCpuSum; + return this; + } + + /** + * Shows the sum of all Infrastructure vCPU cores over all hours in the current date for all + * organizations. Values are returned in millicores. Divide by 1,000 to convert to cores. + * + * @return infraCpuSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuSum() { + return infraCpuSum; + } + + public void setInfraCpuSum(Long infraCpuSum) { + this.infraCpuSum = infraCpuSum; + } + + public UsageSummaryDate infraEdgeMonitoringDevicesTop99p(Long infraEdgeMonitoringDevicesTop99p) { + this.infraEdgeMonitoringDevicesTop99p = infraEdgeMonitoringDevicesTop99p; + return this; + } + + /** + * Shows the 99th percentile of all Edge Devices Monitoring devices over all hours in the current + * date for all organizations. + * + * @return infraEdgeMonitoringDevicesTop99p + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_EDGE_MONITORING_DEVICES_TOP99P) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraEdgeMonitoringDevicesTop99p() { + return infraEdgeMonitoringDevicesTop99p; + } + + public void setInfraEdgeMonitoringDevicesTop99p(Long infraEdgeMonitoringDevicesTop99p) { + this.infraEdgeMonitoringDevicesTop99p = infraEdgeMonitoringDevicesTop99p; + } + + public UsageSummaryDate infraHostBasicInfraBasicAgentTop99p( + Long infraHostBasicInfraBasicAgentTop99p) { + this.infraHostBasicInfraBasicAgentTop99p = infraHostBasicInfraBasicAgentTop99p; + return this; + } + + /** + * Shows the 99th percentile of all distinct infrastructure hosts for Basic tier with the Datadog + * Agent over all hours in the current date for all organizations. + * + * @return infraHostBasicInfraBasicAgentTop99p + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_HOST_BASIC_INFRA_BASIC_AGENT_TOP99P) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraHostBasicInfraBasicAgentTop99p() { + return infraHostBasicInfraBasicAgentTop99p; + } + + public void setInfraHostBasicInfraBasicAgentTop99p(Long infraHostBasicInfraBasicAgentTop99p) { + this.infraHostBasicInfraBasicAgentTop99p = infraHostBasicInfraBasicAgentTop99p; + } + + public UsageSummaryDate infraHostBasicInfraBasicVsphereTop99p( + Long infraHostBasicInfraBasicVsphereTop99p) { + this.infraHostBasicInfraBasicVsphereTop99p = infraHostBasicInfraBasicVsphereTop99p; + return this; + } + + /** + * Shows the 99th percentile of all distinct infrastructure hosts for Basic tier on vSphere over + * all hours in the current date for all organizations. + * + * @return infraHostBasicInfraBasicVsphereTop99p + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_HOST_BASIC_INFRA_BASIC_VSPHERE_TOP99P) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraHostBasicInfraBasicVsphereTop99p() { + return infraHostBasicInfraBasicVsphereTop99p; + } + + public void setInfraHostBasicInfraBasicVsphereTop99p(Long infraHostBasicInfraBasicVsphereTop99p) { + this.infraHostBasicInfraBasicVsphereTop99p = infraHostBasicInfraBasicVsphereTop99p; + } + + public UsageSummaryDate infraHostBasicTop99p(Long infraHostBasicTop99p) { + this.infraHostBasicTop99p = infraHostBasicTop99p; + return this; + } + + /** + * Shows the 99th percentile of all distinct infrastructure hosts for Basic tier over all hours in + * the current date for all organizations. + * + * @return infraHostBasicTop99p + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_HOST_BASIC_TOP99P) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraHostBasicTop99p() { + return infraHostBasicTop99p; + } + + public void setInfraHostBasicTop99p(Long infraHostBasicTop99p) { + this.infraHostBasicTop99p = infraHostBasicTop99p; + } + + 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. + * + * @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 infraStorageMgmtObjectsCountAvg(Long infraStorageMgmtObjectsCountAvg) { + this.infraStorageMgmtObjectsCountAvg = infraStorageMgmtObjectsCountAvg; + return this; + } + + /** + * Shows the average number of storage management objects over all hours in the current date for + * all organizations. + * + * @return infraStorageMgmtObjectsCountAvg + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_STORAGE_MGMT_OBJECTS_COUNT_AVG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraStorageMgmtObjectsCountAvg() { + return infraStorageMgmtObjectsCountAvg; + } + + public void setInfraStorageMgmtObjectsCountAvg(Long infraStorageMgmtObjectsCountAvg) { + this.infraStorageMgmtObjectsCountAvg = infraStorageMgmtObjectsCountAvg; + } + + public UsageSummaryDate ingestPointsSum(Long ingestPointsSum) { + this.ingestPointsSum = ingestPointsSum; + return this; + } + + /** + * Shows the sum of all ingested custom metrics points over all hours in the current date for all + * organizations. + * + * @return ingestPointsSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INGEST_POINTS_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getIngestPointsSum() { + return ingestPointsSum; + } + + public void setIngestPointsSum(Long ingestPointsSum) { + this.ingestPointsSum = ingestPointsSum; + } + + 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. + * + * @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 iotApmHostSum(Long iotApmHostSum) { + this.iotApmHostSum = iotApmHostSum; + return this; + } + + /** + * Shows the sum of all Application Performance Monitoring IoT hosts over all hours in the current + * date for all organizations. + * + * @return iotApmHostSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IOT_APM_HOST_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getIotApmHostSum() { + return iotApmHostSum; + } + + public void setIotApmHostSum(Long iotApmHostSum) { + this.iotApmHostSum = iotApmHostSum; + } + + public UsageSummaryDate iotApmHostTop99p(Long iotApmHostTop99p) { + this.iotApmHostTop99p = iotApmHostTop99p; + return this; + } + + /** + * Shows the 99th percentile of all Application Performance Monitoring IoT hosts over all hours in + * the current date for all organizations. + * + * @return iotApmHostTop99p + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IOT_APM_HOST_TOP99P) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getIotApmHostTop99p() { + return iotApmHostTop99p; + } + + public void setIotApmHostTop99p(Long iotApmHostTop99p) { + this.iotApmHostTop99p = iotApmHostTop99p; + } + + 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. + * + * @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. + * + * @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 llmObservability15dayRetentionSpansSum( + Long llmObservability15dayRetentionSpansSum) { + this.llmObservability15dayRetentionSpansSum = llmObservability15dayRetentionSpansSum; + return this; + } + + /** + * Shows the sum of all LLM Observability 15-day retention spans over all hours in the current + * date for all organizations. + * + * @return llmObservability15dayRetentionSpansSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LLM_OBSERVABILITY_15DAY_RETENTION_SPANS_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLlmObservability15dayRetentionSpansSum() { + return llmObservability15dayRetentionSpansSum; + } + + public void setLlmObservability15dayRetentionSpansSum( + Long llmObservability15dayRetentionSpansSum) { + this.llmObservability15dayRetentionSpansSum = llmObservability15dayRetentionSpansSum; + } + + public UsageSummaryDate llmObservability30dayRetentionSpansSum( + Long llmObservability30dayRetentionSpansSum) { + this.llmObservability30dayRetentionSpansSum = llmObservability30dayRetentionSpansSum; + return this; + } + + /** + * Shows the sum of all LLM Observability 30-day retention spans over all hours in the current + * date for all organizations. + * + * @return llmObservability30dayRetentionSpansSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LLM_OBSERVABILITY_30DAY_RETENTION_SPANS_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLlmObservability30dayRetentionSpansSum() { + return llmObservability30dayRetentionSpansSum; + } + + public void setLlmObservability30dayRetentionSpansSum( + Long llmObservability30dayRetentionSpansSum) { + this.llmObservability30dayRetentionSpansSum = llmObservability30dayRetentionSpansSum; + } + + public UsageSummaryDate llmObservability60dayRetentionSpansSum( + Long llmObservability60dayRetentionSpansSum) { + this.llmObservability60dayRetentionSpansSum = llmObservability60dayRetentionSpansSum; + return this; + } + + /** + * Shows the sum of all LLM Observability 60-day retention spans over all hours in the current + * date for all organizations. + * + * @return llmObservability60dayRetentionSpansSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LLM_OBSERVABILITY_60DAY_RETENTION_SPANS_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLlmObservability60dayRetentionSpansSum() { + return llmObservability60dayRetentionSpansSum; + } + + public void setLlmObservability60dayRetentionSpansSum( + Long llmObservability60dayRetentionSpansSum) { + this.llmObservability60dayRetentionSpansSum = llmObservability60dayRetentionSpansSum; + } + + public UsageSummaryDate llmObservability90dayRetentionSpansSum( + Long llmObservability90dayRetentionSpansSum) { + this.llmObservability90dayRetentionSpansSum = llmObservability90dayRetentionSpansSum; + return this; + } + + /** + * Shows the sum of all LLM Observability 90-day retention spans over all hours in the current + * date for all organizations. + * + * @return llmObservability90dayRetentionSpansSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LLM_OBSERVABILITY_90DAY_RETENTION_SPANS_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLlmObservability90dayRetentionSpansSum() { + return llmObservability90dayRetentionSpansSum; + } + + public void setLlmObservability90dayRetentionSpansSum( + Long llmObservability90dayRetentionSpansSum) { + this.llmObservability90dayRetentionSpansSum = llmObservability90dayRetentionSpansSum; + } + + public UsageSummaryDate llmObservabilityMinSpendSum(Long llmObservabilityMinSpendSum) { + this.llmObservabilityMinSpendSum = llmObservabilityMinSpendSum; + return this; + } + + /** + * Sum of all LLM observability minimum spend over all hours in the current date for all + * organizations. + * + * @return llmObservabilityMinSpendSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LLM_OBSERVABILITY_MIN_SPEND_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLlmObservabilityMinSpendSum() { + return llmObservabilityMinSpendSum; + } + + public void setLlmObservabilityMinSpendSum(Long llmObservabilityMinSpendSum) { + this.llmObservabilityMinSpendSum = llmObservabilityMinSpendSum; + } + + public UsageSummaryDate llmObservabilitySum(Long llmObservabilitySum) { + this.llmObservabilitySum = llmObservabilitySum; + return this; + } + + /** + * Sum of all LLM observability sessions over all hours in the current date for all organizations. * * @return llmObservabilitySum */ @@ -4378,6 +5726,50 @@ public void setLlmObservabilitySum(Long llmObservabilitySum) { this.llmObservabilitySum = llmObservabilitySum; } + public UsageSummaryDate logsArchiveSearchGbScannedSum(Long logsArchiveSearchGbScannedSum) { + this.logsArchiveSearchGbScannedSum = logsArchiveSearchGbScannedSum; + return this; + } + + /** + * Shows the sum of all Logs Archive Search scanned data over all hours in the current date for + * all organizations. + * + * @return logsArchiveSearchGbScannedSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS_ARCHIVE_SEARCH_GB_SCANNED_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLogsArchiveSearchGbScannedSum() { + return logsArchiveSearchGbScannedSum; + } + + public void setLogsArchiveSearchGbScannedSum(Long logsArchiveSearchGbScannedSum) { + this.logsArchiveSearchGbScannedSum = logsArchiveSearchGbScannedSum; + } + + public UsageSummaryDate metricNamesSum(Long metricNamesSum) { + this.metricNamesSum = metricNamesSum; + return this; + } + + /** + * Shows the sum of all custom metric names over all hours in the current date for all + * organizations. + * + * @return metricNamesSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC_NAMES_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getMetricNamesSum() { + return metricNamesSum; + } + + public void setMetricNamesSum(Long metricNamesSum) { + this.metricNamesSum = metricNamesSum; + } + public UsageSummaryDate mobileRumLiteSessionCountSum(Long mobileRumLiteSessionCountSum) { this.mobileRumLiteSessionCountSum = mobileRumLiteSessionCountSum; return this; @@ -6704,6 +8096,50 @@ public void setSiemAnalyzedLogsAddOnCountSum(Long siemAnalyzedLogsAddOnCountSum) this.siemAnalyzedLogsAddOnCountSum = siemAnalyzedLogsAddOnCountSum; } + public UsageSummaryDate snmpDeviceCountSum(Long snmpDeviceCountSum) { + this.snmpDeviceCountSum = snmpDeviceCountSum; + return this; + } + + /** + * Shows the sum of all Network Device Monitoring devices over all hours in the current date for + * all organizations. + * + * @return snmpDeviceCountSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SNMP_DEVICE_COUNT_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getSnmpDeviceCountSum() { + return snmpDeviceCountSum; + } + + public void setSnmpDeviceCountSum(Long snmpDeviceCountSum) { + this.snmpDeviceCountSum = snmpDeviceCountSum; + } + + public UsageSummaryDate snmpDeviceCountTop99p(Long snmpDeviceCountTop99p) { + this.snmpDeviceCountTop99p = snmpDeviceCountTop99p; + return this; + } + + /** + * Shows the 99th percentile of all Network Device Monitoring devices over all hours in the + * current date for all organizations. + * + * @return snmpDeviceCountTop99p + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SNMP_DEVICE_COUNT_TOP99P) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getSnmpDeviceCountTop99p() { + return snmpDeviceCountTop99p; + } + + public void setSnmpDeviceCountTop99p(Long snmpDeviceCountTop99p) { + this.snmpDeviceCountTop99p = snmpDeviceCountTop99p; + } + public UsageSummaryDate syntheticsBrowserCheckCallsCountSum( Long syntheticsBrowserCheckCallsCountSum) { this.syntheticsBrowserCheckCallsCountSum = syntheticsBrowserCheckCallsCountSum; @@ -6983,6 +8419,17 @@ public boolean equals(Object o) { } UsageSummaryDate usageSummaryDate = (UsageSummaryDate) o; return Objects.equals(this.agentHostTop99p, usageSummaryDate.agentHostTop99p) + && Objects.equals( + this.aiCreditsAgentBuilderAiCreditsSum, + usageSummaryDate.aiCreditsAgentBuilderAiCreditsSum) + && Objects.equals( + this.aiCreditsBitsAssistantAiCreditsSum, + usageSummaryDate.aiCreditsBitsAssistantAiCreditsSum) + && Objects.equals( + this.aiCreditsBitsDevAiCreditsSum, usageSummaryDate.aiCreditsBitsDevAiCreditsSum) + && Objects.equals( + this.aiCreditsBitsSreAiCreditsSum, usageSummaryDate.aiCreditsBitsSreAiCreditsSum) + && Objects.equals(this.aiCreditsSum, usageSummaryDate.aiCreditsSum) && Objects.equals( this.apmAzureAppServiceHostTop99p, usageSummaryDate.apmAzureAppServiceHostTop99p) && Objects.equals(this.apmDevsecopsHostTop99p, usageSummaryDate.apmDevsecopsHostTop99p) @@ -6997,6 +8444,9 @@ public boolean equals(Object o) { && Objects.equals(this.asmServerlessSum, usageSummaryDate.asmServerlessSum) && Objects.equals(this.auditLogsLinesIndexedSum, usageSummaryDate.auditLogsLinesIndexedSum) && Objects.equals(this.auditTrailEnabledHwm, usageSummaryDate.auditTrailEnabledHwm) + && Objects.equals( + this.auditTrailEventForwardingEventsSum, + usageSummaryDate.auditTrailEventForwardingEventsSum) && Objects.equals(this.avgProfiledFargateTasks, usageSummaryDate.avgProfiledFargateTasks) && Objects.equals(this.awsHostTop99p, usageSummaryDate.awsHostTop99p) && Objects.equals(this.awsLambdaFuncCount, usageSummaryDate.awsLambdaFuncCount) @@ -7118,6 +8568,12 @@ public boolean equals(Object o) { && Objects.equals(this.cwsHostTop99p, usageSummaryDate.cwsHostTop99p) && Objects.equals( this.dataJobsMonitoringHostHrSum, usageSummaryDate.dataJobsMonitoringHostHrSum) + && Objects.equals( + this.dataStreamMonitoringHostCountSum, + usageSummaryDate.dataStreamMonitoringHostCountSum) + && Objects.equals( + this.dataStreamMonitoringHostCountTop99p, + usageSummaryDate.dataStreamMonitoringHostCountTop99p) && Objects.equals(this.date, usageSummaryDate.date) && Objects.equals(this.dbmHostTop99p, usageSummaryDate.dbmHostTop99p) && Objects.equals(this.dbmQueriesCountAvg, usageSummaryDate.dbmQueriesCountAvg) @@ -7194,6 +8650,93 @@ public boolean equals(Object o) { && Objects.equals( this.incidentManagementSeatsHwm, usageSummaryDate.incidentManagementSeatsHwm) && Objects.equals(this.indexedEventsCountSum, usageSummaryDate.indexedEventsCountSum) + && Objects.equals(this.indexedPointsSum, usageSummaryDate.indexedPointsSum) + && Objects.equals(this.infraCpuAvg, usageSummaryDate.infraCpuAvg) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuAgentAvg, + usageSummaryDate.infraCpuDefaultInfraHostVcpuAgentAvg) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuAgentBasicAvg, + usageSummaryDate.infraCpuDefaultInfraHostVcpuAgentBasicAvg) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuAgentBasicSum, + usageSummaryDate.infraCpuDefaultInfraHostVcpuAgentBasicSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuAgentSum, + usageSummaryDate.infraCpuDefaultInfraHostVcpuAgentSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuAwsAvg, + usageSummaryDate.infraCpuDefaultInfraHostVcpuAwsAvg) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuAwsSum, + usageSummaryDate.infraCpuDefaultInfraHostVcpuAwsSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuAzureAvg, + usageSummaryDate.infraCpuDefaultInfraHostVcpuAzureAvg) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuAzureSum, + usageSummaryDate.infraCpuDefaultInfraHostVcpuAzureSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuGcpAvg, + usageSummaryDate.infraCpuDefaultInfraHostVcpuGcpAvg) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuGcpSum, + usageSummaryDate.infraCpuDefaultInfraHostVcpuGcpSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuNutanixAvg, + usageSummaryDate.infraCpuDefaultInfraHostVcpuNutanixAvg) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuNutanixBasicAvg, + usageSummaryDate.infraCpuDefaultInfraHostVcpuNutanixBasicAvg) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuNutanixBasicSum, + usageSummaryDate.infraCpuDefaultInfraHostVcpuNutanixBasicSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuNutanixSum, + usageSummaryDate.infraCpuDefaultInfraHostVcpuNutanixSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuOpentelemetryAvg, + usageSummaryDate.infraCpuDefaultInfraHostVcpuOpentelemetryAvg) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuOpentelemetrySum, + usageSummaryDate.infraCpuDefaultInfraHostVcpuOpentelemetrySum) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuAgentAvg, + usageSummaryDate.infraCpuObservedInfraHostVcpuAgentAvg) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuAgentSum, + usageSummaryDate.infraCpuObservedInfraHostVcpuAgentSum) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuAwsAvg, + usageSummaryDate.infraCpuObservedInfraHostVcpuAwsAvg) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuAwsSum, + usageSummaryDate.infraCpuObservedInfraHostVcpuAwsSum) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuAzureAvg, + usageSummaryDate.infraCpuObservedInfraHostVcpuAzureAvg) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuAzureSum, + usageSummaryDate.infraCpuObservedInfraHostVcpuAzureSum) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuGcpAvg, + usageSummaryDate.infraCpuObservedInfraHostVcpuGcpAvg) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuGcpSum, + usageSummaryDate.infraCpuObservedInfraHostVcpuGcpSum) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuNutanixAvg, + usageSummaryDate.infraCpuObservedInfraHostVcpuNutanixAvg) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuNutanixSum, + usageSummaryDate.infraCpuObservedInfraHostVcpuNutanixSum) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuOpentelemetryAvg, + usageSummaryDate.infraCpuObservedInfraHostVcpuOpentelemetryAvg) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuOpentelemetrySum, + usageSummaryDate.infraCpuObservedInfraHostVcpuOpentelemetrySum) + && Objects.equals(this.infraCpuSum, usageSummaryDate.infraCpuSum) && Objects.equals( this.infraEdgeMonitoringDevicesTop99p, usageSummaryDate.infraEdgeMonitoringDevicesTop99p) @@ -7207,12 +8750,30 @@ public boolean equals(Object o) { && Objects.equals(this.infraHostTop99p, usageSummaryDate.infraHostTop99p) && Objects.equals( this.infraStorageMgmtObjectsCountAvg, usageSummaryDate.infraStorageMgmtObjectsCountAvg) + && Objects.equals(this.ingestPointsSum, usageSummaryDate.ingestPointsSum) && Objects.equals(this.ingestedEventsBytesSum, usageSummaryDate.ingestedEventsBytesSum) + && Objects.equals(this.iotApmHostSum, usageSummaryDate.iotApmHostSum) + && Objects.equals(this.iotApmHostTop99p, usageSummaryDate.iotApmHostTop99p) && Objects.equals(this.iotDeviceSum, usageSummaryDate.iotDeviceSum) && Objects.equals(this.iotDeviceTop99p, usageSummaryDate.iotDeviceTop99p) + && Objects.equals( + this.llmObservability15dayRetentionSpansSum, + usageSummaryDate.llmObservability15dayRetentionSpansSum) + && Objects.equals( + this.llmObservability30dayRetentionSpansSum, + usageSummaryDate.llmObservability30dayRetentionSpansSum) + && Objects.equals( + this.llmObservability60dayRetentionSpansSum, + usageSummaryDate.llmObservability60dayRetentionSpansSum) + && Objects.equals( + this.llmObservability90dayRetentionSpansSum, + usageSummaryDate.llmObservability90dayRetentionSpansSum) && Objects.equals( this.llmObservabilityMinSpendSum, usageSummaryDate.llmObservabilityMinSpendSum) && Objects.equals(this.llmObservabilitySum, usageSummaryDate.llmObservabilitySum) + && Objects.equals( + this.logsArchiveSearchGbScannedSum, usageSummaryDate.logsArchiveSearchGbScannedSum) + && Objects.equals(this.metricNamesSum, usageSummaryDate.metricNamesSum) && Objects.equals( this.mobileRumLiteSessionCountSum, usageSummaryDate.mobileRumLiteSessionCountSum) && Objects.equals( @@ -7418,6 +8979,8 @@ public boolean equals(Object o) { && Objects.equals(this.siem6moRetentionSum, usageSummaryDate.siem6moRetentionSum) && Objects.equals( this.siemAnalyzedLogsAddOnCountSum, usageSummaryDate.siemAnalyzedLogsAddOnCountSum) + && Objects.equals(this.snmpDeviceCountSum, usageSummaryDate.snmpDeviceCountSum) + && Objects.equals(this.snmpDeviceCountTop99p, usageSummaryDate.snmpDeviceCountTop99p) && Objects.equals( this.syntheticsBrowserCheckCallsCountSum, usageSummaryDate.syntheticsBrowserCheckCallsCountSum) @@ -7448,6 +9011,11 @@ public boolean equals(Object o) { public int hashCode() { return Objects.hash( agentHostTop99p, + aiCreditsAgentBuilderAiCreditsSum, + aiCreditsBitsAssistantAiCreditsSum, + aiCreditsBitsDevAiCreditsSum, + aiCreditsBitsSreAiCreditsSum, + aiCreditsSum, apmAzureAppServiceHostTop99p, apmDevsecopsHostTop99p, apmEnterpriseStandaloneHostsTop99p, @@ -7458,6 +9026,7 @@ public int hashCode() { asmServerlessSum, auditLogsLinesIndexedSum, auditTrailEnabledHwm, + auditTrailEventForwardingEventsSum, avgProfiledFargateTasks, awsHostTop99p, awsLambdaFuncCount, @@ -7530,6 +9099,8 @@ public int hashCode() { cwsFargateTaskAvg, cwsHostTop99p, dataJobsMonitoringHostHrSum, + dataStreamMonitoringHostCountSum, + dataStreamMonitoringHostCountTop99p, date, dbmHostTop99p, dbmQueriesCountAvg, @@ -7578,17 +9149,57 @@ public int hashCode() { incidentManagementMonthlyActiveUsersHwm, incidentManagementSeatsHwm, indexedEventsCountSum, + indexedPointsSum, + infraCpuAvg, + infraCpuDefaultInfraHostVcpuAgentAvg, + infraCpuDefaultInfraHostVcpuAgentBasicAvg, + infraCpuDefaultInfraHostVcpuAgentBasicSum, + infraCpuDefaultInfraHostVcpuAgentSum, + infraCpuDefaultInfraHostVcpuAwsAvg, + infraCpuDefaultInfraHostVcpuAwsSum, + infraCpuDefaultInfraHostVcpuAzureAvg, + infraCpuDefaultInfraHostVcpuAzureSum, + infraCpuDefaultInfraHostVcpuGcpAvg, + infraCpuDefaultInfraHostVcpuGcpSum, + infraCpuDefaultInfraHostVcpuNutanixAvg, + infraCpuDefaultInfraHostVcpuNutanixBasicAvg, + infraCpuDefaultInfraHostVcpuNutanixBasicSum, + infraCpuDefaultInfraHostVcpuNutanixSum, + infraCpuDefaultInfraHostVcpuOpentelemetryAvg, + infraCpuDefaultInfraHostVcpuOpentelemetrySum, + infraCpuObservedInfraHostVcpuAgentAvg, + infraCpuObservedInfraHostVcpuAgentSum, + infraCpuObservedInfraHostVcpuAwsAvg, + infraCpuObservedInfraHostVcpuAwsSum, + infraCpuObservedInfraHostVcpuAzureAvg, + infraCpuObservedInfraHostVcpuAzureSum, + infraCpuObservedInfraHostVcpuGcpAvg, + infraCpuObservedInfraHostVcpuGcpSum, + infraCpuObservedInfraHostVcpuNutanixAvg, + infraCpuObservedInfraHostVcpuNutanixSum, + infraCpuObservedInfraHostVcpuOpentelemetryAvg, + infraCpuObservedInfraHostVcpuOpentelemetrySum, + infraCpuSum, infraEdgeMonitoringDevicesTop99p, infraHostBasicInfraBasicAgentTop99p, infraHostBasicInfraBasicVsphereTop99p, infraHostBasicTop99p, infraHostTop99p, infraStorageMgmtObjectsCountAvg, + ingestPointsSum, ingestedEventsBytesSum, + iotApmHostSum, + iotApmHostTop99p, iotDeviceSum, iotDeviceTop99p, + llmObservability15dayRetentionSpansSum, + llmObservability30dayRetentionSpansSum, + llmObservability60dayRetentionSpansSum, + llmObservability90dayRetentionSpansSum, llmObservabilityMinSpendSum, llmObservabilitySum, + logsArchiveSearchGbScannedSum, + metricNamesSum, mobileRumLiteSessionCountSum, mobileRumSessionCountAndroidSum, mobileRumSessionCountFlutterSum, @@ -7688,6 +9299,8 @@ public int hashCode() { siem12moRetentionSum, siem6moRetentionSum, siemAnalyzedLogsAddOnCountSum, + snmpDeviceCountSum, + snmpDeviceCountTop99p, syntheticsBrowserCheckCallsCountSum, syntheticsCheckCallsCountSum, syntheticsMobileTestRunsSum, @@ -7706,6 +9319,19 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UsageSummaryDate {\n"); sb.append(" agentHostTop99p: ").append(toIndentedString(agentHostTop99p)).append("\n"); + sb.append(" aiCreditsAgentBuilderAiCreditsSum: ") + .append(toIndentedString(aiCreditsAgentBuilderAiCreditsSum)) + .append("\n"); + sb.append(" aiCreditsBitsAssistantAiCreditsSum: ") + .append(toIndentedString(aiCreditsBitsAssistantAiCreditsSum)) + .append("\n"); + sb.append(" aiCreditsBitsDevAiCreditsSum: ") + .append(toIndentedString(aiCreditsBitsDevAiCreditsSum)) + .append("\n"); + sb.append(" aiCreditsBitsSreAiCreditsSum: ") + .append(toIndentedString(aiCreditsBitsSreAiCreditsSum)) + .append("\n"); + sb.append(" aiCreditsSum: ").append(toIndentedString(aiCreditsSum)).append("\n"); sb.append(" apmAzureAppServiceHostTop99p: ") .append(toIndentedString(apmAzureAppServiceHostTop99p)) .append("\n"); @@ -7730,6 +9356,9 @@ public String toString() { sb.append(" auditTrailEnabledHwm: ") .append(toIndentedString(auditTrailEnabledHwm)) .append("\n"); + sb.append(" auditTrailEventForwardingEventsSum: ") + .append(toIndentedString(auditTrailEventForwardingEventsSum)) + .append("\n"); sb.append(" avgProfiledFargateTasks: ") .append(toIndentedString(avgProfiledFargateTasks)) .append("\n"); @@ -7900,6 +9529,12 @@ public String toString() { sb.append(" dataJobsMonitoringHostHrSum: ") .append(toIndentedString(dataJobsMonitoringHostHrSum)) .append("\n"); + sb.append(" dataStreamMonitoringHostCountSum: ") + .append(toIndentedString(dataStreamMonitoringHostCountSum)) + .append("\n"); + sb.append(" dataStreamMonitoringHostCountTop99p: ") + .append(toIndentedString(dataStreamMonitoringHostCountTop99p)) + .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"); @@ -8022,6 +9657,93 @@ public String toString() { sb.append(" indexedEventsCountSum: ") .append(toIndentedString(indexedEventsCountSum)) .append("\n"); + sb.append(" indexedPointsSum: ").append(toIndentedString(indexedPointsSum)).append("\n"); + sb.append(" infraCpuAvg: ").append(toIndentedString(infraCpuAvg)).append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuAgentAvg: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuAgentAvg)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuAgentBasicAvg: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuAgentBasicAvg)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuAgentBasicSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuAgentBasicSum)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuAgentSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuAgentSum)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuAwsAvg: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuAwsAvg)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuAwsSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuAwsSum)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuAzureAvg: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuAzureAvg)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuAzureSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuAzureSum)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuGcpAvg: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuGcpAvg)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuGcpSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuGcpSum)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuNutanixAvg: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuNutanixAvg)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuNutanixBasicAvg: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuNutanixBasicAvg)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuNutanixBasicSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuNutanixBasicSum)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuNutanixSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuNutanixSum)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuOpentelemetryAvg: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuOpentelemetryAvg)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuOpentelemetrySum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuOpentelemetrySum)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuAgentAvg: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuAgentAvg)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuAgentSum: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuAgentSum)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuAwsAvg: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuAwsAvg)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuAwsSum: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuAwsSum)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuAzureAvg: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuAzureAvg)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuAzureSum: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuAzureSum)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuGcpAvg: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuGcpAvg)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuGcpSum: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuGcpSum)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuNutanixAvg: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuNutanixAvg)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuNutanixSum: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuNutanixSum)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuOpentelemetryAvg: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuOpentelemetryAvg)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuOpentelemetrySum: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuOpentelemetrySum)) + .append("\n"); + sb.append(" infraCpuSum: ").append(toIndentedString(infraCpuSum)).append("\n"); sb.append(" infraEdgeMonitoringDevicesTop99p: ") .append(toIndentedString(infraEdgeMonitoringDevicesTop99p)) .append("\n"); @@ -8038,17 +9760,36 @@ public String toString() { sb.append(" infraStorageMgmtObjectsCountAvg: ") .append(toIndentedString(infraStorageMgmtObjectsCountAvg)) .append("\n"); + sb.append(" ingestPointsSum: ").append(toIndentedString(ingestPointsSum)).append("\n"); sb.append(" ingestedEventsBytesSum: ") .append(toIndentedString(ingestedEventsBytesSum)) .append("\n"); + sb.append(" iotApmHostSum: ").append(toIndentedString(iotApmHostSum)).append("\n"); + sb.append(" iotApmHostTop99p: ").append(toIndentedString(iotApmHostTop99p)).append("\n"); sb.append(" iotDeviceSum: ").append(toIndentedString(iotDeviceSum)).append("\n"); sb.append(" iotDeviceTop99p: ").append(toIndentedString(iotDeviceTop99p)).append("\n"); + sb.append(" llmObservability15dayRetentionSpansSum: ") + .append(toIndentedString(llmObservability15dayRetentionSpansSum)) + .append("\n"); + sb.append(" llmObservability30dayRetentionSpansSum: ") + .append(toIndentedString(llmObservability30dayRetentionSpansSum)) + .append("\n"); + sb.append(" llmObservability60dayRetentionSpansSum: ") + .append(toIndentedString(llmObservability60dayRetentionSpansSum)) + .append("\n"); + sb.append(" llmObservability90dayRetentionSpansSum: ") + .append(toIndentedString(llmObservability90dayRetentionSpansSum)) + .append("\n"); sb.append(" llmObservabilityMinSpendSum: ") .append(toIndentedString(llmObservabilityMinSpendSum)) .append("\n"); sb.append(" llmObservabilitySum: ") .append(toIndentedString(llmObservabilitySum)) .append("\n"); + sb.append(" logsArchiveSearchGbScannedSum: ") + .append(toIndentedString(logsArchiveSearchGbScannedSum)) + .append("\n"); + sb.append(" metricNamesSum: ").append(toIndentedString(metricNamesSum)).append("\n"); sb.append(" mobileRumLiteSessionCountSum: ") .append(toIndentedString(mobileRumLiteSessionCountSum)) .append("\n"); @@ -8318,6 +10059,10 @@ public String toString() { sb.append(" siemAnalyzedLogsAddOnCountSum: ") .append(toIndentedString(siemAnalyzedLogsAddOnCountSum)) .append("\n"); + sb.append(" snmpDeviceCountSum: ").append(toIndentedString(snmpDeviceCountSum)).append("\n"); + sb.append(" snmpDeviceCountTop99p: ") + .append(toIndentedString(snmpDeviceCountTop99p)) + .append("\n"); sb.append(" syntheticsBrowserCheckCallsCountSum: ") .append(toIndentedString(syntheticsBrowserCheckCallsCountSum)) .append("\n"); 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 d78a52697e5..adcf43d0aa1 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 @@ -16,11 +16,23 @@ import java.util.Map; import java.util.Objects; -/** 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. + * + *

Newly added billing dimensions and usage types appear as untyped keys on the + * additionalProperties map instead of as typed fields. Call + * GET /api/v2/usage/summary/available_fields to enumerate every key returned at this + * response level—both typed fields and additionalProperties keys. + */ @JsonPropertyOrder({ UsageSummaryDateOrg.JSON_PROPERTY_ACCOUNT_NAME, UsageSummaryDateOrg.JSON_PROPERTY_ACCOUNT_PUBLIC_ID, UsageSummaryDateOrg.JSON_PROPERTY_AGENT_HOST_TOP99P, + UsageSummaryDateOrg.JSON_PROPERTY_AI_CREDITS_AGENT_BUILDER_AI_CREDITS_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_AI_CREDITS_BITS_ASSISTANT_AI_CREDITS_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_AI_CREDITS_BITS_DEV_AI_CREDITS_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_AI_CREDITS_BITS_SRE_AI_CREDITS_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_AI_CREDITS_SUM, UsageSummaryDateOrg.JSON_PROPERTY_APM_AZURE_APP_SERVICE_HOST_TOP99P, UsageSummaryDateOrg.JSON_PROPERTY_APM_DEVSECOPS_HOST_TOP99P, UsageSummaryDateOrg.JSON_PROPERTY_APM_ENTERPRISE_STANDALONE_HOSTS_TOP99P, @@ -31,6 +43,7 @@ UsageSummaryDateOrg.JSON_PROPERTY_ASM_SERVERLESS_SUM, UsageSummaryDateOrg.JSON_PROPERTY_AUDIT_LOGS_LINES_INDEXED_SUM, UsageSummaryDateOrg.JSON_PROPERTY_AUDIT_TRAIL_ENABLED_HWM, + UsageSummaryDateOrg.JSON_PROPERTY_AUDIT_TRAIL_EVENT_FORWARDING_EVENTS_SUM, UsageSummaryDateOrg.JSON_PROPERTY_AVG_PROFILED_FARGATE_TASKS, UsageSummaryDateOrg.JSON_PROPERTY_AWS_HOST_TOP99P, UsageSummaryDateOrg.JSON_PROPERTY_AWS_LAMBDA_FUNC_COUNT, @@ -105,6 +118,8 @@ UsageSummaryDateOrg.JSON_PROPERTY_CWS_FARGATE_TASK_AVG, UsageSummaryDateOrg.JSON_PROPERTY_CWS_HOST_TOP99P, UsageSummaryDateOrg.JSON_PROPERTY_DATA_JOBS_MONITORING_HOST_HR_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_DATA_STREAM_MONITORING_HOST_COUNT_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_DATA_STREAM_MONITORING_HOST_COUNT_TOP99P, UsageSummaryDateOrg.JSON_PROPERTY_DBM_HOST_TOP99P_SUM, UsageSummaryDateOrg.JSON_PROPERTY_DBM_QUERIES_AVG_SUM, UsageSummaryDateOrg.JSON_PROPERTY_DO_JOBS_MONITORING_ORCHESTRATORS_JOB_HOURS_SUM, @@ -153,17 +168,57 @@ UsageSummaryDateOrg.JSON_PROPERTY_INCIDENT_MANAGEMENT_MONTHLY_ACTIVE_USERS_HWM, UsageSummaryDateOrg.JSON_PROPERTY_INCIDENT_MANAGEMENT_SEATS_HWM, UsageSummaryDateOrg.JSON_PROPERTY_INDEXED_EVENTS_COUNT_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_INDEXED_POINTS_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_AVG, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_AVG, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_BASIC_AVG, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_BASIC_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AWS_AVG, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AWS_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AZURE_AVG, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AZURE_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_GCP_AVG, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_GCP_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_AVG, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_BASIC_AVG, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_BASIC_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_OPENTELEMETRY_AVG, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_OPENTELEMETRY_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AGENT_AVG, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AGENT_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AWS_AVG, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AWS_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AZURE_AVG, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AZURE_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_GCP_AVG, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_GCP_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_NUTANIX_AVG, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_NUTANIX_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_OPENTELEMETRY_AVG, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_OPENTELEMETRY_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_INFRA_CPU_SUM, UsageSummaryDateOrg.JSON_PROPERTY_INFRA_EDGE_MONITORING_DEVICES_TOP99P, UsageSummaryDateOrg.JSON_PROPERTY_INFRA_HOST_BASIC_INFRA_BASIC_AGENT_TOP99P, UsageSummaryDateOrg.JSON_PROPERTY_INFRA_HOST_BASIC_INFRA_BASIC_VSPHERE_TOP99P, UsageSummaryDateOrg.JSON_PROPERTY_INFRA_HOST_BASIC_TOP99P, UsageSummaryDateOrg.JSON_PROPERTY_INFRA_HOST_TOP99P, UsageSummaryDateOrg.JSON_PROPERTY_INFRA_STORAGE_MGMT_OBJECTS_COUNT_AVG, + UsageSummaryDateOrg.JSON_PROPERTY_INGEST_POINTS_SUM, UsageSummaryDateOrg.JSON_PROPERTY_INGESTED_EVENTS_BYTES_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_IOT_APM_HOST_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_IOT_APM_HOST_TOP99P, UsageSummaryDateOrg.JSON_PROPERTY_IOT_DEVICE_AGG_SUM, UsageSummaryDateOrg.JSON_PROPERTY_IOT_DEVICE_TOP99P_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_LLM_OBSERVABILITY_15DAY_RETENTION_SPANS_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_LLM_OBSERVABILITY_30DAY_RETENTION_SPANS_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_LLM_OBSERVABILITY_60DAY_RETENTION_SPANS_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_LLM_OBSERVABILITY_90DAY_RETENTION_SPANS_SUM, UsageSummaryDateOrg.JSON_PROPERTY_LLM_OBSERVABILITY_MIN_SPEND_SUM, UsageSummaryDateOrg.JSON_PROPERTY_LLM_OBSERVABILITY_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_LOGS_ARCHIVE_SEARCH_GB_SCANNED_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_METRIC_NAMES_SUM, UsageSummaryDateOrg.JSON_PROPERTY_MOBILE_RUM_LITE_SESSION_COUNT_SUM, UsageSummaryDateOrg.JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_ANDROID_SUM, UsageSummaryDateOrg.JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_FLUTTER_SUM, @@ -270,6 +325,8 @@ UsageSummaryDateOrg.JSON_PROPERTY_SIEM_12MO_RETENTION_SUM, UsageSummaryDateOrg.JSON_PROPERTY_SIEM_6MO_RETENTION_SUM, UsageSummaryDateOrg.JSON_PROPERTY_SIEM_ANALYZED_LOGS_ADD_ON_COUNT_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_SNMP_DEVICE_COUNT_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_SNMP_DEVICE_COUNT_TOP99P, UsageSummaryDateOrg.JSON_PROPERTY_SYNTHETICS_BROWSER_CHECK_CALLS_COUNT_SUM, UsageSummaryDateOrg.JSON_PROPERTY_SYNTHETICS_CHECK_CALLS_COUNT_SUM, UsageSummaryDateOrg.JSON_PROPERTY_SYNTHETICS_MOBILE_TEST_RUNS_SUM, @@ -294,6 +351,25 @@ public class UsageSummaryDateOrg { public static final String JSON_PROPERTY_AGENT_HOST_TOP99P = "agent_host_top99p"; private Long agentHostTop99p; + public static final String JSON_PROPERTY_AI_CREDITS_AGENT_BUILDER_AI_CREDITS_SUM = + "ai_credits_agent_builder_ai_credits_sum"; + private Long aiCreditsAgentBuilderAiCreditsSum; + + public static final String JSON_PROPERTY_AI_CREDITS_BITS_ASSISTANT_AI_CREDITS_SUM = + "ai_credits_bits_assistant_ai_credits_sum"; + private Long aiCreditsBitsAssistantAiCreditsSum; + + public static final String JSON_PROPERTY_AI_CREDITS_BITS_DEV_AI_CREDITS_SUM = + "ai_credits_bits_dev_ai_credits_sum"; + private Long aiCreditsBitsDevAiCreditsSum; + + public static final String JSON_PROPERTY_AI_CREDITS_BITS_SRE_AI_CREDITS_SUM = + "ai_credits_bits_sre_ai_credits_sum"; + private Long aiCreditsBitsSreAiCreditsSum; + + public static final String JSON_PROPERTY_AI_CREDITS_SUM = "ai_credits_sum"; + private Long aiCreditsSum; + public static final String JSON_PROPERTY_APM_AZURE_APP_SERVICE_HOST_TOP99P = "apm_azure_app_service_host_top99p"; private Long apmAzureAppServiceHostTop99p; @@ -328,6 +404,10 @@ public class UsageSummaryDateOrg { public static final String JSON_PROPERTY_AUDIT_TRAIL_ENABLED_HWM = "audit_trail_enabled_hwm"; private Long auditTrailEnabledHwm; + public static final String JSON_PROPERTY_AUDIT_TRAIL_EVENT_FORWARDING_EVENTS_SUM = + "audit_trail_event_forwarding_events_sum"; + private Long auditTrailEventForwardingEventsSum; + public static final String JSON_PROPERTY_AVG_PROFILED_FARGATE_TASKS = "avg_profiled_fargate_tasks"; private Long avgProfiledFargateTasks; @@ -587,6 +667,14 @@ public class UsageSummaryDateOrg { "data_jobs_monitoring_host_hr_sum"; private Long dataJobsMonitoringHostHrSum; + public static final String JSON_PROPERTY_DATA_STREAM_MONITORING_HOST_COUNT_SUM = + "data_stream_monitoring_host_count_sum"; + private Long dataStreamMonitoringHostCountSum; + + public static final String JSON_PROPERTY_DATA_STREAM_MONITORING_HOST_COUNT_TOP99P = + "data_stream_monitoring_host_count_top99p"; + private Long dataStreamMonitoringHostCountTop99p; + public static final String JSON_PROPERTY_DBM_HOST_TOP99P_SUM = "dbm_host_top99p_sum"; private Long dbmHostTop99pSum; @@ -761,6 +849,127 @@ public class UsageSummaryDateOrg { public static final String JSON_PROPERTY_INDEXED_EVENTS_COUNT_SUM = "indexed_events_count_sum"; private Long indexedEventsCountSum; + public static final String JSON_PROPERTY_INDEXED_POINTS_SUM = "indexed_points_sum"; + private Long indexedPointsSum; + + public static final String JSON_PROPERTY_INFRA_CPU_AVG = "infra_cpu_avg"; + private Long infraCpuAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_AVG = + "infra_cpu_default_infra_host_vcpu_agent_avg"; + private Long infraCpuDefaultInfraHostVcpuAgentAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_BASIC_AVG = + "infra_cpu_default_infra_host_vcpu_agent_basic_avg"; + private Long infraCpuDefaultInfraHostVcpuAgentBasicAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_BASIC_SUM = + "infra_cpu_default_infra_host_vcpu_agent_basic_sum"; + private Long infraCpuDefaultInfraHostVcpuAgentBasicSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_SUM = + "infra_cpu_default_infra_host_vcpu_agent_sum"; + private Long infraCpuDefaultInfraHostVcpuAgentSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AWS_AVG = + "infra_cpu_default_infra_host_vcpu_aws_avg"; + private Long infraCpuDefaultInfraHostVcpuAwsAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AWS_SUM = + "infra_cpu_default_infra_host_vcpu_aws_sum"; + private Long infraCpuDefaultInfraHostVcpuAwsSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AZURE_AVG = + "infra_cpu_default_infra_host_vcpu_azure_avg"; + private Long infraCpuDefaultInfraHostVcpuAzureAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AZURE_SUM = + "infra_cpu_default_infra_host_vcpu_azure_sum"; + private Long infraCpuDefaultInfraHostVcpuAzureSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_GCP_AVG = + "infra_cpu_default_infra_host_vcpu_gcp_avg"; + private Long infraCpuDefaultInfraHostVcpuGcpAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_GCP_SUM = + "infra_cpu_default_infra_host_vcpu_gcp_sum"; + private Long infraCpuDefaultInfraHostVcpuGcpSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_AVG = + "infra_cpu_default_infra_host_vcpu_nutanix_avg"; + private Long infraCpuDefaultInfraHostVcpuNutanixAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_BASIC_AVG = + "infra_cpu_default_infra_host_vcpu_nutanix_basic_avg"; + private Long infraCpuDefaultInfraHostVcpuNutanixBasicAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_BASIC_SUM = + "infra_cpu_default_infra_host_vcpu_nutanix_basic_sum"; + private Long infraCpuDefaultInfraHostVcpuNutanixBasicSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_SUM = + "infra_cpu_default_infra_host_vcpu_nutanix_sum"; + private Long infraCpuDefaultInfraHostVcpuNutanixSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_OPENTELEMETRY_AVG = + "infra_cpu_default_infra_host_vcpu_opentelemetry_avg"; + private Long infraCpuDefaultInfraHostVcpuOpentelemetryAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_OPENTELEMETRY_SUM = + "infra_cpu_default_infra_host_vcpu_opentelemetry_sum"; + private Long infraCpuDefaultInfraHostVcpuOpentelemetrySum; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AGENT_AVG = + "infra_cpu_observed_infra_host_vcpu_agent_avg"; + private Long infraCpuObservedInfraHostVcpuAgentAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AGENT_SUM = + "infra_cpu_observed_infra_host_vcpu_agent_sum"; + private Long infraCpuObservedInfraHostVcpuAgentSum; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AWS_AVG = + "infra_cpu_observed_infra_host_vcpu_aws_avg"; + private Long infraCpuObservedInfraHostVcpuAwsAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AWS_SUM = + "infra_cpu_observed_infra_host_vcpu_aws_sum"; + private Long infraCpuObservedInfraHostVcpuAwsSum; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AZURE_AVG = + "infra_cpu_observed_infra_host_vcpu_azure_avg"; + private Long infraCpuObservedInfraHostVcpuAzureAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AZURE_SUM = + "infra_cpu_observed_infra_host_vcpu_azure_sum"; + private Long infraCpuObservedInfraHostVcpuAzureSum; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_GCP_AVG = + "infra_cpu_observed_infra_host_vcpu_gcp_avg"; + private Long infraCpuObservedInfraHostVcpuGcpAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_GCP_SUM = + "infra_cpu_observed_infra_host_vcpu_gcp_sum"; + private Long infraCpuObservedInfraHostVcpuGcpSum; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_NUTANIX_AVG = + "infra_cpu_observed_infra_host_vcpu_nutanix_avg"; + private Long infraCpuObservedInfraHostVcpuNutanixAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_NUTANIX_SUM = + "infra_cpu_observed_infra_host_vcpu_nutanix_sum"; + private Long infraCpuObservedInfraHostVcpuNutanixSum; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_OPENTELEMETRY_AVG = + "infra_cpu_observed_infra_host_vcpu_opentelemetry_avg"; + private Long infraCpuObservedInfraHostVcpuOpentelemetryAvg; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_OPENTELEMETRY_SUM = + "infra_cpu_observed_infra_host_vcpu_opentelemetry_sum"; + private Long infraCpuObservedInfraHostVcpuOpentelemetrySum; + + public static final String JSON_PROPERTY_INFRA_CPU_SUM = "infra_cpu_sum"; + private Long infraCpuSum; + public static final String JSON_PROPERTY_INFRA_EDGE_MONITORING_DEVICES_TOP99P = "infra_edge_monitoring_devices_top99p"; private Long infraEdgeMonitoringDevicesTop99p; @@ -783,15 +992,40 @@ public class UsageSummaryDateOrg { "infra_storage_mgmt_objects_count_avg"; private Long infraStorageMgmtObjectsCountAvg; + public static final String JSON_PROPERTY_INGEST_POINTS_SUM = "ingest_points_sum"; + private Long ingestPointsSum; + public static final String JSON_PROPERTY_INGESTED_EVENTS_BYTES_SUM = "ingested_events_bytes_sum"; private Long ingestedEventsBytesSum; + public static final String JSON_PROPERTY_IOT_APM_HOST_SUM = "iot_apm_host_sum"; + private Long iotApmHostSum; + + public static final String JSON_PROPERTY_IOT_APM_HOST_TOP99P = "iot_apm_host_top99p"; + private Long iotApmHostTop99p; + public static final String JSON_PROPERTY_IOT_DEVICE_AGG_SUM = "iot_device_agg_sum"; private Long iotDeviceAggSum; public static final String JSON_PROPERTY_IOT_DEVICE_TOP99P_SUM = "iot_device_top99p_sum"; private Long iotDeviceTop99pSum; + public static final String JSON_PROPERTY_LLM_OBSERVABILITY_15DAY_RETENTION_SPANS_SUM = + "llm_observability_15day_retention_spans_sum"; + private Long llmObservability15dayRetentionSpansSum; + + public static final String JSON_PROPERTY_LLM_OBSERVABILITY_30DAY_RETENTION_SPANS_SUM = + "llm_observability_30day_retention_spans_sum"; + private Long llmObservability30dayRetentionSpansSum; + + public static final String JSON_PROPERTY_LLM_OBSERVABILITY_60DAY_RETENTION_SPANS_SUM = + "llm_observability_60day_retention_spans_sum"; + private Long llmObservability60dayRetentionSpansSum; + + public static final String JSON_PROPERTY_LLM_OBSERVABILITY_90DAY_RETENTION_SPANS_SUM = + "llm_observability_90day_retention_spans_sum"; + private Long llmObservability90dayRetentionSpansSum; + public static final String JSON_PROPERTY_LLM_OBSERVABILITY_MIN_SPEND_SUM = "llm_observability_min_spend_sum"; private Long llmObservabilityMinSpendSum; @@ -799,6 +1033,13 @@ public class UsageSummaryDateOrg { public static final String JSON_PROPERTY_LLM_OBSERVABILITY_SUM = "llm_observability_sum"; private Long llmObservabilitySum; + public static final String JSON_PROPERTY_LOGS_ARCHIVE_SEARCH_GB_SCANNED_SUM = + "logs_archive_search_gb_scanned_sum"; + private Long logsArchiveSearchGbScannedSum; + + public static final String JSON_PROPERTY_METRIC_NAMES_SUM = "metric_names_sum"; + private Long metricNamesSum; + public static final String JSON_PROPERTY_MOBILE_RUM_LITE_SESSION_COUNT_SUM = "mobile_rum_lite_session_count_sum"; private Long mobileRumLiteSessionCountSum; @@ -1188,6 +1429,12 @@ public class UsageSummaryDateOrg { "siem_analyzed_logs_add_on_count_sum"; private Long siemAnalyzedLogsAddOnCountSum; + public static final String JSON_PROPERTY_SNMP_DEVICE_COUNT_SUM = "snmp_device_count_sum"; + private Long snmpDeviceCountSum; + + public static final String JSON_PROPERTY_SNMP_DEVICE_COUNT_TOP99P = "snmp_device_count_top99p"; + private Long snmpDeviceCountTop99p; + public static final String JSON_PROPERTY_SYNTHETICS_BROWSER_CHECK_CALLS_COUNT_SUM = "synthetics_browser_check_calls_count_sum"; private Long syntheticsBrowserCheckCallsCountSum; @@ -1291,6 +1538,118 @@ public void setAgentHostTop99p(Long agentHostTop99p) { this.agentHostTop99p = agentHostTop99p; } + public UsageSummaryDateOrg aiCreditsAgentBuilderAiCreditsSum( + Long aiCreditsAgentBuilderAiCreditsSum) { + this.aiCreditsAgentBuilderAiCreditsSum = aiCreditsAgentBuilderAiCreditsSum; + return this; + } + + /** + * Shows the sum of all AI credits used by Agent Builder over all hours in the current date for + * the given org. Values are returned in micro-credits. Divide by 1,000,000 to get AI credits. + * + * @return aiCreditsAgentBuilderAiCreditsSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AI_CREDITS_AGENT_BUILDER_AI_CREDITS_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getAiCreditsAgentBuilderAiCreditsSum() { + return aiCreditsAgentBuilderAiCreditsSum; + } + + public void setAiCreditsAgentBuilderAiCreditsSum(Long aiCreditsAgentBuilderAiCreditsSum) { + this.aiCreditsAgentBuilderAiCreditsSum = aiCreditsAgentBuilderAiCreditsSum; + } + + public UsageSummaryDateOrg aiCreditsBitsAssistantAiCreditsSum( + Long aiCreditsBitsAssistantAiCreditsSum) { + this.aiCreditsBitsAssistantAiCreditsSum = aiCreditsBitsAssistantAiCreditsSum; + return this; + } + + /** + * Shows the sum of all AI credits used by Bits AI Assistant over all hours in the current date + * for the given org. Values are returned in micro-credits. Divide by 1,000,000 to get AI credits. + * + * @return aiCreditsBitsAssistantAiCreditsSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AI_CREDITS_BITS_ASSISTANT_AI_CREDITS_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getAiCreditsBitsAssistantAiCreditsSum() { + return aiCreditsBitsAssistantAiCreditsSum; + } + + public void setAiCreditsBitsAssistantAiCreditsSum(Long aiCreditsBitsAssistantAiCreditsSum) { + this.aiCreditsBitsAssistantAiCreditsSum = aiCreditsBitsAssistantAiCreditsSum; + } + + public UsageSummaryDateOrg aiCreditsBitsDevAiCreditsSum(Long aiCreditsBitsDevAiCreditsSum) { + this.aiCreditsBitsDevAiCreditsSum = aiCreditsBitsDevAiCreditsSum; + return this; + } + + /** + * Shows the sum of all AI credits used by Bits AI Dev over all hours in the current date for the + * given org. Values are returned in micro-credits. Divide by 1,000,000 to get AI credits. + * + * @return aiCreditsBitsDevAiCreditsSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AI_CREDITS_BITS_DEV_AI_CREDITS_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getAiCreditsBitsDevAiCreditsSum() { + return aiCreditsBitsDevAiCreditsSum; + } + + public void setAiCreditsBitsDevAiCreditsSum(Long aiCreditsBitsDevAiCreditsSum) { + this.aiCreditsBitsDevAiCreditsSum = aiCreditsBitsDevAiCreditsSum; + } + + public UsageSummaryDateOrg aiCreditsBitsSreAiCreditsSum(Long aiCreditsBitsSreAiCreditsSum) { + this.aiCreditsBitsSreAiCreditsSum = aiCreditsBitsSreAiCreditsSum; + return this; + } + + /** + * Shows the sum of all AI credits used by Bits AI SRE over all hours in the current date for the + * given org. Values are returned in micro-credits. Divide by 1,000,000 to get AI credits. + * + * @return aiCreditsBitsSreAiCreditsSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AI_CREDITS_BITS_SRE_AI_CREDITS_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getAiCreditsBitsSreAiCreditsSum() { + return aiCreditsBitsSreAiCreditsSum; + } + + public void setAiCreditsBitsSreAiCreditsSum(Long aiCreditsBitsSreAiCreditsSum) { + this.aiCreditsBitsSreAiCreditsSum = aiCreditsBitsSreAiCreditsSum; + } + + public UsageSummaryDateOrg aiCreditsSum(Long aiCreditsSum) { + this.aiCreditsSum = aiCreditsSum; + return this; + } + + /** + * Shows the sum of all AI credits over all hours in the current date for the given org. Values + * are returned in micro-credits. Divide by 1,000,000 to get AI credits. + * + * @return aiCreditsSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AI_CREDITS_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getAiCreditsSum() { + return aiCreditsSum; + } + + public void setAiCreditsSum(Long aiCreditsSum) { + this.aiCreditsSum = aiCreditsSum; + } + public UsageSummaryDateOrg apmAzureAppServiceHostTop99p(Long apmAzureAppServiceHostTop99p) { this.apmAzureAppServiceHostTop99p = apmAzureAppServiceHostTop99p; return this; @@ -1514,6 +1873,29 @@ public void setAuditTrailEnabledHwm(Long auditTrailEnabledHwm) { this.auditTrailEnabledHwm = auditTrailEnabledHwm; } + public UsageSummaryDateOrg auditTrailEventForwardingEventsSum( + Long auditTrailEventForwardingEventsSum) { + this.auditTrailEventForwardingEventsSum = auditTrailEventForwardingEventsSum; + return this; + } + + /** + * Shows the sum of all Audit Trail event forwarding events over all hours in the current date for + * the given org. + * + * @return auditTrailEventForwardingEventsSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUDIT_TRAIL_EVENT_FORWARDING_EVENTS_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getAuditTrailEventForwardingEventsSum() { + return auditTrailEventForwardingEventsSum; + } + + public void setAuditTrailEventForwardingEventsSum(Long auditTrailEventForwardingEventsSum) { + this.auditTrailEventForwardingEventsSum = auditTrailEventForwardingEventsSum; + } + public UsageSummaryDateOrg avgProfiledFargateTasks(Long avgProfiledFargateTasks) { this.avgProfiledFargateTasks = avgProfiledFargateTasks; return this; @@ -3165,6 +3547,52 @@ public void setDataJobsMonitoringHostHrSum(Long dataJobsMonitoringHostHrSum) { this.dataJobsMonitoringHostHrSum = dataJobsMonitoringHostHrSum; } + public UsageSummaryDateOrg dataStreamMonitoringHostCountSum( + Long dataStreamMonitoringHostCountSum) { + this.dataStreamMonitoringHostCountSum = dataStreamMonitoringHostCountSum; + return this; + } + + /** + * Shows the sum of all Data Streams Monitoring hosts over all hours in the current date for the + * given org. + * + * @return dataStreamMonitoringHostCountSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA_STREAM_MONITORING_HOST_COUNT_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getDataStreamMonitoringHostCountSum() { + return dataStreamMonitoringHostCountSum; + } + + public void setDataStreamMonitoringHostCountSum(Long dataStreamMonitoringHostCountSum) { + this.dataStreamMonitoringHostCountSum = dataStreamMonitoringHostCountSum; + } + + public UsageSummaryDateOrg dataStreamMonitoringHostCountTop99p( + Long dataStreamMonitoringHostCountTop99p) { + this.dataStreamMonitoringHostCountTop99p = dataStreamMonitoringHostCountTop99p; + return this; + } + + /** + * Shows the 99th percentile of all Data Streams Monitoring hosts over all hours in the current + * date for the given org. + * + * @return dataStreamMonitoringHostCountTop99p + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA_STREAM_MONITORING_HOST_COUNT_TOP99P) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getDataStreamMonitoringHostCountTop99p() { + return dataStreamMonitoringHostCountTop99p; + } + + public void setDataStreamMonitoringHostCountTop99p(Long dataStreamMonitoringHostCountTop99p) { + this.dataStreamMonitoringHostCountTop99p = dataStreamMonitoringHostCountTop99p; + } + public UsageSummaryDateOrg dbmHostTop99pSum(Long dbmHostTop99pSum) { this.dbmHostTop99pSum = dbmHostTop99pSum; return this; @@ -3217,7 +3645,7 @@ public UsageSummaryDateOrg doJobsMonitoringOrchestratorsJobHoursSum( /** * Shows the sum of all orchestrator job hours over all hours in the current date for the given - * org. + * org. Values are returned in seconds. Divide by 3,600 to convert to hours. * * @return doJobsMonitoringOrchestratorsJobHoursSum */ @@ -4244,234 +4672,1154 @@ public void setIndexedEventsCountSum(Long indexedEventsCountSum) { this.indexedEventsCountSum = indexedEventsCountSum; } - public UsageSummaryDateOrg infraEdgeMonitoringDevicesTop99p( - Long infraEdgeMonitoringDevicesTop99p) { - this.infraEdgeMonitoringDevicesTop99p = infraEdgeMonitoringDevicesTop99p; + public UsageSummaryDateOrg indexedPointsSum(Long indexedPointsSum) { + this.indexedPointsSum = indexedPointsSum; return this; } /** - * Shows the 99th percentile of all Edge Devices Monitoring devices over all hours in the current - * date for the given org. + * Shows the sum of all indexed custom metrics points over all hours in the current date for the + * given org. * - * @return infraEdgeMonitoringDevicesTop99p + * @return indexedPointsSum */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INFRA_EDGE_MONITORING_DEVICES_TOP99P) + @JsonProperty(JSON_PROPERTY_INDEXED_POINTS_SUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInfraEdgeMonitoringDevicesTop99p() { - return infraEdgeMonitoringDevicesTop99p; + public Long getIndexedPointsSum() { + return indexedPointsSum; } - public void setInfraEdgeMonitoringDevicesTop99p(Long infraEdgeMonitoringDevicesTop99p) { - this.infraEdgeMonitoringDevicesTop99p = infraEdgeMonitoringDevicesTop99p; + public void setIndexedPointsSum(Long indexedPointsSum) { + this.indexedPointsSum = indexedPointsSum; } - public UsageSummaryDateOrg infraHostBasicInfraBasicAgentTop99p( - Long infraHostBasicInfraBasicAgentTop99p) { - this.infraHostBasicInfraBasicAgentTop99p = infraHostBasicInfraBasicAgentTop99p; + public UsageSummaryDateOrg infraCpuAvg(Long infraCpuAvg) { + this.infraCpuAvg = infraCpuAvg; return this; } /** - * Shows the 99th percentile of all distinct infrastructure hosts for Basic tier with the Datadog - * Agent over all hours in the current date for the given org. + * Shows the average of all Infrastructure vCPU cores over all hours in the current date for the + * given org. Values are returned in millicores. Divide by 1,000 to convert to cores. * - * @return infraHostBasicInfraBasicAgentTop99p + * @return infraCpuAvg */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INFRA_HOST_BASIC_INFRA_BASIC_AGENT_TOP99P) + @JsonProperty(JSON_PROPERTY_INFRA_CPU_AVG) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInfraHostBasicInfraBasicAgentTop99p() { - return infraHostBasicInfraBasicAgentTop99p; + public Long getInfraCpuAvg() { + return infraCpuAvg; } - public void setInfraHostBasicInfraBasicAgentTop99p(Long infraHostBasicInfraBasicAgentTop99p) { - this.infraHostBasicInfraBasicAgentTop99p = infraHostBasicInfraBasicAgentTop99p; + public void setInfraCpuAvg(Long infraCpuAvg) { + this.infraCpuAvg = infraCpuAvg; } - public UsageSummaryDateOrg infraHostBasicInfraBasicVsphereTop99p( - Long infraHostBasicInfraBasicVsphereTop99p) { - this.infraHostBasicInfraBasicVsphereTop99p = infraHostBasicInfraBasicVsphereTop99p; + public UsageSummaryDateOrg infraCpuDefaultInfraHostVcpuAgentAvg( + Long infraCpuDefaultInfraHostVcpuAgentAvg) { + this.infraCpuDefaultInfraHostVcpuAgentAvg = infraCpuDefaultInfraHostVcpuAgentAvg; return this; } /** - * Shows the 99th percentile of all distinct infrastructure hosts for Basic tier on vSphere over - * all hours in the current date for the given org. + * Shows the average of all default Infrastructure host vCPU cores reported by the Datadog Agent + * over all hours in the current date for the given org. Values are returned in millicores. Divide + * by 1,000 to convert to cores. * - * @return infraHostBasicInfraBasicVsphereTop99p + * @return infraCpuDefaultInfraHostVcpuAgentAvg */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INFRA_HOST_BASIC_INFRA_BASIC_VSPHERE_TOP99P) + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_AVG) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInfraHostBasicInfraBasicVsphereTop99p() { - return infraHostBasicInfraBasicVsphereTop99p; + public Long getInfraCpuDefaultInfraHostVcpuAgentAvg() { + return infraCpuDefaultInfraHostVcpuAgentAvg; } - public void setInfraHostBasicInfraBasicVsphereTop99p(Long infraHostBasicInfraBasicVsphereTop99p) { - this.infraHostBasicInfraBasicVsphereTop99p = infraHostBasicInfraBasicVsphereTop99p; + public void setInfraCpuDefaultInfraHostVcpuAgentAvg(Long infraCpuDefaultInfraHostVcpuAgentAvg) { + this.infraCpuDefaultInfraHostVcpuAgentAvg = infraCpuDefaultInfraHostVcpuAgentAvg; } - public UsageSummaryDateOrg infraHostBasicTop99p(Long infraHostBasicTop99p) { - this.infraHostBasicTop99p = infraHostBasicTop99p; + public UsageSummaryDateOrg infraCpuDefaultInfraHostVcpuAgentBasicAvg( + Long infraCpuDefaultInfraHostVcpuAgentBasicAvg) { + this.infraCpuDefaultInfraHostVcpuAgentBasicAvg = infraCpuDefaultInfraHostVcpuAgentBasicAvg; return this; } /** - * Shows the 99th percentile of all distinct infrastructure hosts for Basic tier over all hours in - * the current date for the given org. + * Shows the average of all default basic Infrastructure host vCPU cores reported by the Datadog + * Agent over all hours in the current date for the given org. Values are returned in millicores. + * Divide by 1,000 to convert to cores. * - * @return infraHostBasicTop99p + * @return infraCpuDefaultInfraHostVcpuAgentBasicAvg */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INFRA_HOST_BASIC_TOP99P) + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_BASIC_AVG) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInfraHostBasicTop99p() { - return infraHostBasicTop99p; + public Long getInfraCpuDefaultInfraHostVcpuAgentBasicAvg() { + return infraCpuDefaultInfraHostVcpuAgentBasicAvg; } - public void setInfraHostBasicTop99p(Long infraHostBasicTop99p) { - this.infraHostBasicTop99p = infraHostBasicTop99p; + public void setInfraCpuDefaultInfraHostVcpuAgentBasicAvg( + Long infraCpuDefaultInfraHostVcpuAgentBasicAvg) { + this.infraCpuDefaultInfraHostVcpuAgentBasicAvg = infraCpuDefaultInfraHostVcpuAgentBasicAvg; } - public UsageSummaryDateOrg infraHostTop99p(Long infraHostTop99p) { - this.infraHostTop99p = infraHostTop99p; + public UsageSummaryDateOrg infraCpuDefaultInfraHostVcpuAgentBasicSum( + Long infraCpuDefaultInfraHostVcpuAgentBasicSum) { + this.infraCpuDefaultInfraHostVcpuAgentBasicSum = infraCpuDefaultInfraHostVcpuAgentBasicSum; return this; } /** - * Shows the 99th percentile of all distinct infrastructure hosts over all hours in the current - * date for the given org. + * Shows the sum of all default basic Infrastructure host vCPU cores reported by the Datadog Agent + * over all hours in the current date for the given org. Values are returned in millicores. Divide + * by 1,000 to convert to cores. * - * @return infraHostTop99p + * @return infraCpuDefaultInfraHostVcpuAgentBasicSum */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INFRA_HOST_TOP99P) + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_BASIC_SUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInfraHostTop99p() { - return infraHostTop99p; + public Long getInfraCpuDefaultInfraHostVcpuAgentBasicSum() { + return infraCpuDefaultInfraHostVcpuAgentBasicSum; } - public void setInfraHostTop99p(Long infraHostTop99p) { - this.infraHostTop99p = infraHostTop99p; + public void setInfraCpuDefaultInfraHostVcpuAgentBasicSum( + Long infraCpuDefaultInfraHostVcpuAgentBasicSum) { + this.infraCpuDefaultInfraHostVcpuAgentBasicSum = infraCpuDefaultInfraHostVcpuAgentBasicSum; } - public UsageSummaryDateOrg infraStorageMgmtObjectsCountAvg(Long infraStorageMgmtObjectsCountAvg) { - this.infraStorageMgmtObjectsCountAvg = infraStorageMgmtObjectsCountAvg; + public UsageSummaryDateOrg infraCpuDefaultInfraHostVcpuAgentSum( + Long infraCpuDefaultInfraHostVcpuAgentSum) { + this.infraCpuDefaultInfraHostVcpuAgentSum = infraCpuDefaultInfraHostVcpuAgentSum; return this; } /** - * Shows the average number of storage management objects over all hours in the current date for - * the given org. + * Shows the sum of all default Infrastructure host vCPU cores reported by the Datadog Agent over + * all hours in the current date for the given org. Values are returned in millicores. Divide by + * 1,000 to convert to cores. * - * @return infraStorageMgmtObjectsCountAvg + * @return infraCpuDefaultInfraHostVcpuAgentSum */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INFRA_STORAGE_MGMT_OBJECTS_COUNT_AVG) + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_SUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getInfraStorageMgmtObjectsCountAvg() { - return infraStorageMgmtObjectsCountAvg; + public Long getInfraCpuDefaultInfraHostVcpuAgentSum() { + return infraCpuDefaultInfraHostVcpuAgentSum; } - public void setInfraStorageMgmtObjectsCountAvg(Long infraStorageMgmtObjectsCountAvg) { - this.infraStorageMgmtObjectsCountAvg = infraStorageMgmtObjectsCountAvg; + public void setInfraCpuDefaultInfraHostVcpuAgentSum(Long infraCpuDefaultInfraHostVcpuAgentSum) { + this.infraCpuDefaultInfraHostVcpuAgentSum = infraCpuDefaultInfraHostVcpuAgentSum; } - public UsageSummaryDateOrg ingestedEventsBytesSum(Long ingestedEventsBytesSum) { - this.ingestedEventsBytesSum = ingestedEventsBytesSum; + public UsageSummaryDateOrg infraCpuDefaultInfraHostVcpuAwsAvg( + Long infraCpuDefaultInfraHostVcpuAwsAvg) { + this.infraCpuDefaultInfraHostVcpuAwsAvg = infraCpuDefaultInfraHostVcpuAwsAvg; return this; } /** - * Shows the sum of all log bytes ingested over all hours in the current date for the given org. + * Shows the average of all default Infrastructure host vCPU cores on AWS over all hours in the + * current date for the given org. Values are returned in millicores. Divide by 1,000 to convert + * to cores. * - * @return ingestedEventsBytesSum + * @return infraCpuDefaultInfraHostVcpuAwsAvg */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INGESTED_EVENTS_BYTES_SUM) + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AWS_AVG) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIngestedEventsBytesSum() { - return ingestedEventsBytesSum; + public Long getInfraCpuDefaultInfraHostVcpuAwsAvg() { + return infraCpuDefaultInfraHostVcpuAwsAvg; } - public void setIngestedEventsBytesSum(Long ingestedEventsBytesSum) { - this.ingestedEventsBytesSum = ingestedEventsBytesSum; + public void setInfraCpuDefaultInfraHostVcpuAwsAvg(Long infraCpuDefaultInfraHostVcpuAwsAvg) { + this.infraCpuDefaultInfraHostVcpuAwsAvg = infraCpuDefaultInfraHostVcpuAwsAvg; } - public UsageSummaryDateOrg iotDeviceAggSum(Long iotDeviceAggSum) { - this.iotDeviceAggSum = iotDeviceAggSum; + public UsageSummaryDateOrg infraCpuDefaultInfraHostVcpuAwsSum( + Long infraCpuDefaultInfraHostVcpuAwsSum) { + this.infraCpuDefaultInfraHostVcpuAwsSum = infraCpuDefaultInfraHostVcpuAwsSum; 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 default Infrastructure host vCPU cores on AWS over all hours in the + * current date for the given org. Values are returned in millicores. Divide by 1,000 to convert + * to cores. * - * @return iotDeviceAggSum + * @return infraCpuDefaultInfraHostVcpuAwsSum */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IOT_DEVICE_AGG_SUM) + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AWS_SUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIotDeviceAggSum() { - return iotDeviceAggSum; + public Long getInfraCpuDefaultInfraHostVcpuAwsSum() { + return infraCpuDefaultInfraHostVcpuAwsSum; } - public void setIotDeviceAggSum(Long iotDeviceAggSum) { - this.iotDeviceAggSum = iotDeviceAggSum; + public void setInfraCpuDefaultInfraHostVcpuAwsSum(Long infraCpuDefaultInfraHostVcpuAwsSum) { + this.infraCpuDefaultInfraHostVcpuAwsSum = infraCpuDefaultInfraHostVcpuAwsSum; } - public UsageSummaryDateOrg iotDeviceTop99pSum(Long iotDeviceTop99pSum) { - this.iotDeviceTop99pSum = iotDeviceTop99pSum; + public UsageSummaryDateOrg infraCpuDefaultInfraHostVcpuAzureAvg( + Long infraCpuDefaultInfraHostVcpuAzureAvg) { + this.infraCpuDefaultInfraHostVcpuAzureAvg = infraCpuDefaultInfraHostVcpuAzureAvg; return this; } /** - * Shows the 99th percentile of all IoT devices over all hours in the current date for the given - * org. + * Shows the average of all default Infrastructure host vCPU cores on Azure over all hours in the + * current date for the given org. Values are returned in millicores. Divide by 1,000 to convert + * to cores. * - * @return iotDeviceTop99pSum + * @return infraCpuDefaultInfraHostVcpuAzureAvg */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IOT_DEVICE_TOP99P_SUM) + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AZURE_AVG) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIotDeviceTop99pSum() { - return iotDeviceTop99pSum; + public Long getInfraCpuDefaultInfraHostVcpuAzureAvg() { + return infraCpuDefaultInfraHostVcpuAzureAvg; } - public void setIotDeviceTop99pSum(Long iotDeviceTop99pSum) { - this.iotDeviceTop99pSum = iotDeviceTop99pSum; + public void setInfraCpuDefaultInfraHostVcpuAzureAvg(Long infraCpuDefaultInfraHostVcpuAzureAvg) { + this.infraCpuDefaultInfraHostVcpuAzureAvg = infraCpuDefaultInfraHostVcpuAzureAvg; } - public UsageSummaryDateOrg llmObservabilityMinSpendSum(Long llmObservabilityMinSpendSum) { - this.llmObservabilityMinSpendSum = llmObservabilityMinSpendSum; + public UsageSummaryDateOrg infraCpuDefaultInfraHostVcpuAzureSum( + Long infraCpuDefaultInfraHostVcpuAzureSum) { + this.infraCpuDefaultInfraHostVcpuAzureSum = infraCpuDefaultInfraHostVcpuAzureSum; return this; } /** - * Shows the sum of all LLM Observability minimum spend over all hours in the current date for the - * given org. + * Shows the sum of all default Infrastructure host vCPU cores on Azure over all hours in the + * current date for the given org. Values are returned in millicores. Divide by 1,000 to convert + * to cores. * - * @return llmObservabilityMinSpendSum + * @return infraCpuDefaultInfraHostVcpuAzureSum */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LLM_OBSERVABILITY_MIN_SPEND_SUM) + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AZURE_SUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getLlmObservabilityMinSpendSum() { - return llmObservabilityMinSpendSum; + public Long getInfraCpuDefaultInfraHostVcpuAzureSum() { + return infraCpuDefaultInfraHostVcpuAzureSum; } - public void setLlmObservabilityMinSpendSum(Long llmObservabilityMinSpendSum) { - this.llmObservabilityMinSpendSum = llmObservabilityMinSpendSum; + public void setInfraCpuDefaultInfraHostVcpuAzureSum(Long infraCpuDefaultInfraHostVcpuAzureSum) { + this.infraCpuDefaultInfraHostVcpuAzureSum = infraCpuDefaultInfraHostVcpuAzureSum; } - public UsageSummaryDateOrg llmObservabilitySum(Long llmObservabilitySum) { - this.llmObservabilitySum = llmObservabilitySum; + public UsageSummaryDateOrg infraCpuDefaultInfraHostVcpuGcpAvg( + Long infraCpuDefaultInfraHostVcpuGcpAvg) { + this.infraCpuDefaultInfraHostVcpuGcpAvg = infraCpuDefaultInfraHostVcpuGcpAvg; return this; } /** - * Shows the sum of all LLM observability sessions over all hours in the current date for the + * Shows the average of all default Infrastructure host vCPU cores on GCP over all hours in the + * current date for the given org. Values are returned in millicores. Divide by 1,000 to convert + * to cores. + * + * @return infraCpuDefaultInfraHostVcpuGcpAvg + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_GCP_AVG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuGcpAvg() { + return infraCpuDefaultInfraHostVcpuGcpAvg; + } + + public void setInfraCpuDefaultInfraHostVcpuGcpAvg(Long infraCpuDefaultInfraHostVcpuGcpAvg) { + this.infraCpuDefaultInfraHostVcpuGcpAvg = infraCpuDefaultInfraHostVcpuGcpAvg; + } + + public UsageSummaryDateOrg infraCpuDefaultInfraHostVcpuGcpSum( + Long infraCpuDefaultInfraHostVcpuGcpSum) { + this.infraCpuDefaultInfraHostVcpuGcpSum = infraCpuDefaultInfraHostVcpuGcpSum; + return this; + } + + /** + * Shows the sum of all default Infrastructure host vCPU cores on GCP over all hours in the + * current date for the given org. Values are returned in millicores. Divide by 1,000 to convert + * to cores. + * + * @return infraCpuDefaultInfraHostVcpuGcpSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_GCP_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuGcpSum() { + return infraCpuDefaultInfraHostVcpuGcpSum; + } + + public void setInfraCpuDefaultInfraHostVcpuGcpSum(Long infraCpuDefaultInfraHostVcpuGcpSum) { + this.infraCpuDefaultInfraHostVcpuGcpSum = infraCpuDefaultInfraHostVcpuGcpSum; + } + + public UsageSummaryDateOrg infraCpuDefaultInfraHostVcpuNutanixAvg( + Long infraCpuDefaultInfraHostVcpuNutanixAvg) { + this.infraCpuDefaultInfraHostVcpuNutanixAvg = infraCpuDefaultInfraHostVcpuNutanixAvg; + return this; + } + + /** + * Shows the average of all default Infrastructure host vCPU cores on Nutanix over all hours in + * the current date for the given org. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuDefaultInfraHostVcpuNutanixAvg + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_AVG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuNutanixAvg() { + return infraCpuDefaultInfraHostVcpuNutanixAvg; + } + + public void setInfraCpuDefaultInfraHostVcpuNutanixAvg( + Long infraCpuDefaultInfraHostVcpuNutanixAvg) { + this.infraCpuDefaultInfraHostVcpuNutanixAvg = infraCpuDefaultInfraHostVcpuNutanixAvg; + } + + public UsageSummaryDateOrg infraCpuDefaultInfraHostVcpuNutanixBasicAvg( + Long infraCpuDefaultInfraHostVcpuNutanixBasicAvg) { + this.infraCpuDefaultInfraHostVcpuNutanixBasicAvg = infraCpuDefaultInfraHostVcpuNutanixBasicAvg; + return this; + } + + /** + * Shows the average of all default basic Infrastructure host vCPU cores on Nutanix over all hours + * in the current date for the given org. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuDefaultInfraHostVcpuNutanixBasicAvg + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_BASIC_AVG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuNutanixBasicAvg() { + return infraCpuDefaultInfraHostVcpuNutanixBasicAvg; + } + + public void setInfraCpuDefaultInfraHostVcpuNutanixBasicAvg( + Long infraCpuDefaultInfraHostVcpuNutanixBasicAvg) { + this.infraCpuDefaultInfraHostVcpuNutanixBasicAvg = infraCpuDefaultInfraHostVcpuNutanixBasicAvg; + } + + public UsageSummaryDateOrg infraCpuDefaultInfraHostVcpuNutanixBasicSum( + Long infraCpuDefaultInfraHostVcpuNutanixBasicSum) { + this.infraCpuDefaultInfraHostVcpuNutanixBasicSum = infraCpuDefaultInfraHostVcpuNutanixBasicSum; + return this; + } + + /** + * Shows the sum of all default basic Infrastructure host vCPU cores on Nutanix over all hours in + * the current date for the given org. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuDefaultInfraHostVcpuNutanixBasicSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_BASIC_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuNutanixBasicSum() { + return infraCpuDefaultInfraHostVcpuNutanixBasicSum; + } + + public void setInfraCpuDefaultInfraHostVcpuNutanixBasicSum( + Long infraCpuDefaultInfraHostVcpuNutanixBasicSum) { + this.infraCpuDefaultInfraHostVcpuNutanixBasicSum = infraCpuDefaultInfraHostVcpuNutanixBasicSum; + } + + public UsageSummaryDateOrg infraCpuDefaultInfraHostVcpuNutanixSum( + Long infraCpuDefaultInfraHostVcpuNutanixSum) { + this.infraCpuDefaultInfraHostVcpuNutanixSum = infraCpuDefaultInfraHostVcpuNutanixSum; + return this; + } + + /** + * Shows the sum of all default Infrastructure host vCPU cores on Nutanix over all hours in the + * current date for the given org. Values are returned in millicores. Divide by 1,000 to convert + * to cores. + * + * @return infraCpuDefaultInfraHostVcpuNutanixSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuNutanixSum() { + return infraCpuDefaultInfraHostVcpuNutanixSum; + } + + public void setInfraCpuDefaultInfraHostVcpuNutanixSum( + Long infraCpuDefaultInfraHostVcpuNutanixSum) { + this.infraCpuDefaultInfraHostVcpuNutanixSum = infraCpuDefaultInfraHostVcpuNutanixSum; + } + + public UsageSummaryDateOrg infraCpuDefaultInfraHostVcpuOpentelemetryAvg( + Long infraCpuDefaultInfraHostVcpuOpentelemetryAvg) { + this.infraCpuDefaultInfraHostVcpuOpentelemetryAvg = + infraCpuDefaultInfraHostVcpuOpentelemetryAvg; + return this; + } + + /** + * Shows the average of all default Infrastructure host vCPU cores reported by OpenTelemetry over + * all hours in the current date for the given org. Values are returned in millicores. Divide by + * 1,000 to convert to cores. + * + * @return infraCpuDefaultInfraHostVcpuOpentelemetryAvg + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_OPENTELEMETRY_AVG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuOpentelemetryAvg() { + return infraCpuDefaultInfraHostVcpuOpentelemetryAvg; + } + + public void setInfraCpuDefaultInfraHostVcpuOpentelemetryAvg( + Long infraCpuDefaultInfraHostVcpuOpentelemetryAvg) { + this.infraCpuDefaultInfraHostVcpuOpentelemetryAvg = + infraCpuDefaultInfraHostVcpuOpentelemetryAvg; + } + + public UsageSummaryDateOrg infraCpuDefaultInfraHostVcpuOpentelemetrySum( + Long infraCpuDefaultInfraHostVcpuOpentelemetrySum) { + this.infraCpuDefaultInfraHostVcpuOpentelemetrySum = + infraCpuDefaultInfraHostVcpuOpentelemetrySum; + return this; + } + + /** + * Shows the sum of all default Infrastructure host vCPU cores reported by OpenTelemetry over all + * hours in the current date for the given org. Values are returned in millicores. Divide by 1,000 + * to convert to cores. + * + * @return infraCpuDefaultInfraHostVcpuOpentelemetrySum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_OPENTELEMETRY_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuOpentelemetrySum() { + return infraCpuDefaultInfraHostVcpuOpentelemetrySum; + } + + public void setInfraCpuDefaultInfraHostVcpuOpentelemetrySum( + Long infraCpuDefaultInfraHostVcpuOpentelemetrySum) { + this.infraCpuDefaultInfraHostVcpuOpentelemetrySum = + infraCpuDefaultInfraHostVcpuOpentelemetrySum; + } + + public UsageSummaryDateOrg infraCpuObservedInfraHostVcpuAgentAvg( + Long infraCpuObservedInfraHostVcpuAgentAvg) { + this.infraCpuObservedInfraHostVcpuAgentAvg = infraCpuObservedInfraHostVcpuAgentAvg; + return this; + } + + /** + * Shows the average of all observed Infrastructure host vCPU cores reported by the Datadog Agent + * over all hours in the current date for the given org. Values are returned in millicores. Divide + * by 1,000 to convert to cores. + * + * @return infraCpuObservedInfraHostVcpuAgentAvg + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AGENT_AVG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuAgentAvg() { + return infraCpuObservedInfraHostVcpuAgentAvg; + } + + public void setInfraCpuObservedInfraHostVcpuAgentAvg(Long infraCpuObservedInfraHostVcpuAgentAvg) { + this.infraCpuObservedInfraHostVcpuAgentAvg = infraCpuObservedInfraHostVcpuAgentAvg; + } + + public UsageSummaryDateOrg infraCpuObservedInfraHostVcpuAgentSum( + Long infraCpuObservedInfraHostVcpuAgentSum) { + this.infraCpuObservedInfraHostVcpuAgentSum = infraCpuObservedInfraHostVcpuAgentSum; + return this; + } + + /** + * Shows the sum of all observed Infrastructure host vCPU cores reported by the Datadog Agent over + * all hours in the current date for the given org. Values are returned in millicores. Divide by + * 1,000 to convert to cores. + * + * @return infraCpuObservedInfraHostVcpuAgentSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AGENT_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuAgentSum() { + return infraCpuObservedInfraHostVcpuAgentSum; + } + + public void setInfraCpuObservedInfraHostVcpuAgentSum(Long infraCpuObservedInfraHostVcpuAgentSum) { + this.infraCpuObservedInfraHostVcpuAgentSum = infraCpuObservedInfraHostVcpuAgentSum; + } + + public UsageSummaryDateOrg infraCpuObservedInfraHostVcpuAwsAvg( + Long infraCpuObservedInfraHostVcpuAwsAvg) { + this.infraCpuObservedInfraHostVcpuAwsAvg = infraCpuObservedInfraHostVcpuAwsAvg; + return this; + } + + /** + * Shows the average of all observed Infrastructure host vCPU cores on AWS over all hours in the + * current date for the given org. Values are returned in millicores. Divide by 1,000 to convert + * to cores. + * + * @return infraCpuObservedInfraHostVcpuAwsAvg + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AWS_AVG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuAwsAvg() { + return infraCpuObservedInfraHostVcpuAwsAvg; + } + + public void setInfraCpuObservedInfraHostVcpuAwsAvg(Long infraCpuObservedInfraHostVcpuAwsAvg) { + this.infraCpuObservedInfraHostVcpuAwsAvg = infraCpuObservedInfraHostVcpuAwsAvg; + } + + public UsageSummaryDateOrg infraCpuObservedInfraHostVcpuAwsSum( + Long infraCpuObservedInfraHostVcpuAwsSum) { + this.infraCpuObservedInfraHostVcpuAwsSum = infraCpuObservedInfraHostVcpuAwsSum; + return this; + } + + /** + * Shows the sum of all observed Infrastructure host vCPU cores on AWS over all hours in the + * current date for the given org. Values are returned in millicores. Divide by 1,000 to convert + * to cores. + * + * @return infraCpuObservedInfraHostVcpuAwsSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AWS_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuAwsSum() { + return infraCpuObservedInfraHostVcpuAwsSum; + } + + public void setInfraCpuObservedInfraHostVcpuAwsSum(Long infraCpuObservedInfraHostVcpuAwsSum) { + this.infraCpuObservedInfraHostVcpuAwsSum = infraCpuObservedInfraHostVcpuAwsSum; + } + + public UsageSummaryDateOrg infraCpuObservedInfraHostVcpuAzureAvg( + Long infraCpuObservedInfraHostVcpuAzureAvg) { + this.infraCpuObservedInfraHostVcpuAzureAvg = infraCpuObservedInfraHostVcpuAzureAvg; + return this; + } + + /** + * Shows the average of all observed Infrastructure host vCPU cores on Azure over all hours in the + * current date for the given org. Values are returned in millicores. Divide by 1,000 to convert + * to cores. + * + * @return infraCpuObservedInfraHostVcpuAzureAvg + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AZURE_AVG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuAzureAvg() { + return infraCpuObservedInfraHostVcpuAzureAvg; + } + + public void setInfraCpuObservedInfraHostVcpuAzureAvg(Long infraCpuObservedInfraHostVcpuAzureAvg) { + this.infraCpuObservedInfraHostVcpuAzureAvg = infraCpuObservedInfraHostVcpuAzureAvg; + } + + public UsageSummaryDateOrg infraCpuObservedInfraHostVcpuAzureSum( + Long infraCpuObservedInfraHostVcpuAzureSum) { + this.infraCpuObservedInfraHostVcpuAzureSum = infraCpuObservedInfraHostVcpuAzureSum; + return this; + } + + /** + * Shows the sum of all observed Infrastructure host vCPU cores on Azure over all hours in the + * current date for the given org. Values are returned in millicores. Divide by 1,000 to convert + * to cores. + * + * @return infraCpuObservedInfraHostVcpuAzureSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AZURE_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuAzureSum() { + return infraCpuObservedInfraHostVcpuAzureSum; + } + + public void setInfraCpuObservedInfraHostVcpuAzureSum(Long infraCpuObservedInfraHostVcpuAzureSum) { + this.infraCpuObservedInfraHostVcpuAzureSum = infraCpuObservedInfraHostVcpuAzureSum; + } + + public UsageSummaryDateOrg infraCpuObservedInfraHostVcpuGcpAvg( + Long infraCpuObservedInfraHostVcpuGcpAvg) { + this.infraCpuObservedInfraHostVcpuGcpAvg = infraCpuObservedInfraHostVcpuGcpAvg; + return this; + } + + /** + * Shows the average of all observed Infrastructure host vCPU cores on GCP over all hours in the + * current date for the given org. Values are returned in millicores. Divide by 1,000 to convert + * to cores. + * + * @return infraCpuObservedInfraHostVcpuGcpAvg + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_GCP_AVG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuGcpAvg() { + return infraCpuObservedInfraHostVcpuGcpAvg; + } + + public void setInfraCpuObservedInfraHostVcpuGcpAvg(Long infraCpuObservedInfraHostVcpuGcpAvg) { + this.infraCpuObservedInfraHostVcpuGcpAvg = infraCpuObservedInfraHostVcpuGcpAvg; + } + + public UsageSummaryDateOrg infraCpuObservedInfraHostVcpuGcpSum( + Long infraCpuObservedInfraHostVcpuGcpSum) { + this.infraCpuObservedInfraHostVcpuGcpSum = infraCpuObservedInfraHostVcpuGcpSum; + return this; + } + + /** + * Shows the sum of all observed Infrastructure host vCPU cores on GCP over all hours in the + * current date for the given org. Values are returned in millicores. Divide by 1,000 to convert + * to cores. + * + * @return infraCpuObservedInfraHostVcpuGcpSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_GCP_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuGcpSum() { + return infraCpuObservedInfraHostVcpuGcpSum; + } + + public void setInfraCpuObservedInfraHostVcpuGcpSum(Long infraCpuObservedInfraHostVcpuGcpSum) { + this.infraCpuObservedInfraHostVcpuGcpSum = infraCpuObservedInfraHostVcpuGcpSum; + } + + public UsageSummaryDateOrg infraCpuObservedInfraHostVcpuNutanixAvg( + Long infraCpuObservedInfraHostVcpuNutanixAvg) { + this.infraCpuObservedInfraHostVcpuNutanixAvg = infraCpuObservedInfraHostVcpuNutanixAvg; + return this; + } + + /** + * Shows the average of all observed Infrastructure host vCPU cores on Nutanix over all hours in + * the current date for the given org. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuObservedInfraHostVcpuNutanixAvg + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_NUTANIX_AVG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuNutanixAvg() { + return infraCpuObservedInfraHostVcpuNutanixAvg; + } + + public void setInfraCpuObservedInfraHostVcpuNutanixAvg( + Long infraCpuObservedInfraHostVcpuNutanixAvg) { + this.infraCpuObservedInfraHostVcpuNutanixAvg = infraCpuObservedInfraHostVcpuNutanixAvg; + } + + public UsageSummaryDateOrg infraCpuObservedInfraHostVcpuNutanixSum( + Long infraCpuObservedInfraHostVcpuNutanixSum) { + this.infraCpuObservedInfraHostVcpuNutanixSum = infraCpuObservedInfraHostVcpuNutanixSum; + return this; + } + + /** + * Shows the sum of all observed Infrastructure host vCPU cores on Nutanix over all hours in the + * current date for the given org. Values are returned in millicores. Divide by 1,000 to convert + * to cores. + * + * @return infraCpuObservedInfraHostVcpuNutanixSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_NUTANIX_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuNutanixSum() { + return infraCpuObservedInfraHostVcpuNutanixSum; + } + + public void setInfraCpuObservedInfraHostVcpuNutanixSum( + Long infraCpuObservedInfraHostVcpuNutanixSum) { + this.infraCpuObservedInfraHostVcpuNutanixSum = infraCpuObservedInfraHostVcpuNutanixSum; + } + + public UsageSummaryDateOrg infraCpuObservedInfraHostVcpuOpentelemetryAvg( + Long infraCpuObservedInfraHostVcpuOpentelemetryAvg) { + this.infraCpuObservedInfraHostVcpuOpentelemetryAvg = + infraCpuObservedInfraHostVcpuOpentelemetryAvg; + return this; + } + + /** + * Shows the average of all observed Infrastructure host vCPU cores reported by OpenTelemetry over + * all hours in the current date for the given org. Values are returned in millicores. Divide by + * 1,000 to convert to cores. + * + * @return infraCpuObservedInfraHostVcpuOpentelemetryAvg + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_OPENTELEMETRY_AVG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuOpentelemetryAvg() { + return infraCpuObservedInfraHostVcpuOpentelemetryAvg; + } + + public void setInfraCpuObservedInfraHostVcpuOpentelemetryAvg( + Long infraCpuObservedInfraHostVcpuOpentelemetryAvg) { + this.infraCpuObservedInfraHostVcpuOpentelemetryAvg = + infraCpuObservedInfraHostVcpuOpentelemetryAvg; + } + + public UsageSummaryDateOrg infraCpuObservedInfraHostVcpuOpentelemetrySum( + Long infraCpuObservedInfraHostVcpuOpentelemetrySum) { + this.infraCpuObservedInfraHostVcpuOpentelemetrySum = + infraCpuObservedInfraHostVcpuOpentelemetrySum; + return this; + } + + /** + * Shows the sum of all observed Infrastructure host vCPU cores reported by OpenTelemetry over all + * hours in the current date for the given org. Values are returned in millicores. Divide by 1,000 + * to convert to cores. + * + * @return infraCpuObservedInfraHostVcpuOpentelemetrySum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_OPENTELEMETRY_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuOpentelemetrySum() { + return infraCpuObservedInfraHostVcpuOpentelemetrySum; + } + + public void setInfraCpuObservedInfraHostVcpuOpentelemetrySum( + Long infraCpuObservedInfraHostVcpuOpentelemetrySum) { + this.infraCpuObservedInfraHostVcpuOpentelemetrySum = + infraCpuObservedInfraHostVcpuOpentelemetrySum; + } + + public UsageSummaryDateOrg infraCpuSum(Long infraCpuSum) { + this.infraCpuSum = infraCpuSum; + return this; + } + + /** + * Shows the sum of all Infrastructure vCPU cores over all hours in the current date for the given + * org. Values are returned in millicores. Divide by 1,000 to convert to cores. + * + * @return infraCpuSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuSum() { + return infraCpuSum; + } + + public void setInfraCpuSum(Long infraCpuSum) { + this.infraCpuSum = infraCpuSum; + } + + public UsageSummaryDateOrg infraEdgeMonitoringDevicesTop99p( + Long infraEdgeMonitoringDevicesTop99p) { + this.infraEdgeMonitoringDevicesTop99p = infraEdgeMonitoringDevicesTop99p; + return this; + } + + /** + * Shows the 99th percentile of all Edge Devices Monitoring devices over all hours in the current + * date for the given org. + * + * @return infraEdgeMonitoringDevicesTop99p + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_EDGE_MONITORING_DEVICES_TOP99P) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraEdgeMonitoringDevicesTop99p() { + return infraEdgeMonitoringDevicesTop99p; + } + + public void setInfraEdgeMonitoringDevicesTop99p(Long infraEdgeMonitoringDevicesTop99p) { + this.infraEdgeMonitoringDevicesTop99p = infraEdgeMonitoringDevicesTop99p; + } + + public UsageSummaryDateOrg infraHostBasicInfraBasicAgentTop99p( + Long infraHostBasicInfraBasicAgentTop99p) { + this.infraHostBasicInfraBasicAgentTop99p = infraHostBasicInfraBasicAgentTop99p; + return this; + } + + /** + * Shows the 99th percentile of all distinct infrastructure hosts for Basic tier with the Datadog + * Agent over all hours in the current date for the given org. + * + * @return infraHostBasicInfraBasicAgentTop99p + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_HOST_BASIC_INFRA_BASIC_AGENT_TOP99P) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraHostBasicInfraBasicAgentTop99p() { + return infraHostBasicInfraBasicAgentTop99p; + } + + public void setInfraHostBasicInfraBasicAgentTop99p(Long infraHostBasicInfraBasicAgentTop99p) { + this.infraHostBasicInfraBasicAgentTop99p = infraHostBasicInfraBasicAgentTop99p; + } + + public UsageSummaryDateOrg infraHostBasicInfraBasicVsphereTop99p( + Long infraHostBasicInfraBasicVsphereTop99p) { + this.infraHostBasicInfraBasicVsphereTop99p = infraHostBasicInfraBasicVsphereTop99p; + return this; + } + + /** + * Shows the 99th percentile of all distinct infrastructure hosts for Basic tier on vSphere over + * all hours in the current date for the given org. + * + * @return infraHostBasicInfraBasicVsphereTop99p + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_HOST_BASIC_INFRA_BASIC_VSPHERE_TOP99P) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraHostBasicInfraBasicVsphereTop99p() { + return infraHostBasicInfraBasicVsphereTop99p; + } + + public void setInfraHostBasicInfraBasicVsphereTop99p(Long infraHostBasicInfraBasicVsphereTop99p) { + this.infraHostBasicInfraBasicVsphereTop99p = infraHostBasicInfraBasicVsphereTop99p; + } + + public UsageSummaryDateOrg infraHostBasicTop99p(Long infraHostBasicTop99p) { + this.infraHostBasicTop99p = infraHostBasicTop99p; + return this; + } + + /** + * Shows the 99th percentile of all distinct infrastructure hosts for Basic tier over all hours in + * the current date for the given org. + * + * @return infraHostBasicTop99p + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_HOST_BASIC_TOP99P) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraHostBasicTop99p() { + return infraHostBasicTop99p; + } + + public void setInfraHostBasicTop99p(Long infraHostBasicTop99p) { + this.infraHostBasicTop99p = infraHostBasicTop99p; + } + + 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. + * + * @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 infraStorageMgmtObjectsCountAvg(Long infraStorageMgmtObjectsCountAvg) { + this.infraStorageMgmtObjectsCountAvg = infraStorageMgmtObjectsCountAvg; + return this; + } + + /** + * Shows the average number of storage management objects over all hours in the current date for + * the given org. + * + * @return infraStorageMgmtObjectsCountAvg + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_STORAGE_MGMT_OBJECTS_COUNT_AVG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraStorageMgmtObjectsCountAvg() { + return infraStorageMgmtObjectsCountAvg; + } + + public void setInfraStorageMgmtObjectsCountAvg(Long infraStorageMgmtObjectsCountAvg) { + this.infraStorageMgmtObjectsCountAvg = infraStorageMgmtObjectsCountAvg; + } + + public UsageSummaryDateOrg ingestPointsSum(Long ingestPointsSum) { + this.ingestPointsSum = ingestPointsSum; + return this; + } + + /** + * Shows the sum of all ingested custom metrics points over all hours in the current date for the + * given org. + * + * @return ingestPointsSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INGEST_POINTS_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getIngestPointsSum() { + return ingestPointsSum; + } + + public void setIngestPointsSum(Long ingestPointsSum) { + this.ingestPointsSum = ingestPointsSum; + } + + 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. + * + * @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 iotApmHostSum(Long iotApmHostSum) { + this.iotApmHostSum = iotApmHostSum; + return this; + } + + /** + * Shows the sum of all Application Performance Monitoring IoT hosts over all hours in the current + * date for the given org. + * + * @return iotApmHostSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IOT_APM_HOST_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getIotApmHostSum() { + return iotApmHostSum; + } + + public void setIotApmHostSum(Long iotApmHostSum) { + this.iotApmHostSum = iotApmHostSum; + } + + public UsageSummaryDateOrg iotApmHostTop99p(Long iotApmHostTop99p) { + this.iotApmHostTop99p = iotApmHostTop99p; + return this; + } + + /** + * Shows the 99th percentile of all Application Performance Monitoring IoT hosts over all hours in + * the current date for the given org. + * + * @return iotApmHostTop99p + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IOT_APM_HOST_TOP99P) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getIotApmHostTop99p() { + return iotApmHostTop99p; + } + + public void setIotApmHostTop99p(Long iotApmHostTop99p) { + this.iotApmHostTop99p = iotApmHostTop99p; + } + + 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. + * + * @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. + * + * @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 llmObservability15dayRetentionSpansSum( + Long llmObservability15dayRetentionSpansSum) { + this.llmObservability15dayRetentionSpansSum = llmObservability15dayRetentionSpansSum; + return this; + } + + /** + * Shows the sum of all LLM Observability 15-day retention spans over all hours in the current + * date for the given org. + * + * @return llmObservability15dayRetentionSpansSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LLM_OBSERVABILITY_15DAY_RETENTION_SPANS_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLlmObservability15dayRetentionSpansSum() { + return llmObservability15dayRetentionSpansSum; + } + + public void setLlmObservability15dayRetentionSpansSum( + Long llmObservability15dayRetentionSpansSum) { + this.llmObservability15dayRetentionSpansSum = llmObservability15dayRetentionSpansSum; + } + + public UsageSummaryDateOrg llmObservability30dayRetentionSpansSum( + Long llmObservability30dayRetentionSpansSum) { + this.llmObservability30dayRetentionSpansSum = llmObservability30dayRetentionSpansSum; + return this; + } + + /** + * Shows the sum of all LLM Observability 30-day retention spans over all hours in the current + * date for the given org. + * + * @return llmObservability30dayRetentionSpansSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LLM_OBSERVABILITY_30DAY_RETENTION_SPANS_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLlmObservability30dayRetentionSpansSum() { + return llmObservability30dayRetentionSpansSum; + } + + public void setLlmObservability30dayRetentionSpansSum( + Long llmObservability30dayRetentionSpansSum) { + this.llmObservability30dayRetentionSpansSum = llmObservability30dayRetentionSpansSum; + } + + public UsageSummaryDateOrg llmObservability60dayRetentionSpansSum( + Long llmObservability60dayRetentionSpansSum) { + this.llmObservability60dayRetentionSpansSum = llmObservability60dayRetentionSpansSum; + return this; + } + + /** + * Shows the sum of all LLM Observability 60-day retention spans over all hours in the current + * date for the given org. + * + * @return llmObservability60dayRetentionSpansSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LLM_OBSERVABILITY_60DAY_RETENTION_SPANS_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLlmObservability60dayRetentionSpansSum() { + return llmObservability60dayRetentionSpansSum; + } + + public void setLlmObservability60dayRetentionSpansSum( + Long llmObservability60dayRetentionSpansSum) { + this.llmObservability60dayRetentionSpansSum = llmObservability60dayRetentionSpansSum; + } + + public UsageSummaryDateOrg llmObservability90dayRetentionSpansSum( + Long llmObservability90dayRetentionSpansSum) { + this.llmObservability90dayRetentionSpansSum = llmObservability90dayRetentionSpansSum; + return this; + } + + /** + * Shows the sum of all LLM Observability 90-day retention spans over all hours in the current + * date for the given org. + * + * @return llmObservability90dayRetentionSpansSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LLM_OBSERVABILITY_90DAY_RETENTION_SPANS_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLlmObservability90dayRetentionSpansSum() { + return llmObservability90dayRetentionSpansSum; + } + + public void setLlmObservability90dayRetentionSpansSum( + Long llmObservability90dayRetentionSpansSum) { + this.llmObservability90dayRetentionSpansSum = llmObservability90dayRetentionSpansSum; + } + + public UsageSummaryDateOrg llmObservabilityMinSpendSum(Long llmObservabilityMinSpendSum) { + this.llmObservabilityMinSpendSum = llmObservabilityMinSpendSum; + return this; + } + + /** + * Shows the sum of all LLM Observability minimum spend over all hours in the current date for the + * given org. + * + * @return llmObservabilityMinSpendSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LLM_OBSERVABILITY_MIN_SPEND_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLlmObservabilityMinSpendSum() { + return llmObservabilityMinSpendSum; + } + + public void setLlmObservabilityMinSpendSum(Long llmObservabilityMinSpendSum) { + this.llmObservabilityMinSpendSum = llmObservabilityMinSpendSum; + } + + public UsageSummaryDateOrg llmObservabilitySum(Long llmObservabilitySum) { + this.llmObservabilitySum = llmObservabilitySum; + return this; + } + + /** + * Shows the sum of all LLM observability sessions over all hours in the current date for the * given org. * * @return llmObservabilitySum @@ -4487,6 +5835,49 @@ public void setLlmObservabilitySum(Long llmObservabilitySum) { this.llmObservabilitySum = llmObservabilitySum; } + public UsageSummaryDateOrg logsArchiveSearchGbScannedSum(Long logsArchiveSearchGbScannedSum) { + this.logsArchiveSearchGbScannedSum = logsArchiveSearchGbScannedSum; + return this; + } + + /** + * Shows the sum of all Logs Archive Search scanned data over all hours in the current date for + * the given org. + * + * @return logsArchiveSearchGbScannedSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS_ARCHIVE_SEARCH_GB_SCANNED_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLogsArchiveSearchGbScannedSum() { + return logsArchiveSearchGbScannedSum; + } + + public void setLogsArchiveSearchGbScannedSum(Long logsArchiveSearchGbScannedSum) { + this.logsArchiveSearchGbScannedSum = logsArchiveSearchGbScannedSum; + } + + public UsageSummaryDateOrg metricNamesSum(Long metricNamesSum) { + this.metricNamesSum = metricNamesSum; + return this; + } + + /** + * Shows the sum of all custom metric names over all hours in the current date for the given org. + * + * @return metricNamesSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC_NAMES_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getMetricNamesSum() { + return metricNamesSum; + } + + public void setMetricNamesSum(Long metricNamesSum) { + this.metricNamesSum = metricNamesSum; + } + public UsageSummaryDateOrg mobileRumLiteSessionCountSum(Long mobileRumLiteSessionCountSum) { this.mobileRumLiteSessionCountSum = mobileRumLiteSessionCountSum; return this; @@ -6845,6 +8236,50 @@ public void setSiemAnalyzedLogsAddOnCountSum(Long siemAnalyzedLogsAddOnCountSum) this.siemAnalyzedLogsAddOnCountSum = siemAnalyzedLogsAddOnCountSum; } + public UsageSummaryDateOrg snmpDeviceCountSum(Long snmpDeviceCountSum) { + this.snmpDeviceCountSum = snmpDeviceCountSum; + return this; + } + + /** + * Shows the sum of all Network Device Monitoring devices over all hours in the current date for + * the given org. + * + * @return snmpDeviceCountSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SNMP_DEVICE_COUNT_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getSnmpDeviceCountSum() { + return snmpDeviceCountSum; + } + + public void setSnmpDeviceCountSum(Long snmpDeviceCountSum) { + this.snmpDeviceCountSum = snmpDeviceCountSum; + } + + public UsageSummaryDateOrg snmpDeviceCountTop99p(Long snmpDeviceCountTop99p) { + this.snmpDeviceCountTop99p = snmpDeviceCountTop99p; + return this; + } + + /** + * Shows the 99th percentile of all Network Device Monitoring devices over all hours in the + * current date for the given org. + * + * @return snmpDeviceCountTop99p + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SNMP_DEVICE_COUNT_TOP99P) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getSnmpDeviceCountTop99p() { + return snmpDeviceCountTop99p; + } + + public void setSnmpDeviceCountTop99p(Long snmpDeviceCountTop99p) { + this.snmpDeviceCountTop99p = snmpDeviceCountTop99p; + } + public UsageSummaryDateOrg syntheticsBrowserCheckCallsCountSum( Long syntheticsBrowserCheckCallsCountSum) { this.syntheticsBrowserCheckCallsCountSum = syntheticsBrowserCheckCallsCountSum; @@ -7126,6 +8561,17 @@ public boolean equals(Object o) { return Objects.equals(this.accountName, usageSummaryDateOrg.accountName) && Objects.equals(this.accountPublicId, usageSummaryDateOrg.accountPublicId) && Objects.equals(this.agentHostTop99p, usageSummaryDateOrg.agentHostTop99p) + && Objects.equals( + this.aiCreditsAgentBuilderAiCreditsSum, + usageSummaryDateOrg.aiCreditsAgentBuilderAiCreditsSum) + && Objects.equals( + this.aiCreditsBitsAssistantAiCreditsSum, + usageSummaryDateOrg.aiCreditsBitsAssistantAiCreditsSum) + && Objects.equals( + this.aiCreditsBitsDevAiCreditsSum, usageSummaryDateOrg.aiCreditsBitsDevAiCreditsSum) + && Objects.equals( + this.aiCreditsBitsSreAiCreditsSum, usageSummaryDateOrg.aiCreditsBitsSreAiCreditsSum) + && Objects.equals(this.aiCreditsSum, usageSummaryDateOrg.aiCreditsSum) && Objects.equals( this.apmAzureAppServiceHostTop99p, usageSummaryDateOrg.apmAzureAppServiceHostTop99p) && Objects.equals(this.apmDevsecopsHostTop99p, usageSummaryDateOrg.apmDevsecopsHostTop99p) @@ -7141,6 +8587,9 @@ public boolean equals(Object o) { && Objects.equals( this.auditLogsLinesIndexedSum, usageSummaryDateOrg.auditLogsLinesIndexedSum) && Objects.equals(this.auditTrailEnabledHwm, usageSummaryDateOrg.auditTrailEnabledHwm) + && Objects.equals( + this.auditTrailEventForwardingEventsSum, + usageSummaryDateOrg.auditTrailEventForwardingEventsSum) && Objects.equals(this.avgProfiledFargateTasks, usageSummaryDateOrg.avgProfiledFargateTasks) && Objects.equals(this.awsHostTop99p, usageSummaryDateOrg.awsHostTop99p) && Objects.equals(this.awsLambdaFuncCount, usageSummaryDateOrg.awsLambdaFuncCount) @@ -7269,6 +8718,12 @@ public boolean equals(Object o) { && Objects.equals(this.cwsHostTop99p, usageSummaryDateOrg.cwsHostTop99p) && Objects.equals( this.dataJobsMonitoringHostHrSum, usageSummaryDateOrg.dataJobsMonitoringHostHrSum) + && Objects.equals( + this.dataStreamMonitoringHostCountSum, + usageSummaryDateOrg.dataStreamMonitoringHostCountSum) + && Objects.equals( + this.dataStreamMonitoringHostCountTop99p, + usageSummaryDateOrg.dataStreamMonitoringHostCountTop99p) && Objects.equals(this.dbmHostTop99pSum, usageSummaryDateOrg.dbmHostTop99pSum) && Objects.equals(this.dbmQueriesAvgSum, usageSummaryDateOrg.dbmQueriesAvgSum) && Objects.equals( @@ -7350,6 +8805,93 @@ public boolean equals(Object o) { && Objects.equals( this.incidentManagementSeatsHwm, usageSummaryDateOrg.incidentManagementSeatsHwm) && Objects.equals(this.indexedEventsCountSum, usageSummaryDateOrg.indexedEventsCountSum) + && Objects.equals(this.indexedPointsSum, usageSummaryDateOrg.indexedPointsSum) + && Objects.equals(this.infraCpuAvg, usageSummaryDateOrg.infraCpuAvg) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuAgentAvg, + usageSummaryDateOrg.infraCpuDefaultInfraHostVcpuAgentAvg) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuAgentBasicAvg, + usageSummaryDateOrg.infraCpuDefaultInfraHostVcpuAgentBasicAvg) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuAgentBasicSum, + usageSummaryDateOrg.infraCpuDefaultInfraHostVcpuAgentBasicSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuAgentSum, + usageSummaryDateOrg.infraCpuDefaultInfraHostVcpuAgentSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuAwsAvg, + usageSummaryDateOrg.infraCpuDefaultInfraHostVcpuAwsAvg) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuAwsSum, + usageSummaryDateOrg.infraCpuDefaultInfraHostVcpuAwsSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuAzureAvg, + usageSummaryDateOrg.infraCpuDefaultInfraHostVcpuAzureAvg) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuAzureSum, + usageSummaryDateOrg.infraCpuDefaultInfraHostVcpuAzureSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuGcpAvg, + usageSummaryDateOrg.infraCpuDefaultInfraHostVcpuGcpAvg) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuGcpSum, + usageSummaryDateOrg.infraCpuDefaultInfraHostVcpuGcpSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuNutanixAvg, + usageSummaryDateOrg.infraCpuDefaultInfraHostVcpuNutanixAvg) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuNutanixBasicAvg, + usageSummaryDateOrg.infraCpuDefaultInfraHostVcpuNutanixBasicAvg) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuNutanixBasicSum, + usageSummaryDateOrg.infraCpuDefaultInfraHostVcpuNutanixBasicSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuNutanixSum, + usageSummaryDateOrg.infraCpuDefaultInfraHostVcpuNutanixSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuOpentelemetryAvg, + usageSummaryDateOrg.infraCpuDefaultInfraHostVcpuOpentelemetryAvg) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuOpentelemetrySum, + usageSummaryDateOrg.infraCpuDefaultInfraHostVcpuOpentelemetrySum) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuAgentAvg, + usageSummaryDateOrg.infraCpuObservedInfraHostVcpuAgentAvg) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuAgentSum, + usageSummaryDateOrg.infraCpuObservedInfraHostVcpuAgentSum) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuAwsAvg, + usageSummaryDateOrg.infraCpuObservedInfraHostVcpuAwsAvg) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuAwsSum, + usageSummaryDateOrg.infraCpuObservedInfraHostVcpuAwsSum) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuAzureAvg, + usageSummaryDateOrg.infraCpuObservedInfraHostVcpuAzureAvg) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuAzureSum, + usageSummaryDateOrg.infraCpuObservedInfraHostVcpuAzureSum) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuGcpAvg, + usageSummaryDateOrg.infraCpuObservedInfraHostVcpuGcpAvg) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuGcpSum, + usageSummaryDateOrg.infraCpuObservedInfraHostVcpuGcpSum) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuNutanixAvg, + usageSummaryDateOrg.infraCpuObservedInfraHostVcpuNutanixAvg) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuNutanixSum, + usageSummaryDateOrg.infraCpuObservedInfraHostVcpuNutanixSum) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuOpentelemetryAvg, + usageSummaryDateOrg.infraCpuObservedInfraHostVcpuOpentelemetryAvg) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuOpentelemetrySum, + usageSummaryDateOrg.infraCpuObservedInfraHostVcpuOpentelemetrySum) + && Objects.equals(this.infraCpuSum, usageSummaryDateOrg.infraCpuSum) && Objects.equals( this.infraEdgeMonitoringDevicesTop99p, usageSummaryDateOrg.infraEdgeMonitoringDevicesTop99p) @@ -7364,12 +8906,30 @@ public boolean equals(Object o) { && Objects.equals( this.infraStorageMgmtObjectsCountAvg, usageSummaryDateOrg.infraStorageMgmtObjectsCountAvg) + && Objects.equals(this.ingestPointsSum, usageSummaryDateOrg.ingestPointsSum) && Objects.equals(this.ingestedEventsBytesSum, usageSummaryDateOrg.ingestedEventsBytesSum) + && Objects.equals(this.iotApmHostSum, usageSummaryDateOrg.iotApmHostSum) + && Objects.equals(this.iotApmHostTop99p, usageSummaryDateOrg.iotApmHostTop99p) && Objects.equals(this.iotDeviceAggSum, usageSummaryDateOrg.iotDeviceAggSum) && Objects.equals(this.iotDeviceTop99pSum, usageSummaryDateOrg.iotDeviceTop99pSum) + && Objects.equals( + this.llmObservability15dayRetentionSpansSum, + usageSummaryDateOrg.llmObservability15dayRetentionSpansSum) + && Objects.equals( + this.llmObservability30dayRetentionSpansSum, + usageSummaryDateOrg.llmObservability30dayRetentionSpansSum) + && Objects.equals( + this.llmObservability60dayRetentionSpansSum, + usageSummaryDateOrg.llmObservability60dayRetentionSpansSum) + && Objects.equals( + this.llmObservability90dayRetentionSpansSum, + usageSummaryDateOrg.llmObservability90dayRetentionSpansSum) && Objects.equals( this.llmObservabilityMinSpendSum, usageSummaryDateOrg.llmObservabilityMinSpendSum) && Objects.equals(this.llmObservabilitySum, usageSummaryDateOrg.llmObservabilitySum) + && Objects.equals( + this.logsArchiveSearchGbScannedSum, usageSummaryDateOrg.logsArchiveSearchGbScannedSum) + && Objects.equals(this.metricNamesSum, usageSummaryDateOrg.metricNamesSum) && Objects.equals( this.mobileRumLiteSessionCountSum, usageSummaryDateOrg.mobileRumLiteSessionCountSum) && Objects.equals( @@ -7588,6 +9148,8 @@ public boolean equals(Object o) { && Objects.equals(this.siem6moRetentionSum, usageSummaryDateOrg.siem6moRetentionSum) && Objects.equals( this.siemAnalyzedLogsAddOnCountSum, usageSummaryDateOrg.siemAnalyzedLogsAddOnCountSum) + && Objects.equals(this.snmpDeviceCountSum, usageSummaryDateOrg.snmpDeviceCountSum) + && Objects.equals(this.snmpDeviceCountTop99p, usageSummaryDateOrg.snmpDeviceCountTop99p) && Objects.equals( this.syntheticsBrowserCheckCallsCountSum, usageSummaryDateOrg.syntheticsBrowserCheckCallsCountSum) @@ -7620,6 +9182,11 @@ public int hashCode() { accountName, accountPublicId, agentHostTop99p, + aiCreditsAgentBuilderAiCreditsSum, + aiCreditsBitsAssistantAiCreditsSum, + aiCreditsBitsDevAiCreditsSum, + aiCreditsBitsSreAiCreditsSum, + aiCreditsSum, apmAzureAppServiceHostTop99p, apmDevsecopsHostTop99p, apmEnterpriseStandaloneHostsTop99p, @@ -7630,6 +9197,7 @@ public int hashCode() { asmServerlessSum, auditLogsLinesIndexedSum, auditTrailEnabledHwm, + auditTrailEventForwardingEventsSum, avgProfiledFargateTasks, awsHostTop99p, awsLambdaFuncCount, @@ -7704,6 +9272,8 @@ public int hashCode() { cwsFargateTaskAvg, cwsHostTop99p, dataJobsMonitoringHostHrSum, + dataStreamMonitoringHostCountSum, + dataStreamMonitoringHostCountTop99p, dbmHostTop99pSum, dbmQueriesAvgSum, doJobsMonitoringOrchestratorsJobHoursSum, @@ -7752,17 +9322,57 @@ public int hashCode() { incidentManagementMonthlyActiveUsersHwm, incidentManagementSeatsHwm, indexedEventsCountSum, + indexedPointsSum, + infraCpuAvg, + infraCpuDefaultInfraHostVcpuAgentAvg, + infraCpuDefaultInfraHostVcpuAgentBasicAvg, + infraCpuDefaultInfraHostVcpuAgentBasicSum, + infraCpuDefaultInfraHostVcpuAgentSum, + infraCpuDefaultInfraHostVcpuAwsAvg, + infraCpuDefaultInfraHostVcpuAwsSum, + infraCpuDefaultInfraHostVcpuAzureAvg, + infraCpuDefaultInfraHostVcpuAzureSum, + infraCpuDefaultInfraHostVcpuGcpAvg, + infraCpuDefaultInfraHostVcpuGcpSum, + infraCpuDefaultInfraHostVcpuNutanixAvg, + infraCpuDefaultInfraHostVcpuNutanixBasicAvg, + infraCpuDefaultInfraHostVcpuNutanixBasicSum, + infraCpuDefaultInfraHostVcpuNutanixSum, + infraCpuDefaultInfraHostVcpuOpentelemetryAvg, + infraCpuDefaultInfraHostVcpuOpentelemetrySum, + infraCpuObservedInfraHostVcpuAgentAvg, + infraCpuObservedInfraHostVcpuAgentSum, + infraCpuObservedInfraHostVcpuAwsAvg, + infraCpuObservedInfraHostVcpuAwsSum, + infraCpuObservedInfraHostVcpuAzureAvg, + infraCpuObservedInfraHostVcpuAzureSum, + infraCpuObservedInfraHostVcpuGcpAvg, + infraCpuObservedInfraHostVcpuGcpSum, + infraCpuObservedInfraHostVcpuNutanixAvg, + infraCpuObservedInfraHostVcpuNutanixSum, + infraCpuObservedInfraHostVcpuOpentelemetryAvg, + infraCpuObservedInfraHostVcpuOpentelemetrySum, + infraCpuSum, infraEdgeMonitoringDevicesTop99p, infraHostBasicInfraBasicAgentTop99p, infraHostBasicInfraBasicVsphereTop99p, infraHostBasicTop99p, infraHostTop99p, infraStorageMgmtObjectsCountAvg, + ingestPointsSum, ingestedEventsBytesSum, + iotApmHostSum, + iotApmHostTop99p, iotDeviceAggSum, iotDeviceTop99pSum, + llmObservability15dayRetentionSpansSum, + llmObservability30dayRetentionSpansSum, + llmObservability60dayRetentionSpansSum, + llmObservability90dayRetentionSpansSum, llmObservabilityMinSpendSum, llmObservabilitySum, + logsArchiveSearchGbScannedSum, + metricNamesSum, mobileRumLiteSessionCountSum, mobileRumSessionCountAndroidSum, mobileRumSessionCountFlutterSum, @@ -7864,6 +9474,8 @@ public int hashCode() { siem12moRetentionSum, siem6moRetentionSum, siemAnalyzedLogsAddOnCountSum, + snmpDeviceCountSum, + snmpDeviceCountTop99p, syntheticsBrowserCheckCallsCountSum, syntheticsCheckCallsCountSum, syntheticsMobileTestRunsSum, @@ -7884,6 +9496,19 @@ public String toString() { sb.append(" accountName: ").append(toIndentedString(accountName)).append("\n"); sb.append(" accountPublicId: ").append(toIndentedString(accountPublicId)).append("\n"); sb.append(" agentHostTop99p: ").append(toIndentedString(agentHostTop99p)).append("\n"); + sb.append(" aiCreditsAgentBuilderAiCreditsSum: ") + .append(toIndentedString(aiCreditsAgentBuilderAiCreditsSum)) + .append("\n"); + sb.append(" aiCreditsBitsAssistantAiCreditsSum: ") + .append(toIndentedString(aiCreditsBitsAssistantAiCreditsSum)) + .append("\n"); + sb.append(" aiCreditsBitsDevAiCreditsSum: ") + .append(toIndentedString(aiCreditsBitsDevAiCreditsSum)) + .append("\n"); + sb.append(" aiCreditsBitsSreAiCreditsSum: ") + .append(toIndentedString(aiCreditsBitsSreAiCreditsSum)) + .append("\n"); + sb.append(" aiCreditsSum: ").append(toIndentedString(aiCreditsSum)).append("\n"); sb.append(" apmAzureAppServiceHostTop99p: ") .append(toIndentedString(apmAzureAppServiceHostTop99p)) .append("\n"); @@ -7908,6 +9533,9 @@ public String toString() { sb.append(" auditTrailEnabledHwm: ") .append(toIndentedString(auditTrailEnabledHwm)) .append("\n"); + sb.append(" auditTrailEventForwardingEventsSum: ") + .append(toIndentedString(auditTrailEventForwardingEventsSum)) + .append("\n"); sb.append(" avgProfiledFargateTasks: ") .append(toIndentedString(avgProfiledFargateTasks)) .append("\n"); @@ -8082,6 +9710,12 @@ public String toString() { sb.append(" dataJobsMonitoringHostHrSum: ") .append(toIndentedString(dataJobsMonitoringHostHrSum)) .append("\n"); + sb.append(" dataStreamMonitoringHostCountSum: ") + .append(toIndentedString(dataStreamMonitoringHostCountSum)) + .append("\n"); + sb.append(" dataStreamMonitoringHostCountTop99p: ") + .append(toIndentedString(dataStreamMonitoringHostCountTop99p)) + .append("\n"); sb.append(" dbmHostTop99pSum: ").append(toIndentedString(dbmHostTop99pSum)).append("\n"); sb.append(" dbmQueriesAvgSum: ").append(toIndentedString(dbmQueriesAvgSum)).append("\n"); sb.append(" doJobsMonitoringOrchestratorsJobHoursSum: ") @@ -8204,6 +9838,93 @@ public String toString() { sb.append(" indexedEventsCountSum: ") .append(toIndentedString(indexedEventsCountSum)) .append("\n"); + sb.append(" indexedPointsSum: ").append(toIndentedString(indexedPointsSum)).append("\n"); + sb.append(" infraCpuAvg: ").append(toIndentedString(infraCpuAvg)).append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuAgentAvg: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuAgentAvg)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuAgentBasicAvg: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuAgentBasicAvg)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuAgentBasicSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuAgentBasicSum)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuAgentSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuAgentSum)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuAwsAvg: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuAwsAvg)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuAwsSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuAwsSum)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuAzureAvg: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuAzureAvg)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuAzureSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuAzureSum)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuGcpAvg: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuGcpAvg)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuGcpSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuGcpSum)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuNutanixAvg: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuNutanixAvg)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuNutanixBasicAvg: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuNutanixBasicAvg)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuNutanixBasicSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuNutanixBasicSum)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuNutanixSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuNutanixSum)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuOpentelemetryAvg: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuOpentelemetryAvg)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuOpentelemetrySum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuOpentelemetrySum)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuAgentAvg: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuAgentAvg)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuAgentSum: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuAgentSum)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuAwsAvg: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuAwsAvg)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuAwsSum: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuAwsSum)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuAzureAvg: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuAzureAvg)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuAzureSum: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuAzureSum)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuGcpAvg: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuGcpAvg)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuGcpSum: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuGcpSum)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuNutanixAvg: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuNutanixAvg)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuNutanixSum: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuNutanixSum)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuOpentelemetryAvg: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuOpentelemetryAvg)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuOpentelemetrySum: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuOpentelemetrySum)) + .append("\n"); + sb.append(" infraCpuSum: ").append(toIndentedString(infraCpuSum)).append("\n"); sb.append(" infraEdgeMonitoringDevicesTop99p: ") .append(toIndentedString(infraEdgeMonitoringDevicesTop99p)) .append("\n"); @@ -8220,17 +9941,36 @@ public String toString() { sb.append(" infraStorageMgmtObjectsCountAvg: ") .append(toIndentedString(infraStorageMgmtObjectsCountAvg)) .append("\n"); + sb.append(" ingestPointsSum: ").append(toIndentedString(ingestPointsSum)).append("\n"); sb.append(" ingestedEventsBytesSum: ") .append(toIndentedString(ingestedEventsBytesSum)) .append("\n"); + sb.append(" iotApmHostSum: ").append(toIndentedString(iotApmHostSum)).append("\n"); + sb.append(" iotApmHostTop99p: ").append(toIndentedString(iotApmHostTop99p)).append("\n"); sb.append(" iotDeviceAggSum: ").append(toIndentedString(iotDeviceAggSum)).append("\n"); sb.append(" iotDeviceTop99pSum: ").append(toIndentedString(iotDeviceTop99pSum)).append("\n"); + sb.append(" llmObservability15dayRetentionSpansSum: ") + .append(toIndentedString(llmObservability15dayRetentionSpansSum)) + .append("\n"); + sb.append(" llmObservability30dayRetentionSpansSum: ") + .append(toIndentedString(llmObservability30dayRetentionSpansSum)) + .append("\n"); + sb.append(" llmObservability60dayRetentionSpansSum: ") + .append(toIndentedString(llmObservability60dayRetentionSpansSum)) + .append("\n"); + sb.append(" llmObservability90dayRetentionSpansSum: ") + .append(toIndentedString(llmObservability90dayRetentionSpansSum)) + .append("\n"); sb.append(" llmObservabilityMinSpendSum: ") .append(toIndentedString(llmObservabilityMinSpendSum)) .append("\n"); sb.append(" llmObservabilitySum: ") .append(toIndentedString(llmObservabilitySum)) .append("\n"); + sb.append(" logsArchiveSearchGbScannedSum: ") + .append(toIndentedString(logsArchiveSearchGbScannedSum)) + .append("\n"); + sb.append(" metricNamesSum: ").append(toIndentedString(metricNamesSum)).append("\n"); sb.append(" mobileRumLiteSessionCountSum: ") .append(toIndentedString(mobileRumLiteSessionCountSum)) .append("\n"); @@ -8502,6 +10242,10 @@ public String toString() { sb.append(" siemAnalyzedLogsAddOnCountSum: ") .append(toIndentedString(siemAnalyzedLogsAddOnCountSum)) .append("\n"); + sb.append(" snmpDeviceCountSum: ").append(toIndentedString(snmpDeviceCountSum)).append("\n"); + sb.append(" snmpDeviceCountTop99p: ") + .append(toIndentedString(snmpDeviceCountTop99p)) + .append("\n"); sb.append(" syntheticsBrowserCheckCallsCountSum: ") .append(toIndentedString(syntheticsBrowserCheckCallsCountSum)) .append("\n"); 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 f1452391540..b9c43145d22 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 @@ -22,9 +22,19 @@ /** * Response summarizing all usage aggregated across the months in the request for all organizations, * and broken down by month and by organization. + * + *

Newly added billing dimensions and usage types appear as untyped keys on the + * additionalProperties map instead of as typed fields. Call + * GET /api/v2/usage/summary/available_fields to enumerate every key returned at this + * response level—both typed fields and additionalProperties keys. */ @JsonPropertyOrder({ UsageSummaryResponse.JSON_PROPERTY_AGENT_HOST_TOP99P_SUM, + UsageSummaryResponse.JSON_PROPERTY_AI_CREDITS_AGENT_BUILDER_AI_CREDITS_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_AI_CREDITS_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_AI_CREDITS_BITS_ASSISTANT_AI_CREDITS_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_AI_CREDITS_BITS_DEV_AI_CREDITS_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_AI_CREDITS_BITS_SRE_AI_CREDITS_AGG_SUM, UsageSummaryResponse.JSON_PROPERTY_APM_AZURE_APP_SERVICE_HOST_TOP99P_SUM, UsageSummaryResponse.JSON_PROPERTY_APM_DEVSECOPS_HOST_TOP99P_SUM, UsageSummaryResponse.JSON_PROPERTY_APM_ENTERPRISE_STANDALONE_HOSTS_TOP99P_SUM, @@ -35,6 +45,7 @@ UsageSummaryResponse.JSON_PROPERTY_ASM_SERVERLESS_AGG_SUM, UsageSummaryResponse.JSON_PROPERTY_AUDIT_LOGS_LINES_INDEXED_AGG_SUM, UsageSummaryResponse.JSON_PROPERTY_AUDIT_TRAIL_ENABLED_HWM_SUM, + UsageSummaryResponse.JSON_PROPERTY_AUDIT_TRAIL_EVENT_FORWARDING_EVENTS_AGG_SUM, UsageSummaryResponse.JSON_PROPERTY_AVG_PROFILED_FARGATE_TASKS_SUM, UsageSummaryResponse.JSON_PROPERTY_AWS_HOST_TOP99P_SUM, UsageSummaryResponse.JSON_PROPERTY_AWS_LAMBDA_FUNC_COUNT, @@ -110,6 +121,8 @@ UsageSummaryResponse.JSON_PROPERTY_CWS_FARGATE_TASK_AVG_SUM, UsageSummaryResponse.JSON_PROPERTY_CWS_HOST_TOP99P_SUM, UsageSummaryResponse.JSON_PROPERTY_DATA_JOBS_MONITORING_HOST_HR_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_DATA_STREAM_MONITORING_HOST_COUNT_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_DATA_STREAM_MONITORING_HOST_COUNT_TOP99P_SUM, UsageSummaryResponse.JSON_PROPERTY_DBM_HOST_TOP99P_SUM, UsageSummaryResponse.JSON_PROPERTY_DBM_QUERIES_AVG_SUM, UsageSummaryResponse.JSON_PROPERTY_DO_JOBS_MONITORING_ORCHESTRATORS_JOB_HOURS_AGG_SUM, @@ -158,21 +171,61 @@ UsageSummaryResponse.JSON_PROPERTY_INCIDENT_MANAGEMENT_MONTHLY_ACTIVE_USERS_HWM_SUM, UsageSummaryResponse.JSON_PROPERTY_INCIDENT_MANAGEMENT_SEATS_HWM_SUM, UsageSummaryResponse.JSON_PROPERTY_INDEXED_EVENTS_COUNT_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INDEXED_POINTS_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_AVG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_AVG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_BASIC_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_BASIC_AVG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AWS_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AWS_AVG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AZURE_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AZURE_AVG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_GCP_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_GCP_AVG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_AVG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_BASIC_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_BASIC_AVG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_OPENTELEMETRY_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_OPENTELEMETRY_AVG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AGENT_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AGENT_AVG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AWS_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AWS_AVG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AZURE_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AZURE_AVG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_GCP_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_GCP_AVG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_NUTANIX_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_NUTANIX_AVG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_OPENTELEMETRY_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_OPENTELEMETRY_AVG_SUM, UsageSummaryResponse.JSON_PROPERTY_INFRA_EDGE_MONITORING_DEVICES_TOP99P_SUM, UsageSummaryResponse.JSON_PROPERTY_INFRA_HOST_BASIC_INFRA_BASIC_AGENT_TOP99P_SUM, UsageSummaryResponse.JSON_PROPERTY_INFRA_HOST_BASIC_INFRA_BASIC_VSPHERE_TOP99P_SUM, UsageSummaryResponse.JSON_PROPERTY_INFRA_HOST_BASIC_TOP99P_SUM, UsageSummaryResponse.JSON_PROPERTY_INFRA_HOST_TOP99P_SUM, UsageSummaryResponse.JSON_PROPERTY_INFRA_STORAGE_MGMT_OBJECTS_COUNT_AVG_SUM, + UsageSummaryResponse.JSON_PROPERTY_INGEST_POINTS_AGG_SUM, UsageSummaryResponse.JSON_PROPERTY_INGESTED_EVENTS_BYTES_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_IOT_APM_HOST_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_IOT_APM_HOST_TOP99P_SUM, UsageSummaryResponse.JSON_PROPERTY_IOT_DEVICE_AGG_SUM, UsageSummaryResponse.JSON_PROPERTY_IOT_DEVICE_TOP99P_SUM, UsageSummaryResponse.JSON_PROPERTY_LAST_UPDATED, UsageSummaryResponse.JSON_PROPERTY_LIVE_INDEXED_EVENTS_AGG_SUM, UsageSummaryResponse.JSON_PROPERTY_LIVE_INGESTED_BYTES_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_LLM_OBSERVABILITY_15DAY_RETENTION_SPANS_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_LLM_OBSERVABILITY_30DAY_RETENTION_SPANS_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_LLM_OBSERVABILITY_60DAY_RETENTION_SPANS_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_LLM_OBSERVABILITY_90DAY_RETENTION_SPANS_AGG_SUM, UsageSummaryResponse.JSON_PROPERTY_LLM_OBSERVABILITY_AGG_SUM, UsageSummaryResponse.JSON_PROPERTY_LLM_OBSERVABILITY_MIN_SPEND_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_LOGS_ARCHIVE_SEARCH_GB_SCANNED_AGG_SUM, UsageSummaryResponse.JSON_PROPERTY_LOGS_BY_RETENTION, + UsageSummaryResponse.JSON_PROPERTY_METRIC_NAMES_AGG_SUM, UsageSummaryResponse.JSON_PROPERTY_MOBILE_RUM_LITE_SESSION_COUNT_AGG_SUM, UsageSummaryResponse.JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_AGG_SUM, UsageSummaryResponse.JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_ANDROID_AGG_SUM, @@ -285,6 +338,8 @@ UsageSummaryResponse.JSON_PROPERTY_SIEM_12MO_RETENTION_AGG_SUM, UsageSummaryResponse.JSON_PROPERTY_SIEM_6MO_RETENTION_AGG_SUM, UsageSummaryResponse.JSON_PROPERTY_SIEM_ANALYZED_LOGS_ADD_ON_COUNT_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_SNMP_DEVICE_COUNT_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_SNMP_DEVICE_COUNT_TOP99P_SUM, UsageSummaryResponse.JSON_PROPERTY_START_DATE, UsageSummaryResponse.JSON_PROPERTY_SYNTHETICS_BROWSER_CHECK_CALLS_COUNT_AGG_SUM, UsageSummaryResponse.JSON_PROPERTY_SYNTHETICS_CHECK_CALLS_COUNT_AGG_SUM, @@ -305,6 +360,25 @@ public class UsageSummaryResponse { public static final String JSON_PROPERTY_AGENT_HOST_TOP99P_SUM = "agent_host_top99p_sum"; private Long agentHostTop99pSum; + public static final String JSON_PROPERTY_AI_CREDITS_AGENT_BUILDER_AI_CREDITS_AGG_SUM = + "ai_credits_agent_builder_ai_credits_agg_sum"; + private Long aiCreditsAgentBuilderAiCreditsAggSum; + + public static final String JSON_PROPERTY_AI_CREDITS_AGG_SUM = "ai_credits_agg_sum"; + private Long aiCreditsAggSum; + + public static final String JSON_PROPERTY_AI_CREDITS_BITS_ASSISTANT_AI_CREDITS_AGG_SUM = + "ai_credits_bits_assistant_ai_credits_agg_sum"; + private Long aiCreditsBitsAssistantAiCreditsAggSum; + + public static final String JSON_PROPERTY_AI_CREDITS_BITS_DEV_AI_CREDITS_AGG_SUM = + "ai_credits_bits_dev_ai_credits_agg_sum"; + private Long aiCreditsBitsDevAiCreditsAggSum; + + public static final String JSON_PROPERTY_AI_CREDITS_BITS_SRE_AI_CREDITS_AGG_SUM = + "ai_credits_bits_sre_ai_credits_agg_sum"; + private Long aiCreditsBitsSreAiCreditsAggSum; + public static final String JSON_PROPERTY_APM_AZURE_APP_SERVICE_HOST_TOP99P_SUM = "apm_azure_app_service_host_top99p_sum"; private Long apmAzureAppServiceHostTop99pSum; @@ -342,6 +416,10 @@ public class UsageSummaryResponse { "audit_trail_enabled_hwm_sum"; private Long auditTrailEnabledHwmSum; + public static final String JSON_PROPERTY_AUDIT_TRAIL_EVENT_FORWARDING_EVENTS_AGG_SUM = + "audit_trail_event_forwarding_events_agg_sum"; + private Long auditTrailEventForwardingEventsAggSum; + public static final String JSON_PROPERTY_AVG_PROFILED_FARGATE_TASKS_SUM = "avg_profiled_fargate_tasks_sum"; private Long avgProfiledFargateTasksSum; @@ -615,6 +693,14 @@ public class UsageSummaryResponse { "data_jobs_monitoring_host_hr_agg_sum"; private Long dataJobsMonitoringHostHrAggSum; + public static final String JSON_PROPERTY_DATA_STREAM_MONITORING_HOST_COUNT_AGG_SUM = + "data_stream_monitoring_host_count_agg_sum"; + private Long dataStreamMonitoringHostCountAggSum; + + public static final String JSON_PROPERTY_DATA_STREAM_MONITORING_HOST_COUNT_TOP99P_SUM = + "data_stream_monitoring_host_count_top99p_sum"; + private Long dataStreamMonitoringHostCountTop99pSum; + public static final String JSON_PROPERTY_DBM_HOST_TOP99P_SUM = "dbm_host_top99p_sum"; private Long dbmHostTop99pSum; @@ -802,6 +888,129 @@ public class UsageSummaryResponse { "indexed_events_count_agg_sum"; private Long indexedEventsCountAggSum; + public static final String JSON_PROPERTY_INDEXED_POINTS_AGG_SUM = "indexed_points_agg_sum"; + private Long indexedPointsAggSum; + + public static final String JSON_PROPERTY_INFRA_CPU_AGG_SUM = "infra_cpu_agg_sum"; + private Long infraCpuAggSum; + + public static final String JSON_PROPERTY_INFRA_CPU_AVG_SUM = "infra_cpu_avg_sum"; + private Long infraCpuAvgSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_AGG_SUM = + "infra_cpu_default_infra_host_vcpu_agent_agg_sum"; + private Long infraCpuDefaultInfraHostVcpuAgentAggSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_AVG_SUM = + "infra_cpu_default_infra_host_vcpu_agent_avg_sum"; + private Long infraCpuDefaultInfraHostVcpuAgentAvgSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_BASIC_AGG_SUM = + "infra_cpu_default_infra_host_vcpu_agent_basic_agg_sum"; + private Long infraCpuDefaultInfraHostVcpuAgentBasicAggSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_BASIC_AVG_SUM = + "infra_cpu_default_infra_host_vcpu_agent_basic_avg_sum"; + private Long infraCpuDefaultInfraHostVcpuAgentBasicAvgSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AWS_AGG_SUM = + "infra_cpu_default_infra_host_vcpu_aws_agg_sum"; + private Long infraCpuDefaultInfraHostVcpuAwsAggSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AWS_AVG_SUM = + "infra_cpu_default_infra_host_vcpu_aws_avg_sum"; + private Long infraCpuDefaultInfraHostVcpuAwsAvgSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AZURE_AGG_SUM = + "infra_cpu_default_infra_host_vcpu_azure_agg_sum"; + private Long infraCpuDefaultInfraHostVcpuAzureAggSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AZURE_AVG_SUM = + "infra_cpu_default_infra_host_vcpu_azure_avg_sum"; + private Long infraCpuDefaultInfraHostVcpuAzureAvgSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_GCP_AGG_SUM = + "infra_cpu_default_infra_host_vcpu_gcp_agg_sum"; + private Long infraCpuDefaultInfraHostVcpuGcpAggSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_GCP_AVG_SUM = + "infra_cpu_default_infra_host_vcpu_gcp_avg_sum"; + private Long infraCpuDefaultInfraHostVcpuGcpAvgSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_AGG_SUM = + "infra_cpu_default_infra_host_vcpu_nutanix_agg_sum"; + private Long infraCpuDefaultInfraHostVcpuNutanixAggSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_AVG_SUM = + "infra_cpu_default_infra_host_vcpu_nutanix_avg_sum"; + private Long infraCpuDefaultInfraHostVcpuNutanixAvgSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_BASIC_AGG_SUM = + "infra_cpu_default_infra_host_vcpu_nutanix_basic_agg_sum"; + private Long infraCpuDefaultInfraHostVcpuNutanixBasicAggSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_BASIC_AVG_SUM = + "infra_cpu_default_infra_host_vcpu_nutanix_basic_avg_sum"; + private Long infraCpuDefaultInfraHostVcpuNutanixBasicAvgSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_OPENTELEMETRY_AGG_SUM = + "infra_cpu_default_infra_host_vcpu_opentelemetry_agg_sum"; + private Long infraCpuDefaultInfraHostVcpuOpentelemetryAggSum; + + public static final String JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_OPENTELEMETRY_AVG_SUM = + "infra_cpu_default_infra_host_vcpu_opentelemetry_avg_sum"; + private Long infraCpuDefaultInfraHostVcpuOpentelemetryAvgSum; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AGENT_AGG_SUM = + "infra_cpu_observed_infra_host_vcpu_agent_agg_sum"; + private Long infraCpuObservedInfraHostVcpuAgentAggSum; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AGENT_AVG_SUM = + "infra_cpu_observed_infra_host_vcpu_agent_avg_sum"; + private Long infraCpuObservedInfraHostVcpuAgentAvgSum; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AWS_AGG_SUM = + "infra_cpu_observed_infra_host_vcpu_aws_agg_sum"; + private Long infraCpuObservedInfraHostVcpuAwsAggSum; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AWS_AVG_SUM = + "infra_cpu_observed_infra_host_vcpu_aws_avg_sum"; + private Long infraCpuObservedInfraHostVcpuAwsAvgSum; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AZURE_AGG_SUM = + "infra_cpu_observed_infra_host_vcpu_azure_agg_sum"; + private Long infraCpuObservedInfraHostVcpuAzureAggSum; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AZURE_AVG_SUM = + "infra_cpu_observed_infra_host_vcpu_azure_avg_sum"; + private Long infraCpuObservedInfraHostVcpuAzureAvgSum; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_GCP_AGG_SUM = + "infra_cpu_observed_infra_host_vcpu_gcp_agg_sum"; + private Long infraCpuObservedInfraHostVcpuGcpAggSum; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_GCP_AVG_SUM = + "infra_cpu_observed_infra_host_vcpu_gcp_avg_sum"; + private Long infraCpuObservedInfraHostVcpuGcpAvgSum; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_NUTANIX_AGG_SUM = + "infra_cpu_observed_infra_host_vcpu_nutanix_agg_sum"; + private Long infraCpuObservedInfraHostVcpuNutanixAggSum; + + public static final String JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_NUTANIX_AVG_SUM = + "infra_cpu_observed_infra_host_vcpu_nutanix_avg_sum"; + private Long infraCpuObservedInfraHostVcpuNutanixAvgSum; + + public static final String + JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_OPENTELEMETRY_AGG_SUM = + "infra_cpu_observed_infra_host_vcpu_opentelemetry_agg_sum"; + private Long infraCpuObservedInfraHostVcpuOpentelemetryAggSum; + + public static final String + JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_OPENTELEMETRY_AVG_SUM = + "infra_cpu_observed_infra_host_vcpu_opentelemetry_avg_sum"; + private Long infraCpuObservedInfraHostVcpuOpentelemetryAvgSum; + public static final String JSON_PROPERTY_INFRA_EDGE_MONITORING_DEVICES_TOP99P_SUM = "infra_edge_monitoring_devices_top99p_sum"; private Long infraEdgeMonitoringDevicesTop99pSum; @@ -825,10 +1034,19 @@ public class UsageSummaryResponse { "infra_storage_mgmt_objects_count_avg_sum"; private Long infraStorageMgmtObjectsCountAvgSum; + public static final String JSON_PROPERTY_INGEST_POINTS_AGG_SUM = "ingest_points_agg_sum"; + private Long ingestPointsAggSum; + 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_APM_HOST_AGG_SUM = "iot_apm_host_agg_sum"; + private Long iotApmHostAggSum; + + public static final String JSON_PROPERTY_IOT_APM_HOST_TOP99P_SUM = "iot_apm_host_top99p_sum"; + private Long iotApmHostTop99pSum; + public static final String JSON_PROPERTY_IOT_DEVICE_AGG_SUM = "iot_device_agg_sum"; private Long iotDeviceAggSum; @@ -846,6 +1064,22 @@ public class UsageSummaryResponse { "live_ingested_bytes_agg_sum"; private Long liveIngestedBytesAggSum; + public static final String JSON_PROPERTY_LLM_OBSERVABILITY_15DAY_RETENTION_SPANS_AGG_SUM = + "llm_observability_15day_retention_spans_agg_sum"; + private Long llmObservability15dayRetentionSpansAggSum; + + public static final String JSON_PROPERTY_LLM_OBSERVABILITY_30DAY_RETENTION_SPANS_AGG_SUM = + "llm_observability_30day_retention_spans_agg_sum"; + private Long llmObservability30dayRetentionSpansAggSum; + + public static final String JSON_PROPERTY_LLM_OBSERVABILITY_60DAY_RETENTION_SPANS_AGG_SUM = + "llm_observability_60day_retention_spans_agg_sum"; + private Long llmObservability60dayRetentionSpansAggSum; + + public static final String JSON_PROPERTY_LLM_OBSERVABILITY_90DAY_RETENTION_SPANS_AGG_SUM = + "llm_observability_90day_retention_spans_agg_sum"; + private Long llmObservability90dayRetentionSpansAggSum; + public static final String JSON_PROPERTY_LLM_OBSERVABILITY_AGG_SUM = "llm_observability_agg_sum"; private Long llmObservabilityAggSum; @@ -853,9 +1087,16 @@ public class UsageSummaryResponse { "llm_observability_min_spend_agg_sum"; private Long llmObservabilityMinSpendAggSum; + public static final String JSON_PROPERTY_LOGS_ARCHIVE_SEARCH_GB_SCANNED_AGG_SUM = + "logs_archive_search_gb_scanned_agg_sum"; + private Long logsArchiveSearchGbScannedAggSum; + public static final String JSON_PROPERTY_LOGS_BY_RETENTION = "logs_by_retention"; private LogsByRetention logsByRetention; + public static final String JSON_PROPERTY_METRIC_NAMES_AGG_SUM = "metric_names_agg_sum"; + private Long metricNamesAggSum; + public static final String JSON_PROPERTY_MOBILE_RUM_LITE_SESSION_COUNT_AGG_SUM = "mobile_rum_lite_session_count_agg_sum"; private Long mobileRumLiteSessionCountAggSum; @@ -1263,6 +1504,13 @@ public class UsageSummaryResponse { "siem_analyzed_logs_add_on_count_agg_sum"; private Long siemAnalyzedLogsAddOnCountAggSum; + public static final String JSON_PROPERTY_SNMP_DEVICE_COUNT_AGG_SUM = "snmp_device_count_agg_sum"; + private Long snmpDeviceCountAggSum; + + public static final String JSON_PROPERTY_SNMP_DEVICE_COUNT_TOP99P_SUM = + "snmp_device_count_top99p_sum"; + private Long snmpDeviceCountTop99pSum; + public static final String JSON_PROPERTY_START_DATE = "start_date"; private OffsetDateTime startDate; @@ -1330,6 +1578,121 @@ public void setAgentHostTop99pSum(Long agentHostTop99pSum) { this.agentHostTop99pSum = agentHostTop99pSum; } + public UsageSummaryResponse aiCreditsAgentBuilderAiCreditsAggSum( + Long aiCreditsAgentBuilderAiCreditsAggSum) { + this.aiCreditsAgentBuilderAiCreditsAggSum = aiCreditsAgentBuilderAiCreditsAggSum; + return this; + } + + /** + * Shows the sum of all AI credits used by Agent Builder over all hours in the current month for + * all organizations. Values are returned in micro-credits. Divide by 1,000,000 to get AI credits. + * + * @return aiCreditsAgentBuilderAiCreditsAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AI_CREDITS_AGENT_BUILDER_AI_CREDITS_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getAiCreditsAgentBuilderAiCreditsAggSum() { + return aiCreditsAgentBuilderAiCreditsAggSum; + } + + public void setAiCreditsAgentBuilderAiCreditsAggSum(Long aiCreditsAgentBuilderAiCreditsAggSum) { + this.aiCreditsAgentBuilderAiCreditsAggSum = aiCreditsAgentBuilderAiCreditsAggSum; + } + + public UsageSummaryResponse aiCreditsAggSum(Long aiCreditsAggSum) { + this.aiCreditsAggSum = aiCreditsAggSum; + return this; + } + + /** + * Shows the sum of all AI credits over all hours in the current month for all organizations. + * Values are returned in micro-credits. Divide by 1,000,000 to get AI credits. + * + * @return aiCreditsAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AI_CREDITS_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getAiCreditsAggSum() { + return aiCreditsAggSum; + } + + public void setAiCreditsAggSum(Long aiCreditsAggSum) { + this.aiCreditsAggSum = aiCreditsAggSum; + } + + public UsageSummaryResponse aiCreditsBitsAssistantAiCreditsAggSum( + Long aiCreditsBitsAssistantAiCreditsAggSum) { + this.aiCreditsBitsAssistantAiCreditsAggSum = aiCreditsBitsAssistantAiCreditsAggSum; + return this; + } + + /** + * Shows the sum of all AI credits used by Bits AI Assistant over all hours in the current month + * for all organizations. Values are returned in micro-credits. Divide by 1,000,000 to get AI + * credits. + * + * @return aiCreditsBitsAssistantAiCreditsAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AI_CREDITS_BITS_ASSISTANT_AI_CREDITS_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getAiCreditsBitsAssistantAiCreditsAggSum() { + return aiCreditsBitsAssistantAiCreditsAggSum; + } + + public void setAiCreditsBitsAssistantAiCreditsAggSum(Long aiCreditsBitsAssistantAiCreditsAggSum) { + this.aiCreditsBitsAssistantAiCreditsAggSum = aiCreditsBitsAssistantAiCreditsAggSum; + } + + public UsageSummaryResponse aiCreditsBitsDevAiCreditsAggSum( + Long aiCreditsBitsDevAiCreditsAggSum) { + this.aiCreditsBitsDevAiCreditsAggSum = aiCreditsBitsDevAiCreditsAggSum; + return this; + } + + /** + * Shows the sum of all AI credits used by Bits AI Dev over all hours in the current month for all + * organizations. Values are returned in micro-credits. Divide by 1,000,000 to get AI credits. + * + * @return aiCreditsBitsDevAiCreditsAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AI_CREDITS_BITS_DEV_AI_CREDITS_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getAiCreditsBitsDevAiCreditsAggSum() { + return aiCreditsBitsDevAiCreditsAggSum; + } + + public void setAiCreditsBitsDevAiCreditsAggSum(Long aiCreditsBitsDevAiCreditsAggSum) { + this.aiCreditsBitsDevAiCreditsAggSum = aiCreditsBitsDevAiCreditsAggSum; + } + + public UsageSummaryResponse aiCreditsBitsSreAiCreditsAggSum( + Long aiCreditsBitsSreAiCreditsAggSum) { + this.aiCreditsBitsSreAiCreditsAggSum = aiCreditsBitsSreAiCreditsAggSum; + return this; + } + + /** + * Shows the sum of all AI credits used by Bits AI SRE over all hours in the current month for all + * organizations. Values are returned in micro-credits. Divide by 1,000,000 to get AI credits. + * + * @return aiCreditsBitsSreAiCreditsAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AI_CREDITS_BITS_SRE_AI_CREDITS_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getAiCreditsBitsSreAiCreditsAggSum() { + return aiCreditsBitsSreAiCreditsAggSum; + } + + public void setAiCreditsBitsSreAiCreditsAggSum(Long aiCreditsBitsSreAiCreditsAggSum) { + this.aiCreditsBitsSreAiCreditsAggSum = aiCreditsBitsSreAiCreditsAggSum; + } + public UsageSummaryResponse apmAzureAppServiceHostTop99pSum( Long apmAzureAppServiceHostTop99pSum) { this.apmAzureAppServiceHostTop99pSum = apmAzureAppServiceHostTop99pSum; @@ -1555,6 +1918,29 @@ public void setAuditTrailEnabledHwmSum(Long auditTrailEnabledHwmSum) { this.auditTrailEnabledHwmSum = auditTrailEnabledHwmSum; } + public UsageSummaryResponse auditTrailEventForwardingEventsAggSum( + Long auditTrailEventForwardingEventsAggSum) { + this.auditTrailEventForwardingEventsAggSum = auditTrailEventForwardingEventsAggSum; + return this; + } + + /** + * Shows the sum of all Audit Trail event forwarding events over all hours in the current month + * for all organizations. + * + * @return auditTrailEventForwardingEventsAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUDIT_TRAIL_EVENT_FORWARDING_EVENTS_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getAuditTrailEventForwardingEventsAggSum() { + return auditTrailEventForwardingEventsAggSum; + } + + public void setAuditTrailEventForwardingEventsAggSum(Long auditTrailEventForwardingEventsAggSum) { + this.auditTrailEventForwardingEventsAggSum = auditTrailEventForwardingEventsAggSum; + } + public UsageSummaryResponse avgProfiledFargateTasksSum(Long avgProfiledFargateTasksSum) { this.avgProfiledFargateTasksSum = avgProfiledFargateTasksSum; return this; @@ -3248,6 +3634,53 @@ public void setDataJobsMonitoringHostHrAggSum(Long dataJobsMonitoringHostHrAggSu this.dataJobsMonitoringHostHrAggSum = dataJobsMonitoringHostHrAggSum; } + public UsageSummaryResponse dataStreamMonitoringHostCountAggSum( + Long dataStreamMonitoringHostCountAggSum) { + this.dataStreamMonitoringHostCountAggSum = dataStreamMonitoringHostCountAggSum; + return this; + } + + /** + * Shows the sum of all Data Streams Monitoring hosts over all hours in the current month for all + * organizations. + * + * @return dataStreamMonitoringHostCountAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA_STREAM_MONITORING_HOST_COUNT_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getDataStreamMonitoringHostCountAggSum() { + return dataStreamMonitoringHostCountAggSum; + } + + public void setDataStreamMonitoringHostCountAggSum(Long dataStreamMonitoringHostCountAggSum) { + this.dataStreamMonitoringHostCountAggSum = dataStreamMonitoringHostCountAggSum; + } + + public UsageSummaryResponse dataStreamMonitoringHostCountTop99pSum( + Long dataStreamMonitoringHostCountTop99pSum) { + this.dataStreamMonitoringHostCountTop99pSum = dataStreamMonitoringHostCountTop99pSum; + return this; + } + + /** + * Shows the 99th percentile of all Data Streams Monitoring hosts over all hours in the current + * month for all organizations. + * + * @return dataStreamMonitoringHostCountTop99pSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA_STREAM_MONITORING_HOST_COUNT_TOP99P_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getDataStreamMonitoringHostCountTop99pSum() { + return dataStreamMonitoringHostCountTop99pSum; + } + + public void setDataStreamMonitoringHostCountTop99pSum( + Long dataStreamMonitoringHostCountTop99pSum) { + this.dataStreamMonitoringHostCountTop99pSum = dataStreamMonitoringHostCountTop99pSum; + } + public UsageSummaryResponse dbmHostTop99pSum(Long dbmHostTop99pSum) { this.dbmHostTop99pSum = dbmHostTop99pSum; return this; @@ -3300,7 +3733,7 @@ public UsageSummaryResponse doJobsMonitoringOrchestratorsJobHoursAggSum( /** * Shows the sum of all orchestrator job hours over all hours in the current month for all - * organizations. + * organizations. Values are returned in seconds. Divide by 3,600 to convert to hours. * * @return doJobsMonitoringOrchestratorsJobHoursAggSum */ @@ -4285,60 +4718,838 @@ public UsageSummaryResponse 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 Long getIncidentManagementMonthlyActiveUsersHwmSum() { + return incidentManagementMonthlyActiveUsersHwmSum; + } + + public void setIncidentManagementMonthlyActiveUsersHwmSum( + Long incidentManagementMonthlyActiveUsersHwmSum) { + this.incidentManagementMonthlyActiveUsersHwmSum = incidentManagementMonthlyActiveUsersHwmSum; + } + + public UsageSummaryResponse incidentManagementSeatsHwmSum(Long incidentManagementSeatsHwmSum) { + this.incidentManagementSeatsHwmSum = incidentManagementSeatsHwmSum; + return this; + } + + /** + * Shows the sum of the high-water marks of Incident Management seats over all hours in the + * current month for all organizations. + * + * @return incidentManagementSeatsHwmSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCIDENT_MANAGEMENT_SEATS_HWM_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getIncidentManagementSeatsHwmSum() { + return incidentManagementSeatsHwmSum; + } + + public void setIncidentManagementSeatsHwmSum(Long incidentManagementSeatsHwmSum) { + this.incidentManagementSeatsHwmSum = incidentManagementSeatsHwmSum; + } + + public UsageSummaryResponse indexedEventsCountAggSum(Long indexedEventsCountAggSum) { + this.indexedEventsCountAggSum = indexedEventsCountAggSum; + return this; + } + + /** + * Shows the sum of all log events indexed over all hours in the current month for all + * organizations (To be deprecated on October 1st, 2024). + * + * @return indexedEventsCountAggSum + * @deprecated + */ + @Deprecated + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDEXED_EVENTS_COUNT_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getIndexedEventsCountAggSum() { + return indexedEventsCountAggSum; + } + + @Deprecated + public void setIndexedEventsCountAggSum(Long indexedEventsCountAggSum) { + this.indexedEventsCountAggSum = indexedEventsCountAggSum; + } + + public UsageSummaryResponse indexedPointsAggSum(Long indexedPointsAggSum) { + this.indexedPointsAggSum = indexedPointsAggSum; + return this; + } + + /** + * Shows the sum of all indexed custom metrics points over all hours in the current month for all + * organizations. + * + * @return indexedPointsAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDEXED_POINTS_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getIndexedPointsAggSum() { + return indexedPointsAggSum; + } + + public void setIndexedPointsAggSum(Long indexedPointsAggSum) { + this.indexedPointsAggSum = indexedPointsAggSum; + } + + public UsageSummaryResponse infraCpuAggSum(Long infraCpuAggSum) { + this.infraCpuAggSum = infraCpuAggSum; + return this; + } + + /** + * Shows the sum of all Infrastructure vCPU cores over all hours in the current month for all + * organizations. Values are returned in millicores. Divide by 1,000 to convert to cores. + * + * @return infraCpuAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuAggSum() { + return infraCpuAggSum; + } + + public void setInfraCpuAggSum(Long infraCpuAggSum) { + this.infraCpuAggSum = infraCpuAggSum; + } + + public UsageSummaryResponse infraCpuAvgSum(Long infraCpuAvgSum) { + this.infraCpuAvgSum = infraCpuAvgSum; + return this; + } + + /** + * Shows the average of all Infrastructure vCPU cores over all hours in the current month for all + * organizations. Values are returned in millicores. Divide by 1,000 to convert to cores. + * + * @return infraCpuAvgSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_AVG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuAvgSum() { + return infraCpuAvgSum; + } + + public void setInfraCpuAvgSum(Long infraCpuAvgSum) { + this.infraCpuAvgSum = infraCpuAvgSum; + } + + public UsageSummaryResponse infraCpuDefaultInfraHostVcpuAgentAggSum( + Long infraCpuDefaultInfraHostVcpuAgentAggSum) { + this.infraCpuDefaultInfraHostVcpuAgentAggSum = infraCpuDefaultInfraHostVcpuAgentAggSum; + return this; + } + + /** + * Shows the sum of all default Infrastructure host vCPU cores reported by the Datadog Agent over + * all hours in the current month for all organizations. Values are returned in millicores. Divide + * by 1,000 to convert to cores. + * + * @return infraCpuDefaultInfraHostVcpuAgentAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuAgentAggSum() { + return infraCpuDefaultInfraHostVcpuAgentAggSum; + } + + public void setInfraCpuDefaultInfraHostVcpuAgentAggSum( + Long infraCpuDefaultInfraHostVcpuAgentAggSum) { + this.infraCpuDefaultInfraHostVcpuAgentAggSum = infraCpuDefaultInfraHostVcpuAgentAggSum; + } + + public UsageSummaryResponse infraCpuDefaultInfraHostVcpuAgentAvgSum( + Long infraCpuDefaultInfraHostVcpuAgentAvgSum) { + this.infraCpuDefaultInfraHostVcpuAgentAvgSum = infraCpuDefaultInfraHostVcpuAgentAvgSum; + return this; + } + + /** + * Shows the average of all default Infrastructure host vCPU cores reported by the Datadog Agent + * over all hours in the current month for all organizations. Values are returned in millicores. + * Divide by 1,000 to convert to cores. + * + * @return infraCpuDefaultInfraHostVcpuAgentAvgSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_AVG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuAgentAvgSum() { + return infraCpuDefaultInfraHostVcpuAgentAvgSum; + } + + public void setInfraCpuDefaultInfraHostVcpuAgentAvgSum( + Long infraCpuDefaultInfraHostVcpuAgentAvgSum) { + this.infraCpuDefaultInfraHostVcpuAgentAvgSum = infraCpuDefaultInfraHostVcpuAgentAvgSum; + } + + public UsageSummaryResponse infraCpuDefaultInfraHostVcpuAgentBasicAggSum( + Long infraCpuDefaultInfraHostVcpuAgentBasicAggSum) { + this.infraCpuDefaultInfraHostVcpuAgentBasicAggSum = + infraCpuDefaultInfraHostVcpuAgentBasicAggSum; + return this; + } + + /** + * Shows the sum of all default basic Infrastructure host vCPU cores reported by the Datadog Agent + * over all hours in the current month for all organizations. Values are returned in millicores. + * Divide by 1,000 to convert to cores. + * + * @return infraCpuDefaultInfraHostVcpuAgentBasicAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_BASIC_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuAgentBasicAggSum() { + return infraCpuDefaultInfraHostVcpuAgentBasicAggSum; + } + + public void setInfraCpuDefaultInfraHostVcpuAgentBasicAggSum( + Long infraCpuDefaultInfraHostVcpuAgentBasicAggSum) { + this.infraCpuDefaultInfraHostVcpuAgentBasicAggSum = + infraCpuDefaultInfraHostVcpuAgentBasicAggSum; + } + + public UsageSummaryResponse infraCpuDefaultInfraHostVcpuAgentBasicAvgSum( + Long infraCpuDefaultInfraHostVcpuAgentBasicAvgSum) { + this.infraCpuDefaultInfraHostVcpuAgentBasicAvgSum = + infraCpuDefaultInfraHostVcpuAgentBasicAvgSum; + return this; + } + + /** + * Shows the average of all default basic Infrastructure host vCPU cores reported by the Datadog + * Agent over all hours in the current month for all organizations. Values are returned in + * millicores. Divide by 1,000 to convert to cores. + * + * @return infraCpuDefaultInfraHostVcpuAgentBasicAvgSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AGENT_BASIC_AVG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuAgentBasicAvgSum() { + return infraCpuDefaultInfraHostVcpuAgentBasicAvgSum; + } + + public void setInfraCpuDefaultInfraHostVcpuAgentBasicAvgSum( + Long infraCpuDefaultInfraHostVcpuAgentBasicAvgSum) { + this.infraCpuDefaultInfraHostVcpuAgentBasicAvgSum = + infraCpuDefaultInfraHostVcpuAgentBasicAvgSum; + } + + public UsageSummaryResponse infraCpuDefaultInfraHostVcpuAwsAggSum( + Long infraCpuDefaultInfraHostVcpuAwsAggSum) { + this.infraCpuDefaultInfraHostVcpuAwsAggSum = infraCpuDefaultInfraHostVcpuAwsAggSum; + return this; + } + + /** + * Shows the sum of all default Infrastructure host vCPU cores on AWS over all hours in the + * current month for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuDefaultInfraHostVcpuAwsAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AWS_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuAwsAggSum() { + return infraCpuDefaultInfraHostVcpuAwsAggSum; + } + + public void setInfraCpuDefaultInfraHostVcpuAwsAggSum(Long infraCpuDefaultInfraHostVcpuAwsAggSum) { + this.infraCpuDefaultInfraHostVcpuAwsAggSum = infraCpuDefaultInfraHostVcpuAwsAggSum; + } + + public UsageSummaryResponse infraCpuDefaultInfraHostVcpuAwsAvgSum( + Long infraCpuDefaultInfraHostVcpuAwsAvgSum) { + this.infraCpuDefaultInfraHostVcpuAwsAvgSum = infraCpuDefaultInfraHostVcpuAwsAvgSum; + return this; + } + + /** + * Shows the average of all default Infrastructure host vCPU cores on AWS over all hours in the + * current month for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuDefaultInfraHostVcpuAwsAvgSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AWS_AVG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuAwsAvgSum() { + return infraCpuDefaultInfraHostVcpuAwsAvgSum; + } + + public void setInfraCpuDefaultInfraHostVcpuAwsAvgSum(Long infraCpuDefaultInfraHostVcpuAwsAvgSum) { + this.infraCpuDefaultInfraHostVcpuAwsAvgSum = infraCpuDefaultInfraHostVcpuAwsAvgSum; + } + + public UsageSummaryResponse infraCpuDefaultInfraHostVcpuAzureAggSum( + Long infraCpuDefaultInfraHostVcpuAzureAggSum) { + this.infraCpuDefaultInfraHostVcpuAzureAggSum = infraCpuDefaultInfraHostVcpuAzureAggSum; + return this; + } + + /** + * Shows the sum of all default Infrastructure host vCPU cores on Azure over all hours in the + * current month for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuDefaultInfraHostVcpuAzureAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AZURE_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuAzureAggSum() { + return infraCpuDefaultInfraHostVcpuAzureAggSum; + } + + public void setInfraCpuDefaultInfraHostVcpuAzureAggSum( + Long infraCpuDefaultInfraHostVcpuAzureAggSum) { + this.infraCpuDefaultInfraHostVcpuAzureAggSum = infraCpuDefaultInfraHostVcpuAzureAggSum; + } + + public UsageSummaryResponse infraCpuDefaultInfraHostVcpuAzureAvgSum( + Long infraCpuDefaultInfraHostVcpuAzureAvgSum) { + this.infraCpuDefaultInfraHostVcpuAzureAvgSum = infraCpuDefaultInfraHostVcpuAzureAvgSum; + return this; + } + + /** + * Shows the average of all default Infrastructure host vCPU cores on Azure over all hours in the + * current month for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuDefaultInfraHostVcpuAzureAvgSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_AZURE_AVG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuAzureAvgSum() { + return infraCpuDefaultInfraHostVcpuAzureAvgSum; + } + + public void setInfraCpuDefaultInfraHostVcpuAzureAvgSum( + Long infraCpuDefaultInfraHostVcpuAzureAvgSum) { + this.infraCpuDefaultInfraHostVcpuAzureAvgSum = infraCpuDefaultInfraHostVcpuAzureAvgSum; + } + + public UsageSummaryResponse infraCpuDefaultInfraHostVcpuGcpAggSum( + Long infraCpuDefaultInfraHostVcpuGcpAggSum) { + this.infraCpuDefaultInfraHostVcpuGcpAggSum = infraCpuDefaultInfraHostVcpuGcpAggSum; + return this; + } + + /** + * Shows the sum of all default Infrastructure host vCPU cores on GCP over all hours in the + * current month for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuDefaultInfraHostVcpuGcpAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_GCP_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuGcpAggSum() { + return infraCpuDefaultInfraHostVcpuGcpAggSum; + } + + public void setInfraCpuDefaultInfraHostVcpuGcpAggSum(Long infraCpuDefaultInfraHostVcpuGcpAggSum) { + this.infraCpuDefaultInfraHostVcpuGcpAggSum = infraCpuDefaultInfraHostVcpuGcpAggSum; + } + + public UsageSummaryResponse infraCpuDefaultInfraHostVcpuGcpAvgSum( + Long infraCpuDefaultInfraHostVcpuGcpAvgSum) { + this.infraCpuDefaultInfraHostVcpuGcpAvgSum = infraCpuDefaultInfraHostVcpuGcpAvgSum; + return this; + } + + /** + * Shows the average of all default Infrastructure host vCPU cores on GCP over all hours in the + * current month for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuDefaultInfraHostVcpuGcpAvgSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_GCP_AVG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuGcpAvgSum() { + return infraCpuDefaultInfraHostVcpuGcpAvgSum; + } + + public void setInfraCpuDefaultInfraHostVcpuGcpAvgSum(Long infraCpuDefaultInfraHostVcpuGcpAvgSum) { + this.infraCpuDefaultInfraHostVcpuGcpAvgSum = infraCpuDefaultInfraHostVcpuGcpAvgSum; + } + + public UsageSummaryResponse infraCpuDefaultInfraHostVcpuNutanixAggSum( + Long infraCpuDefaultInfraHostVcpuNutanixAggSum) { + this.infraCpuDefaultInfraHostVcpuNutanixAggSum = infraCpuDefaultInfraHostVcpuNutanixAggSum; + return this; + } + + /** + * Shows the sum of all default Infrastructure host vCPU cores on Nutanix over all hours in the + * current month for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuDefaultInfraHostVcpuNutanixAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuNutanixAggSum() { + return infraCpuDefaultInfraHostVcpuNutanixAggSum; + } + + public void setInfraCpuDefaultInfraHostVcpuNutanixAggSum( + Long infraCpuDefaultInfraHostVcpuNutanixAggSum) { + this.infraCpuDefaultInfraHostVcpuNutanixAggSum = infraCpuDefaultInfraHostVcpuNutanixAggSum; + } + + public UsageSummaryResponse infraCpuDefaultInfraHostVcpuNutanixAvgSum( + Long infraCpuDefaultInfraHostVcpuNutanixAvgSum) { + this.infraCpuDefaultInfraHostVcpuNutanixAvgSum = infraCpuDefaultInfraHostVcpuNutanixAvgSum; + return this; + } + + /** + * Shows the average of all default Infrastructure host vCPU cores on Nutanix over all hours in + * the current month for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuDefaultInfraHostVcpuNutanixAvgSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_AVG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuNutanixAvgSum() { + return infraCpuDefaultInfraHostVcpuNutanixAvgSum; + } + + public void setInfraCpuDefaultInfraHostVcpuNutanixAvgSum( + Long infraCpuDefaultInfraHostVcpuNutanixAvgSum) { + this.infraCpuDefaultInfraHostVcpuNutanixAvgSum = infraCpuDefaultInfraHostVcpuNutanixAvgSum; + } + + public UsageSummaryResponse infraCpuDefaultInfraHostVcpuNutanixBasicAggSum( + Long infraCpuDefaultInfraHostVcpuNutanixBasicAggSum) { + this.infraCpuDefaultInfraHostVcpuNutanixBasicAggSum = + infraCpuDefaultInfraHostVcpuNutanixBasicAggSum; + return this; + } + + /** + * Shows the sum of all default basic Infrastructure host vCPU cores on Nutanix over all hours in + * the current month for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuDefaultInfraHostVcpuNutanixBasicAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_BASIC_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuNutanixBasicAggSum() { + return infraCpuDefaultInfraHostVcpuNutanixBasicAggSum; + } + + public void setInfraCpuDefaultInfraHostVcpuNutanixBasicAggSum( + Long infraCpuDefaultInfraHostVcpuNutanixBasicAggSum) { + this.infraCpuDefaultInfraHostVcpuNutanixBasicAggSum = + infraCpuDefaultInfraHostVcpuNutanixBasicAggSum; + } + + public UsageSummaryResponse infraCpuDefaultInfraHostVcpuNutanixBasicAvgSum( + Long infraCpuDefaultInfraHostVcpuNutanixBasicAvgSum) { + this.infraCpuDefaultInfraHostVcpuNutanixBasicAvgSum = + infraCpuDefaultInfraHostVcpuNutanixBasicAvgSum; + return this; + } + + /** + * Shows the average of all default basic Infrastructure host vCPU cores on Nutanix over all hours + * in the current month for all organizations. Values are returned in millicores. Divide by 1,000 + * to convert to cores. + * + * @return infraCpuDefaultInfraHostVcpuNutanixBasicAvgSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_NUTANIX_BASIC_AVG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuNutanixBasicAvgSum() { + return infraCpuDefaultInfraHostVcpuNutanixBasicAvgSum; + } + + public void setInfraCpuDefaultInfraHostVcpuNutanixBasicAvgSum( + Long infraCpuDefaultInfraHostVcpuNutanixBasicAvgSum) { + this.infraCpuDefaultInfraHostVcpuNutanixBasicAvgSum = + infraCpuDefaultInfraHostVcpuNutanixBasicAvgSum; + } + + public UsageSummaryResponse infraCpuDefaultInfraHostVcpuOpentelemetryAggSum( + Long infraCpuDefaultInfraHostVcpuOpentelemetryAggSum) { + this.infraCpuDefaultInfraHostVcpuOpentelemetryAggSum = + infraCpuDefaultInfraHostVcpuOpentelemetryAggSum; + return this; + } + + /** + * Shows the sum of all default Infrastructure host vCPU cores reported by OpenTelemetry over all + * hours in the current month for all organizations. Values are returned in millicores. Divide by + * 1,000 to convert to cores. + * + * @return infraCpuDefaultInfraHostVcpuOpentelemetryAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_OPENTELEMETRY_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuOpentelemetryAggSum() { + return infraCpuDefaultInfraHostVcpuOpentelemetryAggSum; + } + + public void setInfraCpuDefaultInfraHostVcpuOpentelemetryAggSum( + Long infraCpuDefaultInfraHostVcpuOpentelemetryAggSum) { + this.infraCpuDefaultInfraHostVcpuOpentelemetryAggSum = + infraCpuDefaultInfraHostVcpuOpentelemetryAggSum; + } + + public UsageSummaryResponse infraCpuDefaultInfraHostVcpuOpentelemetryAvgSum( + Long infraCpuDefaultInfraHostVcpuOpentelemetryAvgSum) { + this.infraCpuDefaultInfraHostVcpuOpentelemetryAvgSum = + infraCpuDefaultInfraHostVcpuOpentelemetryAvgSum; + return this; + } + + /** + * Shows the average of all default Infrastructure host vCPU cores reported by OpenTelemetry over + * all hours in the current month for all organizations. Values are returned in millicores. Divide + * by 1,000 to convert to cores. + * + * @return infraCpuDefaultInfraHostVcpuOpentelemetryAvgSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_DEFAULT_INFRA_HOST_VCPU_OPENTELEMETRY_AVG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuDefaultInfraHostVcpuOpentelemetryAvgSum() { + return infraCpuDefaultInfraHostVcpuOpentelemetryAvgSum; + } + + public void setInfraCpuDefaultInfraHostVcpuOpentelemetryAvgSum( + Long infraCpuDefaultInfraHostVcpuOpentelemetryAvgSum) { + this.infraCpuDefaultInfraHostVcpuOpentelemetryAvgSum = + infraCpuDefaultInfraHostVcpuOpentelemetryAvgSum; + } + + public UsageSummaryResponse infraCpuObservedInfraHostVcpuAgentAggSum( + Long infraCpuObservedInfraHostVcpuAgentAggSum) { + this.infraCpuObservedInfraHostVcpuAgentAggSum = infraCpuObservedInfraHostVcpuAgentAggSum; + return this; + } + + /** + * Shows the sum of all observed Infrastructure host vCPU cores reported by the Datadog Agent over + * all hours in the current month for all organizations. Values are returned in millicores. Divide + * by 1,000 to convert to cores. + * + * @return infraCpuObservedInfraHostVcpuAgentAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AGENT_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuAgentAggSum() { + return infraCpuObservedInfraHostVcpuAgentAggSum; + } + + public void setInfraCpuObservedInfraHostVcpuAgentAggSum( + Long infraCpuObservedInfraHostVcpuAgentAggSum) { + this.infraCpuObservedInfraHostVcpuAgentAggSum = infraCpuObservedInfraHostVcpuAgentAggSum; + } + + public UsageSummaryResponse infraCpuObservedInfraHostVcpuAgentAvgSum( + Long infraCpuObservedInfraHostVcpuAgentAvgSum) { + this.infraCpuObservedInfraHostVcpuAgentAvgSum = infraCpuObservedInfraHostVcpuAgentAvgSum; + return this; + } + + /** + * Shows the average of all observed Infrastructure host vCPU cores reported by the Datadog Agent + * over all hours in the current month for all organizations. Values are returned in millicores. + * Divide by 1,000 to convert to cores. + * + * @return infraCpuObservedInfraHostVcpuAgentAvgSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AGENT_AVG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuAgentAvgSum() { + return infraCpuObservedInfraHostVcpuAgentAvgSum; + } + + public void setInfraCpuObservedInfraHostVcpuAgentAvgSum( + Long infraCpuObservedInfraHostVcpuAgentAvgSum) { + this.infraCpuObservedInfraHostVcpuAgentAvgSum = infraCpuObservedInfraHostVcpuAgentAvgSum; + } + + public UsageSummaryResponse infraCpuObservedInfraHostVcpuAwsAggSum( + Long infraCpuObservedInfraHostVcpuAwsAggSum) { + this.infraCpuObservedInfraHostVcpuAwsAggSum = infraCpuObservedInfraHostVcpuAwsAggSum; + return this; + } + + /** + * Shows the sum of all observed Infrastructure host vCPU cores on AWS over all hours in the + * current month for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuObservedInfraHostVcpuAwsAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AWS_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuAwsAggSum() { + return infraCpuObservedInfraHostVcpuAwsAggSum; + } + + public void setInfraCpuObservedInfraHostVcpuAwsAggSum( + Long infraCpuObservedInfraHostVcpuAwsAggSum) { + this.infraCpuObservedInfraHostVcpuAwsAggSum = infraCpuObservedInfraHostVcpuAwsAggSum; + } + + public UsageSummaryResponse infraCpuObservedInfraHostVcpuAwsAvgSum( + Long infraCpuObservedInfraHostVcpuAwsAvgSum) { + this.infraCpuObservedInfraHostVcpuAwsAvgSum = infraCpuObservedInfraHostVcpuAwsAvgSum; + return this; + } + + /** + * Shows the average of all observed Infrastructure host vCPU cores on AWS over all hours in the + * current month for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuObservedInfraHostVcpuAwsAvgSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AWS_AVG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuAwsAvgSum() { + return infraCpuObservedInfraHostVcpuAwsAvgSum; + } + + public void setInfraCpuObservedInfraHostVcpuAwsAvgSum( + Long infraCpuObservedInfraHostVcpuAwsAvgSum) { + this.infraCpuObservedInfraHostVcpuAwsAvgSum = infraCpuObservedInfraHostVcpuAwsAvgSum; + } + + public UsageSummaryResponse infraCpuObservedInfraHostVcpuAzureAggSum( + Long infraCpuObservedInfraHostVcpuAzureAggSum) { + this.infraCpuObservedInfraHostVcpuAzureAggSum = infraCpuObservedInfraHostVcpuAzureAggSum; + return this; + } + + /** + * Shows the sum of all observed Infrastructure host vCPU cores on Azure over all hours in the + * current month for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuObservedInfraHostVcpuAzureAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AZURE_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuAzureAggSum() { + return infraCpuObservedInfraHostVcpuAzureAggSum; + } + + public void setInfraCpuObservedInfraHostVcpuAzureAggSum( + Long infraCpuObservedInfraHostVcpuAzureAggSum) { + this.infraCpuObservedInfraHostVcpuAzureAggSum = infraCpuObservedInfraHostVcpuAzureAggSum; + } + + public UsageSummaryResponse infraCpuObservedInfraHostVcpuAzureAvgSum( + Long infraCpuObservedInfraHostVcpuAzureAvgSum) { + this.infraCpuObservedInfraHostVcpuAzureAvgSum = infraCpuObservedInfraHostVcpuAzureAvgSum; + return this; + } + + /** + * Shows the average of all observed Infrastructure host vCPU cores on Azure over all hours in the + * current month for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuObservedInfraHostVcpuAzureAvgSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_AZURE_AVG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuAzureAvgSum() { + return infraCpuObservedInfraHostVcpuAzureAvgSum; + } + + public void setInfraCpuObservedInfraHostVcpuAzureAvgSum( + Long infraCpuObservedInfraHostVcpuAzureAvgSum) { + this.infraCpuObservedInfraHostVcpuAzureAvgSum = infraCpuObservedInfraHostVcpuAzureAvgSum; + } + + public UsageSummaryResponse infraCpuObservedInfraHostVcpuGcpAggSum( + Long infraCpuObservedInfraHostVcpuGcpAggSum) { + this.infraCpuObservedInfraHostVcpuGcpAggSum = infraCpuObservedInfraHostVcpuGcpAggSum; + return this; + } + + /** + * Shows the sum of all observed Infrastructure host vCPU cores on GCP over all hours in the + * current month for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuObservedInfraHostVcpuGcpAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_GCP_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuGcpAggSum() { + return infraCpuObservedInfraHostVcpuGcpAggSum; + } + + public void setInfraCpuObservedInfraHostVcpuGcpAggSum( + Long infraCpuObservedInfraHostVcpuGcpAggSum) { + this.infraCpuObservedInfraHostVcpuGcpAggSum = infraCpuObservedInfraHostVcpuGcpAggSum; + } + + public UsageSummaryResponse infraCpuObservedInfraHostVcpuGcpAvgSum( + Long infraCpuObservedInfraHostVcpuGcpAvgSum) { + this.infraCpuObservedInfraHostVcpuGcpAvgSum = infraCpuObservedInfraHostVcpuGcpAvgSum; + return this; + } + + /** + * Shows the average of all observed Infrastructure host vCPU cores on GCP over all hours in the + * current month for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuObservedInfraHostVcpuGcpAvgSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_GCP_AVG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuGcpAvgSum() { + return infraCpuObservedInfraHostVcpuGcpAvgSum; + } + + public void setInfraCpuObservedInfraHostVcpuGcpAvgSum( + Long infraCpuObservedInfraHostVcpuGcpAvgSum) { + this.infraCpuObservedInfraHostVcpuGcpAvgSum = infraCpuObservedInfraHostVcpuGcpAvgSum; + } + + public UsageSummaryResponse infraCpuObservedInfraHostVcpuNutanixAggSum( + Long infraCpuObservedInfraHostVcpuNutanixAggSum) { + this.infraCpuObservedInfraHostVcpuNutanixAggSum = infraCpuObservedInfraHostVcpuNutanixAggSum; + return this; + } + + /** + * Shows the sum of all observed Infrastructure host vCPU cores on Nutanix over all hours in the + * current month for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuObservedInfraHostVcpuNutanixAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_NUTANIX_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuNutanixAggSum() { + return infraCpuObservedInfraHostVcpuNutanixAggSum; + } + + public void setInfraCpuObservedInfraHostVcpuNutanixAggSum( + Long infraCpuObservedInfraHostVcpuNutanixAggSum) { + this.infraCpuObservedInfraHostVcpuNutanixAggSum = infraCpuObservedInfraHostVcpuNutanixAggSum; + } + + public UsageSummaryResponse infraCpuObservedInfraHostVcpuNutanixAvgSum( + Long infraCpuObservedInfraHostVcpuNutanixAvgSum) { + this.infraCpuObservedInfraHostVcpuNutanixAvgSum = infraCpuObservedInfraHostVcpuNutanixAvgSum; + return this; + } + + /** + * Shows the average of all observed Infrastructure host vCPU cores on Nutanix over all hours in + * the current month for all organizations. Values are returned in millicores. Divide by 1,000 to + * convert to cores. + * + * @return infraCpuObservedInfraHostVcpuNutanixAvgSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_NUTANIX_AVG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getInfraCpuObservedInfraHostVcpuNutanixAvgSum() { + return infraCpuObservedInfraHostVcpuNutanixAvgSum; } - public void setIncidentManagementMonthlyActiveUsersHwmSum( - Long incidentManagementMonthlyActiveUsersHwmSum) { - this.incidentManagementMonthlyActiveUsersHwmSum = incidentManagementMonthlyActiveUsersHwmSum; + public void setInfraCpuObservedInfraHostVcpuNutanixAvgSum( + Long infraCpuObservedInfraHostVcpuNutanixAvgSum) { + this.infraCpuObservedInfraHostVcpuNutanixAvgSum = infraCpuObservedInfraHostVcpuNutanixAvgSum; } - public UsageSummaryResponse incidentManagementSeatsHwmSum(Long incidentManagementSeatsHwmSum) { - this.incidentManagementSeatsHwmSum = incidentManagementSeatsHwmSum; + public UsageSummaryResponse infraCpuObservedInfraHostVcpuOpentelemetryAggSum( + Long infraCpuObservedInfraHostVcpuOpentelemetryAggSum) { + this.infraCpuObservedInfraHostVcpuOpentelemetryAggSum = + infraCpuObservedInfraHostVcpuOpentelemetryAggSum; return this; } /** - * Shows the sum of the high-water marks of Incident Management seats over all hours in the - * current month for all organizations. + * Shows the sum of all observed Infrastructure host vCPU cores reported by OpenTelemetry over all + * hours in the current month for all organizations. Values are returned in millicores. Divide by + * 1,000 to convert to cores. * - * @return incidentManagementSeatsHwmSum + * @return infraCpuObservedInfraHostVcpuOpentelemetryAggSum */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCIDENT_MANAGEMENT_SEATS_HWM_SUM) + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_OPENTELEMETRY_AGG_SUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIncidentManagementSeatsHwmSum() { - return incidentManagementSeatsHwmSum; + public Long getInfraCpuObservedInfraHostVcpuOpentelemetryAggSum() { + return infraCpuObservedInfraHostVcpuOpentelemetryAggSum; } - public void setIncidentManagementSeatsHwmSum(Long incidentManagementSeatsHwmSum) { - this.incidentManagementSeatsHwmSum = incidentManagementSeatsHwmSum; + public void setInfraCpuObservedInfraHostVcpuOpentelemetryAggSum( + Long infraCpuObservedInfraHostVcpuOpentelemetryAggSum) { + this.infraCpuObservedInfraHostVcpuOpentelemetryAggSum = + infraCpuObservedInfraHostVcpuOpentelemetryAggSum; } - public UsageSummaryResponse indexedEventsCountAggSum(Long indexedEventsCountAggSum) { - this.indexedEventsCountAggSum = indexedEventsCountAggSum; + public UsageSummaryResponse infraCpuObservedInfraHostVcpuOpentelemetryAvgSum( + Long infraCpuObservedInfraHostVcpuOpentelemetryAvgSum) { + this.infraCpuObservedInfraHostVcpuOpentelemetryAvgSum = + infraCpuObservedInfraHostVcpuOpentelemetryAvgSum; return this; } /** - * Shows the sum of all log events indexed over all hours in the current month for all - * organizations (To be deprecated on October 1st, 2024). + * Shows the average of all observed Infrastructure host vCPU cores reported by OpenTelemetry over + * all hours in the current month for all organizations. Values are returned in millicores. Divide + * by 1,000 to convert to cores. * - * @return indexedEventsCountAggSum - * @deprecated + * @return infraCpuObservedInfraHostVcpuOpentelemetryAvgSum */ - @Deprecated @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INDEXED_EVENTS_COUNT_AGG_SUM) + @JsonProperty(JSON_PROPERTY_INFRA_CPU_OBSERVED_INFRA_HOST_VCPU_OPENTELEMETRY_AVG_SUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getIndexedEventsCountAggSum() { - return indexedEventsCountAggSum; + public Long getInfraCpuObservedInfraHostVcpuOpentelemetryAvgSum() { + return infraCpuObservedInfraHostVcpuOpentelemetryAvgSum; } - @Deprecated - public void setIndexedEventsCountAggSum(Long indexedEventsCountAggSum) { - this.indexedEventsCountAggSum = indexedEventsCountAggSum; + public void setInfraCpuObservedInfraHostVcpuOpentelemetryAvgSum( + Long infraCpuObservedInfraHostVcpuOpentelemetryAvgSum) { + this.infraCpuObservedInfraHostVcpuOpentelemetryAvgSum = + infraCpuObservedInfraHostVcpuOpentelemetryAvgSum; } public UsageSummaryResponse infraEdgeMonitoringDevicesTop99pSum( @@ -4479,6 +5690,28 @@ public void setInfraStorageMgmtObjectsCountAvgSum(Long infraStorageMgmtObjectsCo this.infraStorageMgmtObjectsCountAvgSum = infraStorageMgmtObjectsCountAvgSum; } + public UsageSummaryResponse ingestPointsAggSum(Long ingestPointsAggSum) { + this.ingestPointsAggSum = ingestPointsAggSum; + return this; + } + + /** + * Shows the sum of all ingested custom metrics points over all hours in the current month for all + * organizations. + * + * @return ingestPointsAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INGEST_POINTS_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getIngestPointsAggSum() { + return ingestPointsAggSum; + } + + public void setIngestPointsAggSum(Long ingestPointsAggSum) { + this.ingestPointsAggSum = ingestPointsAggSum; + } + public UsageSummaryResponse ingestedEventsBytesAggSum(Long ingestedEventsBytesAggSum) { this.ingestedEventsBytesAggSum = ingestedEventsBytesAggSum; return this; @@ -4501,6 +5734,50 @@ public void setIngestedEventsBytesAggSum(Long ingestedEventsBytesAggSum) { this.ingestedEventsBytesAggSum = ingestedEventsBytesAggSum; } + public UsageSummaryResponse iotApmHostAggSum(Long iotApmHostAggSum) { + this.iotApmHostAggSum = iotApmHostAggSum; + return this; + } + + /** + * Shows the sum of all Application Performance Monitoring IoT hosts over all hours in the current + * month for all organizations. + * + * @return iotApmHostAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IOT_APM_HOST_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getIotApmHostAggSum() { + return iotApmHostAggSum; + } + + public void setIotApmHostAggSum(Long iotApmHostAggSum) { + this.iotApmHostAggSum = iotApmHostAggSum; + } + + public UsageSummaryResponse iotApmHostTop99pSum(Long iotApmHostTop99pSum) { + this.iotApmHostTop99pSum = iotApmHostTop99pSum; + return this; + } + + /** + * Shows the 99th percentile of all Application Performance Monitoring IoT hosts over all hours in + * the current month for all organizations. + * + * @return iotApmHostTop99pSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IOT_APM_HOST_TOP99P_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getIotApmHostTop99pSum() { + return iotApmHostTop99pSum; + } + + public void setIotApmHostTop99pSum(Long iotApmHostTop99pSum) { + this.iotApmHostTop99pSum = iotApmHostTop99pSum; + } + public UsageSummaryResponse iotDeviceAggSum(Long iotDeviceAggSum) { this.iotDeviceAggSum = iotDeviceAggSum; return this; @@ -4613,6 +5890,102 @@ public void setLiveIngestedBytesAggSum(Long liveIngestedBytesAggSum) { this.liveIngestedBytesAggSum = liveIngestedBytesAggSum; } + public UsageSummaryResponse llmObservability15dayRetentionSpansAggSum( + Long llmObservability15dayRetentionSpansAggSum) { + this.llmObservability15dayRetentionSpansAggSum = llmObservability15dayRetentionSpansAggSum; + return this; + } + + /** + * Shows the sum of all LLM Observability 15-day retention spans over all hours in the current + * month for all organizations. + * + * @return llmObservability15dayRetentionSpansAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LLM_OBSERVABILITY_15DAY_RETENTION_SPANS_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLlmObservability15dayRetentionSpansAggSum() { + return llmObservability15dayRetentionSpansAggSum; + } + + public void setLlmObservability15dayRetentionSpansAggSum( + Long llmObservability15dayRetentionSpansAggSum) { + this.llmObservability15dayRetentionSpansAggSum = llmObservability15dayRetentionSpansAggSum; + } + + public UsageSummaryResponse llmObservability30dayRetentionSpansAggSum( + Long llmObservability30dayRetentionSpansAggSum) { + this.llmObservability30dayRetentionSpansAggSum = llmObservability30dayRetentionSpansAggSum; + return this; + } + + /** + * Shows the sum of all LLM Observability 30-day retention spans over all hours in the current + * month for all organizations. + * + * @return llmObservability30dayRetentionSpansAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LLM_OBSERVABILITY_30DAY_RETENTION_SPANS_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLlmObservability30dayRetentionSpansAggSum() { + return llmObservability30dayRetentionSpansAggSum; + } + + public void setLlmObservability30dayRetentionSpansAggSum( + Long llmObservability30dayRetentionSpansAggSum) { + this.llmObservability30dayRetentionSpansAggSum = llmObservability30dayRetentionSpansAggSum; + } + + public UsageSummaryResponse llmObservability60dayRetentionSpansAggSum( + Long llmObservability60dayRetentionSpansAggSum) { + this.llmObservability60dayRetentionSpansAggSum = llmObservability60dayRetentionSpansAggSum; + return this; + } + + /** + * Shows the sum of all LLM Observability 60-day retention spans over all hours in the current + * month for all organizations. + * + * @return llmObservability60dayRetentionSpansAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LLM_OBSERVABILITY_60DAY_RETENTION_SPANS_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLlmObservability60dayRetentionSpansAggSum() { + return llmObservability60dayRetentionSpansAggSum; + } + + public void setLlmObservability60dayRetentionSpansAggSum( + Long llmObservability60dayRetentionSpansAggSum) { + this.llmObservability60dayRetentionSpansAggSum = llmObservability60dayRetentionSpansAggSum; + } + + public UsageSummaryResponse llmObservability90dayRetentionSpansAggSum( + Long llmObservability90dayRetentionSpansAggSum) { + this.llmObservability90dayRetentionSpansAggSum = llmObservability90dayRetentionSpansAggSum; + return this; + } + + /** + * Shows the sum of all LLM Observability 90-day retention spans over all hours in the current + * month for all organizations. + * + * @return llmObservability90dayRetentionSpansAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LLM_OBSERVABILITY_90DAY_RETENTION_SPANS_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLlmObservability90dayRetentionSpansAggSum() { + return llmObservability90dayRetentionSpansAggSum; + } + + public void setLlmObservability90dayRetentionSpansAggSum( + Long llmObservability90dayRetentionSpansAggSum) { + this.llmObservability90dayRetentionSpansAggSum = llmObservability90dayRetentionSpansAggSum; + } + public UsageSummaryResponse llmObservabilityAggSum(Long llmObservabilityAggSum) { this.llmObservabilityAggSum = llmObservabilityAggSum; return this; @@ -4656,6 +6029,29 @@ public void setLlmObservabilityMinSpendAggSum(Long llmObservabilityMinSpendAggSu this.llmObservabilityMinSpendAggSum = llmObservabilityMinSpendAggSum; } + public UsageSummaryResponse logsArchiveSearchGbScannedAggSum( + Long logsArchiveSearchGbScannedAggSum) { + this.logsArchiveSearchGbScannedAggSum = logsArchiveSearchGbScannedAggSum; + return this; + } + + /** + * Shows the sum of all Logs Archive Search scanned data over all hours in the current month for + * all organizations. + * + * @return logsArchiveSearchGbScannedAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOGS_ARCHIVE_SEARCH_GB_SCANNED_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLogsArchiveSearchGbScannedAggSum() { + return logsArchiveSearchGbScannedAggSum; + } + + public void setLogsArchiveSearchGbScannedAggSum(Long logsArchiveSearchGbScannedAggSum) { + this.logsArchiveSearchGbScannedAggSum = logsArchiveSearchGbScannedAggSum; + } + public UsageSummaryResponse logsByRetention(LogsByRetention logsByRetention) { this.logsByRetention = logsByRetention; this.unparsed |= logsByRetention.unparsed; @@ -4678,6 +6074,28 @@ public void setLogsByRetention(LogsByRetention logsByRetention) { this.logsByRetention = logsByRetention; } + public UsageSummaryResponse metricNamesAggSum(Long metricNamesAggSum) { + this.metricNamesAggSum = metricNamesAggSum; + return this; + } + + /** + * Shows the sum of all custom metric names over all hours in the current month for all + * organizations. + * + * @return metricNamesAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC_NAMES_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getMetricNamesAggSum() { + return metricNamesAggSum; + } + + public void setMetricNamesAggSum(Long metricNamesAggSum) { + this.metricNamesAggSum = metricNamesAggSum; + } + public UsageSummaryResponse mobileRumLiteSessionCountAggSum( Long mobileRumLiteSessionCountAggSum) { this.mobileRumLiteSessionCountAggSum = mobileRumLiteSessionCountAggSum; @@ -7084,6 +8502,50 @@ public void setSiemAnalyzedLogsAddOnCountAggSum(Long siemAnalyzedLogsAddOnCountA this.siemAnalyzedLogsAddOnCountAggSum = siemAnalyzedLogsAddOnCountAggSum; } + public UsageSummaryResponse snmpDeviceCountAggSum(Long snmpDeviceCountAggSum) { + this.snmpDeviceCountAggSum = snmpDeviceCountAggSum; + return this; + } + + /** + * Shows the sum of all Network Device Monitoring devices over all hours in the current month for + * all organizations. + * + * @return snmpDeviceCountAggSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SNMP_DEVICE_COUNT_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getSnmpDeviceCountAggSum() { + return snmpDeviceCountAggSum; + } + + public void setSnmpDeviceCountAggSum(Long snmpDeviceCountAggSum) { + this.snmpDeviceCountAggSum = snmpDeviceCountAggSum; + } + + public UsageSummaryResponse snmpDeviceCountTop99pSum(Long snmpDeviceCountTop99pSum) { + this.snmpDeviceCountTop99pSum = snmpDeviceCountTop99pSum; + return this; + } + + /** + * Shows the 99th percentile of all Network Device Monitoring devices over all hours in the + * current month for all organizations. + * + * @return snmpDeviceCountTop99pSum + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SNMP_DEVICE_COUNT_TOP99P_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getSnmpDeviceCountTop99pSum() { + return snmpDeviceCountTop99pSum; + } + + public void setSnmpDeviceCountTop99pSum(Long snmpDeviceCountTop99pSum) { + this.snmpDeviceCountTop99pSum = snmpDeviceCountTop99pSum; + } + public UsageSummaryResponse startDate(OffsetDateTime startDate) { this.startDate = startDate; return this; @@ -7423,6 +8885,19 @@ public boolean equals(Object o) { } UsageSummaryResponse usageSummaryResponse = (UsageSummaryResponse) o; return Objects.equals(this.agentHostTop99pSum, usageSummaryResponse.agentHostTop99pSum) + && Objects.equals( + this.aiCreditsAgentBuilderAiCreditsAggSum, + usageSummaryResponse.aiCreditsAgentBuilderAiCreditsAggSum) + && Objects.equals(this.aiCreditsAggSum, usageSummaryResponse.aiCreditsAggSum) + && Objects.equals( + this.aiCreditsBitsAssistantAiCreditsAggSum, + usageSummaryResponse.aiCreditsBitsAssistantAiCreditsAggSum) + && Objects.equals( + this.aiCreditsBitsDevAiCreditsAggSum, + usageSummaryResponse.aiCreditsBitsDevAiCreditsAggSum) + && Objects.equals( + this.aiCreditsBitsSreAiCreditsAggSum, + usageSummaryResponse.aiCreditsBitsSreAiCreditsAggSum) && Objects.equals( this.apmAzureAppServiceHostTop99pSum, usageSummaryResponse.apmAzureAppServiceHostTop99pSum) @@ -7443,6 +8918,9 @@ public boolean equals(Object o) { this.auditLogsLinesIndexedAggSum, usageSummaryResponse.auditLogsLinesIndexedAggSum) && Objects.equals( this.auditTrailEnabledHwmSum, usageSummaryResponse.auditTrailEnabledHwmSum) + && Objects.equals( + this.auditTrailEventForwardingEventsAggSum, + usageSummaryResponse.auditTrailEventForwardingEventsAggSum) && Objects.equals( this.avgProfiledFargateTasksSum, usageSummaryResponse.avgProfiledFargateTasksSum) && Objects.equals(this.awsHostTop99pSum, usageSummaryResponse.awsHostTop99pSum) @@ -7592,6 +9070,12 @@ public boolean equals(Object o) { && Objects.equals( this.dataJobsMonitoringHostHrAggSum, usageSummaryResponse.dataJobsMonitoringHostHrAggSum) + && Objects.equals( + this.dataStreamMonitoringHostCountAggSum, + usageSummaryResponse.dataStreamMonitoringHostCountAggSum) + && Objects.equals( + this.dataStreamMonitoringHostCountTop99pSum, + usageSummaryResponse.dataStreamMonitoringHostCountTop99pSum) && Objects.equals(this.dbmHostTop99pSum, usageSummaryResponse.dbmHostTop99pSum) && Objects.equals(this.dbmQueriesAvgSum, usageSummaryResponse.dbmQueriesAvgSum) && Objects.equals( @@ -7694,6 +9178,93 @@ public boolean equals(Object o) { this.incidentManagementSeatsHwmSum, usageSummaryResponse.incidentManagementSeatsHwmSum) && Objects.equals( this.indexedEventsCountAggSum, usageSummaryResponse.indexedEventsCountAggSum) + && Objects.equals(this.indexedPointsAggSum, usageSummaryResponse.indexedPointsAggSum) + && Objects.equals(this.infraCpuAggSum, usageSummaryResponse.infraCpuAggSum) + && Objects.equals(this.infraCpuAvgSum, usageSummaryResponse.infraCpuAvgSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuAgentAggSum, + usageSummaryResponse.infraCpuDefaultInfraHostVcpuAgentAggSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuAgentAvgSum, + usageSummaryResponse.infraCpuDefaultInfraHostVcpuAgentAvgSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuAgentBasicAggSum, + usageSummaryResponse.infraCpuDefaultInfraHostVcpuAgentBasicAggSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuAgentBasicAvgSum, + usageSummaryResponse.infraCpuDefaultInfraHostVcpuAgentBasicAvgSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuAwsAggSum, + usageSummaryResponse.infraCpuDefaultInfraHostVcpuAwsAggSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuAwsAvgSum, + usageSummaryResponse.infraCpuDefaultInfraHostVcpuAwsAvgSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuAzureAggSum, + usageSummaryResponse.infraCpuDefaultInfraHostVcpuAzureAggSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuAzureAvgSum, + usageSummaryResponse.infraCpuDefaultInfraHostVcpuAzureAvgSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuGcpAggSum, + usageSummaryResponse.infraCpuDefaultInfraHostVcpuGcpAggSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuGcpAvgSum, + usageSummaryResponse.infraCpuDefaultInfraHostVcpuGcpAvgSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuNutanixAggSum, + usageSummaryResponse.infraCpuDefaultInfraHostVcpuNutanixAggSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuNutanixAvgSum, + usageSummaryResponse.infraCpuDefaultInfraHostVcpuNutanixAvgSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuNutanixBasicAggSum, + usageSummaryResponse.infraCpuDefaultInfraHostVcpuNutanixBasicAggSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuNutanixBasicAvgSum, + usageSummaryResponse.infraCpuDefaultInfraHostVcpuNutanixBasicAvgSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuOpentelemetryAggSum, + usageSummaryResponse.infraCpuDefaultInfraHostVcpuOpentelemetryAggSum) + && Objects.equals( + this.infraCpuDefaultInfraHostVcpuOpentelemetryAvgSum, + usageSummaryResponse.infraCpuDefaultInfraHostVcpuOpentelemetryAvgSum) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuAgentAggSum, + usageSummaryResponse.infraCpuObservedInfraHostVcpuAgentAggSum) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuAgentAvgSum, + usageSummaryResponse.infraCpuObservedInfraHostVcpuAgentAvgSum) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuAwsAggSum, + usageSummaryResponse.infraCpuObservedInfraHostVcpuAwsAggSum) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuAwsAvgSum, + usageSummaryResponse.infraCpuObservedInfraHostVcpuAwsAvgSum) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuAzureAggSum, + usageSummaryResponse.infraCpuObservedInfraHostVcpuAzureAggSum) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuAzureAvgSum, + usageSummaryResponse.infraCpuObservedInfraHostVcpuAzureAvgSum) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuGcpAggSum, + usageSummaryResponse.infraCpuObservedInfraHostVcpuGcpAggSum) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuGcpAvgSum, + usageSummaryResponse.infraCpuObservedInfraHostVcpuGcpAvgSum) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuNutanixAggSum, + usageSummaryResponse.infraCpuObservedInfraHostVcpuNutanixAggSum) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuNutanixAvgSum, + usageSummaryResponse.infraCpuObservedInfraHostVcpuNutanixAvgSum) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuOpentelemetryAggSum, + usageSummaryResponse.infraCpuObservedInfraHostVcpuOpentelemetryAggSum) + && Objects.equals( + this.infraCpuObservedInfraHostVcpuOpentelemetryAvgSum, + usageSummaryResponse.infraCpuObservedInfraHostVcpuOpentelemetryAvgSum) && Objects.equals( this.infraEdgeMonitoringDevicesTop99pSum, usageSummaryResponse.infraEdgeMonitoringDevicesTop99pSum) @@ -7709,8 +9280,11 @@ public boolean equals(Object o) { && Objects.equals( this.infraStorageMgmtObjectsCountAvgSum, usageSummaryResponse.infraStorageMgmtObjectsCountAvgSum) + && Objects.equals(this.ingestPointsAggSum, usageSummaryResponse.ingestPointsAggSum) && Objects.equals( this.ingestedEventsBytesAggSum, usageSummaryResponse.ingestedEventsBytesAggSum) + && Objects.equals(this.iotApmHostAggSum, usageSummaryResponse.iotApmHostAggSum) + && Objects.equals(this.iotApmHostTop99pSum, usageSummaryResponse.iotApmHostTop99pSum) && Objects.equals(this.iotDeviceAggSum, usageSummaryResponse.iotDeviceAggSum) && Objects.equals(this.iotDeviceTop99pSum, usageSummaryResponse.iotDeviceTop99pSum) && Objects.equals(this.lastUpdated, usageSummaryResponse.lastUpdated) @@ -7718,11 +9292,27 @@ public boolean equals(Object o) { this.liveIndexedEventsAggSum, usageSummaryResponse.liveIndexedEventsAggSum) && Objects.equals( this.liveIngestedBytesAggSum, usageSummaryResponse.liveIngestedBytesAggSum) + && Objects.equals( + this.llmObservability15dayRetentionSpansAggSum, + usageSummaryResponse.llmObservability15dayRetentionSpansAggSum) + && Objects.equals( + this.llmObservability30dayRetentionSpansAggSum, + usageSummaryResponse.llmObservability30dayRetentionSpansAggSum) + && Objects.equals( + this.llmObservability60dayRetentionSpansAggSum, + usageSummaryResponse.llmObservability60dayRetentionSpansAggSum) + && Objects.equals( + this.llmObservability90dayRetentionSpansAggSum, + usageSummaryResponse.llmObservability90dayRetentionSpansAggSum) && Objects.equals(this.llmObservabilityAggSum, usageSummaryResponse.llmObservabilityAggSum) && Objects.equals( this.llmObservabilityMinSpendAggSum, usageSummaryResponse.llmObservabilityMinSpendAggSum) + && Objects.equals( + this.logsArchiveSearchGbScannedAggSum, + usageSummaryResponse.logsArchiveSearchGbScannedAggSum) && Objects.equals(this.logsByRetention, usageSummaryResponse.logsByRetention) + && Objects.equals(this.metricNamesAggSum, usageSummaryResponse.metricNamesAggSum) && Objects.equals( this.mobileRumLiteSessionCountAggSum, usageSummaryResponse.mobileRumLiteSessionCountAggSum) @@ -7969,6 +9559,9 @@ public boolean equals(Object o) { && Objects.equals( this.siemAnalyzedLogsAddOnCountAggSum, usageSummaryResponse.siemAnalyzedLogsAddOnCountAggSum) + && Objects.equals(this.snmpDeviceCountAggSum, usageSummaryResponse.snmpDeviceCountAggSum) + && Objects.equals( + this.snmpDeviceCountTop99pSum, usageSummaryResponse.snmpDeviceCountTop99pSum) && Objects.equals(this.startDate, usageSummaryResponse.startDate) && Objects.equals( this.syntheticsBrowserCheckCallsCountAggSum, @@ -8004,6 +9597,11 @@ public boolean equals(Object o) { public int hashCode() { return Objects.hash( agentHostTop99pSum, + aiCreditsAgentBuilderAiCreditsAggSum, + aiCreditsAggSum, + aiCreditsBitsAssistantAiCreditsAggSum, + aiCreditsBitsDevAiCreditsAggSum, + aiCreditsBitsSreAiCreditsAggSum, apmAzureAppServiceHostTop99pSum, apmDevsecopsHostTop99pSum, apmEnterpriseStandaloneHostsTop99pSum, @@ -8014,6 +9612,7 @@ public int hashCode() { asmServerlessAggSum, auditLogsLinesIndexedAggSum, auditTrailEnabledHwmSum, + auditTrailEventForwardingEventsAggSum, avgProfiledFargateTasksSum, awsHostTop99pSum, awsLambdaFuncCount, @@ -8089,6 +9688,8 @@ public int hashCode() { cwsFargateTaskAvgSum, cwsHostTop99pSum, dataJobsMonitoringHostHrAggSum, + dataStreamMonitoringHostCountAggSum, + dataStreamMonitoringHostCountTop99pSum, dbmHostTop99pSum, dbmQueriesAvgSum, doJobsMonitoringOrchestratorsJobHoursAggSum, @@ -8137,21 +9738,61 @@ public int hashCode() { incidentManagementMonthlyActiveUsersHwmSum, incidentManagementSeatsHwmSum, indexedEventsCountAggSum, + indexedPointsAggSum, + infraCpuAggSum, + infraCpuAvgSum, + infraCpuDefaultInfraHostVcpuAgentAggSum, + infraCpuDefaultInfraHostVcpuAgentAvgSum, + infraCpuDefaultInfraHostVcpuAgentBasicAggSum, + infraCpuDefaultInfraHostVcpuAgentBasicAvgSum, + infraCpuDefaultInfraHostVcpuAwsAggSum, + infraCpuDefaultInfraHostVcpuAwsAvgSum, + infraCpuDefaultInfraHostVcpuAzureAggSum, + infraCpuDefaultInfraHostVcpuAzureAvgSum, + infraCpuDefaultInfraHostVcpuGcpAggSum, + infraCpuDefaultInfraHostVcpuGcpAvgSum, + infraCpuDefaultInfraHostVcpuNutanixAggSum, + infraCpuDefaultInfraHostVcpuNutanixAvgSum, + infraCpuDefaultInfraHostVcpuNutanixBasicAggSum, + infraCpuDefaultInfraHostVcpuNutanixBasicAvgSum, + infraCpuDefaultInfraHostVcpuOpentelemetryAggSum, + infraCpuDefaultInfraHostVcpuOpentelemetryAvgSum, + infraCpuObservedInfraHostVcpuAgentAggSum, + infraCpuObservedInfraHostVcpuAgentAvgSum, + infraCpuObservedInfraHostVcpuAwsAggSum, + infraCpuObservedInfraHostVcpuAwsAvgSum, + infraCpuObservedInfraHostVcpuAzureAggSum, + infraCpuObservedInfraHostVcpuAzureAvgSum, + infraCpuObservedInfraHostVcpuGcpAggSum, + infraCpuObservedInfraHostVcpuGcpAvgSum, + infraCpuObservedInfraHostVcpuNutanixAggSum, + infraCpuObservedInfraHostVcpuNutanixAvgSum, + infraCpuObservedInfraHostVcpuOpentelemetryAggSum, + infraCpuObservedInfraHostVcpuOpentelemetryAvgSum, infraEdgeMonitoringDevicesTop99pSum, infraHostBasicInfraBasicAgentTop99pSum, infraHostBasicInfraBasicVsphereTop99pSum, infraHostBasicTop99pSum, infraHostTop99pSum, infraStorageMgmtObjectsCountAvgSum, + ingestPointsAggSum, ingestedEventsBytesAggSum, + iotApmHostAggSum, + iotApmHostTop99pSum, iotDeviceAggSum, iotDeviceTop99pSum, lastUpdated, liveIndexedEventsAggSum, liveIngestedBytesAggSum, + llmObservability15dayRetentionSpansAggSum, + llmObservability30dayRetentionSpansAggSum, + llmObservability60dayRetentionSpansAggSum, + llmObservability90dayRetentionSpansAggSum, llmObservabilityAggSum, llmObservabilityMinSpendAggSum, + logsArchiveSearchGbScannedAggSum, logsByRetention, + metricNamesAggSum, mobileRumLiteSessionCountAggSum, mobileRumSessionCountAggSum, mobileRumSessionCountAndroidAggSum, @@ -8253,6 +9894,8 @@ public int hashCode() { siem12moRetentionAggSum, siem6moRetentionAggSum, siemAnalyzedLogsAddOnCountAggSum, + snmpDeviceCountAggSum, + snmpDeviceCountTop99pSum, startDate, syntheticsBrowserCheckCallsCountAggSum, syntheticsCheckCallsCountAggSum, @@ -8273,6 +9916,19 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UsageSummaryResponse {\n"); sb.append(" agentHostTop99pSum: ").append(toIndentedString(agentHostTop99pSum)).append("\n"); + sb.append(" aiCreditsAgentBuilderAiCreditsAggSum: ") + .append(toIndentedString(aiCreditsAgentBuilderAiCreditsAggSum)) + .append("\n"); + sb.append(" aiCreditsAggSum: ").append(toIndentedString(aiCreditsAggSum)).append("\n"); + sb.append(" aiCreditsBitsAssistantAiCreditsAggSum: ") + .append(toIndentedString(aiCreditsBitsAssistantAiCreditsAggSum)) + .append("\n"); + sb.append(" aiCreditsBitsDevAiCreditsAggSum: ") + .append(toIndentedString(aiCreditsBitsDevAiCreditsAggSum)) + .append("\n"); + sb.append(" aiCreditsBitsSreAiCreditsAggSum: ") + .append(toIndentedString(aiCreditsBitsSreAiCreditsAggSum)) + .append("\n"); sb.append(" apmAzureAppServiceHostTop99pSum: ") .append(toIndentedString(apmAzureAppServiceHostTop99pSum)) .append("\n"); @@ -8301,6 +9957,9 @@ public String toString() { sb.append(" auditTrailEnabledHwmSum: ") .append(toIndentedString(auditTrailEnabledHwmSum)) .append("\n"); + sb.append(" auditTrailEventForwardingEventsAggSum: ") + .append(toIndentedString(auditTrailEventForwardingEventsAggSum)) + .append("\n"); sb.append(" avgProfiledFargateTasksSum: ") .append(toIndentedString(avgProfiledFargateTasksSum)) .append("\n"); @@ -8500,6 +10159,12 @@ public String toString() { sb.append(" dataJobsMonitoringHostHrAggSum: ") .append(toIndentedString(dataJobsMonitoringHostHrAggSum)) .append("\n"); + sb.append(" dataStreamMonitoringHostCountAggSum: ") + .append(toIndentedString(dataStreamMonitoringHostCountAggSum)) + .append("\n"); + sb.append(" dataStreamMonitoringHostCountTop99pSum: ") + .append(toIndentedString(dataStreamMonitoringHostCountTop99pSum)) + .append("\n"); sb.append(" dbmHostTop99pSum: ").append(toIndentedString(dbmHostTop99pSum)).append("\n"); sb.append(" dbmQueriesAvgSum: ").append(toIndentedString(dbmQueriesAvgSum)).append("\n"); sb.append(" doJobsMonitoringOrchestratorsJobHoursAggSum: ") @@ -8636,6 +10301,95 @@ public String toString() { sb.append(" indexedEventsCountAggSum: ") .append(toIndentedString(indexedEventsCountAggSum)) .append("\n"); + sb.append(" indexedPointsAggSum: ") + .append(toIndentedString(indexedPointsAggSum)) + .append("\n"); + sb.append(" infraCpuAggSum: ").append(toIndentedString(infraCpuAggSum)).append("\n"); + sb.append(" infraCpuAvgSum: ").append(toIndentedString(infraCpuAvgSum)).append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuAgentAggSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuAgentAggSum)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuAgentAvgSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuAgentAvgSum)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuAgentBasicAggSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuAgentBasicAggSum)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuAgentBasicAvgSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuAgentBasicAvgSum)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuAwsAggSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuAwsAggSum)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuAwsAvgSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuAwsAvgSum)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuAzureAggSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuAzureAggSum)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuAzureAvgSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuAzureAvgSum)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuGcpAggSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuGcpAggSum)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuGcpAvgSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuGcpAvgSum)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuNutanixAggSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuNutanixAggSum)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuNutanixAvgSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuNutanixAvgSum)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuNutanixBasicAggSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuNutanixBasicAggSum)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuNutanixBasicAvgSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuNutanixBasicAvgSum)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuOpentelemetryAggSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuOpentelemetryAggSum)) + .append("\n"); + sb.append(" infraCpuDefaultInfraHostVcpuOpentelemetryAvgSum: ") + .append(toIndentedString(infraCpuDefaultInfraHostVcpuOpentelemetryAvgSum)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuAgentAggSum: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuAgentAggSum)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuAgentAvgSum: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuAgentAvgSum)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuAwsAggSum: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuAwsAggSum)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuAwsAvgSum: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuAwsAvgSum)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuAzureAggSum: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuAzureAggSum)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuAzureAvgSum: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuAzureAvgSum)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuGcpAggSum: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuGcpAggSum)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuGcpAvgSum: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuGcpAvgSum)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuNutanixAggSum: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuNutanixAggSum)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuNutanixAvgSum: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuNutanixAvgSum)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuOpentelemetryAggSum: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuOpentelemetryAggSum)) + .append("\n"); + sb.append(" infraCpuObservedInfraHostVcpuOpentelemetryAvgSum: ") + .append(toIndentedString(infraCpuObservedInfraHostVcpuOpentelemetryAvgSum)) + .append("\n"); sb.append(" infraEdgeMonitoringDevicesTop99pSum: ") .append(toIndentedString(infraEdgeMonitoringDevicesTop99pSum)) .append("\n"); @@ -8652,9 +10406,14 @@ public String toString() { sb.append(" infraStorageMgmtObjectsCountAvgSum: ") .append(toIndentedString(infraStorageMgmtObjectsCountAvgSum)) .append("\n"); + sb.append(" ingestPointsAggSum: ").append(toIndentedString(ingestPointsAggSum)).append("\n"); sb.append(" ingestedEventsBytesAggSum: ") .append(toIndentedString(ingestedEventsBytesAggSum)) .append("\n"); + sb.append(" iotApmHostAggSum: ").append(toIndentedString(iotApmHostAggSum)).append("\n"); + sb.append(" iotApmHostTop99pSum: ") + .append(toIndentedString(iotApmHostTop99pSum)) + .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"); @@ -8664,13 +10423,29 @@ public String toString() { sb.append(" liveIngestedBytesAggSum: ") .append(toIndentedString(liveIngestedBytesAggSum)) .append("\n"); + sb.append(" llmObservability15dayRetentionSpansAggSum: ") + .append(toIndentedString(llmObservability15dayRetentionSpansAggSum)) + .append("\n"); + sb.append(" llmObservability30dayRetentionSpansAggSum: ") + .append(toIndentedString(llmObservability30dayRetentionSpansAggSum)) + .append("\n"); + sb.append(" llmObservability60dayRetentionSpansAggSum: ") + .append(toIndentedString(llmObservability60dayRetentionSpansAggSum)) + .append("\n"); + sb.append(" llmObservability90dayRetentionSpansAggSum: ") + .append(toIndentedString(llmObservability90dayRetentionSpansAggSum)) + .append("\n"); sb.append(" llmObservabilityAggSum: ") .append(toIndentedString(llmObservabilityAggSum)) .append("\n"); sb.append(" llmObservabilityMinSpendAggSum: ") .append(toIndentedString(llmObservabilityMinSpendAggSum)) .append("\n"); + sb.append(" logsArchiveSearchGbScannedAggSum: ") + .append(toIndentedString(logsArchiveSearchGbScannedAggSum)) + .append("\n"); sb.append(" logsByRetention: ").append(toIndentedString(logsByRetention)).append("\n"); + sb.append(" metricNamesAggSum: ").append(toIndentedString(metricNamesAggSum)).append("\n"); sb.append(" mobileRumLiteSessionCountAggSum: ") .append(toIndentedString(mobileRumLiteSessionCountAggSum)) .append("\n"); @@ -8958,6 +10733,12 @@ public String toString() { sb.append(" siemAnalyzedLogsAddOnCountAggSum: ") .append(toIndentedString(siemAnalyzedLogsAddOnCountAggSum)) .append("\n"); + sb.append(" snmpDeviceCountAggSum: ") + .append(toIndentedString(snmpDeviceCountAggSum)) + .append("\n"); + sb.append(" snmpDeviceCountTop99pSum: ") + .append(toIndentedString(snmpDeviceCountTop99pSum)) + .append("\n"); sb.append(" startDate: ").append(toIndentedString(startDate)).append("\n"); sb.append(" syntheticsBrowserCheckCallsCountAggSum: ") .append(toIndentedString(syntheticsBrowserCheckCallsCountAggSum)) diff --git a/src/main/java/com/datadog/api/client/v2/api/AwsIntegrationApi.java b/src/main/java/com/datadog/api/client/v2/api/AwsIntegrationApi.java index a7ecdf67eef..6eef3621915 100644 --- a/src/main/java/com/datadog/api/client/v2/api/AwsIntegrationApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/AwsIntegrationApi.java @@ -10,6 +10,8 @@ import com.datadog.api.client.v2.model.AWSAccountsResponse; import com.datadog.api.client.v2.model.AWSCcmConfigRequest; import com.datadog.api.client.v2.model.AWSCcmConfigResponse; +import com.datadog.api.client.v2.model.AWSCcmConfigValidationRequest; +import com.datadog.api.client.v2.model.AWSCcmConfigValidationResponse; import com.datadog.api.client.v2.model.AWSEventBridgeCreateRequest; import com.datadog.api.client.v2.model.AWSEventBridgeCreateResponse; import com.datadog.api.client.v2.model.AWSEventBridgeDeleteRequest; @@ -2535,4 +2537,163 @@ public ApiResponse updateAWSAccountCCMConfigWithHttpInfo( false, new GenericType() {}); } + + /** + * Validate AWS CCM config. + * + *

See {@link #validateAWSCCMConfigWithHttpInfo}. + * + * @param body Validate a Cloud Cost Management config for an AWS account integration config. + * (required) + * @return AWSCcmConfigValidationResponse + * @throws ApiException if fails to make API call + */ + public AWSCcmConfigValidationResponse validateAWSCCMConfig(AWSCcmConfigValidationRequest body) + throws ApiException { + return validateAWSCCMConfigWithHttpInfo(body).getData(); + } + + /** + * Validate AWS CCM config. + * + *

See {@link #validateAWSCCMConfigWithHttpInfoAsync}. + * + * @param body Validate a Cloud Cost Management config for an AWS account integration config. + * (required) + * @return CompletableFuture<AWSCcmConfigValidationResponse> + */ + public CompletableFuture validateAWSCCMConfigAsync( + AWSCcmConfigValidationRequest body) { + return validateAWSCCMConfigWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Validate a Cloud Cost Management config for an AWS account using Cost and Usage Report (CUR) + * 2.0 against Datadog's ingest requirements without persisting it. + * + * @param body Validate a Cloud Cost Management config for an AWS account integration config. + * (required) + * @return ApiResponse<AWSCcmConfigValidationResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 AWS CCM Config validation result -
400 Bad Request -
403 Forbidden -
429 Too many requests -
503 Service Unavailable -
+ */ + public ApiResponse validateAWSCCMConfigWithHttpInfo( + AWSCcmConfigValidationRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "validateAWSCCMConfig"; + 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 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling validateAWSCCMConfig"); + } + // create path and map variables + String localVarPath = "/api/v2/integration/aws/validate_ccm_config"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AwsIntegrationApi.validateAWSCCMConfig", + 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() {}); + } + + /** + * Validate AWS CCM config. + * + *

See {@link #validateAWSCCMConfigWithHttpInfo}. + * + * @param body Validate a Cloud Cost Management config for an AWS account integration config. + * (required) + * @return CompletableFuture<ApiResponse<AWSCcmConfigValidationResponse>> + */ + public CompletableFuture> + validateAWSCCMConfigWithHttpInfoAsync(AWSCcmConfigValidationRequest body) { + // Check if unstable operation is enabled + String operationId = "validateAWSCCMConfig"; + 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 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling validateAWSCCMConfig")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/integration/aws/validate_ccm_config"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AwsIntegrationApi.validateAWSCCMConfig", + 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() {}); + } } diff --git a/src/main/java/com/datadog/api/client/v2/api/CaseManagementApi.java b/src/main/java/com/datadog/api/client/v2/api/CaseManagementApi.java index 6fc97f9e86a..faf3ef48ae2 100644 --- a/src/main/java/com/datadog/api/client/v2/api/CaseManagementApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/CaseManagementApi.java @@ -1045,7 +1045,7 @@ public CompletableFuture> commentCaseWithHttpInfoA public static class CountCasesOptionalParameters { private String queryFilter; private String groupBys; - private Integer limit; + private Long limit; /** * Set queryFilter. @@ -1075,7 +1075,7 @@ public CountCasesOptionalParameters groupBys(String groupBys) { * @param limit Maximum facet values to return. (optional) * @return CountCasesOptionalParameters */ - public CountCasesOptionalParameters limit(Integer limit) { + public CountCasesOptionalParameters limit(Long limit) { this.limit = limit; return this; } @@ -1169,7 +1169,7 @@ public ApiResponse countCasesWithHttpInfo( Object localVarPostBody = null; String queryFilter = parameters.queryFilter; String groupBys = parameters.groupBys; - Integer limit = parameters.limit; + Long limit = parameters.limit; // create path and map variables String localVarPath = "/api/v2/cases/count"; @@ -1223,7 +1223,7 @@ public CompletableFuture> countCasesWithHttpInfoA Object localVarPostBody = null; String queryFilter = parameters.queryFilter; String groupBys = parameters.groupBys; - Integer limit = parameters.limit; + Long limit = parameters.limit; // create path and map variables String localVarPath = "/api/v2/cases/count"; @@ -6230,8 +6230,8 @@ public CompletableFuture> listCaseLinksWithHttpIn /** Manage optional parameters to listCaseTimeline. */ public static class ListCaseTimelineOptionalParameters { - private Integer pageSize; - private Integer pageNumber; + private Long pageSize; + private Long pageNumber; private Boolean sortAscending; /** @@ -6240,7 +6240,7 @@ public static class ListCaseTimelineOptionalParameters { * @param pageSize Number of timeline cells to return per page. (optional, default to 100) * @return ListCaseTimelineOptionalParameters */ - public ListCaseTimelineOptionalParameters pageSize(Integer pageSize) { + public ListCaseTimelineOptionalParameters pageSize(Long pageSize) { this.pageSize = pageSize; return this; } @@ -6251,7 +6251,7 @@ public ListCaseTimelineOptionalParameters pageSize(Integer pageSize) { * @param pageNumber Zero-based page number for pagination. (optional, default to 0) * @return ListCaseTimelineOptionalParameters */ - public ListCaseTimelineOptionalParameters pageNumber(Integer pageNumber) { + public ListCaseTimelineOptionalParameters pageNumber(Long pageNumber) { this.pageNumber = pageNumber; return this; } @@ -6368,8 +6368,8 @@ public ApiResponse listCaseTimelineWithHttpInfo( throw new ApiException( 400, "Missing the required parameter 'caseId' when calling listCaseTimeline"); } - Integer pageSize = parameters.pageSize; - Integer pageNumber = parameters.pageNumber; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; Boolean sortAscending = parameters.sortAscending; // create path and map variables String localVarPath = @@ -6434,8 +6434,8 @@ public CompletableFuture> listCaseTimelineWithHttp 400, "Missing the required parameter 'caseId' when calling listCaseTimeline")); return result; } - Integer pageSize = parameters.pageSize; - Integer pageNumber = parameters.pageNumber; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; Boolean sortAscending = parameters.sortAscending; // create path and map variables String localVarPath = diff --git a/src/main/java/com/datadog/api/client/v2/api/CloudCostManagementApi.java b/src/main/java/com/datadog/api/client/v2/api/CloudCostManagementApi.java index 27c0d3e2f8d..5b637e02a44 100644 --- a/src/main/java/com/datadog/api/client/v2/api/CloudCostManagementApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/CloudCostManagementApi.java @@ -6601,8 +6601,8 @@ public static class ListCostAnomaliesOptionalParameters { private String dismissalCause; private String orderBy; private String order; - private Integer limit; - private Integer offset; + private Long limit; + private Long offset; private List providerIds; /** @@ -6710,7 +6710,7 @@ public ListCostAnomaliesOptionalParameters order(String order) { * @param limit Maximum number of anomalies to return. Defaults to 200. (optional) * @return ListCostAnomaliesOptionalParameters */ - public ListCostAnomaliesOptionalParameters limit(Integer limit) { + public ListCostAnomaliesOptionalParameters limit(Long limit) { this.limit = limit; return this; } @@ -6721,7 +6721,7 @@ public ListCostAnomaliesOptionalParameters limit(Integer limit) { * @param offset Pagination offset. Defaults to 0. (optional) * @return ListCostAnomaliesOptionalParameters */ - public ListCostAnomaliesOptionalParameters offset(Integer offset) { + public ListCostAnomaliesOptionalParameters offset(Long offset) { this.offset = offset; return this; } @@ -6832,8 +6832,8 @@ public ApiResponse listCostAnomaliesWithHttpInfo( String dismissalCause = parameters.dismissalCause; String orderBy = parameters.orderBy; String order = parameters.order; - Integer limit = parameters.limit; - Integer offset = parameters.offset; + Long limit = parameters.limit; + Long offset = parameters.offset; List providerIds = parameters.providerIds; // create path and map variables String localVarPath = "/api/v2/cost/anomalies"; @@ -6904,8 +6904,8 @@ public CompletableFuture> listCostAnomaliesWi String dismissalCause = parameters.dismissalCause; String orderBy = parameters.orderBy; String order = parameters.order; - Integer limit = parameters.limit; - Integer offset = parameters.offset; + Long limit = parameters.limit; + Long offset = parameters.offset; List providerIds = parameters.providerIds; // create path and map variables String localVarPath = "/api/v2/cost/anomalies"; @@ -7763,6 +7763,7 @@ public CompletableFuture> listCostTagKeysWithHt /** Manage optional parameters to listCostTagKeySources. */ public static class ListCostTagKeySourcesOptionalParameters { private String filterProvider; + private String filterMetric; /** * Set filterProvider. @@ -7778,6 +7779,19 @@ public ListCostTagKeySourcesOptionalParameters filterProvider(String filterProvi this.filterProvider = filterProvider; return this; } + + /** + * Set filterMetric. + * + * @param filterMetric Filter results to tag keys that have data for a specific Cloud Cost + * Management metric (for example, aws.cost.net.amortized). When omitted, all + * tag keys for the requested period are returned. (optional) + * @return ListCostTagKeySourcesOptionalParameters + */ + public ListCostTagKeySourcesOptionalParameters filterMetric(String filterMetric) { + this.filterMetric = filterMetric; + return this; + } } /** @@ -7881,6 +7895,7 @@ public ApiResponse listCostTagKeySourcesWithHttpInfo( 400, "Missing the required parameter 'filterMonth' when calling listCostTagKeySources"); } String filterProvider = parameters.filterProvider; + String filterMetric = parameters.filterMetric; // create path and map variables String localVarPath = "/api/v2/cost/tag_metadata/tag_sources"; @@ -7889,6 +7904,7 @@ public ApiResponse listCostTagKeySourcesWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[month]", filterMonth)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[provider]", filterProvider)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[metric]", filterMetric)); Invocation.Builder builder = apiClient.createBuilder( @@ -7944,6 +7960,7 @@ public ApiResponse listCostTagKeySourcesWithHttpInfo( return result; } String filterProvider = parameters.filterProvider; + String filterMetric = parameters.filterMetric; // create path and map variables String localVarPath = "/api/v2/cost/tag_metadata/tag_sources"; @@ -7952,6 +7969,7 @@ public ApiResponse listCostTagKeySourcesWithHttpInfo( localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[month]", filterMonth)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[provider]", filterProvider)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[metric]", filterMetric)); Invocation.Builder builder; try { diff --git a/src/main/java/com/datadog/api/client/v2/api/CsmOwnershipApi.java b/src/main/java/com/datadog/api/client/v2/api/CsmOwnershipApi.java new file mode 100644 index 00000000000..274a5db9624 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/CsmOwnershipApi.java @@ -0,0 +1,1475 @@ +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.OwnershipEvidenceResponse; +import com.datadog.api.client.v2.model.OwnershipFeedbackRequest; +import com.datadog.api.client.v2.model.OwnershipFeedbackResponse; +import com.datadog.api.client.v2.model.OwnershipHistoryResponse; +import com.datadog.api.client.v2.model.OwnershipInferenceListResponse; +import com.datadog.api.client.v2.model.OwnershipInferenceResponse; +import com.datadog.api.client.v2.model.OwnershipOwnerType; +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; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CsmOwnershipApi { + private ApiClient apiClient; + + public CsmOwnershipApi() { + this(ApiClient.getDefaultApiClient()); + } + + public CsmOwnershipApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client. + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client. + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Submit feedback on an ownership inference. + * + *

See {@link #createOwnershipFeedbackWithHttpInfo}. + * + * @param resourceId The identifier of the resource that the feedback applies to. (required) + * @param ownerType The type of owner that the feedback applies to. (required) + * @param body (required) + * @return OwnershipFeedbackResponse + * @throws ApiException if fails to make API call + */ + public OwnershipFeedbackResponse createOwnershipFeedback( + String resourceId, OwnershipOwnerType ownerType, OwnershipFeedbackRequest body) + throws ApiException { + return createOwnershipFeedbackWithHttpInfo(resourceId, ownerType, body).getData(); + } + + /** + * Submit feedback on an ownership inference. + * + *

See {@link #createOwnershipFeedbackWithHttpInfoAsync}. + * + * @param resourceId The identifier of the resource that the feedback applies to. (required) + * @param ownerType The type of owner that the feedback applies to. (required) + * @param body (required) + * @return CompletableFuture<OwnershipFeedbackResponse> + */ + public CompletableFuture createOwnershipFeedbackAsync( + String resourceId, OwnershipOwnerType ownerType, OwnershipFeedbackRequest body) { + return createOwnershipFeedbackWithHttpInfoAsync(resourceId, ownerType, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Submit feedback on the current ownership inference for a resource and owner type. Valid actions + * are confirm, reject, correct, and persist. + * + *

The request must include the current inference checksum in + * inference_checksum. If the checksum does not match the current inference state, the + * endpoint returns 409 Conflict. + * + *

When action is correct, corrected_owner_handle and + * corrected_owner_type are required. + * + * @param resourceId The identifier of the resource that the feedback applies to. (required) + * @param ownerType The type of owner that the feedback applies to. (required) + * @param body (required) + * @return ApiResponse<OwnershipFeedbackResponse> + * @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 -
404 Not Found -
409 Conflict -
429 Too many requests -
+ */ + public ApiResponse createOwnershipFeedbackWithHttpInfo( + String resourceId, OwnershipOwnerType ownerType, OwnershipFeedbackRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "createOwnershipFeedback"; + 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 'resourceId' is set + if (resourceId == null) { + throw new ApiException( + 400, "Missing the required parameter 'resourceId' when calling createOwnershipFeedback"); + } + + // verify the required parameter 'ownerType' is set + if (ownerType == null) { + throw new ApiException( + 400, "Missing the required parameter 'ownerType' when calling createOwnershipFeedback"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createOwnershipFeedback"); + } + // create path and map variables + String localVarPath = + "/api/v2/csm/ownership/{resource_id}/{owner_type}/feedback" + .replaceAll( + "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())) + .replaceAll("\\{" + "owner_type" + "\\}", apiClient.escapeString(ownerType.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CsmOwnershipApi.createOwnershipFeedback", + 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() {}); + } + + /** + * Submit feedback on an ownership inference. + * + *

See {@link #createOwnershipFeedbackWithHttpInfo}. + * + * @param resourceId The identifier of the resource that the feedback applies to. (required) + * @param ownerType The type of owner that the feedback applies to. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<OwnershipFeedbackResponse>> + */ + public CompletableFuture> + createOwnershipFeedbackWithHttpInfoAsync( + String resourceId, OwnershipOwnerType ownerType, OwnershipFeedbackRequest body) { + // Check if unstable operation is enabled + String operationId = "createOwnershipFeedback"; + 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 'resourceId' is set + if (resourceId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'resourceId' when calling createOwnershipFeedback")); + return result; + } + + // verify the required parameter 'ownerType' is set + if (ownerType == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'ownerType' when calling createOwnershipFeedback")); + 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 createOwnershipFeedback")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/csm/ownership/{resource_id}/{owner_type}/feedback" + .replaceAll( + "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())) + .replaceAll("\\{" + "owner_type" + "\\}", apiClient.escapeString(ownerType.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CsmOwnershipApi.createOwnershipFeedback", + 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 getOwnershipEvidence. */ + public static class GetOwnershipEvidenceOptionalParameters { + private String ifNoneMatch; + + /** + * Set ifNoneMatch. + * + * @param ifNoneMatch A previously returned weak ETag value. When supplied and the + * evidence has not changed, the endpoint returns 304 Not Modified. (optional) + * @return GetOwnershipEvidenceOptionalParameters + */ + public GetOwnershipEvidenceOptionalParameters ifNoneMatch(String ifNoneMatch) { + this.ifNoneMatch = ifNoneMatch; + return this; + } + } + + /** + * Get the evidence for an ownership inference. + * + *

See {@link #getOwnershipEvidenceWithHttpInfo}. + * + * @param resourceId The identifier of the resource to retrieve evidence for. (required) + * @param ownerType The owner type of the inference to retrieve evidence for. (required) + * @return OwnershipEvidenceResponse + * @throws ApiException if fails to make API call + */ + public OwnershipEvidenceResponse getOwnershipEvidence( + String resourceId, OwnershipOwnerType ownerType) throws ApiException { + return getOwnershipEvidenceWithHttpInfo( + resourceId, ownerType, new GetOwnershipEvidenceOptionalParameters()) + .getData(); + } + + /** + * Get the evidence for an ownership inference. + * + *

See {@link #getOwnershipEvidenceWithHttpInfoAsync}. + * + * @param resourceId The identifier of the resource to retrieve evidence for. (required) + * @param ownerType The owner type of the inference to retrieve evidence for. (required) + * @return CompletableFuture<OwnershipEvidenceResponse> + */ + public CompletableFuture getOwnershipEvidenceAsync( + String resourceId, OwnershipOwnerType ownerType) { + return getOwnershipEvidenceWithHttpInfoAsync( + resourceId, ownerType, new GetOwnershipEvidenceOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the evidence for an ownership inference. + * + *

See {@link #getOwnershipEvidenceWithHttpInfo}. + * + * @param resourceId The identifier of the resource to retrieve evidence for. (required) + * @param ownerType The owner type of the inference to retrieve evidence for. (required) + * @param parameters Optional parameters for the request. + * @return OwnershipEvidenceResponse + * @throws ApiException if fails to make API call + */ + public OwnershipEvidenceResponse getOwnershipEvidence( + String resourceId, + OwnershipOwnerType ownerType, + GetOwnershipEvidenceOptionalParameters parameters) + throws ApiException { + return getOwnershipEvidenceWithHttpInfo(resourceId, ownerType, parameters).getData(); + } + + /** + * Get the evidence for an ownership inference. + * + *

See {@link #getOwnershipEvidenceWithHttpInfoAsync}. + * + * @param resourceId The identifier of the resource to retrieve evidence for. (required) + * @param ownerType The owner type of the inference to retrieve evidence for. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<OwnershipEvidenceResponse> + */ + public CompletableFuture getOwnershipEvidenceAsync( + String resourceId, + OwnershipOwnerType ownerType, + GetOwnershipEvidenceOptionalParameters parameters) { + return getOwnershipEvidenceWithHttpInfoAsync(resourceId, ownerType, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the evidence versions backing the current ownership inference for a resource and owner + * type. + * + *

This endpoint supports weak ETag caching. Pass the previously returned ETag + * value in the If-None-Match request header to receive a 304 Not Modified + * response when the evidence has not changed. + * + * @param resourceId The identifier of the resource to retrieve evidence for. (required) + * @param ownerType The owner type of the inference to retrieve evidence for. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<OwnershipEvidenceResponse> + * @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 -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getOwnershipEvidenceWithHttpInfo( + String resourceId, + OwnershipOwnerType ownerType, + GetOwnershipEvidenceOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getOwnershipEvidence"; + 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 'resourceId' is set + if (resourceId == null) { + throw new ApiException( + 400, "Missing the required parameter 'resourceId' when calling getOwnershipEvidence"); + } + + // verify the required parameter 'ownerType' is set + if (ownerType == null) { + throw new ApiException( + 400, "Missing the required parameter 'ownerType' when calling getOwnershipEvidence"); + } + String ifNoneMatch = parameters.ifNoneMatch; + // create path and map variables + String localVarPath = + "/api/v2/csm/ownership/{resource_id}/{owner_type}/evidence" + .replaceAll( + "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())) + .replaceAll("\\{" + "owner_type" + "\\}", apiClient.escapeString(ownerType.toString())); + + Map localVarHeaderParams = new HashMap(); + + if (ifNoneMatch != null) { + localVarHeaderParams.put("If-None-Match", apiClient.parameterToString(ifNoneMatch)); + } + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CsmOwnershipApi.getOwnershipEvidence", + 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 evidence for an ownership inference. + * + *

See {@link #getOwnershipEvidenceWithHttpInfo}. + * + * @param resourceId The identifier of the resource to retrieve evidence for. (required) + * @param ownerType The owner type of the inference to retrieve evidence for. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<OwnershipEvidenceResponse>> + */ + public CompletableFuture> + getOwnershipEvidenceWithHttpInfoAsync( + String resourceId, + OwnershipOwnerType ownerType, + GetOwnershipEvidenceOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "getOwnershipEvidence"; + 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 'resourceId' is set + if (resourceId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'resourceId' when calling getOwnershipEvidence")); + return result; + } + + // verify the required parameter 'ownerType' is set + if (ownerType == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'ownerType' when calling getOwnershipEvidence")); + return result; + } + String ifNoneMatch = parameters.ifNoneMatch; + // create path and map variables + String localVarPath = + "/api/v2/csm/ownership/{resource_id}/{owner_type}/evidence" + .replaceAll( + "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())) + .replaceAll("\\{" + "owner_type" + "\\}", apiClient.escapeString(ownerType.toString())); + + Map localVarHeaderParams = new HashMap(); + + if (ifNoneMatch != null) { + localVarHeaderParams.put("If-None-Match", apiClient.parameterToString(ifNoneMatch)); + } + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CsmOwnershipApi.getOwnershipEvidence", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to getOwnershipInference. */ + public static class GetOwnershipInferenceOptionalParameters { + private String ifNoneMatch; + + /** + * Set ifNoneMatch. + * + * @param ifNoneMatch A previously returned ETag value. When supplied and the + * resource has not changed, the endpoint returns 304 Not Modified. (optional) + * @return GetOwnershipInferenceOptionalParameters + */ + public GetOwnershipInferenceOptionalParameters ifNoneMatch(String ifNoneMatch) { + this.ifNoneMatch = ifNoneMatch; + return this; + } + } + + /** + * Get an ownership inference by owner type. + * + *

See {@link #getOwnershipInferenceWithHttpInfo}. + * + * @param resourceId The identifier of the resource to retrieve the ownership inference for. + * (required) + * @param ownerType The owner type of the inference to retrieve. (required) + * @return OwnershipInferenceResponse + * @throws ApiException if fails to make API call + */ + public OwnershipInferenceResponse getOwnershipInference( + String resourceId, OwnershipOwnerType ownerType) throws ApiException { + return getOwnershipInferenceWithHttpInfo( + resourceId, ownerType, new GetOwnershipInferenceOptionalParameters()) + .getData(); + } + + /** + * Get an ownership inference by owner type. + * + *

See {@link #getOwnershipInferenceWithHttpInfoAsync}. + * + * @param resourceId The identifier of the resource to retrieve the ownership inference for. + * (required) + * @param ownerType The owner type of the inference to retrieve. (required) + * @return CompletableFuture<OwnershipInferenceResponse> + */ + public CompletableFuture getOwnershipInferenceAsync( + String resourceId, OwnershipOwnerType ownerType) { + return getOwnershipInferenceWithHttpInfoAsync( + resourceId, ownerType, new GetOwnershipInferenceOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get an ownership inference by owner type. + * + *

See {@link #getOwnershipInferenceWithHttpInfo}. + * + * @param resourceId The identifier of the resource to retrieve the ownership inference for. + * (required) + * @param ownerType The owner type of the inference to retrieve. (required) + * @param parameters Optional parameters for the request. + * @return OwnershipInferenceResponse + * @throws ApiException if fails to make API call + */ + public OwnershipInferenceResponse getOwnershipInference( + String resourceId, + OwnershipOwnerType ownerType, + GetOwnershipInferenceOptionalParameters parameters) + throws ApiException { + return getOwnershipInferenceWithHttpInfo(resourceId, ownerType, parameters).getData(); + } + + /** + * Get an ownership inference by owner type. + * + *

See {@link #getOwnershipInferenceWithHttpInfoAsync}. + * + * @param resourceId The identifier of the resource to retrieve the ownership inference for. + * (required) + * @param ownerType The owner type of the inference to retrieve. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<OwnershipInferenceResponse> + */ + public CompletableFuture getOwnershipInferenceAsync( + String resourceId, + OwnershipOwnerType ownerType, + GetOwnershipInferenceOptionalParameters parameters) { + return getOwnershipInferenceWithHttpInfoAsync(resourceId, ownerType, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the current ownership inference for a resource for a specific owner type. + * + *

This endpoint supports ETag-based caching. Pass the previously returned ETag + * value in the If-None-Match request header to receive a 304 Not Modified + * response when the inference has not changed. + * + * @param resourceId The identifier of the resource to retrieve the ownership inference for. + * (required) + * @param ownerType The owner type of the inference to retrieve. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<OwnershipInferenceResponse> + * @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 -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getOwnershipInferenceWithHttpInfo( + String resourceId, + OwnershipOwnerType ownerType, + GetOwnershipInferenceOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getOwnershipInference"; + 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 'resourceId' is set + if (resourceId == null) { + throw new ApiException( + 400, "Missing the required parameter 'resourceId' when calling getOwnershipInference"); + } + + // verify the required parameter 'ownerType' is set + if (ownerType == null) { + throw new ApiException( + 400, "Missing the required parameter 'ownerType' when calling getOwnershipInference"); + } + String ifNoneMatch = parameters.ifNoneMatch; + // create path and map variables + String localVarPath = + "/api/v2/csm/ownership/{resource_id}/{owner_type}" + .replaceAll( + "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())) + .replaceAll("\\{" + "owner_type" + "\\}", apiClient.escapeString(ownerType.toString())); + + Map localVarHeaderParams = new HashMap(); + + if (ifNoneMatch != null) { + localVarHeaderParams.put("If-None-Match", apiClient.parameterToString(ifNoneMatch)); + } + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CsmOwnershipApi.getOwnershipInference", + 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 ownership inference by owner type. + * + *

See {@link #getOwnershipInferenceWithHttpInfo}. + * + * @param resourceId The identifier of the resource to retrieve the ownership inference for. + * (required) + * @param ownerType The owner type of the inference to retrieve. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<OwnershipInferenceResponse>> + */ + public CompletableFuture> + getOwnershipInferenceWithHttpInfoAsync( + String resourceId, + OwnershipOwnerType ownerType, + GetOwnershipInferenceOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "getOwnershipInference"; + 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 'resourceId' is set + if (resourceId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'resourceId' when calling getOwnershipInference")); + return result; + } + + // verify the required parameter 'ownerType' is set + if (ownerType == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'ownerType' when calling getOwnershipInference")); + return result; + } + String ifNoneMatch = parameters.ifNoneMatch; + // create path and map variables + String localVarPath = + "/api/v2/csm/ownership/{resource_id}/{owner_type}" + .replaceAll( + "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())) + .replaceAll("\\{" + "owner_type" + "\\}", apiClient.escapeString(ownerType.toString())); + + Map localVarHeaderParams = new HashMap(); + + if (ifNoneMatch != null) { + localVarHeaderParams.put("If-None-Match", apiClient.parameterToString(ifNoneMatch)); + } + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CsmOwnershipApi.getOwnershipInference", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listOwnershipHistory. */ + public static class ListOwnershipHistoryOptionalParameters { + private String cursor; + private Integer limit; + + /** + * Set cursor. + * + * @param cursor An opaque, base64-encoded cursor token returned by a previous call in + * pagination.next_cursor. Omit to fetch the first page. (optional) + * @return ListOwnershipHistoryOptionalParameters + */ + public ListOwnershipHistoryOptionalParameters cursor(String cursor) { + this.cursor = cursor; + return this; + } + + /** + * Set limit. + * + * @param limit The maximum number of history entries to return per page. (optional, default to + * 25) + * @return ListOwnershipHistoryOptionalParameters + */ + public ListOwnershipHistoryOptionalParameters limit(Integer limit) { + this.limit = limit; + return this; + } + } + + /** + * List ownership inference history for a resource. + * + *

See {@link #listOwnershipHistoryWithHttpInfo}. + * + * @param resourceId The identifier of the resource to retrieve inference history for. (required) + * @return OwnershipHistoryResponse + * @throws ApiException if fails to make API call + */ + public OwnershipHistoryResponse listOwnershipHistory(String resourceId) throws ApiException { + return listOwnershipHistoryWithHttpInfo( + resourceId, new ListOwnershipHistoryOptionalParameters()) + .getData(); + } + + /** + * List ownership inference history for a resource. + * + *

See {@link #listOwnershipHistoryWithHttpInfoAsync}. + * + * @param resourceId The identifier of the resource to retrieve inference history for. (required) + * @return CompletableFuture<OwnershipHistoryResponse> + */ + public CompletableFuture listOwnershipHistoryAsync(String resourceId) { + return listOwnershipHistoryWithHttpInfoAsync( + resourceId, new ListOwnershipHistoryOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List ownership inference history for a resource. + * + *

See {@link #listOwnershipHistoryWithHttpInfo}. + * + * @param resourceId The identifier of the resource to retrieve inference history for. (required) + * @param parameters Optional parameters for the request. + * @return OwnershipHistoryResponse + * @throws ApiException if fails to make API call + */ + public OwnershipHistoryResponse listOwnershipHistory( + String resourceId, ListOwnershipHistoryOptionalParameters parameters) throws ApiException { + return listOwnershipHistoryWithHttpInfo(resourceId, parameters).getData(); + } + + /** + * List ownership inference history for a resource. + * + *

See {@link #listOwnershipHistoryWithHttpInfoAsync}. + * + * @param resourceId The identifier of the resource to retrieve inference history for. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<OwnershipHistoryResponse> + */ + public CompletableFuture listOwnershipHistoryAsync( + String resourceId, ListOwnershipHistoryOptionalParameters parameters) { + return listOwnershipHistoryWithHttpInfoAsync(resourceId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List inference history entries for a resource across all owner types, ordered from most recent + * to oldest. Uses cursor-based pagination. + * + * @param resourceId The identifier of the resource to retrieve inference history for. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<OwnershipHistoryResponse> + * @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 -
429 Too many requests -
+ */ + public ApiResponse listOwnershipHistoryWithHttpInfo( + String resourceId, ListOwnershipHistoryOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listOwnershipHistory"; + 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 'resourceId' is set + if (resourceId == null) { + throw new ApiException( + 400, "Missing the required parameter 'resourceId' when calling listOwnershipHistory"); + } + String cursor = parameters.cursor; + Integer limit = parameters.limit; + // create path and map variables + String localVarPath = + "/api/v2/csm/ownership/{resource_id}/history" + .replaceAll( + "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "cursor", cursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CsmOwnershipApi.listOwnershipHistory", + 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 ownership inference history for a resource. + * + *

See {@link #listOwnershipHistoryWithHttpInfo}. + * + * @param resourceId The identifier of the resource to retrieve inference history for. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<OwnershipHistoryResponse>> + */ + public CompletableFuture> + listOwnershipHistoryWithHttpInfoAsync( + String resourceId, ListOwnershipHistoryOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listOwnershipHistory"; + 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 'resourceId' is set + if (resourceId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'resourceId' when calling listOwnershipHistory")); + return result; + } + String cursor = parameters.cursor; + Integer limit = parameters.limit; + // create path and map variables + String localVarPath = + "/api/v2/csm/ownership/{resource_id}/history" + .replaceAll( + "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "cursor", cursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CsmOwnershipApi.listOwnershipHistory", + 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 listOwnershipHistoryByOwnerType. */ + public static class ListOwnershipHistoryByOwnerTypeOptionalParameters { + private String cursor; + private Integer limit; + + /** + * Set cursor. + * + * @param cursor An opaque, base64-encoded cursor token returned by a previous call in + * pagination.next_cursor. Omit to fetch the first page. (optional) + * @return ListOwnershipHistoryByOwnerTypeOptionalParameters + */ + public ListOwnershipHistoryByOwnerTypeOptionalParameters cursor(String cursor) { + this.cursor = cursor; + return this; + } + + /** + * Set limit. + * + * @param limit The maximum number of history entries to return per page. (optional, default to + * 25) + * @return ListOwnershipHistoryByOwnerTypeOptionalParameters + */ + public ListOwnershipHistoryByOwnerTypeOptionalParameters limit(Integer limit) { + this.limit = limit; + return this; + } + } + + /** + * List ownership history by owner type. + * + *

See {@link #listOwnershipHistoryByOwnerTypeWithHttpInfo}. + * + * @param resourceId The identifier of the resource to retrieve inference history for. (required) + * @param ownerType The owner type to filter history by. (required) + * @return OwnershipHistoryResponse + * @throws ApiException if fails to make API call + */ + public OwnershipHistoryResponse listOwnershipHistoryByOwnerType( + String resourceId, OwnershipOwnerType ownerType) throws ApiException { + return listOwnershipHistoryByOwnerTypeWithHttpInfo( + resourceId, ownerType, new ListOwnershipHistoryByOwnerTypeOptionalParameters()) + .getData(); + } + + /** + * List ownership history by owner type. + * + *

See {@link #listOwnershipHistoryByOwnerTypeWithHttpInfoAsync}. + * + * @param resourceId The identifier of the resource to retrieve inference history for. (required) + * @param ownerType The owner type to filter history by. (required) + * @return CompletableFuture<OwnershipHistoryResponse> + */ + public CompletableFuture listOwnershipHistoryByOwnerTypeAsync( + String resourceId, OwnershipOwnerType ownerType) { + return listOwnershipHistoryByOwnerTypeWithHttpInfoAsync( + resourceId, ownerType, new ListOwnershipHistoryByOwnerTypeOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List ownership history by owner type. + * + *

See {@link #listOwnershipHistoryByOwnerTypeWithHttpInfo}. + * + * @param resourceId The identifier of the resource to retrieve inference history for. (required) + * @param ownerType The owner type to filter history by. (required) + * @param parameters Optional parameters for the request. + * @return OwnershipHistoryResponse + * @throws ApiException if fails to make API call + */ + public OwnershipHistoryResponse listOwnershipHistoryByOwnerType( + String resourceId, + OwnershipOwnerType ownerType, + ListOwnershipHistoryByOwnerTypeOptionalParameters parameters) + throws ApiException { + return listOwnershipHistoryByOwnerTypeWithHttpInfo(resourceId, ownerType, parameters).getData(); + } + + /** + * List ownership history by owner type. + * + *

See {@link #listOwnershipHistoryByOwnerTypeWithHttpInfoAsync}. + * + * @param resourceId The identifier of the resource to retrieve inference history for. (required) + * @param ownerType The owner type to filter history by. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<OwnershipHistoryResponse> + */ + public CompletableFuture listOwnershipHistoryByOwnerTypeAsync( + String resourceId, + OwnershipOwnerType ownerType, + ListOwnershipHistoryByOwnerTypeOptionalParameters parameters) { + return listOwnershipHistoryByOwnerTypeWithHttpInfoAsync(resourceId, ownerType, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List inference history entries for a resource filtered by owner type, ordered from most recent + * to oldest. Uses cursor-based pagination. + * + * @param resourceId The identifier of the resource to retrieve inference history for. (required) + * @param ownerType The owner type to filter history by. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<OwnershipHistoryResponse> + * @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 -
429 Too many requests -
+ */ + public ApiResponse listOwnershipHistoryByOwnerTypeWithHttpInfo( + String resourceId, + OwnershipOwnerType ownerType, + ListOwnershipHistoryByOwnerTypeOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listOwnershipHistoryByOwnerType"; + 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 'resourceId' is set + if (resourceId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'resourceId' when calling" + + " listOwnershipHistoryByOwnerType"); + } + + // verify the required parameter 'ownerType' is set + if (ownerType == null) { + throw new ApiException( + 400, + "Missing the required parameter 'ownerType' when calling" + + " listOwnershipHistoryByOwnerType"); + } + String cursor = parameters.cursor; + Integer limit = parameters.limit; + // create path and map variables + String localVarPath = + "/api/v2/csm/ownership/{resource_id}/{owner_type}/history" + .replaceAll( + "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())) + .replaceAll("\\{" + "owner_type" + "\\}", apiClient.escapeString(ownerType.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "cursor", cursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CsmOwnershipApi.listOwnershipHistoryByOwnerType", + 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 ownership history by owner type. + * + *

See {@link #listOwnershipHistoryByOwnerTypeWithHttpInfo}. + * + * @param resourceId The identifier of the resource to retrieve inference history for. (required) + * @param ownerType The owner type to filter history by. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<OwnershipHistoryResponse>> + */ + public CompletableFuture> + listOwnershipHistoryByOwnerTypeWithHttpInfoAsync( + String resourceId, + OwnershipOwnerType ownerType, + ListOwnershipHistoryByOwnerTypeOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listOwnershipHistoryByOwnerType"; + 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 'resourceId' is set + if (resourceId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'resourceId' when calling" + + " listOwnershipHistoryByOwnerType")); + return result; + } + + // verify the required parameter 'ownerType' is set + if (ownerType == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'ownerType' when calling" + + " listOwnershipHistoryByOwnerType")); + return result; + } + String cursor = parameters.cursor; + Integer limit = parameters.limit; + // create path and map variables + String localVarPath = + "/api/v2/csm/ownership/{resource_id}/{owner_type}/history" + .replaceAll( + "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())) + .replaceAll("\\{" + "owner_type" + "\\}", apiClient.escapeString(ownerType.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "cursor", cursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CsmOwnershipApi.listOwnershipHistoryByOwnerType", + 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() {}); + } + + /** + * List ownership inferences for a resource. + * + *

See {@link #listOwnershipInferencesWithHttpInfo}. + * + * @param resourceId The identifier of the resource to retrieve ownership inferences for. + * (required) + * @return OwnershipInferenceListResponse + * @throws ApiException if fails to make API call + */ + public OwnershipInferenceListResponse listOwnershipInferences(String resourceId) + throws ApiException { + return listOwnershipInferencesWithHttpInfo(resourceId).getData(); + } + + /** + * List ownership inferences for a resource. + * + *

See {@link #listOwnershipInferencesWithHttpInfoAsync}. + * + * @param resourceId The identifier of the resource to retrieve ownership inferences for. + * (required) + * @return CompletableFuture<OwnershipInferenceListResponse> + */ + public CompletableFuture listOwnershipInferencesAsync( + String resourceId) { + return listOwnershipInferencesWithHttpInfoAsync(resourceId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get all current ownership inferences for a resource, one per owner type (user, + * team, service, unknown). + * + * @param resourceId The identifier of the resource to retrieve ownership inferences for. + * (required) + * @return ApiResponse<OwnershipInferenceListResponse> + * @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 -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse listOwnershipInferencesWithHttpInfo( + String resourceId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listOwnershipInferences"; + 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 'resourceId' is set + if (resourceId == null) { + throw new ApiException( + 400, "Missing the required parameter 'resourceId' when calling listOwnershipInferences"); + } + // create path and map variables + String localVarPath = + "/api/v2/csm/ownership/{resource_id}" + .replaceAll( + "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CsmOwnershipApi.listOwnershipInferences", + 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 ownership inferences for a resource. + * + *

See {@link #listOwnershipInferencesWithHttpInfo}. + * + * @param resourceId The identifier of the resource to retrieve ownership inferences for. + * (required) + * @return CompletableFuture<ApiResponse<OwnershipInferenceListResponse>> + */ + public CompletableFuture> + listOwnershipInferencesWithHttpInfoAsync(String resourceId) { + // Check if unstable operation is enabled + String operationId = "listOwnershipInferences"; + 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 'resourceId' is set + if (resourceId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'resourceId' when calling listOwnershipInferences")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/csm/ownership/{resource_id}" + .replaceAll( + "\\{" + "resource_id" + "\\}", apiClient.escapeString(resourceId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CsmOwnershipApi.listOwnershipInferences", + 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() {}); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/api/CsmSettingsApi.java b/src/main/java/com/datadog/api/client/v2/api/CsmSettingsApi.java new file mode 100644 index 00000000000..4f13b466728 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/CsmSettingsApi.java @@ -0,0 +1,1265 @@ +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.CsmAgentlessHostFacetsResponse; +import com.datadog.api.client.v2.model.CsmAgentlessHostsResponse; +import com.datadog.api.client.v2.model.CsmHostFacetInfoResponse; +import com.datadog.api.client.v2.model.CsmUnifiedHostFacetsResponse; +import com.datadog.api.client.v2.model.CsmUnifiedHostsResponse; +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; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CsmSettingsApi { + private ApiClient apiClient; + + public CsmSettingsApi() { + this(ApiClient.getDefaultApiClient()); + } + + public CsmSettingsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client. + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client. + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** Manage optional parameters to getCSMAgentlessHostFacetInfo. */ + public static class GetCSMAgentlessHostFacetInfoOptionalParameters { + private String search; + private String query; + + /** + * Set search. + * + * @param search A search string to filter the facet values. (optional) + * @return GetCSMAgentlessHostFacetInfoOptionalParameters + */ + public GetCSMAgentlessHostFacetInfoOptionalParameters search(String search) { + this.search = search; + return this; + } + + /** + * Set query. + * + * @param query A filter query to scope the facet value counts. (optional) + * @return GetCSMAgentlessHostFacetInfoOptionalParameters + */ + public GetCSMAgentlessHostFacetInfoOptionalParameters query(String query) { + this.query = query; + return this; + } + } + + /** + * Get agentless host facet info. + * + *

See {@link #getCSMAgentlessHostFacetInfoWithHttpInfo}. + * + * @param facet The facet identifier to retrieve value distribution for. Valid values are + * resource_name, account_id, resource_type, + * cloud_provider, has_vulnerability_scanning, and + * has_posture_management. (required) + * @return CsmHostFacetInfoResponse + * @throws ApiException if fails to make API call + */ + public CsmHostFacetInfoResponse getCSMAgentlessHostFacetInfo(String facet) throws ApiException { + return getCSMAgentlessHostFacetInfoWithHttpInfo( + facet, new GetCSMAgentlessHostFacetInfoOptionalParameters()) + .getData(); + } + + /** + * Get agentless host facet info. + * + *

See {@link #getCSMAgentlessHostFacetInfoWithHttpInfoAsync}. + * + * @param facet The facet identifier to retrieve value distribution for. Valid values are + * resource_name, account_id, resource_type, + * cloud_provider, has_vulnerability_scanning, and + * has_posture_management. (required) + * @return CompletableFuture<CsmHostFacetInfoResponse> + */ + public CompletableFuture getCSMAgentlessHostFacetInfoAsync( + String facet) { + return getCSMAgentlessHostFacetInfoWithHttpInfoAsync( + facet, new GetCSMAgentlessHostFacetInfoOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get agentless host facet info. + * + *

See {@link #getCSMAgentlessHostFacetInfoWithHttpInfo}. + * + * @param facet The facet identifier to retrieve value distribution for. Valid values are + * resource_name, account_id, resource_type, + * cloud_provider, has_vulnerability_scanning, and + * has_posture_management. (required) + * @param parameters Optional parameters for the request. + * @return CsmHostFacetInfoResponse + * @throws ApiException if fails to make API call + */ + public CsmHostFacetInfoResponse getCSMAgentlessHostFacetInfo( + String facet, GetCSMAgentlessHostFacetInfoOptionalParameters parameters) throws ApiException { + return getCSMAgentlessHostFacetInfoWithHttpInfo(facet, parameters).getData(); + } + + /** + * Get agentless host facet info. + * + *

See {@link #getCSMAgentlessHostFacetInfoWithHttpInfoAsync}. + * + * @param facet The facet identifier to retrieve value distribution for. Valid values are + * resource_name, account_id, resource_type, + * cloud_provider, has_vulnerability_scanning, and + * has_posture_management. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<CsmHostFacetInfoResponse> + */ + public CompletableFuture getCSMAgentlessHostFacetInfoAsync( + String facet, GetCSMAgentlessHostFacetInfoOptionalParameters parameters) { + return getCSMAgentlessHostFacetInfoWithHttpInfoAsync(facet, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the value distribution for a specific agentless host facet, with optional search and + * filtering. + * + * @param facet The facet identifier to retrieve value distribution for. Valid values are + * resource_name, account_id, resource_type, + * cloud_provider, has_vulnerability_scanning, and + * has_posture_management. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<CsmHostFacetInfoResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
429 Too many requests -
+ */ + public ApiResponse getCSMAgentlessHostFacetInfoWithHttpInfo( + String facet, GetCSMAgentlessHostFacetInfoOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getCSMAgentlessHostFacetInfo"; + 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 'facet' is set + if (facet == null) { + throw new ApiException( + 400, "Missing the required parameter 'facet' when calling getCSMAgentlessHostFacetInfo"); + } + String search = parameters.search; + String query = parameters.query; + // create path and map variables + String localVarPath = "/api/v2/csm/settings/agentless_hosts/facet_info"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "facet", facet)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "search", search)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CsmSettingsApi.getCSMAgentlessHostFacetInfo", + 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 agentless host facet info. + * + *

See {@link #getCSMAgentlessHostFacetInfoWithHttpInfo}. + * + * @param facet The facet identifier to retrieve value distribution for. Valid values are + * resource_name, account_id, resource_type, + * cloud_provider, has_vulnerability_scanning, and + * has_posture_management. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<CsmHostFacetInfoResponse>> + */ + public CompletableFuture> + getCSMAgentlessHostFacetInfoWithHttpInfoAsync( + String facet, GetCSMAgentlessHostFacetInfoOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "getCSMAgentlessHostFacetInfo"; + 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 'facet' is set + if (facet == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'facet' when calling getCSMAgentlessHostFacetInfo")); + return result; + } + String search = parameters.search; + String query = parameters.query; + // create path and map variables + String localVarPath = "/api/v2/csm/settings/agentless_hosts/facet_info"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "facet", facet)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "search", search)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CsmSettingsApi.getCSMAgentlessHostFacetInfo", + 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 getCSMUnifiedHostFacetInfo. */ + public static class GetCSMUnifiedHostFacetInfoOptionalParameters { + private String search; + private String query; + + /** + * Set search. + * + * @param search A search string to filter the facet values. (optional) + * @return GetCSMUnifiedHostFacetInfoOptionalParameters + */ + public GetCSMUnifiedHostFacetInfoOptionalParameters search(String search) { + this.search = search; + return this; + } + + /** + * Set query. + * + * @param query A filter query to scope the facet value counts. (optional) + * @return GetCSMUnifiedHostFacetInfoOptionalParameters + */ + public GetCSMUnifiedHostFacetInfoOptionalParameters query(String query) { + this.query = query; + return this; + } + } + + /** + * Get unified host facet info. + * + *

See {@link #getCSMUnifiedHostFacetInfoWithHttpInfo}. + * + * @param facet The facet identifier to retrieve value distribution for. Valid values include + * resource_name, account_id, resource_type, + * cloud_provider, agentless_vulnerability_scanning, + * agentless_posture_management, hostname, agent_version, + * os, cluster_name, agent_posture_management, + * agent_cws_enabled, agent_csm_vm_hosts_enabled, and + * agent_csm_vm_containers_enabled. (required) + * @return CsmHostFacetInfoResponse + * @throws ApiException if fails to make API call + */ + public CsmHostFacetInfoResponse getCSMUnifiedHostFacetInfo(String facet) throws ApiException { + return getCSMUnifiedHostFacetInfoWithHttpInfo( + facet, new GetCSMUnifiedHostFacetInfoOptionalParameters()) + .getData(); + } + + /** + * Get unified host facet info. + * + *

See {@link #getCSMUnifiedHostFacetInfoWithHttpInfoAsync}. + * + * @param facet The facet identifier to retrieve value distribution for. Valid values include + * resource_name, account_id, resource_type, + * cloud_provider, agentless_vulnerability_scanning, + * agentless_posture_management, hostname, agent_version, + * os, cluster_name, agent_posture_management, + * agent_cws_enabled, agent_csm_vm_hosts_enabled, and + * agent_csm_vm_containers_enabled. (required) + * @return CompletableFuture<CsmHostFacetInfoResponse> + */ + public CompletableFuture getCSMUnifiedHostFacetInfoAsync(String facet) { + return getCSMUnifiedHostFacetInfoWithHttpInfoAsync( + facet, new GetCSMUnifiedHostFacetInfoOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get unified host facet info. + * + *

See {@link #getCSMUnifiedHostFacetInfoWithHttpInfo}. + * + * @param facet The facet identifier to retrieve value distribution for. Valid values include + * resource_name, account_id, resource_type, + * cloud_provider, agentless_vulnerability_scanning, + * agentless_posture_management, hostname, agent_version, + * os, cluster_name, agent_posture_management, + * agent_cws_enabled, agent_csm_vm_hosts_enabled, and + * agent_csm_vm_containers_enabled. (required) + * @param parameters Optional parameters for the request. + * @return CsmHostFacetInfoResponse + * @throws ApiException if fails to make API call + */ + public CsmHostFacetInfoResponse getCSMUnifiedHostFacetInfo( + String facet, GetCSMUnifiedHostFacetInfoOptionalParameters parameters) throws ApiException { + return getCSMUnifiedHostFacetInfoWithHttpInfo(facet, parameters).getData(); + } + + /** + * Get unified host facet info. + * + *

See {@link #getCSMUnifiedHostFacetInfoWithHttpInfoAsync}. + * + * @param facet The facet identifier to retrieve value distribution for. Valid values include + * resource_name, account_id, resource_type, + * cloud_provider, agentless_vulnerability_scanning, + * agentless_posture_management, hostname, agent_version, + * os, cluster_name, agent_posture_management, + * agent_cws_enabled, agent_csm_vm_hosts_enabled, and + * agent_csm_vm_containers_enabled. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<CsmHostFacetInfoResponse> + */ + public CompletableFuture getCSMUnifiedHostFacetInfoAsync( + String facet, GetCSMUnifiedHostFacetInfoOptionalParameters parameters) { + return getCSMUnifiedHostFacetInfoWithHttpInfoAsync(facet, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the value distribution for a specific unified host facet, with optional search and + * filtering. + * + * @param facet The facet identifier to retrieve value distribution for. Valid values include + * resource_name, account_id, resource_type, + * cloud_provider, agentless_vulnerability_scanning, + * agentless_posture_management, hostname, agent_version, + * os, cluster_name, agent_posture_management, + * agent_cws_enabled, agent_csm_vm_hosts_enabled, and + * agent_csm_vm_containers_enabled. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<CsmHostFacetInfoResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
429 Too many requests -
+ */ + public ApiResponse getCSMUnifiedHostFacetInfoWithHttpInfo( + String facet, GetCSMUnifiedHostFacetInfoOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getCSMUnifiedHostFacetInfo"; + 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 'facet' is set + if (facet == null) { + throw new ApiException( + 400, "Missing the required parameter 'facet' when calling getCSMUnifiedHostFacetInfo"); + } + String search = parameters.search; + String query = parameters.query; + // create path and map variables + String localVarPath = "/api/v2/csm/settings/hosts/facet_info"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "facet", facet)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "search", search)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CsmSettingsApi.getCSMUnifiedHostFacetInfo", + 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 unified host facet info. + * + *

See {@link #getCSMUnifiedHostFacetInfoWithHttpInfo}. + * + * @param facet The facet identifier to retrieve value distribution for. Valid values include + * resource_name, account_id, resource_type, + * cloud_provider, agentless_vulnerability_scanning, + * agentless_posture_management, hostname, agent_version, + * os, cluster_name, agent_posture_management, + * agent_cws_enabled, agent_csm_vm_hosts_enabled, and + * agent_csm_vm_containers_enabled. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<CsmHostFacetInfoResponse>> + */ + public CompletableFuture> + getCSMUnifiedHostFacetInfoWithHttpInfoAsync( + String facet, GetCSMUnifiedHostFacetInfoOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "getCSMUnifiedHostFacetInfo"; + 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 'facet' is set + if (facet == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'facet' when calling getCSMUnifiedHostFacetInfo")); + return result; + } + String search = parameters.search; + String query = parameters.query; + // create path and map variables + String localVarPath = "/api/v2/csm/settings/hosts/facet_info"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "facet", facet)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "search", search)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CsmSettingsApi.getCSMUnifiedHostFacetInfo", + 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() {}); + } + + /** + * List agentless host facets. + * + *

See {@link #listCSMAgentlessHostFacetsWithHttpInfo}. + * + * @return CsmAgentlessHostFacetsResponse + * @throws ApiException if fails to make API call + */ + public CsmAgentlessHostFacetsResponse listCSMAgentlessHostFacets() throws ApiException { + return listCSMAgentlessHostFacetsWithHttpInfo().getData(); + } + + /** + * List agentless host facets. + * + *

See {@link #listCSMAgentlessHostFacetsWithHttpInfoAsync}. + * + * @return CompletableFuture<CsmAgentlessHostFacetsResponse> + */ + public CompletableFuture listCSMAgentlessHostFacetsAsync() { + return listCSMAgentlessHostFacetsWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the list of available facets for filtering agentless hosts. + * + * @return ApiResponse<CsmAgentlessHostFacetsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
403 Not Authorized -
429 Too many requests -
+ */ + public ApiResponse listCSMAgentlessHostFacetsWithHttpInfo() + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listCSMAgentlessHostFacets"; + 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; + // create path and map variables + String localVarPath = "/api/v2/csm/settings/agentless_hosts/facets"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CsmSettingsApi.listCSMAgentlessHostFacets", + 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 agentless host facets. + * + *

See {@link #listCSMAgentlessHostFacetsWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<CsmAgentlessHostFacetsResponse>> + */ + public CompletableFuture> + listCSMAgentlessHostFacetsWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "listCSMAgentlessHostFacets"; + 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; + // create path and map variables + String localVarPath = "/api/v2/csm/settings/agentless_hosts/facets"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CsmSettingsApi.listCSMAgentlessHostFacets", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listCSMAgentlessHosts. */ + public static class ListCSMAgentlessHostsOptionalParameters { + private Integer page; + private Integer size; + private String query; + + /** + * Set page. + * + * @param page The page index for pagination (zero-based). (optional, default to 0) + * @return ListCSMAgentlessHostsOptionalParameters + */ + public ListCSMAgentlessHostsOptionalParameters page(Integer page) { + this.page = page; + return this; + } + + /** + * Set size. + * + * @param size The number of agentless hosts to return per page. (optional, default to 10) + * @return ListCSMAgentlessHostsOptionalParameters + */ + public ListCSMAgentlessHostsOptionalParameters size(Integer size) { + this.size = size; + return this; + } + + /** + * Set query. + * + * @param query A search query string to filter agentless hosts. (optional) + * @return ListCSMAgentlessHostsOptionalParameters + */ + public ListCSMAgentlessHostsOptionalParameters query(String query) { + this.query = query; + return this; + } + } + + /** + * List agentless hosts. + * + *

See {@link #listCSMAgentlessHostsWithHttpInfo}. + * + * @return CsmAgentlessHostsResponse + * @throws ApiException if fails to make API call + */ + public CsmAgentlessHostsResponse listCSMAgentlessHosts() throws ApiException { + return listCSMAgentlessHostsWithHttpInfo(new ListCSMAgentlessHostsOptionalParameters()) + .getData(); + } + + /** + * List agentless hosts. + * + *

See {@link #listCSMAgentlessHostsWithHttpInfoAsync}. + * + * @return CompletableFuture<CsmAgentlessHostsResponse> + */ + public CompletableFuture listCSMAgentlessHostsAsync() { + return listCSMAgentlessHostsWithHttpInfoAsync(new ListCSMAgentlessHostsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List agentless hosts. + * + *

See {@link #listCSMAgentlessHostsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CsmAgentlessHostsResponse + * @throws ApiException if fails to make API call + */ + public CsmAgentlessHostsResponse listCSMAgentlessHosts( + ListCSMAgentlessHostsOptionalParameters parameters) throws ApiException { + return listCSMAgentlessHostsWithHttpInfo(parameters).getData(); + } + + /** + * List agentless hosts. + * + *

See {@link #listCSMAgentlessHostsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<CsmAgentlessHostsResponse> + */ + public CompletableFuture listCSMAgentlessHostsAsync( + ListCSMAgentlessHostsOptionalParameters parameters) { + return listCSMAgentlessHostsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the list of agentless hosts for CSM, with optional pagination and filtering. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<CsmAgentlessHostsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
429 Too many requests -
+ */ + public ApiResponse listCSMAgentlessHostsWithHttpInfo( + ListCSMAgentlessHostsOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listCSMAgentlessHosts"; + 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; + Integer page = parameters.page; + Integer size = parameters.size; + String query = parameters.query; + // create path and map variables + String localVarPath = "/api/v2/csm/settings/agentless_hosts"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page", page)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "size", size)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CsmSettingsApi.listCSMAgentlessHosts", + 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 agentless hosts. + * + *

See {@link #listCSMAgentlessHostsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<CsmAgentlessHostsResponse>> + */ + public CompletableFuture> + listCSMAgentlessHostsWithHttpInfoAsync(ListCSMAgentlessHostsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listCSMAgentlessHosts"; + 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; + Integer page = parameters.page; + Integer size = parameters.size; + String query = parameters.query; + // create path and map variables + String localVarPath = "/api/v2/csm/settings/agentless_hosts"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page", page)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "size", size)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CsmSettingsApi.listCSMAgentlessHosts", + 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() {}); + } + + /** + * List unified host facets. + * + *

See {@link #listCSMUnifiedHostFacetsWithHttpInfo}. + * + * @return CsmUnifiedHostFacetsResponse + * @throws ApiException if fails to make API call + */ + public CsmUnifiedHostFacetsResponse listCSMUnifiedHostFacets() throws ApiException { + return listCSMUnifiedHostFacetsWithHttpInfo().getData(); + } + + /** + * List unified host facets. + * + *

See {@link #listCSMUnifiedHostFacetsWithHttpInfoAsync}. + * + * @return CompletableFuture<CsmUnifiedHostFacetsResponse> + */ + public CompletableFuture listCSMUnifiedHostFacetsAsync() { + return listCSMUnifiedHostFacetsWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the list of available facets for filtering unified hosts. + * + * @return ApiResponse<CsmUnifiedHostFacetsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
403 Not Authorized -
429 Too many requests -
+ */ + public ApiResponse listCSMUnifiedHostFacetsWithHttpInfo() + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listCSMUnifiedHostFacets"; + 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; + // create path and map variables + String localVarPath = "/api/v2/csm/settings/hosts/facets"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CsmSettingsApi.listCSMUnifiedHostFacets", + 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 unified host facets. + * + *

See {@link #listCSMUnifiedHostFacetsWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<CsmUnifiedHostFacetsResponse>> + */ + public CompletableFuture> + listCSMUnifiedHostFacetsWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "listCSMUnifiedHostFacets"; + 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; + // create path and map variables + String localVarPath = "/api/v2/csm/settings/hosts/facets"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CsmSettingsApi.listCSMUnifiedHostFacets", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listCSMUnifiedHosts. */ + public static class ListCSMUnifiedHostsOptionalParameters { + private Integer page; + private Integer size; + private String query; + + /** + * Set page. + * + * @param page The page index for pagination (zero-based). (optional, default to 0) + * @return ListCSMUnifiedHostsOptionalParameters + */ + public ListCSMUnifiedHostsOptionalParameters page(Integer page) { + this.page = page; + return this; + } + + /** + * Set size. + * + * @param size The number of hosts to return per page. (optional, default to 10) + * @return ListCSMUnifiedHostsOptionalParameters + */ + public ListCSMUnifiedHostsOptionalParameters size(Integer size) { + this.size = size; + return this; + } + + /** + * Set query. + * + * @param query A search query string to filter unified hosts. (optional) + * @return ListCSMUnifiedHostsOptionalParameters + */ + public ListCSMUnifiedHostsOptionalParameters query(String query) { + this.query = query; + return this; + } + } + + /** + * List unified hosts. + * + *

See {@link #listCSMUnifiedHostsWithHttpInfo}. + * + * @return CsmUnifiedHostsResponse + * @throws ApiException if fails to make API call + */ + public CsmUnifiedHostsResponse listCSMUnifiedHosts() throws ApiException { + return listCSMUnifiedHostsWithHttpInfo(new ListCSMUnifiedHostsOptionalParameters()).getData(); + } + + /** + * List unified hosts. + * + *

See {@link #listCSMUnifiedHostsWithHttpInfoAsync}. + * + * @return CompletableFuture<CsmUnifiedHostsResponse> + */ + public CompletableFuture listCSMUnifiedHostsAsync() { + return listCSMUnifiedHostsWithHttpInfoAsync(new ListCSMUnifiedHostsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List unified hosts. + * + *

See {@link #listCSMUnifiedHostsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CsmUnifiedHostsResponse + * @throws ApiException if fails to make API call + */ + public CsmUnifiedHostsResponse listCSMUnifiedHosts( + ListCSMUnifiedHostsOptionalParameters parameters) throws ApiException { + return listCSMUnifiedHostsWithHttpInfo(parameters).getData(); + } + + /** + * List unified hosts. + * + *

See {@link #listCSMUnifiedHostsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<CsmUnifiedHostsResponse> + */ + public CompletableFuture listCSMUnifiedHostsAsync( + ListCSMUnifiedHostsOptionalParameters parameters) { + return listCSMUnifiedHostsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the list of unified hosts for CSM, combining agent and agentless host data, with optional + * pagination and filtering. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<CsmUnifiedHostsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
429 Too many requests -
+ */ + public ApiResponse listCSMUnifiedHostsWithHttpInfo( + ListCSMUnifiedHostsOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listCSMUnifiedHosts"; + 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; + Integer page = parameters.page; + Integer size = parameters.size; + String query = parameters.query; + // create path and map variables + String localVarPath = "/api/v2/csm/settings/hosts"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page", page)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "size", size)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CsmSettingsApi.listCSMUnifiedHosts", + 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 unified hosts. + * + *

See {@link #listCSMUnifiedHostsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<CsmUnifiedHostsResponse>> + */ + public CompletableFuture> + listCSMUnifiedHostsWithHttpInfoAsync(ListCSMUnifiedHostsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listCSMUnifiedHosts"; + 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; + Integer page = parameters.page; + Integer size = parameters.size; + String query = parameters.query; + // create path and map variables + String localVarPath = "/api/v2/csm/settings/hosts"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page", page)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "size", size)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CsmSettingsApi.listCSMUnifiedHosts", + 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() {}); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/api/CustomerOrgApi.java b/src/main/java/com/datadog/api/client/v2/api/CustomerOrgApi.java new file mode 100644 index 00000000000..5847c7305ee --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/CustomerOrgApi.java @@ -0,0 +1,202 @@ +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.CustomerOrgDisableRequest; +import com.datadog.api.client.v2.model.CustomerOrgDisableResponse; +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") +public class CustomerOrgApi { + private ApiClient apiClient; + + public CustomerOrgApi() { + this(ApiClient.getDefaultApiClient()); + } + + public CustomerOrgApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client. + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client. + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Disable the authenticated customer organization. + * + *

See {@link #disableCustomerOrgWithHttpInfo}. + * + * @param body (required) + * @return CustomerOrgDisableResponse + * @throws ApiException if fails to make API call + */ + public CustomerOrgDisableResponse disableCustomerOrg(CustomerOrgDisableRequest body) + throws ApiException { + return disableCustomerOrgWithHttpInfo(body).getData(); + } + + /** + * Disable the authenticated customer organization. + * + *

See {@link #disableCustomerOrgWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<CustomerOrgDisableResponse> + */ + public CompletableFuture disableCustomerOrgAsync( + CustomerOrgDisableRequest body) { + return disableCustomerOrgWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Disable the Datadog organization associated with the authenticated user or API key. The request + * body uses JSON:API format. If org_uuid is supplied, it must match the + * authenticated org or the request is rejected. Successful calls disable the org and return the + * resulting state from the downstream service. Requires the org_management + * permission. + * + * @param body (required) + * @return ApiResponse<CustomerOrgDisableResponse> + * @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 -
429 Too many requests -
500 Internal Server Error -
+ */ + public ApiResponse disableCustomerOrgWithHttpInfo( + CustomerOrgDisableRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "disableCustomerOrg"; + 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 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling disableCustomerOrg"); + } + // create path and map variables + String localVarPath = "/api/v2/org/disable"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.CustomerOrgApi.disableCustomerOrg", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Disable the authenticated customer organization. + * + *

See {@link #disableCustomerOrgWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<CustomerOrgDisableResponse>> + */ + public CompletableFuture> + disableCustomerOrgWithHttpInfoAsync(CustomerOrgDisableRequest body) { + // Check if unstable operation is enabled + String operationId = "disableCustomerOrg"; + 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 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling disableCustomerOrg")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/org/disable"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.CustomerOrgApi.disableCustomerOrg", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/api/DashboardSharingApi.java b/src/main/java/com/datadog/api/client/v2/api/DashboardSharingApi.java new file mode 100644 index 00000000000..558e9a28614 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/DashboardSharingApi.java @@ -0,0 +1,208 @@ +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.ListSharedDashboardsResponse; +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") +public class DashboardSharingApi { + private ApiClient apiClient; + + public DashboardSharingApi() { + this(ApiClient.getDefaultApiClient()); + } + + public DashboardSharingApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client. + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client. + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * List shared dashboards for a dashboard. + * + *

See {@link #listSharedDashboardsByDashboardIdWithHttpInfo}. + * + * @param dashboardId ID of the dashboard. (required) + * @return ListSharedDashboardsResponse + * @throws ApiException if fails to make API call + */ + public ListSharedDashboardsResponse listSharedDashboardsByDashboardId(String dashboardId) + throws ApiException { + return listSharedDashboardsByDashboardIdWithHttpInfo(dashboardId).getData(); + } + + /** + * List shared dashboards for a dashboard. + * + *

See {@link #listSharedDashboardsByDashboardIdWithHttpInfoAsync}. + * + * @param dashboardId ID of the dashboard. (required) + * @return CompletableFuture<ListSharedDashboardsResponse> + */ + public CompletableFuture listSharedDashboardsByDashboardIdAsync( + String dashboardId) { + return listSharedDashboardsByDashboardIdWithHttpInfoAsync(dashboardId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve shared dashboards associated with the specified dashboard. + * + * @param dashboardId ID of the dashboard. (required) + * @return ApiResponse<ListSharedDashboardsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden -
404 Dashboard Not Found -
429 Too many requests -
+ */ + public ApiResponse listSharedDashboardsByDashboardIdWithHttpInfo( + String dashboardId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listSharedDashboardsByDashboardId"; + 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 'dashboardId' is set + if (dashboardId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'dashboardId' when calling" + + " listSharedDashboardsByDashboardId"); + } + // create path and map variables + String localVarPath = + "/api/v2/dashboard/{dashboard_id}/shared" + .replaceAll( + "\\{" + "dashboard_id" + "\\}", apiClient.escapeString(dashboardId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.DashboardSharingApi.listSharedDashboardsByDashboardId", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List shared dashboards for a dashboard. + * + *

See {@link #listSharedDashboardsByDashboardIdWithHttpInfo}. + * + * @param dashboardId ID of the dashboard. (required) + * @return CompletableFuture<ApiResponse<ListSharedDashboardsResponse>> + */ + public CompletableFuture> + listSharedDashboardsByDashboardIdWithHttpInfoAsync(String dashboardId) { + // Check if unstable operation is enabled + String operationId = "listSharedDashboardsByDashboardId"; + 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 'dashboardId' is set + if (dashboardId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'dashboardId' when calling" + + " listSharedDashboardsByDashboardId")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/dashboard/{dashboard_id}/shared" + .replaceAll( + "\\{" + "dashboard_id" + "\\}", apiClient.escapeString(dashboardId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.DashboardSharingApi.listSharedDashboardsByDashboardId", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/api/DataObservabilityApi.java b/src/main/java/com/datadog/api/client/v2/api/DataObservabilityApi.java new file mode 100644 index 00000000000..642aaf71917 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/DataObservabilityApi.java @@ -0,0 +1,369 @@ +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.GetDataObservabilityMonitorRunStatusResponse; +import com.datadog.api.client.v2.model.RunDataObservabilityMonitorResponse; +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") +public class DataObservabilityApi { + private ApiClient apiClient; + + public DataObservabilityApi() { + this(ApiClient.getDefaultApiClient()); + } + + public DataObservabilityApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client. + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client. + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get data observability monitor run status. + * + *

See {@link #getDataObservabilityMonitorRunStatusWithHttpInfo}. + * + * @param runId The ID of the monitor run to retrieve status for. (required) + * @return GetDataObservabilityMonitorRunStatusResponse + * @throws ApiException if fails to make API call + */ + public GetDataObservabilityMonitorRunStatusResponse getDataObservabilityMonitorRunStatus( + String runId) throws ApiException { + return getDataObservabilityMonitorRunStatusWithHttpInfo(runId).getData(); + } + + /** + * Get data observability monitor run status. + * + *

See {@link #getDataObservabilityMonitorRunStatusWithHttpInfoAsync}. + * + * @param runId The ID of the monitor run to retrieve status for. (required) + * @return CompletableFuture<GetDataObservabilityMonitorRunStatusResponse> + */ + public CompletableFuture + getDataObservabilityMonitorRunStatusAsync(String runId) { + return getDataObservabilityMonitorRunStatusWithHttpInfoAsync(runId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieves the current status of a data observability monitor run. Poll this endpoint after + * triggering a run to determine when evaluation is complete. + * + * @param runId The ID of the monitor run to retrieve status for. (required) + * @return ApiResponse<GetDataObservabilityMonitorRunStatusResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse + getDataObservabilityMonitorRunStatusWithHttpInfo(String runId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getDataObservabilityMonitorRunStatus"; + 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 'runId' is set + if (runId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'runId' when calling" + + " getDataObservabilityMonitorRunStatus"); + } + // create path and map variables + String localVarPath = + "/api/v2/data-observability/monitors/runs/{run_id}/status" + .replaceAll("\\{" + "run_id" + "\\}", apiClient.escapeString(runId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.DataObservabilityApi.getDataObservabilityMonitorRunStatus", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get data observability monitor run status. + * + *

See {@link #getDataObservabilityMonitorRunStatusWithHttpInfo}. + * + * @param runId The ID of the monitor run to retrieve status for. (required) + * @return + * CompletableFuture<ApiResponse<GetDataObservabilityMonitorRunStatusResponse>> + */ + public CompletableFuture> + getDataObservabilityMonitorRunStatusWithHttpInfoAsync(String runId) { + // Check if unstable operation is enabled + String operationId = "getDataObservabilityMonitorRunStatus"; + 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 'runId' is set + if (runId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'runId' when calling" + + " getDataObservabilityMonitorRunStatus")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/data-observability/monitors/runs/{run_id}/status" + .replaceAll("\\{" + "run_id" + "\\}", apiClient.escapeString(runId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.DataObservabilityApi.getDataObservabilityMonitorRunStatus", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Run a data observability monitor. + * + *

See {@link #runDataObservabilityMonitorWithHttpInfo}. + * + * @param monitorId The ID of the data observability monitor to run. (required) + * @return RunDataObservabilityMonitorResponse + * @throws ApiException if fails to make API call + */ + public RunDataObservabilityMonitorResponse runDataObservabilityMonitor(Long monitorId) + throws ApiException { + return runDataObservabilityMonitorWithHttpInfo(monitorId).getData(); + } + + /** + * Run a data observability monitor. + * + *

See {@link #runDataObservabilityMonitorWithHttpInfoAsync}. + * + * @param monitorId The ID of the data observability monitor to run. (required) + * @return CompletableFuture<RunDataObservabilityMonitorResponse> + */ + public CompletableFuture runDataObservabilityMonitorAsync( + Long monitorId) { + return runDataObservabilityMonitorWithHttpInfoAsync(monitorId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Manually triggers a run for a data observability monitor. Only monitors that are not scheduled + * (manually-runnable) can be triggered this way. + * + * @param monitorId The ID of the data observability monitor to run. (required) + * @return ApiResponse<RunDataObservabilityMonitorResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse runDataObservabilityMonitorWithHttpInfo( + Long monitorId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "runDataObservabilityMonitor"; + 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 'monitorId' is set + if (monitorId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'monitorId' when calling runDataObservabilityMonitor"); + } + // create path and map variables + String localVarPath = + "/api/v2/data-observability/monitors/{monitor_id}/run" + .replaceAll("\\{" + "monitor_id" + "\\}", apiClient.escapeString(monitorId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.DataObservabilityApi.runDataObservabilityMonitor", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Run a data observability monitor. + * + *

See {@link #runDataObservabilityMonitorWithHttpInfo}. + * + * @param monitorId The ID of the data observability monitor to run. (required) + * @return CompletableFuture<ApiResponse<RunDataObservabilityMonitorResponse>> + */ + public CompletableFuture> + runDataObservabilityMonitorWithHttpInfoAsync(Long monitorId) { + // Check if unstable operation is enabled + String operationId = "runDataObservabilityMonitor"; + 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 'monitorId' is set + if (monitorId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'monitorId' when calling" + + " runDataObservabilityMonitor")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/data-observability/monitors/{monitor_id}/run" + .replaceAll("\\{" + "monitor_id" + "\\}", apiClient.escapeString(monitorId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.DataObservabilityApi.runDataObservabilityMonitor", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/api/EntityRiskScoresApi.java b/src/main/java/com/datadog/api/client/v2/api/EntityRiskScoresApi.java index fc2a70581b2..844ecbb5807 100644 --- a/src/main/java/com/datadog/api/client/v2/api/EntityRiskScoresApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/EntityRiskScoresApi.java @@ -208,8 +208,8 @@ public ApiResponse getEntityRiskScoreWithHttpIn public static class ListEntityRiskScoresOptionalParameters { private Long from; private Long to; - private Integer pageSize; - private Integer pageNumber; + private Long pageSize; + private Long pageNumber; private String pageQueryId; private String filterSort; private String filterQuery; @@ -245,7 +245,7 @@ public ListEntityRiskScoresOptionalParameters to(Long to) { * @param pageSize Size of the page to return. Maximum is 1000. (optional, default to 10) * @return ListEntityRiskScoresOptionalParameters */ - public ListEntityRiskScoresOptionalParameters pageSize(Integer pageSize) { + public ListEntityRiskScoresOptionalParameters pageSize(Long pageSize) { this.pageSize = pageSize; return this; } @@ -256,7 +256,7 @@ public ListEntityRiskScoresOptionalParameters pageSize(Integer pageSize) { * @param pageNumber Page number to return (1-indexed). (optional, default to 1) * @return ListEntityRiskScoresOptionalParameters */ - public ListEntityRiskScoresOptionalParameters pageNumber(Integer pageNumber) { + public ListEntityRiskScoresOptionalParameters pageNumber(Long pageNumber) { this.pageNumber = pageNumber; return this; } @@ -399,8 +399,8 @@ public ApiResponse listEntityRiskScoresWithHtt Object localVarPostBody = null; Long from = parameters.from; Long to = parameters.to; - Integer pageSize = parameters.pageSize; - Integer pageNumber = parameters.pageNumber; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; String pageQueryId = parameters.pageQueryId; String filterSort = parameters.filterSort; String filterQuery = parameters.filterQuery; @@ -464,8 +464,8 @@ public ApiResponse listEntityRiskScoresWithHtt Object localVarPostBody = null; Long from = parameters.from; Long to = parameters.to; - Integer pageSize = parameters.pageSize; - Integer pageNumber = parameters.pageNumber; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; String pageQueryId = parameters.pageQueryId; String filterSort = parameters.filterSort; String filterQuery = parameters.filterQuery; diff --git a/src/main/java/com/datadog/api/client/v2/api/FeatureFlagsApi.java b/src/main/java/com/datadog/api/client/v2/api/FeatureFlagsApi.java index de2b1ca737d..f237f027eac 100644 --- a/src/main/java/com/datadog/api/client/v2/api/FeatureFlagsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/FeatureFlagsApi.java @@ -1432,8 +1432,8 @@ public ApiResponse getFeatureFlagsEnvironmentWithHttpInfo(U public static class ListFeatureFlagsOptionalParameters { private String key; private Boolean isArchived; - private Integer limit; - private Integer offset; + private Long limit; + private Long offset; /** * Set key. @@ -1463,7 +1463,7 @@ public ListFeatureFlagsOptionalParameters isArchived(Boolean isArchived) { * @param limit Maximum number of results to return. (optional, default to 100) * @return ListFeatureFlagsOptionalParameters */ - public ListFeatureFlagsOptionalParameters limit(Integer limit) { + public ListFeatureFlagsOptionalParameters limit(Long limit) { this.limit = limit; return this; } @@ -1474,7 +1474,7 @@ public ListFeatureFlagsOptionalParameters limit(Integer limit) { * @param offset Number of results to skip. (optional, default to 0) * @return ListFeatureFlagsOptionalParameters */ - public ListFeatureFlagsOptionalParameters offset(Integer offset) { + public ListFeatureFlagsOptionalParameters offset(Long offset) { this.offset = offset; return this; } @@ -1559,8 +1559,8 @@ public ApiResponse listFeatureFlagsWithHttpInfo( Object localVarPostBody = null; String key = parameters.key; Boolean isArchived = parameters.isArchived; - Integer limit = parameters.limit; - Integer offset = parameters.offset; + Long limit = parameters.limit; + Long offset = parameters.offset; // create path and map variables String localVarPath = "/api/v2/feature-flags"; @@ -1605,8 +1605,8 @@ public CompletableFuture> listFeatureFlags Object localVarPostBody = null; String key = parameters.key; Boolean isArchived = parameters.isArchived; - Integer limit = parameters.limit; - Integer offset = parameters.offset; + Long limit = parameters.limit; + Long offset = parameters.offset; // create path and map variables String localVarPath = "/api/v2/feature-flags"; @@ -1649,8 +1649,8 @@ public CompletableFuture> listFeatureFlags public static class ListFeatureFlagsEnvironmentsOptionalParameters { private String name; private String key; - private Integer limit; - private Integer offset; + private Long limit; + private Long offset; /** * Set name. @@ -1680,7 +1680,7 @@ public ListFeatureFlagsEnvironmentsOptionalParameters key(String key) { * @param limit Maximum number of results to return. (optional, default to 100) * @return ListFeatureFlagsEnvironmentsOptionalParameters */ - public ListFeatureFlagsEnvironmentsOptionalParameters limit(Integer limit) { + public ListFeatureFlagsEnvironmentsOptionalParameters limit(Long limit) { this.limit = limit; return this; } @@ -1691,7 +1691,7 @@ public ListFeatureFlagsEnvironmentsOptionalParameters limit(Integer limit) { * @param offset Number of results to skip. (optional, default to 0) * @return ListFeatureFlagsEnvironmentsOptionalParameters */ - public ListFeatureFlagsEnvironmentsOptionalParameters offset(Integer offset) { + public ListFeatureFlagsEnvironmentsOptionalParameters offset(Long offset) { this.offset = offset; return this; } @@ -1778,8 +1778,8 @@ public ApiResponse listFeatureFlagsEnvironmentsWithHtt Object localVarPostBody = null; String name = parameters.name; String key = parameters.key; - Integer limit = parameters.limit; - Integer offset = parameters.offset; + Long limit = parameters.limit; + Long offset = parameters.offset; // create path and map variables String localVarPath = "/api/v2/feature-flags/environments"; @@ -1825,8 +1825,8 @@ public ApiResponse listFeatureFlagsEnvironmentsWithHtt Object localVarPostBody = null; String name = parameters.name; String key = parameters.key; - Integer limit = parameters.limit; - Integer offset = parameters.offset; + Long limit = parameters.limit; + Long offset = parameters.offset; // create path and map variables String localVarPath = "/api/v2/feature-flags/environments"; diff --git a/src/main/java/com/datadog/api/client/v2/api/FleetAutomationApi.java b/src/main/java/com/datadog/api/client/v2/api/FleetAutomationApi.java index c3babafbe6b..26c227bebf7 100644 --- a/src/main/java/com/datadog/api/client/v2/api/FleetAutomationApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/FleetAutomationApi.java @@ -7,12 +7,10 @@ import com.datadog.api.client.v2.model.FleetAgentInfoResponse; import com.datadog.api.client.v2.model.FleetAgentVersionsResponse; import com.datadog.api.client.v2.model.FleetAgentsResponse; -import com.datadog.api.client.v2.model.FleetClustersResponse; import com.datadog.api.client.v2.model.FleetDeploymentConfigureCreateRequest; import com.datadog.api.client.v2.model.FleetDeploymentPackageUpgradeCreateRequest; import com.datadog.api.client.v2.model.FleetDeploymentResponse; import com.datadog.api.client.v2.model.FleetDeploymentsResponse; -import com.datadog.api.client.v2.model.FleetInstrumentedPodsResponse; import com.datadog.api.client.v2.model.FleetScheduleCreateRequest; import com.datadog.api.client.v2.model.FleetSchedulePatchRequest; import com.datadog.api.client.v2.model.FleetScheduleResponse; @@ -2104,279 +2102,6 @@ public ApiResponse listFleetAgentVersionsWithHttpInf new GenericType() {}); } - /** Manage optional parameters to listFleetClusters. */ - public static class ListFleetClustersOptionalParameters { - private Long pageNumber; - private Long pageSize; - private String sortAttribute; - private Boolean sortDescending; - private String filter; - private String tags; - - /** - * Set pageNumber. - * - * @param pageNumber Page number for pagination (starts at 0). (optional, default to 0) - * @return ListFleetClustersOptionalParameters - */ - public ListFleetClustersOptionalParameters pageNumber(Long pageNumber) { - this.pageNumber = pageNumber; - return this; - } - - /** - * Set pageSize. - * - * @param pageSize Number of results per page (must be greater than 0 and less than or equal to - * 100). (optional, default to 10) - * @return ListFleetClustersOptionalParameters - */ - public ListFleetClustersOptionalParameters pageSize(Long pageSize) { - this.pageSize = pageSize; - return this; - } - - /** - * Set sortAttribute. - * - * @param sortAttribute Attribute to sort by. (optional) - * @return ListFleetClustersOptionalParameters - */ - public ListFleetClustersOptionalParameters sortAttribute(String sortAttribute) { - this.sortAttribute = sortAttribute; - return this; - } - - /** - * Set sortDescending. - * - * @param sortDescending Sort order (true for descending, false for ascending). (optional) - * @return ListFleetClustersOptionalParameters - */ - public ListFleetClustersOptionalParameters sortDescending(Boolean sortDescending) { - this.sortDescending = sortDescending; - return this; - } - - /** - * Set filter. - * - * @param filter Filter string for narrowing down cluster results. (optional) - * @return ListFleetClustersOptionalParameters - */ - public ListFleetClustersOptionalParameters filter(String filter) { - this.filter = filter; - return this; - } - - /** - * Set tags. - * - * @param tags Comma-separated list of tags to filter clusters. (optional) - * @return ListFleetClustersOptionalParameters - */ - public ListFleetClustersOptionalParameters tags(String tags) { - this.tags = tags; - return this; - } - } - - /** - * List all fleet clusters. - * - *

See {@link #listFleetClustersWithHttpInfo}. - * - * @return FleetClustersResponse - * @throws ApiException if fails to make API call - */ - public FleetClustersResponse listFleetClusters() throws ApiException { - return listFleetClustersWithHttpInfo(new ListFleetClustersOptionalParameters()).getData(); - } - - /** - * List all fleet clusters. - * - *

See {@link #listFleetClustersWithHttpInfoAsync}. - * - * @return CompletableFuture<FleetClustersResponse> - */ - public CompletableFuture listFleetClustersAsync() { - return listFleetClustersWithHttpInfoAsync(new ListFleetClustersOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * List all fleet clusters. - * - *

See {@link #listFleetClustersWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return FleetClustersResponse - * @throws ApiException if fails to make API call - */ - public FleetClustersResponse listFleetClusters(ListFleetClustersOptionalParameters parameters) - throws ApiException { - return listFleetClustersWithHttpInfo(parameters).getData(); - } - - /** - * List all fleet clusters. - * - *

See {@link #listFleetClustersWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<FleetClustersResponse> - */ - public CompletableFuture listFleetClustersAsync( - ListFleetClustersOptionalParameters parameters) { - return listFleetClustersWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Retrieve a paginated list of Kubernetes clusters in the fleet. - * - *

This endpoint returns clusters with metadata including node counts, agent versions, enabled - * products, and associated services. Use the page_number and page_size - * query parameters to paginate through results. - * - * @param parameters Optional parameters for the request. - * @return ApiResponse<FleetClustersResponse> - * @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 listFleetClustersWithHttpInfo( - ListFleetClustersOptionalParameters parameters) throws ApiException { - // Check if unstable operation is enabled - String operationId = "listFleetClusters"; - 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; - Long pageNumber = parameters.pageNumber; - Long pageSize = parameters.pageSize; - String sortAttribute = parameters.sortAttribute; - Boolean sortDescending = parameters.sortDescending; - String filter = parameters.filter; - String tags = parameters.tags; - // create path and map variables - String localVarPath = "/api/unstable/fleet/clusters"; - - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_number", pageNumber)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_attribute", sortAttribute)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_descending", sortDescending)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "tags", tags)); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.FleetAutomationApi.listFleetClusters", - 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 fleet clusters. - * - *

See {@link #listFleetClustersWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<FleetClustersResponse>> - */ - public CompletableFuture> listFleetClustersWithHttpInfoAsync( - ListFleetClustersOptionalParameters parameters) { - // Check if unstable operation is enabled - String operationId = "listFleetClusters"; - 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; - Long pageNumber = parameters.pageNumber; - Long pageSize = parameters.pageSize; - String sortAttribute = parameters.sortAttribute; - Boolean sortDescending = parameters.sortDescending; - String filter = parameters.filter; - String tags = parameters.tags; - // create path and map variables - String localVarPath = "/api/unstable/fleet/clusters"; - - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_number", pageNumber)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_attribute", sortAttribute)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_descending", sortDescending)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "tags", tags)); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.FleetAutomationApi.listFleetClusters", - 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 listFleetDeployments. */ public static class ListFleetDeploymentsOptionalParameters { private Long pageSize; @@ -2583,175 +2308,6 @@ public ApiResponse listFleetDeploymentsWithHttpInfo( new GenericType() {}); } - /** - * List instrumented pods for a cluster. - * - *

See {@link #listFleetInstrumentedPodsWithHttpInfo}. - * - * @param clusterName The name of the Kubernetes cluster. (required) - * @return FleetInstrumentedPodsResponse - * @throws ApiException if fails to make API call - */ - public FleetInstrumentedPodsResponse listFleetInstrumentedPods(String clusterName) - throws ApiException { - return listFleetInstrumentedPodsWithHttpInfo(clusterName).getData(); - } - - /** - * List instrumented pods for a cluster. - * - *

See {@link #listFleetInstrumentedPodsWithHttpInfoAsync}. - * - * @param clusterName The name of the Kubernetes cluster. (required) - * @return CompletableFuture<FleetInstrumentedPodsResponse> - */ - public CompletableFuture listFleetInstrumentedPodsAsync( - String clusterName) { - return listFleetInstrumentedPodsWithHttpInfoAsync(clusterName) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Retrieve the list of pods targeted for Single Step Instrumentation (SSI) injection in a - * specific Kubernetes cluster. - * - *

This endpoint returns pod groups organized by owner reference (deployment, statefulset, - * etc.) with their injection annotations and applied targets. Use the clusters list endpoint to - * discover available cluster names. - * - * @param clusterName The name of the Kubernetes cluster. (required) - * @return ApiResponse<FleetInstrumentedPodsResponse> - * @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 listFleetInstrumentedPodsWithHttpInfo( - String clusterName) throws ApiException { - // Check if unstable operation is enabled - String operationId = "listFleetInstrumentedPods"; - 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 'clusterName' is set - if (clusterName == null) { - throw new ApiException( - 400, - "Missing the required parameter 'clusterName' when calling listFleetInstrumentedPods"); - } - // create path and map variables - String localVarPath = - "/api/unstable/fleet/clusters/{cluster_name}/instrumented_pods" - .replaceAll( - "\\{" + "cluster_name" + "\\}", apiClient.escapeString(clusterName.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.FleetAutomationApi.listFleetInstrumentedPods", - 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 instrumented pods for a cluster. - * - *

See {@link #listFleetInstrumentedPodsWithHttpInfo}. - * - * @param clusterName The name of the Kubernetes cluster. (required) - * @return CompletableFuture<ApiResponse<FleetInstrumentedPodsResponse>> - */ - public CompletableFuture> - listFleetInstrumentedPodsWithHttpInfoAsync(String clusterName) { - // Check if unstable operation is enabled - String operationId = "listFleetInstrumentedPods"; - 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 'clusterName' is set - if (clusterName == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'clusterName' when calling" - + " listFleetInstrumentedPods")); - return result; - } - // create path and map variables - String localVarPath = - "/api/unstable/fleet/clusters/{cluster_name}/instrumented_pods" - .replaceAll( - "\\{" + "cluster_name" + "\\}", apiClient.escapeString(clusterName.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.FleetAutomationApi.listFleetInstrumentedPods", - 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() {}); - } - /** * List all schedules. * diff --git a/src/main/java/com/datadog/api/client/v2/api/FormsApi.java b/src/main/java/com/datadog/api/client/v2/api/FormsApi.java new file mode 100644 index 00000000000..9aef24710cc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/FormsApi.java @@ -0,0 +1,1703 @@ +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.CloneFormRequest; +import com.datadog.api.client.v2.model.CreateFormRequest; +import com.datadog.api.client.v2.model.DeleteFormResponse; +import com.datadog.api.client.v2.model.FormPublicationResponse; +import com.datadog.api.client.v2.model.FormResponse; +import com.datadog.api.client.v2.model.FormVersionResponse; +import com.datadog.api.client.v2.model.FormsResponse; +import com.datadog.api.client.v2.model.PublishFormRequest; +import com.datadog.api.client.v2.model.UpdateFormRequest; +import com.datadog.api.client.v2.model.UpsertAndPublishFormVersionRequest; +import com.datadog.api.client.v2.model.UpsertFormVersionRequest; +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.UUID; +import java.util.concurrent.CompletableFuture; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FormsApi { + private ApiClient apiClient; + + public FormsApi() { + this(ApiClient.getDefaultApiClient()); + } + + public FormsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client. + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client. + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Clone a form. + * + *

See {@link #cloneFormWithHttpInfo}. + * + * @param formId The ID of the form to clone. (required) + * @param body (required) + * @return FormResponse + * @throws ApiException if fails to make API call + */ + public FormResponse cloneForm(UUID formId, CloneFormRequest body) throws ApiException { + return cloneFormWithHttpInfo(formId, body).getData(); + } + + /** + * Clone a form. + * + *

See {@link #cloneFormWithHttpInfoAsync}. + * + * @param formId The ID of the form to clone. (required) + * @param body (required) + * @return CompletableFuture<FormResponse> + */ + public CompletableFuture cloneFormAsync(UUID formId, CloneFormRequest body) { + return cloneFormWithHttpInfoAsync(formId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Clone an existing form. The clone is created in draft mode using the source form's latest + * version. + * + * @param formId The ID of the form to clone. (required) + * @param body (required) + * @return ApiResponse<FormResponse> + * @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 -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse cloneFormWithHttpInfo(UUID formId, CloneFormRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "cloneForm"; + 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 'formId' is set + if (formId == null) { + throw new ApiException(400, "Missing the required parameter 'formId' when calling cloneForm"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling cloneForm"); + } + // create path and map variables + String localVarPath = + "/api/v2/forms/{form_id}/clone" + .replaceAll("\\{" + "form_id" + "\\}", apiClient.escapeString(formId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.FormsApi.cloneForm", + 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() {}); + } + + /** + * Clone a form. + * + *

See {@link #cloneFormWithHttpInfo}. + * + * @param formId The ID of the form to clone. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<FormResponse>> + */ + public CompletableFuture> cloneFormWithHttpInfoAsync( + UUID formId, CloneFormRequest body) { + // Check if unstable operation is enabled + String operationId = "cloneForm"; + 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 'formId' is set + if (formId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(400, "Missing the required parameter 'formId' when calling cloneForm")); + 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 cloneForm")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/forms/{form_id}/clone" + .replaceAll("\\{" + "form_id" + "\\}", apiClient.escapeString(formId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.FormsApi.cloneForm", + 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() {}); + } + + /** + * Create and publish a form. + * + *

See {@link #createAndPublishFormWithHttpInfo}. + * + * @param body (required) + * @return FormResponse + * @throws ApiException if fails to make API call + */ + public FormResponse createAndPublishForm(CreateFormRequest body) throws ApiException { + return createAndPublishFormWithHttpInfo(body).getData(); + } + + /** + * Create and publish a form. + * + *

See {@link #createAndPublishFormWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<FormResponse> + */ + public CompletableFuture createAndPublishFormAsync(CreateFormRequest body) { + return createAndPublishFormWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Creates a new form and immediately publishes its initial version. This also creates a new + * datastore for form responses and links it to the form. + * + * @param body (required) + * @return ApiResponse<FormResponse> + * @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 -
429 Too many requests -
+ */ + public ApiResponse createAndPublishFormWithHttpInfo(CreateFormRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "createAndPublishForm"; + 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 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createAndPublishForm"); + } + // create path and map variables + String localVarPath = "/api/v2/forms/create_and_publish"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.FormsApi.createAndPublishForm", + 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 and publish a form. + * + *

See {@link #createAndPublishFormWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<FormResponse>> + */ + public CompletableFuture> createAndPublishFormWithHttpInfoAsync( + CreateFormRequest body) { + // Check if unstable operation is enabled + String operationId = "createAndPublishForm"; + 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 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling createAndPublishForm")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/forms/create_and_publish"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.FormsApi.createAndPublishForm", + 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() {}); + } + + /** + * Create a form. + * + *

See {@link #createFormWithHttpInfo}. + * + * @param body (required) + * @return FormResponse + * @throws ApiException if fails to make API call + */ + public FormResponse createForm(CreateFormRequest body) throws ApiException { + return createFormWithHttpInfo(body).getData(); + } + + /** + * Create a form. + * + *

See {@link #createFormWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<FormResponse> + */ + public CompletableFuture createFormAsync(CreateFormRequest body) { + return createFormWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create a new form. The form is created in draft mode and must be published before it can be + * used. This also creates a new datastore for form responses and links it to the form. + * + * @param body (required) + * @return ApiResponse<FormResponse> + * @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 -
429 Too many requests -
+ */ + public ApiResponse createFormWithHttpInfo(CreateFormRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "createForm"; + 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 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling createForm"); + } + // create path and map variables + String localVarPath = "/api/v2/forms"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.FormsApi.createForm", + 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 form. + * + *

See {@link #createFormWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<FormResponse>> + */ + public CompletableFuture> createFormWithHttpInfoAsync( + CreateFormRequest body) { + // Check if unstable operation is enabled + String operationId = "createForm"; + 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 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(400, "Missing the required parameter 'body' when calling createForm")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/forms"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.FormsApi.createForm", + 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() {}); + } + + /** + * Delete a form. + * + *

See {@link #deleteFormWithHttpInfo}. + * + * @param formId The ID of the form. (required) + * @return DeleteFormResponse + * @throws ApiException if fails to make API call + */ + public DeleteFormResponse deleteForm(UUID formId) throws ApiException { + return deleteFormWithHttpInfo(formId).getData(); + } + + /** + * Delete a form. + * + *

See {@link #deleteFormWithHttpInfoAsync}. + * + * @param formId The ID of the form. (required) + * @return CompletableFuture<DeleteFormResponse> + */ + public CompletableFuture deleteFormAsync(UUID formId) { + return deleteFormWithHttpInfoAsync(formId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete a form by its ID. This will also try to delete the associated datastore. + * + * @param formId The ID of the form. (required) + * @return ApiResponse<DeleteFormResponse> + * @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 -
429 Too many requests -
+ */ + public ApiResponse deleteFormWithHttpInfo(UUID formId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteForm"; + 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 'formId' is set + if (formId == null) { + throw new ApiException( + 400, "Missing the required parameter 'formId' when calling deleteForm"); + } + // create path and map variables + String localVarPath = + "/api/v2/forms/{form_id}" + .replaceAll("\\{" + "form_id" + "\\}", apiClient.escapeString(formId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.FormsApi.deleteForm", + 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 a form. + * + *

See {@link #deleteFormWithHttpInfo}. + * + * @param formId The ID of the form. (required) + * @return CompletableFuture<ApiResponse<DeleteFormResponse>> + */ + public CompletableFuture> deleteFormWithHttpInfoAsync( + UUID formId) { + // Check if unstable operation is enabled + String operationId = "deleteForm"; + 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 'formId' is set + if (formId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(400, "Missing the required parameter 'formId' when calling deleteForm")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/forms/{form_id}" + .replaceAll("\\{" + "form_id" + "\\}", apiClient.escapeString(formId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.FormsApi.deleteForm", + 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() {}); + } + + /** Manage optional parameters to getForm. */ + public static class GetFormOptionalParameters { + private String version; + + /** + * Set version. + * + * @param version The version of the form to retrieve. Use 'latest' for the most recent draft, + * 'published' for the last published version, or a specific version number. (optional, + * default to "latest") + * @return GetFormOptionalParameters + */ + public GetFormOptionalParameters version(String version) { + this.version = version; + return this; + } + } + + /** + * Get a form. + * + *

See {@link #getFormWithHttpInfo}. + * + * @param formId The ID of the form. (required) + * @return FormResponse + * @throws ApiException if fails to make API call + */ + public FormResponse getForm(UUID formId) throws ApiException { + return getFormWithHttpInfo(formId, new GetFormOptionalParameters()).getData(); + } + + /** + * Get a form. + * + *

See {@link #getFormWithHttpInfoAsync}. + * + * @param formId The ID of the form. (required) + * @return CompletableFuture<FormResponse> + */ + public CompletableFuture getFormAsync(UUID formId) { + return getFormWithHttpInfoAsync(formId, new GetFormOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a form. + * + *

See {@link #getFormWithHttpInfo}. + * + * @param formId The ID of the form. (required) + * @param parameters Optional parameters for the request. + * @return FormResponse + * @throws ApiException if fails to make API call + */ + public FormResponse getForm(UUID formId, GetFormOptionalParameters parameters) + throws ApiException { + return getFormWithHttpInfo(formId, parameters).getData(); + } + + /** + * Get a form. + * + *

See {@link #getFormWithHttpInfoAsync}. + * + * @param formId The ID of the form. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<FormResponse> + */ + public CompletableFuture getFormAsync( + UUID formId, GetFormOptionalParameters parameters) { + return getFormWithHttpInfoAsync(formId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a form definition by its ID. + * + * @param formId The ID of the form. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<FormResponse> + * @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 -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getFormWithHttpInfo( + UUID formId, GetFormOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getForm"; + 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 'formId' is set + if (formId == null) { + throw new ApiException(400, "Missing the required parameter 'formId' when calling getForm"); + } + String version = parameters.version; + // create path and map variables + String localVarPath = + "/api/v2/forms/{form_id}" + .replaceAll("\\{" + "form_id" + "\\}", apiClient.escapeString(formId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "version", version)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.FormsApi.getForm", + 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 form. + * + *

See {@link #getFormWithHttpInfo}. + * + * @param formId The ID of the form. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<FormResponse>> + */ + public CompletableFuture> getFormWithHttpInfoAsync( + UUID formId, GetFormOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "getForm"; + 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 'formId' is set + if (formId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(400, "Missing the required parameter 'formId' when calling getForm")); + return result; + } + String version = parameters.version; + // create path and map variables + String localVarPath = + "/api/v2/forms/{form_id}" + .replaceAll("\\{" + "form_id" + "\\}", apiClient.escapeString(formId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "version", version)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.FormsApi.getForm", + 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() {}); + } + + /** + * List forms. + * + *

See {@link #listFormsWithHttpInfo}. + * + * @return FormsResponse + * @throws ApiException if fails to make API call + */ + public FormsResponse listForms() throws ApiException { + return listFormsWithHttpInfo().getData(); + } + + /** + * List forms. + * + *

See {@link #listFormsWithHttpInfoAsync}. + * + * @return CompletableFuture<FormsResponse> + */ + public CompletableFuture listFormsAsync() { + return listFormsWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get all forms for the authenticated user's organization. + * + * @return ApiResponse<FormsResponse> + * @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 -
429 Too many requests -
+ */ + public ApiResponse listFormsWithHttpInfo() throws ApiException { + // Check if unstable operation is enabled + String operationId = "listForms"; + 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; + // create path and map variables + String localVarPath = "/api/v2/forms"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.FormsApi.listForms", + 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 forms. + * + *

See {@link #listFormsWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<FormsResponse>> + */ + public CompletableFuture> listFormsWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "listForms"; + 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; + // create path and map variables + String localVarPath = "/api/v2/forms"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.FormsApi.listForms", + 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() {}); + } + + /** + * Publish a form version. + * + *

See {@link #publishFormWithHttpInfo}. + * + * @param formId The ID of the form. (required) + * @param body (required) + * @return FormPublicationResponse + * @throws ApiException if fails to make API call + */ + public FormPublicationResponse publishForm(UUID formId, PublishFormRequest body) + throws ApiException { + return publishFormWithHttpInfo(formId, body).getData(); + } + + /** + * Publish a form version. + * + *

See {@link #publishFormWithHttpInfoAsync}. + * + * @param formId The ID of the form. (required) + * @param body (required) + * @return CompletableFuture<FormPublicationResponse> + */ + public CompletableFuture publishFormAsync( + UUID formId, PublishFormRequest body) { + return publishFormWithHttpInfoAsync(formId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Publish a specific version of a form, making it available for submissions. + * + * @param formId The ID of the form. (required) + * @param body (required) + * @return ApiResponse<FormPublicationResponse> + * @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 -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse publishFormWithHttpInfo( + UUID formId, PublishFormRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "publishForm"; + 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 'formId' is set + if (formId == null) { + throw new ApiException( + 400, "Missing the required parameter 'formId' when calling publishForm"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling publishForm"); + } + // create path and map variables + String localVarPath = + "/api/v2/forms/{form_id}/publish" + .replaceAll("\\{" + "form_id" + "\\}", apiClient.escapeString(formId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.FormsApi.publishForm", + 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() {}); + } + + /** + * Publish a form version. + * + *

See {@link #publishFormWithHttpInfo}. + * + * @param formId The ID of the form. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<FormPublicationResponse>> + */ + public CompletableFuture> publishFormWithHttpInfoAsync( + UUID formId, PublishFormRequest body) { + // Check if unstable operation is enabled + String operationId = "publishForm"; + 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 'formId' is set + if (formId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'formId' when calling publishForm")); + 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 publishForm")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/forms/{form_id}/publish" + .replaceAll("\\{" + "form_id" + "\\}", apiClient.escapeString(formId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.FormsApi.publishForm", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update a form. + * + *

See {@link #updateFormWithHttpInfo}. + * + * @param formId The ID of the form. (required) + * @param body (required) + * @return FormResponse + * @throws ApiException if fails to make API call + */ + public FormResponse updateForm(UUID formId, UpdateFormRequest body) throws ApiException { + return updateFormWithHttpInfo(formId, body).getData(); + } + + /** + * Update a form. + * + *

See {@link #updateFormWithHttpInfoAsync}. + * + * @param formId The ID of the form. (required) + * @param body (required) + * @return CompletableFuture<FormResponse> + */ + public CompletableFuture updateFormAsync(UUID formId, UpdateFormRequest body) { + return updateFormWithHttpInfoAsync(formId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update a form's properties such as its name, description, or datastore configuration. + * + * @param formId The ID of the form. (required) + * @param body (required) + * @return ApiResponse<FormResponse> + * @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 -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse updateFormWithHttpInfo(UUID formId, UpdateFormRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateForm"; + 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 'formId' is set + if (formId == null) { + throw new ApiException( + 400, "Missing the required parameter 'formId' when calling updateForm"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling updateForm"); + } + // create path and map variables + String localVarPath = + "/api/v2/forms/{form_id}" + .replaceAll("\\{" + "form_id" + "\\}", apiClient.escapeString(formId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.FormsApi.updateForm", + 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 form. + * + *

See {@link #updateFormWithHttpInfo}. + * + * @param formId The ID of the form. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<FormResponse>> + */ + public CompletableFuture> updateFormWithHttpInfoAsync( + UUID formId, UpdateFormRequest body) { + // Check if unstable operation is enabled + String operationId = "updateForm"; + 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 'formId' is set + if (formId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(400, "Missing the required parameter 'formId' when calling updateForm")); + 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 updateForm")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/forms/{form_id}" + .replaceAll("\\{" + "form_id" + "\\}", apiClient.escapeString(formId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.FormsApi.updateForm", + 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() {}); + } + + /** + * Upsert and publish a form version. + * + *

See {@link #upsertAndPublishFormVersionWithHttpInfo}. + * + * @param formId The ID of the form. (required) + * @param body (required) + * @return FormResponse + * @throws ApiException if fails to make API call + */ + public FormResponse upsertAndPublishFormVersion( + UUID formId, UpsertAndPublishFormVersionRequest body) throws ApiException { + return upsertAndPublishFormVersionWithHttpInfo(formId, body).getData(); + } + + /** + * Upsert and publish a form version. + * + *

See {@link #upsertAndPublishFormVersionWithHttpInfoAsync}. + * + * @param formId The ID of the form. (required) + * @param body (required) + * @return CompletableFuture<FormResponse> + */ + public CompletableFuture upsertAndPublishFormVersionAsync( + UUID formId, UpsertAndPublishFormVersionRequest body) { + return upsertAndPublishFormVersionWithHttpInfoAsync(formId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Upsert the latest form version and publish it in a single atomic transaction. + * + * @param formId The ID of the form. (required) + * @param body (required) + * @return ApiResponse<FormResponse> + * @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 -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse upsertAndPublishFormVersionWithHttpInfo( + UUID formId, UpsertAndPublishFormVersionRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "upsertAndPublishFormVersion"; + 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 'formId' is set + if (formId == null) { + throw new ApiException( + 400, "Missing the required parameter 'formId' when calling upsertAndPublishFormVersion"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling upsertAndPublishFormVersion"); + } + // create path and map variables + String localVarPath = + "/api/v2/forms/{form_id}/versions/upsert_and_publish" + .replaceAll("\\{" + "form_id" + "\\}", apiClient.escapeString(formId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.FormsApi.upsertAndPublishFormVersion", + 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() {}); + } + + /** + * Upsert and publish a form version. + * + *

See {@link #upsertAndPublishFormVersionWithHttpInfo}. + * + * @param formId The ID of the form. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<FormResponse>> + */ + public CompletableFuture> upsertAndPublishFormVersionWithHttpInfoAsync( + UUID formId, UpsertAndPublishFormVersionRequest body) { + // Check if unstable operation is enabled + String operationId = "upsertAndPublishFormVersion"; + 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 'formId' is set + if (formId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'formId' when calling upsertAndPublishFormVersion")); + 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 upsertAndPublishFormVersion")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/forms/{form_id}/versions/upsert_and_publish" + .replaceAll("\\{" + "form_id" + "\\}", apiClient.escapeString(formId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.FormsApi.upsertAndPublishFormVersion", + 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() {}); + } + + /** + * Create or update a form version. + * + *

See {@link #upsertFormVersionWithHttpInfo}. + * + * @param formId The ID of the form. (required) + * @param body (required) + * @return FormVersionResponse + * @throws ApiException if fails to make API call + */ + public FormVersionResponse upsertFormVersion(UUID formId, UpsertFormVersionRequest body) + throws ApiException { + return upsertFormVersionWithHttpInfo(formId, body).getData(); + } + + /** + * Create or update a form version. + * + *

See {@link #upsertFormVersionWithHttpInfoAsync}. + * + * @param formId The ID of the form. (required) + * @param body (required) + * @return CompletableFuture<FormVersionResponse> + */ + public CompletableFuture upsertFormVersionAsync( + UUID formId, UpsertFormVersionRequest body) { + return upsertFormVersionWithHttpInfoAsync(formId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create or update the latest draft version of a form. The upsert_params field + * controls optimistic concurrency behavior. + * + * @param formId The ID of the form. (required) + * @param body (required) + * @return ApiResponse<FormVersionResponse> + * @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 -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse upsertFormVersionWithHttpInfo( + UUID formId, UpsertFormVersionRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "upsertFormVersion"; + 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 'formId' is set + if (formId == null) { + throw new ApiException( + 400, "Missing the required parameter 'formId' when calling upsertFormVersion"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling upsertFormVersion"); + } + // create path and map variables + String localVarPath = + "/api/v2/forms/{form_id}/versions" + .replaceAll("\\{" + "form_id" + "\\}", apiClient.escapeString(formId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.FormsApi.upsertFormVersion", + 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 a form version. + * + *

See {@link #upsertFormVersionWithHttpInfo}. + * + * @param formId The ID of the form. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<FormVersionResponse>> + */ + public CompletableFuture> upsertFormVersionWithHttpInfoAsync( + UUID formId, UpsertFormVersionRequest body) { + // Check if unstable operation is enabled + String operationId = "upsertFormVersion"; + 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 'formId' is set + if (formId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'formId' when calling upsertFormVersion")); + 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 upsertFormVersion")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/forms/{form_id}/versions" + .replaceAll("\\{" + "form_id" + "\\}", apiClient.escapeString(formId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.FormsApi.upsertFormVersion", + 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() {}); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/api/GoogleChatIntegrationApi.java b/src/main/java/com/datadog/api/client/v2/api/GoogleChatIntegrationApi.java index 61e1c6a403f..bf437a0155a 100644 --- a/src/main/java/com/datadog/api/client/v2/api/GoogleChatIntegrationApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/GoogleChatIntegrationApi.java @@ -6,8 +6,15 @@ import com.datadog.api.client.Pair; import com.datadog.api.client.v2.model.GoogleChatAppNamedSpaceResponse; import com.datadog.api.client.v2.model.GoogleChatCreateOrganizationHandleRequest; +import com.datadog.api.client.v2.model.GoogleChatDelegatedUserResponse; import com.datadog.api.client.v2.model.GoogleChatOrganizationHandleResponse; import com.datadog.api.client.v2.model.GoogleChatOrganizationHandlesResponse; +import com.datadog.api.client.v2.model.GoogleChatOrganizationResponse; +import com.datadog.api.client.v2.model.GoogleChatOrganizationsResponse; +import com.datadog.api.client.v2.model.GoogleChatTargetAudienceCreateRequest; +import com.datadog.api.client.v2.model.GoogleChatTargetAudienceResponse; +import com.datadog.api.client.v2.model.GoogleChatTargetAudienceUpdateRequest; +import com.datadog.api.client.v2.model.GoogleChatTargetAudiencesResponse; import com.datadog.api.client.v2.model.GoogleChatUpdateOrganizationHandleRequest; import jakarta.ws.rs.client.Invocation; import jakarta.ws.rs.core.GenericType; @@ -47,6 +54,180 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } + /** + * Create a target audience. + * + *

See {@link #createGoogleChatTargetAudienceWithHttpInfo}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param body Target audience payload. (required) + * @return GoogleChatTargetAudienceResponse + * @throws ApiException if fails to make API call + */ + public GoogleChatTargetAudienceResponse createGoogleChatTargetAudience( + String organizationBindingId, GoogleChatTargetAudienceCreateRequest body) + throws ApiException { + return createGoogleChatTargetAudienceWithHttpInfo(organizationBindingId, body).getData(); + } + + /** + * Create a target audience. + * + *

See {@link #createGoogleChatTargetAudienceWithHttpInfoAsync}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param body Target audience payload. (required) + * @return CompletableFuture<GoogleChatTargetAudienceResponse> + */ + public CompletableFuture createGoogleChatTargetAudienceAsync( + String organizationBindingId, GoogleChatTargetAudienceCreateRequest body) { + return createGoogleChatTargetAudienceWithHttpInfoAsync(organizationBindingId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create a target audience for a Google Chat organization binding in the Datadog Google Chat + * integration. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param body Target audience payload. (required) + * @return ApiResponse<GoogleChatTargetAudienceResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 CREATED -
400 Bad Request -
403 Forbidden -
404 Not Found -
409 Conflict -
429 Too many requests -
+ */ + public ApiResponse createGoogleChatTargetAudienceWithHttpInfo( + String organizationBindingId, GoogleChatTargetAudienceCreateRequest body) + throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'organizationBindingId' is set + if (organizationBindingId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'organizationBindingId' when calling" + + " createGoogleChatTargetAudience"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createGoogleChatTargetAudience"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/{organization_binding_id}/target-audiences" + .replaceAll( + "\\{" + "organization_binding_id" + "\\}", + apiClient.escapeString(organizationBindingId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.createGoogleChatTargetAudience", + 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 target audience. + * + *

See {@link #createGoogleChatTargetAudienceWithHttpInfo}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param body Target audience payload. (required) + * @return CompletableFuture<ApiResponse<GoogleChatTargetAudienceResponse>> + */ + public CompletableFuture> + createGoogleChatTargetAudienceWithHttpInfoAsync( + String organizationBindingId, GoogleChatTargetAudienceCreateRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'organizationBindingId' is set + if (organizationBindingId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'organizationBindingId' when calling" + + " createGoogleChatTargetAudience")); + 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 createGoogleChatTargetAudience")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/{organization_binding_id}/target-audiences" + .replaceAll( + "\\{" + "organization_binding_id" + "\\}", + apiClient.escapeString(organizationBindingId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.createGoogleChatTargetAudience", + 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() {}); + } + /** * Create organization handle. * @@ -220,31 +401,27 @@ public ApiResponse createOrganizationHandl } /** - * Delete organization handle. + * Delete the delegated user. * - *

See {@link #deleteOrganizationHandleWithHttpInfo}. + *

See {@link #deleteGoogleChatDelegatedUserWithHttpInfo}. * * @param organizationBindingId Your organization binding ID. (required) - * @param handleId Your organization handle ID. (required) * @throws ApiException if fails to make API call */ - public void deleteOrganizationHandle(String organizationBindingId, String handleId) - throws ApiException { - deleteOrganizationHandleWithHttpInfo(organizationBindingId, handleId); + public void deleteGoogleChatDelegatedUser(String organizationBindingId) throws ApiException { + deleteGoogleChatDelegatedUserWithHttpInfo(organizationBindingId); } /** - * Delete organization handle. + * Delete the delegated user. * - *

See {@link #deleteOrganizationHandleWithHttpInfoAsync}. + *

See {@link #deleteGoogleChatDelegatedUserWithHttpInfoAsync}. * * @param organizationBindingId Your organization binding ID. (required) - * @param handleId Your organization handle ID. (required) * @return CompletableFuture */ - public CompletableFuture deleteOrganizationHandleAsync( - String organizationBindingId, String handleId) { - return deleteOrganizationHandleWithHttpInfoAsync(organizationBindingId, handleId) + public CompletableFuture deleteGoogleChatDelegatedUserAsync(String organizationBindingId) { + return deleteGoogleChatDelegatedUserWithHttpInfoAsync(organizationBindingId) .thenApply( response -> { return response.getData(); @@ -252,10 +429,10 @@ public CompletableFuture deleteOrganizationHandleAsync( } /** - * Delete an organization handle from the Datadog Google Chat integration. + * Delete the delegated user for a Google Chat organization binding from the Datadog Google Chat + * integration. * * @param organizationBindingId Your organization binding ID. (required) - * @param handleId Your organization handle ID. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details @@ -263,13 +440,13 @@ public CompletableFuture deleteOrganizationHandleAsync( * Response details * Status Code Description Response Headers * 204 OK - - * 400 Bad Request - * 403 Forbidden - + * 404 Not Found - * 429 Too many requests - * */ - public ApiResponse deleteOrganizationHandleWithHttpInfo( - String organizationBindingId, String handleId) throws ApiException { + public ApiResponse deleteGoogleChatDelegatedUserWithHttpInfo(String organizationBindingId) + throws ApiException { Object localVarPostBody = null; // verify the required parameter 'organizationBindingId' is set @@ -277,27 +454,20 @@ public ApiResponse deleteOrganizationHandleWithHttpInfo( throw new ApiException( 400, "Missing the required parameter 'organizationBindingId' when calling" - + " deleteOrganizationHandle"); - } - - // verify the required parameter 'handleId' is set - if (handleId == null) { - throw new ApiException( - 400, "Missing the required parameter 'handleId' when calling deleteOrganizationHandle"); + + " deleteGoogleChatDelegatedUser"); } // create path and map variables String localVarPath = - "/api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles/{handle_id}" + "/api/v2/integration/google-chat/organizations/{organization_binding_id}/delegated-user" .replaceAll( "\\{" + "organization_binding_id" + "\\}", - apiClient.escapeString(organizationBindingId.toString())) - .replaceAll("\\{" + "handle_id" + "\\}", apiClient.escapeString(handleId.toString())); + apiClient.escapeString(organizationBindingId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.GoogleChatIntegrationApi.deleteOrganizationHandle", + "v2.GoogleChatIntegrationApi.deleteGoogleChatDelegatedUser", localVarPath, new ArrayList(), localVarHeaderParams, @@ -316,16 +486,15 @@ public ApiResponse deleteOrganizationHandleWithHttpInfo( } /** - * Delete organization handle. + * Delete the delegated user. * - *

See {@link #deleteOrganizationHandleWithHttpInfo}. + *

See {@link #deleteGoogleChatDelegatedUserWithHttpInfo}. * * @param organizationBindingId Your organization binding ID. (required) - * @param handleId Your organization handle ID. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteOrganizationHandleWithHttpInfoAsync( - String organizationBindingId, String handleId) { + public CompletableFuture> deleteGoogleChatDelegatedUserWithHttpInfoAsync( + String organizationBindingId) { Object localVarPostBody = null; // verify the required parameter 'organizationBindingId' is set @@ -335,26 +504,15 @@ public CompletableFuture> deleteOrganizationHandleWithHttpInfo new ApiException( 400, "Missing the required parameter 'organizationBindingId' when calling" - + " deleteOrganizationHandle")); - return result; - } - - // verify the required parameter 'handleId' is set - if (handleId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'handleId' when calling deleteOrganizationHandle")); + + " deleteGoogleChatDelegatedUser")); return result; } // create path and map variables String localVarPath = - "/api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles/{handle_id}" + "/api/v2/integration/google-chat/organizations/{organization_binding_id}/delegated-user" .replaceAll( "\\{" + "organization_binding_id" + "\\}", - apiClient.escapeString(organizationBindingId.toString())) - .replaceAll("\\{" + "handle_id" + "\\}", apiClient.escapeString(handleId.toString())); + apiClient.escapeString(organizationBindingId.toString())); Map localVarHeaderParams = new HashMap(); @@ -362,7 +520,7 @@ public CompletableFuture> deleteOrganizationHandleWithHttpInfo try { builder = apiClient.createBuilder( - "v2.GoogleChatIntegrationApi.deleteOrganizationHandle", + "v2.GoogleChatIntegrationApi.deleteGoogleChatDelegatedUser", localVarPath, new ArrayList(), localVarHeaderParams, @@ -386,32 +544,27 @@ public CompletableFuture> deleteOrganizationHandleWithHttpInfo } /** - * Get organization handle. + * Delete a Google Chat organization binding. * - *

See {@link #getOrganizationHandleWithHttpInfo}. + *

See {@link #deleteGoogleChatOrganizationWithHttpInfo}. * * @param organizationBindingId Your organization binding ID. (required) - * @param handleId Your organization handle ID. (required) - * @return GoogleChatOrganizationHandleResponse * @throws ApiException if fails to make API call */ - public GoogleChatOrganizationHandleResponse getOrganizationHandle( - String organizationBindingId, String handleId) throws ApiException { - return getOrganizationHandleWithHttpInfo(organizationBindingId, handleId).getData(); + public void deleteGoogleChatOrganization(String organizationBindingId) throws ApiException { + deleteGoogleChatOrganizationWithHttpInfo(organizationBindingId); } /** - * Get organization handle. + * Delete a Google Chat organization binding. * - *

See {@link #getOrganizationHandleWithHttpInfoAsync}. + *

See {@link #deleteGoogleChatOrganizationWithHttpInfoAsync}. * * @param organizationBindingId Your organization binding ID. (required) - * @param handleId Your organization handle ID. (required) - * @return CompletableFuture<GoogleChatOrganizationHandleResponse> + * @return CompletableFuture */ - public CompletableFuture getOrganizationHandleAsync( - String organizationBindingId, String handleId) { - return getOrganizationHandleWithHttpInfoAsync(organizationBindingId, handleId) + public CompletableFuture deleteGoogleChatOrganizationAsync(String organizationBindingId) { + return deleteGoogleChatOrganizationWithHttpInfoAsync(organizationBindingId) .thenApply( response -> { return response.getData(); @@ -419,25 +572,23 @@ public CompletableFuture getOrganizationHa } /** - * Get an organization handle from the Datadog Google Chat integration. + * Delete a Google Chat organization binding from the Datadog Google Chat integration. * * @param organizationBindingId Your organization binding ID. (required) - * @param handleId Your organization handle ID. (required) - * @return ApiResponse<GoogleChatOrganizationHandleResponse> + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * - * * *
Response details
Status Code Description Response Headers
200 OK -
204 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse getOrganizationHandleWithHttpInfo( - String organizationBindingId, String handleId) throws ApiException { + public ApiResponse deleteGoogleChatOrganizationWithHttpInfo(String organizationBindingId) + throws ApiException { Object localVarPostBody = null; // verify the required parameter 'organizationBindingId' is set @@ -445,84 +596,1048 @@ public ApiResponse getOrganizationHandleWi throw new ApiException( 400, "Missing the required parameter 'organizationBindingId' when calling" - + " getOrganizationHandle"); - } - - // verify the required parameter 'handleId' is set - if (handleId == null) { - throw new ApiException( - 400, "Missing the required parameter 'handleId' when calling getOrganizationHandle"); + + " deleteGoogleChatOrganization"); } // create path and map variables String localVarPath = - "/api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles/{handle_id}" + "/api/v2/integration/google-chat/organizations/{organization_binding_id}" .replaceAll( "\\{" + "organization_binding_id" + "\\}", - apiClient.escapeString(organizationBindingId.toString())) - .replaceAll("\\{" + "handle_id" + "\\}", apiClient.escapeString(handleId.toString())); + apiClient.escapeString(organizationBindingId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.GoogleChatIntegrationApi.getOrganizationHandle", + "v2.GoogleChatIntegrationApi.deleteGoogleChatOrganization", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth"}); return apiClient.invokeAPI( - "GET", + "DELETE", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Get organization handle. + * Delete a Google Chat organization binding. * - *

See {@link #getOrganizationHandleWithHttpInfo}. + *

See {@link #deleteGoogleChatOrganizationWithHttpInfo}. * * @param organizationBindingId Your organization binding ID. (required) - * @param handleId Your organization handle ID. (required) - * @return CompletableFuture<ApiResponse<GoogleChatOrganizationHandleResponse>> + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - getOrganizationHandleWithHttpInfoAsync(String organizationBindingId, String handleId) { + public CompletableFuture> deleteGoogleChatOrganizationWithHttpInfoAsync( + String organizationBindingId) { Object localVarPostBody = null; // verify the required parameter 'organizationBindingId' is set if (organizationBindingId == null) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'organizationBindingId' when calling" - + " getOrganizationHandle")); - return result; - } - - // verify the required parameter 'handleId' is set - if (handleId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'handleId' when calling getOrganizationHandle")); + + " deleteGoogleChatOrganization")); return result; } // create path and map variables String localVarPath = - "/api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles/{handle_id}" + "/api/v2/integration/google-chat/organizations/{organization_binding_id}" .replaceAll( "\\{" + "organization_binding_id" + "\\}", - apiClient.escapeString(organizationBindingId.toString())) + apiClient.escapeString(organizationBindingId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.deleteGoogleChatOrganization", + 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); + } + + /** + * Delete a target audience. + * + *

See {@link #deleteGoogleChatTargetAudienceWithHttpInfo}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param targetAudienceId Your target audience ID. (required) + * @throws ApiException if fails to make API call + */ + public void deleteGoogleChatTargetAudience(String organizationBindingId, String targetAudienceId) + throws ApiException { + deleteGoogleChatTargetAudienceWithHttpInfo(organizationBindingId, targetAudienceId); + } + + /** + * Delete a target audience. + * + *

See {@link #deleteGoogleChatTargetAudienceWithHttpInfoAsync}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param targetAudienceId Your target audience ID. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteGoogleChatTargetAudienceAsync( + String organizationBindingId, String targetAudienceId) { + return deleteGoogleChatTargetAudienceWithHttpInfoAsync(organizationBindingId, targetAudienceId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete a target audience from a Google Chat organization binding in the Datadog Google Chat + * integration. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param targetAudienceId Your target audience 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 -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse deleteGoogleChatTargetAudienceWithHttpInfo( + String organizationBindingId, String targetAudienceId) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'organizationBindingId' is set + if (organizationBindingId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'organizationBindingId' when calling" + + " deleteGoogleChatTargetAudience"); + } + + // verify the required parameter 'targetAudienceId' is set + if (targetAudienceId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'targetAudienceId' when calling" + + " deleteGoogleChatTargetAudience"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/{organization_binding_id}/target-audiences/{target_audience_id}" + .replaceAll( + "\\{" + "organization_binding_id" + "\\}", + apiClient.escapeString(organizationBindingId.toString())) + .replaceAll( + "\\{" + "target_audience_id" + "\\}", + apiClient.escapeString(targetAudienceId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.deleteGoogleChatTargetAudience", + 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 target audience. + * + *

See {@link #deleteGoogleChatTargetAudienceWithHttpInfo}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param targetAudienceId Your target audience ID. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteGoogleChatTargetAudienceWithHttpInfoAsync( + String organizationBindingId, String targetAudienceId) { + Object localVarPostBody = null; + + // verify the required parameter 'organizationBindingId' is set + if (organizationBindingId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'organizationBindingId' when calling" + + " deleteGoogleChatTargetAudience")); + return result; + } + + // verify the required parameter 'targetAudienceId' is set + if (targetAudienceId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'targetAudienceId' when calling" + + " deleteGoogleChatTargetAudience")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/{organization_binding_id}/target-audiences/{target_audience_id}" + .replaceAll( + "\\{" + "organization_binding_id" + "\\}", + apiClient.escapeString(organizationBindingId.toString())) + .replaceAll( + "\\{" + "target_audience_id" + "\\}", + apiClient.escapeString(targetAudienceId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.deleteGoogleChatTargetAudience", + 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); + } + + /** + * Delete organization handle. + * + *

See {@link #deleteOrganizationHandleWithHttpInfo}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param handleId Your organization handle ID. (required) + * @throws ApiException if fails to make API call + */ + public void deleteOrganizationHandle(String organizationBindingId, String handleId) + throws ApiException { + deleteOrganizationHandleWithHttpInfo(organizationBindingId, handleId); + } + + /** + * Delete organization handle. + * + *

See {@link #deleteOrganizationHandleWithHttpInfoAsync}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param handleId Your organization handle ID. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteOrganizationHandleAsync( + String organizationBindingId, String handleId) { + return deleteOrganizationHandleWithHttpInfoAsync(organizationBindingId, handleId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete an organization handle from the Datadog Google Chat integration. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param handleId Your organization handle 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 -
400 Bad Request -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse deleteOrganizationHandleWithHttpInfo( + String organizationBindingId, String handleId) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'organizationBindingId' is set + if (organizationBindingId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'organizationBindingId' when calling" + + " deleteOrganizationHandle"); + } + + // verify the required parameter 'handleId' is set + if (handleId == null) { + throw new ApiException( + 400, "Missing the required parameter 'handleId' when calling deleteOrganizationHandle"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles/{handle_id}" + .replaceAll( + "\\{" + "organization_binding_id" + "\\}", + apiClient.escapeString(organizationBindingId.toString())) + .replaceAll("\\{" + "handle_id" + "\\}", apiClient.escapeString(handleId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.deleteOrganizationHandle", + 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 organization handle. + * + *

See {@link #deleteOrganizationHandleWithHttpInfo}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param handleId Your organization handle ID. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteOrganizationHandleWithHttpInfoAsync( + String organizationBindingId, String handleId) { + Object localVarPostBody = null; + + // verify the required parameter 'organizationBindingId' is set + if (organizationBindingId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'organizationBindingId' when calling" + + " deleteOrganizationHandle")); + return result; + } + + // verify the required parameter 'handleId' is set + if (handleId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'handleId' when calling deleteOrganizationHandle")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles/{handle_id}" + .replaceAll( + "\\{" + "organization_binding_id" + "\\}", + apiClient.escapeString(organizationBindingId.toString())) + .replaceAll("\\{" + "handle_id" + "\\}", apiClient.escapeString(handleId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.deleteOrganizationHandle", + 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); + } + + /** + * Get the delegated user. + * + *

See {@link #getGoogleChatDelegatedUserWithHttpInfo}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @return GoogleChatDelegatedUserResponse + * @throws ApiException if fails to make API call + */ + public GoogleChatDelegatedUserResponse getGoogleChatDelegatedUser(String organizationBindingId) + throws ApiException { + return getGoogleChatDelegatedUserWithHttpInfo(organizationBindingId).getData(); + } + + /** + * Get the delegated user. + * + *

See {@link #getGoogleChatDelegatedUserWithHttpInfoAsync}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @return CompletableFuture<GoogleChatDelegatedUserResponse> + */ + public CompletableFuture getGoogleChatDelegatedUserAsync( + String organizationBindingId) { + return getGoogleChatDelegatedUserWithHttpInfoAsync(organizationBindingId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the delegated user for a Google Chat organization binding in the Datadog Google Chat + * integration. + * + * @param organizationBindingId Your organization binding ID. (required) + * @return ApiResponse<GoogleChatDelegatedUserResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getGoogleChatDelegatedUserWithHttpInfo( + String organizationBindingId) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'organizationBindingId' is set + if (organizationBindingId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'organizationBindingId' when calling" + + " getGoogleChatDelegatedUser"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/{organization_binding_id}/delegated-user" + .replaceAll( + "\\{" + "organization_binding_id" + "\\}", + apiClient.escapeString(organizationBindingId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.getGoogleChatDelegatedUser", + 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 delegated user. + * + *

See {@link #getGoogleChatDelegatedUserWithHttpInfo}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @return CompletableFuture<ApiResponse<GoogleChatDelegatedUserResponse>> + */ + public CompletableFuture> + getGoogleChatDelegatedUserWithHttpInfoAsync(String organizationBindingId) { + Object localVarPostBody = null; + + // verify the required parameter 'organizationBindingId' is set + if (organizationBindingId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'organizationBindingId' when calling" + + " getGoogleChatDelegatedUser")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/{organization_binding_id}/delegated-user" + .replaceAll( + "\\{" + "organization_binding_id" + "\\}", + apiClient.escapeString(organizationBindingId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.getGoogleChatDelegatedUser", + 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() {}); + } + + /** + * Get a Google Chat organization binding. + * + *

See {@link #getGoogleChatOrganizationWithHttpInfo}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @return GoogleChatOrganizationResponse + * @throws ApiException if fails to make API call + */ + public GoogleChatOrganizationResponse getGoogleChatOrganization(String organizationBindingId) + throws ApiException { + return getGoogleChatOrganizationWithHttpInfo(organizationBindingId).getData(); + } + + /** + * Get a Google Chat organization binding. + * + *

See {@link #getGoogleChatOrganizationWithHttpInfoAsync}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @return CompletableFuture<GoogleChatOrganizationResponse> + */ + public CompletableFuture getGoogleChatOrganizationAsync( + String organizationBindingId) { + return getGoogleChatOrganizationWithHttpInfoAsync(organizationBindingId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a Google Chat organization binding from the Datadog Google Chat integration. + * + * @param organizationBindingId Your organization binding ID. (required) + * @return ApiResponse<GoogleChatOrganizationResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getGoogleChatOrganizationWithHttpInfo( + String organizationBindingId) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'organizationBindingId' is set + if (organizationBindingId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'organizationBindingId' when calling" + + " getGoogleChatOrganization"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/{organization_binding_id}" + .replaceAll( + "\\{" + "organization_binding_id" + "\\}", + apiClient.escapeString(organizationBindingId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.getGoogleChatOrganization", + 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 Google Chat organization binding. + * + *

See {@link #getGoogleChatOrganizationWithHttpInfo}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @return CompletableFuture<ApiResponse<GoogleChatOrganizationResponse>> + */ + public CompletableFuture> + getGoogleChatOrganizationWithHttpInfoAsync(String organizationBindingId) { + Object localVarPostBody = null; + + // verify the required parameter 'organizationBindingId' is set + if (organizationBindingId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'organizationBindingId' when calling" + + " getGoogleChatOrganization")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/{organization_binding_id}" + .replaceAll( + "\\{" + "organization_binding_id" + "\\}", + apiClient.escapeString(organizationBindingId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.getGoogleChatOrganization", + 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() {}); + } + + /** + * Get a target audience. + * + *

See {@link #getGoogleChatTargetAudienceWithHttpInfo}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param targetAudienceId Your target audience ID. (required) + * @return GoogleChatTargetAudienceResponse + * @throws ApiException if fails to make API call + */ + public GoogleChatTargetAudienceResponse getGoogleChatTargetAudience( + String organizationBindingId, String targetAudienceId) throws ApiException { + return getGoogleChatTargetAudienceWithHttpInfo(organizationBindingId, targetAudienceId) + .getData(); + } + + /** + * Get a target audience. + * + *

See {@link #getGoogleChatTargetAudienceWithHttpInfoAsync}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param targetAudienceId Your target audience ID. (required) + * @return CompletableFuture<GoogleChatTargetAudienceResponse> + */ + public CompletableFuture getGoogleChatTargetAudienceAsync( + String organizationBindingId, String targetAudienceId) { + return getGoogleChatTargetAudienceWithHttpInfoAsync(organizationBindingId, targetAudienceId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a target audience for a Google Chat organization binding in the Datadog Google Chat + * integration. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param targetAudienceId Your target audience ID. (required) + * @return ApiResponse<GoogleChatTargetAudienceResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getGoogleChatTargetAudienceWithHttpInfo( + String organizationBindingId, String targetAudienceId) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'organizationBindingId' is set + if (organizationBindingId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'organizationBindingId' when calling" + + " getGoogleChatTargetAudience"); + } + + // verify the required parameter 'targetAudienceId' is set + if (targetAudienceId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'targetAudienceId' when calling" + + " getGoogleChatTargetAudience"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/{organization_binding_id}/target-audiences/{target_audience_id}" + .replaceAll( + "\\{" + "organization_binding_id" + "\\}", + apiClient.escapeString(organizationBindingId.toString())) + .replaceAll( + "\\{" + "target_audience_id" + "\\}", + apiClient.escapeString(targetAudienceId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.getGoogleChatTargetAudience", + 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 target audience. + * + *

See {@link #getGoogleChatTargetAudienceWithHttpInfo}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param targetAudienceId Your target audience ID. (required) + * @return CompletableFuture<ApiResponse<GoogleChatTargetAudienceResponse>> + */ + public CompletableFuture> + getGoogleChatTargetAudienceWithHttpInfoAsync( + String organizationBindingId, String targetAudienceId) { + Object localVarPostBody = null; + + // verify the required parameter 'organizationBindingId' is set + if (organizationBindingId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'organizationBindingId' when calling" + + " getGoogleChatTargetAudience")); + return result; + } + + // verify the required parameter 'targetAudienceId' is set + if (targetAudienceId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'targetAudienceId' when calling" + + " getGoogleChatTargetAudience")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/{organization_binding_id}/target-audiences/{target_audience_id}" + .replaceAll( + "\\{" + "organization_binding_id" + "\\}", + apiClient.escapeString(organizationBindingId.toString())) + .replaceAll( + "\\{" + "target_audience_id" + "\\}", + apiClient.escapeString(targetAudienceId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.getGoogleChatTargetAudience", + 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() {}); + } + + /** + * Get organization handle. + * + *

See {@link #getOrganizationHandleWithHttpInfo}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param handleId Your organization handle ID. (required) + * @return GoogleChatOrganizationHandleResponse + * @throws ApiException if fails to make API call + */ + public GoogleChatOrganizationHandleResponse getOrganizationHandle( + String organizationBindingId, String handleId) throws ApiException { + return getOrganizationHandleWithHttpInfo(organizationBindingId, handleId).getData(); + } + + /** + * Get organization handle. + * + *

See {@link #getOrganizationHandleWithHttpInfoAsync}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param handleId Your organization handle ID. (required) + * @return CompletableFuture<GoogleChatOrganizationHandleResponse> + */ + public CompletableFuture getOrganizationHandleAsync( + String organizationBindingId, String handleId) { + return getOrganizationHandleWithHttpInfoAsync(organizationBindingId, handleId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get an organization handle from the Datadog Google Chat integration. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param handleId Your organization handle ID. (required) + * @return ApiResponse<GoogleChatOrganizationHandleResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getOrganizationHandleWithHttpInfo( + String organizationBindingId, String handleId) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'organizationBindingId' is set + if (organizationBindingId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'organizationBindingId' when calling" + + " getOrganizationHandle"); + } + + // verify the required parameter 'handleId' is set + if (handleId == null) { + throw new ApiException( + 400, "Missing the required parameter 'handleId' when calling getOrganizationHandle"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles/{handle_id}" + .replaceAll( + "\\{" + "organization_binding_id" + "\\}", + apiClient.escapeString(organizationBindingId.toString())) + .replaceAll("\\{" + "handle_id" + "\\}", apiClient.escapeString(handleId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.getOrganizationHandle", + 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 handle. + * + *

See {@link #getOrganizationHandleWithHttpInfo}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param handleId Your organization handle ID. (required) + * @return CompletableFuture<ApiResponse<GoogleChatOrganizationHandleResponse>> + */ + public CompletableFuture> + getOrganizationHandleWithHttpInfoAsync(String organizationBindingId, String handleId) { + Object localVarPostBody = null; + + // verify the required parameter 'organizationBindingId' is set + if (organizationBindingId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'organizationBindingId' when calling" + + " getOrganizationHandle")); + return result; + } + + // verify the required parameter 'handleId' is set + if (handleId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'handleId' when calling getOrganizationHandle")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/{organization_binding_id}/organization-handles/{handle_id}" + .replaceAll( + "\\{" + "organization_binding_id" + "\\}", + apiClient.escapeString(organizationBindingId.toString())) .replaceAll("\\{" + "handle_id" + "\\}", apiClient.escapeString(handleId.toString())); Map localVarHeaderParams = new HashMap(); @@ -531,7 +1646,292 @@ public ApiResponse getOrganizationHandleWi try { builder = apiClient.createBuilder( - "v2.GoogleChatIntegrationApi.getOrganizationHandle", + "v2.GoogleChatIntegrationApi.getOrganizationHandle", + 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() {}); + } + + /** + * Get space information by display name. + * + *

See {@link #getSpaceByDisplayNameWithHttpInfo}. + * + * @param domainName The Google Chat domain name. (required) + * @param spaceDisplayName The Google Chat space display name. (required) + * @return GoogleChatAppNamedSpaceResponse + * @throws ApiException if fails to make API call + */ + public GoogleChatAppNamedSpaceResponse getSpaceByDisplayName( + String domainName, String spaceDisplayName) throws ApiException { + return getSpaceByDisplayNameWithHttpInfo(domainName, spaceDisplayName).getData(); + } + + /** + * Get space information by display name. + * + *

See {@link #getSpaceByDisplayNameWithHttpInfoAsync}. + * + * @param domainName The Google Chat domain name. (required) + * @param spaceDisplayName The Google Chat space display name. (required) + * @return CompletableFuture<GoogleChatAppNamedSpaceResponse> + */ + public CompletableFuture getSpaceByDisplayNameAsync( + String domainName, String spaceDisplayName) { + return getSpaceByDisplayNameWithHttpInfoAsync(domainName, spaceDisplayName) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the resource name and organization binding ID of a space in the Datadog Google Chat + * integration. + * + * @param domainName The Google Chat domain name. (required) + * @param spaceDisplayName The Google Chat space display name. (required) + * @return ApiResponse<GoogleChatAppNamedSpaceResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getSpaceByDisplayNameWithHttpInfo( + String domainName, String spaceDisplayName) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'domainName' is set + if (domainName == null) { + throw new ApiException( + 400, "Missing the required parameter 'domainName' when calling getSpaceByDisplayName"); + } + + // verify the required parameter 'spaceDisplayName' is set + if (spaceDisplayName == null) { + throw new ApiException( + 400, + "Missing the required parameter 'spaceDisplayName' when calling getSpaceByDisplayName"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/app/named-spaces/{domain_name}/{space_display_name}" + .replaceAll( + "\\{" + "domain_name" + "\\}", apiClient.escapeString(domainName.toString())) + .replaceAll( + "\\{" + "space_display_name" + "\\}", + apiClient.escapeString(spaceDisplayName.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.getSpaceByDisplayName", + 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 space information by display name. + * + *

See {@link #getSpaceByDisplayNameWithHttpInfo}. + * + * @param domainName The Google Chat domain name. (required) + * @param spaceDisplayName The Google Chat space display name. (required) + * @return CompletableFuture<ApiResponse<GoogleChatAppNamedSpaceResponse>> + */ + public CompletableFuture> + getSpaceByDisplayNameWithHttpInfoAsync(String domainName, String spaceDisplayName) { + Object localVarPostBody = null; + + // verify the required parameter 'domainName' is set + if (domainName == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'domainName' when calling getSpaceByDisplayName")); + return result; + } + + // verify the required parameter 'spaceDisplayName' is set + if (spaceDisplayName == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'spaceDisplayName' when calling" + + " getSpaceByDisplayName")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/app/named-spaces/{domain_name}/{space_display_name}" + .replaceAll( + "\\{" + "domain_name" + "\\}", apiClient.escapeString(domainName.toString())) + .replaceAll( + "\\{" + "space_display_name" + "\\}", + apiClient.escapeString(spaceDisplayName.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.getSpaceByDisplayName", + 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() {}); + } + + /** + * Get all Google Chat organization bindings. + * + *

See {@link #listGoogleChatOrganizationsWithHttpInfo}. + * + * @return GoogleChatOrganizationsResponse + * @throws ApiException if fails to make API call + */ + public GoogleChatOrganizationsResponse listGoogleChatOrganizations() throws ApiException { + return listGoogleChatOrganizationsWithHttpInfo().getData(); + } + + /** + * Get all Google Chat organization bindings. + * + *

See {@link #listGoogleChatOrganizationsWithHttpInfoAsync}. + * + * @return CompletableFuture<GoogleChatOrganizationsResponse> + */ + public CompletableFuture listGoogleChatOrganizationsAsync() { + return listGoogleChatOrganizationsWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a list of all Google Chat organization bindings in the Datadog Google Chat integration. + * + * @return ApiResponse<GoogleChatOrganizationsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse listGoogleChatOrganizationsWithHttpInfo() + throws ApiException { + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/integration/google-chat/organizations"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.listGoogleChatOrganizations", + 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 Google Chat organization bindings. + * + *

See {@link #listGoogleChatOrganizationsWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<GoogleChatOrganizationsResponse>> + */ + public CompletableFuture> + listGoogleChatOrganizationsWithHttpInfoAsync() { + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/integration/google-chat/organizations"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.listGoogleChatOrganizations", localVarPath, new ArrayList(), localVarHeaderParams, @@ -539,7 +1939,7 @@ public ApiResponse getOrganizationHandleWi new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -552,36 +1952,34 @@ public ApiResponse getOrganizationHandleWi localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get space information by display name. + * Get all target audiences. * - *

See {@link #getSpaceByDisplayNameWithHttpInfo}. + *

See {@link #listGoogleChatTargetAudiencesWithHttpInfo}. * - * @param domainName The Google Chat domain name. (required) - * @param spaceDisplayName The Google Chat space display name. (required) - * @return GoogleChatAppNamedSpaceResponse + * @param organizationBindingId Your organization binding ID. (required) + * @return GoogleChatTargetAudiencesResponse * @throws ApiException if fails to make API call */ - public GoogleChatAppNamedSpaceResponse getSpaceByDisplayName( - String domainName, String spaceDisplayName) throws ApiException { - return getSpaceByDisplayNameWithHttpInfo(domainName, spaceDisplayName).getData(); + public GoogleChatTargetAudiencesResponse listGoogleChatTargetAudiences( + String organizationBindingId) throws ApiException { + return listGoogleChatTargetAudiencesWithHttpInfo(organizationBindingId).getData(); } /** - * Get space information by display name. + * Get all target audiences. * - *

See {@link #getSpaceByDisplayNameWithHttpInfoAsync}. + *

See {@link #listGoogleChatTargetAudiencesWithHttpInfoAsync}. * - * @param domainName The Google Chat domain name. (required) - * @param spaceDisplayName The Google Chat space display name. (required) - * @return CompletableFuture<GoogleChatAppNamedSpaceResponse> + * @param organizationBindingId Your organization binding ID. (required) + * @return CompletableFuture<GoogleChatTargetAudiencesResponse> */ - public CompletableFuture getSpaceByDisplayNameAsync( - String domainName, String spaceDisplayName) { - return getSpaceByDisplayNameWithHttpInfoAsync(domainName, spaceDisplayName) + public CompletableFuture listGoogleChatTargetAudiencesAsync( + String organizationBindingId) { + return listGoogleChatTargetAudiencesWithHttpInfoAsync(organizationBindingId) .thenApply( response -> { return response.getData(); @@ -589,54 +1987,45 @@ public CompletableFuture getSpaceByDisplayNameA } /** - * Get the resource name and organization binding ID of a space in the Datadog Google Chat - * integration. + * Get a list of all target audiences for a Google Chat organization binding in the Datadog Google + * Chat integration. * - * @param domainName The Google Chat domain name. (required) - * @param spaceDisplayName The Google Chat space display name. (required) - * @return ApiResponse<GoogleChatAppNamedSpaceResponse> + * @param organizationBindingId Your organization binding ID. (required) + * @return ApiResponse<GoogleChatTargetAudiencesResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * - * * * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse getSpaceByDisplayNameWithHttpInfo( - String domainName, String spaceDisplayName) throws ApiException { + public ApiResponse listGoogleChatTargetAudiencesWithHttpInfo( + String organizationBindingId) throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'domainName' is set - if (domainName == null) { - throw new ApiException( - 400, "Missing the required parameter 'domainName' when calling getSpaceByDisplayName"); - } - - // verify the required parameter 'spaceDisplayName' is set - if (spaceDisplayName == null) { + // verify the required parameter 'organizationBindingId' is set + if (organizationBindingId == null) { throw new ApiException( 400, - "Missing the required parameter 'spaceDisplayName' when calling getSpaceByDisplayName"); + "Missing the required parameter 'organizationBindingId' when calling" + + " listGoogleChatTargetAudiences"); } // create path and map variables String localVarPath = - "/api/v2/integration/google-chat/organizations/app/named-spaces/{domain_name}/{space_display_name}" + "/api/v2/integration/google-chat/organizations/{organization_binding_id}/target-audiences" .replaceAll( - "\\{" + "domain_name" + "\\}", apiClient.escapeString(domainName.toString())) - .replaceAll( - "\\{" + "space_display_name" + "\\}", - apiClient.escapeString(spaceDisplayName.toString())); + "\\{" + "organization_binding_id" + "\\}", + apiClient.escapeString(organizationBindingId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.GoogleChatIntegrationApi.getSpaceByDisplayName", + "v2.GoogleChatIntegrationApi.listGoogleChatTargetAudiences", localVarPath, new ArrayList(), localVarHeaderParams, @@ -651,52 +2040,38 @@ public ApiResponse getSpaceByDisplayNameWithHtt localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Get space information by display name. + * Get all target audiences. * - *

See {@link #getSpaceByDisplayNameWithHttpInfo}. + *

See {@link #listGoogleChatTargetAudiencesWithHttpInfo}. * - * @param domainName The Google Chat domain name. (required) - * @param spaceDisplayName The Google Chat space display name. (required) - * @return CompletableFuture<ApiResponse<GoogleChatAppNamedSpaceResponse>> + * @param organizationBindingId Your organization binding ID. (required) + * @return CompletableFuture<ApiResponse<GoogleChatTargetAudiencesResponse>> */ - public CompletableFuture> - getSpaceByDisplayNameWithHttpInfoAsync(String domainName, String spaceDisplayName) { + public CompletableFuture> + listGoogleChatTargetAudiencesWithHttpInfoAsync(String organizationBindingId) { Object localVarPostBody = null; - // verify the required parameter 'domainName' is set - if (domainName == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'domainName' when calling getSpaceByDisplayName")); - return result; - } - - // verify the required parameter 'spaceDisplayName' is set - if (spaceDisplayName == null) { - CompletableFuture> result = + // verify the required parameter 'organizationBindingId' is set + if (organizationBindingId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'spaceDisplayName' when calling" - + " getSpaceByDisplayName")); + "Missing the required parameter 'organizationBindingId' when calling" + + " listGoogleChatTargetAudiences")); return result; } // create path and map variables String localVarPath = - "/api/v2/integration/google-chat/organizations/app/named-spaces/{domain_name}/{space_display_name}" + "/api/v2/integration/google-chat/organizations/{organization_binding_id}/target-audiences" .replaceAll( - "\\{" + "domain_name" + "\\}", apiClient.escapeString(domainName.toString())) - .replaceAll( - "\\{" + "space_display_name" + "\\}", - apiClient.escapeString(spaceDisplayName.toString())); + "\\{" + "organization_binding_id" + "\\}", + apiClient.escapeString(organizationBindingId.toString())); Map localVarHeaderParams = new HashMap(); @@ -704,7 +2079,7 @@ public ApiResponse getSpaceByDisplayNameWithHtt try { builder = apiClient.createBuilder( - "v2.GoogleChatIntegrationApi.getSpaceByDisplayName", + "v2.GoogleChatIntegrationApi.listGoogleChatTargetAudiences", localVarPath, new ArrayList(), localVarHeaderParams, @@ -712,7 +2087,7 @@ public ApiResponse getSpaceByDisplayNameWithHtt new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -725,7 +2100,7 @@ public ApiResponse getSpaceByDisplayNameWithHtt localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -876,6 +2251,219 @@ public ApiResponse listOrganizationHandle new GenericType() {}); } + /** + * Update a target audience. + * + *

See {@link #updateGoogleChatTargetAudienceWithHttpInfo}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param targetAudienceId Your target audience ID. (required) + * @param body Target audience payload. (required) + * @return GoogleChatTargetAudienceResponse + * @throws ApiException if fails to make API call + */ + public GoogleChatTargetAudienceResponse updateGoogleChatTargetAudience( + String organizationBindingId, + String targetAudienceId, + GoogleChatTargetAudienceUpdateRequest body) + throws ApiException { + return updateGoogleChatTargetAudienceWithHttpInfo(organizationBindingId, targetAudienceId, body) + .getData(); + } + + /** + * Update a target audience. + * + *

See {@link #updateGoogleChatTargetAudienceWithHttpInfoAsync}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param targetAudienceId Your target audience ID. (required) + * @param body Target audience payload. (required) + * @return CompletableFuture<GoogleChatTargetAudienceResponse> + */ + public CompletableFuture updateGoogleChatTargetAudienceAsync( + String organizationBindingId, + String targetAudienceId, + GoogleChatTargetAudienceUpdateRequest body) { + return updateGoogleChatTargetAudienceWithHttpInfoAsync( + organizationBindingId, targetAudienceId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update a target audience for a Google Chat organization binding in the Datadog Google Chat + * integration. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param targetAudienceId Your target audience ID. (required) + * @param body Target audience payload. (required) + * @return ApiResponse<GoogleChatTargetAudienceResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse updateGoogleChatTargetAudienceWithHttpInfo( + String organizationBindingId, + String targetAudienceId, + GoogleChatTargetAudienceUpdateRequest body) + throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'organizationBindingId' is set + if (organizationBindingId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'organizationBindingId' when calling" + + " updateGoogleChatTargetAudience"); + } + + // verify the required parameter 'targetAudienceId' is set + if (targetAudienceId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'targetAudienceId' when calling" + + " updateGoogleChatTargetAudience"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateGoogleChatTargetAudience"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/{organization_binding_id}/target-audiences/{target_audience_id}" + .replaceAll( + "\\{" + "organization_binding_id" + "\\}", + apiClient.escapeString(organizationBindingId.toString())) + .replaceAll( + "\\{" + "target_audience_id" + "\\}", + apiClient.escapeString(targetAudienceId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.updateGoogleChatTargetAudience", + 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 target audience. + * + *

See {@link #updateGoogleChatTargetAudienceWithHttpInfo}. + * + * @param organizationBindingId Your organization binding ID. (required) + * @param targetAudienceId Your target audience ID. (required) + * @param body Target audience payload. (required) + * @return CompletableFuture<ApiResponse<GoogleChatTargetAudienceResponse>> + */ + public CompletableFuture> + updateGoogleChatTargetAudienceWithHttpInfoAsync( + String organizationBindingId, + String targetAudienceId, + GoogleChatTargetAudienceUpdateRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'organizationBindingId' is set + if (organizationBindingId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'organizationBindingId' when calling" + + " updateGoogleChatTargetAudience")); + return result; + } + + // verify the required parameter 'targetAudienceId' is set + if (targetAudienceId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'targetAudienceId' when calling" + + " updateGoogleChatTargetAudience")); + 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 updateGoogleChatTargetAudience")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration/google-chat/organizations/{organization_binding_id}/target-audiences/{target_audience_id}" + .replaceAll( + "\\{" + "organization_binding_id" + "\\}", + apiClient.escapeString(organizationBindingId.toString())) + .replaceAll( + "\\{" + "target_audience_id" + "\\}", + apiClient.escapeString(targetAudienceId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.GoogleChatIntegrationApi.updateGoogleChatTargetAudience", + 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() {}); + } + /** * Update organization handle. * 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 deleted file mode 100644 index fd2f632ffb6..00000000000 --- a/src/main/java/com/datadog/api/client/v2/api/IncidentServicesApi.java +++ /dev/null @@ -1,1044 +0,0 @@ -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 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; - -@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()); - } - - public IncidentServicesApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Get the API client. - * - * @return API client - */ - public ApiClient getApiClient() { - return apiClient; - } - - /** - * Set the API client. - * - * @param apiClient an instance of API client - */ - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Create a new incident service. - * - *

See {@link #createIncidentServiceWithHttpInfo}. - * - * @param body Incident Service Payload. (required) - * @return IncidentServiceResponse - * @throws ApiException if fails to make API call - * @deprecated - */ - @Deprecated - 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> - * @deprecated - */ - @Deprecated - public CompletableFuture createIncidentServiceAsync( - IncidentServiceCreateRequest body) { - return createIncidentServiceWithHttpInfoAsync(body) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * 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 - * - * - * - * - * - * - * - * - * - *
Response details
Status Code Description Response Headers
201 CREATED -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
- * - * @deprecated - */ - @Deprecated - public ApiResponse createIncidentServiceWithHttpInfo( - IncidentServiceCreateRequest body) throws ApiException { - // 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 { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } - Object localVarPostBody = body; - - // verify the required parameter 'body' is set - if (body == null) { - 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[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Create a new incident service. - * - *

See {@link #createIncidentServiceWithHttpInfo}. - * - * @param body Incident Service Payload. (required) - * @return CompletableFuture<ApiResponse<IncidentServiceResponse>> - * @deprecated - */ - @Deprecated - 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))); - 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; - } - // 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[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * 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 - * @deprecated - */ - @Deprecated - 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 - * @deprecated - */ - @Deprecated - public CompletableFuture deleteIncidentServiceAsync(String serviceId) { - return deleteIncidentServiceWithHttpInfoAsync(serviceId) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * 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 - * - * - * - * - * - * - * - * - * - *
Response details
Status Code Description Response Headers
204 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
- * - * @deprecated - */ - @Deprecated - public ApiResponse deleteIncidentServiceWithHttpInfo(String serviceId) throws ApiException { - // 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 { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } - Object localVarPostBody = null; - - // verify the required parameter 'serviceId' is set - if (serviceId == null) { - 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())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.IncidentServicesApi.deleteIncidentService", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"*/*"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); - } - - /** - * Delete an existing incident service. - * - *

See {@link #deleteIncidentServiceWithHttpInfo}. - * - * @param serviceId The ID of the incident service. (required) - * @return CompletableFuture<ApiResponse<Void>> - * @deprecated - */ - @Deprecated - 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))); - 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; - } - // create path and map variables - 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[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - null); - } - - /** 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) - * @return GetIncidentServiceOptionalParameters - */ - public GetIncidentServiceOptionalParameters include(IncidentRelatedObject include) { - this.include = include; - return this; - } - } - - /** - * 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 - * @deprecated - */ - @Deprecated - 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> - * @deprecated - */ - @Deprecated - public CompletableFuture getIncidentServiceAsync(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 - * @deprecated - */ - @Deprecated - 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> - * @deprecated - */ - @Deprecated - public CompletableFuture getIncidentServiceAsync( - 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. - * - * @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
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
- * - * @deprecated - */ - @Deprecated - public ApiResponse getIncidentServiceWithHttpInfo( - String serviceId, GetIncidentServiceOptionalParameters parameters) throws ApiException { - // 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 { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } - Object localVarPostBody = null; - - // verify the required parameter 'serviceId' is set - if (serviceId == null) { - 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())); - - 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[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * 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 CompletableFuture<ApiResponse<IncidentServiceResponse>> - * @deprecated - */ - @Deprecated - 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))); - 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; - } - IncidentRelatedObject include = parameters.include; - // create path and map variables - 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; - try { - builder = - apiClient.createBuilder( - "v2.IncidentServicesApi.getIncidentService", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** Manage optional parameters to listIncidentServices. */ - public static class ListIncidentServicesOptionalParameters { - private IncidentRelatedObject include; - private Long pageSize; - private Long pageOffset; - private String filter; - - /** - * Set include. - * - * @param include Specifies which types of related objects should be included in the response. - * (optional) - * @return ListIncidentServicesOptionalParameters - */ - public ListIncidentServicesOptionalParameters include(IncidentRelatedObject include) { - this.include = include; - return this; - } - - /** - * Set pageSize. - * - * @param pageSize Size for a given page. The maximum allowed value is 100. (optional, default - * to 10) - * @return ListIncidentServicesOptionalParameters - */ - public ListIncidentServicesOptionalParameters pageSize(Long pageSize) { - this.pageSize = pageSize; - return this; - } - - /** - * Set pageOffset. - * - * @param pageOffset Specific offset to use as the beginning of the returned page. (optional, - * default to 0) - * @return ListIncidentServicesOptionalParameters - */ - public ListIncidentServicesOptionalParameters pageOffset(Long pageOffset) { - this.pageOffset = pageOffset; - return this; - } - - /** - * Set filter. - * - * @param filter A search query that filters services by name. (optional) - * @return ListIncidentServicesOptionalParameters - */ - public ListIncidentServicesOptionalParameters filter(String filter) { - this.filter = filter; - return this; - } - } - - /** - * Get a list of all incident services. - * - *

See {@link #listIncidentServicesWithHttpInfo}. - * - * @return IncidentServicesResponse - * @throws ApiException if fails to make API call - * @deprecated - */ - @Deprecated - public IncidentServicesResponse listIncidentServices() throws ApiException { - return listIncidentServicesWithHttpInfo(new ListIncidentServicesOptionalParameters()).getData(); - } - - /** - * Get a list of all incident services. - * - *

See {@link #listIncidentServicesWithHttpInfoAsync}. - * - * @return CompletableFuture<IncidentServicesResponse> - * @deprecated - */ - @Deprecated - public CompletableFuture listIncidentServicesAsync() { - 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 - * @deprecated - */ - @Deprecated - 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> - * @deprecated - */ - @Deprecated - public CompletableFuture listIncidentServicesAsync( - 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. - * - * @param parameters Optional parameters for the request. - * @return ApiResponse<IncidentServicesResponse> - * @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 -
- * - * @deprecated - */ - @Deprecated - public ApiResponse listIncidentServicesWithHttpInfo( - ListIncidentServicesOptionalParameters parameters) throws ApiException { - // 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 { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } - Object localVarPostBody = null; - IncidentRelatedObject include = parameters.include; - Long pageSize = parameters.pageSize; - Long pageOffset = parameters.pageOffset; - String filter = parameters.filter; - // create path and map variables - String localVarPath = "/api/v2/services"; - - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - 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[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Get a list of all incident services. - * - *

See {@link #listIncidentServicesWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<IncidentServicesResponse>> - * @deprecated - */ - @Deprecated - 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))); - return result; - } - Object localVarPostBody = null; - IncidentRelatedObject include = parameters.include; - Long pageSize = parameters.pageSize; - Long pageOffset = parameters.pageOffset; - String filter = parameters.filter; - // create path and map variables - String localVarPath = "/api/v2/services"; - - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.IncidentServicesApi.listIncidentServices", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * 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 - * @deprecated - */ - @Deprecated - 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> - * @deprecated - */ - @Deprecated - public CompletableFuture updateIncidentServiceAsync( - 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. - * - * @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 - * - * - * - * - * - * - * - * - * - *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
- * - * @deprecated - */ - @Deprecated - public ApiResponse updateIncidentServiceWithHttpInfo( - String serviceId, IncidentServiceUpdateRequest body) throws ApiException { - // 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 { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } - Object localVarPostBody = body; - - // verify the required parameter 'serviceId' is set - if (serviceId == null) { - 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"); - } - // create path and map variables - 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[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - return apiClient.invokeAPI( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - 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 CompletableFuture<ApiResponse<IncidentServiceResponse>> - * @deprecated - */ - @Deprecated - 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))); - 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; - } - - // 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; - } - // create path and map variables - 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[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "PATCH", - builder, - localVarHeaderParams, - new String[] {"application/json"}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/api/KeyManagementApi.java b/src/main/java/com/datadog/api/client/v2/api/KeyManagementApi.java index f4145ef3720..5a7c8403244 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 @@ -1896,6 +1896,7 @@ public static class ListApplicationKeysOptionalParameters { private String filter; private String filterCreatedAtStart; private String filterCreatedAtEnd; + private String filterOwnedBy; private String include; /** @@ -1969,6 +1970,17 @@ public ListApplicationKeysOptionalParameters filterCreatedAtEnd(String filterCre return this; } + /** + * Set filterOwnedBy. + * + * @param filterOwnedBy Filter application keys by owner ID. (optional) + * @return ListApplicationKeysOptionalParameters + */ + public ListApplicationKeysOptionalParameters filterOwnedBy(String filterOwnedBy) { + this.filterOwnedBy = filterOwnedBy; + return this; + } + /** * Set include. * @@ -2066,6 +2078,7 @@ public ApiResponse listApplicationKeysWithHttpInfo( String filter = parameters.filter; String filterCreatedAtStart = parameters.filterCreatedAtStart; String filterCreatedAtEnd = parameters.filterCreatedAtEnd; + String filterOwnedBy = parameters.filterOwnedBy; String include = parameters.include; // create path and map variables String localVarPath = "/api/v2/application_keys"; @@ -2081,6 +2094,7 @@ public ApiResponse listApplicationKeysWithHttpInfo( apiClient.parameterToPairs("", "filter[created_at][start]", filterCreatedAtStart)); localVarQueryParams.addAll( apiClient.parameterToPairs("", "filter[created_at][end]", filterCreatedAtEnd)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[owned_by]", filterOwnedBy)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); Invocation.Builder builder = @@ -2120,6 +2134,7 @@ public ApiResponse listApplicationKeysWithHttpInfo( String filter = parameters.filter; String filterCreatedAtStart = parameters.filterCreatedAtStart; String filterCreatedAtEnd = parameters.filterCreatedAtEnd; + String filterOwnedBy = parameters.filterOwnedBy; String include = parameters.include; // create path and map variables String localVarPath = "/api/v2/application_keys"; @@ -2135,6 +2150,7 @@ public ApiResponse listApplicationKeysWithHttpInfo( apiClient.parameterToPairs("", "filter[created_at][start]", filterCreatedAtStart)); localVarQueryParams.addAll( apiClient.parameterToPairs("", "filter[created_at][end]", filterCreatedAtEnd)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[owned_by]", filterOwnedBy)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); Invocation.Builder builder; diff --git a/src/main/java/com/datadog/api/client/v2/api/LlmObservabilityApi.java b/src/main/java/com/datadog/api/client/v2/api/LlmObservabilityApi.java index 942eef32060..e93ab1fb788 100644 --- a/src/main/java/com/datadog/api/client/v2/api/LlmObservabilityApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/LlmObservabilityApi.java @@ -14,6 +14,8 @@ import com.datadog.api.client.v2.model.LLMObsAnnotationQueueResponse; import com.datadog.api.client.v2.model.LLMObsAnnotationQueueUpdateRequest; import com.datadog.api.client.v2.model.LLMObsAnnotationQueuesResponse; +import com.datadog.api.client.v2.model.LLMObsAnnotationsRequest; +import com.datadog.api.client.v2.model.LLMObsAnnotationsResponse; import com.datadog.api.client.v2.model.LLMObsCustomEvalConfigResponse; import com.datadog.api.client.v2.model.LLMObsCustomEvalConfigUpdateRequest; import com.datadog.api.client.v2.model.LLMObsDataDeletionRequest; @@ -33,6 +35,8 @@ import com.datadog.api.client.v2.model.LLMObsDatasetVersionsResponse; import com.datadog.api.client.v2.model.LLMObsDatasetsResponse; import com.datadog.api.client.v2.model.LLMObsDeleteAnnotationQueueInteractionsRequest; +import com.datadog.api.client.v2.model.LLMObsDeleteAnnotationsRequest; +import com.datadog.api.client.v2.model.LLMObsDeleteAnnotationsResponse; import com.datadog.api.client.v2.model.LLMObsDeleteDatasetRecordsRequest; import com.datadog.api.client.v2.model.LLMObsDeleteDatasetsRequest; import com.datadog.api.client.v2.model.LLMObsDeleteExperimentsRequest; @@ -41,6 +45,7 @@ import com.datadog.api.client.v2.model.LLMObsExperimentEventsV2Response; import com.datadog.api.client.v2.model.LLMObsExperimentRequest; import com.datadog.api.client.v2.model.LLMObsExperimentResponse; +import com.datadog.api.client.v2.model.LLMObsExperimentSpansResponse; import com.datadog.api.client.v2.model.LLMObsExperimentUpdateRequest; import com.datadog.api.client.v2.model.LLMObsExperimentationAnalyticsRequest; import com.datadog.api.client.v2.model.LLMObsExperimentationAnalyticsResponse; @@ -54,6 +59,16 @@ import com.datadog.api.client.v2.model.LLMObsIntegrationInferenceResponse; import com.datadog.api.client.v2.model.LLMObsIntegrationModel; import com.datadog.api.client.v2.model.LLMObsIntegrationName; +import com.datadog.api.client.v2.model.LLMObsPatternsClusteredPointsResponse; +import com.datadog.api.client.v2.model.LLMObsPatternsConfigResponse; +import com.datadog.api.client.v2.model.LLMObsPatternsConfigUpsertRequest; +import com.datadog.api.client.v2.model.LLMObsPatternsConfigsResponse; +import com.datadog.api.client.v2.model.LLMObsPatternsRunStatusResponse; +import com.datadog.api.client.v2.model.LLMObsPatternsRunsResponse; +import com.datadog.api.client.v2.model.LLMObsPatternsTopicsResponse; +import com.datadog.api.client.v2.model.LLMObsPatternsTopicsWithClusteredPointsResponse; +import com.datadog.api.client.v2.model.LLMObsPatternsTriggerRequest; +import com.datadog.api.client.v2.model.LLMObsPatternsTriggerResponse; import com.datadog.api.client.v2.model.LLMObsProjectRequest; import com.datadog.api.client.v2.model.LLMObsProjectResponse; import com.datadog.api.client.v2.model.LLMObsProjectUpdateRequest; @@ -2458,6 +2473,187 @@ public ApiResponse deleteLLMObsAnnotationQueueInteractionsWithHttpInfo( null); } + /** + * Delete annotations. + * + *

See {@link #deleteLLMObsAnnotationsWithHttpInfo}. + * + * @param queueId The ID of the LLM Observability annotation queue. (required) + * @param body Delete annotations payload. (required) + * @return LLMObsDeleteAnnotationsResponse + * @throws ApiException if fails to make API call + */ + public LLMObsDeleteAnnotationsResponse deleteLLMObsAnnotations( + String queueId, LLMObsDeleteAnnotationsRequest body) throws ApiException { + return deleteLLMObsAnnotationsWithHttpInfo(queueId, body).getData(); + } + + /** + * Delete annotations. + * + *

See {@link #deleteLLMObsAnnotationsWithHttpInfoAsync}. + * + * @param queueId The ID of the LLM Observability annotation queue. (required) + * @param body Delete annotations payload. (required) + * @return CompletableFuture<LLMObsDeleteAnnotationsResponse> + */ + public CompletableFuture deleteLLMObsAnnotationsAsync( + String queueId, LLMObsDeleteAnnotationsRequest body) { + return deleteLLMObsAnnotationsWithHttpInfoAsync(queueId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete one or more annotations from an annotation queue. + * + * @param queueId The ID of the LLM Observability annotation queue. (required) + * @param body Delete annotations payload. (required) + * @return ApiResponse<LLMObsDeleteAnnotationsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK — annotations deleted. Errors for annotations that could not be deleted are listed in `errors`. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found — the queue does not exist. -
429 Too many requests -
+ */ + public ApiResponse deleteLLMObsAnnotationsWithHttpInfo( + String queueId, LLMObsDeleteAnnotationsRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteLLMObsAnnotations"; + 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 'queueId' is set + if (queueId == null) { + throw new ApiException( + 400, "Missing the required parameter 'queueId' when calling deleteLLMObsAnnotations"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling deleteLLMObsAnnotations"); + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotations/delete" + .replaceAll("\\{" + "queue_id" + "\\}", apiClient.escapeString(queueId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.deleteLLMObsAnnotations", + 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() {}); + } + + /** + * Delete annotations. + * + *

See {@link #deleteLLMObsAnnotationsWithHttpInfo}. + * + * @param queueId The ID of the LLM Observability annotation queue. (required) + * @param body Delete annotations payload. (required) + * @return CompletableFuture<ApiResponse<LLMObsDeleteAnnotationsResponse>> + */ + public CompletableFuture> + deleteLLMObsAnnotationsWithHttpInfoAsync( + String queueId, LLMObsDeleteAnnotationsRequest body) { + // Check if unstable operation is enabled + String operationId = "deleteLLMObsAnnotations"; + 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 'queueId' is set + if (queueId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'queueId' when calling deleteLLMObsAnnotations")); + 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 deleteLLMObsAnnotations")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotations/delete" + .replaceAll("\\{" + "queue_id" + "\\}", apiClient.escapeString(queueId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.deleteLLMObsAnnotations", + 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() {}); + } + /** * Delete a custom evaluator configuration. * @@ -3293,27 +3489,27 @@ public CompletableFuture> deleteLLMObsExperimentsWithHttpInfoA } /** - * Delete LLM Observability projects. + * Delete a patterns configuration. * - *

See {@link #deleteLLMObsProjectsWithHttpInfo}. + *

See {@link #deleteLLMObsPatternsConfigWithHttpInfo}. * - * @param body Delete projects payload. (required) + * @param configId The ID of the patterns configuration. (required) * @throws ApiException if fails to make API call */ - public void deleteLLMObsProjects(LLMObsDeleteProjectsRequest body) throws ApiException { - deleteLLMObsProjectsWithHttpInfo(body); + public void deleteLLMObsPatternsConfig(String configId) throws ApiException { + deleteLLMObsPatternsConfigWithHttpInfo(configId); } /** - * Delete LLM Observability projects. + * Delete a patterns configuration. * - *

See {@link #deleteLLMObsProjectsWithHttpInfoAsync}. + *

See {@link #deleteLLMObsPatternsConfigWithHttpInfoAsync}. * - * @param body Delete projects payload. (required) + * @param configId The ID of the patterns configuration. (required) * @return CompletableFuture */ - public CompletableFuture deleteLLMObsProjectsAsync(LLMObsDeleteProjectsRequest body) { - return deleteLLMObsProjectsWithHttpInfoAsync(body) + public CompletableFuture deleteLLMObsPatternsConfigAsync(String configId) { + return deleteLLMObsPatternsConfigWithHttpInfoAsync(configId) .thenApply( response -> { return response.getData(); @@ -3321,9 +3517,9 @@ public CompletableFuture deleteLLMObsProjectsAsync(LLMObsDeleteProjectsReq } /** - * Delete one or more LLM Observability projects. + * Delete a patterns configuration by its ID. * - * @param body Delete projects payload. (required) + * @param configId The ID of the patterns configuration. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details @@ -3334,33 +3530,37 @@ public CompletableFuture deleteLLMObsProjectsAsync(LLMObsDeleteProjectsReq * 400 Bad Request - * 401 Unauthorized - * 403 Forbidden - + * 404 Not Found - * 429 Too many requests - + * 500 Internal Server Error - * */ - public ApiResponse deleteLLMObsProjectsWithHttpInfo(LLMObsDeleteProjectsRequest body) + public ApiResponse deleteLLMObsPatternsConfigWithHttpInfo(String configId) throws ApiException { // Check if unstable operation is enabled - String operationId = "deleteLLMObsProjects"; + String operationId = "deleteLLMObsPatternsConfig"; 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; + Object localVarPostBody = null; - // verify the required parameter 'body' is set - if (body == null) { + // verify the required parameter 'configId' is set + if (configId == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling deleteLLMObsProjects"); + 400, "Missing the required parameter 'configId' when calling deleteLLMObsPatternsConfig"); } // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/projects/delete"; + String localVarPath = + "/api/v2/llm-obs/v1/topic-discovery-configs/{config_id}" + .replaceAll("\\{" + "config_id" + "\\}", apiClient.escapeString(configId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.deleteLLMObsProjects", + "v2.LlmObservabilityApi.deleteLLMObsPatternsConfig", localVarPath, new ArrayList(), localVarHeaderParams, @@ -3368,10 +3568,10 @@ public ApiResponse deleteLLMObsProjectsWithHttpInfo(LLMObsDeleteProjectsRe new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth"}); return apiClient.invokeAPI( - "POST", + "DELETE", builder, localVarHeaderParams, - new String[] {"application/json"}, + new String[] {}, localVarPostBody, new HashMap(), false, @@ -3379,17 +3579,17 @@ public ApiResponse deleteLLMObsProjectsWithHttpInfo(LLMObsDeleteProjectsRe } /** - * Delete LLM Observability projects. + * Delete a patterns configuration. * - *

See {@link #deleteLLMObsProjectsWithHttpInfo}. + *

See {@link #deleteLLMObsPatternsConfigWithHttpInfo}. * - * @param body Delete projects payload. (required) + * @param configId The ID of the patterns configuration. (required) * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> deleteLLMObsProjectsWithHttpInfoAsync( - LLMObsDeleteProjectsRequest body) { + public CompletableFuture> deleteLLMObsPatternsConfigWithHttpInfoAsync( + String configId) { // Check if unstable operation is enabled - String operationId = "deleteLLMObsProjects"; + String operationId = "deleteLLMObsPatternsConfig"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -3398,18 +3598,21 @@ public CompletableFuture> deleteLLMObsProjectsWithHttpInfoAsyn new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } - Object localVarPostBody = body; + Object localVarPostBody = null; - // verify the required parameter 'body' is set - if (body == null) { + // verify the required parameter 'configId' is set + if (configId == null) { CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling deleteLLMObsProjects")); + 400, + "Missing the required parameter 'configId' when calling deleteLLMObsPatternsConfig")); return result; } // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/projects/delete"; + String localVarPath = + "/api/v2/llm-obs/v1/topic-discovery-configs/{config_id}" + .replaceAll("\\{" + "config_id" + "\\}", apiClient.escapeString(configId.toString())); Map localVarHeaderParams = new HashMap(); @@ -3417,7 +3620,7 @@ public CompletableFuture> deleteLLMObsProjectsWithHttpInfoAsyn try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.deleteLLMObsProjects", + "v2.LlmObservabilityApi.deleteLLMObsPatternsConfig", localVarPath, new ArrayList(), localVarHeaderParams, @@ -3430,74 +3633,38 @@ public CompletableFuture> deleteLLMObsProjectsWithHttpInfoAsyn return result; } return apiClient.invokeAPIAsync( - "POST", + "DELETE", builder, localVarHeaderParams, - new String[] {"application/json"}, + new String[] {}, localVarPostBody, new HashMap(), false, null); } - /** Manage optional parameters to exportLLMObsDataset. */ - public static class ExportLLMObsDatasetOptionalParameters { - private LLMObsDatasetExportFormat format; - private Long version; - - /** - * Set format. - * - * @param format Export format for the dataset contents. Only csv is currently - * supported. (optional, default to "csv") - * @return ExportLLMObsDatasetOptionalParameters - */ - public ExportLLMObsDatasetOptionalParameters format(LLMObsDatasetExportFormat format) { - this.format = format; - return this; - } - - /** - * Set version. - * - * @param version Version of the dataset to export. If omitted, the current version is used. - * Must be between 0 and the current version of the dataset, inclusive. (optional) - * @return ExportLLMObsDatasetOptionalParameters - */ - public ExportLLMObsDatasetOptionalParameters version(Long version) { - this.version = version; - return this; - } - } - /** - * Export an LLM Observability dataset. + * Delete LLM Observability projects. * - *

See {@link #exportLLMObsDatasetWithHttpInfo}. + *

See {@link #deleteLLMObsProjectsWithHttpInfo}. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @return String + * @param body Delete projects payload. (required) * @throws ApiException if fails to make API call */ - public String exportLLMObsDataset(String projectId, String datasetId) throws ApiException { - return exportLLMObsDatasetWithHttpInfo( - projectId, datasetId, new ExportLLMObsDatasetOptionalParameters()) - .getData(); + public void deleteLLMObsProjects(LLMObsDeleteProjectsRequest body) throws ApiException { + deleteLLMObsProjectsWithHttpInfo(body); } /** - * Export an LLM Observability dataset. + * Delete LLM Observability projects. * - *

See {@link #exportLLMObsDatasetWithHttpInfoAsync}. + *

See {@link #deleteLLMObsProjectsWithHttpInfoAsync}. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @return CompletableFuture<String> + * @param body Delete projects payload. (required) + * @return CompletableFuture */ - public CompletableFuture exportLLMObsDatasetAsync(String projectId, String datasetId) { - return exportLLMObsDatasetWithHttpInfoAsync( - projectId, datasetId, new ExportLLMObsDatasetOptionalParameters()) + public CompletableFuture deleteLLMObsProjectsAsync(LLMObsDeleteProjectsRequest body) { + return deleteLLMObsProjectsWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -3505,19 +3672,203 @@ projectId, datasetId, new ExportLLMObsDatasetOptionalParameters()) } /** - * Export an LLM Observability dataset. - * - *

See {@link #exportLLMObsDatasetWithHttpInfo}. + * Delete one or more LLM Observability projects. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @param parameters Optional parameters for the request. - * @return String + * @param body Delete projects payload. (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call - */ - public String exportLLMObsDataset( - String projectId, String datasetId, ExportLLMObsDatasetOptionalParameters parameters) - throws ApiException { + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse deleteLLMObsProjectsWithHttpInfo(LLMObsDeleteProjectsRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteLLMObsProjects"; + 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 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling deleteLLMObsProjects"); + } + // create path and map variables + String localVarPath = "/api/v2/llm-obs/v1/projects/delete"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.deleteLLMObsProjects", + 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); + } + + /** + * Delete LLM Observability projects. + * + *

See {@link #deleteLLMObsProjectsWithHttpInfo}. + * + * @param body Delete projects payload. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteLLMObsProjectsWithHttpInfoAsync( + LLMObsDeleteProjectsRequest body) { + // Check if unstable operation is enabled + String operationId = "deleteLLMObsProjects"; + 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 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling deleteLLMObsProjects")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/llm-obs/v1/projects/delete"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.deleteLLMObsProjects", + 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); + } + + /** Manage optional parameters to exportLLMObsDataset. */ + public static class ExportLLMObsDatasetOptionalParameters { + private LLMObsDatasetExportFormat format; + private Long version; + + /** + * Set format. + * + * @param format Export format for the dataset contents. Only csv is currently + * supported. (optional, default to "csv") + * @return ExportLLMObsDatasetOptionalParameters + */ + public ExportLLMObsDatasetOptionalParameters format(LLMObsDatasetExportFormat format) { + this.format = format; + return this; + } + + /** + * Set version. + * + * @param version Version of the dataset to export. If omitted, the current version is used. + * Must be between 0 and the current version of the dataset, inclusive. (optional) + * @return ExportLLMObsDatasetOptionalParameters + */ + public ExportLLMObsDatasetOptionalParameters version(Long version) { + this.version = version; + return this; + } + } + + /** + * Export an LLM Observability dataset. + * + *

See {@link #exportLLMObsDatasetWithHttpInfo}. + * + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @return String + * @throws ApiException if fails to make API call + */ + public String exportLLMObsDataset(String projectId, String datasetId) throws ApiException { + return exportLLMObsDatasetWithHttpInfo( + projectId, datasetId, new ExportLLMObsDatasetOptionalParameters()) + .getData(); + } + + /** + * Export an LLM Observability dataset. + * + *

See {@link #exportLLMObsDatasetWithHttpInfoAsync}. + * + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @return CompletableFuture<String> + */ + public CompletableFuture exportLLMObsDatasetAsync(String projectId, String datasetId) { + return exportLLMObsDatasetWithHttpInfoAsync( + projectId, datasetId, new ExportLLMObsDatasetOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Export an LLM Observability dataset. + * + *

See {@link #exportLLMObsDatasetWithHttpInfo}. + * + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @param parameters Optional parameters for the request. + * @return String + * @throws ApiException if fails to make API call + */ + public String exportLLMObsDataset( + String projectId, String datasetId, ExportLLMObsDatasetOptionalParameters parameters) + throws ApiException { return exportLLMObsDatasetWithHttpInfo(projectId, datasetId, parameters).getData(); } @@ -4632,60 +4983,27 @@ public ApiResponse getLLMObsDatasetDraftStateWi new GenericType() {}); } - /** Manage optional parameters to listLLMObsAnnotationQueues. */ - public static class ListLLMObsAnnotationQueuesOptionalParameters { - private String projectId; - private List queueIds; - - /** - * Set projectId. - * - * @param projectId Filter annotation queues by project ID. Cannot be used together with - * queueIds. (optional) - * @return ListLLMObsAnnotationQueuesOptionalParameters - */ - public ListLLMObsAnnotationQueuesOptionalParameters projectId(String projectId) { - this.projectId = projectId; - return this; - } - - /** - * Set queueIds. - * - * @param queueIds Filter annotation queues by queue IDs (comma-separated). Cannot be used - * together with projectId. (optional) - * @return ListLLMObsAnnotationQueuesOptionalParameters - */ - public ListLLMObsAnnotationQueuesOptionalParameters queueIds(List queueIds) { - this.queueIds = queueIds; - return this; - } - } - /** - * List LLM Observability annotation queues. + * Get a patterns configuration. * - *

See {@link #listLLMObsAnnotationQueuesWithHttpInfo}. + *

See {@link #getLLMObsPatternsConfigWithHttpInfo}. * - * @return LLMObsAnnotationQueuesResponse + * @return LLMObsPatternsConfigResponse * @throws ApiException if fails to make API call */ - public LLMObsAnnotationQueuesResponse listLLMObsAnnotationQueues() throws ApiException { - return listLLMObsAnnotationQueuesWithHttpInfo( - new ListLLMObsAnnotationQueuesOptionalParameters()) - .getData(); + public LLMObsPatternsConfigResponse getLLMObsPatternsConfig() throws ApiException { + return getLLMObsPatternsConfigWithHttpInfo().getData(); } /** - * List LLM Observability annotation queues. + * Get a patterns configuration. * - *

See {@link #listLLMObsAnnotationQueuesWithHttpInfoAsync}. + *

See {@link #getLLMObsPatternsConfigWithHttpInfoAsync}. * - * @return CompletableFuture<LLMObsAnnotationQueuesResponse> + * @return CompletableFuture<LLMObsPatternsConfigResponse> */ - public CompletableFuture listLLMObsAnnotationQueuesAsync() { - return listLLMObsAnnotationQueuesWithHttpInfoAsync( - new ListLLMObsAnnotationQueuesOptionalParameters()) + public CompletableFuture getLLMObsPatternsConfigAsync() { + return getLLMObsPatternsConfigWithHttpInfoAsync() .thenApply( response -> { return response.getData(); @@ -4693,80 +5011,43 @@ public CompletableFuture listLLMObsAnnotationQue } /** - * List LLM Observability annotation queues. + * Retrieve the patterns configuration for the organization. * - *

See {@link #listLLMObsAnnotationQueuesWithHttpInfo}. - * - * @param parameters Optional parameters for the request. - * @return LLMObsAnnotationQueuesResponse + * @return ApiResponse<LLMObsPatternsConfigResponse> * @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 -
500 Internal Server Error -
*/ - public LLMObsAnnotationQueuesResponse listLLMObsAnnotationQueues( - ListLLMObsAnnotationQueuesOptionalParameters parameters) throws ApiException { - return listLLMObsAnnotationQueuesWithHttpInfo(parameters).getData(); - } - - /** - * List LLM Observability annotation queues. - * - *

See {@link #listLLMObsAnnotationQueuesWithHttpInfoAsync}. - * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<LLMObsAnnotationQueuesResponse> - */ - public CompletableFuture listLLMObsAnnotationQueuesAsync( - ListLLMObsAnnotationQueuesOptionalParameters parameters) { - return listLLMObsAnnotationQueuesWithHttpInfoAsync(parameters) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * List annotation queues. Optionally filter by project ID or queue IDs. These parameters are - * mutually exclusive. If neither is provided, all queues in the organization are returned. - * - * @param parameters Optional parameters for the request. - * @return ApiResponse<LLMObsAnnotationQueuesResponse> - * @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 -
429 Too many requests -
- */ - public ApiResponse listLLMObsAnnotationQueuesWithHttpInfo( - ListLLMObsAnnotationQueuesOptionalParameters parameters) throws ApiException { + public ApiResponse getLLMObsPatternsConfigWithHttpInfo() + throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsAnnotationQueues"; + String operationId = "getLLMObsPatternsConfig"; 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; - String projectId = parameters.projectId; - List queueIds = parameters.queueIds; // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/annotation-queues"; + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-configs/latest"; - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "projectId", projectId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "queueIds", queueIds)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsAnnotationQueues", + "v2.LlmObservabilityApi.getLLMObsPatternsConfig", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -4779,56 +5060,48 @@ public ApiResponse listLLMObsAnnotationQueuesWit localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List LLM Observability annotation queues. + * Get a patterns configuration. * - *

See {@link #listLLMObsAnnotationQueuesWithHttpInfo}. + *

See {@link #getLLMObsPatternsConfigWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<LLMObsAnnotationQueuesResponse>> + * @return CompletableFuture<ApiResponse<LLMObsPatternsConfigResponse>> */ - public CompletableFuture> - listLLMObsAnnotationQueuesWithHttpInfoAsync( - ListLLMObsAnnotationQueuesOptionalParameters parameters) { + public CompletableFuture> + getLLMObsPatternsConfigWithHttpInfoAsync() { // Check if unstable operation is enabled - String operationId = "listLLMObsAnnotationQueues"; + String operationId = "getLLMObsPatternsConfig"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - String projectId = parameters.projectId; - List queueIds = parameters.queueIds; // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/annotation-queues"; + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-configs/latest"; - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "projectId", projectId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "queueIds", queueIds)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsAnnotationQueues", + "v2.LlmObservabilityApi.getLLMObsPatternsConfig", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -4841,116 +5114,34 @@ public ApiResponse listLLMObsAnnotationQueuesWit localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to listLLMObsDatasetRecords. */ - public static class ListLLMObsDatasetRecordsOptionalParameters { - private Long filterVersion; - private String pageCursor; - private Long pageLimit; - - /** - * Set filterVersion. - * - * @param filterVersion Retrieve records from a specific dataset version. Defaults to the - * current version. (optional) - * @return ListLLMObsDatasetRecordsOptionalParameters - */ - public ListLLMObsDatasetRecordsOptionalParameters filterVersion(Long filterVersion) { - this.filterVersion = filterVersion; - return this; - } - - /** - * Set pageCursor. - * - * @param pageCursor Use the Pagination cursor to retrieve the next page of results. (optional) - * @return ListLLMObsDatasetRecordsOptionalParameters - */ - public ListLLMObsDatasetRecordsOptionalParameters pageCursor(String pageCursor) { - this.pageCursor = pageCursor; - return this; - } - - /** - * Set pageLimit. - * - * @param pageLimit Maximum number of results to return per page. (optional) - * @return ListLLMObsDatasetRecordsOptionalParameters - */ - public ListLLMObsDatasetRecordsOptionalParameters pageLimit(Long pageLimit) { - this.pageLimit = pageLimit; - return this; - } - } - - /** - * List LLM Observability dataset records. - * - *

See {@link #listLLMObsDatasetRecordsWithHttpInfo}. - * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @return LLMObsDatasetRecordsListResponse - * @throws ApiException if fails to make API call - */ - public LLMObsDatasetRecordsListResponse listLLMObsDatasetRecords( - String projectId, String datasetId) throws ApiException { - return listLLMObsDatasetRecordsWithHttpInfo( - projectId, datasetId, new ListLLMObsDatasetRecordsOptionalParameters()) - .getData(); - } - - /** - * List LLM Observability dataset records. - * - *

See {@link #listLLMObsDatasetRecordsWithHttpInfoAsync}. - * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @return CompletableFuture<LLMObsDatasetRecordsListResponse> - */ - public CompletableFuture listLLMObsDatasetRecordsAsync( - String projectId, String datasetId) { - return listLLMObsDatasetRecordsWithHttpInfoAsync( - projectId, datasetId, new ListLLMObsDatasetRecordsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + new GenericType() {}); } /** - * List LLM Observability dataset records. + * Get patterns run status. * - *

See {@link #listLLMObsDatasetRecordsWithHttpInfo}. + *

See {@link #getLLMObsPatternsRunStatusWithHttpInfo}. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @param parameters Optional parameters for the request. - * @return LLMObsDatasetRecordsListResponse + * @param configId The ID of the patterns configuration. (required) + * @return LLMObsPatternsRunStatusResponse * @throws ApiException if fails to make API call */ - public LLMObsDatasetRecordsListResponse listLLMObsDatasetRecords( - String projectId, String datasetId, ListLLMObsDatasetRecordsOptionalParameters parameters) + public LLMObsPatternsRunStatusResponse getLLMObsPatternsRunStatus(String configId) throws ApiException { - return listLLMObsDatasetRecordsWithHttpInfo(projectId, datasetId, parameters).getData(); + return getLLMObsPatternsRunStatusWithHttpInfo(configId).getData(); } /** - * List LLM Observability dataset records. + * Get patterns run status. * - *

See {@link #listLLMObsDatasetRecordsWithHttpInfoAsync}. + *

See {@link #getLLMObsPatternsRunStatusWithHttpInfoAsync}. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<LLMObsDatasetRecordsListResponse> + * @param configId The ID of the patterns configuration. (required) + * @return CompletableFuture<LLMObsPatternsRunStatusResponse> */ - public CompletableFuture listLLMObsDatasetRecordsAsync( - String projectId, String datasetId, ListLLMObsDatasetRecordsOptionalParameters parameters) { - return listLLMObsDatasetRecordsWithHttpInfoAsync(projectId, datasetId, parameters) + public CompletableFuture getLLMObsPatternsRunStatusAsync( + String configId) { + return getLLMObsPatternsRunStatusWithHttpInfoAsync(configId) .thenApply( response -> { return response.getData(); @@ -4958,12 +5149,11 @@ public CompletableFuture listLLMObsDatasetReco } /** - * List all records in an LLM Observability dataset, sorted by creation date, newest first. + * Retrieve the status and step-by-step progress of the current or most recent patterns run for a + * configuration. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<LLMObsDatasetRecordsListResponse> + * @param configId The ID of the patterns configuration. (required) + * @return ApiResponse<LLMObsPatternsRunStatusResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -4975,13 +5165,13 @@ public CompletableFuture listLLMObsDatasetReco * * * + * *
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse listLLMObsDatasetRecordsWithHttpInfo( - String projectId, String datasetId, ListLLMObsDatasetRecordsOptionalParameters parameters) - throws ApiException { + public ApiResponse getLLMObsPatternsRunStatusWithHttpInfo( + String configId) throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsDatasetRecords"; + String operationId = "getLLMObsPatternsRunStatus"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -4989,36 +5179,22 @@ public ApiResponse listLLMObsDatasetRecordsWit } Object localVarPostBody = null; - // verify the required parameter 'projectId' is set - if (projectId == null) { - throw new ApiException( - 400, "Missing the required parameter 'projectId' when calling listLLMObsDatasetRecords"); - } - - // verify the required parameter 'datasetId' is set - if (datasetId == null) { + // verify the required parameter 'configId' is set + if (configId == null) { throw new ApiException( - 400, "Missing the required parameter 'datasetId' when calling listLLMObsDatasetRecords"); + 400, "Missing the required parameter 'configId' when calling getLLMObsPatternsRunStatus"); } - Long filterVersion = parameters.filterVersion; - String pageCursor = parameters.pageCursor; - Long pageLimit = parameters.pageLimit; // create path and map variables - String localVarPath = - "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/records" - .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) - .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-runs/status"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[version]", filterVersion)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "config_id", configId)); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsDatasetRecords", + "v2.LlmObservabilityApi.getLLMObsPatternsRunStatus", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -5033,30 +5209,25 @@ public ApiResponse listLLMObsDatasetRecordsWit localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List LLM Observability dataset records. + * Get patterns run status. * - *

See {@link #listLLMObsDatasetRecordsWithHttpInfo}. + *

See {@link #getLLMObsPatternsRunStatusWithHttpInfo}. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<LLMObsDatasetRecordsListResponse>> + * @param configId The ID of the patterns configuration. (required) + * @return CompletableFuture<ApiResponse<LLMObsPatternsRunStatusResponse>> */ - public CompletableFuture> - listLLMObsDatasetRecordsWithHttpInfoAsync( - String projectId, - String datasetId, - ListLLMObsDatasetRecordsOptionalParameters parameters) { + public CompletableFuture> + getLLMObsPatternsRunStatusWithHttpInfoAsync(String configId) { // Check if unstable operation is enabled - String operationId = "listLLMObsDatasetRecords"; + String operationId = "getLLMObsPatternsRunStatus"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); @@ -5064,48 +5235,29 @@ public ApiResponse listLLMObsDatasetRecordsWit } Object localVarPostBody = null; - // verify the required parameter 'projectId' is set - if (projectId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'projectId' when calling listLLMObsDatasetRecords")); - return result; - } - - // verify the required parameter 'datasetId' is set - if (datasetId == null) { - CompletableFuture> result = + // verify the required parameter 'configId' is set + if (configId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'datasetId' when calling listLLMObsDatasetRecords")); + "Missing the required parameter 'configId' when calling getLLMObsPatternsRunStatus")); return result; } - Long filterVersion = parameters.filterVersion; - String pageCursor = parameters.pageCursor; - Long pageLimit = parameters.pageLimit; // create path and map variables - String localVarPath = - "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/records" - .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) - .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-runs/status"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[version]", filterVersion)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "config_id", configId)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsDatasetRecords", + "v2.LlmObservabilityApi.getLLMObsPatternsRunStatus", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -5113,7 +5265,7 @@ public ApiResponse listLLMObsDatasetRecordsWit new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -5126,86 +5278,63 @@ public ApiResponse listLLMObsDatasetRecordsWit localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to listLLMObsDatasets. */ - public static class ListLLMObsDatasetsOptionalParameters { - private String filterName; - private String filterId; - private String pageCursor; - private Long pageLimit; + /** Manage optional parameters to listLLMObsAnnotationQueues. */ + public static class ListLLMObsAnnotationQueuesOptionalParameters { + private String projectId; + private List queueIds; /** - * Set filterName. + * Set projectId. * - * @param filterName Filter datasets by name. (optional) - * @return ListLLMObsDatasetsOptionalParameters + * @param projectId Filter annotation queues by project ID. Cannot be used together with + * queueIds. (optional) + * @return ListLLMObsAnnotationQueuesOptionalParameters */ - public ListLLMObsDatasetsOptionalParameters filterName(String filterName) { - this.filterName = filterName; - return this; - } - - /** - * Set filterId. - * - * @param filterId Filter datasets by dataset ID. (optional) - * @return ListLLMObsDatasetsOptionalParameters - */ - public ListLLMObsDatasetsOptionalParameters filterId(String filterId) { - this.filterId = filterId; - return this; - } - - /** - * Set pageCursor. - * - * @param pageCursor Use the Pagination cursor to retrieve the next page of results. (optional) - * @return ListLLMObsDatasetsOptionalParameters - */ - public ListLLMObsDatasetsOptionalParameters pageCursor(String pageCursor) { - this.pageCursor = pageCursor; + public ListLLMObsAnnotationQueuesOptionalParameters projectId(String projectId) { + this.projectId = projectId; return this; } /** - * Set pageLimit. + * Set queueIds. * - * @param pageLimit Maximum number of results to return per page. (optional) - * @return ListLLMObsDatasetsOptionalParameters + * @param queueIds Filter annotation queues by queue IDs (comma-separated). Cannot be used + * together with projectId. (optional) + * @return ListLLMObsAnnotationQueuesOptionalParameters */ - public ListLLMObsDatasetsOptionalParameters pageLimit(Long pageLimit) { - this.pageLimit = pageLimit; + public ListLLMObsAnnotationQueuesOptionalParameters queueIds(List queueIds) { + this.queueIds = queueIds; return this; } } /** - * List LLM Observability datasets. + * List LLM Observability annotation queues. * - *

See {@link #listLLMObsDatasetsWithHttpInfo}. + *

See {@link #listLLMObsAnnotationQueuesWithHttpInfo}. * - * @param projectId The ID of the LLM Observability project. (required) - * @return LLMObsDatasetsResponse + * @return LLMObsAnnotationQueuesResponse * @throws ApiException if fails to make API call */ - public LLMObsDatasetsResponse listLLMObsDatasets(String projectId) throws ApiException { - return listLLMObsDatasetsWithHttpInfo(projectId, new ListLLMObsDatasetsOptionalParameters()) + public LLMObsAnnotationQueuesResponse listLLMObsAnnotationQueues() throws ApiException { + return listLLMObsAnnotationQueuesWithHttpInfo( + new ListLLMObsAnnotationQueuesOptionalParameters()) .getData(); } /** - * List LLM Observability datasets. + * List LLM Observability annotation queues. * - *

See {@link #listLLMObsDatasetsWithHttpInfoAsync}. + *

See {@link #listLLMObsAnnotationQueuesWithHttpInfoAsync}. * - * @param projectId The ID of the LLM Observability project. (required) - * @return CompletableFuture<LLMObsDatasetsResponse> + * @return CompletableFuture<LLMObsAnnotationQueuesResponse> */ - public CompletableFuture listLLMObsDatasetsAsync(String projectId) { - return listLLMObsDatasetsWithHttpInfoAsync( - projectId, new ListLLMObsDatasetsOptionalParameters()) + public CompletableFuture listLLMObsAnnotationQueuesAsync() { + return listLLMObsAnnotationQueuesWithHttpInfoAsync( + new ListLLMObsAnnotationQueuesOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -5213,32 +5342,30 @@ projectId, new ListLLMObsDatasetsOptionalParameters()) } /** - * List LLM Observability datasets. + * List LLM Observability annotation queues. * - *

See {@link #listLLMObsDatasetsWithHttpInfo}. + *

See {@link #listLLMObsAnnotationQueuesWithHttpInfo}. * - * @param projectId The ID of the LLM Observability project. (required) * @param parameters Optional parameters for the request. - * @return LLMObsDatasetsResponse + * @return LLMObsAnnotationQueuesResponse * @throws ApiException if fails to make API call */ - public LLMObsDatasetsResponse listLLMObsDatasets( - String projectId, ListLLMObsDatasetsOptionalParameters parameters) throws ApiException { - return listLLMObsDatasetsWithHttpInfo(projectId, parameters).getData(); + public LLMObsAnnotationQueuesResponse listLLMObsAnnotationQueues( + ListLLMObsAnnotationQueuesOptionalParameters parameters) throws ApiException { + return listLLMObsAnnotationQueuesWithHttpInfo(parameters).getData(); } /** - * List LLM Observability datasets. + * List LLM Observability annotation queues. * - *

See {@link #listLLMObsDatasetsWithHttpInfoAsync}. + *

See {@link #listLLMObsAnnotationQueuesWithHttpInfoAsync}. * - * @param projectId The ID of the LLM Observability project. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<LLMObsDatasetsResponse> + * @return CompletableFuture<LLMObsAnnotationQueuesResponse> */ - public CompletableFuture listLLMObsDatasetsAsync( - String projectId, ListLLMObsDatasetsOptionalParameters parameters) { - return listLLMObsDatasetsWithHttpInfoAsync(projectId, parameters) + public CompletableFuture listLLMObsAnnotationQueuesAsync( + ListLLMObsAnnotationQueuesOptionalParameters parameters) { + return listLLMObsAnnotationQueuesWithHttpInfoAsync(parameters) .thenApply( response -> { return response.getData(); @@ -5246,11 +5373,11 @@ public CompletableFuture listLLMObsDatasetsAsync( } /** - * List all LLM Observability datasets for a project, sorted by creation date, newest first. + * List annotation queues. Optionally filter by project ID or queue IDs. These parameters are + * mutually exclusive. If neither is provided, all queues in the organization are returned. * - * @param projectId The ID of the LLM Observability project. (required) * @param parameters Optional parameters for the request. - * @return ApiResponse<LLMObsDatasetsResponse> + * @return ApiResponse<LLMObsAnnotationQueuesResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -5260,46 +5387,33 @@ public CompletableFuture listLLMObsDatasetsAsync( * * * - * * *
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse listLLMObsDatasetsWithHttpInfo( - String projectId, ListLLMObsDatasetsOptionalParameters parameters) throws ApiException { + public ApiResponse listLLMObsAnnotationQueuesWithHttpInfo( + ListLLMObsAnnotationQueuesOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsDatasets"; + String operationId = "listLLMObsAnnotationQueues"; 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 'projectId' is set - if (projectId == null) { - throw new ApiException( - 400, "Missing the required parameter 'projectId' when calling listLLMObsDatasets"); - } - String filterName = parameters.filterName; - String filterId = parameters.filterId; - String pageCursor = parameters.pageCursor; - Long pageLimit = parameters.pageLimit; + String projectId = parameters.projectId; + List queueIds = parameters.queueIds; // create path and map variables - String localVarPath = - "/api/v2/llm-obs/v1/{project_id}/datasets" - .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())); + String localVarPath = "/api/v2/llm-obs/v1/annotation-queues"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[id]", filterId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "projectId", projectId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "queueIds", queueIds)); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsDatasets", + "v2.LlmObservabilityApi.listLLMObsAnnotationQueues", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -5314,62 +5428,48 @@ public ApiResponse listLLMObsDatasetsWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List LLM Observability datasets. + * List LLM Observability annotation queues. * - *

See {@link #listLLMObsDatasetsWithHttpInfo}. + *

See {@link #listLLMObsAnnotationQueuesWithHttpInfo}. * - * @param projectId The ID of the LLM Observability project. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<LLMObsDatasetsResponse>> + * @return CompletableFuture<ApiResponse<LLMObsAnnotationQueuesResponse>> */ - public CompletableFuture> listLLMObsDatasetsWithHttpInfoAsync( - String projectId, ListLLMObsDatasetsOptionalParameters parameters) { + public CompletableFuture> + listLLMObsAnnotationQueuesWithHttpInfoAsync( + ListLLMObsAnnotationQueuesOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listLLMObsDatasets"; + String operationId = "listLLMObsAnnotationQueues"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + 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 'projectId' is set - if (projectId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'projectId' when calling listLLMObsDatasets")); - return result; - } - String filterName = parameters.filterName; - String filterId = parameters.filterId; - String pageCursor = parameters.pageCursor; - Long pageLimit = parameters.pageLimit; + String projectId = parameters.projectId; + List queueIds = parameters.queueIds; // create path and map variables - String localVarPath = - "/api/v2/llm-obs/v1/{project_id}/datasets" - .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())); + String localVarPath = "/api/v2/llm-obs/v1/annotation-queues"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[id]", filterId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "projectId", projectId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "queueIds", queueIds)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsDatasets", + "v2.LlmObservabilityApi.listLLMObsAnnotationQueues", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -5377,7 +5477,8 @@ public CompletableFuture> listLLMObsDatasets new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -5389,36 +5490,80 @@ public CompletableFuture> listLLMObsDatasets localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); + } + + /** Manage optional parameters to listLLMObsDatasetRecords. */ + public static class ListLLMObsDatasetRecordsOptionalParameters { + private Long filterVersion; + private String pageCursor; + private Long pageLimit; + + /** + * Set filterVersion. + * + * @param filterVersion Retrieve records from a specific dataset version. Defaults to the + * current version. (optional) + * @return ListLLMObsDatasetRecordsOptionalParameters + */ + public ListLLMObsDatasetRecordsOptionalParameters filterVersion(Long filterVersion) { + this.filterVersion = filterVersion; + return this; + } + + /** + * Set pageCursor. + * + * @param pageCursor Use the Pagination cursor to retrieve the next page of results. (optional) + * @return ListLLMObsDatasetRecordsOptionalParameters + */ + public ListLLMObsDatasetRecordsOptionalParameters pageCursor(String pageCursor) { + this.pageCursor = pageCursor; + return this; + } + + /** + * Set pageLimit. + * + * @param pageLimit Maximum number of results to return per page. (optional) + * @return ListLLMObsDatasetRecordsOptionalParameters + */ + public ListLLMObsDatasetRecordsOptionalParameters pageLimit(Long pageLimit) { + this.pageLimit = pageLimit; + return this; + } } /** - * List LLM Observability dataset versions. + * List LLM Observability dataset records. * - *

See {@link #listLLMObsDatasetVersionsWithHttpInfo}. + *

See {@link #listLLMObsDatasetRecordsWithHttpInfo}. * * @param projectId The ID of the LLM Observability project. (required) * @param datasetId The ID of the LLM Observability dataset. (required) - * @return LLMObsDatasetVersionsResponse + * @return LLMObsDatasetRecordsListResponse * @throws ApiException if fails to make API call */ - public LLMObsDatasetVersionsResponse listLLMObsDatasetVersions(String projectId, String datasetId) - throws ApiException { - return listLLMObsDatasetVersionsWithHttpInfo(projectId, datasetId).getData(); + public LLMObsDatasetRecordsListResponse listLLMObsDatasetRecords( + String projectId, String datasetId) throws ApiException { + return listLLMObsDatasetRecordsWithHttpInfo( + projectId, datasetId, new ListLLMObsDatasetRecordsOptionalParameters()) + .getData(); } /** - * List LLM Observability dataset versions. + * List LLM Observability dataset records. * - *

See {@link #listLLMObsDatasetVersionsWithHttpInfoAsync}. + *

See {@link #listLLMObsDatasetRecordsWithHttpInfoAsync}. * * @param projectId The ID of the LLM Observability project. (required) * @param datasetId The ID of the LLM Observability dataset. (required) - * @return CompletableFuture<LLMObsDatasetVersionsResponse> + * @return CompletableFuture<LLMObsDatasetRecordsListResponse> */ - public CompletableFuture listLLMObsDatasetVersionsAsync( + public CompletableFuture listLLMObsDatasetRecordsAsync( String projectId, String datasetId) { - return listLLMObsDatasetVersionsWithHttpInfoAsync(projectId, datasetId) + return listLLMObsDatasetRecordsWithHttpInfoAsync( + projectId, datasetId, new ListLLMObsDatasetRecordsOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -5426,30 +5571,66 @@ public CompletableFuture listLLMObsDatasetVersion } /** - * List the active versions of a dataset. A version is created each time a dataset is referenced - * by an experiment run. + * List LLM Observability dataset records. + * + *

See {@link #listLLMObsDatasetRecordsWithHttpInfo}. * * @param projectId The ID of the LLM Observability project. (required) * @param datasetId The ID of the LLM Observability dataset. (required) - * @return ApiResponse<LLMObsDatasetVersionsResponse> + * @param parameters Optional parameters for the request. + * @return LLMObsDatasetRecordsListResponse * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * + */ + public LLMObsDatasetRecordsListResponse listLLMObsDatasetRecords( + String projectId, String datasetId, ListLLMObsDatasetRecordsOptionalParameters parameters) + throws ApiException { + return listLLMObsDatasetRecordsWithHttpInfo(projectId, datasetId, parameters).getData(); + } + + /** + * List LLM Observability dataset records. + * + *

See {@link #listLLMObsDatasetRecordsWithHttpInfoAsync}. + * + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<LLMObsDatasetRecordsListResponse> + */ + public CompletableFuture listLLMObsDatasetRecordsAsync( + String projectId, String datasetId, ListLLMObsDatasetRecordsOptionalParameters parameters) { + return listLLMObsDatasetRecordsWithHttpInfoAsync(projectId, datasetId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all records in an LLM Observability dataset, sorted by creation date, newest first. + * + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<LLMObsDatasetRecordsListResponse> + * @throws ApiException if fails to make API call + * @http.response.details + *

Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
+ * + * + * + * * * * * - * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse listLLMObsDatasetVersionsWithHttpInfo( - String projectId, String datasetId) throws ApiException { + public ApiResponse listLLMObsDatasetRecordsWithHttpInfo( + String projectId, String datasetId, ListLLMObsDatasetRecordsOptionalParameters parameters) + throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsDatasetVersions"; + String operationId = "listLLMObsDatasetRecords"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -5460,25 +5641,1839 @@ public ApiResponse listLLMObsDatasetVersionsWithH // verify the required parameter 'projectId' is set if (projectId == null) { throw new ApiException( - 400, "Missing the required parameter 'projectId' when calling listLLMObsDatasetVersions"); + 400, "Missing the required parameter 'projectId' when calling listLLMObsDatasetRecords"); } // verify the required parameter 'datasetId' is set if (datasetId == null) { throw new ApiException( - 400, "Missing the required parameter 'datasetId' when calling listLLMObsDatasetVersions"); + 400, "Missing the required parameter 'datasetId' when calling listLLMObsDatasetRecords"); + } + Long filterVersion = parameters.filterVersion; + String pageCursor = parameters.pageCursor; + Long pageLimit = parameters.pageLimit; + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/records" + .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) + .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[version]", filterVersion)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsDatasetRecords", + 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 LLM Observability dataset records. + * + *

See {@link #listLLMObsDatasetRecordsWithHttpInfo}. + * + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<LLMObsDatasetRecordsListResponse>> + */ + public CompletableFuture> + listLLMObsDatasetRecordsWithHttpInfoAsync( + String projectId, + String datasetId, + ListLLMObsDatasetRecordsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listLLMObsDatasetRecords"; + 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 'projectId' is set + if (projectId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'projectId' when calling listLLMObsDatasetRecords")); + return result; + } + + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'datasetId' when calling listLLMObsDatasetRecords")); + return result; + } + Long filterVersion = parameters.filterVersion; + String pageCursor = parameters.pageCursor; + Long pageLimit = parameters.pageLimit; + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/records" + .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) + .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[version]", filterVersion)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsDatasetRecords", + 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 listLLMObsDatasets. */ + public static class ListLLMObsDatasetsOptionalParameters { + private String filterName; + private String filterId; + private String pageCursor; + private Long pageLimit; + + /** + * Set filterName. + * + * @param filterName Filter datasets by name. (optional) + * @return ListLLMObsDatasetsOptionalParameters + */ + public ListLLMObsDatasetsOptionalParameters filterName(String filterName) { + this.filterName = filterName; + return this; + } + + /** + * Set filterId. + * + * @param filterId Filter datasets by dataset ID. (optional) + * @return ListLLMObsDatasetsOptionalParameters + */ + public ListLLMObsDatasetsOptionalParameters filterId(String filterId) { + this.filterId = filterId; + return this; + } + + /** + * Set pageCursor. + * + * @param pageCursor Use the Pagination cursor to retrieve the next page of results. (optional) + * @return ListLLMObsDatasetsOptionalParameters + */ + public ListLLMObsDatasetsOptionalParameters pageCursor(String pageCursor) { + this.pageCursor = pageCursor; + return this; + } + + /** + * Set pageLimit. + * + * @param pageLimit Maximum number of results to return per page. (optional) + * @return ListLLMObsDatasetsOptionalParameters + */ + public ListLLMObsDatasetsOptionalParameters pageLimit(Long pageLimit) { + this.pageLimit = pageLimit; + return this; + } + } + + /** + * List LLM Observability datasets. + * + *

See {@link #listLLMObsDatasetsWithHttpInfo}. + * + * @param projectId The ID of the LLM Observability project. (required) + * @return LLMObsDatasetsResponse + * @throws ApiException if fails to make API call + */ + public LLMObsDatasetsResponse listLLMObsDatasets(String projectId) throws ApiException { + return listLLMObsDatasetsWithHttpInfo(projectId, new ListLLMObsDatasetsOptionalParameters()) + .getData(); + } + + /** + * List LLM Observability datasets. + * + *

See {@link #listLLMObsDatasetsWithHttpInfoAsync}. + * + * @param projectId The ID of the LLM Observability project. (required) + * @return CompletableFuture<LLMObsDatasetsResponse> + */ + public CompletableFuture listLLMObsDatasetsAsync(String projectId) { + return listLLMObsDatasetsWithHttpInfoAsync( + projectId, new ListLLMObsDatasetsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List LLM Observability datasets. + * + *

See {@link #listLLMObsDatasetsWithHttpInfo}. + * + * @param projectId The ID of the LLM Observability project. (required) + * @param parameters Optional parameters for the request. + * @return LLMObsDatasetsResponse + * @throws ApiException if fails to make API call + */ + public LLMObsDatasetsResponse listLLMObsDatasets( + String projectId, ListLLMObsDatasetsOptionalParameters parameters) throws ApiException { + return listLLMObsDatasetsWithHttpInfo(projectId, parameters).getData(); + } + + /** + * List LLM Observability datasets. + * + *

See {@link #listLLMObsDatasetsWithHttpInfoAsync}. + * + * @param projectId The ID of the LLM Observability project. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<LLMObsDatasetsResponse> + */ + public CompletableFuture listLLMObsDatasetsAsync( + String projectId, ListLLMObsDatasetsOptionalParameters parameters) { + return listLLMObsDatasetsWithHttpInfoAsync(projectId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all LLM Observability datasets for a project, sorted by creation date, newest first. + * + * @param projectId The ID of the LLM Observability project. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<LLMObsDatasetsResponse> + * @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 listLLMObsDatasetsWithHttpInfo( + String projectId, ListLLMObsDatasetsOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listLLMObsDatasets"; + 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 'projectId' is set + if (projectId == null) { + throw new ApiException( + 400, "Missing the required parameter 'projectId' when calling listLLMObsDatasets"); + } + String filterName = parameters.filterName; + String filterId = parameters.filterId; + String pageCursor = parameters.pageCursor; + Long pageLimit = parameters.pageLimit; + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/{project_id}/datasets" + .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[id]", filterId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsDatasets", + 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 LLM Observability datasets. + * + *

See {@link #listLLMObsDatasetsWithHttpInfo}. + * + * @param projectId The ID of the LLM Observability project. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<LLMObsDatasetsResponse>> + */ + public CompletableFuture> listLLMObsDatasetsWithHttpInfoAsync( + String projectId, ListLLMObsDatasetsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listLLMObsDatasets"; + 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 'projectId' is set + if (projectId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'projectId' when calling listLLMObsDatasets")); + return result; + } + String filterName = parameters.filterName; + String filterId = parameters.filterId; + String pageCursor = parameters.pageCursor; + Long pageLimit = parameters.pageLimit; + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/{project_id}/datasets" + .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[id]", filterId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsDatasets", + 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() {}); + } + + /** + * List LLM Observability dataset versions. + * + *

See {@link #listLLMObsDatasetVersionsWithHttpInfo}. + * + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @return LLMObsDatasetVersionsResponse + * @throws ApiException if fails to make API call + */ + public LLMObsDatasetVersionsResponse listLLMObsDatasetVersions(String projectId, String datasetId) + throws ApiException { + return listLLMObsDatasetVersionsWithHttpInfo(projectId, datasetId).getData(); + } + + /** + * List LLM Observability dataset versions. + * + *

See {@link #listLLMObsDatasetVersionsWithHttpInfoAsync}. + * + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @return CompletableFuture<LLMObsDatasetVersionsResponse> + */ + public CompletableFuture listLLMObsDatasetVersionsAsync( + String projectId, String datasetId) { + return listLLMObsDatasetVersionsWithHttpInfoAsync(projectId, datasetId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List the active versions of a dataset. A version is created each time a dataset is referenced + * by an experiment run. + * + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @return ApiResponse<LLMObsDatasetVersionsResponse> + * @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 -
500 Internal Server Error -
+ */ + public ApiResponse listLLMObsDatasetVersionsWithHttpInfo( + String projectId, String datasetId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listLLMObsDatasetVersions"; + 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 'projectId' is set + if (projectId == null) { + throw new ApiException( + 400, "Missing the required parameter 'projectId' when calling listLLMObsDatasetVersions"); + } + + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException( + 400, "Missing the required parameter 'datasetId' when calling listLLMObsDatasetVersions"); + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/versions" + .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) + .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsDatasetVersions", + 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 LLM Observability dataset versions. + * + *

See {@link #listLLMObsDatasetVersionsWithHttpInfo}. + * + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @return CompletableFuture<ApiResponse<LLMObsDatasetVersionsResponse>> + */ + public CompletableFuture> + listLLMObsDatasetVersionsWithHttpInfoAsync(String projectId, String datasetId) { + // Check if unstable operation is enabled + String operationId = "listLLMObsDatasetVersions"; + 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 'projectId' is set + if (projectId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'projectId' when calling listLLMObsDatasetVersions")); + return result; + } + + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'datasetId' when calling listLLMObsDatasetVersions")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/versions" + .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) + .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsDatasetVersions", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listLLMObsExperimentEvents. */ + public static class ListLLMObsExperimentEventsOptionalParameters { + private Long pageLimit; + private String pageCursor; + + /** + * Set pageLimit. + * + * @param pageLimit Maximum number of spans to return per page. Defaults to 5000. (optional, + * default to 5000) + * @return ListLLMObsExperimentEventsOptionalParameters + */ + public ListLLMObsExperimentEventsOptionalParameters pageLimit(Long pageLimit) { + this.pageLimit = pageLimit; + return this; + } + + /** + * Set pageCursor. + * + * @param pageCursor Opaque cursor from a previous response to fetch the next page of results. + * (optional) + * @return ListLLMObsExperimentEventsOptionalParameters + */ + public ListLLMObsExperimentEventsOptionalParameters pageCursor(String pageCursor) { + this.pageCursor = pageCursor; + return this; + } + } + + /** + * List events for an LLM Observability experiment. + * + *

See {@link #listLLMObsExperimentEventsWithHttpInfo}. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @return LLMObsExperimentEventsV2Response + * @throws ApiException if fails to make API call + */ + public LLMObsExperimentEventsV2Response listLLMObsExperimentEvents(String experimentId) + throws ApiException { + return listLLMObsExperimentEventsWithHttpInfo( + experimentId, new ListLLMObsExperimentEventsOptionalParameters()) + .getData(); + } + + /** + * List events for an LLM Observability experiment. + * + *

See {@link #listLLMObsExperimentEventsWithHttpInfoAsync}. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @return CompletableFuture<LLMObsExperimentEventsV2Response> + */ + public CompletableFuture listLLMObsExperimentEventsAsync( + String experimentId) { + return listLLMObsExperimentEventsWithHttpInfoAsync( + experimentId, new ListLLMObsExperimentEventsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List events for an LLM Observability experiment. + * + *

See {@link #listLLMObsExperimentEventsWithHttpInfo}. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @param parameters Optional parameters for the request. + * @return LLMObsExperimentEventsV2Response + * @throws ApiException if fails to make API call + */ + public LLMObsExperimentEventsV2Response listLLMObsExperimentEvents( + String experimentId, ListLLMObsExperimentEventsOptionalParameters parameters) + throws ApiException { + return listLLMObsExperimentEventsWithHttpInfo(experimentId, parameters).getData(); + } + + /** + * List events for an LLM Observability experiment. + * + *

See {@link #listLLMObsExperimentEventsWithHttpInfoAsync}. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<LLMObsExperimentEventsV2Response> + */ + public CompletableFuture listLLMObsExperimentEventsAsync( + String experimentId, ListLLMObsExperimentEventsOptionalParameters parameters) { + return listLLMObsExperimentEventsWithHttpInfoAsync(experimentId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve spans and experiment-level summary metrics for a given experiment with cursor-based + * pagination. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<LLMObsExperimentEventsV2Response> + * @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 -
500 Internal Server Error -
+ */ + public ApiResponse listLLMObsExperimentEventsWithHttpInfo( + String experimentId, ListLLMObsExperimentEventsOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listLLMObsExperimentEvents"; + 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 'experimentId' is set + if (experimentId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'experimentId' when calling listLLMObsExperimentEvents"); + } + Long pageLimit = parameters.pageLimit; + String pageCursor = parameters.pageCursor; + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v3/experiments/{experiment_id}/events" + .replaceAll( + "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsExperimentEvents", + 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 events for an LLM Observability experiment. + * + *

See {@link #listLLMObsExperimentEventsWithHttpInfo}. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<LLMObsExperimentEventsV2Response>> + */ + public CompletableFuture> + listLLMObsExperimentEventsWithHttpInfoAsync( + String experimentId, ListLLMObsExperimentEventsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listLLMObsExperimentEvents"; + 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 'experimentId' is set + if (experimentId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'experimentId' when calling" + + " listLLMObsExperimentEvents")); + return result; + } + Long pageLimit = parameters.pageLimit; + String pageCursor = parameters.pageCursor; + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v3/experiments/{experiment_id}/events" + .replaceAll( + "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsExperimentEvents", + 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() {}); + } + + /** + * List LLM Observability experiment spans (v1). + * + *

See {@link #listLLMObsExperimentEventsV1WithHttpInfo}. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @return LLMObsExperimentSpansResponse + * @throws ApiException if fails to make API call + * @deprecated + */ + @Deprecated + public LLMObsExperimentSpansResponse listLLMObsExperimentEventsV1(String experimentId) + throws ApiException { + return listLLMObsExperimentEventsV1WithHttpInfo(experimentId).getData(); + } + + /** + * List LLM Observability experiment spans (v1). + * + *

See {@link #listLLMObsExperimentEventsV1WithHttpInfoAsync}. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @return CompletableFuture<LLMObsExperimentSpansResponse> + * @deprecated + */ + @Deprecated + public CompletableFuture listLLMObsExperimentEventsV1Async( + String experimentId) { + return listLLMObsExperimentEventsV1WithHttpInfoAsync(experimentId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve spans with their evaluation metrics for a given experiment. Returns spans only, with + * no summary metrics and no pagination. Deprecated in favor of ListLLMObsExperimentEventsV3 + * . + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @return ApiResponse<LLMObsExperimentSpansResponse> + * @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 -
500 Internal Server Error -
+ * + * @deprecated + */ + @Deprecated + public ApiResponse listLLMObsExperimentEventsV1WithHttpInfo( + String experimentId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listLLMObsExperimentEventsV1"; + 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 'experimentId' is set + if (experimentId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'experimentId' when calling" + + " listLLMObsExperimentEventsV1"); + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/experiments/{experiment_id}/events" + .replaceAll( + "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsExperimentEventsV1", + 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 LLM Observability experiment spans (v1). + * + *

See {@link #listLLMObsExperimentEventsV1WithHttpInfo}. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @return CompletableFuture<ApiResponse<LLMObsExperimentSpansResponse>> + * @deprecated + */ + @Deprecated + public CompletableFuture> + listLLMObsExperimentEventsV1WithHttpInfoAsync(String experimentId) { + // Check if unstable operation is enabled + String operationId = "listLLMObsExperimentEventsV1"; + 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 'experimentId' is set + if (experimentId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'experimentId' when calling" + + " listLLMObsExperimentEventsV1")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/experiments/{experiment_id}/events" + .replaceAll( + "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsExperimentEventsV1", + 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() {}); + } + + /** + * List LLM Observability experiment events (v2). + * + *

See {@link #listLLMObsExperimentEventsV2WithHttpInfo}. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @return LLMObsExperimentEventsV2Response + * @throws ApiException if fails to make API call + * @deprecated + */ + @Deprecated + public LLMObsExperimentEventsV2Response listLLMObsExperimentEventsV2(String experimentId) + throws ApiException { + return listLLMObsExperimentEventsV2WithHttpInfo(experimentId).getData(); + } + + /** + * List LLM Observability experiment events (v2). + * + *

See {@link #listLLMObsExperimentEventsV2WithHttpInfoAsync}. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @return CompletableFuture<LLMObsExperimentEventsV2Response> + * @deprecated + */ + @Deprecated + public CompletableFuture listLLMObsExperimentEventsV2Async( + String experimentId) { + return listLLMObsExperimentEventsV2WithHttpInfoAsync(experimentId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve spans and experiment-level summary metrics for a given experiment. Returns the full + * events payload without pagination. Deprecated: use ListLLMObsExperimentEventsV3 + * instead. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @return ApiResponse<LLMObsExperimentEventsV2Response> + * @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 -
500 Internal Server Error -
+ * + * @deprecated + */ + @Deprecated + public ApiResponse listLLMObsExperimentEventsV2WithHttpInfo( + String experimentId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listLLMObsExperimentEventsV2"; + 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 'experimentId' is set + if (experimentId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'experimentId' when calling" + + " listLLMObsExperimentEventsV2"); + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v2/experiments/{experiment_id}/events" + .replaceAll( + "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsExperimentEventsV2", + 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 LLM Observability experiment events (v2). + * + *

See {@link #listLLMObsExperimentEventsV2WithHttpInfo}. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @return CompletableFuture<ApiResponse<LLMObsExperimentEventsV2Response>> + * @deprecated + */ + @Deprecated + public CompletableFuture> + listLLMObsExperimentEventsV2WithHttpInfoAsync(String experimentId) { + // Check if unstable operation is enabled + String operationId = "listLLMObsExperimentEventsV2"; + 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 'experimentId' is set + if (experimentId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'experimentId' when calling" + + " listLLMObsExperimentEventsV2")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v2/experiments/{experiment_id}/events" + .replaceAll( + "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsExperimentEventsV2", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listLLMObsExperiments. */ + public static class ListLLMObsExperimentsOptionalParameters { + private String filterProjectId; + private String filterDatasetId; + private String filterId; + private String filterName; + private String filterExperiment; + private String filterMetadata; + private String filterParentExperimentId; + private Boolean filterIsDeleted; + private Boolean includeUserData; + private Boolean includeDatasetNames; + private String pageCursor; + private Long pageLimit; + + /** + * Set filterProjectId. + * + * @param filterProjectId Filter experiments by project ID. Required if filter[dataset_id] + * is not provided. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters filterProjectId(String filterProjectId) { + this.filterProjectId = filterProjectId; + return this; + } + + /** + * Set filterDatasetId. + * + * @param filterDatasetId Filter experiments by dataset ID. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters filterDatasetId(String filterDatasetId) { + this.filterDatasetId = filterDatasetId; + return this; + } + + /** + * Set filterId. + * + * @param filterId Filter experiments by experiment ID. Can be specified multiple times. + * (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters filterId(String filterId) { + this.filterId = filterId; + return this; + } + + /** + * Set filterName. + * + * @param filterName Filter experiments by their exact run name. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters filterName(String filterName) { + this.filterName = filterName; + return this; + } + + /** + * Set filterExperiment. + * + * @param filterExperiment Filter by logical experiment name. This is the name + * field set when creating an experiment through POST /experiments. Returns all + * experiment runs that share the same name, enabling cross-commit and cross-branch + * comparisons. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters filterExperiment(String filterExperiment) { + this.filterExperiment = filterExperiment; + return this; + } + + /** + * Set filterMetadata. + * + * @param filterMetadata Filter by JSONB metadata containment. Provide a JSON object string + * where experiments whose metadata contains all specified key-value pairs are returned. For + * example: {"commit":"abc123","branch":"main"}. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters filterMetadata(String filterMetadata) { + this.filterMetadata = filterMetadata; + return this; + } + + /** + * Set filterParentExperimentId. + * + * @param filterParentExperimentId Filter experiments by the ID of their parent (baseline) + * experiment. Returns all experiments that were run against the given baseline. Can be + * specified multiple times. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters filterParentExperimentId( + String filterParentExperimentId) { + this.filterParentExperimentId = filterParentExperimentId; + return this; + } + + /** + * Set filterIsDeleted. + * + * @param filterIsDeleted When true, return only soft-deleted experiments. Defaults + * to false. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters filterIsDeleted(Boolean filterIsDeleted) { + this.filterIsDeleted = filterIsDeleted; + return this; + } + + /** + * Set includeUserData. + * + * @param includeUserData When true, enrich each experiment with its author's user + * data in the author field. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters includeUserData(Boolean includeUserData) { + this.includeUserData = includeUserData; + return this; + } + + /** + * Set includeDatasetNames. + * + * @param includeDatasetNames When true, enrich each experiment with its dataset + * name in the dataset_name field. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters includeDatasetNames( + Boolean includeDatasetNames) { + this.includeDatasetNames = includeDatasetNames; + return this; + } + + /** + * Set pageCursor. + * + * @param pageCursor Use the pagination cursor returned in meta.after to retrieve + * the next page of results. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters pageCursor(String pageCursor) { + this.pageCursor = pageCursor; + return this; + } + + /** + * Set pageLimit. + * + * @param pageLimit Maximum number of results to return per page. Values above 5000 are clamped + * to 5000. Defaults to 5000. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters pageLimit(Long pageLimit) { + this.pageLimit = pageLimit; + return this; + } + } + + /** + * List LLM Observability experiments. + * + *

See {@link #listLLMObsExperimentsWithHttpInfo}. + * + * @return LLMObsExperimentsResponse + * @throws ApiException if fails to make API call + */ + public LLMObsExperimentsResponse listLLMObsExperiments() throws ApiException { + return listLLMObsExperimentsWithHttpInfo(new ListLLMObsExperimentsOptionalParameters()) + .getData(); + } + + /** + * List LLM Observability experiments. + * + *

See {@link #listLLMObsExperimentsWithHttpInfoAsync}. + * + * @return CompletableFuture<LLMObsExperimentsResponse> + */ + public CompletableFuture listLLMObsExperimentsAsync() { + return listLLMObsExperimentsWithHttpInfoAsync(new ListLLMObsExperimentsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List LLM Observability experiments. + * + *

See {@link #listLLMObsExperimentsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return LLMObsExperimentsResponse + * @throws ApiException if fails to make API call + */ + public LLMObsExperimentsResponse listLLMObsExperiments( + ListLLMObsExperimentsOptionalParameters parameters) throws ApiException { + return listLLMObsExperimentsWithHttpInfo(parameters).getData(); + } + + /** + * List LLM Observability experiments. + * + *

See {@link #listLLMObsExperimentsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<LLMObsExperimentsResponse> + */ + public CompletableFuture listLLMObsExperimentsAsync( + ListLLMObsExperimentsOptionalParameters parameters) { + return listLLMObsExperimentsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all LLM Observability experiments sorted by creation date, newest first. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<LLMObsExperimentsResponse> + * @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 -
429 Too many requests -
+ */ + public ApiResponse listLLMObsExperimentsWithHttpInfo( + ListLLMObsExperimentsOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listLLMObsExperiments"; + 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; + String filterProjectId = parameters.filterProjectId; + String filterDatasetId = parameters.filterDatasetId; + String filterId = parameters.filterId; + String filterName = parameters.filterName; + String filterExperiment = parameters.filterExperiment; + String filterMetadata = parameters.filterMetadata; + String filterParentExperimentId = parameters.filterParentExperimentId; + Boolean filterIsDeleted = parameters.filterIsDeleted; + Boolean includeUserData = parameters.includeUserData; + Boolean includeDatasetNames = parameters.includeDatasetNames; + String pageCursor = parameters.pageCursor; + Long pageLimit = parameters.pageLimit; + // create path and map variables + String localVarPath = "/api/v2/llm-obs/v1/experiments"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[project_id]", filterProjectId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[dataset_id]", filterDatasetId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[id]", filterId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[experiment]", filterExperiment)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[metadata]", filterMetadata)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[parent_experiment_id]", filterParentExperimentId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[is_deleted]", filterIsDeleted)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "include[user_data]", includeUserData)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "include[dataset_names]", includeDatasetNames)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsExperiments", + 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 LLM Observability experiments. + * + *

See {@link #listLLMObsExperimentsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<LLMObsExperimentsResponse>> + */ + public CompletableFuture> + listLLMObsExperimentsWithHttpInfoAsync(ListLLMObsExperimentsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listLLMObsExperiments"; + 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; + String filterProjectId = parameters.filterProjectId; + String filterDatasetId = parameters.filterDatasetId; + String filterId = parameters.filterId; + String filterName = parameters.filterName; + String filterExperiment = parameters.filterExperiment; + String filterMetadata = parameters.filterMetadata; + String filterParentExperimentId = parameters.filterParentExperimentId; + Boolean filterIsDeleted = parameters.filterIsDeleted; + Boolean includeUserData = parameters.includeUserData; + Boolean includeDatasetNames = parameters.includeDatasetNames; + String pageCursor = parameters.pageCursor; + Long pageLimit = parameters.pageLimit; + // create path and map variables + String localVarPath = "/api/v2/llm-obs/v1/experiments"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[project_id]", filterProjectId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[dataset_id]", filterDatasetId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[id]", filterId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[experiment]", filterExperiment)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[metadata]", filterMetadata)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[parent_experiment_id]", filterParentExperimentId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[is_deleted]", filterIsDeleted)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "include[user_data]", includeUserData)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "include[dataset_names]", includeDatasetNames)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsExperiments", + 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() {}); + } + + /** + * List LLM integration accounts. + * + *

See {@link #listLLMObsIntegrationAccountsWithHttpInfo}. + * + * @param integration The name of the LLM integration. (required) + * @return List<LLMObsIntegrationAccount> + * @throws ApiException if fails to make API call + */ + public List listLLMObsIntegrationAccounts( + LLMObsIntegrationName integration) throws ApiException { + return listLLMObsIntegrationAccountsWithHttpInfo(integration).getData(); + } + + /** + * List LLM integration accounts. + * + *

See {@link #listLLMObsIntegrationAccountsWithHttpInfoAsync}. + * + * @param integration The name of the LLM integration. (required) + * @return CompletableFuture<List<LLMObsIntegrationAccount>> + */ + public CompletableFuture> listLLMObsIntegrationAccountsAsync( + LLMObsIntegrationName integration) { + return listLLMObsIntegrationAccountsWithHttpInfoAsync(integration) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve the list of configured accounts for the specified LLM provider integration. + * + * @param integration The name of the LLM integration. (required) + * @return ApiResponse<List<LLMObsIntegrationAccount>> + * @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 -
429 Too many requests -
+ */ + public ApiResponse> listLLMObsIntegrationAccountsWithHttpInfo( + LLMObsIntegrationName integration) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listLLMObsIntegrationAccounts"; + 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 'integration' is set + if (integration == null) { + throw new ApiException( + 400, + "Missing the required parameter 'integration' when calling" + + " listLLMObsIntegrationAccounts"); + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/integrations/{integration}/accounts" + .replaceAll( + "\\{" + "integration" + "\\}", apiClient.escapeString(integration.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsIntegrationAccounts", + 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 LLM integration accounts. + * + *

See {@link #listLLMObsIntegrationAccountsWithHttpInfo}. + * + * @param integration The name of the LLM integration. (required) + * @return CompletableFuture<ApiResponse<List<LLMObsIntegrationAccount>>> + */ + public CompletableFuture>> + listLLMObsIntegrationAccountsWithHttpInfoAsync(LLMObsIntegrationName integration) { + // Check if unstable operation is enabled + String operationId = "listLLMObsIntegrationAccounts"; + 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 'integration' is set + if (integration == null) { + CompletableFuture>> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'integration' when calling" + + " listLLMObsIntegrationAccounts")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/integrations/{integration}/accounts" + .replaceAll( + "\\{" + "integration" + "\\}", apiClient.escapeString(integration.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsIntegrationAccounts", + 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>() {}); + } + + /** + * List LLM integration models. + * + *

See {@link #listLLMObsIntegrationModelsWithHttpInfo}. + * + * @param integration The name of the LLM integration. (required) + * @param accountId The ID of the integration account. (required) + * @return List<LLMObsIntegrationModel> + * @throws ApiException if fails to make API call + */ + public List listLLMObsIntegrationModels( + LLMObsIntegrationName integration, String accountId) throws ApiException { + return listLLMObsIntegrationModelsWithHttpInfo(integration, accountId).getData(); + } + + /** + * List LLM integration models. + * + *

See {@link #listLLMObsIntegrationModelsWithHttpInfoAsync}. + * + * @param integration The name of the LLM integration. (required) + * @param accountId The ID of the integration account. (required) + * @return CompletableFuture<List<LLMObsIntegrationModel>> + */ + public CompletableFuture> listLLMObsIntegrationModelsAsync( + LLMObsIntegrationName integration, String accountId) { + return listLLMObsIntegrationModelsWithHttpInfoAsync(integration, accountId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve the list of models available for the specified LLM provider integration and account. + * + * @param integration The name of the LLM integration. (required) + * @param accountId The ID of the integration account. (required) + * @return ApiResponse<List<LLMObsIntegrationModel>> + * @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 -
429 Too many requests -
+ */ + public ApiResponse> listLLMObsIntegrationModelsWithHttpInfo( + LLMObsIntegrationName integration, String accountId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listLLMObsIntegrationModels"; + 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 'integration' is set + if (integration == null) { + throw new ApiException( + 400, + "Missing the required parameter 'integration' when calling listLLMObsIntegrationModels"); + } + + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'accountId' when calling listLLMObsIntegrationModels"); } // create path and map variables String localVarPath = - "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/versions" - .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) - .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + "/api/v2/llm-obs/v1/integrations/{integration}/{account_id}/models" + .replaceAll( + "\\{" + "integration" + "\\}", apiClient.escapeString(integration.toString())) + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsDatasetVersions", + "v2.LlmObservabilityApi.listLLMObsIntegrationModels", localVarPath, new ArrayList(), localVarHeaderParams, @@ -5493,26 +7488,27 @@ public ApiResponse listLLMObsDatasetVersionsWithH localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType>() {}); } /** - * List LLM Observability dataset versions. + * List LLM integration models. * - *

See {@link #listLLMObsDatasetVersionsWithHttpInfo}. + *

See {@link #listLLMObsIntegrationModelsWithHttpInfo}. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @return CompletableFuture<ApiResponse<LLMObsDatasetVersionsResponse>> + * @param integration The name of the LLM integration. (required) + * @param accountId The ID of the integration account. (required) + * @return CompletableFuture<ApiResponse<List<LLMObsIntegrationModel>>> */ - public CompletableFuture> - listLLMObsDatasetVersionsWithHttpInfoAsync(String projectId, String datasetId) { + public CompletableFuture>> + listLLMObsIntegrationModelsWithHttpInfoAsync( + LLMObsIntegrationName integration, String accountId) { // Check if unstable operation is enabled - String operationId = "listLLMObsDatasetVersions"; + String operationId = "listLLMObsIntegrationModels"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture>> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); @@ -5520,32 +7516,35 @@ public ApiResponse listLLMObsDatasetVersionsWithH } Object localVarPostBody = null; - // verify the required parameter 'projectId' is set - if (projectId == null) { - CompletableFuture> result = + // verify the required parameter 'integration' is set + if (integration == null) { + CompletableFuture>> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'projectId' when calling listLLMObsDatasetVersions")); + "Missing the required parameter 'integration' when calling" + + " listLLMObsIntegrationModels")); return result; } - // verify the required parameter 'datasetId' is set - if (datasetId == null) { - CompletableFuture> result = + // verify the required parameter 'accountId' is set + if (accountId == null) { + CompletableFuture>> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'datasetId' when calling listLLMObsDatasetVersions")); + "Missing the required parameter 'accountId' when calling" + + " listLLMObsIntegrationModels")); return result; } // create path and map variables String localVarPath = - "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/versions" - .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) - .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + "/api/v2/llm-obs/v1/integrations/{integration}/{account_id}/models" + .replaceAll( + "\\{" + "integration" + "\\}", apiClient.escapeString(integration.toString())) + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); Map localVarHeaderParams = new HashMap(); @@ -5553,7 +7552,7 @@ public ApiResponse listLLMObsDatasetVersionsWithH try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsDatasetVersions", + "v2.LlmObservabilityApi.listLLMObsIntegrationModels", localVarPath, new ArrayList(), localVarHeaderParams, @@ -5561,7 +7560,7 @@ public ApiResponse listLLMObsDatasetVersionsWithH new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture>> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -5574,67 +7573,65 @@ public ApiResponse listLLMObsDatasetVersionsWithH localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType>() {}); } - /** Manage optional parameters to listLLMObsExperimentEvents. */ - public static class ListLLMObsExperimentEventsOptionalParameters { - private Long pageLimit; - private String pageCursor; + /** Manage optional parameters to listLLMObsPatternsClusteredPoints. */ + public static class ListLLMObsPatternsClusteredPointsOptionalParameters { + private Long pageSize; + private String pageToken; /** - * Set pageLimit. + * Set pageSize. * - * @param pageLimit Maximum number of spans to return per page. Defaults to 5000. (optional, - * default to 5000) - * @return ListLLMObsExperimentEventsOptionalParameters + * @param pageSize Maximum number of clustered points to return per page. (optional) + * @return ListLLMObsPatternsClusteredPointsOptionalParameters */ - public ListLLMObsExperimentEventsOptionalParameters pageLimit(Long pageLimit) { - this.pageLimit = pageLimit; + public ListLLMObsPatternsClusteredPointsOptionalParameters pageSize(Long pageSize) { + this.pageSize = pageSize; return this; } /** - * Set pageCursor. + * Set pageToken. * - * @param pageCursor Opaque cursor from a previous response to fetch the next page of results. - * (optional) - * @return ListLLMObsExperimentEventsOptionalParameters + * @param pageToken Pagination token to retrieve the next page of clustered points. (optional) + * @return ListLLMObsPatternsClusteredPointsOptionalParameters */ - public ListLLMObsExperimentEventsOptionalParameters pageCursor(String pageCursor) { - this.pageCursor = pageCursor; + public ListLLMObsPatternsClusteredPointsOptionalParameters pageToken(String pageToken) { + this.pageToken = pageToken; return this; } } /** - * List events for an LLM Observability experiment. + * List patterns clustered points. * - *

See {@link #listLLMObsExperimentEventsWithHttpInfo}. + *

See {@link #listLLMObsPatternsClusteredPointsWithHttpInfo}. * - * @param experimentId The ID of the LLM Observability experiment. (required) - * @return LLMObsExperimentEventsV2Response + * @param topicId The ID of the topic to retrieve clustered points for. (required) + * @return LLMObsPatternsClusteredPointsResponse * @throws ApiException if fails to make API call */ - public LLMObsExperimentEventsV2Response listLLMObsExperimentEvents(String experimentId) + public LLMObsPatternsClusteredPointsResponse listLLMObsPatternsClusteredPoints(String topicId) throws ApiException { - return listLLMObsExperimentEventsWithHttpInfo( - experimentId, new ListLLMObsExperimentEventsOptionalParameters()) + return listLLMObsPatternsClusteredPointsWithHttpInfo( + topicId, new ListLLMObsPatternsClusteredPointsOptionalParameters()) .getData(); } /** - * List events for an LLM Observability experiment. + * List patterns clustered points. * - *

See {@link #listLLMObsExperimentEventsWithHttpInfoAsync}. + *

See {@link #listLLMObsPatternsClusteredPointsWithHttpInfoAsync}. * - * @param experimentId The ID of the LLM Observability experiment. (required) - * @return CompletableFuture<LLMObsExperimentEventsV2Response> + * @param topicId The ID of the topic to retrieve clustered points for. (required) + * @return CompletableFuture<LLMObsPatternsClusteredPointsResponse> */ - public CompletableFuture listLLMObsExperimentEventsAsync( - String experimentId) { - return listLLMObsExperimentEventsWithHttpInfoAsync( - experimentId, new ListLLMObsExperimentEventsOptionalParameters()) + public CompletableFuture + listLLMObsPatternsClusteredPointsAsync(String topicId) { + return listLLMObsPatternsClusteredPointsWithHttpInfoAsync( + topicId, new ListLLMObsPatternsClusteredPointsOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -5642,33 +7639,34 @@ experimentId, new ListLLMObsExperimentEventsOptionalParameters()) } /** - * List events for an LLM Observability experiment. + * List patterns clustered points. * - *

See {@link #listLLMObsExperimentEventsWithHttpInfo}. + *

See {@link #listLLMObsPatternsClusteredPointsWithHttpInfo}. * - * @param experimentId The ID of the LLM Observability experiment. (required) + * @param topicId The ID of the topic to retrieve clustered points for. (required) * @param parameters Optional parameters for the request. - * @return LLMObsExperimentEventsV2Response + * @return LLMObsPatternsClusteredPointsResponse * @throws ApiException if fails to make API call */ - public LLMObsExperimentEventsV2Response listLLMObsExperimentEvents( - String experimentId, ListLLMObsExperimentEventsOptionalParameters parameters) + public LLMObsPatternsClusteredPointsResponse listLLMObsPatternsClusteredPoints( + String topicId, ListLLMObsPatternsClusteredPointsOptionalParameters parameters) throws ApiException { - return listLLMObsExperimentEventsWithHttpInfo(experimentId, parameters).getData(); + return listLLMObsPatternsClusteredPointsWithHttpInfo(topicId, parameters).getData(); } /** - * List events for an LLM Observability experiment. + * List patterns clustered points. * - *

See {@link #listLLMObsExperimentEventsWithHttpInfoAsync}. + *

See {@link #listLLMObsPatternsClusteredPointsWithHttpInfoAsync}. * - * @param experimentId The ID of the LLM Observability experiment. (required) + * @param topicId The ID of the topic to retrieve clustered points for. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<LLMObsExperimentEventsV2Response> + * @return CompletableFuture<LLMObsPatternsClusteredPointsResponse> */ - public CompletableFuture listLLMObsExperimentEventsAsync( - String experimentId, ListLLMObsExperimentEventsOptionalParameters parameters) { - return listLLMObsExperimentEventsWithHttpInfoAsync(experimentId, parameters) + public CompletableFuture + listLLMObsPatternsClusteredPointsAsync( + String topicId, ListLLMObsPatternsClusteredPointsOptionalParameters parameters) { + return listLLMObsPatternsClusteredPointsWithHttpInfoAsync(topicId, parameters) .thenApply( response -> { return response.getData(); @@ -5676,12 +7674,12 @@ public CompletableFuture listLLMObsExperimentE } /** - * Retrieve spans and experiment-level summary metrics for a given experiment with cursor-based - * pagination. + * List the data points grouped into a topic. For a parent topic, points from all of its leaf + * topics are returned. * - * @param experimentId The ID of the LLM Observability experiment. (required) + * @param topicId The ID of the topic to retrieve clustered points for. (required) * @param parameters Optional parameters for the request. - * @return ApiResponse<LLMObsExperimentEventsV2Response> + * @return ApiResponse<LLMObsPatternsClusteredPointsResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -5696,11 +7694,12 @@ public CompletableFuture listLLMObsExperimentE * *
500 Internal Server Error -
*/ - public ApiResponse listLLMObsExperimentEventsWithHttpInfo( - String experimentId, ListLLMObsExperimentEventsOptionalParameters parameters) - throws ApiException { + public ApiResponse + listLLMObsPatternsClusteredPointsWithHttpInfo( + String topicId, ListLLMObsPatternsClusteredPointsOptionalParameters parameters) + throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsExperimentEvents"; + String operationId = "listLLMObsPatternsClusteredPoints"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -5708,29 +7707,28 @@ public ApiResponse listLLMObsExperimentEventsW } Object localVarPostBody = null; - // verify the required parameter 'experimentId' is set - if (experimentId == null) { + // verify the required parameter 'topicId' is set + if (topicId == null) { throw new ApiException( 400, - "Missing the required parameter 'experimentId' when calling listLLMObsExperimentEvents"); + "Missing the required parameter 'topicId' when calling" + + " listLLMObsPatternsClusteredPoints"); } - Long pageLimit = parameters.pageLimit; - String pageCursor = parameters.pageCursor; + Long pageSize = parameters.pageSize; + String pageToken = parameters.pageToken; // create path and map variables - String localVarPath = - "/api/v2/llm-obs/v3/experiments/{experiment_id}/events" - .replaceAll( - "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-clustered-points"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "topic_id", topicId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_token", pageToken)); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsExperimentEvents", + "v2.LlmObservabilityApi.listLLMObsPatternsClusteredPoints", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -5745,27 +7743,27 @@ public ApiResponse listLLMObsExperimentEventsW localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List events for an LLM Observability experiment. + * List patterns clustered points. * - *

See {@link #listLLMObsExperimentEventsWithHttpInfo}. + *

See {@link #listLLMObsPatternsClusteredPointsWithHttpInfo}. * - * @param experimentId The ID of the LLM Observability experiment. (required) + * @param topicId The ID of the topic to retrieve clustered points for. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<LLMObsExperimentEventsV2Response>> + * @return CompletableFuture<ApiResponse<LLMObsPatternsClusteredPointsResponse>> */ - public CompletableFuture> - listLLMObsExperimentEventsWithHttpInfoAsync( - String experimentId, ListLLMObsExperimentEventsOptionalParameters parameters) { + public CompletableFuture> + listLLMObsPatternsClusteredPointsWithHttpInfoAsync( + String topicId, ListLLMObsPatternsClusteredPointsOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listLLMObsExperimentEvents"; + String operationId = "listLLMObsPatternsClusteredPoints"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); @@ -5773,36 +7771,34 @@ public ApiResponse listLLMObsExperimentEventsW } Object localVarPostBody = null; - // verify the required parameter 'experimentId' is set - if (experimentId == null) { - CompletableFuture> result = + // verify the required parameter 'topicId' is set + if (topicId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'experimentId' when calling" - + " listLLMObsExperimentEvents")); + "Missing the required parameter 'topicId' when calling" + + " listLLMObsPatternsClusteredPoints")); return result; } - Long pageLimit = parameters.pageLimit; - String pageCursor = parameters.pageCursor; + Long pageSize = parameters.pageSize; + String pageToken = parameters.pageToken; // create path and map variables - String localVarPath = - "/api/v2/llm-obs/v3/experiments/{experiment_id}/events" - .replaceAll( - "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-clustered-points"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "topic_id", topicId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_token", pageToken)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsExperimentEvents", + "v2.LlmObservabilityApi.listLLMObsPatternsClusteredPoints", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -5810,7 +7806,140 @@ public ApiResponse listLLMObsExperimentEventsW new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List patterns configurations. + * + *

See {@link #listLLMObsPatternsConfigsWithHttpInfo}. + * + * @return LLMObsPatternsConfigsResponse + * @throws ApiException if fails to make API call + */ + public LLMObsPatternsConfigsResponse listLLMObsPatternsConfigs() throws ApiException { + return listLLMObsPatternsConfigsWithHttpInfo().getData(); + } + + /** + * List patterns configurations. + * + *

See {@link #listLLMObsPatternsConfigsWithHttpInfoAsync}. + * + * @return CompletableFuture<LLMObsPatternsConfigsResponse> + */ + public CompletableFuture listLLMObsPatternsConfigsAsync() { + return listLLMObsPatternsConfigsWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all patterns configurations for the organization. + * + * @return ApiResponse<LLMObsPatternsConfigsResponse> + * @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 -
429 Too many requests -
500 Internal Server Error -
+ */ + public ApiResponse listLLMObsPatternsConfigsWithHttpInfo() + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listLLMObsPatternsConfigs"; + 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; + // create path and map variables + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-configs"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsPatternsConfigs", + 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 patterns configurations. + * + *

See {@link #listLLMObsPatternsConfigsWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<LLMObsPatternsConfigsResponse>> + */ + public CompletableFuture> + listLLMObsPatternsConfigsWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "listLLMObsPatternsConfigs"; + 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; + // create path and map variables + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-configs"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsPatternsConfigs", + 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; @@ -5823,128 +7952,33 @@ public ApiResponse listLLMObsExperimentEventsW localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to listLLMObsExperiments. */ - public static class ListLLMObsExperimentsOptionalParameters { - private String filterProjectId; - private String filterDatasetId; - private String filterId; - private String pageCursor; - private Long pageLimit; - - /** - * Set filterProjectId. - * - * @param filterProjectId Filter experiments by project ID. Required if filter[dataset_id] - * is not provided. (optional) - * @return ListLLMObsExperimentsOptionalParameters - */ - public ListLLMObsExperimentsOptionalParameters filterProjectId(String filterProjectId) { - this.filterProjectId = filterProjectId; - return this; - } - - /** - * Set filterDatasetId. - * - * @param filterDatasetId Filter experiments by dataset ID. (optional) - * @return ListLLMObsExperimentsOptionalParameters - */ - public ListLLMObsExperimentsOptionalParameters filterDatasetId(String filterDatasetId) { - this.filterDatasetId = filterDatasetId; - return this; - } - - /** - * Set filterId. - * - * @param filterId Filter experiments by experiment ID. Can be specified multiple times. - * (optional) - * @return ListLLMObsExperimentsOptionalParameters - */ - public ListLLMObsExperimentsOptionalParameters filterId(String filterId) { - this.filterId = filterId; - return this; - } - - /** - * Set pageCursor. - * - * @param pageCursor Use the Pagination cursor to retrieve the next page of results. (optional) - * @return ListLLMObsExperimentsOptionalParameters - */ - public ListLLMObsExperimentsOptionalParameters pageCursor(String pageCursor) { - this.pageCursor = pageCursor; - return this; - } - - /** - * Set pageLimit. - * - * @param pageLimit Maximum number of results to return per page. (optional) - * @return ListLLMObsExperimentsOptionalParameters - */ - public ListLLMObsExperimentsOptionalParameters pageLimit(Long pageLimit) { - this.pageLimit = pageLimit; - return this; - } - } - - /** - * List LLM Observability experiments. - * - *

See {@link #listLLMObsExperimentsWithHttpInfo}. - * - * @return LLMObsExperimentsResponse - * @throws ApiException if fails to make API call - */ - public LLMObsExperimentsResponse listLLMObsExperiments() throws ApiException { - return listLLMObsExperimentsWithHttpInfo(new ListLLMObsExperimentsOptionalParameters()) - .getData(); - } - - /** - * List LLM Observability experiments. - * - *

See {@link #listLLMObsExperimentsWithHttpInfoAsync}. - * - * @return CompletableFuture<LLMObsExperimentsResponse> - */ - public CompletableFuture listLLMObsExperimentsAsync() { - return listLLMObsExperimentsWithHttpInfoAsync(new ListLLMObsExperimentsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + new GenericType() {}); } /** - * List LLM Observability experiments. + * List patterns runs. * - *

See {@link #listLLMObsExperimentsWithHttpInfo}. + *

See {@link #listLLMObsPatternsRunsWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return LLMObsExperimentsResponse + * @param configId The ID of the patterns configuration. (required) + * @return LLMObsPatternsRunsResponse * @throws ApiException if fails to make API call */ - public LLMObsExperimentsResponse listLLMObsExperiments( - ListLLMObsExperimentsOptionalParameters parameters) throws ApiException { - return listLLMObsExperimentsWithHttpInfo(parameters).getData(); + public LLMObsPatternsRunsResponse listLLMObsPatternsRuns(String configId) throws ApiException { + return listLLMObsPatternsRunsWithHttpInfo(configId).getData(); } /** - * List LLM Observability experiments. + * List patterns runs. * - *

See {@link #listLLMObsExperimentsWithHttpInfoAsync}. + *

See {@link #listLLMObsPatternsRunsWithHttpInfoAsync}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<LLMObsExperimentsResponse> + * @param configId The ID of the patterns configuration. (required) + * @return CompletableFuture<LLMObsPatternsRunsResponse> */ - public CompletableFuture listLLMObsExperimentsAsync( - ListLLMObsExperimentsOptionalParameters parameters) { - return listLLMObsExperimentsWithHttpInfoAsync(parameters) + public CompletableFuture listLLMObsPatternsRunsAsync( + String configId) { + return listLLMObsPatternsRunsWithHttpInfoAsync(configId) .thenApply( response -> { return response.getData(); @@ -5952,10 +7986,10 @@ public CompletableFuture listLLMObsExperimentsAsync( } /** - * List all LLM Observability experiments sorted by creation date, newest first. + * List the completed patterns runs for a configuration. * - * @param parameters Optional parameters for the request. - * @return ApiResponse<LLMObsExperimentsResponse> + * @param configId The ID of the patterns configuration. (required) + * @return ApiResponse<LLMObsPatternsRunsResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -5965,41 +7999,38 @@ public CompletableFuture listLLMObsExperimentsAsync( * * * + * * + * *
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse listLLMObsExperimentsWithHttpInfo( - ListLLMObsExperimentsOptionalParameters parameters) throws ApiException { + public ApiResponse listLLMObsPatternsRunsWithHttpInfo(String configId) + throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsExperiments"; + String operationId = "listLLMObsPatternsRuns"; 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; - String filterProjectId = parameters.filterProjectId; - String filterDatasetId = parameters.filterDatasetId; - String filterId = parameters.filterId; - String pageCursor = parameters.pageCursor; - Long pageLimit = parameters.pageLimit; + + // verify the required parameter 'configId' is set + if (configId == null) { + throw new ApiException( + 400, "Missing the required parameter 'configId' when calling listLLMObsPatternsRuns"); + } // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/experiments"; + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-runs"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[project_id]", filterProjectId)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[dataset_id]", filterDatasetId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[id]", filterId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "config_id", configId)); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsExperiments", + "v2.LlmObservabilityApi.listLLMObsPatternsRuns", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -6014,54 +8045,53 @@ public ApiResponse listLLMObsExperimentsWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List LLM Observability experiments. + * List patterns runs. * - *

See {@link #listLLMObsExperimentsWithHttpInfo}. + *

See {@link #listLLMObsPatternsRunsWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<LLMObsExperimentsResponse>> + * @param configId The ID of the patterns configuration. (required) + * @return CompletableFuture<ApiResponse<LLMObsPatternsRunsResponse>> */ - public CompletableFuture> - listLLMObsExperimentsWithHttpInfoAsync(ListLLMObsExperimentsOptionalParameters parameters) { + public CompletableFuture> + listLLMObsPatternsRunsWithHttpInfoAsync(String configId) { // Check if unstable operation is enabled - String operationId = "listLLMObsExperiments"; + String operationId = "listLLMObsPatternsRuns"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - String filterProjectId = parameters.filterProjectId; - String filterDatasetId = parameters.filterDatasetId; - String filterId = parameters.filterId; - String pageCursor = parameters.pageCursor; - Long pageLimit = parameters.pageLimit; + + // verify the required parameter 'configId' is set + if (configId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'configId' when calling listLLMObsPatternsRuns")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/experiments"; + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-runs"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[project_id]", filterProjectId)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[dataset_id]", filterDatasetId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[id]", filterId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "config_id", configId)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsExperiments", + "v2.LlmObservabilityApi.listLLMObsPatternsRuns", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -6069,7 +8099,7 @@ public ApiResponse listLLMObsExperimentsWithHttpInfo( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -6081,34 +8111,54 @@ public ApiResponse listLLMObsExperimentsWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); + } + + /** Manage optional parameters to listLLMObsPatternsTopics. */ + public static class ListLLMObsPatternsTopicsOptionalParameters { + private String runId; + + /** + * Set runId. + * + * @param runId The ID of a specific patterns run. Defaults to the most recent completed run. + * (optional) + * @return ListLLMObsPatternsTopicsOptionalParameters + */ + public ListLLMObsPatternsTopicsOptionalParameters runId(String runId) { + this.runId = runId; + return this; + } } /** - * List LLM integration accounts. + * List patterns topics. * - *

See {@link #listLLMObsIntegrationAccountsWithHttpInfo}. + *

See {@link #listLLMObsPatternsTopicsWithHttpInfo}. * - * @param integration The name of the LLM integration. (required) - * @return List<LLMObsIntegrationAccount> + * @param configId The ID of the patterns configuration. (required) + * @return LLMObsPatternsTopicsResponse * @throws ApiException if fails to make API call */ - public List listLLMObsIntegrationAccounts( - LLMObsIntegrationName integration) throws ApiException { - return listLLMObsIntegrationAccountsWithHttpInfo(integration).getData(); + public LLMObsPatternsTopicsResponse listLLMObsPatternsTopics(String configId) + throws ApiException { + return listLLMObsPatternsTopicsWithHttpInfo( + configId, new ListLLMObsPatternsTopicsOptionalParameters()) + .getData(); } /** - * List LLM integration accounts. + * List patterns topics. * - *

See {@link #listLLMObsIntegrationAccountsWithHttpInfoAsync}. + *

See {@link #listLLMObsPatternsTopicsWithHttpInfoAsync}. * - * @param integration The name of the LLM integration. (required) - * @return CompletableFuture<List<LLMObsIntegrationAccount>> + * @param configId The ID of the patterns configuration. (required) + * @return CompletableFuture<LLMObsPatternsTopicsResponse> */ - public CompletableFuture> listLLMObsIntegrationAccountsAsync( - LLMObsIntegrationName integration) { - return listLLMObsIntegrationAccountsWithHttpInfoAsync(integration) + public CompletableFuture listLLMObsPatternsTopicsAsync( + String configId) { + return listLLMObsPatternsTopicsWithHttpInfoAsync( + configId, new ListLLMObsPatternsTopicsOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -6116,10 +8166,45 @@ public CompletableFuture> listLLMObsIntegrationAc } /** - * Retrieve the list of configured accounts for the specified LLM provider integration. + * List patterns topics. * - * @param integration The name of the LLM integration. (required) - * @return ApiResponse<List<LLMObsIntegrationAccount>> + *

See {@link #listLLMObsPatternsTopicsWithHttpInfo}. + * + * @param configId The ID of the patterns configuration. (required) + * @param parameters Optional parameters for the request. + * @return LLMObsPatternsTopicsResponse + * @throws ApiException if fails to make API call + */ + public LLMObsPatternsTopicsResponse listLLMObsPatternsTopics( + String configId, ListLLMObsPatternsTopicsOptionalParameters parameters) throws ApiException { + return listLLMObsPatternsTopicsWithHttpInfo(configId, parameters).getData(); + } + + /** + * List patterns topics. + * + *

See {@link #listLLMObsPatternsTopicsWithHttpInfoAsync}. + * + * @param configId The ID of the patterns configuration. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<LLMObsPatternsTopicsResponse> + */ + public CompletableFuture listLLMObsPatternsTopicsAsync( + String configId, ListLLMObsPatternsTopicsOptionalParameters parameters) { + return listLLMObsPatternsTopicsWithHttpInfoAsync(configId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List the topics discovered by a patterns run. When no run is specified, the most recent + * completed run is used. + * + * @param configId The ID of the patterns configuration. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<LLMObsPatternsTopicsResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -6129,13 +8214,15 @@ public CompletableFuture> listLLMObsIntegrationAc * * * + * * + * *
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse> listLLMObsIntegrationAccountsWithHttpInfo( - LLMObsIntegrationName integration) throws ApiException { + public ApiResponse listLLMObsPatternsTopicsWithHttpInfo( + String configId, ListLLMObsPatternsTopicsOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsIntegrationAccounts"; + String operationId = "listLLMObsPatternsTopics"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -6143,26 +8230,26 @@ public ApiResponse> listLLMObsIntegrationAccounts } Object localVarPostBody = null; - // verify the required parameter 'integration' is set - if (integration == null) { + // verify the required parameter 'configId' is set + if (configId == null) { throw new ApiException( - 400, - "Missing the required parameter 'integration' when calling" - + " listLLMObsIntegrationAccounts"); + 400, "Missing the required parameter 'configId' when calling listLLMObsPatternsTopics"); } + String runId = parameters.runId; // create path and map variables - String localVarPath = - "/api/v2/llm-obs/v1/integrations/{integration}/accounts" - .replaceAll( - "\\{" + "integration" + "\\}", apiClient.escapeString(integration.toString())); + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-topics"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "config_id", configId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "run_id", runId)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsIntegrationAccounts", + "v2.LlmObservabilityApi.listLLMObsPatternsTopics", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -6175,25 +8262,27 @@ public ApiResponse> listLLMObsIntegrationAccounts localVarPostBody, new HashMap(), false, - new GenericType>() {}); + new GenericType() {}); } /** - * List LLM integration accounts. + * List patterns topics. * - *

See {@link #listLLMObsIntegrationAccountsWithHttpInfo}. + *

See {@link #listLLMObsPatternsTopicsWithHttpInfo}. * - * @param integration The name of the LLM integration. (required) - * @return CompletableFuture<ApiResponse<List<LLMObsIntegrationAccount>>> + * @param configId The ID of the patterns configuration. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<LLMObsPatternsTopicsResponse>> */ - public CompletableFuture>> - listLLMObsIntegrationAccountsWithHttpInfoAsync(LLMObsIntegrationName integration) { + public CompletableFuture> + listLLMObsPatternsTopicsWithHttpInfoAsync( + String configId, ListLLMObsPatternsTopicsOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listLLMObsIntegrationAccounts"; + String operationId = "listLLMObsPatternsTopics"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture>> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); @@ -6201,38 +8290,39 @@ public ApiResponse> listLLMObsIntegrationAccounts } Object localVarPostBody = null; - // verify the required parameter 'integration' is set - if (integration == null) { - CompletableFuture>> result = + // verify the required parameter 'configId' is set + if (configId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'integration' when calling" - + " listLLMObsIntegrationAccounts")); + "Missing the required parameter 'configId' when calling listLLMObsPatternsTopics")); return result; - } - // create path and map variables - String localVarPath = - "/api/v2/llm-obs/v1/integrations/{integration}/accounts" - .replaceAll( - "\\{" + "integration" + "\\}", apiClient.escapeString(integration.toString())); + } + String runId = parameters.runId; + // create path and map variables + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-topics"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "config_id", configId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "run_id", runId)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsIntegrationAccounts", + "v2.LlmObservabilityApi.listLLMObsPatternsTopics", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture>> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -6245,36 +8335,68 @@ public ApiResponse> listLLMObsIntegrationAccounts localVarPostBody, new HashMap(), false, - new GenericType>() {}); + new GenericType() {}); + } + + /** Manage optional parameters to listLLMObsPatternsTopicsWithClusteredPoints. */ + public static class ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters { + private String runId; + private Boolean includeMetrics; + + /** + * Set runId. + * + * @param runId The ID of a specific patterns run. Defaults to the most recent completed run. + * (optional) + * @return ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters + */ + public ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters runId(String runId) { + this.runId = runId; + return this; + } + + /** + * Set includeMetrics. + * + * @param includeMetrics When true, enrich each clustered point with span metrics such as + * status, duration, token counts, estimated cost, and evaluations. (optional) + * @return ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters + */ + public ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters includeMetrics( + Boolean includeMetrics) { + this.includeMetrics = includeMetrics; + return this; + } } /** - * List LLM integration models. + * List patterns topics with clustered points. * - *

See {@link #listLLMObsIntegrationModelsWithHttpInfo}. + *

See {@link #listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfo}. * - * @param integration The name of the LLM integration. (required) - * @param accountId The ID of the integration account. (required) - * @return List<LLMObsIntegrationModel> + * @param configId The ID of the patterns configuration. (required) + * @return LLMObsPatternsTopicsWithClusteredPointsResponse * @throws ApiException if fails to make API call */ - public List listLLMObsIntegrationModels( - LLMObsIntegrationName integration, String accountId) throws ApiException { - return listLLMObsIntegrationModelsWithHttpInfo(integration, accountId).getData(); + public LLMObsPatternsTopicsWithClusteredPointsResponse + listLLMObsPatternsTopicsWithClusteredPoints(String configId) throws ApiException { + return listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfo( + configId, new ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters()) + .getData(); } /** - * List LLM integration models. + * List patterns topics with clustered points. * - *

See {@link #listLLMObsIntegrationModelsWithHttpInfoAsync}. + *

See {@link #listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfoAsync}. * - * @param integration The name of the LLM integration. (required) - * @param accountId The ID of the integration account. (required) - * @return CompletableFuture<List<LLMObsIntegrationModel>> + * @param configId The ID of the patterns configuration. (required) + * @return CompletableFuture<LLMObsPatternsTopicsWithClusteredPointsResponse> */ - public CompletableFuture> listLLMObsIntegrationModelsAsync( - LLMObsIntegrationName integration, String accountId) { - return listLLMObsIntegrationModelsWithHttpInfoAsync(integration, accountId) + public CompletableFuture + listLLMObsPatternsTopicsWithClusteredPointsAsync(String configId) { + return listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfoAsync( + configId, new ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -6282,11 +8404,49 @@ public CompletableFuture> listLLMObsIntegrationMode } /** - * Retrieve the list of models available for the specified LLM provider integration and account. + * List patterns topics with clustered points. * - * @param integration The name of the LLM integration. (required) - * @param accountId The ID of the integration account. (required) - * @return ApiResponse<List<LLMObsIntegrationModel>> + *

See {@link #listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfo}. + * + * @param configId The ID of the patterns configuration. (required) + * @param parameters Optional parameters for the request. + * @return LLMObsPatternsTopicsWithClusteredPointsResponse + * @throws ApiException if fails to make API call + */ + public LLMObsPatternsTopicsWithClusteredPointsResponse + listLLMObsPatternsTopicsWithClusteredPoints( + String configId, ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters parameters) + throws ApiException { + return listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfo(configId, parameters).getData(); + } + + /** + * List patterns topics with clustered points. + * + *

See {@link #listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfoAsync}. + * + * @param configId The ID of the patterns configuration. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<LLMObsPatternsTopicsWithClusteredPointsResponse> + */ + public CompletableFuture + listLLMObsPatternsTopicsWithClusteredPointsAsync( + String configId, + ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters parameters) { + return listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfoAsync(configId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List the topics discovered by a patterns run, with the clustered points attached inline to each + * leaf topic. When no run is specified, the most recent completed run is used. + * + * @param configId The ID of the patterns configuration. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<LLMObsPatternsTopicsWithClusteredPointsResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -6296,13 +8456,17 @@ public CompletableFuture> listLLMObsIntegrationMode * * * + * * + * *
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse> listLLMObsIntegrationModelsWithHttpInfo( - LLMObsIntegrationName integration, String accountId) throws ApiException { + public ApiResponse + listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfo( + String configId, ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters parameters) + throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsIntegrationModels"; + String operationId = "listLLMObsPatternsTopicsWithClusteredPoints"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -6310,33 +8474,30 @@ public ApiResponse> listLLMObsIntegrationModelsWith } Object localVarPostBody = null; - // verify the required parameter 'integration' is set - if (integration == null) { - throw new ApiException( - 400, - "Missing the required parameter 'integration' when calling listLLMObsIntegrationModels"); - } - - // verify the required parameter 'accountId' is set - if (accountId == null) { + // verify the required parameter 'configId' is set + if (configId == null) { throw new ApiException( 400, - "Missing the required parameter 'accountId' when calling listLLMObsIntegrationModels"); + "Missing the required parameter 'configId' when calling" + + " listLLMObsPatternsTopicsWithClusteredPoints"); } + String runId = parameters.runId; + Boolean includeMetrics = parameters.includeMetrics; // create path and map variables - String localVarPath = - "/api/v2/llm-obs/v1/integrations/{integration}/{account_id}/models" - .replaceAll( - "\\{" + "integration" + "\\}", apiClient.escapeString(integration.toString())) - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-topics/with-cluster-points"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "config_id", configId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "run_id", runId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_metrics", includeMetrics)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsIntegrationModels", + "v2.LlmObservabilityApi.listLLMObsPatternsTopicsWithClusteredPoints", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -6349,27 +8510,29 @@ public ApiResponse> listLLMObsIntegrationModelsWith localVarPostBody, new HashMap(), false, - new GenericType>() {}); + new GenericType() {}); } /** - * List LLM integration models. + * List patterns topics with clustered points. * - *

See {@link #listLLMObsIntegrationModelsWithHttpInfo}. + *

See {@link #listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfo}. * - * @param integration The name of the LLM integration. (required) - * @param accountId The ID of the integration account. (required) - * @return CompletableFuture<ApiResponse<List<LLMObsIntegrationModel>>> + * @param configId The ID of the patterns configuration. (required) + * @param parameters Optional parameters for the request. + * @return + * CompletableFuture<ApiResponse<LLMObsPatternsTopicsWithClusteredPointsResponse>> */ - public CompletableFuture>> - listLLMObsIntegrationModelsWithHttpInfoAsync( - LLMObsIntegrationName integration, String accountId) { + public CompletableFuture> + listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfoAsync( + String configId, + ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listLLMObsIntegrationModels"; + String operationId = "listLLMObsPatternsTopicsWithClusteredPoints"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture>> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); @@ -6377,51 +8540,42 @@ public ApiResponse> listLLMObsIntegrationModelsWith } Object localVarPostBody = null; - // verify the required parameter 'integration' is set - if (integration == null) { - CompletableFuture>> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'integration' when calling" - + " listLLMObsIntegrationModels")); - return result; - } - - // verify the required parameter 'accountId' is set - if (accountId == null) { - CompletableFuture>> result = + // verify the required parameter 'configId' is set + if (configId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'accountId' when calling" - + " listLLMObsIntegrationModels")); + "Missing the required parameter 'configId' when calling" + + " listLLMObsPatternsTopicsWithClusteredPoints")); return result; } + String runId = parameters.runId; + Boolean includeMetrics = parameters.includeMetrics; // create path and map variables - String localVarPath = - "/api/v2/llm-obs/v1/integrations/{integration}/{account_id}/models" - .replaceAll( - "\\{" + "integration" + "\\}", apiClient.escapeString(integration.toString())) - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-topics/with-cluster-points"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "config_id", configId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "run_id", runId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_metrics", includeMetrics)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsIntegrationModels", + "v2.LlmObservabilityApi.listLLMObsPatternsTopicsWithClusteredPoints", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture>> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -6434,7 +8588,7 @@ public ApiResponse> listLLMObsIntegrationModelsWith localVarPostBody, new HashMap(), false, - new GenericType>() {}); + new GenericType() {}); } /** Manage optional parameters to listLLMObsProjects. */ @@ -7887,7 +10041,163 @@ public LLMObsExperimentationSimpleSearchResponse simpleSearchLLMObsExperimentati return result; } // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/experimentation/simple-search"; + String localVarPath = "/api/v2/llm-obs/v1/experimentation/simple-search"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.simpleSearchLLMObsExperimentation", + 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() {}); + } + + /** + * Trigger a patterns run. + * + *

See {@link #triggerLLMObsPatternsWithHttpInfo}. + * + * @param body Trigger patterns payload. (required) + * @return LLMObsPatternsTriggerResponse + * @throws ApiException if fails to make API call + */ + public LLMObsPatternsTriggerResponse triggerLLMObsPatterns(LLMObsPatternsTriggerRequest body) + throws ApiException { + return triggerLLMObsPatternsWithHttpInfo(body).getData(); + } + + /** + * Trigger a patterns run. + * + *

See {@link #triggerLLMObsPatternsWithHttpInfoAsync}. + * + * @param body Trigger patterns payload. (required) + * @return CompletableFuture<LLMObsPatternsTriggerResponse> + */ + public CompletableFuture triggerLLMObsPatternsAsync( + LLMObsPatternsTriggerRequest body) { + return triggerLLMObsPatternsWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Start a patterns run for a given configuration. The run executes asynchronously. + * + * @param body Trigger patterns payload. (required) + * @return ApiResponse<LLMObsPatternsTriggerResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
202 Accepted -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
+ */ + public ApiResponse triggerLLMObsPatternsWithHttpInfo( + LLMObsPatternsTriggerRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "triggerLLMObsPatterns"; + 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 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling triggerLLMObsPatterns"); + } + // create path and map variables + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-runs"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.triggerLLMObsPatterns", + 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() {}); + } + + /** + * Trigger a patterns run. + * + *

See {@link #triggerLLMObsPatternsWithHttpInfo}. + * + * @param body Trigger patterns payload. (required) + * @return CompletableFuture<ApiResponse<LLMObsPatternsTriggerResponse>> + */ + public CompletableFuture> + triggerLLMObsPatternsWithHttpInfoAsync(LLMObsPatternsTriggerRequest body) { + // Check if unstable operation is enabled + String operationId = "triggerLLMObsPatterns"; + 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 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling triggerLLMObsPatterns")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-runs"; Map localVarHeaderParams = new HashMap(); @@ -7895,7 +10205,7 @@ public LLMObsExperimentationSimpleSearchResponse simpleSearchLLMObsExperimentati try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.simpleSearchLLMObsExperimentation", + "v2.LlmObservabilityApi.triggerLLMObsPatterns", localVarPath, new ArrayList(), localVarHeaderParams, @@ -7903,7 +10213,7 @@ public LLMObsExperimentationSimpleSearchResponse simpleSearchLLMObsExperimentati new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -7916,7 +10226,7 @@ public LLMObsExperimentationSimpleSearchResponse simpleSearchLLMObsExperimentati localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -9762,4 +12072,341 @@ public CompletableFuture> uploadLLMObsDatasetRecordsFileWithHt false, null); } + + /** + * Create or update annotations. + * + *

See {@link #upsertLLMObsAnnotationsWithHttpInfo}. + * + * @param queueId The ID of the LLM Observability annotation queue. (required) + * @param body Payload for creating or updating annotations. (required) + * @return LLMObsAnnotationsResponse + * @throws ApiException if fails to make API call + */ + public LLMObsAnnotationsResponse upsertLLMObsAnnotations( + String queueId, LLMObsAnnotationsRequest body) throws ApiException { + return upsertLLMObsAnnotationsWithHttpInfo(queueId, body).getData(); + } + + /** + * Create or update annotations. + * + *

See {@link #upsertLLMObsAnnotationsWithHttpInfoAsync}. + * + * @param queueId The ID of the LLM Observability annotation queue. (required) + * @param body Payload for creating or updating annotations. (required) + * @return CompletableFuture<LLMObsAnnotationsResponse> + */ + public CompletableFuture upsertLLMObsAnnotationsAsync( + String queueId, LLMObsAnnotationsRequest body) { + return upsertLLMObsAnnotationsWithHttpInfoAsync(queueId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create or update annotations on interactions in a queue. Each annotation is matched by + * interaction_id and the requesting user's identity. Results and errors in the response + * are linked to request items by interaction_id. Errors for individual items are + * returned in the errors field without blocking the rest of the batch. + * + * @param queueId The ID of the LLM Observability annotation queue. (required) + * @param body Payload for creating or updating annotations. (required) + * @return ApiResponse<LLMObsAnnotationsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK — annotations created or updated. Per-item errors are listed in `errors`. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found — the queue does not exist. -
429 Too many requests -
+ */ + public ApiResponse upsertLLMObsAnnotationsWithHttpInfo( + String queueId, LLMObsAnnotationsRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "upsertLLMObsAnnotations"; + 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 'queueId' is set + if (queueId == null) { + throw new ApiException( + 400, "Missing the required parameter 'queueId' when calling upsertLLMObsAnnotations"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling upsertLLMObsAnnotations"); + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotations" + .replaceAll("\\{" + "queue_id" + "\\}", apiClient.escapeString(queueId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.upsertLLMObsAnnotations", + 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 annotations. + * + *

See {@link #upsertLLMObsAnnotationsWithHttpInfo}. + * + * @param queueId The ID of the LLM Observability annotation queue. (required) + * @param body Payload for creating or updating annotations. (required) + * @return CompletableFuture<ApiResponse<LLMObsAnnotationsResponse>> + */ + public CompletableFuture> + upsertLLMObsAnnotationsWithHttpInfoAsync(String queueId, LLMObsAnnotationsRequest body) { + // Check if unstable operation is enabled + String operationId = "upsertLLMObsAnnotations"; + 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 'queueId' is set + if (queueId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'queueId' when calling upsertLLMObsAnnotations")); + 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 upsertLLMObsAnnotations")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotations" + .replaceAll("\\{" + "queue_id" + "\\}", apiClient.escapeString(queueId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.upsertLLMObsAnnotations", + 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() {}); + } + + /** + * Create or update a patterns configuration. + * + *

See {@link #upsertLLMObsPatternsConfigWithHttpInfo}. + * + * @param body Patterns configuration payload. (required) + * @return LLMObsPatternsConfigResponse + * @throws ApiException if fails to make API call + */ + public LLMObsPatternsConfigResponse upsertLLMObsPatternsConfig( + LLMObsPatternsConfigUpsertRequest body) throws ApiException { + return upsertLLMObsPatternsConfigWithHttpInfo(body).getData(); + } + + /** + * Create or update a patterns configuration. + * + *

See {@link #upsertLLMObsPatternsConfigWithHttpInfoAsync}. + * + * @param body Patterns configuration payload. (required) + * @return CompletableFuture<LLMObsPatternsConfigResponse> + */ + public CompletableFuture upsertLLMObsPatternsConfigAsync( + LLMObsPatternsConfigUpsertRequest body) { + return upsertLLMObsPatternsConfigWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create a new patterns configuration, or update an existing one when a configuration ID is + * provided. + * + * @param body Patterns configuration payload. (required) + * @return ApiResponse<LLMObsPatternsConfigResponse> + * @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 -
500 Internal Server Error -
+ */ + public ApiResponse upsertLLMObsPatternsConfigWithHttpInfo( + LLMObsPatternsConfigUpsertRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "upsertLLMObsPatternsConfig"; + 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 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling upsertLLMObsPatternsConfig"); + } + // create path and map variables + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-configs"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.upsertLLMObsPatternsConfig", + 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() {}); + } + + /** + * Create or update a patterns configuration. + * + *

See {@link #upsertLLMObsPatternsConfigWithHttpInfo}. + * + * @param body Patterns configuration payload. (required) + * @return CompletableFuture<ApiResponse<LLMObsPatternsConfigResponse>> + */ + public CompletableFuture> + upsertLLMObsPatternsConfigWithHttpInfoAsync(LLMObsPatternsConfigUpsertRequest body) { + // Check if unstable operation is enabled + String operationId = "upsertLLMObsPatternsConfig"; + 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 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling upsertLLMObsPatternsConfig")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-configs"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.upsertLLMObsPatternsConfig", + 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() {}); + } } 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 c29ba43a380..026b874d0f3 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 @@ -25,6 +25,13 @@ 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.TagIndexingRuleCreateRequest; +import com.datadog.api.client.v2.model.TagIndexingRuleExemptionCreateRequest; +import com.datadog.api.client.v2.model.TagIndexingRuleExemptionResponse; +import com.datadog.api.client.v2.model.TagIndexingRuleOrderRequest; +import com.datadog.api.client.v2.model.TagIndexingRuleResponse; +import com.datadog.api.client.v2.model.TagIndexingRuleUpdateRequest; +import com.datadog.api.client.v2.model.TagIndexingRulesResponse; import com.datadog.api.client.v2.model.TimeseriesFormulaQueryRequest; import com.datadog.api.client.v2.model.TimeseriesFormulaQueryResponse; import jakarta.ws.rs.client.Invocation; @@ -75,7 +82,9 @@ public void setApiClient(ApiClient apiClient) { * @param body (required) * @return MetricBulkTagConfigResponse * @throws ApiException if fails to make API call + * @deprecated */ + @Deprecated public MetricBulkTagConfigResponse createBulkTagsMetricsConfiguration( MetricBulkTagConfigCreateRequest body) throws ApiException { return createBulkTagsMetricsConfigurationWithHttpInfo(body).getData(); @@ -88,7 +97,9 @@ public MetricBulkTagConfigResponse createBulkTagsMetricsConfiguration( * * @param body (required) * @return CompletableFuture<MetricBulkTagConfigResponse> + * @deprecated */ + @Deprecated public CompletableFuture createBulkTagsMetricsConfigurationAsync( MetricBulkTagConfigCreateRequest body) { return createBulkTagsMetricsConfigurationWithHttpInfoAsync(body) @@ -99,7 +110,11 @@ public CompletableFuture createBulkTagsMetricsConfi } /** - * Create and define a list of queryable tag keys for a set of existing count, gauge, rate, and + * Note: This endpoint is deprecated. Use Tag Indexing Rules ( + * POST /api/v2/metrics/tag-indexing-rules) instead. + * + *

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 @@ -122,7 +137,10 @@ public CompletableFuture createBulkTagsMetricsConfi * 404 Not Found - * 429 Too Many Requests - * + * + * @deprecated */ + @Deprecated public ApiResponse createBulkTagsMetricsConfigurationWithHttpInfo( MetricBulkTagConfigCreateRequest body) throws ApiException { Object localVarPostBody = body; @@ -165,7 +183,9 @@ public ApiResponse createBulkTagsMetricsConfigurati * * @param body (required) * @return CompletableFuture<ApiResponse<MetricBulkTagConfigResponse>> + * @deprecated */ + @Deprecated public CompletableFuture> createBulkTagsMetricsConfigurationWithHttpInfoAsync(MetricBulkTagConfigCreateRequest body) { Object localVarPostBody = body; @@ -382,6 +402,309 @@ public ApiResponse createTagConfigurationWithHtt new GenericType() {}); } + /** + * Create a tag indexing rule. + * + *

See {@link #createTagIndexingRuleWithHttpInfo}. + * + * @param body (required) + * @return TagIndexingRuleResponse + * @throws ApiException if fails to make API call + */ + public TagIndexingRuleResponse createTagIndexingRule(TagIndexingRuleCreateRequest body) + throws ApiException { + return createTagIndexingRuleWithHttpInfo(body).getData(); + } + + /** + * Create a tag indexing rule. + * + *

See {@link #createTagIndexingRuleWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<TagIndexingRuleResponse> + */ + public CompletableFuture createTagIndexingRuleAsync( + TagIndexingRuleCreateRequest body) { + return createTagIndexingRuleWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create a tag indexing rule for the org. rule_order is assigned server-side as + * max+1 among existing rules; use the reorder endpoint to change the evaluation order. Requires + * the Manage Tags for Metrics permission. + * + * @param body (required) + * @return ApiResponse<TagIndexingRuleResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 Created -
400 Bad Request -
403 Forbidden -
429 Too Many Requests -
+ */ + public ApiResponse createTagIndexingRuleWithHttpInfo( + TagIndexingRuleCreateRequest 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 createTagIndexingRule"); + } + // create path and map variables + String localVarPath = "/api/v2/metrics/tag-indexing-rules"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.MetricsApi.createTagIndexingRule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create a tag indexing rule. + * + *

See {@link #createTagIndexingRuleWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<TagIndexingRuleResponse>> + */ + public CompletableFuture> + createTagIndexingRuleWithHttpInfoAsync(TagIndexingRuleCreateRequest 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 createTagIndexingRule")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/metrics/tag-indexing-rules"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.MetricsApi.createTagIndexingRule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create a tag indexing rule exemption. + * + *

See {@link #createTagIndexingRuleExemptionWithHttpInfo}. + * + * @param metricName The name of the metric. (required) + * @param body (required) + * @return TagIndexingRuleExemptionResponse + * @throws ApiException if fails to make API call + */ + public TagIndexingRuleExemptionResponse createTagIndexingRuleExemption( + String metricName, TagIndexingRuleExemptionCreateRequest body) throws ApiException { + return createTagIndexingRuleExemptionWithHttpInfo(metricName, body).getData(); + } + + /** + * Create a tag indexing rule exemption. + * + *

See {@link #createTagIndexingRuleExemptionWithHttpInfoAsync}. + * + * @param metricName The name of the metric. (required) + * @param body (required) + * @return CompletableFuture<TagIndexingRuleExemptionResponse> + */ + public CompletableFuture createTagIndexingRuleExemptionAsync( + String metricName, TagIndexingRuleExemptionCreateRequest body) { + return createTagIndexingRuleExemptionWithHttpInfoAsync(metricName, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Exempt a metric from all tag indexing rules. The response includes the created exemption + * resource. Requires the Manage Tags for Metrics permission. + * + * @param metricName The name of the metric. (required) + * @param body (required) + * @return ApiResponse<TagIndexingRuleExemptionResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 Created -
400 Bad Request -
403 Forbidden -
429 Too Many Requests -
+ */ + public ApiResponse createTagIndexingRuleExemptionWithHttpInfo( + String metricName, TagIndexingRuleExemptionCreateRequest 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" + + " createTagIndexingRuleExemption"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createTagIndexingRuleExemption"); + } + // create path and map variables + String localVarPath = + "/api/v2/metrics/{metric_name}/tag-indexing-rule-exemptions" + .replaceAll( + "\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.MetricsApi.createTagIndexingRuleExemption", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create a tag indexing rule exemption. + * + *

See {@link #createTagIndexingRuleExemptionWithHttpInfo}. + * + * @param metricName The name of the metric. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<TagIndexingRuleExemptionResponse>> + */ + public CompletableFuture> + createTagIndexingRuleExemptionWithHttpInfoAsync( + String metricName, TagIndexingRuleExemptionCreateRequest 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" + + " createTagIndexingRuleExemption")); + 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 createTagIndexingRuleExemption")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/metrics/{metric_name}/tag-indexing-rule-exemptions" + .replaceAll( + "\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.MetricsApi.createTagIndexingRuleExemption", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Delete tags for multiple metrics. * @@ -390,7 +713,9 @@ public ApiResponse createTagConfigurationWithHtt * @param body (required) * @return MetricBulkTagConfigResponse * @throws ApiException if fails to make API call + * @deprecated */ + @Deprecated public MetricBulkTagConfigResponse deleteBulkTagsMetricsConfiguration( MetricBulkTagConfigDeleteRequest body) throws ApiException { return deleteBulkTagsMetricsConfigurationWithHttpInfo(body).getData(); @@ -403,7 +728,9 @@ public MetricBulkTagConfigResponse deleteBulkTagsMetricsConfiguration( * * @param body (required) * @return CompletableFuture<MetricBulkTagConfigResponse> + * @deprecated */ + @Deprecated public CompletableFuture deleteBulkTagsMetricsConfigurationAsync( MetricBulkTagConfigDeleteRequest body) { return deleteBulkTagsMetricsConfigurationWithHttpInfoAsync(body) @@ -414,7 +741,11 @@ public CompletableFuture deleteBulkTagsMetricsConfi } /** - * Delete all custom lists of queryable tag keys for a set of existing count, gauge, rate, and + * Note: This endpoint is deprecated. Use Tag Indexing Rules ( + * POST /api/v2/metrics/tag-indexing-rules) instead. + * + *

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 @@ -433,7 +764,10 @@ public CompletableFuture deleteBulkTagsMetricsConfi * 404 Not Found - * 429 Too Many Requests - * + * + * @deprecated */ + @Deprecated public ApiResponse deleteBulkTagsMetricsConfigurationWithHttpInfo( MetricBulkTagConfigDeleteRequest body) throws ApiException { Object localVarPostBody = body; @@ -476,7 +810,9 @@ public ApiResponse deleteBulkTagsMetricsConfigurati * * @param body (required) * @return CompletableFuture<ApiResponse<MetricBulkTagConfigResponse>> + * @deprecated */ + @Deprecated public CompletableFuture> deleteBulkTagsMetricsConfigurationWithHttpInfoAsync(MetricBulkTagConfigDeleteRequest body) { Object localVarPostBody = body; @@ -663,18 +999,295 @@ public CompletableFuture> deleteTagConfigurationWithHttpInfoAs null); } - /** Manage optional parameters to estimateMetricsOutputSeries. */ - public static class EstimateMetricsOutputSeriesOptionalParameters { - private String filterGroups; - private Integer filterHoursAgo; - private Integer filterNumAggregations; - private Boolean filterPct; - private Integer filterTimespanH; + /** + * Delete a tag indexing rule. + * + *

See {@link #deleteTagIndexingRuleWithHttpInfo}. + * + * @param id ID of the tag indexing rule. (required) + * @throws ApiException if fails to make API call + */ + public void deleteTagIndexingRule(String id) throws ApiException { + deleteTagIndexingRuleWithHttpInfo(id); + } - /** - * Set filterGroups. - * - * @param filterGroups Comma-separated list of tag keys that the metric is configured to query + /** + * Delete a tag indexing rule. + * + *

See {@link #deleteTagIndexingRuleWithHttpInfoAsync}. + * + * @param id ID of the tag indexing rule. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteTagIndexingRuleAsync(String id) { + return deleteTagIndexingRuleWithHttpInfoAsync(id) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Soft-delete a tag indexing rule. Idempotent: returns 204 whether the rule existed or was + * already deleted. Remaining rules in the org are automatically re-sequenced to keep + * rule_order dense and 1-based. Requires the Manage Tags for Metrics + * permission. + * + * @param id ID of the tag indexing rule. (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
403 Forbidden -
429 Too Many Requests -
+ */ + public ApiResponse deleteTagIndexingRuleWithHttpInfo(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 deleteTagIndexingRule"); + } + // create path and map variables + String localVarPath = + "/api/v2/metrics/tag-indexing-rules/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.MetricsApi.deleteTagIndexingRule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete a tag indexing rule. + * + *

See {@link #deleteTagIndexingRuleWithHttpInfo}. + * + * @param id ID of the tag indexing rule. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteTagIndexingRuleWithHttpInfoAsync(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 deleteTagIndexingRule")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/metrics/tag-indexing-rules/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.MetricsApi.deleteTagIndexingRule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete a tag indexing rule exemption. + * + *

See {@link #deleteTagIndexingRuleExemptionWithHttpInfo}. + * + * @param metricName The name of the metric. (required) + * @throws ApiException if fails to make API call + */ + public void deleteTagIndexingRuleExemption(String metricName) throws ApiException { + deleteTagIndexingRuleExemptionWithHttpInfo(metricName); + } + + /** + * Delete a tag indexing rule exemption. + * + *

See {@link #deleteTagIndexingRuleExemptionWithHttpInfoAsync}. + * + * @param metricName The name of the metric. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteTagIndexingRuleExemptionAsync(String metricName) { + return deleteTagIndexingRuleExemptionWithHttpInfoAsync(metricName) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Remove a metric's exemption from tag indexing rules. Idempotent: returns 204 whether or not an + * exemption existed. Any associated legacy tag configuration record is also removed. Requires 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 + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
403 Forbidden -
429 Too Many Requests -
+ */ + public ApiResponse deleteTagIndexingRuleExemptionWithHttpInfo(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" + + " deleteTagIndexingRuleExemption"); + } + // create path and map variables + String localVarPath = + "/api/v2/metrics/{metric_name}/tag-indexing-rule-exemptions" + .replaceAll( + "\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.MetricsApi.deleteTagIndexingRuleExemption", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete a tag indexing rule exemption. + * + *

See {@link #deleteTagIndexingRuleExemptionWithHttpInfo}. + * + * @param metricName The name of the metric. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteTagIndexingRuleExemptionWithHttpInfoAsync( + 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" + + " deleteTagIndexingRuleExemption")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/metrics/{metric_name}/tag-indexing-rule-exemptions" + .replaceAll( + "\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.MetricsApi.deleteTagIndexingRuleExemption", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** Manage optional parameters to estimateMetricsOutputSeries. */ + public static class EstimateMetricsOutputSeriesOptionalParameters { + private String filterGroups; + private Integer filterHoursAgo; + private Integer filterNumAggregations; + private Boolean filterPct; + private Integer filterTimespanH; + + /** + * Set filterGroups. + * + * @param filterGroups Comma-separated list of tag keys that the metric is configured to query * with. For example: filter[groups]=app,host. (optional) * @return EstimateMetricsOutputSeriesOptionalParameters */ @@ -1091,32 +1704,316 @@ public ApiResponse getMetricTagCardinalityDetail 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) - * @return ListActiveMetricConfigurationsOptionalParameters - */ - public ListActiveMetricConfigurationsOptionalParameters windowSeconds(Long windowSeconds) { - this.windowSeconds = windowSeconds; - return this; - } + /** + * Get a tag indexing rule. + * + *

See {@link #getTagIndexingRuleWithHttpInfo}. + * + * @param id ID of the tag indexing rule. (required) + * @return TagIndexingRuleResponse + * @throws ApiException if fails to make API call + */ + public TagIndexingRuleResponse getTagIndexingRule(String id) throws ApiException { + return getTagIndexingRuleWithHttpInfo(id).getData(); } /** - * List active tags and aggregations. + * Get a tag indexing rule. * - *

See {@link #listActiveMetricConfigurationsWithHttpInfo}. + *

See {@link #getTagIndexingRuleWithHttpInfoAsync}. * - * @param metricName The name of the metric. (required) - * @return MetricSuggestedTagsAndAggregationsResponse - * @throws ApiException if fails to make API call + * @param id ID of the tag indexing rule. (required) + * @return CompletableFuture<TagIndexingRuleResponse> + */ + public CompletableFuture getTagIndexingRuleAsync(String id) { + return getTagIndexingRuleWithHttpInfoAsync(id) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a single tag indexing rule by its UUID. + * + * @param id ID of the tag indexing rule. (required) + * @return ApiResponse<TagIndexingRuleResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too Many Requests -
+ */ + public ApiResponse getTagIndexingRuleWithHttpInfo(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 getTagIndexingRule"); + } + // create path and map variables + String localVarPath = + "/api/v2/metrics/tag-indexing-rules/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.MetricsApi.getTagIndexingRule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get a tag indexing rule. + * + *

See {@link #getTagIndexingRuleWithHttpInfo}. + * + * @param id ID of the tag indexing rule. (required) + * @return CompletableFuture<ApiResponse<TagIndexingRuleResponse>> + */ + public CompletableFuture> + getTagIndexingRuleWithHttpInfoAsync(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 getTagIndexingRule")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/metrics/tag-indexing-rules/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.MetricsApi.getTagIndexingRule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get a tag indexing rule exemption. + * + *

See {@link #getTagIndexingRuleExemptionWithHttpInfo}. + * + * @param metricName The name of the metric. (required) + * @return TagIndexingRuleExemptionResponse + * @throws ApiException if fails to make API call + */ + public TagIndexingRuleExemptionResponse getTagIndexingRuleExemption(String metricName) + throws ApiException { + return getTagIndexingRuleExemptionWithHttpInfo(metricName).getData(); + } + + /** + * Get a tag indexing rule exemption. + * + *

See {@link #getTagIndexingRuleExemptionWithHttpInfoAsync}. + * + * @param metricName The name of the metric. (required) + * @return CompletableFuture<TagIndexingRuleExemptionResponse> + */ + public CompletableFuture getTagIndexingRuleExemptionAsync( + String metricName) { + return getTagIndexingRuleExemptionWithHttpInfoAsync(metricName) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Returns why a metric is excluded from tag indexing rules. Returns 200 with kind=exemption + * when an explicit exemption exists, 200 with kind=legacy_tag_configuration + * when the metric has a legacy tag configuration acting as an implicit exclusion, or 404 when + * neither applies. + * + * @param metricName The name of the metric. (required) + * @return ApiResponse<TagIndexingRuleExemptionResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too Many Requests -
+ */ + public ApiResponse getTagIndexingRuleExemptionWithHttpInfo( + 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 getTagIndexingRuleExemption"); + } + // create path and map variables + String localVarPath = + "/api/v2/metrics/{metric_name}/tag-indexing-rule-exemptions" + .replaceAll( + "\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.MetricsApi.getTagIndexingRuleExemption", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get a tag indexing rule exemption. + * + *

See {@link #getTagIndexingRuleExemptionWithHttpInfo}. + * + * @param metricName The name of the metric. (required) + * @return CompletableFuture<ApiResponse<TagIndexingRuleExemptionResponse>> + */ + public CompletableFuture> + getTagIndexingRuleExemptionWithHttpInfoAsync(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" + + " getTagIndexingRuleExemption")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/metrics/{metric_name}/tag-indexing-rule-exemptions" + .replaceAll( + "\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.MetricsApi.getTagIndexingRuleExemption", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to 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) + * @return ListActiveMetricConfigurationsOptionalParameters + */ + public ListActiveMetricConfigurationsOptionalParameters windowSeconds(Long windowSeconds) { + this.windowSeconds = windowSeconds; + return this; + } + } + + /** + * 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 { @@ -1973,44 +2870,390 @@ public ApiResponse listTagConfigurati Integer pageSize = parameters.pageSize; String pageCursor = parameters.pageCursor; // create path and map variables - String localVarPath = "/api/v2/metrics"; + 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[queried]", filterQueried)); + localVarQueryParams.addAll( + apiClient.parameterToPairs( + "", "filter[queried][window][seconds]", filterQueriedWindowSeconds)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[related_assets]", filterRelatedAssets)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "window[seconds]", windowSeconds)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.MetricsApi.listTagConfigurations", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listTagIndexingRules. */ + public static class ListTagIndexingRulesOptionalParameters { + private Long pageLimit; + private Long pageOffset; + private String search; + + /** + * Set pageLimit. + * + * @param pageLimit Page size (1–1000, default 100). (optional) + * @return ListTagIndexingRulesOptionalParameters + */ + public ListTagIndexingRulesOptionalParameters pageLimit(Long pageLimit) { + this.pageLimit = pageLimit; + return this; + } + + /** + * Set pageOffset. + * + * @param pageOffset Page offset from the start of the list (default 0). (optional) + * @return ListTagIndexingRulesOptionalParameters + */ + public ListTagIndexingRulesOptionalParameters pageOffset(Long pageOffset) { + this.pageOffset = pageOffset; + return this; + } + + /** + * Set search. + * + * @param search Substring filter on rule name. (optional) + * @return ListTagIndexingRulesOptionalParameters + */ + public ListTagIndexingRulesOptionalParameters search(String search) { + this.search = search; + return this; + } + } + + /** + * List tag indexing rules. + * + *

See {@link #listTagIndexingRulesWithHttpInfo}. + * + * @return TagIndexingRulesResponse + * @throws ApiException if fails to make API call + */ + public TagIndexingRulesResponse listTagIndexingRules() throws ApiException { + return listTagIndexingRulesWithHttpInfo(new ListTagIndexingRulesOptionalParameters()).getData(); + } + + /** + * List tag indexing rules. + * + *

See {@link #listTagIndexingRulesWithHttpInfoAsync}. + * + * @return CompletableFuture<TagIndexingRulesResponse> + */ + public CompletableFuture listTagIndexingRulesAsync() { + return listTagIndexingRulesWithHttpInfoAsync(new ListTagIndexingRulesOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List tag indexing rules. + * + *

See {@link #listTagIndexingRulesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return TagIndexingRulesResponse + * @throws ApiException if fails to make API call + */ + public TagIndexingRulesResponse listTagIndexingRules( + ListTagIndexingRulesOptionalParameters parameters) throws ApiException { + return listTagIndexingRulesWithHttpInfo(parameters).getData(); + } + + /** + * List tag indexing rules. + * + *

See {@link #listTagIndexingRulesWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<TagIndexingRulesResponse> + */ + public CompletableFuture listTagIndexingRulesAsync( + ListTagIndexingRulesOptionalParameters parameters) { + return listTagIndexingRulesWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List tag indexing rules for an org, sorted by rule_order, with offset/limit + * pagination. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<TagIndexingRulesResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
429 Too Many Requests -
+ */ + public ApiResponse listTagIndexingRulesWithHttpInfo( + ListTagIndexingRulesOptionalParameters parameters) throws ApiException { + Object localVarPostBody = null; + Long pageLimit = parameters.pageLimit; + Long pageOffset = parameters.pageOffset; + String search = parameters.search; + // create path and map variables + String localVarPath = "/api/v2/metrics/tag-indexing-rules"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "search", search)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.MetricsApi.listTagIndexingRules", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List tag indexing rules. + * + *

See {@link #listTagIndexingRulesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<TagIndexingRulesResponse>> + */ + public CompletableFuture> + listTagIndexingRulesWithHttpInfoAsync(ListTagIndexingRulesOptionalParameters parameters) { + Object localVarPostBody = null; + Long pageLimit = parameters.pageLimit; + Long pageOffset = parameters.pageOffset; + String search = parameters.search; + // create path and map variables + String localVarPath = "/api/v2/metrics/tag-indexing-rules"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[offset]", pageOffset)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "search", search)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.MetricsApi.listTagIndexingRules", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List tag indexing rules for a metric. + * + *

See {@link #listTagIndexingRulesForMetricWithHttpInfo}. + * + * @param metricName The name of the metric. (required) + * @return TagIndexingRulesResponse + * @throws ApiException if fails to make API call + */ + public TagIndexingRulesResponse listTagIndexingRulesForMetric(String metricName) + throws ApiException { + return listTagIndexingRulesForMetricWithHttpInfo(metricName).getData(); + } + + /** + * List tag indexing rules for a metric. + * + *

See {@link #listTagIndexingRulesForMetricWithHttpInfoAsync}. + * + * @param metricName The name of the metric. (required) + * @return CompletableFuture<TagIndexingRulesResponse> + */ + public CompletableFuture listTagIndexingRulesForMetricAsync( + String metricName) { + return listTagIndexingRulesForMetricWithHttpInfoAsync(metricName) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List the tag indexing rules that apply to a given metric, sorted by rule_order. + * Matching is performed server-side using each rule's metric_name_matches glob + * patterns. + * + * @param metricName The name of the metric. (required) + * @return ApiResponse<TagIndexingRulesResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
429 Too Many Requests -
+ */ + public ApiResponse listTagIndexingRulesForMetricWithHttpInfo( + 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 listTagIndexingRulesForMetric"); + } + // create path and map variables + String localVarPath = + "/api/v2/metrics/{metric_name}/tag-indexing-rules" + .replaceAll( + "\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.MetricsApi.listTagIndexingRulesForMetric", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List tag indexing rules for a metric. + * + *

See {@link #listTagIndexingRulesForMetricWithHttpInfo}. + * + * @param metricName The name of the metric. (required) + * @return CompletableFuture<ApiResponse<TagIndexingRulesResponse>> + */ + public CompletableFuture> + listTagIndexingRulesForMetricWithHttpInfoAsync(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" + + " listTagIndexingRulesForMetric")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/metrics/{metric_name}/tag-indexing-rules" + .replaceAll( + "\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString())); - 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[queried]", filterQueried)); - localVarQueryParams.addAll( - apiClient.parameterToPairs( - "", "filter[queried][window][seconds]", filterQueriedWindowSeconds)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[related_assets]", filterRelatedAssets)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "window[seconds]", windowSeconds)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.MetricsApi.listTagConfigurations", + "v2.MetricsApi.listTagIndexingRulesForMetric", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -2022,7 +3265,7 @@ public ApiResponse listTagConfigurati localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** Manage optional parameters to listTagsByMetricName. */ @@ -2402,10 +3645,9 @@ public CompletableFuture listVolumesByMetricNameAsync( } /** - * View hourly average metric volumes for the given metric name over the look back period. - * - *

Custom metrics generated in-app from other products will return null for - * ingested volumes. + * View hourly average cardinality for the given metric name over the look back period. For Metric + * Name Pricing customers, view total point volume for the given metric name over the look back + * period. * * @param metricName The name of the metric. (required) * @param parameters Optional parameters for the request. @@ -2797,6 +4039,139 @@ public ApiResponse queryTimeseriesDataWithHttpIn new GenericType() {}); } + /** + * Reorder tag indexing rules. + * + *

See {@link #reorderTagIndexingRulesWithHttpInfo}. + * + * @param body (required) + * @throws ApiException if fails to make API call + */ + public void reorderTagIndexingRules(TagIndexingRuleOrderRequest body) throws ApiException { + reorderTagIndexingRulesWithHttpInfo(body); + } + + /** + * Reorder tag indexing rules. + * + *

See {@link #reorderTagIndexingRulesWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture + */ + public CompletableFuture reorderTagIndexingRulesAsync(TagIndexingRuleOrderRequest body) { + return reorderTagIndexingRulesWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Atomically re-sequence the tag indexing rules for an org to match the supplied list of rule + * UUIDs. The server assigns rule_order 1, 2, … matching each rule UUID by position + * in the list. Requires the Manage Tags for Metrics permission. + * + * @param body (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too Many Requests -
+ */ + public ApiResponse reorderTagIndexingRulesWithHttpInfo(TagIndexingRuleOrderRequest 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 reorderTagIndexingRules"); + } + // create path and map variables + String localVarPath = "/api/v2/metrics/tag-indexing-rules/order"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.MetricsApi.reorderTagIndexingRules", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Reorder tag indexing rules. + * + *

See {@link #reorderTagIndexingRulesWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> reorderTagIndexingRulesWithHttpInfoAsync( + TagIndexingRuleOrderRequest 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 reorderTagIndexingRules")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/metrics/tag-indexing-rules/order"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.MetricsApi.reorderTagIndexingRules", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + null); + } + /** Manage optional parameters to submitMetrics. */ public static class SubmitMetricsOptionalParameters { private MetricContentEncoding contentEncoding; @@ -3174,4 +4549,165 @@ public ApiResponse updateTagConfigurationWithHtt false, new GenericType() {}); } + + /** + * Update a tag indexing rule. + * + *

See {@link #updateTagIndexingRuleWithHttpInfo}. + * + * @param id ID of the tag indexing rule. (required) + * @param body (required) + * @return TagIndexingRuleResponse + * @throws ApiException if fails to make API call + */ + public TagIndexingRuleResponse updateTagIndexingRule(String id, TagIndexingRuleUpdateRequest body) + throws ApiException { + return updateTagIndexingRuleWithHttpInfo(id, body).getData(); + } + + /** + * Update a tag indexing rule. + * + *

See {@link #updateTagIndexingRuleWithHttpInfoAsync}. + * + * @param id ID of the tag indexing rule. (required) + * @param body (required) + * @return CompletableFuture<TagIndexingRuleResponse> + */ + public CompletableFuture updateTagIndexingRuleAsync( + String id, TagIndexingRuleUpdateRequest body) { + return updateTagIndexingRuleWithHttpInfoAsync(id, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Partially update a tag indexing rule. Fields omitted from the request body are left unchanged. + * Setting rule_order to a value already used by another rule returns 409; use the + * reorder endpoint for atomic re-sequencing. Requires the Manage Tags for Metrics + * permission. + * + * @param id ID of the tag indexing rule. (required) + * @param body (required) + * @return ApiResponse<TagIndexingRuleResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
409 Conflict -
429 Too Many Requests -
+ */ + public ApiResponse updateTagIndexingRuleWithHttpInfo( + String id, TagIndexingRuleUpdateRequest 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 updateTagIndexingRule"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateTagIndexingRule"); + } + // create path and map variables + String localVarPath = + "/api/v2/metrics/tag-indexing-rules/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.MetricsApi.updateTagIndexingRule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update a tag indexing rule. + * + *

See {@link #updateTagIndexingRuleWithHttpInfo}. + * + * @param id ID of the tag indexing rule. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<TagIndexingRuleResponse>> + */ + public CompletableFuture> + updateTagIndexingRuleWithHttpInfoAsync(String id, TagIndexingRuleUpdateRequest 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 updateTagIndexingRule")); + 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 updateTagIndexingRule")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/metrics/tag-indexing-rules/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.MetricsApi.updateTagIndexingRule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } } diff --git a/src/main/java/com/datadog/api/client/v2/api/MicrosoftTeamsIntegrationApi.java b/src/main/java/com/datadog/api/client/v2/api/MicrosoftTeamsIntegrationApi.java index 75e5bba2ba0..fa751a946f2 100644 --- a/src/main/java/com/datadog/api/client/v2/api/MicrosoftTeamsIntegrationApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/MicrosoftTeamsIntegrationApi.java @@ -332,6 +332,142 @@ public MicrosoftTeamsWorkflowsWebhookHandleResponse createWorkflowsWebhookHandle new GenericType() {}); } + /** + * Delete user binding. + * + *

See {@link #deleteMSTeamsUserBindingWithHttpInfo}. + * + * @param tenantId Your tenant id. (required) + * @throws ApiException if fails to make API call + */ + public void deleteMSTeamsUserBinding(String tenantId) throws ApiException { + deleteMSTeamsUserBindingWithHttpInfo(tenantId); + } + + /** + * Delete user binding. + * + *

See {@link #deleteMSTeamsUserBindingWithHttpInfoAsync}. + * + * @param tenantId Your tenant id. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteMSTeamsUserBindingAsync(String tenantId) { + return deleteMSTeamsUserBindingWithHttpInfoAsync(tenantId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete the user binding for a given tenant from the Datadog Microsoft Teams integration. + * + * @param tenantId Your tenant id. (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
403 Forbidden -
412 Failed Precondition -
429 Too many requests -
+ */ + public ApiResponse deleteMSTeamsUserBindingWithHttpInfo(String tenantId) + throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'tenantId' is set + if (tenantId == null) { + throw new ApiException( + 400, "Missing the required parameter 'tenantId' when calling deleteMSTeamsUserBinding"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration/ms-teams/configuration/user-binding/{tenant_id}" + .replaceAll("\\{" + "tenant_id" + "\\}", apiClient.escapeString(tenantId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.MicrosoftTeamsIntegrationApi.deleteMSTeamsUserBinding", + 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 user binding. + * + *

See {@link #deleteMSTeamsUserBindingWithHttpInfo}. + * + * @param tenantId Your tenant id. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteMSTeamsUserBindingWithHttpInfoAsync( + String tenantId) { + Object localVarPostBody = null; + + // verify the required parameter 'tenantId' is set + if (tenantId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'tenantId' when calling deleteMSTeamsUserBinding")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration/ms-teams/configuration/user-binding/{tenant_id}" + .replaceAll("\\{" + "tenant_id" + "\\}", apiClient.escapeString(tenantId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.MicrosoftTeamsIntegrationApi.deleteMSTeamsUserBinding", + 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); + } + /** * Delete tenant-based handle. * diff --git a/src/main/java/com/datadog/api/client/v2/api/ModelLabApiApi.java b/src/main/java/com/datadog/api/client/v2/api/ModelLabApiApi.java index 2067c71e55c..7ebf8855a8b 100644 --- a/src/main/java/com/datadog/api/client/v2/api/ModelLabApiApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/ModelLabApiApi.java @@ -1177,8 +1177,8 @@ public static class ListModelLabProjectsOptionalParameters { private UUID filterOwnerId; private String filterTags; private String sort; - private Integer pageSize; - private Integer pageNumber; + private Long pageSize; + private Long pageNumber; /** * Set filter. @@ -1231,7 +1231,7 @@ public ListModelLabProjectsOptionalParameters sort(String sort) { * @param pageSize Number of items per page. Maximum is 100. (optional, default to 25) * @return ListModelLabProjectsOptionalParameters */ - public ListModelLabProjectsOptionalParameters pageSize(Integer pageSize) { + public ListModelLabProjectsOptionalParameters pageSize(Long pageSize) { this.pageSize = pageSize; return this; } @@ -1242,7 +1242,7 @@ public ListModelLabProjectsOptionalParameters pageSize(Integer pageSize) { * @param pageNumber Page number (1-indexed). (optional, default to 1) * @return ListModelLabProjectsOptionalParameters */ - public ListModelLabProjectsOptionalParameters pageNumber(Integer pageNumber) { + public ListModelLabProjectsOptionalParameters pageNumber(Long pageNumber) { this.pageNumber = pageNumber; return this; } @@ -1336,8 +1336,8 @@ public ApiResponse listModelLabProjectsWithHttpInfo( UUID filterOwnerId = parameters.filterOwnerId; String filterTags = parameters.filterTags; String sort = parameters.sort; - Integer pageSize = parameters.pageSize; - Integer pageNumber = parameters.pageNumber; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; // create path and map variables String localVarPath = "/api/v2/model-lab-api/projects"; @@ -1396,8 +1396,8 @@ public ApiResponse listModelLabProjectsWithHttpInfo( UUID filterOwnerId = parameters.filterOwnerId; String filterTags = parameters.filterTags; String sort = parameters.sort; - Integer pageSize = parameters.pageSize; - Integer pageNumber = parameters.pageNumber; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; // create path and map variables String localVarPath = "/api/v2/model-lab-api/projects"; @@ -2050,8 +2050,8 @@ public static class ListModelLabRunsOptionalParameters { private Boolean includePinned; private Boolean includeDescendantMatches; private String sort; - private Integer pageSize; - private Integer pageNumber; + private Long pageSize; + private Long pageNumber; /** * Set filterId. @@ -2199,7 +2199,7 @@ public ListModelLabRunsOptionalParameters sort(String sort) { * @param pageSize Number of items per page. Maximum is 100. (optional, default to 25) * @return ListModelLabRunsOptionalParameters */ - public ListModelLabRunsOptionalParameters pageSize(Integer pageSize) { + public ListModelLabRunsOptionalParameters pageSize(Long pageSize) { this.pageSize = pageSize; return this; } @@ -2210,7 +2210,7 @@ public ListModelLabRunsOptionalParameters pageSize(Integer pageSize) { * @param pageNumber Page number (1-indexed). (optional, default to 1) * @return ListModelLabRunsOptionalParameters */ - public ListModelLabRunsOptionalParameters pageNumber(Integer pageNumber) { + public ListModelLabRunsOptionalParameters pageNumber(Long pageNumber) { this.pageNumber = pageNumber; return this; } @@ -2312,8 +2312,8 @@ public ApiResponse listModelLabRunsWithHttpInfo( Boolean includePinned = parameters.includePinned; Boolean includeDescendantMatches = parameters.includeDescendantMatches; String sort = parameters.sort; - Integer pageSize = parameters.pageSize; - Integer pageNumber = parameters.pageNumber; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; // create path and map variables String localVarPath = "/api/v2/model-lab-api/runs"; @@ -2391,8 +2391,8 @@ public CompletableFuture> listModelLabRunsWith Boolean includePinned = parameters.includePinned; Boolean includeDescendantMatches = parameters.includeDescendantMatches; String sort = parameters.sort; - Integer pageSize = parameters.pageSize; - Integer pageNumber = parameters.pageNumber; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; // create path and map variables String localVarPath = "/api/v2/model-lab-api/runs"; diff --git a/src/main/java/com/datadog/api/client/v2/api/NetworkHealthInsightsApi.java b/src/main/java/com/datadog/api/client/v2/api/NetworkHealthInsightsApi.java new file mode 100644 index 00000000000..db84675580a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/NetworkHealthInsightsApi.java @@ -0,0 +1,264 @@ +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.NetworkHealthInsightsResponse; +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; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class NetworkHealthInsightsApi { + private ApiClient apiClient; + + public NetworkHealthInsightsApi() { + this(ApiClient.getDefaultApiClient()); + } + + public NetworkHealthInsightsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client. + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client. + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** Manage optional parameters to listNetworkHealthInsights. */ + public static class ListNetworkHealthInsightsOptionalParameters { + private String from; + private String to; + + /** + * 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) + * @return ListNetworkHealthInsightsOptionalParameters + */ + public ListNetworkHealthInsightsOptionalParameters from(String from) { + this.from = from; + return this; + } + + /** + * 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 the current time. If neither from + * nor to are provided, the query window will be [now - 15m, now] + * . (optional) + * @return ListNetworkHealthInsightsOptionalParameters + */ + public ListNetworkHealthInsightsOptionalParameters to(String to) { + this.to = to; + return this; + } + } + + /** + * List network health insights. + * + *

See {@link #listNetworkHealthInsightsWithHttpInfo}. + * + * @return NetworkHealthInsightsResponse + * @throws ApiException if fails to make API call + */ + public NetworkHealthInsightsResponse listNetworkHealthInsights() throws ApiException { + return listNetworkHealthInsightsWithHttpInfo(new ListNetworkHealthInsightsOptionalParameters()) + .getData(); + } + + /** + * List network health insights. + * + *

See {@link #listNetworkHealthInsightsWithHttpInfoAsync}. + * + * @return CompletableFuture<NetworkHealthInsightsResponse> + */ + public CompletableFuture listNetworkHealthInsightsAsync() { + return listNetworkHealthInsightsWithHttpInfoAsync( + new ListNetworkHealthInsightsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List network health insights. + * + *

See {@link #listNetworkHealthInsightsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return NetworkHealthInsightsResponse + * @throws ApiException if fails to make API call + */ + public NetworkHealthInsightsResponse listNetworkHealthInsights( + ListNetworkHealthInsightsOptionalParameters parameters) throws ApiException { + return listNetworkHealthInsightsWithHttpInfo(parameters).getData(); + } + + /** + * List network health insights. + * + *

See {@link #listNetworkHealthInsightsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<NetworkHealthInsightsResponse> + */ + public CompletableFuture listNetworkHealthInsightsAsync( + ListNetworkHealthInsightsOptionalParameters parameters) { + return listNetworkHealthInsightsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Return network health insights for the organization within the given time window. Insights are + * produced by analyzing DNS failures pre-classified by network-dns-logger, TLS + * certificate metrics, and denied security group connections. Each insight identifies the client + * and server services involved, the type of issue, and the magnitude of the failure observed + * during the query window. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<NetworkHealthInsightsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
429 Too many requests -
500 Internal Server Error -
+ */ + public ApiResponse listNetworkHealthInsightsWithHttpInfo( + ListNetworkHealthInsightsOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listNetworkHealthInsights"; + 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; + String from = parameters.from; + String to = parameters.to; + // create path and map variables + String localVarPath = "/api/v2/network-health-insights"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "from", from)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "to", to)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.NetworkHealthInsightsApi.listNetworkHealthInsights", + 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 network health insights. + * + *

See {@link #listNetworkHealthInsightsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<NetworkHealthInsightsResponse>> + */ + public CompletableFuture> + listNetworkHealthInsightsWithHttpInfoAsync( + ListNetworkHealthInsightsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listNetworkHealthInsights"; + 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; + String from = parameters.from; + String to = parameters.to; + // create path and map variables + String localVarPath = "/api/v2/network-health-insights"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "from", from)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "to", to)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.NetworkHealthInsightsApi.listNetworkHealthInsights", + 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() {}); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/api/OAuth2ClientPublicApi.java b/src/main/java/com/datadog/api/client/v2/api/OAuth2ClientPublicApi.java index 37c81a86c5c..f019dcc62e2 100644 --- a/src/main/java/com/datadog/api/client/v2/api/OAuth2ClientPublicApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/OAuth2ClientPublicApi.java @@ -4,6 +4,7 @@ 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.OAuth2WellKnownSitesResponse; import com.datadog.api.client.v2.model.OAuthClientRegistrationRequest; import com.datadog.api.client.v2.model.OAuthClientRegistrationResponse; import com.datadog.api.client.v2.model.OAuthScopesRestrictionResponse; @@ -201,6 +202,136 @@ public CompletableFuture> deleteScopesRestrictionWithHttpInfoA null); } + /** + * Get OAuth2 well-known sites. + * + *

See {@link #getOAuth2WellKnownSitesWithHttpInfo}. + * + * @return OAuth2WellKnownSitesResponse + * @throws ApiException if fails to make API call + */ + public OAuth2WellKnownSitesResponse getOAuth2WellKnownSites() throws ApiException { + return getOAuth2WellKnownSitesWithHttpInfo().getData(); + } + + /** + * Get OAuth2 well-known sites. + * + *

See {@link #getOAuth2WellKnownSitesWithHttpInfoAsync}. + * + * @return CompletableFuture<OAuth2WellKnownSitesResponse> + */ + public CompletableFuture getOAuth2WellKnownSitesAsync() { + return getOAuth2WellKnownSitesWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve the list of public OAuth2 sites available for the current environment. This endpoint + * is used for OAuth2 discovery and returns sites where users can authenticate. + * + * @return ApiResponse<OAuth2WellKnownSitesResponse> + * @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 getOAuth2WellKnownSitesWithHttpInfo() + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getOAuth2WellKnownSites"; + 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; + // create path and map variables + String localVarPath = "/api/v2/oauth2/.well-known/sites"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.OAuth2ClientPublicApi.getOAuth2WellKnownSites", + 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() {}); + } + + /** + * Get OAuth2 well-known sites. + * + *

See {@link #getOAuth2WellKnownSitesWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<OAuth2WellKnownSitesResponse>> + */ + public CompletableFuture> + getOAuth2WellKnownSitesWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "getOAuth2WellKnownSites"; + 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; + // create path and map variables + String localVarPath = "/api/v2/oauth2/.well-known/sites"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.OAuth2ClientPublicApi.getOAuth2WellKnownSites", + 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() {}); + } + /** * Get an OAuth2 client scopes restriction. * 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 5580fbb74ce..643797a8454 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 @@ -3,16 +3,25 @@ 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.GlobalOrgData; +import com.datadog.api.client.v2.model.GlobalOrgsResponse; import com.datadog.api.client.v2.model.ManagedOrgsResponse; +import com.datadog.api.client.v2.model.MaxSessionDurationUpdateRequest; import com.datadog.api.client.v2.model.OrgConfigGetResponse; import com.datadog.api.client.v2.model.OrgConfigListResponse; import com.datadog.api.client.v2.model.OrgConfigWriteRequest; +import com.datadog.api.client.v2.model.OrgSAMLPreferencesUpdateRequest; +import com.datadog.api.client.v2.model.SAMLConfigurationResponse; +import com.datadog.api.client.v2.model.SAMLConfigurationUpdateRequest; +import com.datadog.api.client.v2.model.SAMLConfigurationsResponse; import jakarta.ws.rs.client.Invocation; import jakarta.ws.rs.core.GenericType; import java.io.File; 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; @@ -189,6 +198,415 @@ public CompletableFuture> getOrgConfigWithHttp new GenericType() {}); } + /** + * Get a SAML configuration. + * + *

See {@link #getSAMLConfigurationWithHttpInfo}. + * + * @param samlConfigUuid The UUID of the SAML configuration. (required) + * @return SAMLConfigurationResponse + * @throws ApiException if fails to make API call + */ + public SAMLConfigurationResponse getSAMLConfiguration(String samlConfigUuid) throws ApiException { + return getSAMLConfigurationWithHttpInfo(samlConfigUuid).getData(); + } + + /** + * Get a SAML configuration. + * + *

See {@link #getSAMLConfigurationWithHttpInfoAsync}. + * + * @param samlConfigUuid The UUID of the SAML configuration. (required) + * @return CompletableFuture<SAMLConfigurationResponse> + */ + public CompletableFuture getSAMLConfigurationAsync( + String samlConfigUuid) { + return getSAMLConfigurationWithHttpInfoAsync(samlConfigUuid) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a single SAML configuration for the current organization by its UUID. + * + * @param samlConfigUuid The UUID of the SAML configuration. (required) + * @return ApiResponse<SAMLConfigurationResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
403 Authentication Error -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getSAMLConfigurationWithHttpInfo( + String samlConfigUuid) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'samlConfigUuid' is set + if (samlConfigUuid == null) { + throw new ApiException( + 400, "Missing the required parameter 'samlConfigUuid' when calling getSAMLConfiguration"); + } + // create path and map variables + String localVarPath = + "/api/v2/saml_configurations/{saml_config_uuid}" + .replaceAll( + "\\{" + "saml_config_uuid" + "\\}", + apiClient.escapeString(samlConfigUuid.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.OrganizationsApi.getSAMLConfiguration", + 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 SAML configuration. + * + *

See {@link #getSAMLConfigurationWithHttpInfo}. + * + * @param samlConfigUuid The UUID of the SAML configuration. (required) + * @return CompletableFuture<ApiResponse<SAMLConfigurationResponse>> + */ + public CompletableFuture> + getSAMLConfigurationWithHttpInfoAsync(String samlConfigUuid) { + Object localVarPostBody = null; + + // verify the required parameter 'samlConfigUuid' is set + if (samlConfigUuid == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'samlConfigUuid' when calling getSAMLConfiguration")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/saml_configurations/{saml_config_uuid}" + .replaceAll( + "\\{" + "saml_config_uuid" + "\\}", + apiClient.escapeString(samlConfigUuid.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.OrganizationsApi.getSAMLConfiguration", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listGlobalOrgs. */ + public static class ListGlobalOrgsOptionalParameters { + private Integer pageLimit; + private String pageCursor; + + /** + * Set pageLimit. + * + * @param pageLimit Maximum number of results returned. (optional, default to 100) + * @return ListGlobalOrgsOptionalParameters + */ + public ListGlobalOrgsOptionalParameters pageLimit(Integer pageLimit) { + this.pageLimit = pageLimit; + return this; + } + + /** + * 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.next_cursor. (optional) + * @return ListGlobalOrgsOptionalParameters + */ + public ListGlobalOrgsOptionalParameters pageCursor(String pageCursor) { + this.pageCursor = pageCursor; + return this; + } + } + + /** + * List global orgs. + * + *

See {@link #listGlobalOrgsWithHttpInfo}. + * + * @param userHandle The handle of the authenticated user. (required) + * @return GlobalOrgsResponse + * @throws ApiException if fails to make API call + */ + public GlobalOrgsResponse listGlobalOrgs(String userHandle) throws ApiException { + return listGlobalOrgsWithHttpInfo(userHandle, new ListGlobalOrgsOptionalParameters()).getData(); + } + + /** + * List global orgs. + * + *

See {@link #listGlobalOrgsWithHttpInfoAsync}. + * + * @param userHandle The handle of the authenticated user. (required) + * @return CompletableFuture<GlobalOrgsResponse> + */ + public CompletableFuture listGlobalOrgsAsync(String userHandle) { + return listGlobalOrgsWithHttpInfoAsync(userHandle, new ListGlobalOrgsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List global orgs. + * + *

See {@link #listGlobalOrgsWithHttpInfo}. + * + * @param userHandle The handle of the authenticated user. (required) + * @param parameters Optional parameters for the request. + * @return GlobalOrgsResponse + * @throws ApiException if fails to make API call + */ + public GlobalOrgsResponse listGlobalOrgs( + String userHandle, ListGlobalOrgsOptionalParameters parameters) throws ApiException { + return listGlobalOrgsWithHttpInfo(userHandle, parameters).getData(); + } + + /** + * List global orgs. + * + *

See {@link #listGlobalOrgsWithHttpInfoAsync}. + * + * @param userHandle The handle of the authenticated user. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<GlobalOrgsResponse> + */ + public CompletableFuture listGlobalOrgsAsync( + String userHandle, ListGlobalOrgsOptionalParameters parameters) { + return listGlobalOrgsWithHttpInfoAsync(userHandle, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List global orgs. + * + *

See {@link #listGlobalOrgsWithHttpInfo}. + * + * @param userHandle The handle of the authenticated user. (required) + * @return PaginationIterable<GlobalOrgData> + */ + public PaginationIterable listGlobalOrgsWithPagination(String userHandle) { + ListGlobalOrgsOptionalParameters parameters = new ListGlobalOrgsOptionalParameters(); + return listGlobalOrgsWithPagination(userHandle, parameters); + } + + /** + * List global orgs. + * + *

See {@link #listGlobalOrgsWithHttpInfo}. + * + * @param userHandle The handle of the authenticated user. (required) + * @return GlobalOrgsResponse + */ + public PaginationIterable listGlobalOrgsWithPagination( + String userHandle, ListGlobalOrgsOptionalParameters parameters) { + String resultsPath = "getData"; + String valueGetterPath = "getMeta.getPage.getNextCursor"; + String valueSetterPath = "pageCursor"; + Boolean valueSetterParamOptional = true; + Integer limit; + + if (parameters.pageLimit == null) { + limit = 100; + parameters.pageLimit(limit); + } else { + limit = parameters.pageLimit; + } + + LinkedHashMap args = new LinkedHashMap(); + args.put("userHandle", userHandle); + args.put("optionalParams", parameters); + + PaginationIterable iterator = + new PaginationIterable( + this, + "listGlobalOrgs", + resultsPath, + valueGetterPath, + valueSetterPath, + valueSetterParamOptional, + true, + true, + limit, + args, + 0); + + return iterator; + } + + /** + * Returns organizations across regions for the authenticated user. The user_handle + * query parameter must match the authenticated user's handle. + * + * @param userHandle The handle of the authenticated user. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<GlobalOrgsResponse> + * @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 -
429 Too many requests -
+ */ + public ApiResponse listGlobalOrgsWithHttpInfo( + String userHandle, ListGlobalOrgsOptionalParameters parameters) 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 listGlobalOrgs"); + } + Integer pageLimit = parameters.pageLimit; + String pageCursor = parameters.pageCursor; + // create path and map variables + String localVarPath = "/api/v2/global_orgs"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "user_handle", userHandle)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.OrganizationsApi.listGlobalOrgs", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List global orgs. + * + *

See {@link #listGlobalOrgsWithHttpInfo}. + * + * @param userHandle The handle of the authenticated user. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<GlobalOrgsResponse>> + */ + public CompletableFuture> listGlobalOrgsWithHttpInfoAsync( + String userHandle, ListGlobalOrgsOptionalParameters parameters) { + 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 listGlobalOrgs")); + return result; + } + Integer pageLimit = parameters.pageLimit; + String pageCursor = parameters.pageCursor; + // create path and map variables + String localVarPath = "/api/v2/global_orgs"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "user_handle", userHandle)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.OrganizationsApi.listGlobalOrgs", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * List Org Configs. * @@ -469,26 +887,277 @@ public CompletableFuture> listOrgsWithHttpInfoA } /** - * Update a specific Org Config. + * List SAML configurations. * - *

See {@link #updateOrgConfigWithHttpInfo}. + *

See {@link #listSAMLConfigurationsWithHttpInfo}. * - * @param orgConfigName The name of an Org Config. (required) - * @param body (required) - * @return OrgConfigGetResponse + * @return SAMLConfigurationsResponse * @throws ApiException if fails to make API call */ - public OrgConfigGetResponse updateOrgConfig(String orgConfigName, OrgConfigWriteRequest body) - throws ApiException { - return updateOrgConfigWithHttpInfo(orgConfigName, body).getData(); + public SAMLConfigurationsResponse listSAMLConfigurations() throws ApiException { + return listSAMLConfigurationsWithHttpInfo().getData(); } /** - * Update a specific Org Config. + * List SAML configurations. * - *

See {@link #updateOrgConfigWithHttpInfoAsync}. + *

See {@link #listSAMLConfigurationsWithHttpInfoAsync}. + * + * @return CompletableFuture<SAMLConfigurationsResponse> + */ + public CompletableFuture listSAMLConfigurationsAsync() { + return listSAMLConfigurationsWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the list of SAML configurations for the current organization. An organization has at most + * one SAML configuration. + * + * @return ApiResponse<SAMLConfigurationsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
403 Authentication Error -
429 Too many requests -
+ */ + public ApiResponse listSAMLConfigurationsWithHttpInfo() + throws ApiException { + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/saml_configurations"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.OrganizationsApi.listSAMLConfigurations", + 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 SAML configurations. + * + *

See {@link #listSAMLConfigurationsWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<SAMLConfigurationsResponse>> + */ + public CompletableFuture> + listSAMLConfigurationsWithHttpInfoAsync() { + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/saml_configurations"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.OrganizationsApi.listSAMLConfigurations", + 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() {}); + } + + /** + * Update the maximum session duration. + * + *

See {@link #updateLoginOrgConfigsMaxSessionDurationWithHttpInfo}. + * + * @param body (required) + * @throws ApiException if fails to make API call + */ + public void updateLoginOrgConfigsMaxSessionDuration(MaxSessionDurationUpdateRequest body) + throws ApiException { + updateLoginOrgConfigsMaxSessionDurationWithHttpInfo(body); + } + + /** + * Update the maximum session duration. + * + *

See {@link #updateLoginOrgConfigsMaxSessionDurationWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture + */ + public CompletableFuture updateLoginOrgConfigsMaxSessionDurationAsync( + MaxSessionDurationUpdateRequest body) { + return updateLoginOrgConfigsMaxSessionDurationWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update the maximum session duration for the current organization. The duration is specified in + * seconds. + * + * @param body (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse updateLoginOrgConfigsMaxSessionDurationWithHttpInfo( + MaxSessionDurationUpdateRequest 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" + + " updateLoginOrgConfigsMaxSessionDuration"); + } + // create path and map variables + String localVarPath = "/api/v2/login/org_configs/max_session_duration"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.OrganizationsApi.updateLoginOrgConfigsMaxSessionDuration", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Update the maximum session duration. + * + *

See {@link #updateLoginOrgConfigsMaxSessionDurationWithHttpInfo}. * - * @param orgConfigName The name of an Org Config. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> + updateLoginOrgConfigsMaxSessionDurationWithHttpInfoAsync( + MaxSessionDurationUpdateRequest 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" + + " updateLoginOrgConfigsMaxSessionDuration")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/login/org_configs/max_session_duration"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.OrganizationsApi.updateLoginOrgConfigsMaxSessionDuration", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Update a specific Org Config. + * + *

See {@link #updateOrgConfigWithHttpInfo}. + * + * @param orgConfigName The name of an Org Config. (required) + * @param body (required) + * @return OrgConfigGetResponse + * @throws ApiException if fails to make API call + */ + public OrgConfigGetResponse updateOrgConfig(String orgConfigName, OrgConfigWriteRequest body) + throws ApiException { + return updateOrgConfigWithHttpInfo(orgConfigName, body).getData(); + } + + /** + * Update a specific Org Config. + * + *

See {@link #updateOrgConfigWithHttpInfoAsync}. + * + * @param orgConfigName The name of an Org Config. (required) * @param body (required) * @return CompletableFuture<OrgConfigGetResponse> */ @@ -630,6 +1299,330 @@ public CompletableFuture> updateOrgConfigWithH new GenericType() {}); } + /** + * Update organization SAML preferences. + * + *

See {@link #updateOrgSamlConfigurationsWithHttpInfo}. + * + * @param body (required) + * @throws ApiException if fails to make API call + */ + public void updateOrgSamlConfigurations(OrgSAMLPreferencesUpdateRequest body) + throws ApiException { + updateOrgSamlConfigurationsWithHttpInfo(body); + } + + /** + * Update organization SAML preferences. + * + *

See {@link #updateOrgSamlConfigurationsWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture + */ + public CompletableFuture updateOrgSamlConfigurationsAsync( + OrgSAMLPreferencesUpdateRequest body) { + return updateOrgSamlConfigurationsWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update the SAML preferences for the current organization. + * + *

Use this endpoint to set the just-in-time (JIT) provisioning domains and the default role + * assigned to just-in-time provisioned users. + * + * @param body (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse updateOrgSamlConfigurationsWithHttpInfo( + OrgSAMLPreferencesUpdateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateOrgSamlConfigurations"; + 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 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateOrgSamlConfigurations"); + } + // create path and map variables + String localVarPath = "/api/v2/org/saml_configurations"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.OrganizationsApi.updateOrgSamlConfigurations", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Update organization SAML preferences. + * + *

See {@link #updateOrgSamlConfigurationsWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> updateOrgSamlConfigurationsWithHttpInfoAsync( + OrgSAMLPreferencesUpdateRequest body) { + // Check if unstable operation is enabled + String operationId = "updateOrgSamlConfigurations"; + 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 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling updateOrgSamlConfigurations")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/org/saml_configurations"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.OrganizationsApi.updateOrgSamlConfigurations", + 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( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Update a SAML configuration. + * + *

See {@link #updateSAMLConfigurationWithHttpInfo}. + * + * @param samlConfigUuid The UUID of the SAML configuration. (required) + * @param body (required) + * @return SAMLConfigurationResponse + * @throws ApiException if fails to make API call + */ + public SAMLConfigurationResponse updateSAMLConfiguration( + String samlConfigUuid, SAMLConfigurationUpdateRequest body) throws ApiException { + return updateSAMLConfigurationWithHttpInfo(samlConfigUuid, body).getData(); + } + + /** + * Update a SAML configuration. + * + *

See {@link #updateSAMLConfigurationWithHttpInfoAsync}. + * + * @param samlConfigUuid The UUID of the SAML configuration. (required) + * @param body (required) + * @return CompletableFuture<SAMLConfigurationResponse> + */ + public CompletableFuture updateSAMLConfigurationAsync( + String samlConfigUuid, SAMLConfigurationUpdateRequest body) { + return updateSAMLConfigurationWithHttpInfoAsync(samlConfigUuid, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update a single SAML configuration for the current organization. + * + *

Use this endpoint to enable or disable identity-provider-initiated login, set the + * just-in-time provisioning domains, and set the default role assigned to just-in-time + * provisioned users. A default role is required to enable just-in-time provisioning. + * + * @param samlConfigUuid The UUID of the SAML configuration. (required) + * @param body (required) + * @return ApiResponse<SAMLConfigurationResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Authentication Error -
404 Not Found -
422 Unprocessable Entity -
429 Too many requests -
+ */ + public ApiResponse updateSAMLConfigurationWithHttpInfo( + String samlConfigUuid, SAMLConfigurationUpdateRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'samlConfigUuid' is set + if (samlConfigUuid == null) { + throw new ApiException( + 400, + "Missing the required parameter 'samlConfigUuid' when calling updateSAMLConfiguration"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateSAMLConfiguration"); + } + // create path and map variables + String localVarPath = + "/api/v2/saml_configurations/{saml_config_uuid}" + .replaceAll( + "\\{" + "saml_config_uuid" + "\\}", + apiClient.escapeString(samlConfigUuid.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.OrganizationsApi.updateSAMLConfiguration", + 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 SAML configuration. + * + *

See {@link #updateSAMLConfigurationWithHttpInfo}. + * + * @param samlConfigUuid The UUID of the SAML configuration. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<SAMLConfigurationResponse>> + */ + public CompletableFuture> + updateSAMLConfigurationWithHttpInfoAsync( + String samlConfigUuid, SAMLConfigurationUpdateRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'samlConfigUuid' is set + if (samlConfigUuid == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'samlConfigUuid' when calling" + + " updateSAMLConfiguration")); + 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 updateSAMLConfiguration")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/saml_configurations/{saml_config_uuid}" + .replaceAll( + "\\{" + "saml_config_uuid" + "\\}", + apiClient.escapeString(samlConfigUuid.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.OrganizationsApi.updateSAMLConfiguration", + 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() {}); + } + /** Manage optional parameters to uploadIdPMetadata. */ public static class UploadIdPMetadataOptionalParameters { private File idpFile; diff --git a/src/main/java/com/datadog/api/client/v2/api/ReportSchedulesApi.java b/src/main/java/com/datadog/api/client/v2/api/ReportSchedulesApi.java new file mode 100644 index 00000000000..eead84622d6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/ReportSchedulesApi.java @@ -0,0 +1,381 @@ +package com.datadog.api.client.v2.api; + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.ApiResponse; +import com.datadog.api.client.Pair; +import com.datadog.api.client.v2.model.ReportScheduleCreateRequest; +import com.datadog.api.client.v2.model.ReportSchedulePatchRequest; +import com.datadog.api.client.v2.model.ReportScheduleResponse; +import jakarta.ws.rs.client.Invocation; +import jakarta.ws.rs.core.GenericType; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import java.util.concurrent.CompletableFuture; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReportSchedulesApi { + private ApiClient apiClient; + + public ReportSchedulesApi() { + this(ApiClient.getDefaultApiClient()); + } + + public ReportSchedulesApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client. + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client. + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Create a report schedule. + * + *

See {@link #createReportScheduleWithHttpInfo}. + * + * @param body (required) + * @return ReportScheduleResponse + * @throws ApiException if fails to make API call + */ + public ReportScheduleResponse createReportSchedule(ReportScheduleCreateRequest body) + throws ApiException { + return createReportScheduleWithHttpInfo(body).getData(); + } + + /** + * Create a report schedule. + * + *

See {@link #createReportScheduleWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<ReportScheduleResponse> + */ + public CompletableFuture createReportScheduleAsync( + ReportScheduleCreateRequest body) { + return createReportScheduleWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create a new scheduled report. A schedule renders a dashboard or integration dashboard on a + * recurring cadence and delivers it to the configured recipients over email, Slack, or Microsoft + * Teams. Requires the generate_dashboard_reports permission. + * + * @param body (required) + * @return ApiResponse<ReportScheduleResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 CREATED -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse createReportScheduleWithHttpInfo( + ReportScheduleCreateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "createReportSchedule"; + 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 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createReportSchedule"); + } + // create path and map variables + String localVarPath = "/api/v2/reporting/schedule"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.ReportSchedulesApi.createReportSchedule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create a report schedule. + * + *

See {@link #createReportScheduleWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<ReportScheduleResponse>> + */ + public CompletableFuture> + createReportScheduleWithHttpInfoAsync(ReportScheduleCreateRequest body) { + // Check if unstable operation is enabled + String operationId = "createReportSchedule"; + 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 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling createReportSchedule")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/reporting/schedule"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.ReportSchedulesApi.createReportSchedule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update a report schedule. + * + *

See {@link #patchReportScheduleWithHttpInfo}. + * + * @param scheduleUuid The unique identifier of the report schedule to update. (required) + * @param body (required) + * @return ReportScheduleResponse + * @throws ApiException if fails to make API call + */ + public ReportScheduleResponse patchReportSchedule( + UUID scheduleUuid, ReportSchedulePatchRequest body) throws ApiException { + return patchReportScheduleWithHttpInfo(scheduleUuid, body).getData(); + } + + /** + * Update a report schedule. + * + *

See {@link #patchReportScheduleWithHttpInfoAsync}. + * + * @param scheduleUuid The unique identifier of the report schedule to update. (required) + * @param body (required) + * @return CompletableFuture<ReportScheduleResponse> + */ + public CompletableFuture patchReportScheduleAsync( + UUID scheduleUuid, ReportSchedulePatchRequest body) { + return patchReportScheduleWithHttpInfoAsync(scheduleUuid, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update an existing scheduled report by its identifier. The editable attributes are replaced + * with the supplied values; the targeted resource (resource_id and + * resource_type) cannot be changed after creation. Requires the + * generate_dashboard_reports permission and schedule ownership. + * + * @param scheduleUuid The unique identifier of the report schedule to update. (required) + * @param body (required) + * @return ApiResponse<ReportScheduleResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse patchReportScheduleWithHttpInfo( + UUID scheduleUuid, ReportSchedulePatchRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "patchReportSchedule"; + 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 'scheduleUuid' is set + if (scheduleUuid == null) { + throw new ApiException( + 400, "Missing the required parameter 'scheduleUuid' when calling patchReportSchedule"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling patchReportSchedule"); + } + // create path and map variables + String localVarPath = + "/api/v2/reporting/schedule/{schedule_uuid}" + .replaceAll( + "\\{" + "schedule_uuid" + "\\}", apiClient.escapeString(scheduleUuid.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.ReportSchedulesApi.patchReportSchedule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update a report schedule. + * + *

See {@link #patchReportScheduleWithHttpInfo}. + * + * @param scheduleUuid The unique identifier of the report schedule to update. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<ReportScheduleResponse>> + */ + public CompletableFuture> + patchReportScheduleWithHttpInfoAsync(UUID scheduleUuid, ReportSchedulePatchRequest body) { + // Check if unstable operation is enabled + String operationId = "patchReportSchedule"; + 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 'scheduleUuid' is set + if (scheduleUuid == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'scheduleUuid' when calling patchReportSchedule")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling patchReportSchedule")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/reporting/schedule/{schedule_uuid}" + .replaceAll( + "\\{" + "schedule_uuid" + "\\}", apiClient.escapeString(scheduleUuid.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.ReportSchedulesApi.patchReportSchedule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/api/RumApi.java b/src/main/java/com/datadog/api/client/v2/api/RumApi.java index 2e4fe3265e5..a2c4a22cdc3 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 @@ -5,6 +5,7 @@ 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.ListSourcemapsResponse; import com.datadog.api.client.v2.model.RUMAggregateRequest; import com.datadog.api.client.v2.model.RUMAnalyticsAggregateResponse; import com.datadog.api.client.v2.model.RUMApplicationCreateRequest; @@ -16,6 +17,11 @@ 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 com.datadog.api.client.v2.model.ServiceRepositoryInfoRequest; +import com.datadog.api.client.v2.model.ServiceRepositoryInfoResponse; +import com.datadog.api.client.v2.model.SourcemapFileResponse; +import com.datadog.api.client.v2.model.SourcemapMapKind; +import com.datadog.api.client.v2.model.SourcemapsResponse; import jakarta.ws.rs.client.Invocation; import jakarta.ws.rs.core.GenericType; import java.time.OffsetDateTime; @@ -455,6 +461,585 @@ public CompletableFuture> deleteRUMApplicationWithHttpInfoAsyn null); } + /** Manage optional parameters to deleteSourcemaps. */ + public static class DeleteSourcemapsOptionalParameters { + private List filterService; + private List filterVersion; + private List filterVariant; + private List filterId; + private List filterBuildId; + private List filterUuid; + private List filterPlatform; + private List filterBuildNumber; + private List filterBundleName; + private List filterArch; + private List filterSymbolSource; + private List filterOrigin; + private List filterOriginVersion; + private String filterFilename; + private String filterDebugId; + private String filterGnuBuildId; + private String filterGoBuildId; + private String filterFileHash; + + /** + * Set filterService. + * + * @param filterService Filter by service names (multiple values allowed). Required for js + * , jvm, react, and flutter map kinds. + * (optional) + * @return DeleteSourcemapsOptionalParameters + */ + public DeleteSourcemapsOptionalParameters filterService(List filterService) { + this.filterService = filterService; + return this; + } + + /** + * Set filterVersion. + * + * @param filterVersion Filter by version values (multiple values allowed, maximum 10). Required + * for js, jvm, react, and flutter map + * kinds. (optional) + * @return DeleteSourcemapsOptionalParameters + */ + public DeleteSourcemapsOptionalParameters filterVersion(List filterVersion) { + this.filterVersion = filterVersion; + return this; + } + + /** + * Set filterVariant. + * + * @param filterVariant Filter by variant values (multiple values allowed). Supported for + * jvm. (optional) + * @return DeleteSourcemapsOptionalParameters + */ + public DeleteSourcemapsOptionalParameters filterVariant(List filterVariant) { + this.filterVariant = filterVariant; + return this; + } + + /** + * Set filterId. + * + * @param filterId Filter by source map ID values (multiple values allowed). Supported for all + * map kinds. (optional) + * @return DeleteSourcemapsOptionalParameters + */ + public DeleteSourcemapsOptionalParameters filterId(List filterId) { + this.filterId = filterId; + return this; + } + + /** + * Set filterBuildId. + * + * @param filterBuildId Filter by build ID values (multiple values allowed). Supported for + * jvm, ndk, and il2cpp. (optional) + * @return DeleteSourcemapsOptionalParameters + */ + public DeleteSourcemapsOptionalParameters filterBuildId(List filterBuildId) { + this.filterBuildId = filterBuildId; + return this; + } + + /** + * Set filterUuid. + * + * @param filterUuid Filter by UUID values (multiple values allowed). Supported for ios + * . (optional) + * @return DeleteSourcemapsOptionalParameters + */ + public DeleteSourcemapsOptionalParameters filterUuid(List filterUuid) { + this.filterUuid = filterUuid; + return this; + } + + /** + * Set filterPlatform. + * + * @param filterPlatform Filter by platform values (multiple values allowed). Supported for + * react. (optional) + * @return DeleteSourcemapsOptionalParameters + */ + public DeleteSourcemapsOptionalParameters filterPlatform(List filterPlatform) { + this.filterPlatform = filterPlatform; + return this; + } + + /** + * Set filterBuildNumber. + * + * @param filterBuildNumber Filter by build number values (multiple values allowed). Supported + * for react. (optional) + * @return DeleteSourcemapsOptionalParameters + */ + public DeleteSourcemapsOptionalParameters filterBuildNumber(List filterBuildNumber) { + this.filterBuildNumber = filterBuildNumber; + return this; + } + + /** + * Set filterBundleName. + * + * @param filterBundleName Filter by bundle name values (multiple values allowed). Supported for + * react. (optional) + * @return DeleteSourcemapsOptionalParameters + */ + public DeleteSourcemapsOptionalParameters filterBundleName(List filterBundleName) { + this.filterBundleName = filterBundleName; + return this; + } + + /** + * Set filterArch. + * + * @param filterArch Filter by architecture values (multiple values allowed). Supported for + * flutter, elf, and ndk. (optional) + * @return DeleteSourcemapsOptionalParameters + */ + public DeleteSourcemapsOptionalParameters filterArch(List filterArch) { + this.filterArch = filterArch; + return this; + } + + /** + * Set filterSymbolSource. + * + * @param filterSymbolSource Filter by symbol source values (multiple values allowed). Supported + * for elf. (optional) + * @return DeleteSourcemapsOptionalParameters + */ + public DeleteSourcemapsOptionalParameters filterSymbolSource(List filterSymbolSource) { + this.filterSymbolSource = filterSymbolSource; + return this; + } + + /** + * Set filterOrigin. + * + * @param filterOrigin Filter by origin values (multiple values allowed). Supported for + * elf. (optional) + * @return DeleteSourcemapsOptionalParameters + */ + public DeleteSourcemapsOptionalParameters filterOrigin(List filterOrigin) { + this.filterOrigin = filterOrigin; + return this; + } + + /** + * Set filterOriginVersion. + * + * @param filterOriginVersion Filter by origin version values (multiple values allowed). + * Supported for elf. (optional) + * @return DeleteSourcemapsOptionalParameters + */ + public DeleteSourcemapsOptionalParameters filterOriginVersion( + List filterOriginVersion) { + this.filterOriginVersion = filterOriginVersion; + return this; + } + + /** + * Set filterFilename. + * + * @param filterFilename Filter by filename (single value). Supported for js, + * elf, and ndk. (optional) + * @return DeleteSourcemapsOptionalParameters + */ + public DeleteSourcemapsOptionalParameters filterFilename(String filterFilename) { + this.filterFilename = filterFilename; + return this; + } + + /** + * Set filterDebugId. + * + * @param filterDebugId Filter by debug ID (single value). Supported for react. + * (optional) + * @return DeleteSourcemapsOptionalParameters + */ + public DeleteSourcemapsOptionalParameters filterDebugId(String filterDebugId) { + this.filterDebugId = filterDebugId; + return this; + } + + /** + * Set filterGnuBuildId. + * + * @param filterGnuBuildId Filter by GNU build ID (single value). Supported for elf + * . (optional) + * @return DeleteSourcemapsOptionalParameters + */ + public DeleteSourcemapsOptionalParameters filterGnuBuildId(String filterGnuBuildId) { + this.filterGnuBuildId = filterGnuBuildId; + return this; + } + + /** + * Set filterGoBuildId. + * + * @param filterGoBuildId Filter by Go build ID (single value). Supported for elf. + * (optional) + * @return DeleteSourcemapsOptionalParameters + */ + public DeleteSourcemapsOptionalParameters filterGoBuildId(String filterGoBuildId) { + this.filterGoBuildId = filterGoBuildId; + return this; + } + + /** + * Set filterFileHash. + * + * @param filterFileHash Filter by file hash (single value). Supported for elf. + * (optional) + * @return DeleteSourcemapsOptionalParameters + */ + public DeleteSourcemapsOptionalParameters filterFileHash(String filterFileHash) { + this.filterFileHash = filterFileHash; + return this; + } + } + + /** + * Delete source maps. + * + *

See {@link #deleteSourcemapsWithHttpInfo}. + * + * @param mapkind The type of source map. Valid values are js, jvm, + * ios, react, flutter, elf, ndk + * , il2cpp. (required) + * @param dryRun When set to true, returns the source maps that would be deleted + * without performing the actual deletion. When set to false, performs the + * deletion. (required) + * @return SourcemapsResponse + * @throws ApiException if fails to make API call + */ + public SourcemapsResponse deleteSourcemaps(SourcemapMapKind mapkind, Boolean dryRun) + throws ApiException { + return deleteSourcemapsWithHttpInfo(mapkind, dryRun, new DeleteSourcemapsOptionalParameters()) + .getData(); + } + + /** + * Delete source maps. + * + *

See {@link #deleteSourcemapsWithHttpInfoAsync}. + * + * @param mapkind The type of source map. Valid values are js, jvm, + * ios, react, flutter, elf, ndk + * , il2cpp. (required) + * @param dryRun When set to true, returns the source maps that would be deleted + * without performing the actual deletion. When set to false, performs the + * deletion. (required) + * @return CompletableFuture<SourcemapsResponse> + */ + public CompletableFuture deleteSourcemapsAsync( + SourcemapMapKind mapkind, Boolean dryRun) { + return deleteSourcemapsWithHttpInfoAsync( + mapkind, dryRun, new DeleteSourcemapsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete source maps. + * + *

See {@link #deleteSourcemapsWithHttpInfo}. + * + * @param mapkind The type of source map. Valid values are js, jvm, + * ios, react, flutter, elf, ndk + * , il2cpp. (required) + * @param dryRun When set to true, returns the source maps that would be deleted + * without performing the actual deletion. When set to false, performs the + * deletion. (required) + * @param parameters Optional parameters for the request. + * @return SourcemapsResponse + * @throws ApiException if fails to make API call + */ + public SourcemapsResponse deleteSourcemaps( + SourcemapMapKind mapkind, Boolean dryRun, DeleteSourcemapsOptionalParameters parameters) + throws ApiException { + return deleteSourcemapsWithHttpInfo(mapkind, dryRun, parameters).getData(); + } + + /** + * Delete source maps. + * + *

See {@link #deleteSourcemapsWithHttpInfoAsync}. + * + * @param mapkind The type of source map. Valid values are js, jvm, + * ios, react, flutter, elf, ndk + * , il2cpp. (required) + * @param dryRun When set to true, returns the source maps that would be deleted + * without performing the actual deletion. When set to false, performs the + * deletion. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SourcemapsResponse> + */ + public CompletableFuture deleteSourcemapsAsync( + SourcemapMapKind mapkind, Boolean dryRun, DeleteSourcemapsOptionalParameters parameters) { + return deleteSourcemapsWithHttpInfoAsync(mapkind, dryRun, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Deletes source maps matching the specified filter criteria. Supports dry-run mode to preview + * which source maps would be deleted without performing the actual deletion. + * + * @param mapkind The type of source map. Valid values are js, jvm, + * ios, react, flutter, elf, ndk + * , il2cpp. (required) + * @param dryRun When set to true, returns the source maps that would be deleted + * without performing the actual deletion. When set to false, performs the + * deletion. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<SourcemapsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
+ */ + public ApiResponse deleteSourcemapsWithHttpInfo( + SourcemapMapKind mapkind, Boolean dryRun, DeleteSourcemapsOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteSourcemaps"; + 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 'mapkind' is set + if (mapkind == null) { + throw new ApiException( + 400, "Missing the required parameter 'mapkind' when calling deleteSourcemaps"); + } + + // verify the required parameter 'dryRun' is set + if (dryRun == null) { + throw new ApiException( + 400, "Missing the required parameter 'dryRun' when calling deleteSourcemaps"); + } + List filterService = parameters.filterService; + List filterVersion = parameters.filterVersion; + List filterVariant = parameters.filterVariant; + List filterId = parameters.filterId; + List filterBuildId = parameters.filterBuildId; + List filterUuid = parameters.filterUuid; + List filterPlatform = parameters.filterPlatform; + List filterBuildNumber = parameters.filterBuildNumber; + List filterBundleName = parameters.filterBundleName; + List filterArch = parameters.filterArch; + List filterSymbolSource = parameters.filterSymbolSource; + List filterOrigin = parameters.filterOrigin; + List filterOriginVersion = parameters.filterOriginVersion; + String filterFilename = parameters.filterFilename; + String filterDebugId = parameters.filterDebugId; + String filterGnuBuildId = parameters.filterGnuBuildId; + String filterGoBuildId = parameters.filterGoBuildId; + String filterFileHash = parameters.filterFileHash; + // create path and map variables + String localVarPath = "/api/v2/sourcemaps"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "mapkind", mapkind)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "dry_run", dryRun)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[service]", filterService)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[version]", filterVersion)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[variant]", filterVariant)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "filter[id]", filterId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[build_id]", filterBuildId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "filter[uuid]", filterUuid)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[platform]", filterPlatform)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[build_number]", filterBuildNumber)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[bundle_name]", filterBundleName)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "filter[arch]", filterArch)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[symbol_source]", filterSymbolSource)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "filter[origin]", filterOrigin)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[origin_version]", filterOriginVersion)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[filename]", filterFilename)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[debug_id]", filterDebugId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[gnu_build_id]", filterGnuBuildId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[go_build_id]", filterGoBuildId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[file_hash]", filterFileHash)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumApi.deleteSourcemaps", + 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 source maps. + * + *

See {@link #deleteSourcemapsWithHttpInfo}. + * + * @param mapkind The type of source map. Valid values are js, jvm, + * ios, react, flutter, elf, ndk + * , il2cpp. (required) + * @param dryRun When set to true, returns the source maps that would be deleted + * without performing the actual deletion. When set to false, performs the + * deletion. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<SourcemapsResponse>> + */ + public CompletableFuture> deleteSourcemapsWithHttpInfoAsync( + SourcemapMapKind mapkind, Boolean dryRun, DeleteSourcemapsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "deleteSourcemaps"; + 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 'mapkind' is set + if (mapkind == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'mapkind' when calling deleteSourcemaps")); + return result; + } + + // verify the required parameter 'dryRun' is set + if (dryRun == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'dryRun' when calling deleteSourcemaps")); + return result; + } + List filterService = parameters.filterService; + List filterVersion = parameters.filterVersion; + List filterVariant = parameters.filterVariant; + List filterId = parameters.filterId; + List filterBuildId = parameters.filterBuildId; + List filterUuid = parameters.filterUuid; + List filterPlatform = parameters.filterPlatform; + List filterBuildNumber = parameters.filterBuildNumber; + List filterBundleName = parameters.filterBundleName; + List filterArch = parameters.filterArch; + List filterSymbolSource = parameters.filterSymbolSource; + List filterOrigin = parameters.filterOrigin; + List filterOriginVersion = parameters.filterOriginVersion; + String filterFilename = parameters.filterFilename; + String filterDebugId = parameters.filterDebugId; + String filterGnuBuildId = parameters.filterGnuBuildId; + String filterGoBuildId = parameters.filterGoBuildId; + String filterFileHash = parameters.filterFileHash; + // create path and map variables + String localVarPath = "/api/v2/sourcemaps"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "mapkind", mapkind)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "dry_run", dryRun)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[service]", filterService)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[version]", filterVersion)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[variant]", filterVariant)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "filter[id]", filterId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[build_id]", filterBuildId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "filter[uuid]", filterUuid)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[platform]", filterPlatform)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[build_number]", filterBuildNumber)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[bundle_name]", filterBundleName)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "filter[arch]", filterArch)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[symbol_source]", filterSymbolSource)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "filter[origin]", filterOrigin)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[origin_version]", filterOriginVersion)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[filename]", filterFilename)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[debug_id]", filterDebugId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[gnu_build_id]", filterGnuBuildId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[go_build_id]", filterGoBuildId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[file_hash]", filterFileHash)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumApi.deleteSourcemaps", + 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() {}); + } + /** * Get a RUM application. * @@ -699,13 +1284,366 @@ public ApiResponse getRUMApplicationsWithHttpInfo() thr new GenericType() {}); } - /** Manage optional parameters to listRUMEvents. */ - public static class ListRUMEventsOptionalParameters { - private String filterQuery; - private OffsetDateTime filterFrom; - private OffsetDateTime filterTo; - private RUMSort sort; - private String pageCursor; + /** + * Get service repository information. + * + *

See {@link #getServiceRepositoryInfoWithHttpInfo}. + * + * @param body (required) + * @return ServiceRepositoryInfoResponse + * @throws ApiException if fails to make API call + */ + public ServiceRepositoryInfoResponse getServiceRepositoryInfo(ServiceRepositoryInfoRequest body) + throws ApiException { + return getServiceRepositoryInfoWithHttpInfo(body).getData(); + } + + /** + * Get service repository information. + * + *

See {@link #getServiceRepositoryInfoWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<ServiceRepositoryInfoResponse> + */ + public CompletableFuture getServiceRepositoryInfoAsync( + ServiceRepositoryInfoRequest body) { + return getServiceRepositoryInfoWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Returns the repository URL and commit SHA associated with a given service and version. + * + * @param body (required) + * @return ApiResponse<ServiceRepositoryInfoResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
429 Too many requests -
500 Internal Server Error -
+ */ + public ApiResponse getServiceRepositoryInfoWithHttpInfo( + ServiceRepositoryInfoRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getServiceRepositoryInfo"; + 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 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling getServiceRepositoryInfo"); + } + // create path and map variables + String localVarPath = "/api/v2/sourcemaps/service_repository_info"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumApi.getServiceRepositoryInfo", + 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() {}); + } + + /** + * Get service repository information. + * + *

See {@link #getServiceRepositoryInfoWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<ServiceRepositoryInfoResponse>> + */ + public CompletableFuture> + getServiceRepositoryInfoWithHttpInfoAsync(ServiceRepositoryInfoRequest body) { + // Check if unstable operation is enabled + String operationId = "getServiceRepositoryInfo"; + 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 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling getServiceRepositoryInfo")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/sourcemaps/service_repository_info"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumApi.getServiceRepositoryInfo", + 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() {}); + } + + /** + * Get a JavaScript source map. + * + *

See {@link #getSourcemapsWithHttpInfo}. + * + * @param filename The path to the source map file. (required) + * @param service The service name associated with the source map. (required) + * @param version The version of the service associated with the source map. (required) + * @return SourcemapFileResponse + * @throws ApiException if fails to make API call + */ + public SourcemapFileResponse getSourcemaps(String filename, String service, String version) + throws ApiException { + return getSourcemapsWithHttpInfo(filename, service, version).getData(); + } + + /** + * Get a JavaScript source map. + * + *

See {@link #getSourcemapsWithHttpInfoAsync}. + * + * @param filename The path to the source map file. (required) + * @param service The service name associated with the source map. (required) + * @param version The version of the service associated with the source map. (required) + * @return CompletableFuture<SourcemapFileResponse> + */ + public CompletableFuture getSourcemapsAsync( + String filename, String service, String version) { + return getSourcemapsWithHttpInfoAsync(filename, service, version) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieves the content of a specific JavaScript source map file by its filename, service name, + * and version. + * + * @param filename The path to the source map file. (required) + * @param service The service name associated with the source map. (required) + * @param version The version of the service associated with the source map. (required) + * @return ApiResponse<SourcemapFileResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
+ */ + public ApiResponse getSourcemapsWithHttpInfo( + String filename, String service, String version) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getSourcemaps"; + 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 'filename' is set + if (filename == null) { + throw new ApiException( + 400, "Missing the required parameter 'filename' when calling getSourcemaps"); + } + + // verify the required parameter 'service' is set + if (service == null) { + throw new ApiException( + 400, "Missing the required parameter 'service' when calling getSourcemaps"); + } + + // verify the required parameter 'version' is set + if (version == null) { + throw new ApiException( + 400, "Missing the required parameter 'version' when calling getSourcemaps"); + } + // create path and map variables + String localVarPath = "/api/v2/sourcemaps"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filename", filename)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "service", service)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "version", version)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumApi.getSourcemaps", + 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 JavaScript source map. + * + *

See {@link #getSourcemapsWithHttpInfo}. + * + * @param filename The path to the source map file. (required) + * @param service The service name associated with the source map. (required) + * @param version The version of the service associated with the source map. (required) + * @return CompletableFuture<ApiResponse<SourcemapFileResponse>> + */ + public CompletableFuture> getSourcemapsWithHttpInfoAsync( + String filename, String service, String version) { + // Check if unstable operation is enabled + String operationId = "getSourcemaps"; + 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 'filename' is set + if (filename == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'filename' when calling getSourcemaps")); + return result; + } + + // verify the required parameter 'service' is set + if (service == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'service' when calling getSourcemaps")); + return result; + } + + // verify the required parameter 'version' is set + if (version == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'version' when calling getSourcemaps")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/sourcemaps"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filename", filename)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "service", service)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "version", version)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumApi.getSourcemaps", + 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 listRUMEvents. */ + public static class ListRUMEventsOptionalParameters { + private String filterQuery; + private OffsetDateTime filterFrom; + private OffsetDateTime filterTo; + private RUMSort sort; + private String pageCursor; private Integer pageLimit; /** @@ -1007,6 +1945,1136 @@ public CompletableFuture> listRUMEventsWithHttpIn new GenericType() {}); } + /** Manage optional parameters to listSourcemaps. */ + public static class ListSourcemapsOptionalParameters { + private SourcemapMapKind mapkind; + private Long pageSize; + private Long pageNumber; + private List filterService; + private List filterVersion; + private List filterVariant; + private List filterId; + private List filterBuildId; + private List filterUuid; + private List filterPlatform; + private List filterBuildNumber; + private List filterBundleName; + private List filterArch; + private List filterSymbolSource; + private List filterOrigin; + private List filterOriginVersion; + private String filterFilename; + private String filterDebugId; + private String filterGnuBuildId; + private String filterGoBuildId; + private String filterFileHash; + + /** + * Set mapkind. + * + * @param mapkind The type of source map. Defaults to js. (optional) + * @return ListSourcemapsOptionalParameters + */ + public ListSourcemapsOptionalParameters mapkind(SourcemapMapKind mapkind) { + this.mapkind = mapkind; + return this; + } + + /** + * Set pageSize. + * + * @param pageSize The number of results to return per page. Must be at least 1. (optional, + * default to 20) + * @return ListSourcemapsOptionalParameters + */ + public ListSourcemapsOptionalParameters pageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set pageNumber. + * + * @param pageNumber The page number to retrieve, starting from 1. (optional, default to 1) + * @return ListSourcemapsOptionalParameters + */ + public ListSourcemapsOptionalParameters pageNumber(Long pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Set filterService. + * + * @param filterService Filter by service names (multiple values allowed). Required for js + * , jvm, react, and flutter map kinds. + * (optional) + * @return ListSourcemapsOptionalParameters + */ + public ListSourcemapsOptionalParameters filterService(List filterService) { + this.filterService = filterService; + return this; + } + + /** + * Set filterVersion. + * + * @param filterVersion Filter by version values (multiple values allowed). Required for + * js, jvm, react, and flutter map kinds. + * (optional) + * @return ListSourcemapsOptionalParameters + */ + public ListSourcemapsOptionalParameters filterVersion(List filterVersion) { + this.filterVersion = filterVersion; + return this; + } + + /** + * Set filterVariant. + * + * @param filterVariant Filter by variant values (multiple values allowed). Supported for + * jvm. (optional) + * @return ListSourcemapsOptionalParameters + */ + public ListSourcemapsOptionalParameters filterVariant(List filterVariant) { + this.filterVariant = filterVariant; + return this; + } + + /** + * Set filterId. + * + * @param filterId Filter by source map ID values (multiple values allowed). Supported for all + * map kinds. (optional) + * @return ListSourcemapsOptionalParameters + */ + public ListSourcemapsOptionalParameters filterId(List filterId) { + this.filterId = filterId; + return this; + } + + /** + * Set filterBuildId. + * + * @param filterBuildId Filter by build ID values (multiple values allowed). Supported for + * jvm, ndk, and il2cpp. (optional) + * @return ListSourcemapsOptionalParameters + */ + public ListSourcemapsOptionalParameters filterBuildId(List filterBuildId) { + this.filterBuildId = filterBuildId; + return this; + } + + /** + * Set filterUuid. + * + * @param filterUuid Filter by UUID values (multiple values allowed). Supported for ios + * . (optional) + * @return ListSourcemapsOptionalParameters + */ + public ListSourcemapsOptionalParameters filterUuid(List filterUuid) { + this.filterUuid = filterUuid; + return this; + } + + /** + * Set filterPlatform. + * + * @param filterPlatform Filter by platform values (multiple values allowed). Supported for + * react. (optional) + * @return ListSourcemapsOptionalParameters + */ + public ListSourcemapsOptionalParameters filterPlatform(List filterPlatform) { + this.filterPlatform = filterPlatform; + return this; + } + + /** + * Set filterBuildNumber. + * + * @param filterBuildNumber Filter by build number values (multiple values allowed). Supported + * for react. (optional) + * @return ListSourcemapsOptionalParameters + */ + public ListSourcemapsOptionalParameters filterBuildNumber(List filterBuildNumber) { + this.filterBuildNumber = filterBuildNumber; + return this; + } + + /** + * Set filterBundleName. + * + * @param filterBundleName Filter by bundle name values (multiple values allowed). Supported for + * react. (optional) + * @return ListSourcemapsOptionalParameters + */ + public ListSourcemapsOptionalParameters filterBundleName(List filterBundleName) { + this.filterBundleName = filterBundleName; + return this; + } + + /** + * Set filterArch. + * + * @param filterArch Filter by architecture values (multiple values allowed). Supported for + * flutter, elf, and ndk. (optional) + * @return ListSourcemapsOptionalParameters + */ + public ListSourcemapsOptionalParameters filterArch(List filterArch) { + this.filterArch = filterArch; + return this; + } + + /** + * Set filterSymbolSource. + * + * @param filterSymbolSource Filter by symbol source values (multiple values allowed). Supported + * for elf. (optional) + * @return ListSourcemapsOptionalParameters + */ + public ListSourcemapsOptionalParameters filterSymbolSource(List filterSymbolSource) { + this.filterSymbolSource = filterSymbolSource; + return this; + } + + /** + * Set filterOrigin. + * + * @param filterOrigin Filter by origin values (multiple values allowed). Supported for + * elf. (optional) + * @return ListSourcemapsOptionalParameters + */ + public ListSourcemapsOptionalParameters filterOrigin(List filterOrigin) { + this.filterOrigin = filterOrigin; + return this; + } + + /** + * Set filterOriginVersion. + * + * @param filterOriginVersion Filter by origin version values (multiple values allowed). + * Supported for elf. (optional) + * @return ListSourcemapsOptionalParameters + */ + public ListSourcemapsOptionalParameters filterOriginVersion(List filterOriginVersion) { + this.filterOriginVersion = filterOriginVersion; + return this; + } + + /** + * Set filterFilename. + * + * @param filterFilename Filter by filename (single value). Supported for js, + * elf, and ndk. (optional) + * @return ListSourcemapsOptionalParameters + */ + public ListSourcemapsOptionalParameters filterFilename(String filterFilename) { + this.filterFilename = filterFilename; + return this; + } + + /** + * Set filterDebugId. + * + * @param filterDebugId Filter by debug ID (single value). Supported for react. + * (optional) + * @return ListSourcemapsOptionalParameters + */ + public ListSourcemapsOptionalParameters filterDebugId(String filterDebugId) { + this.filterDebugId = filterDebugId; + return this; + } + + /** + * Set filterGnuBuildId. + * + * @param filterGnuBuildId Filter by GNU build ID (single value). Supported for elf + * . (optional) + * @return ListSourcemapsOptionalParameters + */ + public ListSourcemapsOptionalParameters filterGnuBuildId(String filterGnuBuildId) { + this.filterGnuBuildId = filterGnuBuildId; + return this; + } + + /** + * Set filterGoBuildId. + * + * @param filterGoBuildId Filter by Go build ID (single value). Supported for elf. + * (optional) + * @return ListSourcemapsOptionalParameters + */ + public ListSourcemapsOptionalParameters filterGoBuildId(String filterGoBuildId) { + this.filterGoBuildId = filterGoBuildId; + return this; + } + + /** + * Set filterFileHash. + * + * @param filterFileHash Filter by file hash (single value). Supported for elf. + * (optional) + * @return ListSourcemapsOptionalParameters + */ + public ListSourcemapsOptionalParameters filterFileHash(String filterFileHash) { + this.filterFileHash = filterFileHash; + return this; + } + } + + /** + * List source maps. + * + *

See {@link #listSourcemapsWithHttpInfo}. + * + * @return ListSourcemapsResponse + * @throws ApiException if fails to make API call + */ + public ListSourcemapsResponse listSourcemaps() throws ApiException { + return listSourcemapsWithHttpInfo(new ListSourcemapsOptionalParameters()).getData(); + } + + /** + * List source maps. + * + *

See {@link #listSourcemapsWithHttpInfoAsync}. + * + * @return CompletableFuture<ListSourcemapsResponse> + */ + public CompletableFuture listSourcemapsAsync() { + return listSourcemapsWithHttpInfoAsync(new ListSourcemapsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List source maps. + * + *

See {@link #listSourcemapsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return ListSourcemapsResponse + * @throws ApiException if fails to make API call + */ + public ListSourcemapsResponse listSourcemaps(ListSourcemapsOptionalParameters parameters) + throws ApiException { + return listSourcemapsWithHttpInfo(parameters).getData(); + } + + /** + * List source maps. + * + *

See {@link #listSourcemapsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ListSourcemapsResponse> + */ + public CompletableFuture listSourcemapsAsync( + ListSourcemapsOptionalParameters parameters) { + return listSourcemapsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieves a paginated list of source maps matching the specified filter criteria. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<ListSourcemapsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
413 Request Entity Too Large -
429 Too many requests -
500 Internal Server Error -
+ */ + public ApiResponse listSourcemapsWithHttpInfo( + ListSourcemapsOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listSourcemaps"; + 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; + SourcemapMapKind mapkind = parameters.mapkind; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; + List filterService = parameters.filterService; + List filterVersion = parameters.filterVersion; + List filterVariant = parameters.filterVariant; + List filterId = parameters.filterId; + List filterBuildId = parameters.filterBuildId; + List filterUuid = parameters.filterUuid; + List filterPlatform = parameters.filterPlatform; + List filterBuildNumber = parameters.filterBuildNumber; + List filterBundleName = parameters.filterBundleName; + List filterArch = parameters.filterArch; + List filterSymbolSource = parameters.filterSymbolSource; + List filterOrigin = parameters.filterOrigin; + List filterOriginVersion = parameters.filterOriginVersion; + String filterFilename = parameters.filterFilename; + String filterDebugId = parameters.filterDebugId; + String filterGnuBuildId = parameters.filterGnuBuildId; + String filterGoBuildId = parameters.filterGoBuildId; + String filterFileHash = parameters.filterFileHash; + // create path and map variables + String localVarPath = "/api/v2/sourcemaps/list"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "mapkind", mapkind)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[service]", filterService)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[version]", filterVersion)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[variant]", filterVariant)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "filter[id]", filterId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[build_id]", filterBuildId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "filter[uuid]", filterUuid)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[platform]", filterPlatform)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[build_number]", filterBuildNumber)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[bundle_name]", filterBundleName)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "filter[arch]", filterArch)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[symbol_source]", filterSymbolSource)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "filter[origin]", filterOrigin)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[origin_version]", filterOriginVersion)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[filename]", filterFilename)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[debug_id]", filterDebugId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[gnu_build_id]", filterGnuBuildId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[go_build_id]", filterGoBuildId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[file_hash]", filterFileHash)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumApi.listSourcemaps", + 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 source maps. + * + *

See {@link #listSourcemapsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<ListSourcemapsResponse>> + */ + public CompletableFuture> listSourcemapsWithHttpInfoAsync( + ListSourcemapsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listSourcemaps"; + 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; + SourcemapMapKind mapkind = parameters.mapkind; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; + List filterService = parameters.filterService; + List filterVersion = parameters.filterVersion; + List filterVariant = parameters.filterVariant; + List filterId = parameters.filterId; + List filterBuildId = parameters.filterBuildId; + List filterUuid = parameters.filterUuid; + List filterPlatform = parameters.filterPlatform; + List filterBuildNumber = parameters.filterBuildNumber; + List filterBundleName = parameters.filterBundleName; + List filterArch = parameters.filterArch; + List filterSymbolSource = parameters.filterSymbolSource; + List filterOrigin = parameters.filterOrigin; + List filterOriginVersion = parameters.filterOriginVersion; + String filterFilename = parameters.filterFilename; + String filterDebugId = parameters.filterDebugId; + String filterGnuBuildId = parameters.filterGnuBuildId; + String filterGoBuildId = parameters.filterGoBuildId; + String filterFileHash = parameters.filterFileHash; + // create path and map variables + String localVarPath = "/api/v2/sourcemaps/list"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "mapkind", mapkind)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[service]", filterService)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[version]", filterVersion)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[variant]", filterVariant)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "filter[id]", filterId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[build_id]", filterBuildId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "filter[uuid]", filterUuid)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[platform]", filterPlatform)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[build_number]", filterBuildNumber)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[bundle_name]", filterBundleName)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "filter[arch]", filterArch)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[symbol_source]", filterSymbolSource)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "filter[origin]", filterOrigin)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[origin_version]", filterOriginVersion)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[filename]", filterFilename)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[debug_id]", filterDebugId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[gnu_build_id]", filterGnuBuildId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[go_build_id]", filterGoBuildId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[file_hash]", filterFileHash)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumApi.listSourcemaps", + 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 restoreSourcemaps. */ + public static class RestoreSourcemapsOptionalParameters { + private List filterService; + private List filterVersion; + private List filterVariant; + private List filterId; + private List filterBuildId; + private List filterUuid; + private List filterPlatform; + private List filterBuildNumber; + private List filterBundleName; + private List filterArch; + private List filterSymbolSource; + private List filterOrigin; + private List filterOriginVersion; + private String filterFilename; + private String filterDebugId; + private String filterGnuBuildId; + private String filterGoBuildId; + private String filterFileHash; + + /** + * Set filterService. + * + * @param filterService Filter by service names (multiple values allowed). Required for js + * , jvm, react, and flutter map kinds. + * (optional) + * @return RestoreSourcemapsOptionalParameters + */ + public RestoreSourcemapsOptionalParameters filterService(List filterService) { + this.filterService = filterService; + return this; + } + + /** + * Set filterVersion. + * + * @param filterVersion Filter by version values (multiple values allowed, maximum 10). Required + * for js, jvm, react, and flutter map + * kinds. (optional) + * @return RestoreSourcemapsOptionalParameters + */ + public RestoreSourcemapsOptionalParameters filterVersion(List filterVersion) { + this.filterVersion = filterVersion; + return this; + } + + /** + * Set filterVariant. + * + * @param filterVariant Filter by variant values (multiple values allowed). Supported for + * jvm. (optional) + * @return RestoreSourcemapsOptionalParameters + */ + public RestoreSourcemapsOptionalParameters filterVariant(List filterVariant) { + this.filterVariant = filterVariant; + return this; + } + + /** + * Set filterId. + * + * @param filterId Filter by source map ID values (multiple values allowed). Supported for all + * map kinds. (optional) + * @return RestoreSourcemapsOptionalParameters + */ + public RestoreSourcemapsOptionalParameters filterId(List filterId) { + this.filterId = filterId; + return this; + } + + /** + * Set filterBuildId. + * + * @param filterBuildId Filter by build ID values (multiple values allowed). Supported for + * jvm, ndk, and il2cpp. (optional) + * @return RestoreSourcemapsOptionalParameters + */ + public RestoreSourcemapsOptionalParameters filterBuildId(List filterBuildId) { + this.filterBuildId = filterBuildId; + return this; + } + + /** + * Set filterUuid. + * + * @param filterUuid Filter by UUID values (multiple values allowed). Supported for ios + * . (optional) + * @return RestoreSourcemapsOptionalParameters + */ + public RestoreSourcemapsOptionalParameters filterUuid(List filterUuid) { + this.filterUuid = filterUuid; + return this; + } + + /** + * Set filterPlatform. + * + * @param filterPlatform Filter by platform values (multiple values allowed). Supported for + * react. (optional) + * @return RestoreSourcemapsOptionalParameters + */ + public RestoreSourcemapsOptionalParameters filterPlatform(List filterPlatform) { + this.filterPlatform = filterPlatform; + return this; + } + + /** + * Set filterBuildNumber. + * + * @param filterBuildNumber Filter by build number values (multiple values allowed). Supported + * for react. (optional) + * @return RestoreSourcemapsOptionalParameters + */ + public RestoreSourcemapsOptionalParameters filterBuildNumber(List filterBuildNumber) { + this.filterBuildNumber = filterBuildNumber; + return this; + } + + /** + * Set filterBundleName. + * + * @param filterBundleName Filter by bundle name values (multiple values allowed). Supported for + * react. (optional) + * @return RestoreSourcemapsOptionalParameters + */ + public RestoreSourcemapsOptionalParameters filterBundleName(List filterBundleName) { + this.filterBundleName = filterBundleName; + return this; + } + + /** + * Set filterArch. + * + * @param filterArch Filter by architecture values (multiple values allowed). Supported for + * flutter, elf, and ndk. (optional) + * @return RestoreSourcemapsOptionalParameters + */ + public RestoreSourcemapsOptionalParameters filterArch(List filterArch) { + this.filterArch = filterArch; + return this; + } + + /** + * Set filterSymbolSource. + * + * @param filterSymbolSource Filter by symbol source values (multiple values allowed). Supported + * for elf. (optional) + * @return RestoreSourcemapsOptionalParameters + */ + public RestoreSourcemapsOptionalParameters filterSymbolSource(List filterSymbolSource) { + this.filterSymbolSource = filterSymbolSource; + return this; + } + + /** + * Set filterOrigin. + * + * @param filterOrigin Filter by origin values (multiple values allowed). Supported for + * elf. (optional) + * @return RestoreSourcemapsOptionalParameters + */ + public RestoreSourcemapsOptionalParameters filterOrigin(List filterOrigin) { + this.filterOrigin = filterOrigin; + return this; + } + + /** + * Set filterOriginVersion. + * + * @param filterOriginVersion Filter by origin version values (multiple values allowed). + * Supported for elf. (optional) + * @return RestoreSourcemapsOptionalParameters + */ + public RestoreSourcemapsOptionalParameters filterOriginVersion( + List filterOriginVersion) { + this.filterOriginVersion = filterOriginVersion; + return this; + } + + /** + * Set filterFilename. + * + * @param filterFilename Filter by filename (single value). Supported for js, + * elf, and ndk. (optional) + * @return RestoreSourcemapsOptionalParameters + */ + public RestoreSourcemapsOptionalParameters filterFilename(String filterFilename) { + this.filterFilename = filterFilename; + return this; + } + + /** + * Set filterDebugId. + * + * @param filterDebugId Filter by debug ID (single value). Supported for react. + * (optional) + * @return RestoreSourcemapsOptionalParameters + */ + public RestoreSourcemapsOptionalParameters filterDebugId(String filterDebugId) { + this.filterDebugId = filterDebugId; + return this; + } + + /** + * Set filterGnuBuildId. + * + * @param filterGnuBuildId Filter by GNU build ID (single value). Supported for elf + * . (optional) + * @return RestoreSourcemapsOptionalParameters + */ + public RestoreSourcemapsOptionalParameters filterGnuBuildId(String filterGnuBuildId) { + this.filterGnuBuildId = filterGnuBuildId; + return this; + } + + /** + * Set filterGoBuildId. + * + * @param filterGoBuildId Filter by Go build ID (single value). Supported for elf. + * (optional) + * @return RestoreSourcemapsOptionalParameters + */ + public RestoreSourcemapsOptionalParameters filterGoBuildId(String filterGoBuildId) { + this.filterGoBuildId = filterGoBuildId; + return this; + } + + /** + * Set filterFileHash. + * + * @param filterFileHash Filter by file hash (single value). Supported for elf. + * (optional) + * @return RestoreSourcemapsOptionalParameters + */ + public RestoreSourcemapsOptionalParameters filterFileHash(String filterFileHash) { + this.filterFileHash = filterFileHash; + return this; + } + } + + /** + * Restore source maps. + * + *

See {@link #restoreSourcemapsWithHttpInfo}. + * + * @param mapkind The type of source map. Valid values are js, jvm, + * ios, react, flutter, elf, ndk + * , il2cpp. (required) + * @param dryRun When set to true, returns the source maps that would be restored + * without performing the actual restoration. When set to false, performs the + * restoration. (required) + * @return SourcemapsResponse + * @throws ApiException if fails to make API call + */ + public SourcemapsResponse restoreSourcemaps(SourcemapMapKind mapkind, Boolean dryRun) + throws ApiException { + return restoreSourcemapsWithHttpInfo(mapkind, dryRun, new RestoreSourcemapsOptionalParameters()) + .getData(); + } + + /** + * Restore source maps. + * + *

See {@link #restoreSourcemapsWithHttpInfoAsync}. + * + * @param mapkind The type of source map. Valid values are js, jvm, + * ios, react, flutter, elf, ndk + * , il2cpp. (required) + * @param dryRun When set to true, returns the source maps that would be restored + * without performing the actual restoration. When set to false, performs the + * restoration. (required) + * @return CompletableFuture<SourcemapsResponse> + */ + public CompletableFuture restoreSourcemapsAsync( + SourcemapMapKind mapkind, Boolean dryRun) { + return restoreSourcemapsWithHttpInfoAsync( + mapkind, dryRun, new RestoreSourcemapsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Restore source maps. + * + *

See {@link #restoreSourcemapsWithHttpInfo}. + * + * @param mapkind The type of source map. Valid values are js, jvm, + * ios, react, flutter, elf, ndk + * , il2cpp. (required) + * @param dryRun When set to true, returns the source maps that would be restored + * without performing the actual restoration. When set to false, performs the + * restoration. (required) + * @param parameters Optional parameters for the request. + * @return SourcemapsResponse + * @throws ApiException if fails to make API call + */ + public SourcemapsResponse restoreSourcemaps( + SourcemapMapKind mapkind, Boolean dryRun, RestoreSourcemapsOptionalParameters parameters) + throws ApiException { + return restoreSourcemapsWithHttpInfo(mapkind, dryRun, parameters).getData(); + } + + /** + * Restore source maps. + * + *

See {@link #restoreSourcemapsWithHttpInfoAsync}. + * + * @param mapkind The type of source map. Valid values are js, jvm, + * ios, react, flutter, elf, ndk + * , il2cpp. (required) + * @param dryRun When set to true, returns the source maps that would be restored + * without performing the actual restoration. When set to false, performs the + * restoration. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SourcemapsResponse> + */ + public CompletableFuture restoreSourcemapsAsync( + SourcemapMapKind mapkind, Boolean dryRun, RestoreSourcemapsOptionalParameters parameters) { + return restoreSourcemapsWithHttpInfoAsync(mapkind, dryRun, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Restores previously deleted source maps matching the specified filter criteria. Supports + * dry-run mode to preview which source maps would be restored without performing the actual + * restoration. + * + * @param mapkind The type of source map. Valid values are js, jvm, + * ios, react, flutter, elf, ndk + * , il2cpp. (required) + * @param dryRun When set to true, returns the source maps that would be restored + * without performing the actual restoration. When set to false, performs the + * restoration. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<SourcemapsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
+ */ + public ApiResponse restoreSourcemapsWithHttpInfo( + SourcemapMapKind mapkind, Boolean dryRun, RestoreSourcemapsOptionalParameters parameters) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "restoreSourcemaps"; + 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 'mapkind' is set + if (mapkind == null) { + throw new ApiException( + 400, "Missing the required parameter 'mapkind' when calling restoreSourcemaps"); + } + + // verify the required parameter 'dryRun' is set + if (dryRun == null) { + throw new ApiException( + 400, "Missing the required parameter 'dryRun' when calling restoreSourcemaps"); + } + List filterService = parameters.filterService; + List filterVersion = parameters.filterVersion; + List filterVariant = parameters.filterVariant; + List filterId = parameters.filterId; + List filterBuildId = parameters.filterBuildId; + List filterUuid = parameters.filterUuid; + List filterPlatform = parameters.filterPlatform; + List filterBuildNumber = parameters.filterBuildNumber; + List filterBundleName = parameters.filterBundleName; + List filterArch = parameters.filterArch; + List filterSymbolSource = parameters.filterSymbolSource; + List filterOrigin = parameters.filterOrigin; + List filterOriginVersion = parameters.filterOriginVersion; + String filterFilename = parameters.filterFilename; + String filterDebugId = parameters.filterDebugId; + String filterGnuBuildId = parameters.filterGnuBuildId; + String filterGoBuildId = parameters.filterGoBuildId; + String filterFileHash = parameters.filterFileHash; + // create path and map variables + String localVarPath = "/api/v2/sourcemaps/restore"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "mapkind", mapkind)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "dry_run", dryRun)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[service]", filterService)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[version]", filterVersion)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[variant]", filterVariant)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "filter[id]", filterId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[build_id]", filterBuildId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "filter[uuid]", filterUuid)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[platform]", filterPlatform)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[build_number]", filterBuildNumber)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[bundle_name]", filterBundleName)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "filter[arch]", filterArch)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[symbol_source]", filterSymbolSource)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "filter[origin]", filterOrigin)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[origin_version]", filterOriginVersion)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[filename]", filterFilename)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[debug_id]", filterDebugId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[gnu_build_id]", filterGnuBuildId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[go_build_id]", filterGoBuildId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[file_hash]", filterFileHash)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumApi.restoreSourcemaps", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Restore source maps. + * + *

See {@link #restoreSourcemapsWithHttpInfo}. + * + * @param mapkind The type of source map. Valid values are js, jvm, + * ios, react, flutter, elf, ndk + * , il2cpp. (required) + * @param dryRun When set to true, returns the source maps that would be restored + * without performing the actual restoration. When set to false, performs the + * restoration. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<SourcemapsResponse>> + */ + public CompletableFuture> restoreSourcemapsWithHttpInfoAsync( + SourcemapMapKind mapkind, Boolean dryRun, RestoreSourcemapsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "restoreSourcemaps"; + 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 'mapkind' is set + if (mapkind == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'mapkind' when calling restoreSourcemaps")); + return result; + } + + // verify the required parameter 'dryRun' is set + if (dryRun == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'dryRun' when calling restoreSourcemaps")); + return result; + } + List filterService = parameters.filterService; + List filterVersion = parameters.filterVersion; + List filterVariant = parameters.filterVariant; + List filterId = parameters.filterId; + List filterBuildId = parameters.filterBuildId; + List filterUuid = parameters.filterUuid; + List filterPlatform = parameters.filterPlatform; + List filterBuildNumber = parameters.filterBuildNumber; + List filterBundleName = parameters.filterBundleName; + List filterArch = parameters.filterArch; + List filterSymbolSource = parameters.filterSymbolSource; + List filterOrigin = parameters.filterOrigin; + List filterOriginVersion = parameters.filterOriginVersion; + String filterFilename = parameters.filterFilename; + String filterDebugId = parameters.filterDebugId; + String filterGnuBuildId = parameters.filterGnuBuildId; + String filterGoBuildId = parameters.filterGoBuildId; + String filterFileHash = parameters.filterFileHash; + // create path and map variables + String localVarPath = "/api/v2/sourcemaps/restore"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "mapkind", mapkind)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "dry_run", dryRun)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[service]", filterService)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[version]", filterVersion)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[variant]", filterVariant)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "filter[id]", filterId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[build_id]", filterBuildId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "filter[uuid]", filterUuid)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[platform]", filterPlatform)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[build_number]", filterBuildNumber)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[bundle_name]", filterBundleName)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "filter[arch]", filterArch)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[symbol_source]", filterSymbolSource)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "filter[origin]", filterOrigin)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("multi", "filter[origin_version]", filterOriginVersion)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[filename]", filterFilename)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[debug_id]", filterDebugId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[gnu_build_id]", filterGnuBuildId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[go_build_id]", filterGoBuildId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[file_hash]", filterFileHash)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumApi.restoreSourcemaps", + 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[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Search RUM events. * diff --git a/src/main/java/com/datadog/api/client/v2/api/RumMetricsApi.java b/src/main/java/com/datadog/api/client/v2/api/RumMetricsApi.java index 62fef809e09..522edfa3e1f 100644 --- a/src/main/java/com/datadog/api/client/v2/api/RumMetricsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/RumMetricsApi.java @@ -47,11 +47,11 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create a rum-based metric. + * Create a RUM-based metric. * *

See {@link #createRumMetricWithHttpInfo}. * - * @param body The definition of the new rum-based metric. (required) + * @param body The definition of the new RUM-based metric. (required) * @return RumMetricResponse * @throws ApiException if fails to make API call */ @@ -60,11 +60,11 @@ public RumMetricResponse createRumMetric(RumMetricCreateRequest body) throws Api } /** - * Create a rum-based metric. + * Create a RUM-based metric. * *

See {@link #createRumMetricWithHttpInfoAsync}. * - * @param body The definition of the new rum-based metric. (required) + * @param body The definition of the new RUM-based metric. (required) * @return CompletableFuture<RumMetricResponse> */ public CompletableFuture createRumMetricAsync(RumMetricCreateRequest body) { @@ -76,10 +76,10 @@ public CompletableFuture createRumMetricAsync(RumMetricCreate } /** - * Create a metric based on your organization's RUM data. Returns the rum-based metric object from + * Create a metric based on your organization's RUM data. Returns the RUM-based metric object from * the request body when the request is successful. * - * @param body The definition of the new rum-based metric. (required) + * @param body The definition of the new RUM-based metric. (required) * @return ApiResponse<RumMetricResponse> * @throws ApiException if fails to make API call * @http.response.details @@ -128,11 +128,11 @@ public ApiResponse createRumMetricWithHttpInfo(RumMetricCreat } /** - * Create a rum-based metric. + * Create a RUM-based metric. * *

See {@link #createRumMetricWithHttpInfo}. * - * @param body The definition of the new rum-based metric. (required) + * @param body The definition of the new RUM-based metric. (required) * @return CompletableFuture<ApiResponse<RumMetricResponse>> */ public CompletableFuture> createRumMetricWithHttpInfoAsync( @@ -180,11 +180,11 @@ public CompletableFuture> createRumMetricWithHttp } /** - * Delete a rum-based metric. + * Delete a RUM-based metric. * *

See {@link #deleteRumMetricWithHttpInfo}. * - * @param metricId The name of the rum-based metric. (required) + * @param metricId The name of the RUM-based metric. (required) * @throws ApiException if fails to make API call */ public void deleteRumMetric(String metricId) throws ApiException { @@ -192,11 +192,11 @@ public void deleteRumMetric(String metricId) throws ApiException { } /** - * Delete a rum-based metric. + * Delete a RUM-based metric. * *

See {@link #deleteRumMetricWithHttpInfoAsync}. * - * @param metricId The name of the rum-based metric. (required) + * @param metricId The name of the RUM-based metric. (required) * @return CompletableFuture */ public CompletableFuture deleteRumMetricAsync(String metricId) { @@ -208,9 +208,9 @@ public CompletableFuture deleteRumMetricAsync(String metricId) { } /** - * Delete a specific rum-based metric from your organization. + * Delete a specific RUM-based metric from your organization. * - * @param metricId The name of the rum-based metric. (required) + * @param metricId The name of the RUM-based metric. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details @@ -259,11 +259,11 @@ public ApiResponse deleteRumMetricWithHttpInfo(String metricId) throws Api } /** - * Delete a rum-based metric. + * Delete a RUM-based metric. * *

See {@link #deleteRumMetricWithHttpInfo}. * - * @param metricId The name of the rum-based metric. (required) + * @param metricId The name of the RUM-based metric. (required) * @return CompletableFuture<ApiResponse<Void>> */ public CompletableFuture> deleteRumMetricWithHttpInfoAsync(String metricId) { @@ -312,11 +312,11 @@ public CompletableFuture> deleteRumMetricWithHttpInfoAsync(Str } /** - * Get a rum-based metric. + * Get a RUM-based metric. * *

See {@link #getRumMetricWithHttpInfo}. * - * @param metricId The name of the rum-based metric. (required) + * @param metricId The name of the RUM-based metric. (required) * @return RumMetricResponse * @throws ApiException if fails to make API call */ @@ -325,11 +325,11 @@ public RumMetricResponse getRumMetric(String metricId) throws ApiException { } /** - * Get a rum-based metric. + * Get a RUM-based metric. * *

See {@link #getRumMetricWithHttpInfoAsync}. * - * @param metricId The name of the rum-based metric. (required) + * @param metricId The name of the RUM-based metric. (required) * @return CompletableFuture<RumMetricResponse> */ public CompletableFuture getRumMetricAsync(String metricId) { @@ -341,9 +341,9 @@ public CompletableFuture getRumMetricAsync(String metricId) { } /** - * Get a specific rum-based metric from your organization. + * Get a specific RUM-based metric from your organization. * - * @param metricId The name of the rum-based metric. (required) + * @param metricId The name of the RUM-based metric. (required) * @return ApiResponse<RumMetricResponse> * @throws ApiException if fails to make API call * @http.response.details @@ -393,11 +393,11 @@ public ApiResponse getRumMetricWithHttpInfo(String metricId) } /** - * Get a rum-based metric. + * Get a RUM-based metric. * *

See {@link #getRumMetricWithHttpInfo}. * - * @param metricId The name of the rum-based metric. (required) + * @param metricId The name of the RUM-based metric. (required) * @return CompletableFuture<ApiResponse<RumMetricResponse>> */ public CompletableFuture> getRumMetricWithHttpInfoAsync( @@ -447,7 +447,7 @@ public CompletableFuture> getRumMetricWithHttpInf } /** - * Get all rum-based metrics. + * Get all RUM-based metrics. * *

See {@link #listRumMetricsWithHttpInfo}. * @@ -459,7 +459,7 @@ public RumMetricsResponse listRumMetrics() throws ApiException { } /** - * Get all rum-based metrics. + * Get all RUM-based metrics. * *

See {@link #listRumMetricsWithHttpInfoAsync}. * @@ -474,7 +474,7 @@ public CompletableFuture listRumMetricsAsync() { } /** - * Get the list of configured rum-based metrics with their definitions. + * Get the list of configured RUM-based metrics with their definitions. * * @return ApiResponse<RumMetricsResponse> * @throws ApiException if fails to make API call @@ -515,7 +515,7 @@ public ApiResponse listRumMetricsWithHttpInfo() throws ApiEx } /** - * Get all rum-based metrics. + * Get all RUM-based metrics. * *

See {@link #listRumMetricsWithHttpInfo}. * @@ -556,12 +556,12 @@ public CompletableFuture> listRumMetricsWithHttp } /** - * Update a rum-based metric. + * Update a RUM-based metric. * *

See {@link #updateRumMetricWithHttpInfo}. * - * @param metricId The name of the rum-based metric. (required) - * @param body New definition of the rum-based metric. (required) + * @param metricId The name of the RUM-based metric. (required) + * @param body New definition of the RUM-based metric. (required) * @return RumMetricResponse * @throws ApiException if fails to make API call */ @@ -571,12 +571,12 @@ public RumMetricResponse updateRumMetric(String metricId, RumMetricUpdateRequest } /** - * Update a rum-based metric. + * Update a RUM-based metric. * *

See {@link #updateRumMetricWithHttpInfoAsync}. * - * @param metricId The name of the rum-based metric. (required) - * @param body New definition of the rum-based metric. (required) + * @param metricId The name of the RUM-based metric. (required) + * @param body New definition of the RUM-based metric. (required) * @return CompletableFuture<RumMetricResponse> */ public CompletableFuture updateRumMetricAsync( @@ -589,11 +589,11 @@ public CompletableFuture updateRumMetricAsync( } /** - * Update a specific rum-based metric from your organization. Returns the rum-based metric object + * Update a specific RUM-based metric from your organization. Returns the RUM-based metric object * from the request body when the request is successful. * - * @param metricId The name of the rum-based metric. (required) - * @param body New definition of the rum-based metric. (required) + * @param metricId The name of the RUM-based metric. (required) + * @param body New definition of the RUM-based metric. (required) * @return ApiResponse<RumMetricResponse> * @throws ApiException if fails to make API call * @http.response.details @@ -651,12 +651,12 @@ public ApiResponse updateRumMetricWithHttpInfo( } /** - * Update a rum-based metric. + * Update a RUM-based metric. * *

See {@link #updateRumMetricWithHttpInfo}. * - * @param metricId The name of the rum-based metric. (required) - * @param body New definition of the rum-based metric. (required) + * @param metricId The name of the RUM-based metric. (required) + * @param body New definition of the RUM-based metric. (required) * @return CompletableFuture<ApiResponse<RumMetricResponse>> */ public CompletableFuture> updateRumMetricWithHttpInfoAsync( diff --git a/src/main/java/com/datadog/api/client/v2/api/RumRateLimitApi.java b/src/main/java/com/datadog/api/client/v2/api/RumRateLimitApi.java new file mode 100644 index 00000000000..21ff8b3cedd --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/RumRateLimitApi.java @@ -0,0 +1,620 @@ +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.RumRateLimitConfigResponse; +import com.datadog.api.client.v2.model.RumRateLimitConfigUpdateRequest; +import com.datadog.api.client.v2.model.RumRateLimitScopeType; +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") +public class RumRateLimitApi { + private ApiClient apiClient; + + public RumRateLimitApi() { + this(ApiClient.getDefaultApiClient()); + } + + public RumRateLimitApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client. + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client. + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Delete a RUM rate limit configuration. + * + *

See {@link #deleteRumRateLimitConfigWithHttpInfo}. + * + * @param scopeType The type of scope the rate limit configuration applies to. (required, default + * to "application") + * @param scopeId The identifier of the scope the rate limit configuration applies to. For the + * application scope, this is the RUM application ID. (required) + * @throws ApiException if fails to make API call + */ + public void deleteRumRateLimitConfig(RumRateLimitScopeType scopeType, String scopeId) + throws ApiException { + deleteRumRateLimitConfigWithHttpInfo(scopeType, scopeId); + } + + /** + * Delete a RUM rate limit configuration. + * + *

See {@link #deleteRumRateLimitConfigWithHttpInfoAsync}. + * + * @param scopeType The type of scope the rate limit configuration applies to. (required, default + * to "application") + * @param scopeId The identifier of the scope the rate limit configuration applies to. For the + * application scope, this is the RUM application ID. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteRumRateLimitConfigAsync( + RumRateLimitScopeType scopeType, String scopeId) { + return deleteRumRateLimitConfigWithHttpInfoAsync(scopeType, scopeId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete the RUM rate limit configuration for a given scope. + * + * @param scopeType The type of scope the rate limit configuration applies to. (required) + * @param scopeId The identifier of the scope the rate limit configuration applies to. For the + * application scope, this is the RUM application ID. (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
403 Not Authorized -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse deleteRumRateLimitConfigWithHttpInfo( + RumRateLimitScopeType scopeType, String scopeId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteRumRateLimitConfig"; + 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 'scopeType' is set + if (scopeType == null) { + throw new ApiException( + 400, "Missing the required parameter 'scopeType' when calling deleteRumRateLimitConfig"); + } + + // verify the required parameter 'scopeId' is set + if (scopeId == null) { + throw new ApiException( + 400, "Missing the required parameter 'scopeId' when calling deleteRumRateLimitConfig"); + } + // create path and map variables + String localVarPath = + "/api/v2/rum/config/rate-limit/{scope_type}/{scope_id}" + .replaceAll("\\{" + "scope_type" + "\\}", apiClient.escapeString(scopeType.toString())) + .replaceAll("\\{" + "scope_id" + "\\}", apiClient.escapeString(scopeId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumRateLimitApi.deleteRumRateLimitConfig", + 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 rate limit configuration. + * + *

See {@link #deleteRumRateLimitConfigWithHttpInfo}. + * + * @param scopeType The type of scope the rate limit configuration applies to. (required) + * @param scopeId The identifier of the scope the rate limit configuration applies to. For the + * application scope, this is the RUM application ID. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteRumRateLimitConfigWithHttpInfoAsync( + RumRateLimitScopeType scopeType, String scopeId) { + // Check if unstable operation is enabled + String operationId = "deleteRumRateLimitConfig"; + 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 'scopeType' is set + if (scopeType == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'scopeType' when calling deleteRumRateLimitConfig")); + return result; + } + + // verify the required parameter 'scopeId' is set + if (scopeId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'scopeId' when calling deleteRumRateLimitConfig")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/rum/config/rate-limit/{scope_type}/{scope_id}" + .replaceAll("\\{" + "scope_type" + "\\}", apiClient.escapeString(scopeType.toString())) + .replaceAll("\\{" + "scope_id" + "\\}", apiClient.escapeString(scopeId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumRateLimitApi.deleteRumRateLimitConfig", + 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); + } + + /** + * Get a RUM rate limit configuration. + * + *

See {@link #getRumRateLimitConfigWithHttpInfo}. + * + * @param scopeType The type of scope the rate limit configuration applies to. (required, default + * to "application") + * @param scopeId The identifier of the scope the rate limit configuration applies to. For the + * application scope, this is the RUM application ID. (required) + * @return RumRateLimitConfigResponse + * @throws ApiException if fails to make API call + */ + public RumRateLimitConfigResponse getRumRateLimitConfig( + RumRateLimitScopeType scopeType, String scopeId) throws ApiException { + return getRumRateLimitConfigWithHttpInfo(scopeType, scopeId).getData(); + } + + /** + * Get a RUM rate limit configuration. + * + *

See {@link #getRumRateLimitConfigWithHttpInfoAsync}. + * + * @param scopeType The type of scope the rate limit configuration applies to. (required, default + * to "application") + * @param scopeId The identifier of the scope the rate limit configuration applies to. For the + * application scope, this is the RUM application ID. (required) + * @return CompletableFuture<RumRateLimitConfigResponse> + */ + public CompletableFuture getRumRateLimitConfigAsync( + RumRateLimitScopeType scopeType, String scopeId) { + return getRumRateLimitConfigWithHttpInfoAsync(scopeType, scopeId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the RUM rate limit configuration for a given scope. + * + * @param scopeType The type of scope the rate limit configuration applies to. (required) + * @param scopeId The identifier of the scope the rate limit configuration applies to. For the + * application scope, this is the RUM application ID. (required) + * @return ApiResponse<RumRateLimitConfigResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getRumRateLimitConfigWithHttpInfo( + RumRateLimitScopeType scopeType, String scopeId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getRumRateLimitConfig"; + 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 'scopeType' is set + if (scopeType == null) { + throw new ApiException( + 400, "Missing the required parameter 'scopeType' when calling getRumRateLimitConfig"); + } + + // verify the required parameter 'scopeId' is set + if (scopeId == null) { + throw new ApiException( + 400, "Missing the required parameter 'scopeId' when calling getRumRateLimitConfig"); + } + // create path and map variables + String localVarPath = + "/api/v2/rum/config/rate-limit/{scope_type}/{scope_id}" + .replaceAll("\\{" + "scope_type" + "\\}", apiClient.escapeString(scopeType.toString())) + .replaceAll("\\{" + "scope_id" + "\\}", apiClient.escapeString(scopeId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumRateLimitApi.getRumRateLimitConfig", + 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 rate limit configuration. + * + *

See {@link #getRumRateLimitConfigWithHttpInfo}. + * + * @param scopeType The type of scope the rate limit configuration applies to. (required) + * @param scopeId The identifier of the scope the rate limit configuration applies to. For the + * application scope, this is the RUM application ID. (required) + * @return CompletableFuture<ApiResponse<RumRateLimitConfigResponse>> + */ + public CompletableFuture> + getRumRateLimitConfigWithHttpInfoAsync(RumRateLimitScopeType scopeType, String scopeId) { + // Check if unstable operation is enabled + String operationId = "getRumRateLimitConfig"; + 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 'scopeType' is set + if (scopeType == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'scopeType' when calling getRumRateLimitConfig")); + return result; + } + + // verify the required parameter 'scopeId' is set + if (scopeId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'scopeId' when calling getRumRateLimitConfig")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/rum/config/rate-limit/{scope_type}/{scope_id}" + .replaceAll("\\{" + "scope_type" + "\\}", apiClient.escapeString(scopeType.toString())) + .replaceAll("\\{" + "scope_id" + "\\}", apiClient.escapeString(scopeId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumRateLimitApi.getRumRateLimitConfig", + 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() {}); + } + + /** + * Create or update a RUM rate limit configuration. + * + *

See {@link #updateRumRateLimitConfigWithHttpInfo}. + * + * @param scopeType The type of scope the rate limit configuration applies to. (required, default + * to "application") + * @param scopeId The identifier of the scope the rate limit configuration applies to. For the + * application scope, this is the RUM application ID. (required) + * @param body The definition of the RUM rate limit configuration to create or update. (required) + * @return RumRateLimitConfigResponse + * @throws ApiException if fails to make API call + */ + public RumRateLimitConfigResponse updateRumRateLimitConfig( + RumRateLimitScopeType scopeType, String scopeId, RumRateLimitConfigUpdateRequest body) + throws ApiException { + return updateRumRateLimitConfigWithHttpInfo(scopeType, scopeId, body).getData(); + } + + /** + * Create or update a RUM rate limit configuration. + * + *

See {@link #updateRumRateLimitConfigWithHttpInfoAsync}. + * + * @param scopeType The type of scope the rate limit configuration applies to. (required, default + * to "application") + * @param scopeId The identifier of the scope the rate limit configuration applies to. For the + * application scope, this is the RUM application ID. (required) + * @param body The definition of the RUM rate limit configuration to create or update. (required) + * @return CompletableFuture<RumRateLimitConfigResponse> + */ + public CompletableFuture updateRumRateLimitConfigAsync( + RumRateLimitScopeType scopeType, String scopeId, RumRateLimitConfigUpdateRequest body) { + return updateRumRateLimitConfigWithHttpInfoAsync(scopeType, scopeId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create or update the RUM rate limit configuration for a given scope. Returns the rate limit + * configuration object when the request is successful. + * + * @param scopeType The type of scope the rate limit configuration applies to. (required) + * @param scopeId The identifier of the scope the rate limit configuration applies to. For the + * application scope, this is the RUM application ID. (required) + * @param body The definition of the RUM rate limit configuration to create or update. (required) + * @return ApiResponse<RumRateLimitConfigResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse updateRumRateLimitConfigWithHttpInfo( + RumRateLimitScopeType scopeType, String scopeId, RumRateLimitConfigUpdateRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateRumRateLimitConfig"; + 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 'scopeType' is set + if (scopeType == null) { + throw new ApiException( + 400, "Missing the required parameter 'scopeType' when calling updateRumRateLimitConfig"); + } + + // verify the required parameter 'scopeId' is set + if (scopeId == null) { + throw new ApiException( + 400, "Missing the required parameter 'scopeId' when calling updateRumRateLimitConfig"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateRumRateLimitConfig"); + } + // create path and map variables + String localVarPath = + "/api/v2/rum/config/rate-limit/{scope_type}/{scope_id}" + .replaceAll("\\{" + "scope_type" + "\\}", apiClient.escapeString(scopeType.toString())) + .replaceAll("\\{" + "scope_id" + "\\}", apiClient.escapeString(scopeId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumRateLimitApi.updateRumRateLimitConfig", + 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() {}); + } + + /** + * Create or update a RUM rate limit configuration. + * + *

See {@link #updateRumRateLimitConfigWithHttpInfo}. + * + * @param scopeType The type of scope the rate limit configuration applies to. (required) + * @param scopeId The identifier of the scope the rate limit configuration applies to. For the + * application scope, this is the RUM application ID. (required) + * @param body The definition of the RUM rate limit configuration to create or update. (required) + * @return CompletableFuture<ApiResponse<RumRateLimitConfigResponse>> + */ + public CompletableFuture> + updateRumRateLimitConfigWithHttpInfoAsync( + RumRateLimitScopeType scopeType, String scopeId, RumRateLimitConfigUpdateRequest body) { + // Check if unstable operation is enabled + String operationId = "updateRumRateLimitConfig"; + 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 'scopeType' is set + if (scopeType == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'scopeType' when calling updateRumRateLimitConfig")); + return result; + } + + // verify the required parameter 'scopeId' is set + if (scopeId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'scopeId' when calling updateRumRateLimitConfig")); + 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 updateRumRateLimitConfig")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/rum/config/rate-limit/{scope_type}/{scope_id}" + .replaceAll("\\{" + "scope_type" + "\\}", apiClient.escapeString(scopeType.toString())) + .replaceAll("\\{" + "scope_id" + "\\}", apiClient.escapeString(scopeId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumRateLimitApi.updateRumRateLimitConfig", + 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() {}); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/api/RumReplayHeatmapsApi.java b/src/main/java/com/datadog/api/client/v2/api/RumReplayHeatmapsApi.java index ff626f38a0b..8e017e4dd40 100644 --- a/src/main/java/com/datadog/api/client/v2/api/RumReplayHeatmapsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/RumReplayHeatmapsApi.java @@ -317,7 +317,7 @@ public CompletableFuture> deleteReplayHeatmapSnapshotWithHttpI /** Manage optional parameters to listReplayHeatmapSnapshots. */ public static class ListReplayHeatmapSnapshotsOptionalParameters { private String filterDeviceType; - private Integer pageLimit; + private Long pageLimit; private String filterApplicationId; /** @@ -337,7 +337,7 @@ public ListReplayHeatmapSnapshotsOptionalParameters filterDeviceType(String filt * @param pageLimit Maximum number of snapshots to return. (optional) * @return ListReplayHeatmapSnapshotsOptionalParameters */ - public ListReplayHeatmapSnapshotsOptionalParameters pageLimit(Integer pageLimit) { + public ListReplayHeatmapSnapshotsOptionalParameters pageLimit(Long pageLimit) { this.pageLimit = pageLimit; return this; } @@ -449,7 +449,7 @@ public ApiResponse listReplayHeatmapSnapshotsWithHttpInfo( + " listReplayHeatmapSnapshots"); } String filterDeviceType = parameters.filterDeviceType; - Integer pageLimit = parameters.pageLimit; + Long pageLimit = parameters.pageLimit; String filterApplicationId = parameters.filterApplicationId; // create path and map variables String localVarPath = "/api/v2/replay/heatmap/snapshots"; @@ -508,7 +508,7 @@ public CompletableFuture> listReplayHeatmapSnapshotsW return result; } String filterDeviceType = parameters.filterDeviceType; - Integer pageLimit = parameters.pageLimit; + Long pageLimit = parameters.pageLimit; String filterApplicationId = parameters.filterApplicationId; // create path and map variables String localVarPath = "/api/v2/replay/heatmap/snapshots"; diff --git a/src/main/java/com/datadog/api/client/v2/api/RumReplayPlaylistsApi.java b/src/main/java/com/datadog/api/client/v2/api/RumReplayPlaylistsApi.java index 55d5cdf9e68..a4296d6a7c7 100644 --- a/src/main/java/com/datadog/api/client/v2/api/RumReplayPlaylistsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/RumReplayPlaylistsApi.java @@ -66,7 +66,7 @@ public AddRumReplaySessionToPlaylistOptionalParameters dataSource(String dataSou } /** - * Add rum replay session to playlist. + * Add RUM replay session to playlist. * *

See {@link #addRumReplaySessionToPlaylistWithHttpInfo}. * @@ -76,15 +76,15 @@ public AddRumReplaySessionToPlaylistOptionalParameters dataSource(String dataSou * @return PlaylistsSession * @throws ApiException if fails to make API call */ - public PlaylistsSession addRumReplaySessionToPlaylist( - Long ts, Integer playlistId, String sessionId) throws ApiException { + public PlaylistsSession addRumReplaySessionToPlaylist(Long ts, Long playlistId, String sessionId) + throws ApiException { return addRumReplaySessionToPlaylistWithHttpInfo( ts, playlistId, sessionId, new AddRumReplaySessionToPlaylistOptionalParameters()) .getData(); } /** - * Add rum replay session to playlist. + * Add RUM replay session to playlist. * *

See {@link #addRumReplaySessionToPlaylistWithHttpInfoAsync}. * @@ -94,7 +94,7 @@ ts, playlistId, sessionId, new AddRumReplaySessionToPlaylistOptionalParameters() * @return CompletableFuture<PlaylistsSession> */ public CompletableFuture addRumReplaySessionToPlaylistAsync( - Long ts, Integer playlistId, String sessionId) { + Long ts, Long playlistId, String sessionId) { return addRumReplaySessionToPlaylistWithHttpInfoAsync( ts, playlistId, sessionId, new AddRumReplaySessionToPlaylistOptionalParameters()) .thenApply( @@ -104,7 +104,7 @@ ts, playlistId, sessionId, new AddRumReplaySessionToPlaylistOptionalParameters() } /** - * Add rum replay session to playlist. + * Add RUM replay session to playlist. * *

See {@link #addRumReplaySessionToPlaylistWithHttpInfo}. * @@ -117,7 +117,7 @@ ts, playlistId, sessionId, new AddRumReplaySessionToPlaylistOptionalParameters() */ public PlaylistsSession addRumReplaySessionToPlaylist( Long ts, - Integer playlistId, + Long playlistId, String sessionId, AddRumReplaySessionToPlaylistOptionalParameters parameters) throws ApiException { @@ -126,7 +126,7 @@ public PlaylistsSession addRumReplaySessionToPlaylist( } /** - * Add rum replay session to playlist. + * Add RUM replay session to playlist. * *

See {@link #addRumReplaySessionToPlaylistWithHttpInfoAsync}. * @@ -138,7 +138,7 @@ public PlaylistsSession addRumReplaySessionToPlaylist( */ public CompletableFuture addRumReplaySessionToPlaylistAsync( Long ts, - Integer playlistId, + Long playlistId, String sessionId, AddRumReplaySessionToPlaylistOptionalParameters parameters) { return addRumReplaySessionToPlaylistWithHttpInfoAsync(ts, playlistId, sessionId, parameters) @@ -168,7 +168,7 @@ public CompletableFuture addRumReplaySessionToPlaylistAsync( */ public ApiResponse addRumReplaySessionToPlaylistWithHttpInfo( Long ts, - Integer playlistId, + Long playlistId, String sessionId, AddRumReplaySessionToPlaylistOptionalParameters parameters) throws ApiException { @@ -228,7 +228,7 @@ public ApiResponse addRumReplaySessionToPlaylistWithHttpInfo( } /** - * Add rum replay session to playlist. + * Add RUM replay session to playlist. * *

See {@link #addRumReplaySessionToPlaylistWithHttpInfo}. * @@ -241,7 +241,7 @@ public ApiResponse addRumReplaySessionToPlaylistWithHttpInfo( public CompletableFuture> addRumReplaySessionToPlaylistWithHttpInfoAsync( Long ts, - Integer playlistId, + Long playlistId, String sessionId, AddRumReplaySessionToPlaylistOptionalParameters parameters) { Object localVarPostBody = null; @@ -319,7 +319,7 @@ public ApiResponse addRumReplaySessionToPlaylistWithHttpInfo( } /** - * Bulk remove rum replay playlist sessions. + * Bulk remove RUM replay playlist sessions. * *

See {@link #bulkRemoveRumReplayPlaylistSessionsWithHttpInfo}. * @@ -327,13 +327,13 @@ public ApiResponse addRumReplaySessionToPlaylistWithHttpInfo( * @param body (required) * @throws ApiException if fails to make API call */ - public void bulkRemoveRumReplayPlaylistSessions(Integer playlistId, SessionIdArray body) + public void bulkRemoveRumReplayPlaylistSessions(Long playlistId, SessionIdArray body) throws ApiException { bulkRemoveRumReplayPlaylistSessionsWithHttpInfo(playlistId, body); } /** - * Bulk remove rum replay playlist sessions. + * Bulk remove RUM replay playlist sessions. * *

See {@link #bulkRemoveRumReplayPlaylistSessionsWithHttpInfoAsync}. * @@ -342,7 +342,7 @@ public void bulkRemoveRumReplayPlaylistSessions(Integer playlistId, SessionIdArr * @return CompletableFuture */ public CompletableFuture bulkRemoveRumReplayPlaylistSessionsAsync( - Integer playlistId, SessionIdArray body) { + Long playlistId, SessionIdArray body) { return bulkRemoveRumReplayPlaylistSessionsWithHttpInfoAsync(playlistId, body) .thenApply( response -> { @@ -366,7 +366,7 @@ public CompletableFuture bulkRemoveRumReplayPlaylistSessionsAsync( * */ public ApiResponse bulkRemoveRumReplayPlaylistSessionsWithHttpInfo( - Integer playlistId, SessionIdArray body) throws ApiException { + Long playlistId, SessionIdArray body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'playlistId' is set @@ -412,7 +412,7 @@ public ApiResponse bulkRemoveRumReplayPlaylistSessionsWithHttpInfo( } /** - * Bulk remove rum replay playlist sessions. + * Bulk remove RUM replay playlist sessions. * *

See {@link #bulkRemoveRumReplayPlaylistSessionsWithHttpInfo}. * @@ -421,7 +421,7 @@ public ApiResponse bulkRemoveRumReplayPlaylistSessionsWithHttpInfo( * @return CompletableFuture<ApiResponse<Void>> */ public CompletableFuture> bulkRemoveRumReplayPlaylistSessionsWithHttpInfoAsync( - Integer playlistId, SessionIdArray body) { + Long playlistId, SessionIdArray body) { Object localVarPostBody = body; // verify the required parameter 'playlistId' is set @@ -481,7 +481,7 @@ public CompletableFuture> bulkRemoveRumReplayPlaylistSessionsW } /** - * Create rum replay playlist. + * Create RUM replay playlist. * *

See {@link #createRumReplayPlaylistWithHttpInfo}. * @@ -494,7 +494,7 @@ public Playlist createRumReplayPlaylist(Playlist body) throws ApiException { } /** - * Create rum replay playlist. + * Create RUM replay playlist. * *

See {@link #createRumReplayPlaylistWithHttpInfoAsync}. * @@ -558,7 +558,7 @@ public ApiResponse createRumReplayPlaylistWithHttpInfo(Playlist body) } /** - * Create rum replay playlist. + * Create RUM replay playlist. * *

See {@link #createRumReplayPlaylistWithHttpInfo}. * @@ -610,26 +610,26 @@ public CompletableFuture> createRumReplayPlaylistWithHttpI } /** - * Delete rum replay playlist. + * Delete RUM replay playlist. * *

See {@link #deleteRumReplayPlaylistWithHttpInfo}. * * @param playlistId Unique identifier of the playlist. (required) * @throws ApiException if fails to make API call */ - public void deleteRumReplayPlaylist(Integer playlistId) throws ApiException { + public void deleteRumReplayPlaylist(Long playlistId) throws ApiException { deleteRumReplayPlaylistWithHttpInfo(playlistId); } /** - * Delete rum replay playlist. + * Delete RUM replay playlist. * *

See {@link #deleteRumReplayPlaylistWithHttpInfoAsync}. * * @param playlistId Unique identifier of the playlist. (required) * @return CompletableFuture */ - public CompletableFuture deleteRumReplayPlaylistAsync(Integer playlistId) { + public CompletableFuture deleteRumReplayPlaylistAsync(Long playlistId) { return deleteRumReplayPlaylistWithHttpInfoAsync(playlistId) .thenApply( response -> { @@ -651,7 +651,7 @@ public CompletableFuture deleteRumReplayPlaylistAsync(Integer playlistId) * 429 Too many requests - * */ - public ApiResponse deleteRumReplayPlaylistWithHttpInfo(Integer playlistId) + public ApiResponse deleteRumReplayPlaylistWithHttpInfo(Long playlistId) throws ApiException { Object localVarPostBody = null; @@ -689,7 +689,7 @@ public ApiResponse deleteRumReplayPlaylistWithHttpInfo(Integer playlistId) } /** - * Delete rum replay playlist. + * Delete RUM replay playlist. * *

See {@link #deleteRumReplayPlaylistWithHttpInfo}. * @@ -697,7 +697,7 @@ public ApiResponse deleteRumReplayPlaylistWithHttpInfo(Integer playlistId) * @return CompletableFuture<ApiResponse<Void>> */ public CompletableFuture> deleteRumReplayPlaylistWithHttpInfoAsync( - Integer playlistId) { + Long playlistId) { Object localVarPostBody = null; // verify the required parameter 'playlistId' is set @@ -745,7 +745,7 @@ public CompletableFuture> deleteRumReplayPlaylistWithHttpInfoA } /** - * Get rum replay playlist. + * Get RUM replay playlist. * *

See {@link #getRumReplayPlaylistWithHttpInfo}. * @@ -753,19 +753,19 @@ public CompletableFuture> deleteRumReplayPlaylistWithHttpInfoA * @return Playlist * @throws ApiException if fails to make API call */ - public Playlist getRumReplayPlaylist(Integer playlistId) throws ApiException { + public Playlist getRumReplayPlaylist(Long playlistId) throws ApiException { return getRumReplayPlaylistWithHttpInfo(playlistId).getData(); } /** - * Get rum replay playlist. + * Get RUM replay playlist. * *

See {@link #getRumReplayPlaylistWithHttpInfoAsync}. * * @param playlistId Unique identifier of the playlist. (required) * @return CompletableFuture<Playlist> */ - public CompletableFuture getRumReplayPlaylistAsync(Integer playlistId) { + public CompletableFuture getRumReplayPlaylistAsync(Long playlistId) { return getRumReplayPlaylistWithHttpInfoAsync(playlistId) .thenApply( response -> { @@ -787,7 +787,7 @@ public CompletableFuture getRumReplayPlaylistAsync(Integer playlistId) * 429 Too many requests - * */ - public ApiResponse getRumReplayPlaylistWithHttpInfo(Integer playlistId) + public ApiResponse getRumReplayPlaylistWithHttpInfo(Long playlistId) throws ApiException { Object localVarPostBody = null; @@ -825,7 +825,7 @@ public ApiResponse getRumReplayPlaylistWithHttpInfo(Integer playlistId } /** - * Get rum replay playlist. + * Get RUM replay playlist. * *

See {@link #getRumReplayPlaylistWithHttpInfo}. * @@ -833,7 +833,7 @@ public ApiResponse getRumReplayPlaylistWithHttpInfo(Integer playlistId * @return CompletableFuture<ApiResponse<Playlist>> */ public CompletableFuture> getRumReplayPlaylistWithHttpInfoAsync( - Integer playlistId) { + Long playlistId) { Object localVarPostBody = null; // verify the required parameter 'playlistId' is set @@ -884,8 +884,8 @@ public CompletableFuture> getRumReplayPlaylistWithHttpInfo public static class ListRumReplayPlaylistsOptionalParameters { private String filterCreatedByUuid; private String filterQuery; - private Integer pageNumber; - private Integer pageSize; + private Long pageNumber; + private Long pageSize; /** * Set filterCreatedByUuid. @@ -917,7 +917,7 @@ public ListRumReplayPlaylistsOptionalParameters filterQuery(String filterQuery) * @param pageNumber Page number for pagination (0-indexed). (optional) * @return ListRumReplayPlaylistsOptionalParameters */ - public ListRumReplayPlaylistsOptionalParameters pageNumber(Integer pageNumber) { + public ListRumReplayPlaylistsOptionalParameters pageNumber(Long pageNumber) { this.pageNumber = pageNumber; return this; } @@ -928,14 +928,14 @@ public ListRumReplayPlaylistsOptionalParameters pageNumber(Integer pageNumber) { * @param pageSize Number of items per page. (optional) * @return ListRumReplayPlaylistsOptionalParameters */ - public ListRumReplayPlaylistsOptionalParameters pageSize(Integer pageSize) { + public ListRumReplayPlaylistsOptionalParameters pageSize(Long pageSize) { this.pageSize = pageSize; return this; } } /** - * List rum replay playlists. + * List RUM replay playlists. * *

See {@link #listRumReplayPlaylistsWithHttpInfo}. * @@ -948,7 +948,7 @@ public PlaylistArray listRumReplayPlaylists() throws ApiException { } /** - * List rum replay playlists. + * List RUM replay playlists. * *

See {@link #listRumReplayPlaylistsWithHttpInfoAsync}. * @@ -963,7 +963,7 @@ public CompletableFuture listRumReplayPlaylistsAsync() { } /** - * List rum replay playlists. + * List RUM replay playlists. * *

See {@link #listRumReplayPlaylistsWithHttpInfo}. * @@ -977,7 +977,7 @@ public PlaylistArray listRumReplayPlaylists(ListRumReplayPlaylistsOptionalParame } /** - * List rum replay playlists. + * List RUM replay playlists. * *

See {@link #listRumReplayPlaylistsWithHttpInfoAsync}. * @@ -1012,8 +1012,8 @@ public ApiResponse listRumReplayPlaylistsWithHttpInfo( Object localVarPostBody = null; String filterCreatedByUuid = parameters.filterCreatedByUuid; String filterQuery = parameters.filterQuery; - Integer pageNumber = parameters.pageNumber; - Integer pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; + Long pageSize = parameters.pageSize; // create path and map variables String localVarPath = "/api/v2/rum/replay/playlists"; @@ -1047,7 +1047,7 @@ public ApiResponse listRumReplayPlaylistsWithHttpInfo( } /** - * List rum replay playlists. + * List RUM replay playlists. * *

See {@link #listRumReplayPlaylistsWithHttpInfo}. * @@ -1059,8 +1059,8 @@ public CompletableFuture> listRumReplayPlaylistsWithH Object localVarPostBody = null; String filterCreatedByUuid = parameters.filterCreatedByUuid; String filterQuery = parameters.filterQuery; - Integer pageNumber = parameters.pageNumber; - Integer pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; + Long pageSize = parameters.pageSize; // create path and map variables String localVarPath = "/api/v2/rum/replay/playlists"; @@ -1102,8 +1102,8 @@ public CompletableFuture> listRumReplayPlaylistsWithH /** Manage optional parameters to listRumReplayPlaylistSessions. */ public static class ListRumReplayPlaylistSessionsOptionalParameters { - private Integer pageNumber; - private Integer pageSize; + private Long pageNumber; + private Long pageSize; /** * Set pageNumber. @@ -1111,7 +1111,7 @@ public static class ListRumReplayPlaylistSessionsOptionalParameters { * @param pageNumber Page number for pagination (0-indexed). (optional) * @return ListRumReplayPlaylistSessionsOptionalParameters */ - public ListRumReplayPlaylistSessionsOptionalParameters pageNumber(Integer pageNumber) { + public ListRumReplayPlaylistSessionsOptionalParameters pageNumber(Long pageNumber) { this.pageNumber = pageNumber; return this; } @@ -1122,14 +1122,14 @@ public ListRumReplayPlaylistSessionsOptionalParameters pageNumber(Integer pageNu * @param pageSize Number of items per page. (optional) * @return ListRumReplayPlaylistSessionsOptionalParameters */ - public ListRumReplayPlaylistSessionsOptionalParameters pageSize(Integer pageSize) { + public ListRumReplayPlaylistSessionsOptionalParameters pageSize(Long pageSize) { this.pageSize = pageSize; return this; } } /** - * List rum replay playlist sessions. + * List RUM replay playlist sessions. * *

See {@link #listRumReplayPlaylistSessionsWithHttpInfo}. * @@ -1137,15 +1137,14 @@ public ListRumReplayPlaylistSessionsOptionalParameters pageSize(Integer pageSize * @return PlaylistsSessionArray * @throws ApiException if fails to make API call */ - public PlaylistsSessionArray listRumReplayPlaylistSessions(Integer playlistId) - throws ApiException { + public PlaylistsSessionArray listRumReplayPlaylistSessions(Long playlistId) throws ApiException { return listRumReplayPlaylistSessionsWithHttpInfo( playlistId, new ListRumReplayPlaylistSessionsOptionalParameters()) .getData(); } /** - * List rum replay playlist sessions. + * List RUM replay playlist sessions. * *

See {@link #listRumReplayPlaylistSessionsWithHttpInfoAsync}. * @@ -1153,7 +1152,7 @@ playlistId, new ListRumReplayPlaylistSessionsOptionalParameters()) * @return CompletableFuture<PlaylistsSessionArray> */ public CompletableFuture listRumReplayPlaylistSessionsAsync( - Integer playlistId) { + Long playlistId) { return listRumReplayPlaylistSessionsWithHttpInfoAsync( playlistId, new ListRumReplayPlaylistSessionsOptionalParameters()) .thenApply( @@ -1163,7 +1162,7 @@ playlistId, new ListRumReplayPlaylistSessionsOptionalParameters()) } /** - * List rum replay playlist sessions. + * List RUM replay playlist sessions. * *

See {@link #listRumReplayPlaylistSessionsWithHttpInfo}. * @@ -1173,13 +1172,13 @@ playlistId, new ListRumReplayPlaylistSessionsOptionalParameters()) * @throws ApiException if fails to make API call */ public PlaylistsSessionArray listRumReplayPlaylistSessions( - Integer playlistId, ListRumReplayPlaylistSessionsOptionalParameters parameters) + Long playlistId, ListRumReplayPlaylistSessionsOptionalParameters parameters) throws ApiException { return listRumReplayPlaylistSessionsWithHttpInfo(playlistId, parameters).getData(); } /** - * List rum replay playlist sessions. + * List RUM replay playlist sessions. * *

See {@link #listRumReplayPlaylistSessionsWithHttpInfoAsync}. * @@ -1188,7 +1187,7 @@ public PlaylistsSessionArray listRumReplayPlaylistSessions( * @return CompletableFuture<PlaylistsSessionArray> */ public CompletableFuture listRumReplayPlaylistSessionsAsync( - Integer playlistId, ListRumReplayPlaylistSessionsOptionalParameters parameters) { + Long playlistId, ListRumReplayPlaylistSessionsOptionalParameters parameters) { return listRumReplayPlaylistSessionsWithHttpInfoAsync(playlistId, parameters) .thenApply( response -> { @@ -1212,7 +1211,7 @@ public CompletableFuture listRumReplayPlaylistSessionsAsy * */ public ApiResponse listRumReplayPlaylistSessionsWithHttpInfo( - Integer playlistId, ListRumReplayPlaylistSessionsOptionalParameters parameters) + Long playlistId, ListRumReplayPlaylistSessionsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; @@ -1222,8 +1221,8 @@ public ApiResponse listRumReplayPlaylistSessionsWithHttpI 400, "Missing the required parameter 'playlistId' when calling listRumReplayPlaylistSessions"); } - Integer pageNumber = parameters.pageNumber; - Integer pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; + Long pageSize = parameters.pageSize; // create path and map variables String localVarPath = "/api/v2/rum/replay/playlists/{playlist_id}/sessions" @@ -1257,7 +1256,7 @@ public ApiResponse listRumReplayPlaylistSessionsWithHttpI } /** - * List rum replay playlist sessions. + * List RUM replay playlist sessions. * *

See {@link #listRumReplayPlaylistSessionsWithHttpInfo}. * @@ -1267,7 +1266,7 @@ public ApiResponse listRumReplayPlaylistSessionsWithHttpI */ public CompletableFuture> listRumReplayPlaylistSessionsWithHttpInfoAsync( - Integer playlistId, ListRumReplayPlaylistSessionsOptionalParameters parameters) { + Long playlistId, ListRumReplayPlaylistSessionsOptionalParameters parameters) { Object localVarPostBody = null; // verify the required parameter 'playlistId' is set @@ -1280,8 +1279,8 @@ public ApiResponse listRumReplayPlaylistSessionsWithHttpI + " listRumReplayPlaylistSessions")); return result; } - Integer pageNumber = parameters.pageNumber; - Integer pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; + Long pageSize = parameters.pageSize; // create path and map variables String localVarPath = "/api/v2/rum/replay/playlists/{playlist_id}/sessions" @@ -1322,7 +1321,7 @@ public ApiResponse listRumReplayPlaylistSessionsWithHttpI } /** - * Remove rum replay session from playlist. + * Remove RUM replay session from playlist. * *

See {@link #removeRumReplaySessionFromPlaylistWithHttpInfo}. * @@ -1330,13 +1329,13 @@ public ApiResponse listRumReplayPlaylistSessionsWithHttpI * @param sessionId Unique identifier of the session. (required) * @throws ApiException if fails to make API call */ - public void removeRumReplaySessionFromPlaylist(Integer playlistId, String sessionId) + public void removeRumReplaySessionFromPlaylist(Long playlistId, String sessionId) throws ApiException { removeRumReplaySessionFromPlaylistWithHttpInfo(playlistId, sessionId); } /** - * Remove rum replay session from playlist. + * Remove RUM replay session from playlist. * *

See {@link #removeRumReplaySessionFromPlaylistWithHttpInfoAsync}. * @@ -1345,7 +1344,7 @@ public void removeRumReplaySessionFromPlaylist(Integer playlistId, String sessio * @return CompletableFuture */ public CompletableFuture removeRumReplaySessionFromPlaylistAsync( - Integer playlistId, String sessionId) { + Long playlistId, String sessionId) { return removeRumReplaySessionFromPlaylistWithHttpInfoAsync(playlistId, sessionId) .thenApply( response -> { @@ -1369,7 +1368,7 @@ public CompletableFuture removeRumReplaySessionFromPlaylistAsync( * */ public ApiResponse removeRumReplaySessionFromPlaylistWithHttpInfo( - Integer playlistId, String sessionId) throws ApiException { + Long playlistId, String sessionId) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'playlistId' is set @@ -1417,7 +1416,7 @@ public ApiResponse removeRumReplaySessionFromPlaylistWithHttpInfo( } /** - * Remove rum replay session from playlist. + * Remove RUM replay session from playlist. * *

See {@link #removeRumReplaySessionFromPlaylistWithHttpInfo}. * @@ -1426,7 +1425,7 @@ public ApiResponse removeRumReplaySessionFromPlaylistWithHttpInfo( * @return CompletableFuture<ApiResponse<Void>> */ public CompletableFuture> removeRumReplaySessionFromPlaylistWithHttpInfoAsync( - Integer playlistId, String sessionId) { + Long playlistId, String sessionId) { Object localVarPostBody = null; // verify the required parameter 'playlistId' is set @@ -1487,7 +1486,7 @@ public CompletableFuture> removeRumReplaySessionFromPlaylistWi } /** - * Update rum replay playlist. + * Update RUM replay playlist. * *

See {@link #updateRumReplayPlaylistWithHttpInfo}. * @@ -1496,12 +1495,12 @@ public CompletableFuture> removeRumReplaySessionFromPlaylistWi * @return Playlist * @throws ApiException if fails to make API call */ - public Playlist updateRumReplayPlaylist(Integer playlistId, Playlist body) throws ApiException { + public Playlist updateRumReplayPlaylist(Long playlistId, Playlist body) throws ApiException { return updateRumReplayPlaylistWithHttpInfo(playlistId, body).getData(); } /** - * Update rum replay playlist. + * Update RUM replay playlist. * *

See {@link #updateRumReplayPlaylistWithHttpInfoAsync}. * @@ -1509,8 +1508,7 @@ public Playlist updateRumReplayPlaylist(Integer playlistId, Playlist body) throw * @param body (required) * @return CompletableFuture<Playlist> */ - public CompletableFuture updateRumReplayPlaylistAsync( - Integer playlistId, Playlist body) { + public CompletableFuture updateRumReplayPlaylistAsync(Long playlistId, Playlist body) { return updateRumReplayPlaylistWithHttpInfoAsync(playlistId, body) .thenApply( response -> { @@ -1533,8 +1531,8 @@ public CompletableFuture updateRumReplayPlaylistAsync( * 429 Too many requests - * */ - public ApiResponse updateRumReplayPlaylistWithHttpInfo( - Integer playlistId, Playlist body) throws ApiException { + public ApiResponse updateRumReplayPlaylistWithHttpInfo(Long playlistId, Playlist body) + throws ApiException { Object localVarPostBody = body; // verify the required parameter 'playlistId' is set @@ -1577,7 +1575,7 @@ public ApiResponse updateRumReplayPlaylistWithHttpInfo( } /** - * Update rum replay playlist. + * Update RUM replay playlist. * *

See {@link #updateRumReplayPlaylistWithHttpInfo}. * @@ -1586,7 +1584,7 @@ public ApiResponse updateRumReplayPlaylistWithHttpInfo( * @return CompletableFuture<ApiResponse<Playlist>> */ public CompletableFuture> updateRumReplayPlaylistWithHttpInfoAsync( - Integer playlistId, Playlist body) { + Long playlistId, Playlist body) { Object localVarPostBody = body; // verify the required parameter 'playlistId' is set diff --git a/src/main/java/com/datadog/api/client/v2/api/RumReplaySessionsApi.java b/src/main/java/com/datadog/api/client/v2/api/RumReplaySessionsApi.java index 3c60ae6052c..c5954aa43d4 100644 --- a/src/main/java/com/datadog/api/client/v2/api/RumReplaySessionsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/RumReplaySessionsApi.java @@ -46,7 +46,7 @@ public void setApiClient(ApiClient apiClient) { public static class GetSegmentsOptionalParameters { private String source; private Long ts; - private Integer maxListSize; + private Long maxListSize; private String paging; /** @@ -77,7 +77,7 @@ public GetSegmentsOptionalParameters ts(Long ts) { * @param maxListSize Maximum size in bytes for the segment list. (optional) * @return GetSegmentsOptionalParameters */ - public GetSegmentsOptionalParameters maxListSize(Integer maxListSize) { + public GetSegmentsOptionalParameters maxListSize(Long maxListSize) { this.maxListSize = maxListSize; return this; } @@ -192,7 +192,7 @@ public ApiResponse getSegmentsWithHttpInfo( } String source = parameters.source; Long ts = parameters.ts; - Integer maxListSize = parameters.maxListSize; + Long maxListSize = parameters.maxListSize; String paging = parameters.paging; // create path and map variables String localVarPath = @@ -261,7 +261,7 @@ public CompletableFuture> getSegmentsWithHttpInfoAsync( } String source = parameters.source; Long ts = parameters.ts; - Integer maxListSize = parameters.maxListSize; + Long maxListSize = parameters.maxListSize; String paging = parameters.paging; // create path and map variables String localVarPath = diff --git a/src/main/java/com/datadog/api/client/v2/api/RumReplayViewershipApi.java b/src/main/java/com/datadog/api/client/v2/api/RumReplayViewershipApi.java index f920467faf6..e7f696e8f0d 100644 --- a/src/main/java/com/datadog/api/client/v2/api/RumReplayViewershipApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/RumReplayViewershipApi.java @@ -47,7 +47,7 @@ public void setApiClient(ApiClient apiClient) { } /** - * Create rum replay session watch. + * Create RUM replay session watch. * *

See {@link #createRumReplaySessionWatchWithHttpInfo}. * @@ -61,7 +61,7 @@ public Watch createRumReplaySessionWatch(String sessionId, Watch body) throws Ap } /** - * Create rum replay session watch. + * Create RUM replay session watch. * *

See {@link #createRumReplaySessionWatchWithHttpInfoAsync}. * @@ -136,7 +136,7 @@ public ApiResponse createRumReplaySessionWatchWithHttpInfo(String session } /** - * Create rum replay session watch. + * Create RUM replay session watch. * *

See {@link #createRumReplaySessionWatchWithHttpInfo}. * @@ -203,7 +203,7 @@ public CompletableFuture> createRumReplaySessionWatchWithHttp } /** - * Delete rum replay session watch. + * Delete RUM replay session watch. * *

See {@link #deleteRumReplaySessionWatchWithHttpInfo}. * @@ -215,7 +215,7 @@ public void deleteRumReplaySessionWatch(String sessionId) throws ApiException { } /** - * Delete rum replay session watch. + * Delete RUM replay session watch. * *

See {@link #deleteRumReplaySessionWatchWithHttpInfoAsync}. * @@ -282,7 +282,7 @@ public ApiResponse deleteRumReplaySessionWatchWithHttpInfo(String sessionI } /** - * Delete rum replay session watch. + * Delete RUM replay session watch. * *

See {@link #deleteRumReplaySessionWatchWithHttpInfo}. * @@ -339,8 +339,8 @@ public CompletableFuture> deleteRumReplaySessionWatchWithHttpI /** Manage optional parameters to listRumReplaySessionWatchers. */ public static class ListRumReplaySessionWatchersOptionalParameters { - private Integer pageSize; - private Integer pageNumber; + private Long pageSize; + private Long pageNumber; /** * Set pageSize. @@ -348,7 +348,7 @@ public static class ListRumReplaySessionWatchersOptionalParameters { * @param pageSize Number of items per page. (optional) * @return ListRumReplaySessionWatchersOptionalParameters */ - public ListRumReplaySessionWatchersOptionalParameters pageSize(Integer pageSize) { + public ListRumReplaySessionWatchersOptionalParameters pageSize(Long pageSize) { this.pageSize = pageSize; return this; } @@ -359,14 +359,14 @@ public ListRumReplaySessionWatchersOptionalParameters pageSize(Integer pageSize) * @param pageNumber Page number for pagination (0-indexed). (optional) * @return ListRumReplaySessionWatchersOptionalParameters */ - public ListRumReplaySessionWatchersOptionalParameters pageNumber(Integer pageNumber) { + public ListRumReplaySessionWatchersOptionalParameters pageNumber(Long pageNumber) { this.pageNumber = pageNumber; return this; } } /** - * List rum replay session watchers. + * List RUM replay session watchers. * *

See {@link #listRumReplaySessionWatchersWithHttpInfo}. * @@ -381,7 +381,7 @@ sessionId, new ListRumReplaySessionWatchersOptionalParameters()) } /** - * List rum replay session watchers. + * List RUM replay session watchers. * *

See {@link #listRumReplaySessionWatchersWithHttpInfoAsync}. * @@ -398,7 +398,7 @@ sessionId, new ListRumReplaySessionWatchersOptionalParameters()) } /** - * List rum replay session watchers. + * List RUM replay session watchers. * *

See {@link #listRumReplaySessionWatchersWithHttpInfo}. * @@ -414,7 +414,7 @@ public WatcherArray listRumReplaySessionWatchers( } /** - * List rum replay session watchers. + * List RUM replay session watchers. * *

See {@link #listRumReplaySessionWatchersWithHttpInfoAsync}. * @@ -457,8 +457,8 @@ public ApiResponse listRumReplaySessionWatchersWithHttpInfo( 400, "Missing the required parameter 'sessionId' when calling listRumReplaySessionWatchers"); } - Integer pageSize = parameters.pageSize; - Integer pageNumber = parameters.pageNumber; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; // create path and map variables String localVarPath = "/api/v2/rum/replay/sessions/{session_id}/watchers" @@ -491,7 +491,7 @@ public ApiResponse listRumReplaySessionWatchersWithHttpInfo( } /** - * List rum replay session watchers. + * List RUM replay session watchers. * *

See {@link #listRumReplaySessionWatchersWithHttpInfo}. * @@ -513,8 +513,8 @@ public CompletableFuture> listRumReplaySessionWatchers + " listRumReplaySessionWatchers")); return result; } - Integer pageSize = parameters.pageSize; - Integer pageNumber = parameters.pageNumber; + Long pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; // create path and map variables String localVarPath = "/api/v2/rum/replay/sessions/{session_id}/watchers" @@ -556,11 +556,11 @@ public CompletableFuture> listRumReplaySessionWatchers /** Manage optional parameters to listRumReplayViewershipHistorySessions. */ public static class ListRumReplayViewershipHistorySessionsOptionalParameters { private Long filterWatchedAtStart; - private Integer pageNumber; + private Long pageNumber; private String filterCreatedBy; private Long filterWatchedAtEnd; private String filterSessionIds; - private Integer pageSize; + private Long pageSize; private String filterApplicationId; /** @@ -581,7 +581,7 @@ public ListRumReplayViewershipHistorySessionsOptionalParameters filterWatchedAtS * @param pageNumber Page number for pagination (0-indexed). (optional) * @return ListRumReplayViewershipHistorySessionsOptionalParameters */ - public ListRumReplayViewershipHistorySessionsOptionalParameters pageNumber(Integer pageNumber) { + public ListRumReplayViewershipHistorySessionsOptionalParameters pageNumber(Long pageNumber) { this.pageNumber = pageNumber; return this; } @@ -629,7 +629,7 @@ public ListRumReplayViewershipHistorySessionsOptionalParameters filterSessionIds * @param pageSize Number of items per page. (optional) * @return ListRumReplayViewershipHistorySessionsOptionalParameters */ - public ListRumReplayViewershipHistorySessionsOptionalParameters pageSize(Integer pageSize) { + public ListRumReplayViewershipHistorySessionsOptionalParameters pageSize(Long pageSize) { this.pageSize = pageSize; return this; } @@ -648,7 +648,7 @@ public ListRumReplayViewershipHistorySessionsOptionalParameters filterApplicatio } /** - * List rum replay viewership history sessions. + * List RUM replay viewership history sessions. * *

See {@link #listRumReplayViewershipHistorySessionsWithHttpInfo}. * @@ -663,7 +663,7 @@ public ViewershipHistorySessionArray listRumReplayViewershipHistorySessions() } /** - * List rum replay viewership history sessions. + * List RUM replay viewership history sessions. * *

See {@link #listRumReplayViewershipHistorySessionsWithHttpInfoAsync}. * @@ -680,7 +680,7 @@ public ViewershipHistorySessionArray listRumReplayViewershipHistorySessions() } /** - * List rum replay viewership history sessions. + * List RUM replay viewership history sessions. * *

See {@link #listRumReplayViewershipHistorySessionsWithHttpInfo}. * @@ -694,7 +694,7 @@ public ViewershipHistorySessionArray listRumReplayViewershipHistorySessions( } /** - * List rum replay viewership history sessions. + * List RUM replay viewership history sessions. * *

See {@link #listRumReplayViewershipHistorySessionsWithHttpInfoAsync}. * @@ -730,11 +730,11 @@ public ViewershipHistorySessionArray listRumReplayViewershipHistorySessions( ListRumReplayViewershipHistorySessionsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; Long filterWatchedAtStart = parameters.filterWatchedAtStart; - Integer pageNumber = parameters.pageNumber; + Long pageNumber = parameters.pageNumber; String filterCreatedBy = parameters.filterCreatedBy; Long filterWatchedAtEnd = parameters.filterWatchedAtEnd; String filterSessionIds = parameters.filterSessionIds; - Integer pageSize = parameters.pageSize; + Long pageSize = parameters.pageSize; String filterApplicationId = parameters.filterApplicationId; // create path and map variables String localVarPath = "/api/v2/rum/replay/viewership-history/sessions"; @@ -776,7 +776,7 @@ public ViewershipHistorySessionArray listRumReplayViewershipHistorySessions( } /** - * List rum replay viewership history sessions. + * List RUM replay viewership history sessions. * *

See {@link #listRumReplayViewershipHistorySessionsWithHttpInfo}. * @@ -788,11 +788,11 @@ public ViewershipHistorySessionArray listRumReplayViewershipHistorySessions( ListRumReplayViewershipHistorySessionsOptionalParameters parameters) { Object localVarPostBody = null; Long filterWatchedAtStart = parameters.filterWatchedAtStart; - Integer pageNumber = parameters.pageNumber; + Long pageNumber = parameters.pageNumber; String filterCreatedBy = parameters.filterCreatedBy; Long filterWatchedAtEnd = parameters.filterWatchedAtEnd; String filterSessionIds = parameters.filterSessionIds; - Integer pageSize = parameters.pageSize; + Long pageSize = parameters.pageSize; String filterApplicationId = parameters.filterApplicationId; // create path and map variables String localVarPath = "/api/v2/rum/replay/viewership-history/sessions"; diff --git a/src/main/java/com/datadog/api/client/v2/api/ScorecardsApi.java b/src/main/java/com/datadog/api/client/v2/api/ScorecardsApi.java index 85a050dfe4b..285daed5dec 100644 --- a/src/main/java/com/datadog/api/client/v2/api/ScorecardsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/ScorecardsApi.java @@ -2228,8 +2228,8 @@ public static class ListScorecardScoresOptionalParameters { private Boolean filterRuleIsCustom; private Boolean filterRuleIsEnabled; private String sort; - private Integer pageOffset; - private Integer pageLimit; + private Long pageOffset; + private Long pageLimit; /** * Set filterRuleId. @@ -2316,7 +2316,7 @@ public ListScorecardScoresOptionalParameters sort(String sort) { * @param pageOffset Offset for pagination. (optional, default to 0) * @return ListScorecardScoresOptionalParameters */ - public ListScorecardScoresOptionalParameters pageOffset(Integer pageOffset) { + public ListScorecardScoresOptionalParameters pageOffset(Long pageOffset) { this.pageOffset = pageOffset; return this; } @@ -2327,7 +2327,7 @@ public ListScorecardScoresOptionalParameters pageOffset(Integer pageOffset) { * @param pageLimit Number of scores to return. Max is 1000. (optional, default to 100) * @return ListScorecardScoresOptionalParameters */ - public ListScorecardScoresOptionalParameters pageLimit(Integer pageLimit) { + public ListScorecardScoresOptionalParameters pageLimit(Long pageLimit) { this.pageLimit = pageLimit; return this; } @@ -2434,8 +2434,8 @@ public ApiResponse listScorecardScoresWithHttpInfo( Boolean filterRuleIsCustom = parameters.filterRuleIsCustom; Boolean filterRuleIsEnabled = parameters.filterRuleIsEnabled; String sort = parameters.sort; - Integer pageOffset = parameters.pageOffset; - Integer pageLimit = parameters.pageLimit; + Long pageOffset = parameters.pageOffset; + Long pageLimit = parameters.pageLimit; // create path and map variables String localVarPath = "/api/v2/scorecard/scores/{aggregation}" @@ -2512,8 +2512,8 @@ public ApiResponse listScorecardScoresWithHttpInfo( Boolean filterRuleIsCustom = parameters.filterRuleIsCustom; Boolean filterRuleIsEnabled = parameters.filterRuleIsEnabled; String sort = parameters.sort; - Integer pageOffset = parameters.pageOffset; - Integer pageLimit = parameters.pageLimit; + Long pageOffset = parameters.pageOffset; + Long pageLimit = parameters.pageLimit; // create path and map variables String localVarPath = "/api/v2/scorecard/scores/{aggregation}" diff --git a/src/main/java/com/datadog/api/client/v2/api/SeatsApi.java b/src/main/java/com/datadog/api/client/v2/api/SeatsApi.java index b6b2db47500..534d2af0764 100644 --- a/src/main/java/com/datadog/api/client/v2/api/SeatsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/SeatsApi.java @@ -181,7 +181,7 @@ public CompletableFuture> assignSeatsUserWi /** Manage optional parameters to getSeatsUsers. */ public static class GetSeatsUsersOptionalParameters { - private Integer pageLimit; + private Long pageLimit; private String pageCursor; /** @@ -190,7 +190,7 @@ public static class GetSeatsUsersOptionalParameters { * @param pageLimit Maximum number of results to return. (optional) * @return GetSeatsUsersOptionalParameters */ - public GetSeatsUsersOptionalParameters pageLimit(Integer pageLimit) { + public GetSeatsUsersOptionalParameters pageLimit(Long pageLimit) { this.pageLimit = pageLimit; return this; } @@ -295,7 +295,7 @@ public ApiResponse getSeatsUsersWithHttpInfo( throw new ApiException( 400, "Missing the required parameter 'productCode' when calling getSeatsUsers"); } - Integer pageLimit = parameters.pageLimit; + Long pageLimit = parameters.pageLimit; String pageCursor = parameters.pageCursor; // create path and map variables String localVarPath = "/api/v2/seats/users"; @@ -348,7 +348,7 @@ public CompletableFuture> getSeatsUsersWithHttpIn 400, "Missing the required parameter 'productCode' when calling getSeatsUsers")); return result; } - Integer pageLimit = parameters.pageLimit; + Long pageLimit = parameters.pageLimit; String pageCursor = parameters.pageCursor; // create path and map variables String localVarPath = "/api/v2/seats/users"; 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 9eb3a34faf6..5a5bb5ae202 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 @@ -8,8 +8,11 @@ import com.datadog.api.client.v2.model.AnalysisRequest; import com.datadog.api.client.v2.model.AnalysisResponse; import com.datadog.api.client.v2.model.AssetType; +import com.datadog.api.client.v2.model.AssigneeRequest; +import com.datadog.api.client.v2.model.AssigneeResponse; import com.datadog.api.client.v2.model.AttachCaseRequest; import com.datadog.api.client.v2.model.AttachJiraIssueRequest; +import com.datadog.api.client.v2.model.AttachServiceNowTicketRequest; import com.datadog.api.client.v2.model.BulkMuteFindingsRequest; import com.datadog.api.client.v2.model.BulkMuteFindingsResponse; import com.datadog.api.client.v2.model.CloudAssetType; @@ -19,6 +22,7 @@ import com.datadog.api.client.v2.model.CreateCustomFrameworkResponse; import com.datadog.api.client.v2.model.CreateJiraIssueRequestArray; import com.datadog.api.client.v2.model.CreateNotificationRuleParameters; +import com.datadog.api.client.v2.model.CreateServiceNowTicketRequestArray; import com.datadog.api.client.v2.model.DefaultRulesetsPerLanguageResponse; import com.datadog.api.client.v2.model.DeleteCustomFrameworkResponse; import com.datadog.api.client.v2.model.DetachCaseRequest; @@ -52,7 +56,9 @@ import com.datadog.api.client.v2.model.MuteFindingsRequest; import com.datadog.api.client.v2.model.MuteFindingsResponse; import com.datadog.api.client.v2.model.NodeTypesResponse; +import com.datadog.api.client.v2.model.NotificationRulePreviewResponse; import com.datadog.api.client.v2.model.NotificationRuleResponse; +import com.datadog.api.client.v2.model.NotificationRulesListResponse; import com.datadog.api.client.v2.model.PatchNotificationRuleParameters; import com.datadog.api.client.v2.model.RunHistoricalJobRequest; import com.datadog.api.client.v2.model.SBOMComponentLicenseType; @@ -138,6 +144,7 @@ import com.datadog.api.client.v2.model.SecurityMonitoringTerraformExportResponse; import com.datadog.api.client.v2.model.SecurityMonitoringTerraformResourceType; import com.datadog.api.client.v2.model.SignalEntitiesResponse; +import com.datadog.api.client.v2.model.SingleEntityContextResponse; import com.datadog.api.client.v2.model.UpdateCustomFrameworkRequest; import com.datadog.api.client.v2.model.UpdateCustomFrameworkResponse; import com.datadog.api.client.v2.model.UpdateResourceEvaluationFiltersRequest; @@ -641,6 +648,161 @@ public CompletableFuture> attachJiraIssueWithHt new GenericType() {}); } + /** + * Attach security findings to a ServiceNow ticket. + * + *

See {@link #attachServiceNowTicketWithHttpInfo}. + * + * @param body (required) + * @return FindingCaseResponse + * @throws ApiException if fails to make API call + */ + public FindingCaseResponse attachServiceNowTicket(AttachServiceNowTicketRequest body) + throws ApiException { + return attachServiceNowTicketWithHttpInfo(body).getData(); + } + + /** + * Attach security findings to a ServiceNow ticket. + * + *

See {@link #attachServiceNowTicketWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<FindingCaseResponse> + */ + public CompletableFuture attachServiceNowTicketAsync( + AttachServiceNowTicketRequest body) { + return attachServiceNowTicketWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Attach security findings to a ServiceNow ticket by providing the ServiceNow ticket URL. You can + * attach up to 50 security findings per ServiceNow ticket. If the ServiceNow ticket is not linked + * to any case, this operation will create a case for the security findings and link the + * ServiceNow ticket to the newly created case. Security findings that are already attached to + * another ServiceNow ticket will be detached from their previous ServiceNow ticket and attached + * to the specified ServiceNow ticket. + * + * @param body (required) + * @return ApiResponse<FindingCaseResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse attachServiceNowTicketWithHttpInfo( + AttachServiceNowTicketRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "attachServiceNowTicket"; + 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 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling attachServiceNowTicket"); + } + // create path and map variables + String localVarPath = "/api/v2/security/findings/servicenow_tickets"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.attachServiceNowTicket", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Attach security findings to a ServiceNow ticket. + * + *

See {@link #attachServiceNowTicketWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<FindingCaseResponse>> + */ + public CompletableFuture> + attachServiceNowTicketWithHttpInfoAsync(AttachServiceNowTicketRequest body) { + // Check if unstable operation is enabled + String operationId = "attachServiceNowTicket"; + 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 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling attachServiceNowTicket")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/security/findings/servicenow_tickets"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.attachServiceNowTicket", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Get dataset dependencies. * @@ -4281,6 +4443,161 @@ public SecurityMonitoringSuppressionResponse createSecurityMonitoringSuppression new GenericType() {}); } + /** + * Create ServiceNow tickets for security findings. + * + *

See {@link #createServiceNowTicketsWithHttpInfo}. + * + * @param body (required) + * @return FindingCaseResponseArray + * @throws ApiException if fails to make API call + */ + public FindingCaseResponseArray createServiceNowTickets(CreateServiceNowTicketRequestArray body) + throws ApiException { + return createServiceNowTicketsWithHttpInfo(body).getData(); + } + + /** + * Create ServiceNow tickets for security findings. + * + *

See {@link #createServiceNowTicketsWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<FindingCaseResponseArray> + */ + public CompletableFuture createServiceNowTicketsAsync( + CreateServiceNowTicketRequestArray body) { + return createServiceNowTicketsWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create ServiceNow tickets for security findings. This operation creates a case in Datadog and a + * ServiceNow ticket linked to that case for bidirectional sync between Datadog and ServiceNow. + * You can create up to 50 ServiceNow tickets per request and associate up to 50 security findings + * per ServiceNow ticket. Security findings that are already attached to another ServiceNow ticket + * will be detached from their previous ServiceNow ticket and attached to the newly created + * ServiceNow ticket. + * + * @param body (required) + * @return ApiResponse<FindingCaseResponseArray> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 Created -
400 Bad Request -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse createServiceNowTicketsWithHttpInfo( + CreateServiceNowTicketRequestArray body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "createServiceNowTickets"; + 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 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createServiceNowTickets"); + } + // create path and map variables + String localVarPath = "/api/v2/security/findings/servicenow_tickets"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.createServiceNowTickets", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create ServiceNow tickets for security findings. + * + *

See {@link #createServiceNowTicketsWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<FindingCaseResponseArray>> + */ + public CompletableFuture> + createServiceNowTicketsWithHttpInfoAsync(CreateServiceNowTicketRequestArray body) { + // Check if unstable operation is enabled + String operationId = "createServiceNowTickets"; + 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 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling createServiceNowTickets")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/security/findings/servicenow_tickets"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.createServiceNowTickets", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Create a new signal-based notification rule. * @@ -12190,10 +12507,10 @@ public ApiResponse getSignalNotificationRuleWithHttpIn * *

See {@link #getSignalNotificationRulesWithHttpInfo}. * - * @return Object + * @return NotificationRulesListResponse * @throws ApiException if fails to make API call */ - public Object getSignalNotificationRules() throws ApiException { + public NotificationRulesListResponse getSignalNotificationRules() throws ApiException { return getSignalNotificationRulesWithHttpInfo().getData(); } @@ -12202,9 +12519,9 @@ public Object getSignalNotificationRules() throws ApiException { * *

See {@link #getSignalNotificationRulesWithHttpInfoAsync}. * - * @return CompletableFuture<Object> + * @return CompletableFuture<NotificationRulesListResponse> */ - public CompletableFuture getSignalNotificationRulesAsync() { + public CompletableFuture getSignalNotificationRulesAsync() { return getSignalNotificationRulesWithHttpInfoAsync() .thenApply( response -> { @@ -12215,7 +12532,7 @@ public CompletableFuture getSignalNotificationRulesAsync() { /** * Returns the list of notification rules for security signals. * - * @return ApiResponse<Object> + * @return ApiResponse<NotificationRulesListResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -12226,7 +12543,8 @@ public CompletableFuture getSignalNotificationRulesAsync() { * *
429 Too many requests -
*/ - public ApiResponse getSignalNotificationRulesWithHttpInfo() throws ApiException { + public ApiResponse getSignalNotificationRulesWithHttpInfo() + throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v2/security/signals/notification_rules"; @@ -12250,7 +12568,7 @@ public ApiResponse getSignalNotificationRulesWithHttpInfo() throws ApiEx localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -12258,9 +12576,10 @@ public ApiResponse getSignalNotificationRulesWithHttpInfo() throws ApiEx * *

See {@link #getSignalNotificationRulesWithHttpInfo}. * - * @return CompletableFuture<ApiResponse<Object>> + * @return CompletableFuture<ApiResponse<NotificationRulesListResponse>> */ - public CompletableFuture> getSignalNotificationRulesWithHttpInfoAsync() { + public CompletableFuture> + getSignalNotificationRulesWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v2/security/signals/notification_rules"; @@ -12279,7 +12598,8 @@ public CompletableFuture> getSignalNotificationRulesWithHttp new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -12291,11 +12611,271 @@ public CompletableFuture> getSignalNotificationRulesWithHttp localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** - * Get default rulesets for a language. + /** Manage optional parameters to getSingleEntityContext. */ + public static class GetSingleEntityContextOptionalParameters { + private String from; + private String to; + private String asOf; + + /** + * Set from. + * + * @param from The start of the time range to query, as an RFC3339 timestamp or a relative time + * (for example, now-7d). Defaults to now-7d. Ignored when + * as_of is set. (optional, default to "now-7d") + * @return GetSingleEntityContextOptionalParameters + */ + public GetSingleEntityContextOptionalParameters from(String from) { + this.from = from; + return this; + } + + /** + * Set to. + * + * @param to The end of the time range to query, as an RFC3339 timestamp or a relative time (for + * example, now). Defaults to now. Ignored when as_of + * is set. (optional, default to "now") + * @return GetSingleEntityContextOptionalParameters + */ + public GetSingleEntityContextOptionalParameters to(String to) { + this.to = to; + return this; + } + + /** + * Set asOf. + * + * @param asOf A point in time at which to query the entity revisions, as an RFC3339 timestamp, + * a Unix timestamp (in seconds), or a relative time (for example, now-1d). + * When set, from and to are ignored. Cannot be combined with + * custom from / to values. (optional) + * @return GetSingleEntityContextOptionalParameters + */ + public GetSingleEntityContextOptionalParameters asOf(String asOf) { + this.asOf = asOf; + return this; + } + } + + /** + * Get a single entity context. + * + *

See {@link #getSingleEntityContextWithHttpInfo}. + * + * @param id The unique identifier of the entity to retrieve. (required) + * @return SingleEntityContextResponse + * @throws ApiException if fails to make API call + */ + public SingleEntityContextResponse getSingleEntityContext(String id) throws ApiException { + return getSingleEntityContextWithHttpInfo(id, new GetSingleEntityContextOptionalParameters()) + .getData(); + } + + /** + * Get a single entity context. + * + *

See {@link #getSingleEntityContextWithHttpInfoAsync}. + * + * @param id The unique identifier of the entity to retrieve. (required) + * @return CompletableFuture<SingleEntityContextResponse> + */ + public CompletableFuture getSingleEntityContextAsync(String id) { + return getSingleEntityContextWithHttpInfoAsync( + id, new GetSingleEntityContextOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a single entity context. + * + *

See {@link #getSingleEntityContextWithHttpInfo}. + * + * @param id The unique identifier of the entity to retrieve. (required) + * @param parameters Optional parameters for the request. + * @return SingleEntityContextResponse + * @throws ApiException if fails to make API call + */ + public SingleEntityContextResponse getSingleEntityContext( + String id, GetSingleEntityContextOptionalParameters parameters) throws ApiException { + return getSingleEntityContextWithHttpInfo(id, parameters).getData(); + } + + /** + * Get a single entity context. + * + *

See {@link #getSingleEntityContextWithHttpInfoAsync}. + * + * @param id The unique identifier of the entity to retrieve. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SingleEntityContextResponse> + */ + public CompletableFuture getSingleEntityContextAsync( + String id, GetSingleEntityContextOptionalParameters parameters) { + return getSingleEntityContextWithHttpInfoAsync(id, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a single entity from the Cloud SIEM entity context store by its identifier, returning the + * historical revisions of the entity in the requested time range. The endpoint can either return + * revisions across an interval (from / to) or the snapshot of the + * entity at a single point in time (as_of); the two modes are mutually exclusive. + * + * @param id The unique identifier of the entity to retrieve. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<SingleEntityContextResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getSingleEntityContextWithHttpInfo( + String id, GetSingleEntityContextOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getSingleEntityContext"; + 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 'id' is set + if (id == null) { + throw new ApiException( + 400, "Missing the required parameter 'id' when calling getSingleEntityContext"); + } + String from = parameters.from; + String to = parameters.to; + String asOf = parameters.asOf; + // create path and map variables + String localVarPath = + "/api/v2/security_monitoring/entity_context/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "from", from)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "to", to)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "as_of", asOf)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.getSingleEntityContext", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get a single entity context. + * + *

See {@link #getSingleEntityContextWithHttpInfo}. + * + * @param id The unique identifier of the entity to retrieve. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<SingleEntityContextResponse>> + */ + public CompletableFuture> + getSingleEntityContextWithHttpInfoAsync( + String id, GetSingleEntityContextOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "getSingleEntityContext"; + 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 'id' is set + if (id == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'id' when calling getSingleEntityContext")); + return result; + } + String from = parameters.from; + String to = parameters.to; + String asOf = parameters.asOf; + // create path and map variables + String localVarPath = + "/api/v2/security_monitoring/entity_context/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "from", from)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "to", to)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "as_of", asOf)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.getSingleEntityContext", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get default rulesets for a language. * *

See {@link #getStaticAnalysisDefaultRulesetsWithHttpInfo}. * @@ -13803,10 +14383,10 @@ public ApiResponse getVulnerabilityNotificationRuleWit * *

See {@link #getVulnerabilityNotificationRulesWithHttpInfo}. * - * @return Object + * @return NotificationRulesListResponse * @throws ApiException if fails to make API call */ - public Object getVulnerabilityNotificationRules() throws ApiException { + public NotificationRulesListResponse getVulnerabilityNotificationRules() throws ApiException { return getVulnerabilityNotificationRulesWithHttpInfo().getData(); } @@ -13815,9 +14395,9 @@ public Object getVulnerabilityNotificationRules() throws ApiException { * *

See {@link #getVulnerabilityNotificationRulesWithHttpInfoAsync}. * - * @return CompletableFuture<Object> + * @return CompletableFuture<NotificationRulesListResponse> */ - public CompletableFuture getVulnerabilityNotificationRulesAsync() { + public CompletableFuture getVulnerabilityNotificationRulesAsync() { return getVulnerabilityNotificationRulesWithHttpInfoAsync() .thenApply( response -> { @@ -13828,7 +14408,7 @@ public CompletableFuture getVulnerabilityNotificationRulesAsync() { /** * Returns the list of notification rules for security vulnerabilities. * - * @return ApiResponse<Object> + * @return ApiResponse<NotificationRulesListResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -13839,7 +14419,8 @@ public CompletableFuture getVulnerabilityNotificationRulesAsync() { * *
429 Too many requests -
*/ - public ApiResponse getVulnerabilityNotificationRulesWithHttpInfo() throws ApiException { + public ApiResponse getVulnerabilityNotificationRulesWithHttpInfo() + throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/v2/security/vulnerabilities/notification_rules"; @@ -13863,7 +14444,7 @@ public ApiResponse getVulnerabilityNotificationRulesWithHttpInfo() throw localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -13871,9 +14452,9 @@ public ApiResponse getVulnerabilityNotificationRulesWithHttpInfo() throw * *

See {@link #getVulnerabilityNotificationRulesWithHttpInfo}. * - * @return CompletableFuture<ApiResponse<Object>> + * @return CompletableFuture<ApiResponse<NotificationRulesListResponse>> */ - public CompletableFuture> + public CompletableFuture> getVulnerabilityNotificationRulesWithHttpInfoAsync() { Object localVarPostBody = null; // create path and map variables @@ -13893,7 +14474,8 @@ public ApiResponse getVulnerabilityNotificationRulesWithHttpInfo() throw new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -13905,7 +14487,7 @@ public ApiResponse getVulnerabilityNotificationRulesWithHttpInfo() throw localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** Manage optional parameters to listAssetsSBOMs. */ @@ -20546,28 +21128,32 @@ public ApiResponse patchVulnerabilityNotificationRuleW } /** - * Run a historical job. + * Restore a rule to a historical version. * - *

See {@link #runHistoricalJobWithHttpInfo}. + *

See {@link #restoreSecurityMonitoringRuleWithHttpInfo}. * - * @param body (required) - * @return JobCreateResponse + * @param ruleId The ID of the rule. (required) + * @param version The historical version number of the rule. (required) + * @return SecurityMonitoringRuleResponse * @throws ApiException if fails to make API call */ - public JobCreateResponse runHistoricalJob(RunHistoricalJobRequest body) throws ApiException { - return runHistoricalJobWithHttpInfo(body).getData(); + public SecurityMonitoringRuleResponse restoreSecurityMonitoringRule(String ruleId, Long version) + throws ApiException { + return restoreSecurityMonitoringRuleWithHttpInfo(ruleId, version).getData(); } /** - * Run a historical job. + * Restore a rule to a historical version. * - *

See {@link #runHistoricalJobWithHttpInfoAsync}. + *

See {@link #restoreSecurityMonitoringRuleWithHttpInfoAsync}. * - * @param body (required) - * @return CompletableFuture<JobCreateResponse> + * @param ruleId The ID of the rule. (required) + * @param version The historical version number of the rule. (required) + * @return CompletableFuture<SecurityMonitoringRuleResponse> */ - public CompletableFuture runHistoricalJobAsync(RunHistoricalJobRequest body) { - return runHistoricalJobWithHttpInfoAsync(body) + public CompletableFuture restoreSecurityMonitoringRuleAsync( + String ruleId, Long version) { + return restoreSecurityMonitoringRuleWithHttpInfoAsync(ruleId, version) .thenApply( response -> { return response.getData(); @@ -20575,47 +21161,61 @@ public CompletableFuture runHistoricalJobAsync(RunHistoricalJ } /** - * Run a historical job. + * Restores a custom detection rule to a previously saved historical version. Only custom rules + * can be restored. Default and partner rules return 400. The restore creates a new version entry; + * it does not overwrite history. * - * @param body (required) - * @return ApiResponse<JobCreateResponse> + * @param ruleId The ID of the rule. (required) + * @param version The historical version number of the rule. (required) + * @return ApiResponse<SecurityMonitoringRuleResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * - * * * + * * *
Response details
Status Code Description Response Headers
201 Status created -
200 OK -
400 Bad Request -
401 Concurrent Modification -
403 Not Authorized -
404 Not Found -
409 Conflict -
429 Too many requests -
*/ - public ApiResponse runHistoricalJobWithHttpInfo(RunHistoricalJobRequest body) - throws ApiException { + public ApiResponse restoreSecurityMonitoringRuleWithHttpInfo( + String ruleId, Long version) throws ApiException { // Check if unstable operation is enabled - String operationId = "runHistoricalJob"; + String operationId = "restoreSecurityMonitoringRule"; 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; + Object localVarPostBody = null; - // verify the required parameter 'body' is set - if (body == null) { + // verify the required parameter 'ruleId' is set + if (ruleId == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling runHistoricalJob"); + 400, + "Missing the required parameter 'ruleId' when calling restoreSecurityMonitoringRule"); + } + + // verify the required parameter 'version' is set + if (version == null) { + throw new ApiException( + 400, + "Missing the required parameter 'version' when calling restoreSecurityMonitoringRule"); } // create path and map variables - String localVarPath = "/api/v2/siem-historical-detections/jobs"; + String localVarPath = + "/api/v2/security_monitoring/rules/{rule_id}/restore/{version}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())) + .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.SecurityMonitoringApi.runHistoricalJob", + "v2.SecurityMonitoringApi.restoreSecurityMonitoringRule", localVarPath, new ArrayList(), localVarHeaderParams, @@ -20626,19 +21226,190 @@ public ApiResponse runHistoricalJobWithHttpInfo(RunHistorical "POST", builder, localVarHeaderParams, - new String[] {"application/json"}, + new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Run a historical job. + * Restore a rule to a historical version. * - *

See {@link #runHistoricalJobWithHttpInfo}. + *

See {@link #restoreSecurityMonitoringRuleWithHttpInfo}. * - * @param body (required) + * @param ruleId The ID of the rule. (required) + * @param version The historical version number of the rule. (required) + * @return CompletableFuture<ApiResponse<SecurityMonitoringRuleResponse>> + */ + public CompletableFuture> + restoreSecurityMonitoringRuleWithHttpInfoAsync(String ruleId, Long version) { + // Check if unstable operation is enabled + String operationId = "restoreSecurityMonitoringRule"; + 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 'ruleId' is set + if (ruleId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'ruleId' when calling" + + " restoreSecurityMonitoringRule")); + return result; + } + + // verify the required parameter 'version' is set + if (version == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'version' when calling" + + " restoreSecurityMonitoringRule")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/security_monitoring/rules/{rule_id}/restore/{version}" + .replaceAll("\\{" + "rule_id" + "\\}", apiClient.escapeString(ruleId.toString())) + .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.restoreSecurityMonitoringRule", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Run a historical job. + * + *

See {@link #runHistoricalJobWithHttpInfo}. + * + * @param body (required) + * @return JobCreateResponse + * @throws ApiException if fails to make API call + */ + public JobCreateResponse runHistoricalJob(RunHistoricalJobRequest body) throws ApiException { + return runHistoricalJobWithHttpInfo(body).getData(); + } + + /** + * Run a historical job. + * + *

See {@link #runHistoricalJobWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<JobCreateResponse> + */ + public CompletableFuture runHistoricalJobAsync(RunHistoricalJobRequest body) { + return runHistoricalJobWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Run a historical job. + * + * @param body (required) + * @return ApiResponse<JobCreateResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 Status created -
400 Bad Request -
401 Concurrent Modification -
403 Not Authorized -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse runHistoricalJobWithHttpInfo(RunHistoricalJobRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "runHistoricalJob"; + 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 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling runHistoricalJob"); + } + // create path and map variables + String localVarPath = "/api/v2/siem-historical-detections/jobs"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.runHistoricalJob", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Run a historical job. + * + *

See {@link #runHistoricalJobWithHttpInfo}. + * + * @param body (required) * @return CompletableFuture<ApiResponse<JobCreateResponse>> */ public CompletableFuture> runHistoricalJobWithHttpInfoAsync( @@ -21321,6 +22092,149 @@ public PaginationIterable searchSecurityMonitoringSign new GenericType() {}); } + /** + * Test a notification rule. + * + *

See {@link #sendSecurityMonitoringNotificationPreviewWithHttpInfo}. + * + * @param body (required) + * @return NotificationRulePreviewResponse + * @throws ApiException if fails to make API call + */ + public NotificationRulePreviewResponse sendSecurityMonitoringNotificationPreview( + CreateNotificationRuleParameters body) throws ApiException { + return sendSecurityMonitoringNotificationPreviewWithHttpInfo(body).getData(); + } + + /** + * Test a notification rule. + * + *

See {@link #sendSecurityMonitoringNotificationPreviewWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<NotificationRulePreviewResponse> + */ + public CompletableFuture + sendSecurityMonitoringNotificationPreviewAsync(CreateNotificationRuleParameters body) { + return sendSecurityMonitoringNotificationPreviewWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Send a notification preview to test that a notification rule's targets are properly configured. + * + * @param body (required) + * @return ApiResponse<NotificationRulePreviewResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Not Authorized -
429 Too many requests -
+ */ + public ApiResponse + sendSecurityMonitoringNotificationPreviewWithHttpInfo(CreateNotificationRuleParameters 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" + + " sendSecurityMonitoringNotificationPreview"); + } + // create path and map variables + String localVarPath = + "/api/v2/security_monitoring/configuration/notification_rules/send_notification_preview"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.sendSecurityMonitoringNotificationPreview", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Test a notification rule. + * + *

See {@link #sendSecurityMonitoringNotificationPreviewWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<NotificationRulePreviewResponse>> + */ + public CompletableFuture> + sendSecurityMonitoringNotificationPreviewWithHttpInfoAsync( + CreateNotificationRuleParameters 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" + + " sendSecurityMonitoringNotificationPreview")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/security_monitoring/configuration/notification_rules/send_notification_preview"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.sendSecurityMonitoringNotificationPreview", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Test an existing rule. * @@ -21812,6 +22726,158 @@ public ApiResponse updateCustomFrameworkWithHttpI new GenericType() {}); } + /** + * Assign or unassign security findings. + * + *

See {@link #updateFindingsAssigneeWithHttpInfo}. + * + * @param body (required) + * @return AssigneeResponse + * @throws ApiException if fails to make API call + */ + public AssigneeResponse updateFindingsAssignee(AssigneeRequest body) throws ApiException { + return updateFindingsAssigneeWithHttpInfo(body).getData(); + } + + /** + * Assign or unassign security findings. + * + *

See {@link #updateFindingsAssigneeWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<AssigneeResponse> + */ + public CompletableFuture updateFindingsAssigneeAsync(AssigneeRequest body) { + return updateFindingsAssigneeWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Assign or unassign security findings. You can assign up to 100 security findings per request. + * Set assignee_id to the unique identifier of the Datadog user you want to assign + * the findings to. Omit assignee_id (or set it to null) to unassign the + * findings. Per-finding warnings and failures are returned in the response meta + * object. + * + * @param body (required) + * @return ApiResponse<AssigneeResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
202 Accepted -
400 Bad Request -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse updateFindingsAssigneeWithHttpInfo(AssigneeRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateFindingsAssignee"; + 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 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateFindingsAssignee"); + } + // create path and map variables + String localVarPath = "/api/v2/security/findings/assignee"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.updateFindingsAssignee", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Assign or unassign security findings. + * + *

See {@link #updateFindingsAssigneeWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<AssigneeResponse>> + */ + public CompletableFuture> updateFindingsAssigneeWithHttpInfoAsync( + AssigneeRequest body) { + // Check if unstable operation is enabled + String operationId = "updateFindingsAssignee"; + 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 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling updateFindingsAssignee")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/security/findings/assignee"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SecurityMonitoringApi.updateFindingsAssignee", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Update resource filters. * diff --git a/src/main/java/com/datadog/api/client/v2/api/SlackIntegrationApi.java b/src/main/java/com/datadog/api/client/v2/api/SlackIntegrationApi.java new file mode 100644 index 00000000000..9fb94d3e6ea --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/SlackIntegrationApi.java @@ -0,0 +1,184 @@ +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.SlackUserBindingsResponse; +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.UUID; +import java.util.concurrent.CompletableFuture; + +@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()); + } + + public SlackIntegrationApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client. + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client. + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * List Slack user bindings. + * + *

See {@link #listSlackUserBindingsWithHttpInfo}. + * + * @param userUuid The UUID of the Datadog user to list Slack bindings for. (required) + * @return SlackUserBindingsResponse + * @throws ApiException if fails to make API call + */ + public SlackUserBindingsResponse listSlackUserBindings(UUID userUuid) throws ApiException { + return listSlackUserBindingsWithHttpInfo(userUuid).getData(); + } + + /** + * List Slack user bindings. + * + *

See {@link #listSlackUserBindingsWithHttpInfoAsync}. + * + * @param userUuid The UUID of the Datadog user to list Slack bindings for. (required) + * @return CompletableFuture<SlackUserBindingsResponse> + */ + public CompletableFuture listSlackUserBindingsAsync(UUID userUuid) { + return listSlackUserBindingsWithHttpInfoAsync(userUuid) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all Slack user bindings for a given Datadog user from the Datadog Slack integration. + * + * @param userUuid The UUID of the Datadog user to list Slack bindings for. (required) + * @return ApiResponse<SlackUserBindingsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse listSlackUserBindingsWithHttpInfo(UUID userUuid) + throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'userUuid' is set + if (userUuid == null) { + throw new ApiException( + 400, "Missing the required parameter 'userUuid' when calling listSlackUserBindings"); + } + // create path and map variables + String localVarPath = "/api/v2/integration/slack/user-bindings"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "user_uuid", userUuid)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SlackIntegrationApi.listSlackUserBindings", + 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 Slack user bindings. + * + *

See {@link #listSlackUserBindingsWithHttpInfo}. + * + * @param userUuid The UUID of the Datadog user to list Slack bindings for. (required) + * @return CompletableFuture<ApiResponse<SlackUserBindingsResponse>> + */ + public CompletableFuture> + listSlackUserBindingsWithHttpInfoAsync(UUID userUuid) { + Object localVarPostBody = null; + + // verify the required parameter 'userUuid' is set + if (userUuid == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'userUuid' when calling listSlackUserBindings")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/integration/slack/user-bindings"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "user_uuid", userUuid)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SlackIntegrationApi.listSlackUserBindings", + 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() {}); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/api/StaticAnalysisApi.java b/src/main/java/com/datadog/api/client/v2/api/StaticAnalysisApi.java index 6eab587186d..566d7141bc1 100644 --- a/src/main/java/com/datadog/api/client/v2/api/StaticAnalysisApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/StaticAnalysisApi.java @@ -27,10 +27,14 @@ import com.datadog.api.client.v2.model.CustomRulesetListResponse; import com.datadog.api.client.v2.model.CustomRulesetRequest; import com.datadog.api.client.v2.model.CustomRulesetResponse; +import com.datadog.api.client.v2.model.LicensesListResponse; +import com.datadog.api.client.v2.model.McpScanRequest; +import com.datadog.api.client.v2.model.McpScanRequestResponse; import com.datadog.api.client.v2.model.ResolveVulnerableSymbolsRequest; import com.datadog.api.client.v2.model.ResolveVulnerableSymbolsResponse; import com.datadog.api.client.v2.model.RevertCustomRuleRevisionRequest; import com.datadog.api.client.v2.model.ScaRequest; +import com.datadog.api.client.v2.model.ScanResultResponse; import jakarta.ws.rs.client.Invocation; import jakarta.ws.rs.core.GenericType; import java.util.ArrayList; @@ -1578,6 +1582,151 @@ public CompletableFuture> createSCAResultWithHttpInfoAsync(Sca null); } + /** + * Submit libraries for vulnerability scanning. + * + *

See {@link #createSCAScanWithHttpInfo}. + * + * @param body (required) + * @return McpScanRequestResponse + * @throws ApiException if fails to make API call + */ + public McpScanRequestResponse createSCAScan(McpScanRequest body) throws ApiException { + return createSCAScanWithHttpInfo(body).getData(); + } + + /** + * Submit libraries for vulnerability scanning. + * + *

See {@link #createSCAScanWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<McpScanRequestResponse> + */ + public CompletableFuture createSCAScanAsync(McpScanRequest body) { + return createSCAScanWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * @param body (required) + * @return ApiResponse<McpScanRequestResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
202 Accepted -
400 Bad Request -
429 Too many requests -
+ */ + public ApiResponse createSCAScanWithHttpInfo(McpScanRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "createSCAScan"; + 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 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createSCAScan"); + } + // create path and map variables + String localVarPath = "/api/v2/static-analysis-sca/dependencies/scan"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.StaticAnalysisApi.createSCAScan", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Submit libraries for vulnerability scanning. + * + *

See {@link #createSCAScanWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<McpScanRequestResponse>> + */ + public CompletableFuture> createSCAScanWithHttpInfoAsync( + McpScanRequest body) { + // Check if unstable operation is enabled + String operationId = "createSCAScan"; + 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 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling createSCAScan")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/static-analysis-sca/dependencies/scan"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.StaticAnalysisApi.createSCAScan", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Delete an AI custom rule. * @@ -3467,6 +3616,152 @@ public CompletableFuture> getCustomRulesetWit new GenericType() {}); } + /** + * Retrieve a dependency scan result. + * + *

See {@link #getSCAScanWithHttpInfo}. + * + * @param jobId The job identifier returned when the scan was submitted. (required) + * @return ScanResultResponse + * @throws ApiException if fails to make API call + */ + public ScanResultResponse getSCAScan(String jobId) throws ApiException { + return getSCAScanWithHttpInfo(jobId).getData(); + } + + /** + * Retrieve a dependency scan result. + * + *

See {@link #getSCAScanWithHttpInfoAsync}. + * + * @param jobId The job identifier returned when the scan was submitted. (required) + * @return CompletableFuture<ScanResultResponse> + */ + public CompletableFuture getSCAScanAsync(String jobId) { + return getSCAScanWithHttpInfoAsync(jobId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * @param jobId The job identifier returned when the scan was submitted. (required) + * @return ApiResponse<ScanResultResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getSCAScanWithHttpInfo(String jobId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getSCAScan"; + 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 'jobId' is set + if (jobId == null) { + throw new ApiException(400, "Missing the required parameter 'jobId' when calling getSCAScan"); + } + // create path and map variables + String localVarPath = + "/api/v2/static-analysis-sca/dependencies/scan/{job_id}" + .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.StaticAnalysisApi.getSCAScan", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Retrieve a dependency scan result. + * + *

See {@link #getSCAScanWithHttpInfo}. + * + * @param jobId The job identifier returned when the scan was submitted. (required) + * @return CompletableFuture<ApiResponse<ScanResultResponse>> + */ + public CompletableFuture> getSCAScanWithHttpInfoAsync( + String jobId) { + // Check if unstable operation is enabled + String operationId = "getSCAScan"; + 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 'jobId' is set + if (jobId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(400, "Missing the required parameter 'jobId' when calling getSCAScan")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/static-analysis-sca/dependencies/scan/{job_id}" + .replaceAll("\\{" + "job_id" + "\\}", apiClient.escapeString(jobId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.StaticAnalysisApi.getSCAScan", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** Manage optional parameters to listAiCustomRuleRevisions. */ public static class ListAiCustomRuleRevisionsOptionalParameters { private Long pageOffset; @@ -4271,8 +4566,8 @@ public CompletableFuture> listAiPromptsWithHttpIn /** Manage optional parameters to listCustomRuleRevisions. */ public static class ListCustomRuleRevisionsOptionalParameters { - private Integer pageOffset; - private Integer pageLimit; + private Long pageOffset; + private Long pageLimit; /** * Set pageOffset. @@ -4280,7 +4575,7 @@ public static class ListCustomRuleRevisionsOptionalParameters { * @param pageOffset Pagination offset (optional, default to 0) * @return ListCustomRuleRevisionsOptionalParameters */ - public ListCustomRuleRevisionsOptionalParameters pageOffset(Integer pageOffset) { + public ListCustomRuleRevisionsOptionalParameters pageOffset(Long pageOffset) { this.pageOffset = pageOffset; return this; } @@ -4291,7 +4586,7 @@ public ListCustomRuleRevisionsOptionalParameters pageOffset(Integer pageOffset) * @param pageLimit Pagination limit (optional, default to 10) * @return ListCustomRuleRevisionsOptionalParameters */ - public ListCustomRuleRevisionsOptionalParameters pageLimit(Integer pageLimit) { + public ListCustomRuleRevisionsOptionalParameters pageLimit(Long pageLimit) { this.pageLimit = pageLimit; return this; } @@ -4400,10 +4695,10 @@ public PaginationIterable listCustomRuleRevisionsWithPaginat String valueGetterPath = ""; String valueSetterPath = "pageOffset"; Boolean valueSetterParamOptional = true; - Integer limit; + Long limit; if (parameters.pageLimit == null) { - limit = 10; + limit = 10l; parameters.pageLimit(limit); } else { limit = parameters.pageLimit; @@ -4473,8 +4768,8 @@ public ApiResponse listCustomRuleRevisionsWithHttpI throw new ApiException( 400, "Missing the required parameter 'ruleName' when calling listCustomRuleRevisions"); } - Integer pageOffset = parameters.pageOffset; - Integer pageLimit = parameters.pageLimit; + Long pageOffset = parameters.pageOffset; + Long pageLimit = parameters.pageLimit; // create path and map variables String localVarPath = "/api/v2/static-analysis/custom/rulesets/{ruleset_name}/rules/{rule_name}/revisions" @@ -4557,8 +4852,8 @@ public ApiResponse listCustomRuleRevisionsWithHttpI "Missing the required parameter 'ruleName' when calling listCustomRuleRevisions")); return result; } - Integer pageOffset = parameters.pageOffset; - Integer pageLimit = parameters.pageLimit; + Long pageOffset = parameters.pageOffset; + Long pageLimit = parameters.pageLimit; // create path and map variables String localVarPath = "/api/v2/static-analysis/custom/rulesets/{ruleset_name}/rules/{rule_name}/revisions" @@ -4728,6 +5023,129 @@ public ApiResponse listCustomRulesetsWithHttpInfo() new GenericType() {}); } + /** + * Get the list of SPDX licenses. + * + *

See {@link #listSCALicensesWithHttpInfo}. + * + * @return LicensesListResponse + * @throws ApiException if fails to make API call + */ + public LicensesListResponse listSCALicenses() throws ApiException { + return listSCALicensesWithHttpInfo().getData(); + } + + /** + * Get the list of SPDX licenses. + * + *

See {@link #listSCALicensesWithHttpInfoAsync}. + * + * @return CompletableFuture<LicensesListResponse> + */ + public CompletableFuture listSCALicensesAsync() { + return listSCALicensesWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * @return ApiResponse<LicensesListResponse> + * @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 listSCALicensesWithHttpInfo() throws ApiException { + // Check if unstable operation is enabled + String operationId = "listSCALicenses"; + 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; + // create path and map variables + String localVarPath = "/api/v2/static-analysis-sca/licenses/list"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.StaticAnalysisApi.listSCALicenses", + 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 list of SPDX licenses. + * + *

See {@link #listSCALicensesWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<LicensesListResponse>> + */ + public CompletableFuture> listSCALicensesWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "listSCALicenses"; + 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; + // create path and map variables + String localVarPath = "/api/v2/static-analysis-sca/licenses/list"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.StaticAnalysisApi.listSCALicenses", + 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() {}); + } + /** * Revert Custom Rule Revision. * diff --git a/src/main/java/com/datadog/api/client/v2/api/StatusPagesApi.java b/src/main/java/com/datadog/api/client/v2/api/StatusPagesApi.java index 96e8da1022d..5e4b0009531 100644 --- a/src/main/java/com/datadog/api/client/v2/api/StatusPagesApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/StatusPagesApi.java @@ -2909,8 +2909,8 @@ public CompletableFuture> listComponentsW /** Manage optional parameters to listDegradations. */ public static class ListDegradationsOptionalParameters { private String filterPageId; - private Integer pageOffset; - private Integer pageLimit; + private Long pageOffset; + private Long pageLimit; private String include; private String filterStatus; private String sort; @@ -2932,7 +2932,7 @@ public ListDegradationsOptionalParameters filterPageId(String filterPageId) { * @param pageOffset Offset to use as the start of the page. (optional, default to 0) * @return ListDegradationsOptionalParameters */ - public ListDegradationsOptionalParameters pageOffset(Integer pageOffset) { + public ListDegradationsOptionalParameters pageOffset(Long pageOffset) { this.pageOffset = pageOffset; return this; } @@ -2943,7 +2943,7 @@ public ListDegradationsOptionalParameters pageOffset(Integer pageOffset) { * @param pageLimit The number of degradations to return per page. (optional, default to 50) * @return ListDegradationsOptionalParameters */ - public ListDegradationsOptionalParameters pageLimit(Integer pageLimit) { + public ListDegradationsOptionalParameters pageLimit(Long pageLimit) { this.pageLimit = pageLimit; return this; } @@ -3061,8 +3061,8 @@ public ApiResponse listDegradationsWithHttpInfo( ListDegradationsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; String filterPageId = parameters.filterPageId; - Integer pageOffset = parameters.pageOffset; - Integer pageLimit = parameters.pageLimit; + Long pageOffset = parameters.pageOffset; + Long pageLimit = parameters.pageLimit; String include = parameters.include; String filterStatus = parameters.filterStatus; String sort = parameters.sort; @@ -3111,8 +3111,8 @@ public CompletableFuture> listDegradationsWithHttp ListDegradationsOptionalParameters parameters) { Object localVarPostBody = null; String filterPageId = parameters.filterPageId; - Integer pageOffset = parameters.pageOffset; - Integer pageLimit = parameters.pageLimit; + Long pageOffset = parameters.pageOffset; + Long pageLimit = parameters.pageLimit; String include = parameters.include; String filterStatus = parameters.filterStatus; String sort = parameters.sort; @@ -3159,8 +3159,8 @@ public CompletableFuture> listDegradationsWithHttp /** Manage optional parameters to listMaintenances. */ public static class ListMaintenancesOptionalParameters { private String filterPageId; - private Integer pageOffset; - private Integer pageLimit; + private Long pageOffset; + private Long pageLimit; private String include; private String filterStatus; private String sort; @@ -3182,7 +3182,7 @@ public ListMaintenancesOptionalParameters filterPageId(String filterPageId) { * @param pageOffset Offset to use as the start of the page. (optional, default to 0) * @return ListMaintenancesOptionalParameters */ - public ListMaintenancesOptionalParameters pageOffset(Integer pageOffset) { + public ListMaintenancesOptionalParameters pageOffset(Long pageOffset) { this.pageOffset = pageOffset; return this; } @@ -3193,7 +3193,7 @@ public ListMaintenancesOptionalParameters pageOffset(Integer pageOffset) { * @param pageLimit The number of maintenances to return per page. (optional, default to 50) * @return ListMaintenancesOptionalParameters */ - public ListMaintenancesOptionalParameters pageLimit(Integer pageLimit) { + public ListMaintenancesOptionalParameters pageLimit(Long pageLimit) { this.pageLimit = pageLimit; return this; } @@ -3311,8 +3311,8 @@ public ApiResponse listMaintenancesWithHttpInfo( ListMaintenancesOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; String filterPageId = parameters.filterPageId; - Integer pageOffset = parameters.pageOffset; - Integer pageLimit = parameters.pageLimit; + Long pageOffset = parameters.pageOffset; + Long pageLimit = parameters.pageLimit; String include = parameters.include; String filterStatus = parameters.filterStatus; String sort = parameters.sort; @@ -3361,8 +3361,8 @@ public CompletableFuture> listMaintenancesWithHttp ListMaintenancesOptionalParameters parameters) { Object localVarPostBody = null; String filterPageId = parameters.filterPageId; - Integer pageOffset = parameters.pageOffset; - Integer pageLimit = parameters.pageLimit; + Long pageOffset = parameters.pageOffset; + Long pageLimit = parameters.pageLimit; String include = parameters.include; String filterStatus = parameters.filterStatus; String sort = parameters.sort; @@ -3408,8 +3408,8 @@ public CompletableFuture> listMaintenancesWithHttp /** Manage optional parameters to listStatusPages. */ public static class ListStatusPagesOptionalParameters { - private Integer pageOffset; - private Integer pageLimit; + private Long pageOffset; + private Long pageLimit; private String filterDomainPrefix; private String include; @@ -3419,7 +3419,7 @@ public static class ListStatusPagesOptionalParameters { * @param pageOffset Offset to use as the start of the page. (optional, default to 0) * @return ListStatusPagesOptionalParameters */ - public ListStatusPagesOptionalParameters pageOffset(Integer pageOffset) { + public ListStatusPagesOptionalParameters pageOffset(Long pageOffset) { this.pageOffset = pageOffset; return this; } @@ -3430,7 +3430,7 @@ public ListStatusPagesOptionalParameters pageOffset(Integer pageOffset) { * @param pageLimit The number of status pages to return per page. (optional, default to 50) * @return ListStatusPagesOptionalParameters */ - public ListStatusPagesOptionalParameters pageLimit(Integer pageLimit) { + public ListStatusPagesOptionalParameters pageLimit(Long pageLimit) { this.pageLimit = pageLimit; return this; } @@ -3535,8 +3535,8 @@ public CompletableFuture listStatusPagesAsync( public ApiResponse listStatusPagesWithHttpInfo( ListStatusPagesOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; - Integer pageOffset = parameters.pageOffset; - Integer pageLimit = parameters.pageLimit; + Long pageOffset = parameters.pageOffset; + Long pageLimit = parameters.pageLimit; String filterDomainPrefix = parameters.filterDomainPrefix; String include = parameters.include; // create path and map variables @@ -3582,8 +3582,8 @@ public ApiResponse listStatusPagesWithHttpInfo( public CompletableFuture> listStatusPagesWithHttpInfoAsync( ListStatusPagesOptionalParameters parameters) { Object localVarPostBody = null; - Integer pageOffset = parameters.pageOffset; - Integer pageLimit = parameters.pageLimit; + Long pageOffset = parameters.pageOffset; + Long pageLimit = parameters.pageLimit; String filterDomainPrefix = parameters.filterDomainPrefix; String include = parameters.include; // create path and map variables diff --git a/src/main/java/com/datadog/api/client/v2/api/StegadographyApi.java b/src/main/java/com/datadog/api/client/v2/api/StegadographyApi.java new file mode 100644 index 00000000000..c7a1189948f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/StegadographyApi.java @@ -0,0 +1,195 @@ +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.StegadographyGetWidgetsResponse; +import jakarta.ws.rs.client.Invocation; +import jakarta.ws.rs.core.GenericType; +import java.io.File; +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") +public class StegadographyApi { + private ApiClient apiClient; + + public StegadographyApi() { + this(ApiClient.getDefaultApiClient()); + } + + public StegadographyApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client. + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client. + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get widgets from an image. + * + *

See {@link #getStegadographyWidgetsWithHttpInfo}. + * + * @param image PNG image file to scan for embedded watermarks. (required) + * @return StegadographyGetWidgetsResponse + * @throws ApiException if fails to make API call + */ + public StegadographyGetWidgetsResponse getStegadographyWidgets(File image) throws ApiException { + return getStegadographyWidgetsWithHttpInfo(image).getData(); + } + + /** + * Get widgets from an image. + * + *

See {@link #getStegadographyWidgetsWithHttpInfoAsync}. + * + * @param image PNG image file to scan for embedded watermarks. (required) + * @return CompletableFuture<StegadographyGetWidgetsResponse> + */ + public CompletableFuture getStegadographyWidgetsAsync( + File image) { + return getStegadographyWidgetsWithHttpInfoAsync(image) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Extracts watermarks from a PNG image and returns the cached widget data associated with each + * watermark found. The image must be uploaded as a multipart/form-data request with + * the file in the image field. Only widgets belonging to the authenticated + * organization are returned. + * + * @param image PNG image file to scan for embedded watermarks. (required) + * @return ApiResponse<StegadographyGetWidgetsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
415 Unsupported Media Type -
429 Too many requests -
500 Internal Server Error -
+ */ + public ApiResponse getStegadographyWidgetsWithHttpInfo( + File image) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'image' is set + if (image == null) { + throw new ApiException( + 400, "Missing the required parameter 'image' when calling getStegadographyWidgets"); + } + // create path and map variables + String localVarPath = "/api/v2/stegadography/get-widgets"; + + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (image != null) { + localVarFormParams.put("image", image); + } + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.StegadographyApi.getStegadographyWidgets", + 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() {}); + } + + /** + * Get widgets from an image. + * + *

See {@link #getStegadographyWidgetsWithHttpInfo}. + * + * @param image PNG image file to scan for embedded watermarks. (required) + * @return CompletableFuture<ApiResponse<StegadographyGetWidgetsResponse>> + */ + public CompletableFuture> + getStegadographyWidgetsWithHttpInfoAsync(File image) { + Object localVarPostBody = null; + + // verify the required parameter 'image' is set + if (image == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'image' when calling getStegadographyWidgets")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/stegadography/get-widgets"; + + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (image != null) { + localVarFormParams.put("image", image); + } + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.StegadographyApi.getStegadographyWidgets", + 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() {}); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/api/TagPoliciesApi.java b/src/main/java/com/datadog/api/client/v2/api/TagPoliciesApi.java new file mode 100644 index 00000000000..3cec2991fcf --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/TagPoliciesApi.java @@ -0,0 +1,1360 @@ +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.TagPoliciesListResponse; +import com.datadog.api.client.v2.model.TagPolicyCreateRequest; +import com.datadog.api.client.v2.model.TagPolicyInclude; +import com.datadog.api.client.v2.model.TagPolicyResponse; +import com.datadog.api.client.v2.model.TagPolicyScoreResponse; +import com.datadog.api.client.v2.model.TagPolicySource; +import com.datadog.api.client.v2.model.TagPolicyUpdateRequest; +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; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagPoliciesApi { + private ApiClient apiClient; + + public TagPoliciesApi() { + this(ApiClient.getDefaultApiClient()); + } + + public TagPoliciesApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client. + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client. + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Create a tag policy. + * + *

See {@link #createTagPolicyWithHttpInfo}. + * + * @param body (required) + * @return TagPolicyResponse + * @throws ApiException if fails to make API call + */ + public TagPolicyResponse createTagPolicy(TagPolicyCreateRequest body) throws ApiException { + return createTagPolicyWithHttpInfo(body).getData(); + } + + /** + * Create a tag policy. + * + *

See {@link #createTagPolicyWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<TagPolicyResponse> + */ + public CompletableFuture createTagPolicyAsync(TagPolicyCreateRequest body) { + return createTagPolicyWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create a new tag policy for the organization. The caller's organization is derived from the + * authenticated user; cross-organization creation is not supported. Fields such as + * policy_id, version, and the timestamp/audit fields are assigned by the + * server. + * + * @param body (required) + * @return ApiResponse<TagPolicyResponse> + * @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 -
409 Conflict -
429 Too many requests -
+ */ + public ApiResponse createTagPolicyWithHttpInfo(TagPolicyCreateRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "createTagPolicy"; + 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 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createTagPolicy"); + } + // create path and map variables + String localVarPath = "/api/v2/tag-policies"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.TagPoliciesApi.createTagPolicy", + 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 policy. + * + *

See {@link #createTagPolicyWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<TagPolicyResponse>> + */ + public CompletableFuture> createTagPolicyWithHttpInfoAsync( + TagPolicyCreateRequest body) { + // Check if unstable operation is enabled + String operationId = "createTagPolicy"; + 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 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling createTagPolicy")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/tag-policies"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.TagPoliciesApi.createTagPolicy", + 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 deleteTagPolicy. */ + public static class DeleteTagPolicyOptionalParameters { + private Boolean hardDelete; + + /** + * Set hardDelete. + * + * @param hardDelete Whether to permanently delete the policy instead of performing a soft + * delete. Defaults to false. (optional) + * @return DeleteTagPolicyOptionalParameters + */ + public DeleteTagPolicyOptionalParameters hardDelete(Boolean hardDelete) { + this.hardDelete = hardDelete; + return this; + } + } + + /** + * Delete a tag policy. + * + *

See {@link #deleteTagPolicyWithHttpInfo}. + * + * @param policyId The unique identifier of the tag policy to delete. (required) + * @throws ApiException if fails to make API call + */ + public void deleteTagPolicy(String policyId) throws ApiException { + deleteTagPolicyWithHttpInfo(policyId, new DeleteTagPolicyOptionalParameters()); + } + + /** + * Delete a tag policy. + * + *

See {@link #deleteTagPolicyWithHttpInfoAsync}. + * + * @param policyId The unique identifier of the tag policy to delete. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteTagPolicyAsync(String policyId) { + return deleteTagPolicyWithHttpInfoAsync(policyId, new DeleteTagPolicyOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete a tag policy. + * + *

See {@link #deleteTagPolicyWithHttpInfo}. + * + * @param policyId The unique identifier of the tag policy to delete. (required) + * @param parameters Optional parameters for the request. + * @throws ApiException if fails to make API call + */ + public void deleteTagPolicy(String policyId, DeleteTagPolicyOptionalParameters parameters) + throws ApiException { + deleteTagPolicyWithHttpInfo(policyId, parameters); + } + + /** + * Delete a tag policy. + * + *

See {@link #deleteTagPolicyWithHttpInfoAsync}. + * + * @param policyId The unique identifier of the tag policy to delete. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture + */ + public CompletableFuture deleteTagPolicyAsync( + String policyId, DeleteTagPolicyOptionalParameters parameters) { + return deleteTagPolicyWithHttpInfoAsync(policyId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete a tag policy. By default the policy is soft-deleted so it can be recovered later and so + * that historical score data remains queryable. Pass hard_delete=true to remove the + * policy permanently. + * + * @param policyId The unique identifier of the tag policy to delete. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse deleteTagPolicyWithHttpInfo( + String policyId, DeleteTagPolicyOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteTagPolicy"; + 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 'policyId' is set + if (policyId == null) { + throw new ApiException( + 400, "Missing the required parameter 'policyId' when calling deleteTagPolicy"); + } + Boolean hardDelete = parameters.hardDelete; + // create path and map variables + String localVarPath = + "/api/v2/tag-policies/{policy_id}" + .replaceAll("\\{" + "policy_id" + "\\}", apiClient.escapeString(policyId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "hard_delete", hardDelete)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.TagPoliciesApi.deleteTagPolicy", + localVarPath, + localVarQueryParams, + 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 policy. + * + *

See {@link #deleteTagPolicyWithHttpInfo}. + * + * @param policyId The unique identifier of the tag policy to delete. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteTagPolicyWithHttpInfoAsync( + String policyId, DeleteTagPolicyOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "deleteTagPolicy"; + 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 'policyId' is set + if (policyId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'policyId' when calling deleteTagPolicy")); + return result; + } + Boolean hardDelete = parameters.hardDelete; + // create path and map variables + String localVarPath = + "/api/v2/tag-policies/{policy_id}" + .replaceAll("\\{" + "policy_id" + "\\}", apiClient.escapeString(policyId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "hard_delete", hardDelete)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.TagPoliciesApi.deleteTagPolicy", + 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); + } + + /** Manage optional parameters to getTagPolicy. */ + public static class GetTagPolicyOptionalParameters { + private TagPolicyInclude include; + private Long tsStart; + private Long tsEnd; + + /** + * Set include. + * + * @param include Comma-separated list of related resources to include alongside the policy. + * Currently the only supported value is score. (optional) + * @return GetTagPolicyOptionalParameters + */ + public GetTagPolicyOptionalParameters include(TagPolicyInclude include) { + this.include = include; + return this; + } + + /** + * Set tsStart. + * + * @param tsStart Start of the time window used for compliance score computation, as a Unix + * timestamp in milliseconds. (optional) + * @return GetTagPolicyOptionalParameters + */ + public GetTagPolicyOptionalParameters tsStart(Long tsStart) { + this.tsStart = tsStart; + return this; + } + + /** + * Set tsEnd. + * + * @param tsEnd End of the time window used for compliance score computation, as a Unix + * timestamp in milliseconds. Must be in the past and greater than ts_start. + * (optional) + * @return GetTagPolicyOptionalParameters + */ + public GetTagPolicyOptionalParameters tsEnd(Long tsEnd) { + this.tsEnd = tsEnd; + return this; + } + } + + /** + * Get a tag policy. + * + *

See {@link #getTagPolicyWithHttpInfo}. + * + * @param policyId The unique identifier of the tag policy. (required) + * @return TagPolicyResponse + * @throws ApiException if fails to make API call + */ + public TagPolicyResponse getTagPolicy(String policyId) throws ApiException { + return getTagPolicyWithHttpInfo(policyId, new GetTagPolicyOptionalParameters()).getData(); + } + + /** + * Get a tag policy. + * + *

See {@link #getTagPolicyWithHttpInfoAsync}. + * + * @param policyId The unique identifier of the tag policy. (required) + * @return CompletableFuture<TagPolicyResponse> + */ + public CompletableFuture getTagPolicyAsync(String policyId) { + return getTagPolicyWithHttpInfoAsync(policyId, new GetTagPolicyOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a tag policy. + * + *

See {@link #getTagPolicyWithHttpInfo}. + * + * @param policyId The unique identifier of the tag policy. (required) + * @param parameters Optional parameters for the request. + * @return TagPolicyResponse + * @throws ApiException if fails to make API call + */ + public TagPolicyResponse getTagPolicy(String policyId, GetTagPolicyOptionalParameters parameters) + throws ApiException { + return getTagPolicyWithHttpInfo(policyId, parameters).getData(); + } + + /** + * Get a tag policy. + * + *

See {@link #getTagPolicyWithHttpInfoAsync}. + * + * @param policyId The unique identifier of the tag policy. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<TagPolicyResponse> + */ + public CompletableFuture getTagPolicyAsync( + String policyId, GetTagPolicyOptionalParameters parameters) { + return getTagPolicyWithHttpInfoAsync(policyId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve a single tag policy by ID. Optionally include the policy's current compliance score + * via the include=score query parameter. Policies belonging to other organizations + * cannot be retrieved. + * + * @param policyId The unique identifier of the tag policy. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<TagPolicyResponse> + * @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 getTagPolicyWithHttpInfo( + String policyId, GetTagPolicyOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getTagPolicy"; + 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 'policyId' is set + if (policyId == null) { + throw new ApiException( + 400, "Missing the required parameter 'policyId' when calling getTagPolicy"); + } + TagPolicyInclude include = parameters.include; + Long tsStart = parameters.tsStart; + Long tsEnd = parameters.tsEnd; + // create path and map variables + String localVarPath = + "/api/v2/tag-policies/{policy_id}" + .replaceAll("\\{" + "policy_id" + "\\}", apiClient.escapeString(policyId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "ts_start", tsStart)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "ts_end", tsEnd)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.TagPoliciesApi.getTagPolicy", + 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 tag policy. + * + *

See {@link #getTagPolicyWithHttpInfo}. + * + * @param policyId The unique identifier of the tag policy. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<TagPolicyResponse>> + */ + public CompletableFuture> getTagPolicyWithHttpInfoAsync( + String policyId, GetTagPolicyOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "getTagPolicy"; + 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 'policyId' is set + if (policyId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'policyId' when calling getTagPolicy")); + return result; + } + TagPolicyInclude include = parameters.include; + Long tsStart = parameters.tsStart; + Long tsEnd = parameters.tsEnd; + // create path and map variables + String localVarPath = + "/api/v2/tag-policies/{policy_id}" + .replaceAll("\\{" + "policy_id" + "\\}", apiClient.escapeString(policyId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "ts_start", tsStart)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "ts_end", tsEnd)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.TagPoliciesApi.getTagPolicy", + 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 getTagPolicyScore. */ + public static class GetTagPolicyScoreOptionalParameters { + private Long tsStart; + private Long tsEnd; + + /** + * Set tsStart. + * + * @param tsStart Start of the time window used for compliance score computation, as a Unix + * timestamp in milliseconds. (optional) + * @return GetTagPolicyScoreOptionalParameters + */ + public GetTagPolicyScoreOptionalParameters tsStart(Long tsStart) { + this.tsStart = tsStart; + return this; + } + + /** + * Set tsEnd. + * + * @param tsEnd End of the time window used for compliance score computation, as a Unix + * timestamp in milliseconds. Must be in the past and greater than ts_start. + * (optional) + * @return GetTagPolicyScoreOptionalParameters + */ + public GetTagPolicyScoreOptionalParameters tsEnd(Long tsEnd) { + this.tsEnd = tsEnd; + return this; + } + } + + /** + * Get a tag policy compliance score. + * + *

See {@link #getTagPolicyScoreWithHttpInfo}. + * + * @param policyId The unique identifier of the tag policy. (required) + * @return TagPolicyScoreResponse + * @throws ApiException if fails to make API call + */ + public TagPolicyScoreResponse getTagPolicyScore(String policyId) throws ApiException { + return getTagPolicyScoreWithHttpInfo(policyId, new GetTagPolicyScoreOptionalParameters()) + .getData(); + } + + /** + * Get a tag policy compliance score. + * + *

See {@link #getTagPolicyScoreWithHttpInfoAsync}. + * + * @param policyId The unique identifier of the tag policy. (required) + * @return CompletableFuture<TagPolicyScoreResponse> + */ + public CompletableFuture getTagPolicyScoreAsync(String policyId) { + return getTagPolicyScoreWithHttpInfoAsync(policyId, new GetTagPolicyScoreOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a tag policy compliance score. + * + *

See {@link #getTagPolicyScoreWithHttpInfo}. + * + * @param policyId The unique identifier of the tag policy. (required) + * @param parameters Optional parameters for the request. + * @return TagPolicyScoreResponse + * @throws ApiException if fails to make API call + */ + public TagPolicyScoreResponse getTagPolicyScore( + String policyId, GetTagPolicyScoreOptionalParameters parameters) throws ApiException { + return getTagPolicyScoreWithHttpInfo(policyId, parameters).getData(); + } + + /** + * Get a tag policy compliance score. + * + *

See {@link #getTagPolicyScoreWithHttpInfoAsync}. + * + * @param policyId The unique identifier of the tag policy. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<TagPolicyScoreResponse> + */ + public CompletableFuture getTagPolicyScoreAsync( + String policyId, GetTagPolicyScoreOptionalParameters parameters) { + return getTagPolicyScoreWithHttpInfoAsync(policyId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve the compliance score for a single tag policy. The score is computed over the requested + * time window (or a source-appropriate default) and represents the percentage of telemetry within + * that window that conforms to the policy. A null score indicates that no relevant + * telemetry was found. + * + * @param policyId The unique identifier of the tag policy. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<TagPolicyScoreResponse> + * @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 getTagPolicyScoreWithHttpInfo( + String policyId, GetTagPolicyScoreOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getTagPolicyScore"; + 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 'policyId' is set + if (policyId == null) { + throw new ApiException( + 400, "Missing the required parameter 'policyId' when calling getTagPolicyScore"); + } + Long tsStart = parameters.tsStart; + Long tsEnd = parameters.tsEnd; + // create path and map variables + String localVarPath = + "/api/v2/tag-policies/{policy_id}/score" + .replaceAll("\\{" + "policy_id" + "\\}", apiClient.escapeString(policyId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "ts_start", tsStart)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "ts_end", tsEnd)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.TagPoliciesApi.getTagPolicyScore", + 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 tag policy compliance score. + * + *

See {@link #getTagPolicyScoreWithHttpInfo}. + * + * @param policyId The unique identifier of the tag policy. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<TagPolicyScoreResponse>> + */ + public CompletableFuture> getTagPolicyScoreWithHttpInfoAsync( + String policyId, GetTagPolicyScoreOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "getTagPolicyScore"; + 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 'policyId' is set + if (policyId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'policyId' when calling getTagPolicyScore")); + return result; + } + Long tsStart = parameters.tsStart; + Long tsEnd = parameters.tsEnd; + // create path and map variables + String localVarPath = + "/api/v2/tag-policies/{policy_id}/score" + .replaceAll("\\{" + "policy_id" + "\\}", apiClient.escapeString(policyId.toString())); + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "ts_start", tsStart)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "ts_end", tsEnd)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.TagPoliciesApi.getTagPolicyScore", + 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 listTagPolicies. */ + public static class ListTagPoliciesOptionalParameters { + private Boolean includeDisabled; + private Boolean includeDeleted; + private TagPolicyInclude include; + private TagPolicySource filterSource; + private Long tsStart; + private Long tsEnd; + + /** + * Set includeDisabled. + * + * @param includeDisabled Whether to include policies that are currently disabled. Defaults to + * false. (optional) + * @return ListTagPoliciesOptionalParameters + */ + public ListTagPoliciesOptionalParameters includeDisabled(Boolean includeDisabled) { + this.includeDisabled = includeDisabled; + return this; + } + + /** + * Set includeDeleted. + * + * @param includeDeleted Whether to include policies that have been soft-deleted. Defaults to + * false. (optional) + * @return ListTagPoliciesOptionalParameters + */ + public ListTagPoliciesOptionalParameters includeDeleted(Boolean includeDeleted) { + this.includeDeleted = includeDeleted; + return this; + } + + /** + * Set include. + * + * @param include Comma-separated list of related resources to include alongside each policy in + * the response. Currently the only supported value is score. (optional) + * @return ListTagPoliciesOptionalParameters + */ + public ListTagPoliciesOptionalParameters include(TagPolicyInclude include) { + this.include = include; + return this; + } + + /** + * Set filterSource. + * + * @param filterSource Restrict the result set to policies whose source matches the given value. + * (optional) + * @return ListTagPoliciesOptionalParameters + */ + public ListTagPoliciesOptionalParameters filterSource(TagPolicySource filterSource) { + this.filterSource = filterSource; + return this; + } + + /** + * Set tsStart. + * + * @param tsStart Start of the time window used for compliance score computation, as a Unix + * timestamp in milliseconds. Defaults to a recent window appropriate for the source. + * (optional) + * @return ListTagPoliciesOptionalParameters + */ + public ListTagPoliciesOptionalParameters tsStart(Long tsStart) { + this.tsStart = tsStart; + return this; + } + + /** + * Set tsEnd. + * + * @param tsEnd End of the time window used for compliance score computation, as a Unix + * timestamp in milliseconds. Must be in the past and greater than ts_start. + * (optional) + * @return ListTagPoliciesOptionalParameters + */ + public ListTagPoliciesOptionalParameters tsEnd(Long tsEnd) { + this.tsEnd = tsEnd; + return this; + } + } + + /** + * List tag policies. + * + *

See {@link #listTagPoliciesWithHttpInfo}. + * + * @return TagPoliciesListResponse + * @throws ApiException if fails to make API call + */ + public TagPoliciesListResponse listTagPolicies() throws ApiException { + return listTagPoliciesWithHttpInfo(new ListTagPoliciesOptionalParameters()).getData(); + } + + /** + * List tag policies. + * + *

See {@link #listTagPoliciesWithHttpInfoAsync}. + * + * @return CompletableFuture<TagPoliciesListResponse> + */ + public CompletableFuture listTagPoliciesAsync() { + return listTagPoliciesWithHttpInfoAsync(new ListTagPoliciesOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List tag policies. + * + *

See {@link #listTagPoliciesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return TagPoliciesListResponse + * @throws ApiException if fails to make API call + */ + public TagPoliciesListResponse listTagPolicies(ListTagPoliciesOptionalParameters parameters) + throws ApiException { + return listTagPoliciesWithHttpInfo(parameters).getData(); + } + + /** + * List tag policies. + * + *

See {@link #listTagPoliciesWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<TagPoliciesListResponse> + */ + public CompletableFuture listTagPoliciesAsync( + ListTagPoliciesOptionalParameters parameters) { + return listTagPoliciesWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve all tag policies for the organization. Optionally include disabled or deleted + * policies, filter by telemetry source, and include each policy's current compliance score via + * the include=score query parameter. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<TagPoliciesListResponse> + * @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 -
429 Too many requests -
+ */ + public ApiResponse listTagPoliciesWithHttpInfo( + ListTagPoliciesOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listTagPolicies"; + 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; + Boolean includeDisabled = parameters.includeDisabled; + Boolean includeDeleted = parameters.includeDeleted; + TagPolicyInclude include = parameters.include; + TagPolicySource filterSource = parameters.filterSource; + Long tsStart = parameters.tsStart; + Long tsEnd = parameters.tsEnd; + // create path and map variables + String localVarPath = "/api/v2/tag-policies"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_disabled", includeDisabled)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_deleted", includeDeleted)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[source]", filterSource)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "ts_start", tsStart)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "ts_end", tsEnd)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.TagPoliciesApi.listTagPolicies", + 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 tag policies. + * + *

See {@link #listTagPoliciesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<TagPoliciesListResponse>> + */ + public CompletableFuture> listTagPoliciesWithHttpInfoAsync( + ListTagPoliciesOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listTagPolicies"; + 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; + Boolean includeDisabled = parameters.includeDisabled; + Boolean includeDeleted = parameters.includeDeleted; + TagPolicyInclude include = parameters.include; + TagPolicySource filterSource = parameters.filterSource; + Long tsStart = parameters.tsStart; + Long tsEnd = parameters.tsEnd; + // create path and map variables + String localVarPath = "/api/v2/tag-policies"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_disabled", includeDisabled)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_deleted", includeDeleted)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[source]", filterSource)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "ts_start", tsStart)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "ts_end", tsEnd)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.TagPoliciesApi.listTagPolicies", + 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() {}); + } + + /** + * Update a tag policy. + * + *

See {@link #updateTagPolicyWithHttpInfo}. + * + * @param policyId The unique identifier of the tag policy to update. (required) + * @param body (required) + * @return TagPolicyResponse + * @throws ApiException if fails to make API call + */ + public TagPolicyResponse updateTagPolicy(String policyId, TagPolicyUpdateRequest body) + throws ApiException { + return updateTagPolicyWithHttpInfo(policyId, body).getData(); + } + + /** + * Update a tag policy. + * + *

See {@link #updateTagPolicyWithHttpInfoAsync}. + * + * @param policyId The unique identifier of the tag policy to update. (required) + * @param body (required) + * @return CompletableFuture<TagPolicyResponse> + */ + public CompletableFuture updateTagPolicyAsync( + String policyId, TagPolicyUpdateRequest body) { + return updateTagPolicyWithHttpInfoAsync(policyId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update one or more attributes of an existing tag policy. Only the fields supplied in the + * request body are modified; omitted fields retain their current values. The policy's + * source cannot be changed after creation. + * + * @param policyId The unique identifier of the tag policy to update. (required) + * @param body (required) + * @return ApiResponse<TagPolicyResponse> + * @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 updateTagPolicyWithHttpInfo( + String policyId, TagPolicyUpdateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateTagPolicy"; + 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 'policyId' is set + if (policyId == null) { + throw new ApiException( + 400, "Missing the required parameter 'policyId' when calling updateTagPolicy"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateTagPolicy"); + } + // create path and map variables + String localVarPath = + "/api/v2/tag-policies/{policy_id}" + .replaceAll("\\{" + "policy_id" + "\\}", apiClient.escapeString(policyId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.TagPoliciesApi.updateTagPolicy", + 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 policy. + * + *

See {@link #updateTagPolicyWithHttpInfo}. + * + * @param policyId The unique identifier of the tag policy to update. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<TagPolicyResponse>> + */ + public CompletableFuture> updateTagPolicyWithHttpInfoAsync( + String policyId, TagPolicyUpdateRequest body) { + // Check if unstable operation is enabled + String operationId = "updateTagPolicy"; + 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 'policyId' is set + if (policyId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'policyId' when calling updateTagPolicy")); + 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 updateTagPolicy")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/tag-policies/{policy_id}" + .replaceAll("\\{" + "policy_id" + "\\}", apiClient.escapeString(policyId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.TagPoliciesApi.updateTagPolicy", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/api/UsageMeteringApi.java b/src/main/java/com/datadog/api/client/v2/api/UsageMeteringApi.java index 9e0179eea88..8dfaea41634 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 @@ -16,6 +16,7 @@ import com.datadog.api.client.v2.model.UsageAttributionTypesResponse; import com.datadog.api.client.v2.model.UsageLambdaTracedInvocationsResponse; import com.datadog.api.client.v2.model.UsageObservabilityPipelinesResponse; +import com.datadog.api.client.v2.model.UsageSummaryAvailableFieldsResponse; import jakarta.ws.rs.client.Invocation; import jakarta.ws.rs.core.GenericType; import java.time.OffsetDateTime; @@ -1237,22 +1238,26 @@ public GetHourlyUsageOptionalParameters pageNextRecordId(String pageNextRecordId * @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_trail, bits_ai, serverless, - * ci_app, cloud_cost_management, cloud_siem, - * csm_container_enterprise, csm_host_enterprise, cspm, - * custom_events, cws, dbm, error_tracking - * , fargate, infra_hosts, incident_management, - * indexed_logs, indexed_spans, ingested_spans, iot - * , lambda_traced_invocations, llm_observability, logs - * , network_flows, network_hosts, network_monitoring - * , observability_pipelines, online_archive, profiling - * , product_analytics, rum, rum_browser_sessions - * , rum_mobile_sessions, sds, snmp, - * software_delivery, synthetics_api, synthetics_browser, - * synthetics_mobile, synthetics_parallel_testing, timeseries - * , vuln_management and workflow_executions. The following - * product family has been deprecated: audit_logs. (required) + * families are all, ai, analyzed_logs, + * application_performance_monitoring, application_security, + * audit_trail, bits_ai, serverless, ci_app, + * cloud_cost_management, cloud_siem, csm_container_enterprise + * , csm_host_enterprise, csm_host_pro, cspm, + * custom_events, cws, data_observability, dbm + * , digital_experience_management, error_tracking, + * fargate, infra_hosts, incident_management, + * indexed_logs, indexed_spans, infrastructure_monitoring, + * ingested_spans, iot, lambda_traced_invocations, + * llm_observability, log_management, logs, + * network_flows, network_hosts, network_monitoring, + * observability_pipelines, online_archive, platform_capabilities + * , product_analytics, profiling, rum, + * rum_browser_sessions, rum_mobile_sessions, sds, + * security, snmp, software_delivery, synthetics_api + * , synthetics_browser, synthetics_mobile, + * synthetics_parallel_testing, timeseries, vuln_management + * and workflow_executions. The following product family has been + * deprecated: audit_logs. (required) * @return HourlyUsageResponse * @throws ApiException if fails to make API call */ @@ -1271,22 +1276,26 @@ filterTimestampStart, filterProductFamilies, new GetHourlyUsageOptionalParameter * @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_trail, bits_ai, serverless, - * ci_app, cloud_cost_management, cloud_siem, - * csm_container_enterprise, csm_host_enterprise, cspm, - * custom_events, cws, dbm, error_tracking - * , fargate, infra_hosts, incident_management, - * indexed_logs, indexed_spans, ingested_spans, iot - * , lambda_traced_invocations, llm_observability, logs - * , network_flows, network_hosts, network_monitoring - * , observability_pipelines, online_archive, profiling - * , product_analytics, rum, rum_browser_sessions - * , rum_mobile_sessions, sds, snmp, - * software_delivery, synthetics_api, synthetics_browser, - * synthetics_mobile, synthetics_parallel_testing, timeseries - * , vuln_management and workflow_executions. The following - * product family has been deprecated: audit_logs. (required) + * families are all, ai, analyzed_logs, + * application_performance_monitoring, application_security, + * audit_trail, bits_ai, serverless, ci_app, + * cloud_cost_management, cloud_siem, csm_container_enterprise + * , csm_host_enterprise, csm_host_pro, cspm, + * custom_events, cws, data_observability, dbm + * , digital_experience_management, error_tracking, + * fargate, infra_hosts, incident_management, + * indexed_logs, indexed_spans, infrastructure_monitoring, + * ingested_spans, iot, lambda_traced_invocations, + * llm_observability, log_management, logs, + * network_flows, network_hosts, network_monitoring, + * observability_pipelines, online_archive, platform_capabilities + * , product_analytics, profiling, rum, + * rum_browser_sessions, rum_mobile_sessions, sds, + * security, snmp, software_delivery, synthetics_api + * , synthetics_browser, synthetics_mobile, + * synthetics_parallel_testing, timeseries, vuln_management + * and workflow_executions. The following product family has been + * deprecated: audit_logs. (required) * @return CompletableFuture<HourlyUsageResponse> */ public CompletableFuture getHourlyUsageAsync( @@ -1307,22 +1316,26 @@ filterTimestampStart, filterProductFamilies, new GetHourlyUsageOptionalParameter * @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_trail, bits_ai, serverless, - * ci_app, cloud_cost_management, cloud_siem, - * csm_container_enterprise, csm_host_enterprise, cspm, - * custom_events, cws, dbm, error_tracking - * , fargate, infra_hosts, incident_management, - * indexed_logs, indexed_spans, ingested_spans, iot - * , lambda_traced_invocations, llm_observability, logs - * , network_flows, network_hosts, network_monitoring - * , observability_pipelines, online_archive, profiling - * , product_analytics, rum, rum_browser_sessions - * , rum_mobile_sessions, sds, snmp, - * software_delivery, synthetics_api, synthetics_browser, - * synthetics_mobile, synthetics_parallel_testing, timeseries - * , vuln_management and workflow_executions. The following - * product family has been deprecated: audit_logs. (required) + * families are all, ai, analyzed_logs, + * application_performance_monitoring, application_security, + * audit_trail, bits_ai, serverless, ci_app, + * cloud_cost_management, cloud_siem, csm_container_enterprise + * , csm_host_enterprise, csm_host_pro, cspm, + * custom_events, cws, data_observability, dbm + * , digital_experience_management, error_tracking, + * fargate, infra_hosts, incident_management, + * indexed_logs, indexed_spans, infrastructure_monitoring, + * ingested_spans, iot, lambda_traced_invocations, + * llm_observability, log_management, logs, + * network_flows, network_hosts, network_monitoring, + * observability_pipelines, online_archive, platform_capabilities + * , product_analytics, profiling, rum, + * rum_browser_sessions, rum_mobile_sessions, sds, + * security, snmp, software_delivery, synthetics_api + * , synthetics_browser, synthetics_mobile, + * synthetics_parallel_testing, timeseries, vuln_management + * and workflow_executions. The following product family has been + * deprecated: audit_logs. (required) * @param parameters Optional parameters for the request. * @return HourlyUsageResponse * @throws ApiException if fails to make API call @@ -1344,22 +1357,26 @@ public HourlyUsageResponse getHourlyUsage( * @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_trail, bits_ai, serverless, - * ci_app, cloud_cost_management, cloud_siem, - * csm_container_enterprise, csm_host_enterprise, cspm, - * custom_events, cws, dbm, error_tracking - * , fargate, infra_hosts, incident_management, - * indexed_logs, indexed_spans, ingested_spans, iot - * , lambda_traced_invocations, llm_observability, logs - * , network_flows, network_hosts, network_monitoring - * , observability_pipelines, online_archive, profiling - * , product_analytics, rum, rum_browser_sessions - * , rum_mobile_sessions, sds, snmp, - * software_delivery, synthetics_api, synthetics_browser, - * synthetics_mobile, synthetics_parallel_testing, timeseries - * , vuln_management and workflow_executions. The following - * product family has been deprecated: audit_logs. (required) + * families are all, ai, analyzed_logs, + * application_performance_monitoring, application_security, + * audit_trail, bits_ai, serverless, ci_app, + * cloud_cost_management, cloud_siem, csm_container_enterprise + * , csm_host_enterprise, csm_host_pro, cspm, + * custom_events, cws, data_observability, dbm + * , digital_experience_management, error_tracking, + * fargate, infra_hosts, incident_management, + * indexed_logs, indexed_spans, infrastructure_monitoring, + * ingested_spans, iot, lambda_traced_invocations, + * llm_observability, log_management, logs, + * network_flows, network_hosts, network_monitoring, + * observability_pipelines, online_archive, platform_capabilities + * , product_analytics, profiling, rum, + * rum_browser_sessions, rum_mobile_sessions, sds, + * security, snmp, software_delivery, synthetics_api + * , synthetics_browser, synthetics_mobile, + * synthetics_parallel_testing, timeseries, vuln_management + * and workflow_executions. The following product family has been + * deprecated: audit_logs. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<HourlyUsageResponse> */ @@ -1380,22 +1397,26 @@ public CompletableFuture getHourlyUsageAsync( * @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_trail, bits_ai, serverless, - * ci_app, cloud_cost_management, cloud_siem, - * csm_container_enterprise, csm_host_enterprise, cspm, - * custom_events, cws, dbm, error_tracking - * , fargate, infra_hosts, incident_management, - * indexed_logs, indexed_spans, ingested_spans, iot - * , lambda_traced_invocations, llm_observability, logs - * , network_flows, network_hosts, network_monitoring - * , observability_pipelines, online_archive, profiling - * , product_analytics, rum, rum_browser_sessions - * , rum_mobile_sessions, sds, snmp, - * software_delivery, synthetics_api, synthetics_browser, - * synthetics_mobile, synthetics_parallel_testing, timeseries - * , vuln_management and workflow_executions. The following - * product family has been deprecated: audit_logs. (required) + * families are all, ai, analyzed_logs, + * application_performance_monitoring, application_security, + * audit_trail, bits_ai, serverless, ci_app, + * cloud_cost_management, cloud_siem, csm_container_enterprise + * , csm_host_enterprise, csm_host_pro, cspm, + * custom_events, cws, data_observability, dbm + * , digital_experience_management, error_tracking, + * fargate, infra_hosts, incident_management, + * indexed_logs, indexed_spans, infrastructure_monitoring, + * ingested_spans, iot, lambda_traced_invocations, + * llm_observability, log_management, logs, + * network_flows, network_hosts, network_monitoring, + * observability_pipelines, online_archive, platform_capabilities + * , product_analytics, profiling, rum, + * rum_browser_sessions, rum_mobile_sessions, sds, + * security, snmp, software_delivery, synthetics_api + * , synthetics_browser, synthetics_mobile, + * synthetics_parallel_testing, timeseries, vuln_management + * and workflow_executions. The following product family has been + * deprecated: audit_logs. (required) * @param parameters Optional parameters for the request. * @return ApiResponse<HourlyUsageResponse> * @throws ApiException if fails to make API call @@ -1487,22 +1508,26 @@ public ApiResponse 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_trail, bits_ai, serverless, - * ci_app, cloud_cost_management, cloud_siem, - * csm_container_enterprise, csm_host_enterprise, cspm, - * custom_events, cws, dbm, error_tracking - * , fargate, infra_hosts, incident_management, - * indexed_logs, indexed_spans, ingested_spans, iot - * , lambda_traced_invocations, llm_observability, logs - * , network_flows, network_hosts, network_monitoring - * , observability_pipelines, online_archive, profiling - * , product_analytics, rum, rum_browser_sessions - * , rum_mobile_sessions, sds, snmp, - * software_delivery, synthetics_api, synthetics_browser, - * synthetics_mobile, synthetics_parallel_testing, timeseries - * , vuln_management and workflow_executions. The following - * product family has been deprecated: audit_logs. (required) + * families are all, ai, analyzed_logs, + * application_performance_monitoring, application_security, + * audit_trail, bits_ai, serverless, ci_app, + * cloud_cost_management, cloud_siem, csm_container_enterprise + * , csm_host_enterprise, csm_host_pro, cspm, + * custom_events, cws, data_observability, dbm + * , digital_experience_management, error_tracking, + * fargate, infra_hosts, incident_management, + * indexed_logs, indexed_spans, infrastructure_monitoring, + * ingested_spans, iot, lambda_traced_invocations, + * llm_observability, log_management, logs, + * network_flows, network_hosts, network_monitoring, + * observability_pipelines, online_archive, platform_capabilities + * , product_analytics, profiling, rum, + * rum_browser_sessions, rum_mobile_sessions, sds, + * security, snmp, software_delivery, synthetics_api + * , synthetics_browser, synthetics_mobile, + * synthetics_parallel_testing, timeseries, vuln_management + * and workflow_executions. The following product family has been + * deprecated: audit_logs. (required) * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<HourlyUsageResponse>> */ @@ -3002,4 +3027,124 @@ public CompletableFuture getUsageObservabil false, new GenericType() {}); } + + /** + * Get available fields for usage summary. + * + *

See {@link #getUsageSummaryAvailableFieldsWithHttpInfo}. + * + * @return UsageSummaryAvailableFieldsResponse + * @throws ApiException if fails to make API call + */ + public UsageSummaryAvailableFieldsResponse getUsageSummaryAvailableFields() throws ApiException { + return getUsageSummaryAvailableFieldsWithHttpInfo().getData(); + } + + /** + * Get available fields for usage summary. + * + *

See {@link #getUsageSummaryAvailableFieldsWithHttpInfoAsync}. + * + * @return CompletableFuture<UsageSummaryAvailableFieldsResponse> + */ + public CompletableFuture + getUsageSummaryAvailableFieldsAsync() { + return getUsageSummaryAvailableFieldsWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List the field names returned by GET /api/v1/usage/summary at each of its three + * response levels. Each list contains every key the data endpoint emits—both typed fields + * declared in the OpenAPI spec and untyped keys exposed through additionalProperties + * (the latter used for billing dimensions and usage types added after the v1 schema freeze). + * + *

This endpoint is only accessible for parent-level + * organizations. + * + * @return ApiResponse<UsageSummaryAvailableFieldsResponse> + * @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. -
+ */ + public ApiResponse + getUsageSummaryAvailableFieldsWithHttpInfo() throws ApiException { + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/usage/summary/available_fields"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.UsageMeteringApi.getUsageSummaryAvailableFields", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json;datetime-format=rfc3339"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get available fields for usage summary. + * + *

See {@link #getUsageSummaryAvailableFieldsWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<UsageSummaryAvailableFieldsResponse>> + */ + public CompletableFuture> + getUsageSummaryAvailableFieldsWithHttpInfoAsync() { + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/usage/summary/available_fields"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.UsageMeteringApi.getUsageSummaryAvailableFields", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json;datetime-format=rfc3339"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } } diff --git a/src/main/java/com/datadog/api/client/v2/api/WidgetsApi.java b/src/main/java/com/datadog/api/client/v2/api/WidgetsApi.java index 720979455e2..16c4f6ad887 100644 --- a/src/main/java/com/datadog/api/client/v2/api/WidgetsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/WidgetsApi.java @@ -556,8 +556,8 @@ public static class SearchWidgetsOptionalParameters { private String filterTitle; private String filterTags; private String sort; - private Integer pageNumber; - private Integer pageSize; + private Long pageNumber; + private Long pageSize; /** * Set filterWidgetType. @@ -638,7 +638,7 @@ public SearchWidgetsOptionalParameters sort(String sort) { * @param pageNumber Page number for pagination (0-indexed). (optional, default to 0) * @return SearchWidgetsOptionalParameters */ - public SearchWidgetsOptionalParameters pageNumber(Integer pageNumber) { + public SearchWidgetsOptionalParameters pageNumber(Long pageNumber) { this.pageNumber = pageNumber; return this; } @@ -649,7 +649,7 @@ public SearchWidgetsOptionalParameters pageNumber(Integer pageNumber) { * @param pageSize Number of widgets per page. (optional, default to 50) * @return SearchWidgetsOptionalParameters */ - public SearchWidgetsOptionalParameters pageSize(Integer pageSize) { + public SearchWidgetsOptionalParameters pageSize(Long pageSize) { this.pageSize = pageSize; return this; } @@ -763,8 +763,8 @@ public ApiResponse searchWidgetsWithHttpInfo( String filterTitle = parameters.filterTitle; String filterTags = parameters.filterTags; String sort = parameters.sort; - Integer pageNumber = parameters.pageNumber; - Integer pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; + Long pageSize = parameters.pageSize; // create path and map variables String localVarPath = "/api/v2/widgets/{experience_type}" @@ -834,8 +834,8 @@ public CompletableFuture> searchWidgetsWithHttpI String filterTitle = parameters.filterTitle; String filterTags = parameters.filterTags; String sort = parameters.sort; - Integer pageNumber = parameters.pageNumber; - Integer pageSize = parameters.pageSize; + Long pageNumber = parameters.pageNumber; + Long pageSize = parameters.pageSize; // create path and map variables String localVarPath = "/api/v2/widgets/{experience_type}" diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSCcmConfigValidationIssue.java b/src/main/java/com/datadog/api/client/v2/model/AWSCcmConfigValidationIssue.java new file mode 100644 index 00000000000..7f883336036 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AWSCcmConfigValidationIssue.java @@ -0,0 +1,184 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * A single validation issue found while validating an AWS Cost and Usage Report (CUR) 2.0 + * configuration. + */ +@JsonPropertyOrder({ + AWSCcmConfigValidationIssue.JSON_PROPERTY_CODE, + AWSCcmConfigValidationIssue.JSON_PROPERTY_DESCRIPTION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AWSCcmConfigValidationIssue { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CODE = "code"; + private AWSCcmConfigValidationIssueCode code; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public AWSCcmConfigValidationIssue() {} + + @JsonCreator + public AWSCcmConfigValidationIssue( + @JsonProperty(required = true, value = JSON_PROPERTY_CODE) + AWSCcmConfigValidationIssueCode code, + @JsonProperty(required = true, value = JSON_PROPERTY_DESCRIPTION) String description) { + this.code = code; + this.unparsed |= !code.isValid(); + this.description = description; + } + + public AWSCcmConfigValidationIssue code(AWSCcmConfigValidationIssueCode code) { + this.code = code; + this.unparsed |= !code.isValid(); + return this; + } + + /** + * Identifies the specific reason a Cost and Usage Report (CUR) 2.0 configuration failed + * validation. + * + * @return code + */ + @JsonProperty(JSON_PROPERTY_CODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AWSCcmConfigValidationIssueCode getCode() { + return code; + } + + public void setCode(AWSCcmConfigValidationIssueCode code) { + if (!code.isValid()) { + this.unparsed = true; + } + this.code = code; + } + + public AWSCcmConfigValidationIssue description(String description) { + this.description = description; + return this; + } + + /** + * Human-readable description of the validation issue. + * + * @return description + */ + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AWSCcmConfigValidationIssue + */ + @JsonAnySetter + public AWSCcmConfigValidationIssue putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this AWSCcmConfigValidationIssue object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AWSCcmConfigValidationIssue awsCcmConfigValidationIssue = (AWSCcmConfigValidationIssue) o; + return Objects.equals(this.code, awsCcmConfigValidationIssue.code) + && Objects.equals(this.description, awsCcmConfigValidationIssue.description) + && Objects.equals( + this.additionalProperties, awsCcmConfigValidationIssue.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(code, description, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AWSCcmConfigValidationIssue {\n"); + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSCcmConfigValidationIssueCode.java b/src/main/java/com/datadog/api/client/v2/model/AWSCcmConfigValidationIssueCode.java new file mode 100644 index 00000000000..34912050f8a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AWSCcmConfigValidationIssueCode.java @@ -0,0 +1,110 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * Identifies the specific reason a Cost and Usage Report (CUR) 2.0 configuration failed validation. + */ +@JsonSerialize( + using = AWSCcmConfigValidationIssueCode.AWSCcmConfigValidationIssueCodeSerializer.class) +public class AWSCcmConfigValidationIssueCode extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList( + "ISSUE_CODE_UNSPECIFIED", + "CREDENTIAL_ERROR", + "BUCKET_NAME_INVALID_GOVCLOUD", + "S3_LIST_PERMISSION_MISSING", + "S3_GET_PERMISSION_MISSING", + "S3_BUCKET_REGION_MISMATCH", + "S3_BUCKET_NOT_ACCESSIBLE", + "EXPORT_LIST_PERMISSION_MISSING", + "EXPORT_GET_PERMISSION_MISSING", + "EXPORT_NOT_FOUND", + "EXPORT_STATUS_UNHEALTHY", + "TIME_GRANULARITY_INVALID", + "FILE_FORMAT_INVALID", + "INCLUDE_RESOURCES_DISABLED", + "REFRESH_CADENCE_INVALID", + "OVERWRITE_MODE_INVALID", + "QUERY_STATEMENT_INVALID")); + + public static final AWSCcmConfigValidationIssueCode ISSUE_CODE_UNSPECIFIED = + new AWSCcmConfigValidationIssueCode("ISSUE_CODE_UNSPECIFIED"); + public static final AWSCcmConfigValidationIssueCode CREDENTIAL_ERROR = + new AWSCcmConfigValidationIssueCode("CREDENTIAL_ERROR"); + public static final AWSCcmConfigValidationIssueCode BUCKET_NAME_INVALID_GOVCLOUD = + new AWSCcmConfigValidationIssueCode("BUCKET_NAME_INVALID_GOVCLOUD"); + public static final AWSCcmConfigValidationIssueCode S3_LIST_PERMISSION_MISSING = + new AWSCcmConfigValidationIssueCode("S3_LIST_PERMISSION_MISSING"); + public static final AWSCcmConfigValidationIssueCode S3_GET_PERMISSION_MISSING = + new AWSCcmConfigValidationIssueCode("S3_GET_PERMISSION_MISSING"); + public static final AWSCcmConfigValidationIssueCode S3_BUCKET_REGION_MISMATCH = + new AWSCcmConfigValidationIssueCode("S3_BUCKET_REGION_MISMATCH"); + public static final AWSCcmConfigValidationIssueCode S3_BUCKET_NOT_ACCESSIBLE = + new AWSCcmConfigValidationIssueCode("S3_BUCKET_NOT_ACCESSIBLE"); + public static final AWSCcmConfigValidationIssueCode EXPORT_LIST_PERMISSION_MISSING = + new AWSCcmConfigValidationIssueCode("EXPORT_LIST_PERMISSION_MISSING"); + public static final AWSCcmConfigValidationIssueCode EXPORT_GET_PERMISSION_MISSING = + new AWSCcmConfigValidationIssueCode("EXPORT_GET_PERMISSION_MISSING"); + public static final AWSCcmConfigValidationIssueCode EXPORT_NOT_FOUND = + new AWSCcmConfigValidationIssueCode("EXPORT_NOT_FOUND"); + public static final AWSCcmConfigValidationIssueCode EXPORT_STATUS_UNHEALTHY = + new AWSCcmConfigValidationIssueCode("EXPORT_STATUS_UNHEALTHY"); + public static final AWSCcmConfigValidationIssueCode TIME_GRANULARITY_INVALID = + new AWSCcmConfigValidationIssueCode("TIME_GRANULARITY_INVALID"); + public static final AWSCcmConfigValidationIssueCode FILE_FORMAT_INVALID = + new AWSCcmConfigValidationIssueCode("FILE_FORMAT_INVALID"); + public static final AWSCcmConfigValidationIssueCode INCLUDE_RESOURCES_DISABLED = + new AWSCcmConfigValidationIssueCode("INCLUDE_RESOURCES_DISABLED"); + public static final AWSCcmConfigValidationIssueCode REFRESH_CADENCE_INVALID = + new AWSCcmConfigValidationIssueCode("REFRESH_CADENCE_INVALID"); + public static final AWSCcmConfigValidationIssueCode OVERWRITE_MODE_INVALID = + new AWSCcmConfigValidationIssueCode("OVERWRITE_MODE_INVALID"); + public static final AWSCcmConfigValidationIssueCode QUERY_STATEMENT_INVALID = + new AWSCcmConfigValidationIssueCode("QUERY_STATEMENT_INVALID"); + + AWSCcmConfigValidationIssueCode(String value) { + super(value, allowedValues); + } + + public static class AWSCcmConfigValidationIssueCodeSerializer + extends StdSerializer { + public AWSCcmConfigValidationIssueCodeSerializer(Class t) { + super(t); + } + + public AWSCcmConfigValidationIssueCodeSerializer() { + this(null); + } + + @Override + public void serialize( + AWSCcmConfigValidationIssueCode value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AWSCcmConfigValidationIssueCode fromValue(String value) { + return new AWSCcmConfigValidationIssueCode(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSCcmConfigValidationRequest.java b/src/main/java/com/datadog/api/client/v2/model/AWSCcmConfigValidationRequest.java new file mode 100644 index 00000000000..9dd8b3fbb0f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AWSCcmConfigValidationRequest.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** AWS CCM config validation request body. */ +@JsonPropertyOrder({AWSCcmConfigValidationRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AWSCcmConfigValidationRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AWSCcmConfigValidationRequestData data; + + public AWSCcmConfigValidationRequest() {} + + @JsonCreator + public AWSCcmConfigValidationRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AWSCcmConfigValidationRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AWSCcmConfigValidationRequest data(AWSCcmConfigValidationRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * AWS CCM config validation request data. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AWSCcmConfigValidationRequestData getData() { + return data; + } + + public void setData(AWSCcmConfigValidationRequestData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AWSCcmConfigValidationRequest + */ + @JsonAnySetter + public AWSCcmConfigValidationRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this AWSCcmConfigValidationRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AWSCcmConfigValidationRequest awsCcmConfigValidationRequest = (AWSCcmConfigValidationRequest) o; + return Objects.equals(this.data, awsCcmConfigValidationRequest.data) + && Objects.equals( + this.additionalProperties, awsCcmConfigValidationRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AWSCcmConfigValidationRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSCcmConfigValidationRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AWSCcmConfigValidationRequestAttributes.java new file mode 100644 index 00000000000..011817307c9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AWSCcmConfigValidationRequestAttributes.java @@ -0,0 +1,260 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes for an AWS CCM config validation request. */ +@JsonPropertyOrder({ + AWSCcmConfigValidationRequestAttributes.JSON_PROPERTY_ACCOUNT_ID, + AWSCcmConfigValidationRequestAttributes.JSON_PROPERTY_BUCKET_NAME, + AWSCcmConfigValidationRequestAttributes.JSON_PROPERTY_BUCKET_REGION, + AWSCcmConfigValidationRequestAttributes.JSON_PROPERTY_REPORT_NAME, + AWSCcmConfigValidationRequestAttributes.JSON_PROPERTY_REPORT_PREFIX +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AWSCcmConfigValidationRequestAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private String accountId; + + public static final String JSON_PROPERTY_BUCKET_NAME = "bucket_name"; + private String bucketName; + + public static final String JSON_PROPERTY_BUCKET_REGION = "bucket_region"; + private String bucketRegion; + + public static final String JSON_PROPERTY_REPORT_NAME = "report_name"; + private String reportName; + + public static final String JSON_PROPERTY_REPORT_PREFIX = "report_prefix"; + private String reportPrefix; + + public AWSCcmConfigValidationRequestAttributes() {} + + @JsonCreator + public AWSCcmConfigValidationRequestAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_ACCOUNT_ID) String accountId, + @JsonProperty(required = true, value = JSON_PROPERTY_BUCKET_NAME) String bucketName, + @JsonProperty(required = true, value = JSON_PROPERTY_BUCKET_REGION) String bucketRegion, + @JsonProperty(required = true, value = JSON_PROPERTY_REPORT_NAME) String reportName) { + this.accountId = accountId; + this.bucketName = bucketName; + this.bucketRegion = bucketRegion; + this.reportName = reportName; + } + + public AWSCcmConfigValidationRequestAttributes accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Your AWS Account ID without dashes. + * + * @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 AWSCcmConfigValidationRequestAttributes bucketName(String bucketName) { + this.bucketName = bucketName; + return this; + } + + /** + * Name of the S3 bucket where the Cost and Usage Report is stored. + * + * @return bucketName + */ + @JsonProperty(JSON_PROPERTY_BUCKET_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBucketName() { + return bucketName; + } + + public void setBucketName(String bucketName) { + this.bucketName = bucketName; + } + + public AWSCcmConfigValidationRequestAttributes bucketRegion(String bucketRegion) { + this.bucketRegion = bucketRegion; + return this; + } + + /** + * AWS region of the S3 bucket. + * + * @return bucketRegion + */ + @JsonProperty(JSON_PROPERTY_BUCKET_REGION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getBucketRegion() { + return bucketRegion; + } + + public void setBucketRegion(String bucketRegion) { + this.bucketRegion = bucketRegion; + } + + public AWSCcmConfigValidationRequestAttributes reportName(String reportName) { + this.reportName = reportName; + return this; + } + + /** + * Name of the Cost and Usage Report. + * + * @return reportName + */ + @JsonProperty(JSON_PROPERTY_REPORT_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getReportName() { + return reportName; + } + + public void setReportName(String reportName) { + this.reportName = reportName; + } + + public AWSCcmConfigValidationRequestAttributes reportPrefix(String reportPrefix) { + this.reportPrefix = reportPrefix; + return this; + } + + /** + * S3 prefix where the Cost and Usage Report is stored. + * + * @return reportPrefix + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REPORT_PREFIX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getReportPrefix() { + return reportPrefix; + } + + public void setReportPrefix(String reportPrefix) { + this.reportPrefix = reportPrefix; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AWSCcmConfigValidationRequestAttributes + */ + @JsonAnySetter + public AWSCcmConfigValidationRequestAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this AWSCcmConfigValidationRequestAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AWSCcmConfigValidationRequestAttributes awsCcmConfigValidationRequestAttributes = + (AWSCcmConfigValidationRequestAttributes) o; + return Objects.equals(this.accountId, awsCcmConfigValidationRequestAttributes.accountId) + && Objects.equals(this.bucketName, awsCcmConfigValidationRequestAttributes.bucketName) + && Objects.equals(this.bucketRegion, awsCcmConfigValidationRequestAttributes.bucketRegion) + && Objects.equals(this.reportName, awsCcmConfigValidationRequestAttributes.reportName) + && Objects.equals(this.reportPrefix, awsCcmConfigValidationRequestAttributes.reportPrefix) + && Objects.equals( + this.additionalProperties, + awsCcmConfigValidationRequestAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + accountId, bucketName, bucketRegion, reportName, reportPrefix, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AWSCcmConfigValidationRequestAttributes {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" bucketName: ").append(toIndentedString(bucketName)).append("\n"); + sb.append(" bucketRegion: ").append(toIndentedString(bucketRegion)).append("\n"); + sb.append(" reportName: ").append(toIndentedString(reportName)).append("\n"); + sb.append(" reportPrefix: ").append(toIndentedString(reportPrefix)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSCcmConfigValidationRequestData.java b/src/main/java/com/datadog/api/client/v2/model/AWSCcmConfigValidationRequestData.java new file mode 100644 index 00000000000..5a0df275b0b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AWSCcmConfigValidationRequestData.java @@ -0,0 +1,184 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** AWS CCM config validation request data. */ +@JsonPropertyOrder({ + AWSCcmConfigValidationRequestData.JSON_PROPERTY_ATTRIBUTES, + AWSCcmConfigValidationRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AWSCcmConfigValidationRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AWSCcmConfigValidationRequestAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AWSCcmConfigValidationType type = AWSCcmConfigValidationType.CCM_CONFIG_VALIDATION; + + public AWSCcmConfigValidationRequestData() {} + + @JsonCreator + public AWSCcmConfigValidationRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AWSCcmConfigValidationRequestAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AWSCcmConfigValidationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AWSCcmConfigValidationRequestData attributes( + AWSCcmConfigValidationRequestAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for an AWS CCM config validation request. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AWSCcmConfigValidationRequestAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AWSCcmConfigValidationRequestAttributes attributes) { + this.attributes = attributes; + } + + public AWSCcmConfigValidationRequestData type(AWSCcmConfigValidationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * AWS CCM config validation resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AWSCcmConfigValidationType getType() { + return type; + } + + public void setType(AWSCcmConfigValidationType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AWSCcmConfigValidationRequestData + */ + @JsonAnySetter + public AWSCcmConfigValidationRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this AWSCcmConfigValidationRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AWSCcmConfigValidationRequestData awsCcmConfigValidationRequestData = + (AWSCcmConfigValidationRequestData) o; + return Objects.equals(this.attributes, awsCcmConfigValidationRequestData.attributes) + && Objects.equals(this.type, awsCcmConfigValidationRequestData.type) + && Objects.equals( + this.additionalProperties, awsCcmConfigValidationRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AWSCcmConfigValidationRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSCcmConfigValidationResponse.java b/src/main/java/com/datadog/api/client/v2/model/AWSCcmConfigValidationResponse.java new file mode 100644 index 00000000000..b5dde2b9247 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AWSCcmConfigValidationResponse.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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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; + +/** AWS CCM config validation response body. */ +@JsonPropertyOrder({AWSCcmConfigValidationResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AWSCcmConfigValidationResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AWSCcmConfigValidationResponseData data; + + public AWSCcmConfigValidationResponse() {} + + @JsonCreator + public AWSCcmConfigValidationResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AWSCcmConfigValidationResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AWSCcmConfigValidationResponse data(AWSCcmConfigValidationResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * AWS CCM config validation response data. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AWSCcmConfigValidationResponseData getData() { + return data; + } + + public void setData(AWSCcmConfigValidationResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AWSCcmConfigValidationResponse + */ + @JsonAnySetter + public AWSCcmConfigValidationResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this AWSCcmConfigValidationResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AWSCcmConfigValidationResponse awsCcmConfigValidationResponse = + (AWSCcmConfigValidationResponse) o; + return Objects.equals(this.data, awsCcmConfigValidationResponse.data) + && Objects.equals( + this.additionalProperties, awsCcmConfigValidationResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AWSCcmConfigValidationResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSCcmConfigValidationResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AWSCcmConfigValidationResponseAttributes.java new file mode 100644 index 00000000000..547bb14313d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AWSCcmConfigValidationResponseAttributes.java @@ -0,0 +1,190 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes for an AWS CCM config validation response. */ +@JsonPropertyOrder({ + AWSCcmConfigValidationResponseAttributes.JSON_PROPERTY_ACCOUNT_ID, + AWSCcmConfigValidationResponseAttributes.JSON_PROPERTY_ISSUES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AWSCcmConfigValidationResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private String accountId; + + public static final String JSON_PROPERTY_ISSUES = "issues"; + private List issues = new ArrayList<>(); + + public AWSCcmConfigValidationResponseAttributes() {} + + @JsonCreator + public AWSCcmConfigValidationResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_ACCOUNT_ID) String accountId, + @JsonProperty(required = true, value = JSON_PROPERTY_ISSUES) + List issues) { + this.accountId = accountId; + this.issues = issues; + } + + public AWSCcmConfigValidationResponseAttributes accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Your AWS Account ID without dashes. + * + * @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 AWSCcmConfigValidationResponseAttributes issues(List issues) { + this.issues = issues; + for (AWSCcmConfigValidationIssue item : issues) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AWSCcmConfigValidationResponseAttributes addIssuesItem( + AWSCcmConfigValidationIssue issuesItem) { + this.issues.add(issuesItem); + this.unparsed |= issuesItem.unparsed; + return this; + } + + /** + * List of validation issues found for the Cost and Usage Report (CUR) 2.0 configuration. Empty + * when the configuration is valid. + * + * @return issues + */ + @JsonProperty(JSON_PROPERTY_ISSUES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getIssues() { + return issues; + } + + public void setIssues(List issues) { + this.issues = issues; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AWSCcmConfigValidationResponseAttributes + */ + @JsonAnySetter + public AWSCcmConfigValidationResponseAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this AWSCcmConfigValidationResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AWSCcmConfigValidationResponseAttributes awsCcmConfigValidationResponseAttributes = + (AWSCcmConfigValidationResponseAttributes) o; + return Objects.equals(this.accountId, awsCcmConfigValidationResponseAttributes.accountId) + && Objects.equals(this.issues, awsCcmConfigValidationResponseAttributes.issues) + && Objects.equals( + this.additionalProperties, + awsCcmConfigValidationResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(accountId, issues, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AWSCcmConfigValidationResponseAttributes {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" issues: ").append(toIndentedString(issues)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSCcmConfigValidationResponseData.java b/src/main/java/com/datadog/api/client/v2/model/AWSCcmConfigValidationResponseData.java new file mode 100644 index 00000000000..e834d3bc9a1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AWSCcmConfigValidationResponseData.java @@ -0,0 +1,212 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** AWS CCM config validation response data. */ +@JsonPropertyOrder({ + AWSCcmConfigValidationResponseData.JSON_PROPERTY_ATTRIBUTES, + AWSCcmConfigValidationResponseData.JSON_PROPERTY_ID, + AWSCcmConfigValidationResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AWSCcmConfigValidationResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AWSCcmConfigValidationResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AWSCcmConfigValidationType type = AWSCcmConfigValidationType.CCM_CONFIG_VALIDATION; + + public AWSCcmConfigValidationResponseData() {} + + @JsonCreator + public AWSCcmConfigValidationResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AWSCcmConfigValidationResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AWSCcmConfigValidationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AWSCcmConfigValidationResponseData attributes( + AWSCcmConfigValidationResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for an AWS CCM config validation response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AWSCcmConfigValidationResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AWSCcmConfigValidationResponseAttributes attributes) { + this.attributes = attributes; + } + + public AWSCcmConfigValidationResponseData id(String id) { + this.id = id; + return this; + } + + /** + * AWS CCM config validation resource identifier. + * + * @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 AWSCcmConfigValidationResponseData type(AWSCcmConfigValidationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * AWS CCM config validation resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AWSCcmConfigValidationType getType() { + return type; + } + + public void setType(AWSCcmConfigValidationType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AWSCcmConfigValidationResponseData + */ + @JsonAnySetter + public AWSCcmConfigValidationResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this AWSCcmConfigValidationResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AWSCcmConfigValidationResponseData awsCcmConfigValidationResponseData = + (AWSCcmConfigValidationResponseData) o; + return Objects.equals(this.attributes, awsCcmConfigValidationResponseData.attributes) + && Objects.equals(this.id, awsCcmConfigValidationResponseData.id) + && Objects.equals(this.type, awsCcmConfigValidationResponseData.type) + && Objects.equals( + this.additionalProperties, awsCcmConfigValidationResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AWSCcmConfigValidationResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AWSCcmConfigValidationType.java b/src/main/java/com/datadog/api/client/v2/model/AWSCcmConfigValidationType.java new file mode 100644 index 00000000000..2477c37d562 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AWSCcmConfigValidationType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** AWS CCM config validation resource type. */ +@JsonSerialize(using = AWSCcmConfigValidationType.AWSCcmConfigValidationTypeSerializer.class) +public class AWSCcmConfigValidationType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("ccm_config_validation")); + + public static final AWSCcmConfigValidationType CCM_CONFIG_VALIDATION = + new AWSCcmConfigValidationType("ccm_config_validation"); + + AWSCcmConfigValidationType(String value) { + super(value, allowedValues); + } + + public static class AWSCcmConfigValidationTypeSerializer + extends StdSerializer { + public AWSCcmConfigValidationTypeSerializer(Class t) { + super(t); + } + + public AWSCcmConfigValidationTypeSerializer() { + this(null); + } + + @Override + public void serialize( + AWSCcmConfigValidationType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AWSCcmConfigValidationType fromValue(String value) { + return new AWSCcmConfigValidationType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AssigneeDataType.java b/src/main/java/com/datadog/api/client/v2/model/AssigneeDataType.java new file mode 100644 index 00000000000..1ca65ec7dd7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AssigneeDataType.java @@ -0,0 +1,53 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Assignee resource type. */ +@JsonSerialize(using = AssigneeDataType.AssigneeDataTypeSerializer.class) +public class AssigneeDataType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("assignee")); + + public static final AssigneeDataType ASSIGNEE = new AssigneeDataType("assignee"); + + AssigneeDataType(String value) { + super(value, allowedValues); + } + + public static class AssigneeDataTypeSerializer extends StdSerializer { + public AssigneeDataTypeSerializer(Class t) { + super(t); + } + + public AssigneeDataTypeSerializer() { + this(null); + } + + @Override + public void serialize(AssigneeDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AssigneeDataType fromValue(String value) { + return new AssigneeDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AssigneeRequest.java b/src/main/java/com/datadog/api/client/v2/model/AssigneeRequest.java new file mode 100644 index 00000000000..8c47fb08e31 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AssigneeRequest.java @@ -0,0 +1,145 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to assign or unassign security findings. */ +@JsonPropertyOrder({AssigneeRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AssigneeRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AssigneeRequestData data; + + public AssigneeRequest() {} + + @JsonCreator + public AssigneeRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) AssigneeRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AssigneeRequest data(AssigneeRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data of the assignee request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AssigneeRequestData getData() { + return data; + } + + public void setData(AssigneeRequestData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AssigneeRequest + */ + @JsonAnySetter + public AssigneeRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this AssigneeRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssigneeRequest assigneeRequest = (AssigneeRequest) o; + return Objects.equals(this.data, assigneeRequest.data) + && Objects.equals(this.additionalProperties, assigneeRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssigneeRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/AssigneeRequestData.java similarity index 66% rename from src/main/java/com/datadog/api/client/v2/model/IncidentServiceUpdateData.java rename to src/main/java/com/datadog/api/client/v2/model/AssigneeRequestData.java index 547aa1b5d53..4e66b5edfa2 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceUpdateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/AssigneeRequestData.java @@ -17,67 +17,71 @@ import java.util.Map; import java.util.Objects; -/** Incident Service payload for update requests. */ +/** Data of the assignee request. */ @JsonPropertyOrder({ - IncidentServiceUpdateData.JSON_PROPERTY_ATTRIBUTES, - IncidentServiceUpdateData.JSON_PROPERTY_ID, - IncidentServiceUpdateData.JSON_PROPERTY_RELATIONSHIPS, - IncidentServiceUpdateData.JSON_PROPERTY_TYPE + AssigneeRequestData.JSON_PROPERTY_ATTRIBUTES, + AssigneeRequestData.JSON_PROPERTY_ID, + AssigneeRequestData.JSON_PROPERTY_RELATIONSHIPS, + AssigneeRequestData.JSON_PROPERTY_TYPE }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class IncidentServiceUpdateData { +public class AssigneeRequestData { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; - private IncidentServiceUpdateAttributes attributes; + private AssigneeRequestDataAttributes attributes; public static final String JSON_PROPERTY_ID = "id"; private String id; public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; - private IncidentServiceRelationships relationships; + private AssigneeRequestDataRelationships relationships; public static final String JSON_PROPERTY_TYPE = "type"; - private IncidentServiceType type = IncidentServiceType.SERVICES; + private AssigneeDataType type = AssigneeDataType.ASSIGNEE; - public IncidentServiceUpdateData() {} + public AssigneeRequestData() {} @JsonCreator - public IncidentServiceUpdateData( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentServiceType type) { + public AssigneeRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_RELATIONSHIPS) + AssigneeRequestDataRelationships relationships, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AssigneeDataType type) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; this.type = type; this.unparsed |= !type.isValid(); } - public IncidentServiceUpdateData attributes(IncidentServiceUpdateAttributes attributes) { + public AssigneeRequestData attributes(AssigneeRequestDataAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * The incident service's attributes for an update request. + * Attributes of the assignee request. * * @return attributes */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTRIBUTES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentServiceUpdateAttributes getAttributes() { + public AssigneeRequestDataAttributes getAttributes() { return attributes; } - public void setAttributes(IncidentServiceUpdateAttributes attributes) { + public void setAttributes(AssigneeRequestDataAttributes attributes) { this.attributes = attributes; } - public IncidentServiceUpdateData id(String id) { + public AssigneeRequestData id(String id) { this.id = id; return this; } /** - * The incident service's ID. + * Unique identifier of the assignee request. * * @return id */ @@ -92,36 +96,45 @@ public void setId(String id) { this.id = id; } + public AssigneeRequestData relationships(AssigneeRequestDataRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + /** - * The incident service's relationships. + * Relationships of the assignee request. * * @return relationships */ - @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentServiceRelationships getRelationships() { + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AssigneeRequestDataRelationships getRelationships() { return relationships; } - public IncidentServiceUpdateData type(IncidentServiceType type) { + public void setRelationships(AssigneeRequestDataRelationships relationships) { + this.relationships = relationships; + } + + public AssigneeRequestData type(AssigneeDataType type) { this.type = type; this.unparsed |= !type.isValid(); return this; } /** - * Incident service resource type. + * Assignee resource type. * * @return type */ @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentServiceType getType() { + public AssigneeDataType getType() { return type; } - public void setType(IncidentServiceType type) { + public void setType(AssigneeDataType type) { if (!type.isValid()) { this.unparsed = true; } @@ -140,10 +153,10 @@ public void setType(IncidentServiceType type) { * * @param key The arbitrary key to set * @param value The associated value - * @return IncidentServiceUpdateData + * @return AssigneeRequestData */ @JsonAnySetter - public IncidentServiceUpdateData putAdditionalProperty(String key, Object value) { + public AssigneeRequestData putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -174,7 +187,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this IncidentServiceUpdateData object is equal to o. */ + /** Return true if this AssigneeRequestData object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -183,13 +196,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { 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) - && Objects.equals( - this.additionalProperties, incidentServiceUpdateData.additionalProperties); + AssigneeRequestData assigneeRequestData = (AssigneeRequestData) o; + return Objects.equals(this.attributes, assigneeRequestData.attributes) + && Objects.equals(this.id, assigneeRequestData.id) + && Objects.equals(this.relationships, assigneeRequestData.relationships) + && Objects.equals(this.type, assigneeRequestData.type) + && Objects.equals(this.additionalProperties, assigneeRequestData.additionalProperties); } @Override @@ -200,7 +212,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class IncidentServiceUpdateData {\n"); + sb.append("class AssigneeRequestData {\n"); sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetClustersResponseMeta.java b/src/main/java/com/datadog/api/client/v2/model/AssigneeRequestDataAttributes.java similarity index 67% rename from src/main/java/com/datadog/api/client/v2/model/FleetClustersResponseMeta.java rename to src/main/java/com/datadog/api/client/v2/model/AssigneeRequestDataAttributes.java index de5e2abbba6..ca8c96ba564 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FleetClustersResponseMeta.java +++ b/src/main/java/com/datadog/api/client/v2/model/AssigneeRequestDataAttributes.java @@ -16,34 +16,35 @@ import java.util.Map; import java.util.Objects; -/** Metadata for the list of clusters response. */ -@JsonPropertyOrder({FleetClustersResponseMeta.JSON_PROPERTY_TOTAL_FILTERED_COUNT}) +/** Attributes of the assignee request. */ +@JsonPropertyOrder({AssigneeRequestDataAttributes.JSON_PROPERTY_ASSIGNEE_ID}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class FleetClustersResponseMeta { +public class AssigneeRequestDataAttributes { @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_TOTAL_FILTERED_COUNT = "total_filtered_count"; - private Long totalFilteredCount; + public static final String JSON_PROPERTY_ASSIGNEE_ID = "assignee_id"; + private String assigneeId; - public FleetClustersResponseMeta totalFilteredCount(Long totalFilteredCount) { - this.totalFilteredCount = totalFilteredCount; + public AssigneeRequestDataAttributes assigneeId(String assigneeId) { + this.assigneeId = assigneeId; return this; } /** - * Total number of clusters matching the filter criteria across all pages. + * Unique identifier of the Datadog user to assign the security findings to. If this field is not + * provided, the security findings are unassigned. * - * @return totalFilteredCount + * @return assigneeId */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TOTAL_FILTERED_COUNT) + @JsonProperty(JSON_PROPERTY_ASSIGNEE_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getTotalFilteredCount() { - return totalFilteredCount; + public String getAssigneeId() { + return assigneeId; } - public void setTotalFilteredCount(Long totalFilteredCount) { - this.totalFilteredCount = totalFilteredCount; + public void setAssigneeId(String assigneeId) { + this.assigneeId = assigneeId; } /** @@ -58,10 +59,10 @@ public void setTotalFilteredCount(Long totalFilteredCount) { * * @param key The arbitrary key to set * @param value The associated value - * @return FleetClustersResponseMeta + * @return AssigneeRequestDataAttributes */ @JsonAnySetter - public FleetClustersResponseMeta putAdditionalProperty(String key, Object value) { + public AssigneeRequestDataAttributes putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -92,7 +93,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this FleetClustersResponseMeta object is equal to o. */ + /** Return true if this AssigneeRequestDataAttributes object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -101,22 +102,22 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - FleetClustersResponseMeta fleetClustersResponseMeta = (FleetClustersResponseMeta) o; - return Objects.equals(this.totalFilteredCount, fleetClustersResponseMeta.totalFilteredCount) + AssigneeRequestDataAttributes assigneeRequestDataAttributes = (AssigneeRequestDataAttributes) o; + return Objects.equals(this.assigneeId, assigneeRequestDataAttributes.assigneeId) && Objects.equals( - this.additionalProperties, fleetClustersResponseMeta.additionalProperties); + this.additionalProperties, assigneeRequestDataAttributes.additionalProperties); } @Override public int hashCode() { - return Objects.hash(totalFilteredCount, additionalProperties); + return Objects.hash(assigneeId, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class FleetClustersResponseMeta {\n"); - sb.append(" totalFilteredCount: ").append(toIndentedString(totalFilteredCount)).append("\n"); + sb.append("class AssigneeRequestDataAttributes {\n"); + sb.append(" assigneeId: ").append(toIndentedString(assigneeId)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/AssigneeRequestDataRelationships.java b/src/main/java/com/datadog/api/client/v2/model/AssigneeRequestDataRelationships.java new file mode 100644 index 00000000000..80b9e382c54 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AssigneeRequestDataRelationships.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Relationships of the assignee request. */ +@JsonPropertyOrder({AssigneeRequestDataRelationships.JSON_PROPERTY_FINDINGS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AssigneeRequestDataRelationships { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FINDINGS = "findings"; + private Findings findings; + + public AssigneeRequestDataRelationships() {} + + @JsonCreator + public AssigneeRequestDataRelationships( + @JsonProperty(required = true, value = JSON_PROPERTY_FINDINGS) Findings findings) { + this.findings = findings; + this.unparsed |= findings.unparsed; + } + + public AssigneeRequestDataRelationships findings(Findings findings) { + this.findings = findings; + this.unparsed |= findings.unparsed; + return this; + } + + /** + * A list of security findings. + * + * @return findings + */ + @JsonProperty(JSON_PROPERTY_FINDINGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Findings getFindings() { + return findings; + } + + public void setFindings(Findings findings) { + this.findings = findings; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AssigneeRequestDataRelationships + */ + @JsonAnySetter + public AssigneeRequestDataRelationships putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this AssigneeRequestDataRelationships object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssigneeRequestDataRelationships assigneeRequestDataRelationships = + (AssigneeRequestDataRelationships) o; + return Objects.equals(this.findings, assigneeRequestDataRelationships.findings) + && Objects.equals( + this.additionalProperties, assigneeRequestDataRelationships.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(findings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssigneeRequestDataRelationships {\n"); + sb.append(" findings: ").append(toIndentedString(findings)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetClustersResponse.java b/src/main/java/com/datadog/api/client/v2/model/AssigneeResponse.java similarity index 73% rename from src/main/java/com/datadog/api/client/v2/model/FleetClustersResponse.java rename to src/main/java/com/datadog/api/client/v2/model/AssigneeResponse.java index 0d7d7929f34..1d7d40a021e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FleetClustersResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/AssigneeResponse.java @@ -17,70 +17,67 @@ import java.util.Map; import java.util.Objects; -/** Response containing a paginated list of fleet clusters. */ -@JsonPropertyOrder({ - FleetClustersResponse.JSON_PROPERTY_DATA, - FleetClustersResponse.JSON_PROPERTY_META -}) +/** Response for the assign or unassign request. */ +@JsonPropertyOrder({AssigneeResponse.JSON_PROPERTY_DATA, AssigneeResponse.JSON_PROPERTY_META}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class FleetClustersResponse { +public class AssigneeResponse { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private FleetClustersResponseData data; + private AssigneeResponseData data; public static final String JSON_PROPERTY_META = "meta"; - private FleetClustersResponseMeta meta; + private AssigneeResponseMeta meta; - public FleetClustersResponse() {} + public AssigneeResponse() {} @JsonCreator - public FleetClustersResponse( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) FleetClustersResponseData data) { + public AssigneeResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) AssigneeResponseData data) { this.data = data; this.unparsed |= data.unparsed; } - public FleetClustersResponse data(FleetClustersResponseData data) { + public AssigneeResponse data(AssigneeResponseData data) { this.data = data; this.unparsed |= data.unparsed; return this; } /** - * The response data containing status and clusters array. + * Data of the assignee response. * * @return data */ @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FleetClustersResponseData getData() { + public AssigneeResponseData getData() { return data; } - public void setData(FleetClustersResponseData data) { + public void setData(AssigneeResponseData data) { this.data = data; } - public FleetClustersResponse meta(FleetClustersResponseMeta meta) { + public AssigneeResponse meta(AssigneeResponseMeta meta) { this.meta = meta; this.unparsed |= meta.unparsed; return this; } /** - * Metadata for the list of clusters response. + * Per-finding warnings and failures produced while processing the bulk assignee request. * * @return meta */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_META) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public FleetClustersResponseMeta getMeta() { + public AssigneeResponseMeta getMeta() { return meta; } - public void setMeta(FleetClustersResponseMeta meta) { + public void setMeta(AssigneeResponseMeta meta) { this.meta = meta; } @@ -96,10 +93,10 @@ public void setMeta(FleetClustersResponseMeta meta) { * * @param key The arbitrary key to set * @param value The associated value - * @return FleetClustersResponse + * @return AssigneeResponse */ @JsonAnySetter - public FleetClustersResponse putAdditionalProperty(String key, Object value) { + public AssigneeResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -130,7 +127,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this FleetClustersResponse object is equal to o. */ + /** Return true if this AssigneeResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -139,10 +136,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - FleetClustersResponse fleetClustersResponse = (FleetClustersResponse) o; - return Objects.equals(this.data, fleetClustersResponse.data) - && Objects.equals(this.meta, fleetClustersResponse.meta) - && Objects.equals(this.additionalProperties, fleetClustersResponse.additionalProperties); + AssigneeResponse assigneeResponse = (AssigneeResponse) o; + return Objects.equals(this.data, assigneeResponse.data) + && Objects.equals(this.meta, assigneeResponse.meta) + && Objects.equals(this.additionalProperties, assigneeResponse.additionalProperties); } @Override @@ -153,7 +150,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class FleetClustersResponse {\n"); + sb.append("class AssigneeResponse {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); sb.append(" additionalProperties: ") diff --git a/src/main/java/com/datadog/api/client/v2/model/AssigneeResponseData.java b/src/main/java/com/datadog/api/client/v2/model/AssigneeResponseData.java new file mode 100644 index 00000000000..e08b9bf7911 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AssigneeResponseData.java @@ -0,0 +1,209 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data of the assignee response. */ +@JsonPropertyOrder({ + AssigneeResponseData.JSON_PROPERTY_ATTRIBUTES, + AssigneeResponseData.JSON_PROPERTY_ID, + AssigneeResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AssigneeResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AssigneeResponseDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private AssigneeDataType type = AssigneeDataType.ASSIGNEE; + + public AssigneeResponseData() {} + + @JsonCreator + public AssigneeResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AssigneeResponseDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) AssigneeDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AssigneeResponseData attributes(AssigneeResponseDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of the assignee response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AssigneeResponseDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AssigneeResponseDataAttributes attributes) { + this.attributes = attributes; + } + + public AssigneeResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the assignee request. + * + * @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 AssigneeResponseData type(AssigneeDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Assignee resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AssigneeDataType getType() { + return type; + } + + public void setType(AssigneeDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AssigneeResponseData + */ + @JsonAnySetter + public AssigneeResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this AssigneeResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssigneeResponseData assigneeResponseData = (AssigneeResponseData) o; + return Objects.equals(this.attributes, assigneeResponseData.attributes) + && Objects.equals(this.id, assigneeResponseData.id) + && Objects.equals(this.type, assigneeResponseData.type) + && Objects.equals(this.additionalProperties, assigneeResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssigneeResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AssigneeResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AssigneeResponseDataAttributes.java new file mode 100644 index 00000000000..85763ebff7d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AssigneeResponseDataAttributes.java @@ -0,0 +1,138 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of the assignee response. */ +@JsonPropertyOrder({AssigneeResponseDataAttributes.JSON_PROPERTY_ASSIGNEE_ID}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AssigneeResponseDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ASSIGNEE_ID = "assignee_id"; + private String assigneeId; + + public AssigneeResponseDataAttributes assigneeId(String assigneeId) { + this.assigneeId = assigneeId; + return this; + } + + /** + * Unique identifier of the Datadog user assigned to the security findings. Omitted when the + * findings were unassigned. + * + * @return assigneeId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ASSIGNEE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAssigneeId() { + return assigneeId; + } + + public void setAssigneeId(String assigneeId) { + this.assigneeId = assigneeId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AssigneeResponseDataAttributes + */ + @JsonAnySetter + public AssigneeResponseDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this AssigneeResponseDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssigneeResponseDataAttributes assigneeResponseDataAttributes = + (AssigneeResponseDataAttributes) o; + return Objects.equals(this.assigneeId, assigneeResponseDataAttributes.assigneeId) + && Objects.equals( + this.additionalProperties, assigneeResponseDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(assigneeId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssigneeResponseDataAttributes {\n"); + sb.append(" assigneeId: ").append(toIndentedString(assigneeId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AssigneeResponseMeta.java b/src/main/java/com/datadog/api/client/v2/model/AssigneeResponseMeta.java new file mode 100644 index 00000000000..f94ee77ab88 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AssigneeResponseMeta.java @@ -0,0 +1,191 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import 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; + +/** Per-finding warnings and failures produced while processing the bulk assignee request. */ +@JsonPropertyOrder({ + AssigneeResponseMeta.JSON_PROPERTY_FAILURES, + AssigneeResponseMeta.JSON_PROPERTY_WARNINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AssigneeResponseMeta { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FAILURES = "failures"; + private List failures = null; + + public static final String JSON_PROPERTY_WARNINGS = "warnings"; + private List warnings = null; + + public AssigneeResponseMeta failures(List failures) { + this.failures = failures; + for (AssignmentResult item : failures) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AssigneeResponseMeta addFailuresItem(AssignmentResult failuresItem) { + if (this.failures == null) { + this.failures = new ArrayList<>(); + } + this.failures.add(failuresItem); + this.unparsed |= failuresItem.unparsed; + return this; + } + + /** + * Findings that could not be assigned or unassigned. + * + * @return failures + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAILURES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFailures() { + return failures; + } + + public void setFailures(List failures) { + this.failures = failures; + } + + public AssigneeResponseMeta warnings(List warnings) { + this.warnings = warnings; + for (AssignmentResult item : warnings) { + this.unparsed |= item.unparsed; + } + return this; + } + + public AssigneeResponseMeta addWarningsItem(AssignmentResult warningsItem) { + if (this.warnings == null) { + this.warnings = new ArrayList<>(); + } + this.warnings.add(warningsItem); + this.unparsed |= warningsItem.unparsed; + return this; + } + + /** + * Findings for which the assignment succeeded but a non-critical error occurred during + * processing. + * + * @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; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AssigneeResponseMeta + */ + @JsonAnySetter + public AssigneeResponseMeta putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this AssigneeResponseMeta object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssigneeResponseMeta assigneeResponseMeta = (AssigneeResponseMeta) o; + return Objects.equals(this.failures, assigneeResponseMeta.failures) + && Objects.equals(this.warnings, assigneeResponseMeta.warnings) + && Objects.equals(this.additionalProperties, assigneeResponseMeta.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(failures, warnings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssigneeResponseMeta {\n"); + sb.append(" failures: ").append(toIndentedString(failures)).append("\n"); + sb.append(" warnings: ").append(toIndentedString(warnings)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AssignmentResult.java b/src/main/java/com/datadog/api/client/v2/model/AssignmentResult.java new file mode 100644 index 00000000000..5ccf4c777ee --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AssignmentResult.java @@ -0,0 +1,229 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Per-finding outcome of an assign or unassign operation. */ +@JsonPropertyOrder({ + AssignmentResult.JSON_PROPERTY_DETAIL, + AssignmentResult.JSON_PROPERTY_FINDING_ID, + AssignmentResult.JSON_PROPERTY_STATUS, + AssignmentResult.JSON_PROPERTY_TITLE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AssignmentResult { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DETAIL = "detail"; + private String detail; + + public static final String JSON_PROPERTY_FINDING_ID = "finding_id"; + private String findingId; + + public static final String JSON_PROPERTY_STATUS = "status"; + private Integer status; + + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public AssignmentResult() {} + + @JsonCreator + public AssignmentResult( + @JsonProperty(required = true, value = JSON_PROPERTY_DETAIL) String detail, + @JsonProperty(required = true, value = JSON_PROPERTY_FINDING_ID) String findingId, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) Integer status, + @JsonProperty(required = true, value = JSON_PROPERTY_TITLE) String title) { + this.detail = detail; + this.findingId = findingId; + this.status = status; + this.title = title; + } + + public AssignmentResult detail(String detail) { + this.detail = detail; + return this; + } + + /** + * Human-readable explanation of the outcome. + * + * @return detail + */ + @JsonProperty(JSON_PROPERTY_DETAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDetail() { + return detail; + } + + public void setDetail(String detail) { + this.detail = detail; + } + + public AssignmentResult findingId(String findingId) { + this.findingId = findingId; + return this; + } + + /** + * Unique identifier of the security finding. + * + * @return findingId + */ + @JsonProperty(JSON_PROPERTY_FINDING_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getFindingId() { + return findingId; + } + + public void setFindingId(String findingId) { + this.findingId = findingId; + } + + public AssignmentResult status(Integer status) { + this.status = status; + return this; + } + + /** + * HTTP-like status code describing the outcome for this finding. maximum: 599 + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public AssignmentResult title(String title) { + this.title = title; + return this; + } + + /** + * Short label describing the outcome for this finding. + * + * @return title + */ + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AssignmentResult + */ + @JsonAnySetter + public AssignmentResult putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this AssignmentResult object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssignmentResult assignmentResult = (AssignmentResult) o; + return Objects.equals(this.detail, assignmentResult.detail) + && Objects.equals(this.findingId, assignmentResult.findingId) + && Objects.equals(this.status, assignmentResult.status) + && Objects.equals(this.title, assignmentResult.title) + && Objects.equals(this.additionalProperties, assignmentResult.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(detail, findingId, status, title, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssignmentResult {\n"); + sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); + sb.append(" findingId: ").append(toIndentedString(findingId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AttachServiceNowTicketRequest.java b/src/main/java/com/datadog/api/client/v2/model/AttachServiceNowTicketRequest.java new file mode 100644 index 00000000000..add3104d9b7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AttachServiceNowTicketRequest.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request for attaching security findings to a ServiceNow ticket. */ +@JsonPropertyOrder({AttachServiceNowTicketRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AttachServiceNowTicketRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private AttachServiceNowTicketRequestData data; + + public AttachServiceNowTicketRequest() {} + + @JsonCreator + public AttachServiceNowTicketRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + AttachServiceNowTicketRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public AttachServiceNowTicketRequest data(AttachServiceNowTicketRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data of the ServiceNow ticket to attach security findings to. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AttachServiceNowTicketRequestData getData() { + return data; + } + + public void setData(AttachServiceNowTicketRequestData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AttachServiceNowTicketRequest + */ + @JsonAnySetter + public AttachServiceNowTicketRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this AttachServiceNowTicketRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AttachServiceNowTicketRequest attachServiceNowTicketRequest = (AttachServiceNowTicketRequest) o; + return Objects.equals(this.data, attachServiceNowTicketRequest.data) + && Objects.equals( + this.additionalProperties, attachServiceNowTicketRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AttachServiceNowTicketRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AttachServiceNowTicketRequestData.java b/src/main/java/com/datadog/api/client/v2/model/AttachServiceNowTicketRequestData.java new file mode 100644 index 00000000000..213398db35a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AttachServiceNowTicketRequestData.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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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; + +/** Data of the ServiceNow ticket to attach security findings to. */ +@JsonPropertyOrder({ + AttachServiceNowTicketRequestData.JSON_PROPERTY_ATTRIBUTES, + AttachServiceNowTicketRequestData.JSON_PROPERTY_RELATIONSHIPS, + AttachServiceNowTicketRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AttachServiceNowTicketRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private AttachServiceNowTicketRequestDataAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private AttachServiceNowTicketRequestDataRelationships relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ServiceNowTicketsDataType type = ServiceNowTicketsDataType.SERVICENOW_TICKETS; + + public AttachServiceNowTicketRequestData() {} + + @JsonCreator + public AttachServiceNowTicketRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + AttachServiceNowTicketRequestDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_RELATIONSHIPS) + AttachServiceNowTicketRequestDataRelationships relationships, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ServiceNowTicketsDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public AttachServiceNowTicketRequestData attributes( + AttachServiceNowTicketRequestDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of the ServiceNow ticket to attach security findings to. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AttachServiceNowTicketRequestDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(AttachServiceNowTicketRequestDataAttributes attributes) { + this.attributes = attributes; + } + + public AttachServiceNowTicketRequestData relationships( + AttachServiceNowTicketRequestDataRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Relationships of the ServiceNow ticket to attach security findings to. + * + * @return relationships + */ + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public AttachServiceNowTicketRequestDataRelationships getRelationships() { + return relationships; + } + + public void setRelationships(AttachServiceNowTicketRequestDataRelationships relationships) { + this.relationships = relationships; + } + + public AttachServiceNowTicketRequestData type(ServiceNowTicketsDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * ServiceNow tickets resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ServiceNowTicketsDataType getType() { + return type; + } + + public void setType(ServiceNowTicketsDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AttachServiceNowTicketRequestData + */ + @JsonAnySetter + public AttachServiceNowTicketRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this AttachServiceNowTicketRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AttachServiceNowTicketRequestData attachServiceNowTicketRequestData = + (AttachServiceNowTicketRequestData) o; + return Objects.equals(this.attributes, attachServiceNowTicketRequestData.attributes) + && Objects.equals(this.relationships, attachServiceNowTicketRequestData.relationships) + && Objects.equals(this.type, attachServiceNowTicketRequestData.type) + && Objects.equals( + this.additionalProperties, attachServiceNowTicketRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AttachServiceNowTicketRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AttachServiceNowTicketRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AttachServiceNowTicketRequestDataAttributes.java new file mode 100644 index 00000000000..71880d245d3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AttachServiceNowTicketRequestDataAttributes.java @@ -0,0 +1,156 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of the ServiceNow ticket to attach security findings to. */ +@JsonPropertyOrder({ + AttachServiceNowTicketRequestDataAttributes.JSON_PROPERTY_SERVICENOW_TICKET_URL +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AttachServiceNowTicketRequestDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_SERVICENOW_TICKET_URL = "servicenow_ticket_url"; + private String servicenowTicketUrl; + + public AttachServiceNowTicketRequestDataAttributes() {} + + @JsonCreator + public AttachServiceNowTicketRequestDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_SERVICENOW_TICKET_URL) + String servicenowTicketUrl) { + this.servicenowTicketUrl = servicenowTicketUrl; + } + + public AttachServiceNowTicketRequestDataAttributes servicenowTicketUrl( + String servicenowTicketUrl) { + this.servicenowTicketUrl = servicenowTicketUrl; + return this; + } + + /** + * URL of the ServiceNow incident to attach security findings to. Must be a service-now.com URL + * pointing to an incident record. + * + * @return servicenowTicketUrl + */ + @JsonProperty(JSON_PROPERTY_SERVICENOW_TICKET_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getServicenowTicketUrl() { + return servicenowTicketUrl; + } + + public void setServicenowTicketUrl(String servicenowTicketUrl) { + this.servicenowTicketUrl = servicenowTicketUrl; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AttachServiceNowTicketRequestDataAttributes + */ + @JsonAnySetter + public AttachServiceNowTicketRequestDataAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this AttachServiceNowTicketRequestDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AttachServiceNowTicketRequestDataAttributes attachServiceNowTicketRequestDataAttributes = + (AttachServiceNowTicketRequestDataAttributes) o; + return Objects.equals( + this.servicenowTicketUrl, + attachServiceNowTicketRequestDataAttributes.servicenowTicketUrl) + && Objects.equals( + this.additionalProperties, + attachServiceNowTicketRequestDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(servicenowTicketUrl, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AttachServiceNowTicketRequestDataAttributes {\n"); + sb.append(" servicenowTicketUrl: ") + .append(toIndentedString(servicenowTicketUrl)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AttachServiceNowTicketRequestDataRelationships.java b/src/main/java/com/datadog/api/client/v2/model/AttachServiceNowTicketRequestDataRelationships.java new file mode 100644 index 00000000000..9ebec80349e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AttachServiceNowTicketRequestDataRelationships.java @@ -0,0 +1,181 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Relationships of the ServiceNow ticket to attach security findings to. */ +@JsonPropertyOrder({ + AttachServiceNowTicketRequestDataRelationships.JSON_PROPERTY_FINDINGS, + AttachServiceNowTicketRequestDataRelationships.JSON_PROPERTY_PROJECT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class AttachServiceNowTicketRequestDataRelationships { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FINDINGS = "findings"; + private Findings findings; + + public static final String JSON_PROPERTY_PROJECT = "project"; + private CaseManagementProject project; + + public AttachServiceNowTicketRequestDataRelationships() {} + + @JsonCreator + public AttachServiceNowTicketRequestDataRelationships( + @JsonProperty(required = true, value = JSON_PROPERTY_FINDINGS) Findings findings, + @JsonProperty(required = true, value = JSON_PROPERTY_PROJECT) CaseManagementProject project) { + this.findings = findings; + this.unparsed |= findings.unparsed; + this.project = project; + this.unparsed |= project.unparsed; + } + + public AttachServiceNowTicketRequestDataRelationships findings(Findings findings) { + this.findings = findings; + this.unparsed |= findings.unparsed; + return this; + } + + /** + * A list of security findings. + * + * @return findings + */ + @JsonProperty(JSON_PROPERTY_FINDINGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Findings getFindings() { + return findings; + } + + public void setFindings(Findings findings) { + this.findings = findings; + } + + public AttachServiceNowTicketRequestDataRelationships project(CaseManagementProject project) { + this.project = project; + this.unparsed |= project.unparsed; + return this; + } + + /** + * Case management project. + * + * @return project + */ + @JsonProperty(JSON_PROPERTY_PROJECT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CaseManagementProject getProject() { + return project; + } + + public void setProject(CaseManagementProject project) { + this.project = project; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return AttachServiceNowTicketRequestDataRelationships + */ + @JsonAnySetter + public AttachServiceNowTicketRequestDataRelationships putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this AttachServiceNowTicketRequestDataRelationships object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AttachServiceNowTicketRequestDataRelationships attachServiceNowTicketRequestDataRelationships = + (AttachServiceNowTicketRequestDataRelationships) o; + return Objects.equals(this.findings, attachServiceNowTicketRequestDataRelationships.findings) + && Objects.equals(this.project, attachServiceNowTicketRequestDataRelationships.project) + && Objects.equals( + this.additionalProperties, + attachServiceNowTicketRequestDataRelationships.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(findings, project, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AttachServiceNowTicketRequestDataRelationships {\n"); + sb.append(" findings: ").append(toIndentedString(findings)).append("\n"); + sb.append(" project: ").append(toIndentedString(project)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CloneFormData.java b/src/main/java/com/datadog/api/client/v2/model/CloneFormData.java new file mode 100644 index 00000000000..2054c4c99d4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CloneFormData.java @@ -0,0 +1,174 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The data for cloning a form. */ +@JsonPropertyOrder({CloneFormData.JSON_PROPERTY_ATTRIBUTES, CloneFormData.JSON_PROPERTY_TYPE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CloneFormData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CloneFormDataAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private FormType type = FormType.FORMS; + + public CloneFormData() {} + + @JsonCreator + public CloneFormData(@JsonProperty(required = true, value = JSON_PROPERTY_TYPE) FormType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public CloneFormData attributes(CloneFormDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The attributes for cloning a form. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CloneFormDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(CloneFormDataAttributes attributes) { + this.attributes = attributes; + } + + public CloneFormData type(FormType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type for a form. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FormType getType() { + return type; + } + + public void setType(FormType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CloneFormData + */ + @JsonAnySetter + public CloneFormData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CloneFormData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CloneFormData cloneFormData = (CloneFormData) o; + return Objects.equals(this.attributes, cloneFormData.attributes) + && Objects.equals(this.type, cloneFormData.type) + && Objects.equals(this.additionalProperties, cloneFormData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloneFormData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CloneFormDataAttributes.java similarity index 73% rename from src/main/java/com/datadog/api/client/v2/model/IncidentServiceCreateAttributes.java rename to src/main/java/com/datadog/api/client/v2/model/CloneFormDataAttributes.java index fe4bf6035e5..75135f83a15 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceCreateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloneFormDataAttributes.java @@ -8,7 +8,6 @@ import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @@ -17,35 +16,28 @@ import java.util.Map; import java.util.Objects; -/** The incident service's attributes for a create request. */ -@JsonPropertyOrder({IncidentServiceCreateAttributes.JSON_PROPERTY_NAME}) +/** The attributes for cloning a form. */ +@JsonPropertyOrder({CloneFormDataAttributes.JSON_PROPERTY_NAME}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class IncidentServiceCreateAttributes { +public class CloneFormDataAttributes { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_NAME = "name"; private String name; - public IncidentServiceCreateAttributes() {} - - @JsonCreator - public IncidentServiceCreateAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.name = name; - } - - public IncidentServiceCreateAttributes name(String name) { + public CloneFormDataAttributes name(String name) { this.name = name; return this; } /** - * Name of the incident service. + * The name for the cloned form. Defaults to "Copy of (source form name)" if not provided. * * @return name */ + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getName() { return name; } @@ -66,10 +58,10 @@ public void setName(String name) { * * @param key The arbitrary key to set * @param value The associated value - * @return IncidentServiceCreateAttributes + * @return CloneFormDataAttributes */ @JsonAnySetter - public IncidentServiceCreateAttributes putAdditionalProperty(String key, Object value) { + public CloneFormDataAttributes putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -100,7 +92,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this IncidentServiceCreateAttributes object is equal to o. */ + /** Return true if this CloneFormDataAttributes object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,11 +101,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentServiceCreateAttributes incidentServiceCreateAttributes = - (IncidentServiceCreateAttributes) o; - return Objects.equals(this.name, incidentServiceCreateAttributes.name) - && Objects.equals( - this.additionalProperties, incidentServiceCreateAttributes.additionalProperties); + CloneFormDataAttributes cloneFormDataAttributes = (CloneFormDataAttributes) o; + return Objects.equals(this.name, cloneFormDataAttributes.name) + && Objects.equals(this.additionalProperties, cloneFormDataAttributes.additionalProperties); } @Override @@ -124,7 +114,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class IncidentServiceCreateAttributes {\n"); + sb.append("class CloneFormDataAttributes {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/CloneFormRequest.java b/src/main/java/com/datadog/api/client/v2/model/CloneFormRequest.java new file mode 100644 index 00000000000..5c743dcf24b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CloneFormRequest.java @@ -0,0 +1,145 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A request to clone a form. */ +@JsonPropertyOrder({CloneFormRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CloneFormRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private CloneFormData data; + + public CloneFormRequest() {} + + @JsonCreator + public CloneFormRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) CloneFormData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public CloneFormRequest data(CloneFormData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data for cloning a form. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CloneFormData getData() { + return data; + } + + public void setData(CloneFormData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CloneFormRequest + */ + @JsonAnySetter + public CloneFormRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CloneFormRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CloneFormRequest cloneFormRequest = (CloneFormRequest) o; + return Objects.equals(this.data, cloneFormRequest.data) + && Objects.equals(this.additionalProperties, cloneFormRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloneFormRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleActionSetValue.java b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleActionSetValue.java index 0f0cbaab9e5..0f32313c7ed 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleActionSetValue.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleActionSetValue.java @@ -131,45 +131,44 @@ public CloudWorkloadSecurityAgentRuleActionSetValue deserialize( log.log(Level.FINER, "Input data does not match schema 'String'", e); } - // deserialize Integer + // deserialize Long try { boolean attemptParsing = true; // ensure that we respect type coercion as set on the client ObjectMapper - if (Integer.class.equals(Integer.class) - || Integer.class.equals(Long.class) - || Integer.class.equals(Float.class) - || Integer.class.equals(Double.class) - || Integer.class.equals(Boolean.class) - || Integer.class.equals(String.class)) { + if (Long.class.equals(Integer.class) + || Long.class.equals(Long.class) + || Long.class.equals(Float.class) + || Long.class.equals(Double.class) + || Long.class.equals(Boolean.class) + || Long.class.equals(String.class)) { attemptParsing = typeCoercion; if (!attemptParsing) { attemptParsing |= - ((Integer.class.equals(Integer.class) || Integer.class.equals(Long.class)) + ((Long.class.equals(Integer.class) || Long.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); attemptParsing |= - ((Integer.class.equals(Float.class) || Integer.class.equals(Double.class)) + ((Long.class.equals(Float.class) || Long.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); attemptParsing |= - (Integer.class.equals(Boolean.class) + (Long.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= - (Integer.class.equals(String.class) && token == JsonToken.VALUE_STRING); + attemptParsing |= (Long.class.equals(String.class) && token == JsonToken.VALUE_STRING); } } if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(Integer.class); + tmp = tree.traverse(jp.getCodec()).readValueAs(Long.class); // TODO: there is no validation against JSON schema constraints // (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 'Integer'"); + log.log(Level.FINER, "Input data matches schema 'Long'"); } } catch (Exception e) { // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'Integer'", e); + log.log(Level.FINER, "Input data does not match schema 'Long'", e); } // deserialize Boolean @@ -249,7 +248,7 @@ public CloudWorkloadSecurityAgentRuleActionSetValue(String o) { setActualInstance(o); } - public CloudWorkloadSecurityAgentRuleActionSetValue(Integer o) { + public CloudWorkloadSecurityAgentRuleActionSetValue(Long o) { super("oneOf", Boolean.FALSE); setActualInstance(o); } @@ -261,7 +260,7 @@ public CloudWorkloadSecurityAgentRuleActionSetValue(Boolean o) { static { schemas.put("String", new GenericType() {}); - schemas.put("Integer", new GenericType() {}); + schemas.put("Long", new GenericType() {}); schemas.put("Boolean", new GenericType() {}); JSON.registerDescendants( CloudWorkloadSecurityAgentRuleActionSetValue.class, Collections.unmodifiableMap(schemas)); @@ -274,7 +273,7 @@ public Map getSchemas() { /** * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: String, Integer, Boolean + * against the oneOf child schemas: String, Long, Boolean * *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a * composed schema (allOf, anyOf, oneOf). @@ -285,7 +284,7 @@ public void setActualInstance(Object instance) { super.setActualInstance(instance); return; } - if (JSON.isInstanceOf(Integer.class, instance, new HashSet>())) { + if (JSON.isInstanceOf(Long.class, instance, new HashSet>())) { super.setActualInstance(instance); return; } @@ -298,13 +297,13 @@ public void setActualInstance(Object instance) { super.setActualInstance(instance); return; } - throw new RuntimeException("Invalid instance type. Must be String, Integer, Boolean"); + throw new RuntimeException("Invalid instance type. Must be String, Long, Boolean"); } /** - * Get the actual instance, which can be the following: String, Integer, Boolean + * Get the actual instance, which can be the following: String, Long, Boolean * - * @return The actual instance (String, Integer, Boolean) + * @return The actual instance (String, Long, Boolean) */ @Override public Object getActualInstance() { @@ -323,14 +322,14 @@ public String getString() throws ClassCastException { } /** - * Get the actual instance of `Integer`. If the actual instance is not `Integer`, the - * ClassCastException will be thrown. + * Get the actual instance of `Long`. If the actual instance is not `Long`, the ClassCastException + * will be thrown. * - * @return The actual instance of `Integer` - * @throws ClassCastException if the instance is not `Integer` + * @return The actual instance of `Long` + * @throws ClassCastException if the instance is not `Long` */ - public Integer getInteger() throws ClassCastException { - return (Integer) super.getActualInstance(); + public Long getLong() throws ClassCastException { + return (Long) super.getActualInstance(); } /** diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateFormData.java b/src/main/java/com/datadog/api/client/v2/model/CreateFormData.java new file mode 100644 index 00000000000..1d9ade48fea --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateFormData.java @@ -0,0 +1,178 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The data for creating a form. */ +@JsonPropertyOrder({CreateFormData.JSON_PROPERTY_ATTRIBUTES, CreateFormData.JSON_PROPERTY_TYPE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateFormData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateFormDataAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private FormType type = FormType.FORMS; + + public CreateFormData() {} + + @JsonCreator + public CreateFormData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + CreateFormDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) FormType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public CreateFormData attributes(CreateFormDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The attributes for creating a form. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CreateFormDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(CreateFormDataAttributes attributes) { + this.attributes = attributes; + } + + public CreateFormData type(FormType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type for a form. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FormType getType() { + return type; + } + + public void setType(FormType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CreateFormData + */ + @JsonAnySetter + public CreateFormData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CreateFormData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateFormData createFormData = (CreateFormData) o; + return Objects.equals(this.attributes, createFormData.attributes) + && Objects.equals(this.type, createFormData.type) + && Objects.equals(this.additionalProperties, createFormData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateFormData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateFormDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CreateFormDataAttributes.java new file mode 100644 index 00000000000..89bf4116123 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateFormDataAttributes.java @@ -0,0 +1,324 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The attributes for creating a form. */ +@JsonPropertyOrder({ + CreateFormDataAttributes.JSON_PROPERTY_ANONYMOUS, + CreateFormDataAttributes.JSON_PROPERTY_DATA_DEFINITION, + CreateFormDataAttributes.JSON_PROPERTY_DESCRIPTION, + CreateFormDataAttributes.JSON_PROPERTY_IDP_SURVEY, + CreateFormDataAttributes.JSON_PROPERTY_NAME, + CreateFormDataAttributes.JSON_PROPERTY_SINGLE_RESPONSE, + CreateFormDataAttributes.JSON_PROPERTY_UI_DEFINITION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateFormDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ANONYMOUS = "anonymous"; + private Boolean anonymous = false; + + public static final String JSON_PROPERTY_DATA_DEFINITION = "data_definition"; + private FormDataDefinition dataDefinition; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_IDP_SURVEY = "idp_survey"; + private Boolean idpSurvey = false; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SINGLE_RESPONSE = "single_response"; + private Boolean singleResponse = false; + + public static final String JSON_PROPERTY_UI_DEFINITION = "ui_definition"; + private FormUiDefinition uiDefinition; + + public CreateFormDataAttributes() {} + + @JsonCreator + public CreateFormDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA_DEFINITION) + FormDataDefinition dataDefinition, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_UI_DEFINITION) + FormUiDefinition uiDefinition) { + this.dataDefinition = dataDefinition; + this.unparsed |= dataDefinition.unparsed; + this.name = name; + this.uiDefinition = uiDefinition; + this.unparsed |= uiDefinition.unparsed; + } + + public CreateFormDataAttributes anonymous(Boolean anonymous) { + this.anonymous = anonymous; + return this; + } + + /** + * Whether the form accepts anonymous submissions. + * + * @return anonymous + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANONYMOUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getAnonymous() { + return anonymous; + } + + public void setAnonymous(Boolean anonymous) { + this.anonymous = anonymous; + } + + public CreateFormDataAttributes dataDefinition(FormDataDefinition dataDefinition) { + this.dataDefinition = dataDefinition; + this.unparsed |= dataDefinition.unparsed; + return this; + } + + /** + * A JSON Schema definition that describes the form's data fields. + * + * @return dataDefinition + */ + @JsonProperty(JSON_PROPERTY_DATA_DEFINITION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FormDataDefinition getDataDefinition() { + return dataDefinition; + } + + public void setDataDefinition(FormDataDefinition dataDefinition) { + this.dataDefinition = dataDefinition; + } + + public CreateFormDataAttributes description(String description) { + this.description = description; + return this; + } + + /** + * The description of the form. + * + * @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 CreateFormDataAttributes idpSurvey(Boolean idpSurvey) { + this.idpSurvey = idpSurvey; + return this; + } + + /** + * Whether the form is an IDP survey. + * + * @return idpSurvey + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDP_SURVEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIdpSurvey() { + return idpSurvey; + } + + public void setIdpSurvey(Boolean idpSurvey) { + this.idpSurvey = idpSurvey; + } + + public CreateFormDataAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The name of the form. + * + * @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 CreateFormDataAttributes singleResponse(Boolean singleResponse) { + this.singleResponse = singleResponse; + return this; + } + + /** + * Whether each user can only submit one response. + * + * @return singleResponse + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SINGLE_RESPONSE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSingleResponse() { + return singleResponse; + } + + public void setSingleResponse(Boolean singleResponse) { + this.singleResponse = singleResponse; + } + + public CreateFormDataAttributes uiDefinition(FormUiDefinition uiDefinition) { + this.uiDefinition = uiDefinition; + this.unparsed |= uiDefinition.unparsed; + return this; + } + + /** + * UI configuration for rendering form fields, including widget overrides, field ordering, and + * themes. + * + * @return uiDefinition + */ + @JsonProperty(JSON_PROPERTY_UI_DEFINITION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FormUiDefinition getUiDefinition() { + return uiDefinition; + } + + public void setUiDefinition(FormUiDefinition uiDefinition) { + this.uiDefinition = uiDefinition; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CreateFormDataAttributes + */ + @JsonAnySetter + public CreateFormDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CreateFormDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateFormDataAttributes createFormDataAttributes = (CreateFormDataAttributes) o; + return Objects.equals(this.anonymous, createFormDataAttributes.anonymous) + && Objects.equals(this.dataDefinition, createFormDataAttributes.dataDefinition) + && Objects.equals(this.description, createFormDataAttributes.description) + && Objects.equals(this.idpSurvey, createFormDataAttributes.idpSurvey) + && Objects.equals(this.name, createFormDataAttributes.name) + && Objects.equals(this.singleResponse, createFormDataAttributes.singleResponse) + && Objects.equals(this.uiDefinition, createFormDataAttributes.uiDefinition) + && Objects.equals(this.additionalProperties, createFormDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + anonymous, + dataDefinition, + description, + idpSurvey, + name, + singleResponse, + uiDefinition, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateFormDataAttributes {\n"); + sb.append(" anonymous: ").append(toIndentedString(anonymous)).append("\n"); + sb.append(" dataDefinition: ").append(toIndentedString(dataDefinition)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" idpSurvey: ").append(toIndentedString(idpSurvey)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" singleResponse: ").append(toIndentedString(singleResponse)).append("\n"); + sb.append(" uiDefinition: ").append(toIndentedString(uiDefinition)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateFormRequest.java b/src/main/java/com/datadog/api/client/v2/model/CreateFormRequest.java new file mode 100644 index 00000000000..81350b0da7a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateFormRequest.java @@ -0,0 +1,145 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A request to create a form. */ +@JsonPropertyOrder({CreateFormRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateFormRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private CreateFormData data; + + public CreateFormRequest() {} + + @JsonCreator + public CreateFormRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) CreateFormData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public CreateFormRequest data(CreateFormData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data for creating a form. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CreateFormData getData() { + return data; + } + + public void setData(CreateFormData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CreateFormRequest + */ + @JsonAnySetter + public CreateFormRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CreateFormRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateFormRequest createFormRequest = (CreateFormRequest) o; + return Objects.equals(this.data, createFormRequest.data) + && Objects.equals(this.additionalProperties, createFormRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateFormRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateNotificationRuleParametersDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CreateNotificationRuleParametersDataAttributes.java index 61125836b26..8551ea4d74f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CreateNotificationRuleParametersDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/CreateNotificationRuleParametersDataAttributes.java @@ -23,6 +23,7 @@ @JsonPropertyOrder({ CreateNotificationRuleParametersDataAttributes.JSON_PROPERTY_ENABLED, CreateNotificationRuleParametersDataAttributes.JSON_PROPERTY_NAME, + CreateNotificationRuleParametersDataAttributes.JSON_PROPERTY_ROUTING, CreateNotificationRuleParametersDataAttributes.JSON_PROPERTY_SELECTORS, CreateNotificationRuleParametersDataAttributes.JSON_PROPERTY_TARGETS, CreateNotificationRuleParametersDataAttributes.JSON_PROPERTY_TIME_AGGREGATION @@ -37,6 +38,9 @@ public class CreateNotificationRuleParametersDataAttributes { public static final String JSON_PROPERTY_NAME = "name"; private String name; + public static final String JSON_PROPERTY_ROUTING = "routing"; + private NotificationRuleRouting routing; + public static final String JSON_PROPERTY_SELECTORS = "selectors"; private Selectors selectors; @@ -100,6 +104,28 @@ public void setName(String name) { this.name = name; } + public CreateNotificationRuleParametersDataAttributes routing(NotificationRuleRouting routing) { + this.routing = routing; + this.unparsed |= routing.unparsed; + return this; + } + + /** + * Routing configuration for the notification rule. + * + * @return routing + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROUTING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public NotificationRuleRouting getRouting() { + return routing; + } + + public void setRouting(NotificationRuleRouting routing) { + this.routing = routing; + } + public CreateNotificationRuleParametersDataAttributes selectors(Selectors selectors) { this.selectors = selectors; this.unparsed |= selectors.unparsed; @@ -235,6 +261,7 @@ public boolean equals(Object o) { (CreateNotificationRuleParametersDataAttributes) o; return Objects.equals(this.enabled, createNotificationRuleParametersDataAttributes.enabled) && Objects.equals(this.name, createNotificationRuleParametersDataAttributes.name) + && Objects.equals(this.routing, createNotificationRuleParametersDataAttributes.routing) && Objects.equals(this.selectors, createNotificationRuleParametersDataAttributes.selectors) && Objects.equals(this.targets, createNotificationRuleParametersDataAttributes.targets) && Objects.equals( @@ -246,7 +273,8 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(enabled, name, selectors, targets, timeAggregation, additionalProperties); + return Objects.hash( + enabled, name, routing, selectors, targets, timeAggregation, additionalProperties); } @Override @@ -255,6 +283,7 @@ public String toString() { sb.append("class CreateNotificationRuleParametersDataAttributes {\n"); sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" routing: ").append(toIndentedString(routing)).append("\n"); sb.append(" selectors: ").append(toIndentedString(selectors)).append("\n"); sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); sb.append(" timeAggregation: ").append(toIndentedString(timeAggregation)).append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateServiceNowTicketRequestArray.java b/src/main/java/com/datadog/api/client/v2/model/CreateServiceNowTicketRequestArray.java new file mode 100644 index 00000000000..c597eabbd10 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateServiceNowTicketRequestArray.java @@ -0,0 +1,158 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** List of requests to create ServiceNow tickets for security findings. */ +@JsonPropertyOrder({CreateServiceNowTicketRequestArray.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateServiceNowTicketRequestArray { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public CreateServiceNowTicketRequestArray() {} + + @JsonCreator + public CreateServiceNowTicketRequestArray( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public CreateServiceNowTicketRequestArray data(List data) { + this.data = data; + for (CreateServiceNowTicketRequestData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public CreateServiceNowTicketRequestArray addDataItem( + CreateServiceNowTicketRequestData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Array of ServiceNow ticket creation request data objects. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CreateServiceNowTicketRequestArray + */ + @JsonAnySetter + public CreateServiceNowTicketRequestArray putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CreateServiceNowTicketRequestArray object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateServiceNowTicketRequestArray createServiceNowTicketRequestArray = + (CreateServiceNowTicketRequestArray) o; + return Objects.equals(this.data, createServiceNowTicketRequestArray.data) + && Objects.equals( + this.additionalProperties, createServiceNowTicketRequestArray.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateServiceNowTicketRequestArray {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateServiceNowTicketRequestData.java b/src/main/java/com/datadog/api/client/v2/model/CreateServiceNowTicketRequestData.java new file mode 100644 index 00000000000..c43a0842c19 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateServiceNowTicketRequestData.java @@ -0,0 +1,213 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data of the ServiceNow ticket to create. */ +@JsonPropertyOrder({ + CreateServiceNowTicketRequestData.JSON_PROPERTY_ATTRIBUTES, + CreateServiceNowTicketRequestData.JSON_PROPERTY_RELATIONSHIPS, + CreateServiceNowTicketRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateServiceNowTicketRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CreateServiceNowTicketRequestDataAttributes attributes; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private CreateServiceNowTicketRequestDataRelationships relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ServiceNowTicketsDataType type = ServiceNowTicketsDataType.SERVICENOW_TICKETS; + + public CreateServiceNowTicketRequestData() {} + + @JsonCreator + public CreateServiceNowTicketRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_RELATIONSHIPS) + CreateServiceNowTicketRequestDataRelationships relationships, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ServiceNowTicketsDataType type) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public CreateServiceNowTicketRequestData attributes( + CreateServiceNowTicketRequestDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of the ServiceNow ticket to create. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CreateServiceNowTicketRequestDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(CreateServiceNowTicketRequestDataAttributes attributes) { + this.attributes = attributes; + } + + public CreateServiceNowTicketRequestData relationships( + CreateServiceNowTicketRequestDataRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Relationships of the ServiceNow ticket to create. + * + * @return relationships + */ + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CreateServiceNowTicketRequestDataRelationships getRelationships() { + return relationships; + } + + public void setRelationships(CreateServiceNowTicketRequestDataRelationships relationships) { + this.relationships = relationships; + } + + public CreateServiceNowTicketRequestData type(ServiceNowTicketsDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * ServiceNow tickets resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ServiceNowTicketsDataType getType() { + return type; + } + + public void setType(ServiceNowTicketsDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CreateServiceNowTicketRequestData + */ + @JsonAnySetter + public CreateServiceNowTicketRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CreateServiceNowTicketRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateServiceNowTicketRequestData createServiceNowTicketRequestData = + (CreateServiceNowTicketRequestData) o; + return Objects.equals(this.attributes, createServiceNowTicketRequestData.attributes) + && Objects.equals(this.relationships, createServiceNowTicketRequestData.relationships) + && Objects.equals(this.type, createServiceNowTicketRequestData.type) + && Objects.equals( + this.additionalProperties, createServiceNowTicketRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateServiceNowTicketRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateServiceNowTicketRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CreateServiceNowTicketRequestDataAttributes.java new file mode 100644 index 00000000000..afbe61173a8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateServiceNowTicketRequestDataAttributes.java @@ -0,0 +1,227 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of the ServiceNow ticket to create. */ +@JsonPropertyOrder({ + CreateServiceNowTicketRequestDataAttributes.JSON_PROPERTY_ASSIGNEE_ID, + CreateServiceNowTicketRequestDataAttributes.JSON_PROPERTY_DESCRIPTION, + CreateServiceNowTicketRequestDataAttributes.JSON_PROPERTY_PRIORITY, + CreateServiceNowTicketRequestDataAttributes.JSON_PROPERTY_TITLE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateServiceNowTicketRequestDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ASSIGNEE_ID = "assignee_id"; + private String assigneeId; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_PRIORITY = "priority"; + private CasePriority priority = CasePriority.NOT_DEFINED; + + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public CreateServiceNowTicketRequestDataAttributes assigneeId(String assigneeId) { + this.assigneeId = assigneeId; + return this; + } + + /** + * Unique identifier of the Datadog user assigned to the case backing the ServiceNow ticket. + * + * @return assigneeId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ASSIGNEE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAssigneeId() { + return assigneeId; + } + + public void setAssigneeId(String assigneeId) { + this.assigneeId = assigneeId; + } + + public CreateServiceNowTicketRequestDataAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Description of the ServiceNow ticket. If not provided, the description will be automatically + * generated. + * + * @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 CreateServiceNowTicketRequestDataAttributes priority(CasePriority priority) { + this.priority = priority; + this.unparsed |= !priority.isValid(); + return this; + } + + /** + * Case priority + * + * @return priority + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRIORITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CasePriority getPriority() { + return priority; + } + + public void setPriority(CasePriority priority) { + if (!priority.isValid()) { + this.unparsed = true; + } + this.priority = priority; + } + + public CreateServiceNowTicketRequestDataAttributes title(String title) { + this.title = title; + return this; + } + + /** + * Title of the ServiceNow ticket. If not provided, the title will be automatically generated. + * + * @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; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CreateServiceNowTicketRequestDataAttributes + */ + @JsonAnySetter + public CreateServiceNowTicketRequestDataAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CreateServiceNowTicketRequestDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateServiceNowTicketRequestDataAttributes createServiceNowTicketRequestDataAttributes = + (CreateServiceNowTicketRequestDataAttributes) o; + return Objects.equals(this.assigneeId, createServiceNowTicketRequestDataAttributes.assigneeId) + && Objects.equals(this.description, createServiceNowTicketRequestDataAttributes.description) + && Objects.equals(this.priority, createServiceNowTicketRequestDataAttributes.priority) + && Objects.equals(this.title, createServiceNowTicketRequestDataAttributes.title) + && Objects.equals( + this.additionalProperties, + createServiceNowTicketRequestDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(assigneeId, description, priority, title, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateServiceNowTicketRequestDataAttributes {\n"); + sb.append(" assigneeId: ").append(toIndentedString(assigneeId)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CreateServiceNowTicketRequestDataRelationships.java b/src/main/java/com/datadog/api/client/v2/model/CreateServiceNowTicketRequestDataRelationships.java new file mode 100644 index 00000000000..1f6cde84c21 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CreateServiceNowTicketRequestDataRelationships.java @@ -0,0 +1,181 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Relationships of the ServiceNow ticket to create. */ +@JsonPropertyOrder({ + CreateServiceNowTicketRequestDataRelationships.JSON_PROPERTY_FINDINGS, + CreateServiceNowTicketRequestDataRelationships.JSON_PROPERTY_PROJECT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CreateServiceNowTicketRequestDataRelationships { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FINDINGS = "findings"; + private Findings findings; + + public static final String JSON_PROPERTY_PROJECT = "project"; + private CaseManagementProject project; + + public CreateServiceNowTicketRequestDataRelationships() {} + + @JsonCreator + public CreateServiceNowTicketRequestDataRelationships( + @JsonProperty(required = true, value = JSON_PROPERTY_FINDINGS) Findings findings, + @JsonProperty(required = true, value = JSON_PROPERTY_PROJECT) CaseManagementProject project) { + this.findings = findings; + this.unparsed |= findings.unparsed; + this.project = project; + this.unparsed |= project.unparsed; + } + + public CreateServiceNowTicketRequestDataRelationships findings(Findings findings) { + this.findings = findings; + this.unparsed |= findings.unparsed; + return this; + } + + /** + * A list of security findings. + * + * @return findings + */ + @JsonProperty(JSON_PROPERTY_FINDINGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Findings getFindings() { + return findings; + } + + public void setFindings(Findings findings) { + this.findings = findings; + } + + public CreateServiceNowTicketRequestDataRelationships project(CaseManagementProject project) { + this.project = project; + this.unparsed |= project.unparsed; + return this; + } + + /** + * Case management project. + * + * @return project + */ + @JsonProperty(JSON_PROPERTY_PROJECT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CaseManagementProject getProject() { + return project; + } + + public void setProject(CaseManagementProject project) { + this.project = project; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CreateServiceNowTicketRequestDataRelationships + */ + @JsonAnySetter + public CreateServiceNowTicketRequestDataRelationships putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CreateServiceNowTicketRequestDataRelationships object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateServiceNowTicketRequestDataRelationships createServiceNowTicketRequestDataRelationships = + (CreateServiceNowTicketRequestDataRelationships) o; + return Objects.equals(this.findings, createServiceNowTicketRequestDataRelationships.findings) + && Objects.equals(this.project, createServiceNowTicketRequestDataRelationships.project) + && Objects.equals( + this.additionalProperties, + createServiceNowTicketRequestDataRelationships.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(findings, project, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateServiceNowTicketRequestDataRelationships {\n"); + sb.append(" findings: ").append(toIndentedString(findings)).append("\n"); + sb.append(" project: ").append(toIndentedString(project)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CsmAgentlessHostAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CsmAgentlessHostAttributes.java new file mode 100644 index 00000000000..27937ddb6f6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CsmAgentlessHostAttributes.java @@ -0,0 +1,287 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of an agentless host. */ +@JsonPropertyOrder({ + CsmAgentlessHostAttributes.JSON_PROPERTY_ACCOUNT_ID, + CsmAgentlessHostAttributes.JSON_PROPERTY_CLOUD_PROVIDER, + CsmAgentlessHostAttributes.JSON_PROPERTY_HAS_POSTURE_MANAGEMENT, + CsmAgentlessHostAttributes.JSON_PROPERTY_HAS_VULNERABILITY_SCANNING, + CsmAgentlessHostAttributes.JSON_PROPERTY_RESOURCE_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CsmAgentlessHostAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private String accountId; + + public static final String JSON_PROPERTY_CLOUD_PROVIDER = "cloud_provider"; + private CsmCloudProvider cloudProvider; + + public static final String JSON_PROPERTY_HAS_POSTURE_MANAGEMENT = "has_posture_management"; + private Boolean hasPostureManagement; + + public static final String JSON_PROPERTY_HAS_VULNERABILITY_SCANNING = + "has_vulnerability_scanning"; + private Boolean hasVulnerabilityScanning; + + public static final String JSON_PROPERTY_RESOURCE_TYPE = "resource_type"; + private CsmAgentlessHostResourceType resourceType; + + public CsmAgentlessHostAttributes() {} + + @JsonCreator + public CsmAgentlessHostAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_ACCOUNT_ID) String accountId, + @JsonProperty(required = true, value = JSON_PROPERTY_CLOUD_PROVIDER) + CsmCloudProvider cloudProvider, + @JsonProperty(required = true, value = JSON_PROPERTY_HAS_POSTURE_MANAGEMENT) + Boolean hasPostureManagement, + @JsonProperty(required = true, value = JSON_PROPERTY_HAS_VULNERABILITY_SCANNING) + Boolean hasVulnerabilityScanning, + @JsonProperty(required = true, value = JSON_PROPERTY_RESOURCE_TYPE) + CsmAgentlessHostResourceType resourceType) { + this.accountId = accountId; + this.cloudProvider = cloudProvider; + this.unparsed |= !cloudProvider.isValid(); + this.hasPostureManagement = hasPostureManagement; + this.hasVulnerabilityScanning = hasVulnerabilityScanning; + this.resourceType = resourceType; + this.unparsed |= !resourceType.isValid(); + } + + public CsmAgentlessHostAttributes accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * The ID of the cloud account that the host belongs to. + * + * @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 CsmAgentlessHostAttributes cloudProvider(CsmCloudProvider cloudProvider) { + this.cloudProvider = cloudProvider; + this.unparsed |= !cloudProvider.isValid(); + return this; + } + + /** + * The cloud provider of a host resource. + * + * @return cloudProvider + */ + @JsonProperty(JSON_PROPERTY_CLOUD_PROVIDER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CsmCloudProvider getCloudProvider() { + return cloudProvider; + } + + public void setCloudProvider(CsmCloudProvider cloudProvider) { + if (!cloudProvider.isValid()) { + this.unparsed = true; + } + this.cloudProvider = cloudProvider; + } + + public CsmAgentlessHostAttributes hasPostureManagement(Boolean hasPostureManagement) { + this.hasPostureManagement = hasPostureManagement; + return this; + } + + /** + * Whether CSM Misconfigurations is enabled for this host. true if enabled; + * false if disabled. + * + * @return hasPostureManagement + */ + @JsonProperty(JSON_PROPERTY_HAS_POSTURE_MANAGEMENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getHasPostureManagement() { + return hasPostureManagement; + } + + public void setHasPostureManagement(Boolean hasPostureManagement) { + this.hasPostureManagement = hasPostureManagement; + } + + public CsmAgentlessHostAttributes hasVulnerabilityScanning(Boolean hasVulnerabilityScanning) { + this.hasVulnerabilityScanning = hasVulnerabilityScanning; + return this; + } + + /** + * Whether CSM Vulnerabilities is enabled for this host. true if enabled; false + * if disabled. + * + * @return hasVulnerabilityScanning + */ + @JsonProperty(JSON_PROPERTY_HAS_VULNERABILITY_SCANNING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getHasVulnerabilityScanning() { + return hasVulnerabilityScanning; + } + + public void setHasVulnerabilityScanning(Boolean hasVulnerabilityScanning) { + this.hasVulnerabilityScanning = hasVulnerabilityScanning; + } + + public CsmAgentlessHostAttributes resourceType(CsmAgentlessHostResourceType resourceType) { + this.resourceType = resourceType; + this.unparsed |= !resourceType.isValid(); + return this; + } + + /** + * The type of cloud resource for an agentless host. + * + * @return resourceType + */ + @JsonProperty(JSON_PROPERTY_RESOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CsmAgentlessHostResourceType getResourceType() { + return resourceType; + } + + public void setResourceType(CsmAgentlessHostResourceType resourceType) { + if (!resourceType.isValid()) { + this.unparsed = true; + } + this.resourceType = resourceType; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CsmAgentlessHostAttributes + */ + @JsonAnySetter + public CsmAgentlessHostAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CsmAgentlessHostAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CsmAgentlessHostAttributes csmAgentlessHostAttributes = (CsmAgentlessHostAttributes) o; + return Objects.equals(this.accountId, csmAgentlessHostAttributes.accountId) + && Objects.equals(this.cloudProvider, csmAgentlessHostAttributes.cloudProvider) + && Objects.equals( + this.hasPostureManagement, csmAgentlessHostAttributes.hasPostureManagement) + && Objects.equals( + this.hasVulnerabilityScanning, csmAgentlessHostAttributes.hasVulnerabilityScanning) + && Objects.equals(this.resourceType, csmAgentlessHostAttributes.resourceType) + && Objects.equals( + this.additionalProperties, csmAgentlessHostAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + accountId, + cloudProvider, + hasPostureManagement, + hasVulnerabilityScanning, + resourceType, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CsmAgentlessHostAttributes {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" cloudProvider: ").append(toIndentedString(cloudProvider)).append("\n"); + sb.append(" hasPostureManagement: ") + .append(toIndentedString(hasPostureManagement)) + .append("\n"); + sb.append(" hasVulnerabilityScanning: ") + .append(toIndentedString(hasVulnerabilityScanning)) + .append("\n"); + sb.append(" resourceType: ").append(toIndentedString(resourceType)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CsmAgentlessHostData.java b/src/main/java/com/datadog/api/client/v2/model/CsmAgentlessHostData.java new file mode 100644 index 00000000000..bb19ee777e8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CsmAgentlessHostData.java @@ -0,0 +1,210 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A single agentless host resource. */ +@JsonPropertyOrder({ + CsmAgentlessHostData.JSON_PROPERTY_ATTRIBUTES, + CsmAgentlessHostData.JSON_PROPERTY_ID, + CsmAgentlessHostData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CsmAgentlessHostData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CsmAgentlessHostAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private CsmAgentlessHostType type = CsmAgentlessHostType.AGENTLESS_HOST; + + public CsmAgentlessHostData() {} + + @JsonCreator + public CsmAgentlessHostData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + CsmAgentlessHostAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) CsmAgentlessHostType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public CsmAgentlessHostData attributes(CsmAgentlessHostAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an agentless host. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CsmAgentlessHostAttributes getAttributes() { + return attributes; + } + + public void setAttributes(CsmAgentlessHostAttributes attributes) { + this.attributes = attributes; + } + + public CsmAgentlessHostData id(String id) { + this.id = id; + return this; + } + + /** + * The resource identifier of the agentless host. + * + * @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 CsmAgentlessHostData type(CsmAgentlessHostType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The JSON:API type for agentless host resources. The value should always be agentless_host + * . + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CsmAgentlessHostType getType() { + return type; + } + + public void setType(CsmAgentlessHostType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CsmAgentlessHostData + */ + @JsonAnySetter + public CsmAgentlessHostData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CsmAgentlessHostData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CsmAgentlessHostData csmAgentlessHostData = (CsmAgentlessHostData) o; + return Objects.equals(this.attributes, csmAgentlessHostData.attributes) + && Objects.equals(this.id, csmAgentlessHostData.id) + && Objects.equals(this.type, csmAgentlessHostData.type) + && Objects.equals(this.additionalProperties, csmAgentlessHostData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CsmAgentlessHostData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CsmAgentlessHostFacetAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CsmAgentlessHostFacetAttributes.java new file mode 100644 index 00000000000..2d01806c2d6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CsmAgentlessHostFacetAttributes.java @@ -0,0 +1,519 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of an agentless host facet. */ +@JsonPropertyOrder({ + CsmAgentlessHostFacetAttributes.JSON_PROPERTY_BOUNDED, + CsmAgentlessHostFacetAttributes.JSON_PROPERTY_BUNDLED, + CsmAgentlessHostFacetAttributes.JSON_PROPERTY_BUNDLED_AND_USED, + CsmAgentlessHostFacetAttributes.JSON_PROPERTY_DEFAULT_VALUES, + CsmAgentlessHostFacetAttributes.JSON_PROPERTY_DESCRIPTION, + CsmAgentlessHostFacetAttributes.JSON_PROPERTY_EDITABLE, + CsmAgentlessHostFacetAttributes.JSON_PROPERTY_FACET_TYPE, + CsmAgentlessHostFacetAttributes.JSON_PROPERTY_GROUPS, + CsmAgentlessHostFacetAttributes.JSON_PROPERTY_NAME, + CsmAgentlessHostFacetAttributes.JSON_PROPERTY_PATH, + CsmAgentlessHostFacetAttributes.JSON_PROPERTY_SOURCE, + CsmAgentlessHostFacetAttributes.JSON_PROPERTY_TYPE, + CsmAgentlessHostFacetAttributes.JSON_PROPERTY_VALUES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CsmAgentlessHostFacetAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_BOUNDED = "bounded"; + private Boolean bounded; + + public static final String JSON_PROPERTY_BUNDLED = "bundled"; + private Boolean bundled; + + public static final String JSON_PROPERTY_BUNDLED_AND_USED = "bundledAndUsed"; + private Boolean bundledAndUsed; + + public static final String JSON_PROPERTY_DEFAULT_VALUES = "defaultValues"; + private List defaultValues = new ArrayList<>(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_EDITABLE = "editable"; + private Boolean editable; + + public static final String JSON_PROPERTY_FACET_TYPE = "facetType"; + private String facetType; + + public static final String JSON_PROPERTY_GROUPS = "groups"; + private List groups = new ArrayList<>(); + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_PATH = "path"; + private String path; + + public static final String JSON_PROPERTY_SOURCE = "source"; + private String source; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_VALUES = "values"; + private List values = new ArrayList<>(); + + public CsmAgentlessHostFacetAttributes() {} + + @JsonCreator + public CsmAgentlessHostFacetAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_BOUNDED) Boolean bounded, + @JsonProperty(required = true, value = JSON_PROPERTY_BUNDLED) Boolean bundled, + @JsonProperty(required = true, value = JSON_PROPERTY_BUNDLED_AND_USED) Boolean bundledAndUsed, + @JsonProperty(required = true, value = JSON_PROPERTY_DEFAULT_VALUES) + List defaultValues, + @JsonProperty(required = true, value = JSON_PROPERTY_DESCRIPTION) String description, + @JsonProperty(required = true, value = JSON_PROPERTY_EDITABLE) Boolean editable, + @JsonProperty(required = true, value = JSON_PROPERTY_FACET_TYPE) String facetType, + @JsonProperty(required = true, value = JSON_PROPERTY_GROUPS) List groups, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_PATH) String path, + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE) String source, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) String type, + @JsonProperty(required = true, value = JSON_PROPERTY_VALUES) List values) { + this.bounded = bounded; + this.bundled = bundled; + this.bundledAndUsed = bundledAndUsed; + this.defaultValues = defaultValues; + this.description = description; + this.editable = editable; + this.facetType = facetType; + this.groups = groups; + this.name = name; + this.path = path; + this.source = source; + this.type = type; + this.values = values; + } + + public CsmAgentlessHostFacetAttributes bounded(Boolean bounded) { + this.bounded = bounded; + return this; + } + + /** + * Whether the facet has a bounded set of allowed values. true indicates a fixed + * value set and false indicates free-form values. + * + * @return bounded + */ + @JsonProperty(JSON_PROPERTY_BOUNDED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getBounded() { + return bounded; + } + + public void setBounded(Boolean bounded) { + this.bounded = bounded; + } + + public CsmAgentlessHostFacetAttributes bundled(Boolean bundled) { + this.bundled = bundled; + return this; + } + + /** + * Whether the facet is bundled as part of the default facet set. true indicates + * bundled and false indicates custom. + * + * @return bundled + */ + @JsonProperty(JSON_PROPERTY_BUNDLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getBundled() { + return bundled; + } + + public void setBundled(Boolean bundled) { + this.bundled = bundled; + } + + public CsmAgentlessHostFacetAttributes bundledAndUsed(Boolean bundledAndUsed) { + this.bundledAndUsed = bundledAndUsed; + return this; + } + + /** + * Whether the facet is both bundled and actively used. true indicates in use; + * false indicates unused. + * + * @return bundledAndUsed + */ + @JsonProperty(JSON_PROPERTY_BUNDLED_AND_USED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getBundledAndUsed() { + return bundledAndUsed; + } + + public void setBundledAndUsed(Boolean bundledAndUsed) { + this.bundledAndUsed = bundledAndUsed; + } + + public CsmAgentlessHostFacetAttributes defaultValues(List defaultValues) { + this.defaultValues = defaultValues; + return this; + } + + public CsmAgentlessHostFacetAttributes addDefaultValuesItem(String defaultValuesItem) { + this.defaultValues.add(defaultValuesItem); + return this; + } + + /** + * The list of default filter values for the facet. + * + * @return defaultValues + */ + @JsonProperty(JSON_PROPERTY_DEFAULT_VALUES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getDefaultValues() { + return defaultValues; + } + + public void setDefaultValues(List defaultValues) { + this.defaultValues = defaultValues; + } + + public CsmAgentlessHostFacetAttributes description(String description) { + this.description = description; + return this; + } + + /** + * A human-readable description of what the facet represents. + * + * @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 CsmAgentlessHostFacetAttributes editable(Boolean editable) { + this.editable = editable; + return this; + } + + /** + * Whether the facet can be edited by users. true indicates editable; false + * indicates read-only. + * + * @return editable + */ + @JsonProperty(JSON_PROPERTY_EDITABLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getEditable() { + return editable; + } + + public void setEditable(Boolean editable) { + this.editable = editable; + } + + public CsmAgentlessHostFacetAttributes facetType(String facetType) { + this.facetType = facetType; + return this; + } + + /** + * The UI display type for the facet, such as list. + * + * @return facetType + */ + @JsonProperty(JSON_PROPERTY_FACET_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getFacetType() { + return facetType; + } + + public void setFacetType(String facetType) { + this.facetType = facetType; + } + + public CsmAgentlessHostFacetAttributes groups(List groups) { + this.groups = groups; + return this; + } + + public CsmAgentlessHostFacetAttributes addGroupsItem(String groupsItem) { + this.groups.add(groupsItem); + return this; + } + + /** + * The list of UI groups that this facet belongs to. + * + * @return groups + */ + @JsonProperty(JSON_PROPERTY_GROUPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getGroups() { + return groups; + } + + public void setGroups(List groups) { + this.groups = groups; + } + + public CsmAgentlessHostFacetAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The display name of the facet. + * + * @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 CsmAgentlessHostFacetAttributes path(String path) { + this.path = path; + return this; + } + + /** + * The field path used when filtering by this facet. + * + * @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 CsmAgentlessHostFacetAttributes source(String source) { + this.source = source; + return this; + } + + /** + * The data source that provides the facet values. + * + * @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 CsmAgentlessHostFacetAttributes type(String type) { + this.type = type; + return this; + } + + /** + * The data type of the facet values. + * + * @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 CsmAgentlessHostFacetAttributes values(List values) { + this.values = values; + return this; + } + + public CsmAgentlessHostFacetAttributes addValuesItem(String valuesItem) { + this.values.add(valuesItem); + return this; + } + + /** + * The list of allowed filter values for bounded facets. Empty for unbounded facets. + * + * @return values + */ + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getValues() { + return values; + } + + public void setValues(List values) { + this.values = values; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CsmAgentlessHostFacetAttributes + */ + @JsonAnySetter + public CsmAgentlessHostFacetAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CsmAgentlessHostFacetAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CsmAgentlessHostFacetAttributes csmAgentlessHostFacetAttributes = + (CsmAgentlessHostFacetAttributes) o; + return Objects.equals(this.bounded, csmAgentlessHostFacetAttributes.bounded) + && Objects.equals(this.bundled, csmAgentlessHostFacetAttributes.bundled) + && Objects.equals(this.bundledAndUsed, csmAgentlessHostFacetAttributes.bundledAndUsed) + && Objects.equals(this.defaultValues, csmAgentlessHostFacetAttributes.defaultValues) + && Objects.equals(this.description, csmAgentlessHostFacetAttributes.description) + && Objects.equals(this.editable, csmAgentlessHostFacetAttributes.editable) + && Objects.equals(this.facetType, csmAgentlessHostFacetAttributes.facetType) + && Objects.equals(this.groups, csmAgentlessHostFacetAttributes.groups) + && Objects.equals(this.name, csmAgentlessHostFacetAttributes.name) + && Objects.equals(this.path, csmAgentlessHostFacetAttributes.path) + && Objects.equals(this.source, csmAgentlessHostFacetAttributes.source) + && Objects.equals(this.type, csmAgentlessHostFacetAttributes.type) + && Objects.equals(this.values, csmAgentlessHostFacetAttributes.values) + && Objects.equals( + this.additionalProperties, csmAgentlessHostFacetAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + bounded, + bundled, + bundledAndUsed, + defaultValues, + description, + editable, + facetType, + groups, + name, + path, + source, + type, + values, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CsmAgentlessHostFacetAttributes {\n"); + sb.append(" bounded: ").append(toIndentedString(bounded)).append("\n"); + sb.append(" bundled: ").append(toIndentedString(bundled)).append("\n"); + sb.append(" bundledAndUsed: ").append(toIndentedString(bundledAndUsed)).append("\n"); + sb.append(" defaultValues: ").append(toIndentedString(defaultValues)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" editable: ").append(toIndentedString(editable)).append("\n"); + sb.append(" facetType: ").append(toIndentedString(facetType)).append("\n"); + sb.append(" groups: ").append(toIndentedString(groups)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" path: ").append(toIndentedString(path)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CsmAgentlessHostFacetData.java b/src/main/java/com/datadog/api/client/v2/model/CsmAgentlessHostFacetData.java new file mode 100644 index 00000000000..c6fe1a93757 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CsmAgentlessHostFacetData.java @@ -0,0 +1,211 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A single agentless host facet resource. */ +@JsonPropertyOrder({ + CsmAgentlessHostFacetData.JSON_PROPERTY_ATTRIBUTES, + CsmAgentlessHostFacetData.JSON_PROPERTY_ID, + CsmAgentlessHostFacetData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CsmAgentlessHostFacetData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CsmAgentlessHostFacetAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private CsmAgentlessHostFacetType type = CsmAgentlessHostFacetType.AGENTLESS_HOST_FACET; + + public CsmAgentlessHostFacetData() {} + + @JsonCreator + public CsmAgentlessHostFacetData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + CsmAgentlessHostFacetAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) CsmAgentlessHostFacetType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public CsmAgentlessHostFacetData attributes(CsmAgentlessHostFacetAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an agentless host facet. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CsmAgentlessHostFacetAttributes getAttributes() { + return attributes; + } + + public void setAttributes(CsmAgentlessHostFacetAttributes attributes) { + this.attributes = attributes; + } + + public CsmAgentlessHostFacetData id(String id) { + this.id = id; + return this; + } + + /** + * The identifier of the facet, corresponding to the field path. + * + * @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 CsmAgentlessHostFacetData type(CsmAgentlessHostFacetType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The JSON:API type for agentless host facet resources. The value should always be + * agentless_host_facet. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CsmAgentlessHostFacetType getType() { + return type; + } + + public void setType(CsmAgentlessHostFacetType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CsmAgentlessHostFacetData + */ + @JsonAnySetter + public CsmAgentlessHostFacetData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CsmAgentlessHostFacetData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CsmAgentlessHostFacetData csmAgentlessHostFacetData = (CsmAgentlessHostFacetData) o; + return Objects.equals(this.attributes, csmAgentlessHostFacetData.attributes) + && Objects.equals(this.id, csmAgentlessHostFacetData.id) + && Objects.equals(this.type, csmAgentlessHostFacetData.type) + && Objects.equals( + this.additionalProperties, csmAgentlessHostFacetData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CsmAgentlessHostFacetData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CsmAgentlessHostFacetType.java b/src/main/java/com/datadog/api/client/v2/model/CsmAgentlessHostFacetType.java new file mode 100644 index 00000000000..986b31ebfb5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CsmAgentlessHostFacetType.java @@ -0,0 +1,60 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * The JSON:API type for agentless host facet resources. The value should always be + * agentless_host_facet. + */ +@JsonSerialize(using = CsmAgentlessHostFacetType.CsmAgentlessHostFacetTypeSerializer.class) +public class CsmAgentlessHostFacetType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("agentless_host_facet")); + + public static final CsmAgentlessHostFacetType AGENTLESS_HOST_FACET = + new CsmAgentlessHostFacetType("agentless_host_facet"); + + CsmAgentlessHostFacetType(String value) { + super(value, allowedValues); + } + + public static class CsmAgentlessHostFacetTypeSerializer + extends StdSerializer { + public CsmAgentlessHostFacetTypeSerializer(Class t) { + super(t); + } + + public CsmAgentlessHostFacetTypeSerializer() { + this(null); + } + + @Override + public void serialize( + CsmAgentlessHostFacetType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static CsmAgentlessHostFacetType fromValue(String value) { + return new CsmAgentlessHostFacetType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CsmAgentlessHostFacetsResponse.java b/src/main/java/com/datadog/api/client/v2/model/CsmAgentlessHostFacetsResponse.java new file mode 100644 index 00000000000..4d3ac515b36 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CsmAgentlessHostFacetsResponse.java @@ -0,0 +1,157 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The response returned when listing facets for agentless hosts. */ +@JsonPropertyOrder({CsmAgentlessHostFacetsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CsmAgentlessHostFacetsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public CsmAgentlessHostFacetsResponse() {} + + @JsonCreator + public CsmAgentlessHostFacetsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public CsmAgentlessHostFacetsResponse data(List data) { + this.data = data; + for (CsmAgentlessHostFacetData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public CsmAgentlessHostFacetsResponse addDataItem(CsmAgentlessHostFacetData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * The list of available facets for agentless hosts. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CsmAgentlessHostFacetsResponse + */ + @JsonAnySetter + public CsmAgentlessHostFacetsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CsmAgentlessHostFacetsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CsmAgentlessHostFacetsResponse csmAgentlessHostFacetsResponse = + (CsmAgentlessHostFacetsResponse) o; + return Objects.equals(this.data, csmAgentlessHostFacetsResponse.data) + && Objects.equals( + this.additionalProperties, csmAgentlessHostFacetsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CsmAgentlessHostFacetsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CsmAgentlessHostResourceType.java b/src/main/java/com/datadog/api/client/v2/model/CsmAgentlessHostResourceType.java new file mode 100644 index 00000000000..5c04c27a834 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CsmAgentlessHostResourceType.java @@ -0,0 +1,68 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The type of cloud resource for an agentless host. */ +@JsonSerialize(using = CsmAgentlessHostResourceType.CsmAgentlessHostResourceTypeSerializer.class) +public class CsmAgentlessHostResourceType extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList( + "aws_ec2_instance", + "azure_virtual_machine_instance", + "gcp_compute_instance", + "oci_instance")); + + public static final CsmAgentlessHostResourceType AWS_EC2_INSTANCE = + new CsmAgentlessHostResourceType("aws_ec2_instance"); + public static final CsmAgentlessHostResourceType AZURE_VIRTUAL_MACHINE_INSTANCE = + new CsmAgentlessHostResourceType("azure_virtual_machine_instance"); + public static final CsmAgentlessHostResourceType GCP_COMPUTE_INSTANCE = + new CsmAgentlessHostResourceType("gcp_compute_instance"); + public static final CsmAgentlessHostResourceType OCI_INSTANCE = + new CsmAgentlessHostResourceType("oci_instance"); + + CsmAgentlessHostResourceType(String value) { + super(value, allowedValues); + } + + public static class CsmAgentlessHostResourceTypeSerializer + extends StdSerializer { + public CsmAgentlessHostResourceTypeSerializer(Class t) { + super(t); + } + + public CsmAgentlessHostResourceTypeSerializer() { + this(null); + } + + @Override + public void serialize( + CsmAgentlessHostResourceType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static CsmAgentlessHostResourceType fromValue(String value) { + return new CsmAgentlessHostResourceType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CsmAgentlessHostType.java b/src/main/java/com/datadog/api/client/v2/model/CsmAgentlessHostType.java new file mode 100644 index 00000000000..8ee764768d1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CsmAgentlessHostType.java @@ -0,0 +1,59 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * The JSON:API type for agentless host resources. The value should always be agentless_host + * . + */ +@JsonSerialize(using = CsmAgentlessHostType.CsmAgentlessHostTypeSerializer.class) +public class CsmAgentlessHostType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("agentless_host")); + + public static final CsmAgentlessHostType AGENTLESS_HOST = + new CsmAgentlessHostType("agentless_host"); + + CsmAgentlessHostType(String value) { + super(value, allowedValues); + } + + public static class CsmAgentlessHostTypeSerializer extends StdSerializer { + public CsmAgentlessHostTypeSerializer(Class t) { + super(t); + } + + public CsmAgentlessHostTypeSerializer() { + this(null); + } + + @Override + public void serialize( + CsmAgentlessHostType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static CsmAgentlessHostType fromValue(String value) { + return new CsmAgentlessHostType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CsmAgentlessHostsResponse.java b/src/main/java/com/datadog/api/client/v2/model/CsmAgentlessHostsResponse.java new file mode 100644 index 00000000000..9e198527483 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CsmAgentlessHostsResponse.java @@ -0,0 +1,187 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The response returned when listing agentless hosts. */ +@JsonPropertyOrder({ + CsmAgentlessHostsResponse.JSON_PROPERTY_DATA, + CsmAgentlessHostsResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CsmAgentlessHostsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_META = "meta"; + private CsmSettingsMeta meta; + + public CsmAgentlessHostsResponse() {} + + @JsonCreator + public CsmAgentlessHostsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data, + @JsonProperty(required = true, value = JSON_PROPERTY_META) CsmSettingsMeta meta) { + this.data = data; + this.meta = meta; + this.unparsed |= meta.unparsed; + } + + public CsmAgentlessHostsResponse data(List data) { + this.data = data; + for (CsmAgentlessHostData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public CsmAgentlessHostsResponse addDataItem(CsmAgentlessHostData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * The list of agentless hosts for the current page. + * + * @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 CsmAgentlessHostsResponse meta(CsmSettingsMeta meta) { + this.meta = meta; + this.unparsed |= meta.unparsed; + return this; + } + + /** + * Pagination metadata for a CSM settings list response. + * + * @return meta + */ + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CsmSettingsMeta getMeta() { + return meta; + } + + public void setMeta(CsmSettingsMeta meta) { + this.meta = meta; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CsmAgentlessHostsResponse + */ + @JsonAnySetter + public CsmAgentlessHostsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CsmAgentlessHostsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CsmAgentlessHostsResponse csmAgentlessHostsResponse = (CsmAgentlessHostsResponse) o; + return Objects.equals(this.data, csmAgentlessHostsResponse.data) + && Objects.equals(this.meta, csmAgentlessHostsResponse.meta) + && Objects.equals( + this.additionalProperties, csmAgentlessHostsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CsmAgentlessHostsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CsmCloudProvider.java b/src/main/java/com/datadog/api/client/v2/model/CsmCloudProvider.java new file mode 100644 index 00000000000..464b051502f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CsmCloudProvider.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The cloud provider of a host resource. */ +@JsonSerialize(using = CsmCloudProvider.CsmCloudProviderSerializer.class) +public class CsmCloudProvider extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("aws", "gcp", "azure", "oci")); + + public static final CsmCloudProvider AWS = new CsmCloudProvider("aws"); + public static final CsmCloudProvider GCP = new CsmCloudProvider("gcp"); + public static final CsmCloudProvider AZURE = new CsmCloudProvider("azure"); + public static final CsmCloudProvider OCI = new CsmCloudProvider("oci"); + + CsmCloudProvider(String value) { + super(value, allowedValues); + } + + public static class CsmCloudProviderSerializer extends StdSerializer { + public CsmCloudProviderSerializer(Class t) { + super(t); + } + + public CsmCloudProviderSerializer() { + this(null); + } + + @Override + public void serialize(CsmCloudProvider value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static CsmCloudProvider fromValue(String value) { + return new CsmCloudProvider(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CsmFacetInfoType.java b/src/main/java/com/datadog/api/client/v2/model/CsmFacetInfoType.java new file mode 100644 index 00000000000..5d00f24e386 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CsmFacetInfoType.java @@ -0,0 +1,55 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * The JSON:API type for facet info resources. The value should always be facet_info. + */ +@JsonSerialize(using = CsmFacetInfoType.CsmFacetInfoTypeSerializer.class) +public class CsmFacetInfoType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("facet_info")); + + public static final CsmFacetInfoType FACET_INFO = new CsmFacetInfoType("facet_info"); + + CsmFacetInfoType(String value) { + super(value, allowedValues); + } + + public static class CsmFacetInfoTypeSerializer extends StdSerializer { + public CsmFacetInfoTypeSerializer(Class t) { + super(t); + } + + public CsmFacetInfoTypeSerializer() { + this(null); + } + + @Override + public void serialize(CsmFacetInfoType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static CsmFacetInfoType fromValue(String value) { + return new CsmFacetInfoType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CsmHostFacetInfoAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CsmHostFacetInfoAttributes.java new file mode 100644 index 00000000000..8ca34b9837a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CsmHostFacetInfoAttributes.java @@ -0,0 +1,158 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * Attributes of a facet info response, containing the value distribution for the requested facet. + */ +@JsonPropertyOrder({CsmHostFacetInfoAttributes.JSON_PROPERTY_ITEMS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CsmHostFacetInfoAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ITEMS = "items"; + private List items = new ArrayList<>(); + + public CsmHostFacetInfoAttributes() {} + + @JsonCreator + public CsmHostFacetInfoAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_ITEMS) + List items) { + this.items = items; + } + + public CsmHostFacetInfoAttributes items(List items) { + this.items = items; + for (CsmHostFacetInfoItem item : items) { + this.unparsed |= item.unparsed; + } + return this; + } + + public CsmHostFacetInfoAttributes addItemsItem(CsmHostFacetInfoItem itemsItem) { + this.items.add(itemsItem); + this.unparsed |= itemsItem.unparsed; + return this; + } + + /** + * The list of facet value entries for the current page. + * + * @return items + */ + @JsonProperty(JSON_PROPERTY_ITEMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getItems() { + return items; + } + + public void setItems(List items) { + this.items = items; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CsmHostFacetInfoAttributes + */ + @JsonAnySetter + public CsmHostFacetInfoAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CsmHostFacetInfoAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CsmHostFacetInfoAttributes csmHostFacetInfoAttributes = (CsmHostFacetInfoAttributes) o; + return Objects.equals(this.items, csmHostFacetInfoAttributes.items) + && Objects.equals( + this.additionalProperties, csmHostFacetInfoAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(items, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CsmHostFacetInfoAttributes {\n"); + sb.append(" items: ").append(toIndentedString(items)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CsmHostFacetInfoData.java b/src/main/java/com/datadog/api/client/v2/model/CsmHostFacetInfoData.java new file mode 100644 index 00000000000..07e37dc2c43 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CsmHostFacetInfoData.java @@ -0,0 +1,239 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The data wrapper for a facet info response. */ +@JsonPropertyOrder({ + CsmHostFacetInfoData.JSON_PROPERTY_ATTRIBUTES, + CsmHostFacetInfoData.JSON_PROPERTY_ID, + CsmHostFacetInfoData.JSON_PROPERTY_META, + CsmHostFacetInfoData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CsmHostFacetInfoData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CsmHostFacetInfoAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_META = "meta"; + private CsmHostFacetInfoMeta meta; + + public static final String JSON_PROPERTY_TYPE = "type"; + private CsmFacetInfoType type = CsmFacetInfoType.FACET_INFO; + + public CsmHostFacetInfoData() {} + + @JsonCreator + public CsmHostFacetInfoData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + CsmHostFacetInfoAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_META) CsmHostFacetInfoMeta meta, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) CsmFacetInfoType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.meta = meta; + this.unparsed |= meta.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public CsmHostFacetInfoData attributes(CsmHostFacetInfoAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a facet info response, containing the value distribution for the requested facet. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CsmHostFacetInfoAttributes getAttributes() { + return attributes; + } + + public void setAttributes(CsmHostFacetInfoAttributes attributes) { + this.attributes = attributes; + } + + public CsmHostFacetInfoData id(String id) { + this.id = id; + return this; + } + + /** + * The identifier of the facet. + * + * @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 CsmHostFacetInfoData meta(CsmHostFacetInfoMeta meta) { + this.meta = meta; + this.unparsed |= meta.unparsed; + return this; + } + + /** + * Metadata for the facet info response. + * + * @return meta + */ + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CsmHostFacetInfoMeta getMeta() { + return meta; + } + + public void setMeta(CsmHostFacetInfoMeta meta) { + this.meta = meta; + } + + public CsmHostFacetInfoData type(CsmFacetInfoType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The JSON:API type for facet info resources. The value should always be facet_info. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CsmFacetInfoType getType() { + return type; + } + + public void setType(CsmFacetInfoType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CsmHostFacetInfoData + */ + @JsonAnySetter + public CsmHostFacetInfoData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CsmHostFacetInfoData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CsmHostFacetInfoData csmHostFacetInfoData = (CsmHostFacetInfoData) o; + return Objects.equals(this.attributes, csmHostFacetInfoData.attributes) + && Objects.equals(this.id, csmHostFacetInfoData.id) + && Objects.equals(this.meta, csmHostFacetInfoData.meta) + && Objects.equals(this.type, csmHostFacetInfoData.type) + && Objects.equals(this.additionalProperties, csmHostFacetInfoData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, meta, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CsmHostFacetInfoData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CsmHostFacetInfoItem.java b/src/main/java/com/datadog/api/client/v2/model/CsmHostFacetInfoItem.java new file mode 100644 index 00000000000..8f703d565ea --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CsmHostFacetInfoItem.java @@ -0,0 +1,173 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A single value and its occurrence count for a facet. */ +@JsonPropertyOrder({ + CsmHostFacetInfoItem.JSON_PROPERTY_COUNT, + CsmHostFacetInfoItem.JSON_PROPERTY_VALUE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CsmHostFacetInfoItem { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COUNT = "count"; + private Long count; + + public static final String JSON_PROPERTY_VALUE = "value"; + private String value; + + public CsmHostFacetInfoItem() {} + + @JsonCreator + public CsmHostFacetInfoItem( + @JsonProperty(required = true, value = JSON_PROPERTY_COUNT) Long count, + @JsonProperty(required = true, value = JSON_PROPERTY_VALUE) String value) { + this.count = count; + this.value = value; + } + + public CsmHostFacetInfoItem count(Long count) { + this.count = count; + return this; + } + + /** + * The number of resources with this facet value. + * + * @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 CsmHostFacetInfoItem value(String value) { + this.value = value; + return this; + } + + /** + * The facet value. + * + * @return value + */ + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CsmHostFacetInfoItem + */ + @JsonAnySetter + public CsmHostFacetInfoItem putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CsmHostFacetInfoItem object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CsmHostFacetInfoItem csmHostFacetInfoItem = (CsmHostFacetInfoItem) o; + return Objects.equals(this.count, csmHostFacetInfoItem.count) + && Objects.equals(this.value, csmHostFacetInfoItem.value) + && Objects.equals(this.additionalProperties, csmHostFacetInfoItem.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(count, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CsmHostFacetInfoItem {\n"); + sb.append(" count: ").append(toIndentedString(count)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CsmHostFacetInfoMeta.java b/src/main/java/com/datadog/api/client/v2/model/CsmHostFacetInfoMeta.java new file mode 100644 index 00000000000..7009f7dd910 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CsmHostFacetInfoMeta.java @@ -0,0 +1,143 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Metadata for the facet info response. */ +@JsonPropertyOrder({CsmHostFacetInfoMeta.JSON_PROPERTY_TOTAL_COUNT}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CsmHostFacetInfoMeta { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_TOTAL_COUNT = "total_count"; + private Long totalCount; + + public CsmHostFacetInfoMeta() {} + + @JsonCreator + public CsmHostFacetInfoMeta( + @JsonProperty(required = true, value = JSON_PROPERTY_TOTAL_COUNT) Long totalCount) { + this.totalCount = totalCount; + } + + public CsmHostFacetInfoMeta totalCount(Long totalCount) { + this.totalCount = totalCount; + return this; + } + + /** + * The total number of distinct values for this facet. + * + * @return totalCount + */ + @JsonProperty(JSON_PROPERTY_TOTAL_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getTotalCount() { + return totalCount; + } + + public void setTotalCount(Long totalCount) { + this.totalCount = totalCount; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CsmHostFacetInfoMeta + */ + @JsonAnySetter + public CsmHostFacetInfoMeta putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CsmHostFacetInfoMeta object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CsmHostFacetInfoMeta csmHostFacetInfoMeta = (CsmHostFacetInfoMeta) o; + return Objects.equals(this.totalCount, csmHostFacetInfoMeta.totalCount) + && Objects.equals(this.additionalProperties, csmHostFacetInfoMeta.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(totalCount, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CsmHostFacetInfoMeta {\n"); + sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CsmHostFacetInfoResponse.java b/src/main/java/com/datadog/api/client/v2/model/CsmHostFacetInfoResponse.java new file mode 100644 index 00000000000..453c6c37c7e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CsmHostFacetInfoResponse.java @@ -0,0 +1,145 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The response returned when requesting value distribution for a specific facet. */ +@JsonPropertyOrder({CsmHostFacetInfoResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CsmHostFacetInfoResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private CsmHostFacetInfoData data; + + public CsmHostFacetInfoResponse() {} + + @JsonCreator + public CsmHostFacetInfoResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) CsmHostFacetInfoData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public CsmHostFacetInfoResponse data(CsmHostFacetInfoData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data wrapper for a facet info response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CsmHostFacetInfoData getData() { + return data; + } + + public void setData(CsmHostFacetInfoData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CsmHostFacetInfoResponse + */ + @JsonAnySetter + public CsmHostFacetInfoResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CsmHostFacetInfoResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CsmHostFacetInfoResponse csmHostFacetInfoResponse = (CsmHostFacetInfoResponse) o; + return Objects.equals(this.data, csmHostFacetInfoResponse.data) + && Objects.equals(this.additionalProperties, csmHostFacetInfoResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CsmHostFacetInfoResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CsmSettingsMeta.java b/src/main/java/com/datadog/api/client/v2/model/CsmSettingsMeta.java new file mode 100644 index 00000000000..62caa21593e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CsmSettingsMeta.java @@ -0,0 +1,201 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Pagination metadata for a CSM settings list response. */ +@JsonPropertyOrder({ + CsmSettingsMeta.JSON_PROPERTY_PAGE_INDEX, + CsmSettingsMeta.JSON_PROPERTY_PAGE_SIZE, + CsmSettingsMeta.JSON_PROPERTY_TOTAL_FILTERED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CsmSettingsMeta { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_PAGE_INDEX = "page_index"; + private Long pageIndex; + + public static final String JSON_PROPERTY_PAGE_SIZE = "page_size"; + private Long pageSize; + + public static final String JSON_PROPERTY_TOTAL_FILTERED = "total_filtered"; + private Long totalFiltered; + + public CsmSettingsMeta() {} + + @JsonCreator + public CsmSettingsMeta( + @JsonProperty(required = true, value = JSON_PROPERTY_PAGE_INDEX) Long pageIndex, + @JsonProperty(required = true, value = JSON_PROPERTY_PAGE_SIZE) Long pageSize, + @JsonProperty(required = true, value = JSON_PROPERTY_TOTAL_FILTERED) Long totalFiltered) { + this.pageIndex = pageIndex; + this.pageSize = pageSize; + this.totalFiltered = totalFiltered; + } + + public CsmSettingsMeta pageIndex(Long pageIndex) { + this.pageIndex = pageIndex; + return this; + } + + /** + * The current page index (zero-based). + * + * @return pageIndex + */ + @JsonProperty(JSON_PROPERTY_PAGE_INDEX) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getPageIndex() { + return pageIndex; + } + + public void setPageIndex(Long pageIndex) { + this.pageIndex = pageIndex; + } + + public CsmSettingsMeta pageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * The number of resources returned per page. + * + * @return pageSize + */ + @JsonProperty(JSON_PROPERTY_PAGE_SIZE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getPageSize() { + return pageSize; + } + + public void setPageSize(Long pageSize) { + this.pageSize = pageSize; + } + + public CsmSettingsMeta totalFiltered(Long totalFiltered) { + this.totalFiltered = totalFiltered; + return this; + } + + /** + * The total number of resources matching the filter criteria. + * + * @return totalFiltered + */ + @JsonProperty(JSON_PROPERTY_TOTAL_FILTERED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getTotalFiltered() { + return totalFiltered; + } + + public void setTotalFiltered(Long totalFiltered) { + this.totalFiltered = totalFiltered; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CsmSettingsMeta + */ + @JsonAnySetter + public CsmSettingsMeta putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CsmSettingsMeta object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CsmSettingsMeta csmSettingsMeta = (CsmSettingsMeta) o; + return Objects.equals(this.pageIndex, csmSettingsMeta.pageIndex) + && Objects.equals(this.pageSize, csmSettingsMeta.pageSize) + && Objects.equals(this.totalFiltered, csmSettingsMeta.totalFiltered) + && Objects.equals(this.additionalProperties, csmSettingsMeta.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(pageIndex, pageSize, totalFiltered, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CsmSettingsMeta {\n"); + sb.append(" pageIndex: ").append(toIndentedString(pageIndex)).append("\n"); + sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); + sb.append(" totalFiltered: ").append(toIndentedString(totalFiltered)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CsmUnifiedHostAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CsmUnifiedHostAttributes.java new file mode 100644 index 00000000000..fc4c5ac7ca1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CsmUnifiedHostAttributes.java @@ -0,0 +1,795 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes of a unified host, combining data from agent and agentless sources. */ +@JsonPropertyOrder({ + CsmUnifiedHostAttributes.JSON_PROPERTY_ACCOUNT_ID, + CsmUnifiedHostAttributes.JSON_PROPERTY_AGENT_CSM_VM_CONTAINERS_ENABLED, + CsmUnifiedHostAttributes.JSON_PROPERTY_AGENT_CSM_VM_HOSTS_ENABLED, + CsmUnifiedHostAttributes.JSON_PROPERTY_AGENT_CWS_ENABLED, + CsmUnifiedHostAttributes.JSON_PROPERTY_AGENT_POSTURE_MANAGEMENT, + CsmUnifiedHostAttributes.JSON_PROPERTY_AGENT_VERSION, + CsmUnifiedHostAttributes.JSON_PROPERTY_AGENTLESS_POSTURE_MANAGEMENT, + CsmUnifiedHostAttributes.JSON_PROPERTY_AGENTLESS_VULNERABILITY_SCANNING, + CsmUnifiedHostAttributes.JSON_PROPERTY_CLOUD_PROVIDER, + CsmUnifiedHostAttributes.JSON_PROPERTY_CLUSTER_NAME, + CsmUnifiedHostAttributes.JSON_PROPERTY_DATADOG_AGENT_KEY, + CsmUnifiedHostAttributes.JSON_PROPERTY_ENV, + CsmUnifiedHostAttributes.JSON_PROPERTY_HOST_ID, + CsmUnifiedHostAttributes.JSON_PROPERTY_INSTALL_METHOD_TOOL, + CsmUnifiedHostAttributes.JSON_PROPERTY_OS, + CsmUnifiedHostAttributes.JSON_PROPERTY_RESOURCE_TYPE, + CsmUnifiedHostAttributes.JSON_PROPERTY_SOURCE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CsmUnifiedHostAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private JsonNullable accountId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AGENT_CSM_VM_CONTAINERS_ENABLED = + "agent_csm_vm_containers_enabled"; + private JsonNullable agentCsmVmContainersEnabled = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AGENT_CSM_VM_HOSTS_ENABLED = + "agent_csm_vm_hosts_enabled"; + private JsonNullable agentCsmVmHostsEnabled = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AGENT_CWS_ENABLED = "agent_cws_enabled"; + private JsonNullable agentCwsEnabled = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AGENT_POSTURE_MANAGEMENT = "agent_posture_management"; + private JsonNullable agentPostureManagement = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AGENT_VERSION = "agent_version"; + private JsonNullable agentVersion = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AGENTLESS_POSTURE_MANAGEMENT = + "agentless_posture_management"; + private JsonNullable agentlessPostureManagement = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_AGENTLESS_VULNERABILITY_SCANNING = + "agentless_vulnerability_scanning"; + private JsonNullable agentlessVulnerabilityScanning = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CLOUD_PROVIDER = "cloud_provider"; + private CsmCloudProvider cloudProvider; + + public static final String JSON_PROPERTY_CLUSTER_NAME = "cluster_name"; + private JsonNullable clusterName = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DATADOG_AGENT_KEY = "datadog_agent_key"; + private JsonNullable datadogAgentKey = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ENV = "env"; + private JsonNullable> env = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_HOST_ID = "host_id"; + private JsonNullable hostId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_INSTALL_METHOD_TOOL = "install_method_tool"; + private JsonNullable installMethodTool = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_OS = "os"; + private JsonNullable os = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESOURCE_TYPE = "resource_type"; + private CsmAgentlessHostResourceType resourceType; + + public static final String JSON_PROPERTY_SOURCE = "source"; + private CsmUnifiedHostSource source; + + public CsmUnifiedHostAttributes() {} + + @JsonCreator + public CsmUnifiedHostAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE) CsmUnifiedHostSource source) { + this.source = source; + this.unparsed |= !source.isValid(); + } + + public CsmUnifiedHostAttributes accountId(String accountId) { + this.accountId = JsonNullable.of(accountId); + return this; + } + + /** + * The ID of the cloud account that the host belongs to. Present only when the host was discovered + * through agentless scanning. + * + * @return accountId + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getAccountId() { + return accountId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getAccountId_JsonNullable() { + return accountId; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + public void setAccountId_JsonNullable(JsonNullable accountId) { + this.accountId = accountId; + } + + public void setAccountId(String accountId) { + this.accountId = JsonNullable.of(accountId); + } + + public CsmUnifiedHostAttributes agentCsmVmContainersEnabled(Boolean agentCsmVmContainersEnabled) { + this.agentCsmVmContainersEnabled = JsonNullable.of(agentCsmVmContainersEnabled); + return this; + } + + /** + * Whether CSM Vulnerabilities is enabled for containers through the Datadog Agent. true + * if enabled; false if disabled. + * + * @return agentCsmVmContainersEnabled + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Boolean getAgentCsmVmContainersEnabled() { + return agentCsmVmContainersEnabled.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AGENT_CSM_VM_CONTAINERS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getAgentCsmVmContainersEnabled_JsonNullable() { + return agentCsmVmContainersEnabled; + } + + @JsonProperty(JSON_PROPERTY_AGENT_CSM_VM_CONTAINERS_ENABLED) + public void setAgentCsmVmContainersEnabled_JsonNullable( + JsonNullable agentCsmVmContainersEnabled) { + this.agentCsmVmContainersEnabled = agentCsmVmContainersEnabled; + } + + public void setAgentCsmVmContainersEnabled(Boolean agentCsmVmContainersEnabled) { + this.agentCsmVmContainersEnabled = JsonNullable.of(agentCsmVmContainersEnabled); + } + + public CsmUnifiedHostAttributes agentCsmVmHostsEnabled(Boolean agentCsmVmHostsEnabled) { + this.agentCsmVmHostsEnabled = JsonNullable.of(agentCsmVmHostsEnabled); + return this; + } + + /** + * Whether CSM Vulnerabilities is enabled for hosts through the Datadog Agent. true + * if enabled; false if disabled. + * + * @return agentCsmVmHostsEnabled + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Boolean getAgentCsmVmHostsEnabled() { + return agentCsmVmHostsEnabled.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AGENT_CSM_VM_HOSTS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getAgentCsmVmHostsEnabled_JsonNullable() { + return agentCsmVmHostsEnabled; + } + + @JsonProperty(JSON_PROPERTY_AGENT_CSM_VM_HOSTS_ENABLED) + public void setAgentCsmVmHostsEnabled_JsonNullable(JsonNullable agentCsmVmHostsEnabled) { + this.agentCsmVmHostsEnabled = agentCsmVmHostsEnabled; + } + + public void setAgentCsmVmHostsEnabled(Boolean agentCsmVmHostsEnabled) { + this.agentCsmVmHostsEnabled = JsonNullable.of(agentCsmVmHostsEnabled); + } + + public CsmUnifiedHostAttributes agentCwsEnabled(Boolean agentCwsEnabled) { + this.agentCwsEnabled = JsonNullable.of(agentCwsEnabled); + return this; + } + + /** + * Whether CSM Threats is enabled for this host through the Datadog Agent. true if + * enabled; false if disabled. + * + * @return agentCwsEnabled + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Boolean getAgentCwsEnabled() { + return agentCwsEnabled.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AGENT_CWS_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getAgentCwsEnabled_JsonNullable() { + return agentCwsEnabled; + } + + @JsonProperty(JSON_PROPERTY_AGENT_CWS_ENABLED) + public void setAgentCwsEnabled_JsonNullable(JsonNullable agentCwsEnabled) { + this.agentCwsEnabled = agentCwsEnabled; + } + + public void setAgentCwsEnabled(Boolean agentCwsEnabled) { + this.agentCwsEnabled = JsonNullable.of(agentCwsEnabled); + } + + public CsmUnifiedHostAttributes agentPostureManagement(Boolean agentPostureManagement) { + this.agentPostureManagement = JsonNullable.of(agentPostureManagement); + return this; + } + + /** + * Whether CSM Misconfigurations is enabled for this host through the Datadog Agent. true + * if enabled; false if disabled. + * + * @return agentPostureManagement + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Boolean getAgentPostureManagement() { + return agentPostureManagement.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AGENT_POSTURE_MANAGEMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getAgentPostureManagement_JsonNullable() { + return agentPostureManagement; + } + + @JsonProperty(JSON_PROPERTY_AGENT_POSTURE_MANAGEMENT) + public void setAgentPostureManagement_JsonNullable(JsonNullable agentPostureManagement) { + this.agentPostureManagement = agentPostureManagement; + } + + public void setAgentPostureManagement(Boolean agentPostureManagement) { + this.agentPostureManagement = JsonNullable.of(agentPostureManagement); + } + + public CsmUnifiedHostAttributes agentVersion(String agentVersion) { + this.agentVersion = JsonNullable.of(agentVersion); + return this; + } + + /** + * The version of the Datadog Agent running on this host. + * + * @return agentVersion + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getAgentVersion() { + return agentVersion.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AGENT_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getAgentVersion_JsonNullable() { + return agentVersion; + } + + @JsonProperty(JSON_PROPERTY_AGENT_VERSION) + public void setAgentVersion_JsonNullable(JsonNullable agentVersion) { + this.agentVersion = agentVersion; + } + + public void setAgentVersion(String agentVersion) { + this.agentVersion = JsonNullable.of(agentVersion); + } + + public CsmUnifiedHostAttributes agentlessPostureManagement(Boolean agentlessPostureManagement) { + this.agentlessPostureManagement = JsonNullable.of(agentlessPostureManagement); + return this; + } + + /** + * Whether CSM Misconfigurations is enabled for this host via agentless scanning. true + * if enabled; false if disabled. + * + * @return agentlessPostureManagement + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Boolean getAgentlessPostureManagement() { + return agentlessPostureManagement.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AGENTLESS_POSTURE_MANAGEMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getAgentlessPostureManagement_JsonNullable() { + return agentlessPostureManagement; + } + + @JsonProperty(JSON_PROPERTY_AGENTLESS_POSTURE_MANAGEMENT) + public void setAgentlessPostureManagement_JsonNullable( + JsonNullable agentlessPostureManagement) { + this.agentlessPostureManagement = agentlessPostureManagement; + } + + public void setAgentlessPostureManagement(Boolean agentlessPostureManagement) { + this.agentlessPostureManagement = JsonNullable.of(agentlessPostureManagement); + } + + public CsmUnifiedHostAttributes agentlessVulnerabilityScanning( + Boolean agentlessVulnerabilityScanning) { + this.agentlessVulnerabilityScanning = JsonNullable.of(agentlessVulnerabilityScanning); + return this; + } + + /** + * Whether CSM Vulnerabilities is enabled for this host via agentless scanning. true + * if enabled; false if disabled. + * + * @return agentlessVulnerabilityScanning + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Boolean getAgentlessVulnerabilityScanning() { + return agentlessVulnerabilityScanning.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AGENTLESS_VULNERABILITY_SCANNING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getAgentlessVulnerabilityScanning_JsonNullable() { + return agentlessVulnerabilityScanning; + } + + @JsonProperty(JSON_PROPERTY_AGENTLESS_VULNERABILITY_SCANNING) + public void setAgentlessVulnerabilityScanning_JsonNullable( + JsonNullable agentlessVulnerabilityScanning) { + this.agentlessVulnerabilityScanning = agentlessVulnerabilityScanning; + } + + public void setAgentlessVulnerabilityScanning(Boolean agentlessVulnerabilityScanning) { + this.agentlessVulnerabilityScanning = JsonNullable.of(agentlessVulnerabilityScanning); + } + + public CsmUnifiedHostAttributes cloudProvider(CsmCloudProvider cloudProvider) { + this.cloudProvider = cloudProvider; + this.unparsed |= !cloudProvider.isValid(); + return this; + } + + /** + * The cloud provider of a host resource. + * + * @return cloudProvider + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLOUD_PROVIDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CsmCloudProvider getCloudProvider() { + return cloudProvider; + } + + public void setCloudProvider(CsmCloudProvider cloudProvider) { + if (!cloudProvider.isValid()) { + this.unparsed = true; + } + this.cloudProvider = cloudProvider; + } + + public CsmUnifiedHostAttributes clusterName(String clusterName) { + this.clusterName = JsonNullable.of(clusterName); + return this; + } + + /** + * The name of the Kubernetes cluster the host belongs to, if applicable. + * + * @return clusterName + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getClusterName() { + return clusterName.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CLUSTER_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getClusterName_JsonNullable() { + return clusterName; + } + + @JsonProperty(JSON_PROPERTY_CLUSTER_NAME) + public void setClusterName_JsonNullable(JsonNullable clusterName) { + this.clusterName = clusterName; + } + + public void setClusterName(String clusterName) { + this.clusterName = JsonNullable.of(clusterName); + } + + public CsmUnifiedHostAttributes datadogAgentKey(String datadogAgentKey) { + this.datadogAgentKey = JsonNullable.of(datadogAgentKey); + return this; + } + + /** + * The Datadog Agent key associated with this host. Present only for agent-sourced hosts. + * + * @return datadogAgentKey + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getDatadogAgentKey() { + return datadogAgentKey.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATADOG_AGENT_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getDatadogAgentKey_JsonNullable() { + return datadogAgentKey; + } + + @JsonProperty(JSON_PROPERTY_DATADOG_AGENT_KEY) + public void setDatadogAgentKey_JsonNullable(JsonNullable datadogAgentKey) { + this.datadogAgentKey = datadogAgentKey; + } + + public void setDatadogAgentKey(String datadogAgentKey) { + this.datadogAgentKey = JsonNullable.of(datadogAgentKey); + } + + public CsmUnifiedHostAttributes env(List env) { + this.env = JsonNullable.>of(env); + return this; + } + + public CsmUnifiedHostAttributes addEnvItem(String envItem) { + if (this.env == null || !this.env.isPresent()) { + this.env = JsonNullable.>of(new ArrayList<>()); + } + try { + this.env.get().add(envItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * The list of environment tags associated with this host. + * + * @return env + */ + @jakarta.annotation.Nullable + @JsonIgnore + public List getEnv() { + return env.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ENV) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getEnv_JsonNullable() { + return env; + } + + @JsonProperty(JSON_PROPERTY_ENV) + public void setEnv_JsonNullable(JsonNullable> env) { + this.env = env; + } + + public void setEnv(List env) { + this.env = JsonNullable.>of(env); + } + + public CsmUnifiedHostAttributes hostId(Long hostId) { + this.hostId = JsonNullable.of(hostId); + return this; + } + + /** + * The internal Datadog host identifier. Present only for agent-sourced hosts. + * + * @return hostId + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Long getHostId() { + return hostId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_HOST_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getHostId_JsonNullable() { + return hostId; + } + + @JsonProperty(JSON_PROPERTY_HOST_ID) + public void setHostId_JsonNullable(JsonNullable hostId) { + this.hostId = hostId; + } + + public void setHostId(Long hostId) { + this.hostId = JsonNullable.of(hostId); + } + + public CsmUnifiedHostAttributes installMethodTool(String installMethodTool) { + this.installMethodTool = JsonNullable.of(installMethodTool); + return this; + } + + /** + * The tool used to install the Datadog Agent on this host. + * + * @return installMethodTool + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getInstallMethodTool() { + return installMethodTool.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INSTALL_METHOD_TOOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getInstallMethodTool_JsonNullable() { + return installMethodTool; + } + + @JsonProperty(JSON_PROPERTY_INSTALL_METHOD_TOOL) + public void setInstallMethodTool_JsonNullable(JsonNullable installMethodTool) { + this.installMethodTool = installMethodTool; + } + + public void setInstallMethodTool(String installMethodTool) { + this.installMethodTool = JsonNullable.of(installMethodTool); + } + + public CsmUnifiedHostAttributes os(String os) { + this.os = JsonNullable.of(os); + return this; + } + + /** + * The operating system of the host. Present only for agent-sourced hosts. + * + * @return os + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getOs() { + return os.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getOs_JsonNullable() { + return os; + } + + @JsonProperty(JSON_PROPERTY_OS) + public void setOs_JsonNullable(JsonNullable os) { + this.os = os; + } + + public void setOs(String os) { + this.os = JsonNullable.of(os); + } + + public CsmUnifiedHostAttributes resourceType(CsmAgentlessHostResourceType resourceType) { + this.resourceType = resourceType; + this.unparsed |= !resourceType.isValid(); + return this; + } + + /** + * The type of cloud resource for an agentless host. + * + * @return resourceType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CsmAgentlessHostResourceType getResourceType() { + return resourceType; + } + + public void setResourceType(CsmAgentlessHostResourceType resourceType) { + if (!resourceType.isValid()) { + this.unparsed = true; + } + this.resourceType = resourceType; + } + + public CsmUnifiedHostAttributes source(CsmUnifiedHostSource source) { + this.source = source; + this.unparsed |= !source.isValid(); + return this; + } + + /** + * The source of a unified host entry, indicating whether it was discovered via agent, agentless + * scanning, or both. + * + * @return source + */ + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CsmUnifiedHostSource getSource() { + return source; + } + + public void setSource(CsmUnifiedHostSource source) { + if (!source.isValid()) { + this.unparsed = true; + } + this.source = source; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CsmUnifiedHostAttributes + */ + @JsonAnySetter + public CsmUnifiedHostAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CsmUnifiedHostAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CsmUnifiedHostAttributes csmUnifiedHostAttributes = (CsmUnifiedHostAttributes) o; + return Objects.equals(this.accountId, csmUnifiedHostAttributes.accountId) + && Objects.equals( + this.agentCsmVmContainersEnabled, csmUnifiedHostAttributes.agentCsmVmContainersEnabled) + && Objects.equals( + this.agentCsmVmHostsEnabled, csmUnifiedHostAttributes.agentCsmVmHostsEnabled) + && Objects.equals(this.agentCwsEnabled, csmUnifiedHostAttributes.agentCwsEnabled) + && Objects.equals( + this.agentPostureManagement, csmUnifiedHostAttributes.agentPostureManagement) + && Objects.equals(this.agentVersion, csmUnifiedHostAttributes.agentVersion) + && Objects.equals( + this.agentlessPostureManagement, csmUnifiedHostAttributes.agentlessPostureManagement) + && Objects.equals( + this.agentlessVulnerabilityScanning, + csmUnifiedHostAttributes.agentlessVulnerabilityScanning) + && Objects.equals(this.cloudProvider, csmUnifiedHostAttributes.cloudProvider) + && Objects.equals(this.clusterName, csmUnifiedHostAttributes.clusterName) + && Objects.equals(this.datadogAgentKey, csmUnifiedHostAttributes.datadogAgentKey) + && Objects.equals(this.env, csmUnifiedHostAttributes.env) + && Objects.equals(this.hostId, csmUnifiedHostAttributes.hostId) + && Objects.equals(this.installMethodTool, csmUnifiedHostAttributes.installMethodTool) + && Objects.equals(this.os, csmUnifiedHostAttributes.os) + && Objects.equals(this.resourceType, csmUnifiedHostAttributes.resourceType) + && Objects.equals(this.source, csmUnifiedHostAttributes.source) + && Objects.equals(this.additionalProperties, csmUnifiedHostAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + accountId, + agentCsmVmContainersEnabled, + agentCsmVmHostsEnabled, + agentCwsEnabled, + agentPostureManagement, + agentVersion, + agentlessPostureManagement, + agentlessVulnerabilityScanning, + cloudProvider, + clusterName, + datadogAgentKey, + env, + hostId, + installMethodTool, + os, + resourceType, + source, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CsmUnifiedHostAttributes {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" agentCsmVmContainersEnabled: ") + .append(toIndentedString(agentCsmVmContainersEnabled)) + .append("\n"); + sb.append(" agentCsmVmHostsEnabled: ") + .append(toIndentedString(agentCsmVmHostsEnabled)) + .append("\n"); + sb.append(" agentCwsEnabled: ").append(toIndentedString(agentCwsEnabled)).append("\n"); + sb.append(" agentPostureManagement: ") + .append(toIndentedString(agentPostureManagement)) + .append("\n"); + sb.append(" agentVersion: ").append(toIndentedString(agentVersion)).append("\n"); + sb.append(" agentlessPostureManagement: ") + .append(toIndentedString(agentlessPostureManagement)) + .append("\n"); + sb.append(" agentlessVulnerabilityScanning: ") + .append(toIndentedString(agentlessVulnerabilityScanning)) + .append("\n"); + sb.append(" cloudProvider: ").append(toIndentedString(cloudProvider)).append("\n"); + sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); + sb.append(" datadogAgentKey: ").append(toIndentedString(datadogAgentKey)).append("\n"); + sb.append(" env: ").append(toIndentedString(env)).append("\n"); + sb.append(" hostId: ").append(toIndentedString(hostId)).append("\n"); + sb.append(" installMethodTool: ").append(toIndentedString(installMethodTool)).append("\n"); + sb.append(" os: ").append(toIndentedString(os)).append("\n"); + sb.append(" resourceType: ").append(toIndentedString(resourceType)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CsmUnifiedHostData.java b/src/main/java/com/datadog/api/client/v2/model/CsmUnifiedHostData.java new file mode 100644 index 00000000000..0e0725df6cd --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CsmUnifiedHostData.java @@ -0,0 +1,210 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A single unified host resource, combining agent and agentless data. */ +@JsonPropertyOrder({ + CsmUnifiedHostData.JSON_PROPERTY_ATTRIBUTES, + CsmUnifiedHostData.JSON_PROPERTY_ID, + CsmUnifiedHostData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CsmUnifiedHostData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CsmUnifiedHostAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private CsmUnifiedHostType type = CsmUnifiedHostType.UNIFIED_HOST; + + public CsmUnifiedHostData() {} + + @JsonCreator + public CsmUnifiedHostData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + CsmUnifiedHostAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) CsmUnifiedHostType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public CsmUnifiedHostData attributes(CsmUnifiedHostAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a unified host, combining data from agent and agentless sources. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CsmUnifiedHostAttributes getAttributes() { + return attributes; + } + + public void setAttributes(CsmUnifiedHostAttributes attributes) { + this.attributes = attributes; + } + + public CsmUnifiedHostData id(String id) { + this.id = id; + return this; + } + + /** + * The resource identifier of the unified host. + * + * @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 CsmUnifiedHostData type(CsmUnifiedHostType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The JSON:API type for unified host resources. The value should always be unified_host + * . + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CsmUnifiedHostType getType() { + return type; + } + + public void setType(CsmUnifiedHostType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CsmUnifiedHostData + */ + @JsonAnySetter + public CsmUnifiedHostData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CsmUnifiedHostData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CsmUnifiedHostData csmUnifiedHostData = (CsmUnifiedHostData) o; + return Objects.equals(this.attributes, csmUnifiedHostData.attributes) + && Objects.equals(this.id, csmUnifiedHostData.id) + && Objects.equals(this.type, csmUnifiedHostData.type) + && Objects.equals(this.additionalProperties, csmUnifiedHostData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CsmUnifiedHostData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CsmUnifiedHostFacetData.java b/src/main/java/com/datadog/api/client/v2/model/CsmUnifiedHostFacetData.java new file mode 100644 index 00000000000..055d4783c76 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CsmUnifiedHostFacetData.java @@ -0,0 +1,210 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A single unified host facet resource. */ +@JsonPropertyOrder({ + CsmUnifiedHostFacetData.JSON_PROPERTY_ATTRIBUTES, + CsmUnifiedHostFacetData.JSON_PROPERTY_ID, + CsmUnifiedHostFacetData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CsmUnifiedHostFacetData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CsmAgentlessHostFacetAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private CsmUnifiedHostFacetType type = CsmUnifiedHostFacetType.UNIFIED_HOST_FACET; + + public CsmUnifiedHostFacetData() {} + + @JsonCreator + public CsmUnifiedHostFacetData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + CsmAgentlessHostFacetAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) CsmUnifiedHostFacetType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public CsmUnifiedHostFacetData attributes(CsmAgentlessHostFacetAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an agentless host facet. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CsmAgentlessHostFacetAttributes getAttributes() { + return attributes; + } + + public void setAttributes(CsmAgentlessHostFacetAttributes attributes) { + this.attributes = attributes; + } + + public CsmUnifiedHostFacetData id(String id) { + this.id = id; + return this; + } + + /** + * The identifier of the facet, corresponding to the field path. + * + * @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 CsmUnifiedHostFacetData type(CsmUnifiedHostFacetType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The JSON:API type for unified host facet resources. The value should always be + * unified_host_facet. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CsmUnifiedHostFacetType getType() { + return type; + } + + public void setType(CsmUnifiedHostFacetType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CsmUnifiedHostFacetData + */ + @JsonAnySetter + public CsmUnifiedHostFacetData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CsmUnifiedHostFacetData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CsmUnifiedHostFacetData csmUnifiedHostFacetData = (CsmUnifiedHostFacetData) o; + return Objects.equals(this.attributes, csmUnifiedHostFacetData.attributes) + && Objects.equals(this.id, csmUnifiedHostFacetData.id) + && Objects.equals(this.type, csmUnifiedHostFacetData.type) + && Objects.equals(this.additionalProperties, csmUnifiedHostFacetData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CsmUnifiedHostFacetData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CsmUnifiedHostFacetType.java b/src/main/java/com/datadog/api/client/v2/model/CsmUnifiedHostFacetType.java new file mode 100644 index 00000000000..bf3635e0e12 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CsmUnifiedHostFacetType.java @@ -0,0 +1,60 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * The JSON:API type for unified host facet resources. The value should always be + * unified_host_facet. + */ +@JsonSerialize(using = CsmUnifiedHostFacetType.CsmUnifiedHostFacetTypeSerializer.class) +public class CsmUnifiedHostFacetType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("unified_host_facet")); + + public static final CsmUnifiedHostFacetType UNIFIED_HOST_FACET = + new CsmUnifiedHostFacetType("unified_host_facet"); + + CsmUnifiedHostFacetType(String value) { + super(value, allowedValues); + } + + public static class CsmUnifiedHostFacetTypeSerializer + extends StdSerializer { + public CsmUnifiedHostFacetTypeSerializer(Class t) { + super(t); + } + + public CsmUnifiedHostFacetTypeSerializer() { + this(null); + } + + @Override + public void serialize( + CsmUnifiedHostFacetType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static CsmUnifiedHostFacetType fromValue(String value) { + return new CsmUnifiedHostFacetType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CsmUnifiedHostFacetsResponse.java b/src/main/java/com/datadog/api/client/v2/model/CsmUnifiedHostFacetsResponse.java new file mode 100644 index 00000000000..c6188a9deab --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CsmUnifiedHostFacetsResponse.java @@ -0,0 +1,156 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The response returned when listing facets for unified hosts. */ +@JsonPropertyOrder({CsmUnifiedHostFacetsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CsmUnifiedHostFacetsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public CsmUnifiedHostFacetsResponse() {} + + @JsonCreator + public CsmUnifiedHostFacetsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public CsmUnifiedHostFacetsResponse data(List data) { + this.data = data; + for (CsmUnifiedHostFacetData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public CsmUnifiedHostFacetsResponse addDataItem(CsmUnifiedHostFacetData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * The list of available facets for unified hosts. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CsmUnifiedHostFacetsResponse + */ + @JsonAnySetter + public CsmUnifiedHostFacetsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CsmUnifiedHostFacetsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CsmUnifiedHostFacetsResponse csmUnifiedHostFacetsResponse = (CsmUnifiedHostFacetsResponse) o; + return Objects.equals(this.data, csmUnifiedHostFacetsResponse.data) + && Objects.equals( + this.additionalProperties, csmUnifiedHostFacetsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CsmUnifiedHostFacetsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CsmUnifiedHostSource.java b/src/main/java/com/datadog/api/client/v2/model/CsmUnifiedHostSource.java new file mode 100644 index 00000000000..c46fe36ce98 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CsmUnifiedHostSource.java @@ -0,0 +1,60 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * The source of a unified host entry, indicating whether it was discovered via agent, agentless + * scanning, or both. + */ +@JsonSerialize(using = CsmUnifiedHostSource.CsmUnifiedHostSourceSerializer.class) +public class CsmUnifiedHostSource extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("agent", "agentless", "both")); + + public static final CsmUnifiedHostSource AGENT = new CsmUnifiedHostSource("agent"); + public static final CsmUnifiedHostSource AGENTLESS = new CsmUnifiedHostSource("agentless"); + public static final CsmUnifiedHostSource BOTH = new CsmUnifiedHostSource("both"); + + CsmUnifiedHostSource(String value) { + super(value, allowedValues); + } + + public static class CsmUnifiedHostSourceSerializer extends StdSerializer { + public CsmUnifiedHostSourceSerializer(Class t) { + super(t); + } + + public CsmUnifiedHostSourceSerializer() { + this(null); + } + + @Override + public void serialize( + CsmUnifiedHostSource value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static CsmUnifiedHostSource fromValue(String value) { + return new CsmUnifiedHostSource(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CsmUnifiedHostType.java b/src/main/java/com/datadog/api/client/v2/model/CsmUnifiedHostType.java new file mode 100644 index 00000000000..cc2223171c9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CsmUnifiedHostType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * The JSON:API type for unified host resources. The value should always be unified_host + * . + */ +@JsonSerialize(using = CsmUnifiedHostType.CsmUnifiedHostTypeSerializer.class) +public class CsmUnifiedHostType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("unified_host")); + + public static final CsmUnifiedHostType UNIFIED_HOST = new CsmUnifiedHostType("unified_host"); + + CsmUnifiedHostType(String value) { + super(value, allowedValues); + } + + public static class CsmUnifiedHostTypeSerializer extends StdSerializer { + public CsmUnifiedHostTypeSerializer(Class t) { + super(t); + } + + public CsmUnifiedHostTypeSerializer() { + this(null); + } + + @Override + public void serialize(CsmUnifiedHostType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static CsmUnifiedHostType fromValue(String value) { + return new CsmUnifiedHostType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CsmUnifiedHostsMeta.java b/src/main/java/com/datadog/api/client/v2/model/CsmUnifiedHostsMeta.java new file mode 100644 index 00000000000..6aeb7da93ef --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CsmUnifiedHostsMeta.java @@ -0,0 +1,229 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Pagination metadata for a unified hosts list response. */ +@JsonPropertyOrder({ + CsmUnifiedHostsMeta.JSON_PROPERTY_PAGE_INDEX, + CsmUnifiedHostsMeta.JSON_PROPERTY_PAGE_SIZE, + CsmUnifiedHostsMeta.JSON_PROPERTY_TOTAL_FILTERED, + CsmUnifiedHostsMeta.JSON_PROPERTY_TOTAL_PAGES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CsmUnifiedHostsMeta { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_PAGE_INDEX = "page_index"; + private Long pageIndex; + + public static final String JSON_PROPERTY_PAGE_SIZE = "page_size"; + private Long pageSize; + + public static final String JSON_PROPERTY_TOTAL_FILTERED = "total_filtered"; + private Long totalFiltered; + + public static final String JSON_PROPERTY_TOTAL_PAGES = "total_pages"; + private Long totalPages; + + public CsmUnifiedHostsMeta() {} + + @JsonCreator + public CsmUnifiedHostsMeta( + @JsonProperty(required = true, value = JSON_PROPERTY_PAGE_INDEX) Long pageIndex, + @JsonProperty(required = true, value = JSON_PROPERTY_PAGE_SIZE) Long pageSize, + @JsonProperty(required = true, value = JSON_PROPERTY_TOTAL_FILTERED) Long totalFiltered, + @JsonProperty(required = true, value = JSON_PROPERTY_TOTAL_PAGES) Long totalPages) { + this.pageIndex = pageIndex; + this.pageSize = pageSize; + this.totalFiltered = totalFiltered; + this.totalPages = totalPages; + } + + public CsmUnifiedHostsMeta pageIndex(Long pageIndex) { + this.pageIndex = pageIndex; + return this; + } + + /** + * The current page index (zero-based). + * + * @return pageIndex + */ + @JsonProperty(JSON_PROPERTY_PAGE_INDEX) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getPageIndex() { + return pageIndex; + } + + public void setPageIndex(Long pageIndex) { + this.pageIndex = pageIndex; + } + + public CsmUnifiedHostsMeta pageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * The number of hosts returned per page. + * + * @return pageSize + */ + @JsonProperty(JSON_PROPERTY_PAGE_SIZE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getPageSize() { + return pageSize; + } + + public void setPageSize(Long pageSize) { + this.pageSize = pageSize; + } + + public CsmUnifiedHostsMeta totalFiltered(Long totalFiltered) { + this.totalFiltered = totalFiltered; + return this; + } + + /** + * The total number of hosts matching the filter criteria. + * + * @return totalFiltered + */ + @JsonProperty(JSON_PROPERTY_TOTAL_FILTERED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getTotalFiltered() { + return totalFiltered; + } + + public void setTotalFiltered(Long totalFiltered) { + this.totalFiltered = totalFiltered; + } + + public CsmUnifiedHostsMeta totalPages(Long totalPages) { + this.totalPages = totalPages; + return this; + } + + /** + * The total number of pages available. + * + * @return totalPages + */ + @JsonProperty(JSON_PROPERTY_TOTAL_PAGES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getTotalPages() { + return totalPages; + } + + public void setTotalPages(Long totalPages) { + this.totalPages = totalPages; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CsmUnifiedHostsMeta + */ + @JsonAnySetter + public CsmUnifiedHostsMeta putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CsmUnifiedHostsMeta object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CsmUnifiedHostsMeta csmUnifiedHostsMeta = (CsmUnifiedHostsMeta) o; + return Objects.equals(this.pageIndex, csmUnifiedHostsMeta.pageIndex) + && Objects.equals(this.pageSize, csmUnifiedHostsMeta.pageSize) + && Objects.equals(this.totalFiltered, csmUnifiedHostsMeta.totalFiltered) + && Objects.equals(this.totalPages, csmUnifiedHostsMeta.totalPages) + && Objects.equals(this.additionalProperties, csmUnifiedHostsMeta.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(pageIndex, pageSize, totalFiltered, totalPages, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CsmUnifiedHostsMeta {\n"); + sb.append(" pageIndex: ").append(toIndentedString(pageIndex)).append("\n"); + sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n"); + sb.append(" totalFiltered: ").append(toIndentedString(totalFiltered)).append("\n"); + sb.append(" totalPages: ").append(toIndentedString(totalPages)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CsmUnifiedHostsResponse.java b/src/main/java/com/datadog/api/client/v2/model/CsmUnifiedHostsResponse.java new file mode 100644 index 00000000000..11726771777 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CsmUnifiedHostsResponse.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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The response returned when listing unified hosts. */ +@JsonPropertyOrder({ + CsmUnifiedHostsResponse.JSON_PROPERTY_DATA, + CsmUnifiedHostsResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CsmUnifiedHostsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_META = "meta"; + private CsmUnifiedHostsMeta meta; + + public CsmUnifiedHostsResponse() {} + + @JsonCreator + public CsmUnifiedHostsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data, + @JsonProperty(required = true, value = JSON_PROPERTY_META) CsmUnifiedHostsMeta meta) { + this.data = data; + this.meta = meta; + this.unparsed |= meta.unparsed; + } + + public CsmUnifiedHostsResponse data(List data) { + this.data = data; + for (CsmUnifiedHostData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public CsmUnifiedHostsResponse addDataItem(CsmUnifiedHostData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * The list of unified hosts for the current page. + * + * @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 CsmUnifiedHostsResponse meta(CsmUnifiedHostsMeta meta) { + this.meta = meta; + this.unparsed |= meta.unparsed; + return this; + } + + /** + * Pagination metadata for a unified hosts list response. + * + * @return meta + */ + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CsmUnifiedHostsMeta getMeta() { + return meta; + } + + public void setMeta(CsmUnifiedHostsMeta meta) { + this.meta = meta; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CsmUnifiedHostsResponse + */ + @JsonAnySetter + public CsmUnifiedHostsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CsmUnifiedHostsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CsmUnifiedHostsResponse csmUnifiedHostsResponse = (CsmUnifiedHostsResponse) o; + return Objects.equals(this.data, csmUnifiedHostsResponse.data) + && Objects.equals(this.meta, csmUnifiedHostsResponse.meta) + && Objects.equals(this.additionalProperties, csmUnifiedHostsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CsmUnifiedHostsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CustomerOrgDisableRequest.java b/src/main/java/com/datadog/api/client/v2/model/CustomerOrgDisableRequest.java new file mode 100644 index 00000000000..bb4ae869ed0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CustomerOrgDisableRequest.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request payload for disabling the authenticated customer organization. */ +@JsonPropertyOrder({CustomerOrgDisableRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CustomerOrgDisableRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private CustomerOrgDisableRequestData data; + + public CustomerOrgDisableRequest() {} + + @JsonCreator + public CustomerOrgDisableRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + CustomerOrgDisableRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public CustomerOrgDisableRequest data(CustomerOrgDisableRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for a customer org disable request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CustomerOrgDisableRequestData getData() { + return data; + } + + public void setData(CustomerOrgDisableRequestData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CustomerOrgDisableRequest + */ + @JsonAnySetter + public CustomerOrgDisableRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CustomerOrgDisableRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomerOrgDisableRequest customerOrgDisableRequest = (CustomerOrgDisableRequest) o; + return Objects.equals(this.data, customerOrgDisableRequest.data) + && Objects.equals( + this.additionalProperties, customerOrgDisableRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomerOrgDisableRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CustomerOrgDisableRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CustomerOrgDisableRequestAttributes.java new file mode 100644 index 00000000000..4c81110799d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CustomerOrgDisableRequestAttributes.java @@ -0,0 +1,140 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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; + +/** + * Optional attributes for a customer org disable request. When supplied, org_uuid must + * match the authenticated organization or the request is rejected. + */ +@JsonPropertyOrder({CustomerOrgDisableRequestAttributes.JSON_PROPERTY_ORG_UUID}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CustomerOrgDisableRequestAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ORG_UUID = "org_uuid"; + private String orgUuid; + + public CustomerOrgDisableRequestAttributes orgUuid(String orgUuid) { + this.orgUuid = orgUuid; + return this; + } + + /** + * Datadog organization UUID. If supplied, must match the authenticated organization. + * + * @return orgUuid + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgUuid() { + return orgUuid; + } + + public void setOrgUuid(String orgUuid) { + this.orgUuid = orgUuid; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CustomerOrgDisableRequestAttributes + */ + @JsonAnySetter + public CustomerOrgDisableRequestAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CustomerOrgDisableRequestAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomerOrgDisableRequestAttributes customerOrgDisableRequestAttributes = + (CustomerOrgDisableRequestAttributes) o; + return Objects.equals(this.orgUuid, customerOrgDisableRequestAttributes.orgUuid) + && Objects.equals( + this.additionalProperties, customerOrgDisableRequestAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(orgUuid, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomerOrgDisableRequestAttributes {\n"); + sb.append(" orgUuid: ").append(toIndentedString(orgUuid)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CustomerOrgDisableRequestData.java b/src/main/java/com/datadog/api/client/v2/model/CustomerOrgDisableRequestData.java new file mode 100644 index 00000000000..c9a1b62254b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CustomerOrgDisableRequestData.java @@ -0,0 +1,208 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object for a customer org disable request. */ +@JsonPropertyOrder({ + CustomerOrgDisableRequestData.JSON_PROPERTY_ATTRIBUTES, + CustomerOrgDisableRequestData.JSON_PROPERTY_ID, + CustomerOrgDisableRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CustomerOrgDisableRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CustomerOrgDisableRequestAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private CustomerOrgDisableType type; + + public CustomerOrgDisableRequestData() {} + + @JsonCreator + public CustomerOrgDisableRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) CustomerOrgDisableType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public CustomerOrgDisableRequestData attributes(CustomerOrgDisableRequestAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Optional attributes for a customer org disable request. When supplied, org_uuid + * must match the authenticated organization or the request is rejected. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CustomerOrgDisableRequestAttributes getAttributes() { + return attributes; + } + + public void setAttributes(CustomerOrgDisableRequestAttributes attributes) { + this.attributes = attributes; + } + + public CustomerOrgDisableRequestData id(String id) { + this.id = id; + return this; + } + + /** + * Optional client-supplied identifier for the request. Useful for client-side correlation; the + * server does not use this value. + * + * @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 CustomerOrgDisableRequestData type(CustomerOrgDisableType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * JSON:API resource type for a customer org disable request. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CustomerOrgDisableType getType() { + return type; + } + + public void setType(CustomerOrgDisableType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CustomerOrgDisableRequestData + */ + @JsonAnySetter + public CustomerOrgDisableRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CustomerOrgDisableRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomerOrgDisableRequestData customerOrgDisableRequestData = (CustomerOrgDisableRequestData) o; + return Objects.equals(this.attributes, customerOrgDisableRequestData.attributes) + && Objects.equals(this.id, customerOrgDisableRequestData.id) + && Objects.equals(this.type, customerOrgDisableRequestData.type) + && Objects.equals( + this.additionalProperties, customerOrgDisableRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomerOrgDisableRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CustomerOrgDisableResponse.java b/src/main/java/com/datadog/api/client/v2/model/CustomerOrgDisableResponse.java new file mode 100644 index 00000000000..bda02e22d99 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CustomerOrgDisableResponse.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response describing the outcome of disabling the customer organization. */ +@JsonPropertyOrder({CustomerOrgDisableResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CustomerOrgDisableResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private CustomerOrgDisableResponseData data; + + public CustomerOrgDisableResponse() {} + + @JsonCreator + public CustomerOrgDisableResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + CustomerOrgDisableResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public CustomerOrgDisableResponse data(CustomerOrgDisableResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object returned after disabling the customer organization. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CustomerOrgDisableResponseData getData() { + return data; + } + + public void setData(CustomerOrgDisableResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CustomerOrgDisableResponse + */ + @JsonAnySetter + public CustomerOrgDisableResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CustomerOrgDisableResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomerOrgDisableResponse customerOrgDisableResponse = (CustomerOrgDisableResponse) o; + return Objects.equals(this.data, customerOrgDisableResponse.data) + && Objects.equals( + this.additionalProperties, customerOrgDisableResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomerOrgDisableResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CustomerOrgDisableResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CustomerOrgDisableResponseAttributes.java new file mode 100644 index 00000000000..d2d0f293fa4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CustomerOrgDisableResponseAttributes.java @@ -0,0 +1,151 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes describing the outcome of the disable action on the customer organization. */ +@JsonPropertyOrder({CustomerOrgDisableResponseAttributes.JSON_PROPERTY_STATUS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CustomerOrgDisableResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_STATUS = "status"; + private CustomerOrgDisableStatus status; + + public CustomerOrgDisableResponseAttributes() {} + + @JsonCreator + public CustomerOrgDisableResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) + CustomerOrgDisableStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + } + + public CustomerOrgDisableResponseAttributes status(CustomerOrgDisableStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * Resulting lifecycle status of the organization after the disable action. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CustomerOrgDisableStatus getStatus() { + return status; + } + + public void setStatus(CustomerOrgDisableStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CustomerOrgDisableResponseAttributes + */ + @JsonAnySetter + public CustomerOrgDisableResponseAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CustomerOrgDisableResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomerOrgDisableResponseAttributes customerOrgDisableResponseAttributes = + (CustomerOrgDisableResponseAttributes) o; + return Objects.equals(this.status, customerOrgDisableResponseAttributes.status) + && Objects.equals( + this.additionalProperties, customerOrgDisableResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomerOrgDisableResponseAttributes {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CustomerOrgDisableResponseData.java b/src/main/java/com/datadog/api/client/v2/model/CustomerOrgDisableResponseData.java new file mode 100644 index 00000000000..05dc80d05ec --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CustomerOrgDisableResponseData.java @@ -0,0 +1,213 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object returned after disabling the customer organization. */ +@JsonPropertyOrder({ + CustomerOrgDisableResponseData.JSON_PROPERTY_ATTRIBUTES, + CustomerOrgDisableResponseData.JSON_PROPERTY_ID, + CustomerOrgDisableResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CustomerOrgDisableResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private CustomerOrgDisableResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private CustomerOrgDisableResponseType type; + + public CustomerOrgDisableResponseData() {} + + @JsonCreator + public CustomerOrgDisableResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + CustomerOrgDisableResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + CustomerOrgDisableResponseType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public CustomerOrgDisableResponseData attributes( + CustomerOrgDisableResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes describing the outcome of the disable action on the customer organization. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CustomerOrgDisableResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(CustomerOrgDisableResponseAttributes attributes) { + this.attributes = attributes; + } + + public CustomerOrgDisableResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Identifier of the disabled organization. + * + * @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 CustomerOrgDisableResponseData type(CustomerOrgDisableResponseType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * JSON:API resource type for a customer org disable response. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public CustomerOrgDisableResponseType getType() { + return type; + } + + public void setType(CustomerOrgDisableResponseType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CustomerOrgDisableResponseData + */ + @JsonAnySetter + public CustomerOrgDisableResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CustomerOrgDisableResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CustomerOrgDisableResponseData customerOrgDisableResponseData = + (CustomerOrgDisableResponseData) o; + return Objects.equals(this.attributes, customerOrgDisableResponseData.attributes) + && Objects.equals(this.id, customerOrgDisableResponseData.id) + && Objects.equals(this.type, customerOrgDisableResponseData.type) + && Objects.equals( + this.additionalProperties, customerOrgDisableResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CustomerOrgDisableResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CustomerOrgDisableResponseType.java b/src/main/java/com/datadog/api/client/v2/model/CustomerOrgDisableResponseType.java new file mode 100644 index 00000000000..2cc0611f2ab --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CustomerOrgDisableResponseType.java @@ -0,0 +1,58 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** JSON:API resource type for a customer org disable response. */ +@JsonSerialize( + using = CustomerOrgDisableResponseType.CustomerOrgDisableResponseTypeSerializer.class) +public class CustomerOrgDisableResponseType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("org_disable")); + + public static final CustomerOrgDisableResponseType ORG_DISABLE = + new CustomerOrgDisableResponseType("org_disable"); + + CustomerOrgDisableResponseType(String value) { + super(value, allowedValues); + } + + public static class CustomerOrgDisableResponseTypeSerializer + extends StdSerializer { + public CustomerOrgDisableResponseTypeSerializer(Class t) { + super(t); + } + + public CustomerOrgDisableResponseTypeSerializer() { + this(null); + } + + @Override + public void serialize( + CustomerOrgDisableResponseType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static CustomerOrgDisableResponseType fromValue(String value) { + return new CustomerOrgDisableResponseType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CustomerOrgDisableStatus.java b/src/main/java/com/datadog/api/client/v2/model/CustomerOrgDisableStatus.java new file mode 100644 index 00000000000..c5418f569d5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CustomerOrgDisableStatus.java @@ -0,0 +1,58 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Resulting lifecycle status of the organization after the disable action. */ +@JsonSerialize(using = CustomerOrgDisableStatus.CustomerOrgDisableStatusSerializer.class) +public class CustomerOrgDisableStatus extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("disabled", "pending_disable")); + + public static final CustomerOrgDisableStatus DISABLED = new CustomerOrgDisableStatus("disabled"); + public static final CustomerOrgDisableStatus PENDING_DISABLE = + new CustomerOrgDisableStatus("pending_disable"); + + CustomerOrgDisableStatus(String value) { + super(value, allowedValues); + } + + public static class CustomerOrgDisableStatusSerializer + extends StdSerializer { + public CustomerOrgDisableStatusSerializer(Class t) { + super(t); + } + + public CustomerOrgDisableStatusSerializer() { + this(null); + } + + @Override + public void serialize( + CustomerOrgDisableStatus value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static CustomerOrgDisableStatus fromValue(String value) { + return new CustomerOrgDisableStatus(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CustomerOrgDisableType.java b/src/main/java/com/datadog/api/client/v2/model/CustomerOrgDisableType.java new file mode 100644 index 00000000000..94377d0eede --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CustomerOrgDisableType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** JSON:API resource type for a customer org disable request. */ +@JsonSerialize(using = CustomerOrgDisableType.CustomerOrgDisableTypeSerializer.class) +public class CustomerOrgDisableType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("customer_org_disable")); + + public static final CustomerOrgDisableType CUSTOMER_ORG_DISABLE = + new CustomerOrgDisableType("customer_org_disable"); + + CustomerOrgDisableType(String value) { + super(value, allowedValues); + } + + public static class CustomerOrgDisableTypeSerializer + extends StdSerializer { + public CustomerOrgDisableTypeSerializer(Class t) { + super(t); + } + + public CustomerOrgDisableTypeSerializer() { + this(null); + } + + @Override + public void serialize( + CustomerOrgDisableType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static CustomerOrgDisableType fromValue(String value) { + return new CustomerOrgDisableType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DataObservabilityMonitorRunStatus.java b/src/main/java/com/datadog/api/client/v2/model/DataObservabilityMonitorRunStatus.java new file mode 100644 index 00000000000..f4a33fd40db --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DataObservabilityMonitorRunStatus.java @@ -0,0 +1,66 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The status of a data observability monitor run. */ +@JsonSerialize( + using = DataObservabilityMonitorRunStatus.DataObservabilityMonitorRunStatusSerializer.class) +public class DataObservabilityMonitorRunStatus extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("pending", "ok", "warn", "alert", "error")); + + public static final DataObservabilityMonitorRunStatus PENDING = + new DataObservabilityMonitorRunStatus("pending"); + public static final DataObservabilityMonitorRunStatus OK = + new DataObservabilityMonitorRunStatus("ok"); + public static final DataObservabilityMonitorRunStatus WARN = + new DataObservabilityMonitorRunStatus("warn"); + public static final DataObservabilityMonitorRunStatus ALERT = + new DataObservabilityMonitorRunStatus("alert"); + public static final DataObservabilityMonitorRunStatus ERROR = + new DataObservabilityMonitorRunStatus("error"); + + DataObservabilityMonitorRunStatus(String value) { + super(value, allowedValues); + } + + public static class DataObservabilityMonitorRunStatusSerializer + extends StdSerializer { + public DataObservabilityMonitorRunStatusSerializer(Class t) { + super(t); + } + + public DataObservabilityMonitorRunStatusSerializer() { + this(null); + } + + @Override + public void serialize( + DataObservabilityMonitorRunStatus value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static DataObservabilityMonitorRunStatus fromValue(String value) { + return new DataObservabilityMonitorRunStatus(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DataObservabilityMonitorRunType.java b/src/main/java/com/datadog/api/client/v2/model/DataObservabilityMonitorRunType.java new file mode 100644 index 00000000000..a7680ec1e4d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DataObservabilityMonitorRunType.java @@ -0,0 +1,58 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The JSON:API resource type for a data observability monitor run. */ +@JsonSerialize( + using = DataObservabilityMonitorRunType.DataObservabilityMonitorRunTypeSerializer.class) +public class DataObservabilityMonitorRunType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("monitor_run")); + + public static final DataObservabilityMonitorRunType MONITOR_RUN = + new DataObservabilityMonitorRunType("monitor_run"); + + DataObservabilityMonitorRunType(String value) { + super(value, allowedValues); + } + + public static class DataObservabilityMonitorRunTypeSerializer + extends StdSerializer { + public DataObservabilityMonitorRunTypeSerializer(Class t) { + super(t); + } + + public DataObservabilityMonitorRunTypeSerializer() { + this(null); + } + + @Override + public void serialize( + DataObservabilityMonitorRunType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static DataObservabilityMonitorRunType fromValue(String value) { + return new DataObservabilityMonitorRunType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DeleteFormData.java b/src/main/java/com/datadog/api/client/v2/model/DeleteFormData.java new file mode 100644 index 00000000000..fb0ad8b113f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DeleteFormData.java @@ -0,0 +1,176 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** The data returned when a form is deleted. */ +@JsonPropertyOrder({DeleteFormData.JSON_PROPERTY_ID, DeleteFormData.JSON_PROPERTY_TYPE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DeleteFormData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private FormType type = FormType.FORMS; + + public DeleteFormData() {} + + @JsonCreator + public DeleteFormData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) FormType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public DeleteFormData id(UUID id) { + this.id = id; + return this; + } + + /** + * The ID of the deleted form. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public DeleteFormData type(FormType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type for a form. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FormType getType() { + return type; + } + + public void setType(FormType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DeleteFormData + */ + @JsonAnySetter + public DeleteFormData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DeleteFormData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteFormData deleteFormData = (DeleteFormData) o; + return Objects.equals(this.id, deleteFormData.id) + && Objects.equals(this.type, deleteFormData.type) + && Objects.equals(this.additionalProperties, deleteFormData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteFormData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DeleteFormResponse.java b/src/main/java/com/datadog/api/client/v2/model/DeleteFormResponse.java new file mode 100644 index 00000000000..889bce44d6d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DeleteFormResponse.java @@ -0,0 +1,136 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A response returned after deleting a form. */ +@JsonPropertyOrder({DeleteFormResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DeleteFormResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private DeleteFormData data; + + public DeleteFormResponse data(DeleteFormData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data returned when a form is deleted. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DeleteFormData getData() { + return data; + } + + public void setData(DeleteFormData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DeleteFormResponse + */ + @JsonAnySetter + public DeleteFormResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DeleteFormResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteFormResponse deleteFormResponse = (DeleteFormResponse) o; + return Objects.equals(this.data, deleteFormResponse.data) + && Objects.equals(this.additionalProperties, deleteFormResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteFormResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ELFSourcemapAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ELFSourcemapAttributes.java new file mode 100644 index 00000000000..cb52ef408e3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ELFSourcemapAttributes.java @@ -0,0 +1,430 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of an ELF symbol file. */ +@JsonPropertyOrder({ + ELFSourcemapAttributes.JSON_PROPERTY_ARCH, + ELFSourcemapAttributes.JSON_PROPERTY_CREATED_AT, + ELFSourcemapAttributes.JSON_PROPERTY_FILE_HASH, + ELFSourcemapAttributes.JSON_PROPERTY_FILE_NAME, + ELFSourcemapAttributes.JSON_PROPERTY_GNU_BUILD_ID, + ELFSourcemapAttributes.JSON_PROPERTY_GO_BUILD_ID, + ELFSourcemapAttributes.JSON_PROPERTY_MAPKIND, + ELFSourcemapAttributes.JSON_PROPERTY_ORIGIN, + ELFSourcemapAttributes.JSON_PROPERTY_ORIGIN_VERSION, + ELFSourcemapAttributes.JSON_PROPERTY_SIZE, + ELFSourcemapAttributes.JSON_PROPERTY_SYMBOL_SOURCE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ELFSourcemapAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ARCH = "arch"; + private String arch; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_FILE_HASH = "file_hash"; + private String fileHash; + + public static final String JSON_PROPERTY_FILE_NAME = "file_name"; + private String fileName; + + public static final String JSON_PROPERTY_GNU_BUILD_ID = "gnu_build_id"; + private String gnuBuildId; + + public static final String JSON_PROPERTY_GO_BUILD_ID = "go_build_id"; + private String goBuildId; + + public static final String JSON_PROPERTY_MAPKIND = "mapkind"; + private String mapkind; + + public static final String JSON_PROPERTY_ORIGIN = "origin"; + private String origin; + + public static final String JSON_PROPERTY_ORIGIN_VERSION = "origin_version"; + private String originVersion; + + public static final String JSON_PROPERTY_SIZE = "size"; + private Long size; + + public static final String JSON_PROPERTY_SYMBOL_SOURCE = "symbol_source"; + private String symbolSource; + + public ELFSourcemapAttributes() {} + + @JsonCreator + public ELFSourcemapAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_MAPKIND) String mapkind, + @JsonProperty(required = true, value = JSON_PROPERTY_SIZE) Long size) { + this.createdAt = createdAt; + this.mapkind = mapkind; + this.size = size; + } + + public ELFSourcemapAttributes arch(String arch) { + this.arch = arch; + return this; + } + + /** + * The target CPU architecture. + * + * @return arch + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARCH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getArch() { + return arch; + } + + public void setArch(String arch) { + this.arch = arch; + } + + public ELFSourcemapAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The timestamp when the symbol file was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public ELFSourcemapAttributes fileHash(String fileHash) { + this.fileHash = fileHash; + return this; + } + + /** + * The SHA256 hash of the ELF file. + * + * @return fileHash + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILE_HASH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFileHash() { + return fileHash; + } + + public void setFileHash(String fileHash) { + this.fileHash = fileHash; + } + + public ELFSourcemapAttributes fileName(String fileName) { + this.fileName = fileName; + return this; + } + + /** + * The ELF file name. + * + * @return fileName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public ELFSourcemapAttributes gnuBuildId(String gnuBuildId) { + this.gnuBuildId = gnuBuildId; + return this; + } + + /** + * The GNU build ID (UUID format). + * + * @return gnuBuildId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GNU_BUILD_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getGnuBuildId() { + return gnuBuildId; + } + + public void setGnuBuildId(String gnuBuildId) { + this.gnuBuildId = gnuBuildId; + } + + public ELFSourcemapAttributes goBuildId(String goBuildId) { + this.goBuildId = goBuildId; + return this; + } + + /** + * The Go build ID (UUID format). + * + * @return goBuildId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GO_BUILD_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getGoBuildId() { + return goBuildId; + } + + public void setGoBuildId(String goBuildId) { + this.goBuildId = goBuildId; + } + + public ELFSourcemapAttributes mapkind(String mapkind) { + this.mapkind = mapkind; + return this; + } + + /** + * The type of source map. + * + * @return mapkind + */ + @JsonProperty(JSON_PROPERTY_MAPKIND) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMapkind() { + return mapkind; + } + + public void setMapkind(String mapkind) { + this.mapkind = mapkind; + } + + public ELFSourcemapAttributes origin(String origin) { + this.origin = origin; + return this; + } + + /** + * The origin of the ELF file. + * + * @return origin + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORIGIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOrigin() { + return origin; + } + + public void setOrigin(String origin) { + this.origin = origin; + } + + public ELFSourcemapAttributes originVersion(String originVersion) { + this.originVersion = originVersion; + return this; + } + + /** + * The version of the origin package. + * + * @return originVersion + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORIGIN_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOriginVersion() { + return originVersion; + } + + public void setOriginVersion(String originVersion) { + this.originVersion = originVersion; + } + + public ELFSourcemapAttributes size(Long size) { + this.size = size; + return this; + } + + /** + * The size of the ELF file in bytes. + * + * @return size + */ + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getSize() { + return size; + } + + public void setSize(Long size) { + this.size = size; + } + + public ELFSourcemapAttributes symbolSource(String symbolSource) { + this.symbolSource = symbolSource; + return this; + } + + /** + * The source of the debug symbols. + * + * @return symbolSource + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYMBOL_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSymbolSource() { + return symbolSource; + } + + public void setSymbolSource(String symbolSource) { + this.symbolSource = symbolSource; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ELFSourcemapAttributes + */ + @JsonAnySetter + public ELFSourcemapAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ELFSourcemapAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ELFSourcemapAttributes elfSourcemapAttributes = (ELFSourcemapAttributes) o; + return Objects.equals(this.arch, elfSourcemapAttributes.arch) + && Objects.equals(this.createdAt, elfSourcemapAttributes.createdAt) + && Objects.equals(this.fileHash, elfSourcemapAttributes.fileHash) + && Objects.equals(this.fileName, elfSourcemapAttributes.fileName) + && Objects.equals(this.gnuBuildId, elfSourcemapAttributes.gnuBuildId) + && Objects.equals(this.goBuildId, elfSourcemapAttributes.goBuildId) + && Objects.equals(this.mapkind, elfSourcemapAttributes.mapkind) + && Objects.equals(this.origin, elfSourcemapAttributes.origin) + && Objects.equals(this.originVersion, elfSourcemapAttributes.originVersion) + && Objects.equals(this.size, elfSourcemapAttributes.size) + && Objects.equals(this.symbolSource, elfSourcemapAttributes.symbolSource) + && Objects.equals(this.additionalProperties, elfSourcemapAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + arch, + createdAt, + fileHash, + fileName, + gnuBuildId, + goBuildId, + mapkind, + origin, + originVersion, + size, + symbolSource, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ELFSourcemapAttributes {\n"); + sb.append(" arch: ").append(toIndentedString(arch)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" fileHash: ").append(toIndentedString(fileHash)).append("\n"); + sb.append(" fileName: ").append(toIndentedString(fileName)).append("\n"); + sb.append(" gnuBuildId: ").append(toIndentedString(gnuBuildId)).append("\n"); + sb.append(" goBuildId: ").append(toIndentedString(goBuildId)).append("\n"); + sb.append(" mapkind: ").append(toIndentedString(mapkind)).append("\n"); + sb.append(" origin: ").append(toIndentedString(origin)).append("\n"); + sb.append(" originVersion: ").append(toIndentedString(originVersion)).append("\n"); + sb.append(" size: ").append(toIndentedString(size)).append("\n"); + sb.append(" symbolSource: ").append(toIndentedString(symbolSource)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetClustersResponseData.java b/src/main/java/com/datadog/api/client/v2/model/ELFSourcemapData.java similarity index 73% rename from src/main/java/com/datadog/api/client/v2/model/FleetClustersResponseData.java rename to src/main/java/com/datadog/api/client/v2/model/ELFSourcemapData.java index c30b86cc1eb..f048bbf4fec 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FleetClustersResponseData.java +++ b/src/main/java/com/datadog/api/client/v2/model/ELFSourcemapData.java @@ -17,67 +17,68 @@ import java.util.Map; import java.util.Objects; -/** The response data containing status and clusters array. */ +/** ELF symbol file data object. */ @JsonPropertyOrder({ - FleetClustersResponseData.JSON_PROPERTY_ATTRIBUTES, - FleetClustersResponseData.JSON_PROPERTY_ID, - FleetClustersResponseData.JSON_PROPERTY_TYPE + ELFSourcemapData.JSON_PROPERTY_ATTRIBUTES, + ELFSourcemapData.JSON_PROPERTY_ID, + ELFSourcemapData.JSON_PROPERTY_TYPE }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class FleetClustersResponseData { +public class ELFSourcemapData { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; - private FleetClustersResponseDataAttributes attributes; + private ELFSourcemapAttributes attributes; public static final String JSON_PROPERTY_ID = "id"; private String id; public static final String JSON_PROPERTY_TYPE = "type"; - private String type; + private SourcemapDataType type; - public FleetClustersResponseData() {} + public ELFSourcemapData() {} @JsonCreator - public FleetClustersResponseData( + public ELFSourcemapData( @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - FleetClustersResponseDataAttributes attributes, + ELFSourcemapAttributes attributes, @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) String type) { + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SourcemapDataType type) { this.attributes = attributes; this.unparsed |= attributes.unparsed; this.id = id; this.type = type; + this.unparsed |= !type.isValid(); } - public FleetClustersResponseData attributes(FleetClustersResponseDataAttributes attributes) { + public ELFSourcemapData attributes(ELFSourcemapAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Attributes of the fleet clusters response containing the list of clusters. + * Attributes of an ELF symbol file. * * @return attributes */ @JsonProperty(JSON_PROPERTY_ATTRIBUTES) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FleetClustersResponseDataAttributes getAttributes() { + public ELFSourcemapAttributes getAttributes() { return attributes; } - public void setAttributes(FleetClustersResponseDataAttributes attributes) { + public void setAttributes(ELFSourcemapAttributes attributes) { this.attributes = attributes; } - public FleetClustersResponseData id(String id) { + public ELFSourcemapData id(String id) { this.id = id; return this; } /** - * Status identifier. + * The unique identifier of the source map. * * @return id */ @@ -91,23 +92,27 @@ public void setId(String id) { this.id = id; } - public FleetClustersResponseData type(String type) { + public ELFSourcemapData type(SourcemapDataType type) { this.type = type; + this.unparsed |= !type.isValid(); return this; } /** - * Resource type. + * The resource type for source map objects. * * @return type */ @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { + public SourcemapDataType getType() { return type; } - public void setType(String type) { + public void setType(SourcemapDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } this.type = type; } @@ -123,10 +128,10 @@ public void setType(String type) { * * @param key The arbitrary key to set * @param value The associated value - * @return FleetClustersResponseData + * @return ELFSourcemapData */ @JsonAnySetter - public FleetClustersResponseData putAdditionalProperty(String key, Object value) { + public ELFSourcemapData putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -157,7 +162,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this FleetClustersResponseData object is equal to o. */ + /** Return true if this ELFSourcemapData object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -166,12 +171,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - FleetClustersResponseData fleetClustersResponseData = (FleetClustersResponseData) o; - return Objects.equals(this.attributes, fleetClustersResponseData.attributes) - && Objects.equals(this.id, fleetClustersResponseData.id) - && Objects.equals(this.type, fleetClustersResponseData.type) - && Objects.equals( - this.additionalProperties, fleetClustersResponseData.additionalProperties); + ELFSourcemapData elfSourcemapData = (ELFSourcemapData) o; + return Objects.equals(this.attributes, elfSourcemapData.attributes) + && Objects.equals(this.id, elfSourcemapData.id) + && Objects.equals(this.type, elfSourcemapData.type) + && Objects.equals(this.additionalProperties, elfSourcemapData.additionalProperties); } @Override @@ -182,7 +186,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class FleetClustersResponseData {\n"); + sb.append("class ELFSourcemapData {\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"); diff --git a/src/main/java/com/datadog/api/client/v2/model/FindingCaseResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FindingCaseResponseDataAttributes.java index 382e8c72168..69b175861dc 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FindingCaseResponseDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/FindingCaseResponseDataAttributes.java @@ -34,6 +34,7 @@ FindingCaseResponseDataAttributes.JSON_PROPERTY_KEY, FindingCaseResponseDataAttributes.JSON_PROPERTY_MODIFIED_AT, FindingCaseResponseDataAttributes.JSON_PROPERTY_PRIORITY, + FindingCaseResponseDataAttributes.JSON_PROPERTY_SERVICENOW_TICKET, FindingCaseResponseDataAttributes.JSON_PROPERTY_STATUS, FindingCaseResponseDataAttributes.JSON_PROPERTY_STATUS_GROUP, FindingCaseResponseDataAttributes.JSON_PROPERTY_STATUS_NAME, @@ -83,6 +84,9 @@ public class FindingCaseResponseDataAttributes { public static final String JSON_PROPERTY_PRIORITY = "priority"; private String priority; + public static final String JSON_PROPERTY_SERVICENOW_TICKET = "servicenow_ticket"; + private FindingServiceNowTicket servicenowTicket; + public static final String JSON_PROPERTY_STATUS = "status"; private String status; @@ -394,6 +398,29 @@ public void setPriority(String priority) { this.priority = priority; } + public FindingCaseResponseDataAttributes servicenowTicket( + FindingServiceNowTicket servicenowTicket) { + this.servicenowTicket = servicenowTicket; + this.unparsed |= servicenowTicket.unparsed; + return this; + } + + /** + * ServiceNow ticket associated with the case. + * + * @return servicenowTicket + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICENOW_TICKET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FindingServiceNowTicket getServicenowTicket() { + return servicenowTicket; + } + + public void setServicenowTicket(FindingServiceNowTicket servicenowTicket) { + this.servicenowTicket = servicenowTicket; + } + public FindingCaseResponseDataAttributes status(String status) { this.status = status; return this; @@ -569,6 +596,7 @@ public boolean equals(Object o) { && Objects.equals(this.key, findingCaseResponseDataAttributes.key) && Objects.equals(this.modifiedAt, findingCaseResponseDataAttributes.modifiedAt) && Objects.equals(this.priority, findingCaseResponseDataAttributes.priority) + && Objects.equals(this.servicenowTicket, findingCaseResponseDataAttributes.servicenowTicket) && Objects.equals(this.status, findingCaseResponseDataAttributes.status) && Objects.equals(this.statusGroup, findingCaseResponseDataAttributes.statusGroup) && Objects.equals(this.statusName, findingCaseResponseDataAttributes.statusName) @@ -594,6 +622,7 @@ public int hashCode() { key, modifiedAt, priority, + servicenowTicket, status, statusGroup, statusName, @@ -619,6 +648,7 @@ public String toString() { sb.append(" key: ").append(toIndentedString(key)).append("\n"); sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); + sb.append(" servicenowTicket: ").append(toIndentedString(servicenowTicket)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" statusGroup: ").append(toIndentedString(statusGroup)).append("\n"); sb.append(" statusName: ").append(toIndentedString(statusName)).append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/FindingServiceNowTicket.java b/src/main/java/com/datadog/api/client/v2/model/FindingServiceNowTicket.java new file mode 100644 index 00000000000..d87cebe2703 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FindingServiceNowTicket.java @@ -0,0 +1,166 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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; + +/** ServiceNow ticket associated with the case. */ +@JsonPropertyOrder({ + FindingServiceNowTicket.JSON_PROPERTY_RESULT, + FindingServiceNowTicket.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FindingServiceNowTicket { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_RESULT = "result"; + private FindingServiceNowTicketResult result; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public FindingServiceNowTicket result(FindingServiceNowTicketResult result) { + this.result = result; + this.unparsed |= result.unparsed; + return this; + } + + /** + * Result of the ServiceNow ticket creation or attachment. + * + * @return result + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FindingServiceNowTicketResult getResult() { + return result; + } + + public void setResult(FindingServiceNowTicketResult result) { + this.result = result; + } + + public FindingServiceNowTicket status(String status) { + this.status = status; + return this; + } + + /** + * Status of the ServiceNow ticket operation. Can be "COMPLETED" if successful, or "FAILED" if the + * operation failed. + * + * @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; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FindingServiceNowTicket + */ + @JsonAnySetter + public FindingServiceNowTicket putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FindingServiceNowTicket object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FindingServiceNowTicket findingServiceNowTicket = (FindingServiceNowTicket) o; + return Objects.equals(this.result, findingServiceNowTicket.result) + && Objects.equals(this.status, findingServiceNowTicket.status) + && Objects.equals(this.additionalProperties, findingServiceNowTicket.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(result, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FindingServiceNowTicket {\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FindingServiceNowTicketResult.java b/src/main/java/com/datadog/api/client/v2/model/FindingServiceNowTicketResult.java new file mode 100644 index 00000000000..483dbd066bb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FindingServiceNowTicketResult.java @@ -0,0 +1,274 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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; + +/** Result of the ServiceNow ticket creation or attachment. */ +@JsonPropertyOrder({ + FindingServiceNowTicketResult.JSON_PROPERTY_INSTANCE_NAME, + FindingServiceNowTicketResult.JSON_PROPERTY_SYS_ID, + FindingServiceNowTicketResult.JSON_PROPERTY_SYS_TARGET_LINK, + FindingServiceNowTicketResult.JSON_PROPERTY_SYS_TARGET_SYS_ID, + FindingServiceNowTicketResult.JSON_PROPERTY_TABLE_NAME, + FindingServiceNowTicketResult.JSON_PROPERTY_URL +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FindingServiceNowTicketResult { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INSTANCE_NAME = "instance_name"; + private String instanceName; + + public static final String JSON_PROPERTY_SYS_ID = "sys_id"; + private String sysId; + + public static final String JSON_PROPERTY_SYS_TARGET_LINK = "sys_target_link"; + private String sysTargetLink; + + public static final String JSON_PROPERTY_SYS_TARGET_SYS_ID = "sys_target_sys_id"; + private String sysTargetSysId; + + public static final String JSON_PROPERTY_TABLE_NAME = "table_name"; + private String tableName; + + public static final String JSON_PROPERTY_URL = "url"; + private String url; + + public FindingServiceNowTicketResult instanceName(String instanceName) { + this.instanceName = instanceName; + return this; + } + + /** + * ServiceNow instance name extracted from the ticket URL. + * + * @return instanceName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INSTANCE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getInstanceName() { + return instanceName; + } + + public void setInstanceName(String instanceName) { + this.instanceName = instanceName; + } + + public FindingServiceNowTicketResult sysId(String sysId) { + this.sysId = sysId; + return this; + } + + /** + * Unique identifier of the ServiceNow incident record. + * + * @return sysId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYS_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSysId() { + return sysId; + } + + public void setSysId(String sysId) { + this.sysId = sysId; + } + + public FindingServiceNowTicketResult sysTargetLink(String sysTargetLink) { + this.sysTargetLink = sysTargetLink; + return this; + } + + /** + * Direct link to the ServiceNow incident record. + * + * @return sysTargetLink + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYS_TARGET_LINK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSysTargetLink() { + return sysTargetLink; + } + + public void setSysTargetLink(String sysTargetLink) { + this.sysTargetLink = sysTargetLink; + } + + public FindingServiceNowTicketResult sysTargetSysId(String sysTargetSysId) { + this.sysTargetSysId = sysTargetSysId; + return this; + } + + /** + * Unique identifier of the target ServiceNow record. + * + * @return sysTargetSysId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SYS_TARGET_SYS_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSysTargetSysId() { + return sysTargetSysId; + } + + public void setSysTargetSysId(String sysTargetSysId) { + this.sysTargetSysId = sysTargetSysId; + } + + public FindingServiceNowTicketResult tableName(String tableName) { + this.tableName = tableName; + return this; + } + + /** + * ServiceNow table containing the incident record. + * + * @return tableName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TABLE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTableName() { + return tableName; + } + + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public FindingServiceNowTicketResult url(String url) { + this.url = url; + return this; + } + + /** + * URL of the ServiceNow incident record. + * + * @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; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FindingServiceNowTicketResult + */ + @JsonAnySetter + public FindingServiceNowTicketResult putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FindingServiceNowTicketResult object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FindingServiceNowTicketResult findingServiceNowTicketResult = (FindingServiceNowTicketResult) o; + return Objects.equals(this.instanceName, findingServiceNowTicketResult.instanceName) + && Objects.equals(this.sysId, findingServiceNowTicketResult.sysId) + && Objects.equals(this.sysTargetLink, findingServiceNowTicketResult.sysTargetLink) + && Objects.equals(this.sysTargetSysId, findingServiceNowTicketResult.sysTargetSysId) + && Objects.equals(this.tableName, findingServiceNowTicketResult.tableName) + && Objects.equals(this.url, findingServiceNowTicketResult.url) + && Objects.equals( + this.additionalProperties, findingServiceNowTicketResult.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + instanceName, sysId, sysTargetLink, sysTargetSysId, tableName, url, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FindingServiceNowTicketResult {\n"); + sb.append(" instanceName: ").append(toIndentedString(instanceName)).append("\n"); + sb.append(" sysId: ").append(toIndentedString(sysId)).append("\n"); + sb.append(" sysTargetLink: ").append(toIndentedString(sysTargetLink)).append("\n"); + sb.append(" sysTargetSysId: ").append(toIndentedString(sysTargetSysId)).append("\n"); + sb.append(" tableName: ").append(toIndentedString(tableName)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetClusterAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FleetClusterAttributes.java deleted file mode 100644 index f02a291553a..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/FleetClusterAttributes.java +++ /dev/null @@ -1,701 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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; - -/** Attributes of a Kubernetes cluster in the fleet. */ -@JsonPropertyOrder({ - FleetClusterAttributes.JSON_PROPERTY_AGENT_VERSIONS, - FleetClusterAttributes.JSON_PROPERTY_API_KEY_NAMES, - FleetClusterAttributes.JSON_PROPERTY_API_KEY_UUIDS, - FleetClusterAttributes.JSON_PROPERTY_CLOUD_PROVIDERS, - FleetClusterAttributes.JSON_PROPERTY_CLUSTER_NAME, - FleetClusterAttributes.JSON_PROPERTY_ENABLED_PRODUCTS, - FleetClusterAttributes.JSON_PROPERTY_ENVS, - FleetClusterAttributes.JSON_PROPERTY_FIRST_SEEN_AT, - FleetClusterAttributes.JSON_PROPERTY_INSTALL_METHOD_TOOL, - FleetClusterAttributes.JSON_PROPERTY_NODE_COUNT, - FleetClusterAttributes.JSON_PROPERTY_NODE_COUNT_BY_STATUS, - FleetClusterAttributes.JSON_PROPERTY_OPERATING_SYSTEMS, - FleetClusterAttributes.JSON_PROPERTY_OTEL_COLLECTOR_DISTRIBUTIONS, - FleetClusterAttributes.JSON_PROPERTY_OTEL_COLLECTOR_VERSIONS, - FleetClusterAttributes.JSON_PROPERTY_POD_COUNT_BY_STATE, - FleetClusterAttributes.JSON_PROPERTY_SERVICES, - FleetClusterAttributes.JSON_PROPERTY_TEAMS -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class FleetClusterAttributes { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_AGENT_VERSIONS = "agent_versions"; - private List agentVersions = null; - - public static final String JSON_PROPERTY_API_KEY_NAMES = "api_key_names"; - private List apiKeyNames = null; - - public static final String JSON_PROPERTY_API_KEY_UUIDS = "api_key_uuids"; - private List apiKeyUuids = null; - - public static final String JSON_PROPERTY_CLOUD_PROVIDERS = "cloud_providers"; - private List cloudProviders = null; - - public static final String JSON_PROPERTY_CLUSTER_NAME = "cluster_name"; - private String clusterName; - - public static final String JSON_PROPERTY_ENABLED_PRODUCTS = "enabled_products"; - private List enabledProducts = null; - - public static final String JSON_PROPERTY_ENVS = "envs"; - private List envs = null; - - public static final String JSON_PROPERTY_FIRST_SEEN_AT = "first_seen_at"; - private Long firstSeenAt; - - public static final String JSON_PROPERTY_INSTALL_METHOD_TOOL = "install_method_tool"; - private String installMethodTool; - - public static final String JSON_PROPERTY_NODE_COUNT = "node_count"; - private Long nodeCount; - - public static final String JSON_PROPERTY_NODE_COUNT_BY_STATUS = "node_count_by_status"; - private Map nodeCountByStatus = null; - - public static final String JSON_PROPERTY_OPERATING_SYSTEMS = "operating_systems"; - private List operatingSystems = null; - - public static final String JSON_PROPERTY_OTEL_COLLECTOR_DISTRIBUTIONS = - "otel_collector_distributions"; - private List otelCollectorDistributions = null; - - public static final String JSON_PROPERTY_OTEL_COLLECTOR_VERSIONS = "otel_collector_versions"; - private List otelCollectorVersions = null; - - public static final String JSON_PROPERTY_POD_COUNT_BY_STATE = "pod_count_by_state"; - private Map podCountByState = null; - - public static final String JSON_PROPERTY_SERVICES = "services"; - private List services = null; - - public static final String JSON_PROPERTY_TEAMS = "teams"; - private List teams = null; - - public FleetClusterAttributes agentVersions(List agentVersions) { - this.agentVersions = agentVersions; - return this; - } - - public FleetClusterAttributes addAgentVersionsItem(String agentVersionsItem) { - if (this.agentVersions == null) { - this.agentVersions = new ArrayList<>(); - } - this.agentVersions.add(agentVersionsItem); - return this; - } - - /** - * Datadog Agent versions running in the cluster. - * - * @return agentVersions - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_AGENT_VERSIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getAgentVersions() { - return agentVersions; - } - - public void setAgentVersions(List agentVersions) { - this.agentVersions = agentVersions; - } - - public FleetClusterAttributes apiKeyNames(List apiKeyNames) { - this.apiKeyNames = apiKeyNames; - return this; - } - - public FleetClusterAttributes addApiKeyNamesItem(String apiKeyNamesItem) { - if (this.apiKeyNames == null) { - this.apiKeyNames = new ArrayList<>(); - } - this.apiKeyNames.add(apiKeyNamesItem); - return this; - } - - /** - * API key names used by agents in the cluster. - * - * @return apiKeyNames - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_API_KEY_NAMES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getApiKeyNames() { - return apiKeyNames; - } - - public void setApiKeyNames(List apiKeyNames) { - this.apiKeyNames = apiKeyNames; - } - - public FleetClusterAttributes apiKeyUuids(List apiKeyUuids) { - this.apiKeyUuids = apiKeyUuids; - return this; - } - - public FleetClusterAttributes addApiKeyUuidsItem(String apiKeyUuidsItem) { - if (this.apiKeyUuids == null) { - this.apiKeyUuids = new ArrayList<>(); - } - this.apiKeyUuids.add(apiKeyUuidsItem); - return this; - } - - /** - * API key UUIDs used by agents in the cluster. - * - * @return apiKeyUuids - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_API_KEY_UUIDS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getApiKeyUuids() { - return apiKeyUuids; - } - - public void setApiKeyUuids(List apiKeyUuids) { - this.apiKeyUuids = apiKeyUuids; - } - - public FleetClusterAttributes cloudProviders(List cloudProviders) { - this.cloudProviders = cloudProviders; - return this; - } - - public FleetClusterAttributes addCloudProvidersItem(String cloudProvidersItem) { - if (this.cloudProviders == null) { - this.cloudProviders = new ArrayList<>(); - } - this.cloudProviders.add(cloudProvidersItem); - return this; - } - - /** - * Cloud providers hosting the cluster. - * - * @return cloudProviders - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CLOUD_PROVIDERS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getCloudProviders() { - return cloudProviders; - } - - public void setCloudProviders(List cloudProviders) { - this.cloudProviders = cloudProviders; - } - - public FleetClusterAttributes clusterName(String clusterName) { - this.clusterName = clusterName; - return this; - } - - /** - * The name of the Kubernetes cluster. - * - * @return clusterName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CLUSTER_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getClusterName() { - return clusterName; - } - - public void setClusterName(String clusterName) { - this.clusterName = clusterName; - } - - public FleetClusterAttributes enabledProducts(List enabledProducts) { - this.enabledProducts = enabledProducts; - return this; - } - - public FleetClusterAttributes addEnabledProductsItem(String enabledProductsItem) { - if (this.enabledProducts == null) { - this.enabledProducts = new ArrayList<>(); - } - this.enabledProducts.add(enabledProductsItem); - return this; - } - - /** - * Datadog products enabled in the cluster. - * - * @return enabledProducts - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ENABLED_PRODUCTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getEnabledProducts() { - return enabledProducts; - } - - public void setEnabledProducts(List enabledProducts) { - this.enabledProducts = enabledProducts; - } - - public FleetClusterAttributes envs(List envs) { - this.envs = envs; - return this; - } - - public FleetClusterAttributes addEnvsItem(String envsItem) { - if (this.envs == null) { - this.envs = new ArrayList<>(); - } - this.envs.add(envsItem); - return this; - } - - /** - * Environments associated with the cluster. - * - * @return envs - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ENVS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getEnvs() { - return envs; - } - - public void setEnvs(List envs) { - this.envs = envs; - } - - public FleetClusterAttributes firstSeenAt(Long firstSeenAt) { - this.firstSeenAt = firstSeenAt; - return this; - } - - /** - * Timestamp when the cluster was first seen. - * - * @return firstSeenAt - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FIRST_SEEN_AT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getFirstSeenAt() { - return firstSeenAt; - } - - public void setFirstSeenAt(Long firstSeenAt) { - this.firstSeenAt = firstSeenAt; - } - - public FleetClusterAttributes installMethodTool(String installMethodTool) { - this.installMethodTool = installMethodTool; - return this; - } - - /** - * The tool used to install agents in the cluster. - * - * @return installMethodTool - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INSTALL_METHOD_TOOL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getInstallMethodTool() { - return installMethodTool; - } - - public void setInstallMethodTool(String installMethodTool) { - this.installMethodTool = installMethodTool; - } - - public FleetClusterAttributes nodeCount(Long nodeCount) { - this.nodeCount = nodeCount; - return this; - } - - /** - * Total number of nodes in the cluster. - * - * @return nodeCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NODE_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getNodeCount() { - return nodeCount; - } - - public void setNodeCount(Long nodeCount) { - this.nodeCount = nodeCount; - } - - public FleetClusterAttributes nodeCountByStatus(Map nodeCountByStatus) { - this.nodeCountByStatus = nodeCountByStatus; - return this; - } - - public FleetClusterAttributes putNodeCountByStatusItem(String key, Long nodeCountByStatusItem) { - if (this.nodeCountByStatus == null) { - this.nodeCountByStatus = new HashMap<>(); - } - this.nodeCountByStatus.put(key, nodeCountByStatusItem); - return this; - } - - /** - * Node counts grouped by status. - * - * @return nodeCountByStatus - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NODE_COUNT_BY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getNodeCountByStatus() { - return nodeCountByStatus; - } - - public void setNodeCountByStatus(Map nodeCountByStatus) { - this.nodeCountByStatus = nodeCountByStatus; - } - - public FleetClusterAttributes operatingSystems(List operatingSystems) { - this.operatingSystems = operatingSystems; - return this; - } - - public FleetClusterAttributes addOperatingSystemsItem(String operatingSystemsItem) { - if (this.operatingSystems == null) { - this.operatingSystems = new ArrayList<>(); - } - this.operatingSystems.add(operatingSystemsItem); - return this; - } - - /** - * Operating systems of nodes in the cluster. - * - * @return operatingSystems - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OPERATING_SYSTEMS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getOperatingSystems() { - return operatingSystems; - } - - public void setOperatingSystems(List operatingSystems) { - this.operatingSystems = operatingSystems; - } - - public FleetClusterAttributes otelCollectorDistributions( - List otelCollectorDistributions) { - this.otelCollectorDistributions = otelCollectorDistributions; - return this; - } - - public FleetClusterAttributes addOtelCollectorDistributionsItem( - String otelCollectorDistributionsItem) { - if (this.otelCollectorDistributions == null) { - this.otelCollectorDistributions = new ArrayList<>(); - } - this.otelCollectorDistributions.add(otelCollectorDistributionsItem); - return this; - } - - /** - * OpenTelemetry collector distributions in the cluster. - * - * @return otelCollectorDistributions - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OTEL_COLLECTOR_DISTRIBUTIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getOtelCollectorDistributions() { - return otelCollectorDistributions; - } - - public void setOtelCollectorDistributions(List otelCollectorDistributions) { - this.otelCollectorDistributions = otelCollectorDistributions; - } - - public FleetClusterAttributes otelCollectorVersions(List otelCollectorVersions) { - this.otelCollectorVersions = otelCollectorVersions; - return this; - } - - public FleetClusterAttributes addOtelCollectorVersionsItem(String otelCollectorVersionsItem) { - if (this.otelCollectorVersions == null) { - this.otelCollectorVersions = new ArrayList<>(); - } - this.otelCollectorVersions.add(otelCollectorVersionsItem); - return this; - } - - /** - * OpenTelemetry collector versions in the cluster. - * - * @return otelCollectorVersions - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OTEL_COLLECTOR_VERSIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getOtelCollectorVersions() { - return otelCollectorVersions; - } - - public void setOtelCollectorVersions(List otelCollectorVersions) { - this.otelCollectorVersions = otelCollectorVersions; - } - - public FleetClusterAttributes podCountByState(Map podCountByState) { - this.podCountByState = podCountByState; - return this; - } - - public FleetClusterAttributes putPodCountByStateItem(String key, Long podCountByStateItem) { - if (this.podCountByState == null) { - this.podCountByState = new HashMap<>(); - } - this.podCountByState.put(key, podCountByStateItem); - return this; - } - - /** - * Pod counts grouped by state. - * - * @return podCountByState - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_POD_COUNT_BY_STATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getPodCountByState() { - return podCountByState; - } - - public void setPodCountByState(Map podCountByState) { - this.podCountByState = podCountByState; - } - - public FleetClusterAttributes services(List services) { - this.services = services; - return this; - } - - public FleetClusterAttributes addServicesItem(String servicesItem) { - if (this.services == null) { - this.services = new ArrayList<>(); - } - this.services.add(servicesItem); - return this; - } - - /** - * Services running in the cluster. - * - * @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; - } - - public FleetClusterAttributes teams(List teams) { - this.teams = teams; - return this; - } - - public FleetClusterAttributes addTeamsItem(String teamsItem) { - if (this.teams == null) { - this.teams = new ArrayList<>(); - } - this.teams.add(teamsItem); - return this; - } - - /** - * Teams associated with the cluster. - * - * @return teams - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TEAMS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getTeams() { - return teams; - } - - public void setTeams(List teams) { - this.teams = teams; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return FleetClusterAttributes - */ - @JsonAnySetter - public FleetClusterAttributes putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return The additional properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key The arbitrary key to get - * @return The specific additional property for the given key - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - /** Return true if this FleetClusterAttributes object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FleetClusterAttributes fleetClusterAttributes = (FleetClusterAttributes) o; - return Objects.equals(this.agentVersions, fleetClusterAttributes.agentVersions) - && Objects.equals(this.apiKeyNames, fleetClusterAttributes.apiKeyNames) - && Objects.equals(this.apiKeyUuids, fleetClusterAttributes.apiKeyUuids) - && Objects.equals(this.cloudProviders, fleetClusterAttributes.cloudProviders) - && Objects.equals(this.clusterName, fleetClusterAttributes.clusterName) - && Objects.equals(this.enabledProducts, fleetClusterAttributes.enabledProducts) - && Objects.equals(this.envs, fleetClusterAttributes.envs) - && Objects.equals(this.firstSeenAt, fleetClusterAttributes.firstSeenAt) - && Objects.equals(this.installMethodTool, fleetClusterAttributes.installMethodTool) - && Objects.equals(this.nodeCount, fleetClusterAttributes.nodeCount) - && Objects.equals(this.nodeCountByStatus, fleetClusterAttributes.nodeCountByStatus) - && Objects.equals(this.operatingSystems, fleetClusterAttributes.operatingSystems) - && Objects.equals( - this.otelCollectorDistributions, fleetClusterAttributes.otelCollectorDistributions) - && Objects.equals(this.otelCollectorVersions, fleetClusterAttributes.otelCollectorVersions) - && Objects.equals(this.podCountByState, fleetClusterAttributes.podCountByState) - && Objects.equals(this.services, fleetClusterAttributes.services) - && Objects.equals(this.teams, fleetClusterAttributes.teams) - && Objects.equals(this.additionalProperties, fleetClusterAttributes.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash( - agentVersions, - apiKeyNames, - apiKeyUuids, - cloudProviders, - clusterName, - enabledProducts, - envs, - firstSeenAt, - installMethodTool, - nodeCount, - nodeCountByStatus, - operatingSystems, - otelCollectorDistributions, - otelCollectorVersions, - podCountByState, - services, - teams, - additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FleetClusterAttributes {\n"); - sb.append(" agentVersions: ").append(toIndentedString(agentVersions)).append("\n"); - sb.append(" apiKeyNames: ").append(toIndentedString(apiKeyNames)).append("\n"); - sb.append(" apiKeyUuids: ").append(toIndentedString(apiKeyUuids)).append("\n"); - sb.append(" cloudProviders: ").append(toIndentedString(cloudProviders)).append("\n"); - sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); - sb.append(" enabledProducts: ").append(toIndentedString(enabledProducts)).append("\n"); - sb.append(" envs: ").append(toIndentedString(envs)).append("\n"); - sb.append(" firstSeenAt: ").append(toIndentedString(firstSeenAt)).append("\n"); - sb.append(" installMethodTool: ").append(toIndentedString(installMethodTool)).append("\n"); - sb.append(" nodeCount: ").append(toIndentedString(nodeCount)).append("\n"); - sb.append(" nodeCountByStatus: ").append(toIndentedString(nodeCountByStatus)).append("\n"); - sb.append(" operatingSystems: ").append(toIndentedString(operatingSystems)).append("\n"); - sb.append(" otelCollectorDistributions: ") - .append(toIndentedString(otelCollectorDistributions)) - .append("\n"); - sb.append(" otelCollectorVersions: ") - .append(toIndentedString(otelCollectorVersions)) - .append("\n"); - sb.append(" podCountByState: ").append(toIndentedString(podCountByState)).append("\n"); - sb.append(" services: ").append(toIndentedString(services)).append("\n"); - sb.append(" teams: ").append(toIndentedString(teams)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetInstrumentedPodGroupAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FleetInstrumentedPodGroupAttributes.java deleted file mode 100644 index d60635b7568..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/FleetInstrumentedPodGroupAttributes.java +++ /dev/null @@ -1,445 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import 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; - -/** Attributes of a group of instrumented pods targeted for SSI injection. */ -@JsonPropertyOrder({ - FleetInstrumentedPodGroupAttributes.JSON_PROPERTY_APPLIED_TARGET, - FleetInstrumentedPodGroupAttributes.JSON_PROPERTY_APPLIED_TARGET_NAME, - FleetInstrumentedPodGroupAttributes.JSON_PROPERTY_INJECTED_TAGS, - FleetInstrumentedPodGroupAttributes.JSON_PROPERTY_KUBE_OWNERREF_KIND, - FleetInstrumentedPodGroupAttributes.JSON_PROPERTY_KUBE_OWNERREF_NAME, - FleetInstrumentedPodGroupAttributes.JSON_PROPERTY_LIB_INJECTION_ANNOTATIONS, - FleetInstrumentedPodGroupAttributes.JSON_PROPERTY_NAMESPACE, - FleetInstrumentedPodGroupAttributes.JSON_PROPERTY_POD_COUNT, - FleetInstrumentedPodGroupAttributes.JSON_PROPERTY_POD_NAMES, - FleetInstrumentedPodGroupAttributes.JSON_PROPERTY_TAGS -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class FleetInstrumentedPodGroupAttributes { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_APPLIED_TARGET = "applied_target"; - private Map appliedTarget = null; - - public static final String JSON_PROPERTY_APPLIED_TARGET_NAME = "applied_target_name"; - private String appliedTargetName; - - public static final String JSON_PROPERTY_INJECTED_TAGS = "injected_tags"; - private List injectedTags = null; - - public static final String JSON_PROPERTY_KUBE_OWNERREF_KIND = "kube_ownerref_kind"; - private String kubeOwnerrefKind; - - public static final String JSON_PROPERTY_KUBE_OWNERREF_NAME = "kube_ownerref_name"; - private String kubeOwnerrefName; - - public static final String JSON_PROPERTY_LIB_INJECTION_ANNOTATIONS = "lib_injection_annotations"; - private List libInjectionAnnotations = null; - - public static final String JSON_PROPERTY_NAMESPACE = "namespace"; - private String namespace; - - public static final String JSON_PROPERTY_POD_COUNT = "pod_count"; - private Long podCount; - - public static final String JSON_PROPERTY_POD_NAMES = "pod_names"; - private List podNames = null; - - public static final String JSON_PROPERTY_TAGS = "tags"; - private Map tags = null; - - public FleetInstrumentedPodGroupAttributes appliedTarget(Map appliedTarget) { - this.appliedTarget = appliedTarget; - return this; - } - - public FleetInstrumentedPodGroupAttributes putAppliedTargetItem( - String key, Object appliedTargetItem) { - if (this.appliedTarget == null) { - this.appliedTarget = new HashMap<>(); - } - this.appliedTarget.put(key, appliedTargetItem); - return this; - } - - /** - * The SSI injection target configuration applied to the pod group. - * - * @return appliedTarget - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APPLIED_TARGET) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getAppliedTarget() { - return appliedTarget; - } - - public void setAppliedTarget(Map appliedTarget) { - this.appliedTarget = appliedTarget; - } - - public FleetInstrumentedPodGroupAttributes appliedTargetName(String appliedTargetName) { - this.appliedTargetName = appliedTargetName; - return this; - } - - /** - * The name of the applied SSI injection target. - * - * @return appliedTargetName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_APPLIED_TARGET_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAppliedTargetName() { - return appliedTargetName; - } - - public void setAppliedTargetName(String appliedTargetName) { - this.appliedTargetName = appliedTargetName; - } - - public FleetInstrumentedPodGroupAttributes injectedTags(List injectedTags) { - this.injectedTags = injectedTags; - return this; - } - - public FleetInstrumentedPodGroupAttributes addInjectedTagsItem(String injectedTagsItem) { - if (this.injectedTags == null) { - this.injectedTags = new ArrayList<>(); - } - this.injectedTags.add(injectedTagsItem); - return this; - } - - /** - * Tags injected into the pods by the Admission Controller. - * - * @return injectedTags - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INJECTED_TAGS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getInjectedTags() { - return injectedTags; - } - - public void setInjectedTags(List injectedTags) { - this.injectedTags = injectedTags; - } - - public FleetInstrumentedPodGroupAttributes kubeOwnerrefKind(String kubeOwnerrefKind) { - this.kubeOwnerrefKind = kubeOwnerrefKind; - return this; - } - - /** - * The kind of the Kubernetes owner reference. - * - * @return kubeOwnerrefKind - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_KUBE_OWNERREF_KIND) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getKubeOwnerrefKind() { - return kubeOwnerrefKind; - } - - public void setKubeOwnerrefKind(String kubeOwnerrefKind) { - this.kubeOwnerrefKind = kubeOwnerrefKind; - } - - public FleetInstrumentedPodGroupAttributes kubeOwnerrefName(String kubeOwnerrefName) { - this.kubeOwnerrefName = kubeOwnerrefName; - return this; - } - - /** - * The name of the Kubernetes owner reference (deployment, statefulset, etc.). - * - * @return kubeOwnerrefName - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_KUBE_OWNERREF_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getKubeOwnerrefName() { - return kubeOwnerrefName; - } - - public void setKubeOwnerrefName(String kubeOwnerrefName) { - this.kubeOwnerrefName = kubeOwnerrefName; - } - - public FleetInstrumentedPodGroupAttributes libInjectionAnnotations( - List libInjectionAnnotations) { - this.libInjectionAnnotations = libInjectionAnnotations; - return this; - } - - public FleetInstrumentedPodGroupAttributes addLibInjectionAnnotationsItem( - String libInjectionAnnotationsItem) { - if (this.libInjectionAnnotations == null) { - this.libInjectionAnnotations = new ArrayList<>(); - } - this.libInjectionAnnotations.add(libInjectionAnnotationsItem); - return this; - } - - /** - * Library injection annotations on the pod group. - * - * @return libInjectionAnnotations - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LIB_INJECTION_ANNOTATIONS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getLibInjectionAnnotations() { - return libInjectionAnnotations; - } - - public void setLibInjectionAnnotations(List libInjectionAnnotations) { - this.libInjectionAnnotations = libInjectionAnnotations; - } - - public FleetInstrumentedPodGroupAttributes namespace(String namespace) { - this.namespace = namespace; - return this; - } - - /** - * The Kubernetes namespace of the pod group. - * - * @return namespace - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAMESPACE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getNamespace() { - return namespace; - } - - public void setNamespace(String namespace) { - this.namespace = namespace; - } - - public FleetInstrumentedPodGroupAttributes podCount(Long podCount) { - this.podCount = podCount; - return this; - } - - /** - * Total number of pods in the group. - * - * @return podCount - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_POD_COUNT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getPodCount() { - return podCount; - } - - public void setPodCount(Long podCount) { - this.podCount = podCount; - } - - public FleetInstrumentedPodGroupAttributes podNames(List podNames) { - this.podNames = podNames; - return this; - } - - public FleetInstrumentedPodGroupAttributes addPodNamesItem(String podNamesItem) { - if (this.podNames == null) { - this.podNames = new ArrayList<>(); - } - this.podNames.add(podNamesItem); - return this; - } - - /** - * Names of the individual pods in the group. - * - * @return podNames - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_POD_NAMES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getPodNames() { - return podNames; - } - - public void setPodNames(List podNames) { - this.podNames = podNames; - } - - public FleetInstrumentedPodGroupAttributes tags(Map tags) { - this.tags = tags; - return this; - } - - public FleetInstrumentedPodGroupAttributes putTagsItem(String key, String tagsItem) { - if (this.tags == null) { - this.tags = new HashMap<>(); - } - this.tags.put(key, tagsItem); - return this; - } - - /** - * Additional tags associated with the pod group. - * - * @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; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return FleetInstrumentedPodGroupAttributes - */ - @JsonAnySetter - public FleetInstrumentedPodGroupAttributes putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return The additional properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key The arbitrary key to get - * @return The specific additional property for the given key - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - /** Return true if this FleetInstrumentedPodGroupAttributes object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FleetInstrumentedPodGroupAttributes fleetInstrumentedPodGroupAttributes = - (FleetInstrumentedPodGroupAttributes) o; - return Objects.equals(this.appliedTarget, fleetInstrumentedPodGroupAttributes.appliedTarget) - && Objects.equals( - this.appliedTargetName, fleetInstrumentedPodGroupAttributes.appliedTargetName) - && Objects.equals(this.injectedTags, fleetInstrumentedPodGroupAttributes.injectedTags) - && Objects.equals( - this.kubeOwnerrefKind, fleetInstrumentedPodGroupAttributes.kubeOwnerrefKind) - && Objects.equals( - this.kubeOwnerrefName, fleetInstrumentedPodGroupAttributes.kubeOwnerrefName) - && Objects.equals( - this.libInjectionAnnotations, - fleetInstrumentedPodGroupAttributes.libInjectionAnnotations) - && Objects.equals(this.namespace, fleetInstrumentedPodGroupAttributes.namespace) - && Objects.equals(this.podCount, fleetInstrumentedPodGroupAttributes.podCount) - && Objects.equals(this.podNames, fleetInstrumentedPodGroupAttributes.podNames) - && Objects.equals(this.tags, fleetInstrumentedPodGroupAttributes.tags) - && Objects.equals( - this.additionalProperties, fleetInstrumentedPodGroupAttributes.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash( - appliedTarget, - appliedTargetName, - injectedTags, - kubeOwnerrefKind, - kubeOwnerrefName, - libInjectionAnnotations, - namespace, - podCount, - podNames, - tags, - additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FleetInstrumentedPodGroupAttributes {\n"); - sb.append(" appliedTarget: ").append(toIndentedString(appliedTarget)).append("\n"); - sb.append(" appliedTargetName: ").append(toIndentedString(appliedTargetName)).append("\n"); - sb.append(" injectedTags: ").append(toIndentedString(injectedTags)).append("\n"); - sb.append(" kubeOwnerrefKind: ").append(toIndentedString(kubeOwnerrefKind)).append("\n"); - sb.append(" kubeOwnerrefName: ").append(toIndentedString(kubeOwnerrefName)).append("\n"); - sb.append(" libInjectionAnnotations: ") - .append(toIndentedString(libInjectionAnnotations)) - .append("\n"); - sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); - sb.append(" podCount: ").append(toIndentedString(podCount)).append("\n"); - sb.append(" podNames: ").append(toIndentedString(podNames)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/FlutterSourcemapAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FlutterSourcemapAttributes.java new file mode 100644 index 00000000000..5c607097986 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FlutterSourcemapAttributes.java @@ -0,0 +1,312 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a Flutter symbol file. */ +@JsonPropertyOrder({ + FlutterSourcemapAttributes.JSON_PROPERTY_ARCH, + FlutterSourcemapAttributes.JSON_PROPERTY_CREATED_AT, + FlutterSourcemapAttributes.JSON_PROPERTY_MAPKIND, + FlutterSourcemapAttributes.JSON_PROPERTY_SERVICE, + FlutterSourcemapAttributes.JSON_PROPERTY_SIZE, + FlutterSourcemapAttributes.JSON_PROPERTY_VARIANT, + FlutterSourcemapAttributes.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FlutterSourcemapAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ARCH = "arch"; + private String arch; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_MAPKIND = "mapkind"; + private String mapkind; + + public static final String JSON_PROPERTY_SERVICE = "service"; + private String service; + + public static final String JSON_PROPERTY_SIZE = "size"; + private Long size; + + public static final String JSON_PROPERTY_VARIANT = "variant"; + private String variant; + + public static final String JSON_PROPERTY_VERSION = "version"; + private String version; + + public FlutterSourcemapAttributes() {} + + @JsonCreator + public FlutterSourcemapAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_MAPKIND) String mapkind, + @JsonProperty(required = true, value = JSON_PROPERTY_SIZE) Long size) { + this.createdAt = createdAt; + this.mapkind = mapkind; + this.size = size; + } + + public FlutterSourcemapAttributes arch(String arch) { + this.arch = arch; + return this; + } + + /** + * The target CPU architecture. + * + * @return arch + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARCH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getArch() { + return arch; + } + + public void setArch(String arch) { + this.arch = arch; + } + + public FlutterSourcemapAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The timestamp when the symbol file was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public FlutterSourcemapAttributes mapkind(String mapkind) { + this.mapkind = mapkind; + return this; + } + + /** + * The type of source map. + * + * @return mapkind + */ + @JsonProperty(JSON_PROPERTY_MAPKIND) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMapkind() { + return mapkind; + } + + public void setMapkind(String mapkind) { + this.mapkind = mapkind; + } + + public FlutterSourcemapAttributes service(String service) { + this.service = service; + return this; + } + + /** + * The service name associated with the symbol file. + * + * @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 FlutterSourcemapAttributes size(Long size) { + this.size = size; + return this; + } + + /** + * The size of the symbol file in bytes. + * + * @return size + */ + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getSize() { + return size; + } + + public void setSize(Long size) { + this.size = size; + } + + public FlutterSourcemapAttributes variant(String variant) { + this.variant = variant; + return this; + } + + /** + * The build variant. + * + * @return variant + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VARIANT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVariant() { + return variant; + } + + public void setVariant(String variant) { + this.variant = variant; + } + + public FlutterSourcemapAttributes version(String version) { + this.version = version; + return this; + } + + /** + * The version of the service associated with the symbol file. + * + * @return version + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FlutterSourcemapAttributes + */ + @JsonAnySetter + public FlutterSourcemapAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FlutterSourcemapAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FlutterSourcemapAttributes flutterSourcemapAttributes = (FlutterSourcemapAttributes) o; + return Objects.equals(this.arch, flutterSourcemapAttributes.arch) + && Objects.equals(this.createdAt, flutterSourcemapAttributes.createdAt) + && Objects.equals(this.mapkind, flutterSourcemapAttributes.mapkind) + && Objects.equals(this.service, flutterSourcemapAttributes.service) + && Objects.equals(this.size, flutterSourcemapAttributes.size) + && Objects.equals(this.variant, flutterSourcemapAttributes.variant) + && Objects.equals(this.version, flutterSourcemapAttributes.version) + && Objects.equals( + this.additionalProperties, flutterSourcemapAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + arch, createdAt, mapkind, service, size, variant, version, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FlutterSourcemapAttributes {\n"); + sb.append(" arch: ").append(toIndentedString(arch)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" mapkind: ").append(toIndentedString(mapkind)).append("\n"); + sb.append(" service: ").append(toIndentedString(service)).append("\n"); + sb.append(" size: ").append(toIndentedString(size)).append("\n"); + sb.append(" variant: ").append(toIndentedString(variant)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FlutterSourcemapData.java b/src/main/java/com/datadog/api/client/v2/model/FlutterSourcemapData.java new file mode 100644 index 00000000000..247c240bf20 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FlutterSourcemapData.java @@ -0,0 +1,209 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Flutter symbol file data object. */ +@JsonPropertyOrder({ + FlutterSourcemapData.JSON_PROPERTY_ATTRIBUTES, + FlutterSourcemapData.JSON_PROPERTY_ID, + FlutterSourcemapData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FlutterSourcemapData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private FlutterSourcemapAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SourcemapDataType type; + + public FlutterSourcemapData() {} + + @JsonCreator + public FlutterSourcemapData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + FlutterSourcemapAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SourcemapDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public FlutterSourcemapData attributes(FlutterSourcemapAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a Flutter symbol file. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FlutterSourcemapAttributes getAttributes() { + return attributes; + } + + public void setAttributes(FlutterSourcemapAttributes attributes) { + this.attributes = attributes; + } + + public FlutterSourcemapData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the source map. + * + * @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 FlutterSourcemapData type(SourcemapDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type for source map objects. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SourcemapDataType getType() { + return type; + } + + public void setType(SourcemapDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FlutterSourcemapData + */ + @JsonAnySetter + public FlutterSourcemapData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FlutterSourcemapData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FlutterSourcemapData flutterSourcemapData = (FlutterSourcemapData) o; + return Objects.equals(this.attributes, flutterSourcemapData.attributes) + && Objects.equals(this.id, flutterSourcemapData.id) + && Objects.equals(this.type, flutterSourcemapData.type) + && Objects.equals(this.additionalProperties, flutterSourcemapData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FlutterSourcemapData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FormData.java b/src/main/java/com/datadog/api/client/v2/model/FormData.java new file mode 100644 index 00000000000..47e30f84b04 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FormData.java @@ -0,0 +1,210 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** A form resource object. */ +@JsonPropertyOrder({ + FormData.JSON_PROPERTY_ATTRIBUTES, + FormData.JSON_PROPERTY_ID, + FormData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FormData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private FormDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private FormType type = FormType.FORMS; + + public FormData() {} + + @JsonCreator + public FormData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + FormDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) UUID id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) FormType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public FormData attributes(FormDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The attributes of a form. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FormDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(FormDataAttributes attributes) { + this.attributes = attributes; + } + + public FormData id(UUID id) { + this.id = id; + return this; + } + + /** + * The ID of the form. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public FormData type(FormType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type for a form. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FormType getType() { + return type; + } + + public void setType(FormType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FormData + */ + @JsonAnySetter + public FormData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FormData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormData formData = (FormData) o; + return Objects.equals(this.attributes, formData.attributes) + && Objects.equals(this.id, formData.id) + && Objects.equals(this.type, formData.type) + && Objects.equals(this.additionalProperties, formData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FormDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FormDataAttributes.java new file mode 100644 index 00000000000..5dfad5a181b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FormDataAttributes.java @@ -0,0 +1,636 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; + +/** The attributes of a form. */ +@JsonPropertyOrder({ + FormDataAttributes.JSON_PROPERTY_ACTIVE, + FormDataAttributes.JSON_PROPERTY_ANONYMOUS, + FormDataAttributes.JSON_PROPERTY_CREATED_AT, + FormDataAttributes.JSON_PROPERTY_DATASTORE_CONFIG, + FormDataAttributes.JSON_PROPERTY_DESCRIPTION, + FormDataAttributes.JSON_PROPERTY_END_DATE, + FormDataAttributes.JSON_PROPERTY_HAS_SUBMITTED, + FormDataAttributes.JSON_PROPERTY_IDP_SURVEY, + FormDataAttributes.JSON_PROPERTY_MODIFIED_AT, + FormDataAttributes.JSON_PROPERTY_NAME, + FormDataAttributes.JSON_PROPERTY_ORG_ID, + FormDataAttributes.JSON_PROPERTY_PUBLICATION, + FormDataAttributes.JSON_PROPERTY_SELF_SERVICE, + FormDataAttributes.JSON_PROPERTY_SINGLE_RESPONSE, + FormDataAttributes.JSON_PROPERTY_USER_ID, + FormDataAttributes.JSON_PROPERTY_USER_UUID, + FormDataAttributes.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FormDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACTIVE = "active"; + private Boolean active; + + public static final String JSON_PROPERTY_ANONYMOUS = "anonymous"; + private Boolean anonymous; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_DATASTORE_CONFIG = "datastore_config"; + private FormDatastoreConfigAttributes datastoreConfig; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_END_DATE = "end_date"; + private JsonNullable endDate = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_HAS_SUBMITTED = "has_submitted"; + private JsonNullable hasSubmitted = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_IDP_SURVEY = "idp_survey"; + private Boolean idpSurvey; + + public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; + private OffsetDateTime modifiedAt; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_ORG_ID = "org_id"; + private Long orgId; + + public static final String JSON_PROPERTY_PUBLICATION = "publication"; + private FormPublicationAttributes publication; + + public static final String JSON_PROPERTY_SELF_SERVICE = "self_service"; + private Boolean selfService; + + public static final String JSON_PROPERTY_SINGLE_RESPONSE = "single_response"; + private Boolean singleResponse; + + public static final String JSON_PROPERTY_USER_ID = "user_id"; + private Long userId; + + public static final String JSON_PROPERTY_USER_UUID = "user_uuid"; + private UUID userUuid; + + public static final String JSON_PROPERTY_VERSION = "version"; + private FormVersionAttributes version; + + public FormDataAttributes() {} + + @JsonCreator + public FormDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_ACTIVE) Boolean active, + @JsonProperty(required = true, value = JSON_PROPERTY_ANONYMOUS) Boolean anonymous, + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_DATASTORE_CONFIG) + FormDatastoreConfigAttributes datastoreConfig, + @JsonProperty(required = true, value = JSON_PROPERTY_DESCRIPTION) String description, + @JsonProperty(required = true, value = JSON_PROPERTY_IDP_SURVEY) Boolean idpSurvey, + @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED_AT) OffsetDateTime modifiedAt, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_ORG_ID) Long orgId, + @JsonProperty(required = true, value = JSON_PROPERTY_SELF_SERVICE) Boolean selfService, + @JsonProperty(required = true, value = JSON_PROPERTY_SINGLE_RESPONSE) Boolean singleResponse, + @JsonProperty(required = true, value = JSON_PROPERTY_USER_ID) Long userId, + @JsonProperty(required = true, value = JSON_PROPERTY_USER_UUID) UUID userUuid) { + this.active = active; + this.anonymous = anonymous; + this.createdAt = createdAt; + this.datastoreConfig = datastoreConfig; + this.unparsed |= datastoreConfig.unparsed; + this.description = description; + this.idpSurvey = idpSurvey; + this.modifiedAt = modifiedAt; + this.name = name; + this.orgId = orgId; + this.selfService = selfService; + this.singleResponse = singleResponse; + this.userId = userId; + this.userUuid = userUuid; + } + + public FormDataAttributes active(Boolean active) { + this.active = active; + return this; + } + + /** + * Whether the form is currently active. + * + * @return active + */ + @JsonProperty(JSON_PROPERTY_ACTIVE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getActive() { + return active; + } + + public void setActive(Boolean active) { + this.active = active; + } + + public FormDataAttributes anonymous(Boolean anonymous) { + this.anonymous = anonymous; + return this; + } + + /** + * Whether the form accepts anonymous submissions. + * + * @return anonymous + */ + @JsonProperty(JSON_PROPERTY_ANONYMOUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getAnonymous() { + return anonymous; + } + + public void setAnonymous(Boolean anonymous) { + this.anonymous = anonymous; + } + + public FormDataAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The time at which the form was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public FormDataAttributes datastoreConfig(FormDatastoreConfigAttributes datastoreConfig) { + this.datastoreConfig = datastoreConfig; + this.unparsed |= datastoreConfig.unparsed; + return this; + } + + /** + * The datastore configuration for a form. + * + * @return datastoreConfig + */ + @JsonProperty(JSON_PROPERTY_DATASTORE_CONFIG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FormDatastoreConfigAttributes getDatastoreConfig() { + return datastoreConfig; + } + + public void setDatastoreConfig(FormDatastoreConfigAttributes datastoreConfig) { + this.datastoreConfig = datastoreConfig; + } + + public FormDataAttributes description(String description) { + this.description = description; + return this; + } + + /** + * The description of the form. + * + * @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 FormDataAttributes endDate(OffsetDateTime endDate) { + this.endDate = JsonNullable.of(endDate); + return this; + } + + /** + * The date and time at which the form stops accepting responses. + * + * @return endDate + */ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getEndDate() { + return endDate.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_END_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getEndDate_JsonNullable() { + return endDate; + } + + @JsonProperty(JSON_PROPERTY_END_DATE) + public void setEndDate_JsonNullable(JsonNullable endDate) { + this.endDate = endDate; + } + + public void setEndDate(OffsetDateTime endDate) { + this.endDate = JsonNullable.of(endDate); + } + + public FormDataAttributes hasSubmitted(Boolean hasSubmitted) { + this.hasSubmitted = JsonNullable.of(hasSubmitted); + return this; + } + + /** + * Whether the current user has already submitted this form. Only present for forms with + * single_response set to true. + * + * @return hasSubmitted + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Boolean getHasSubmitted() { + return hasSubmitted.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_HAS_SUBMITTED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getHasSubmitted_JsonNullable() { + return hasSubmitted; + } + + @JsonProperty(JSON_PROPERTY_HAS_SUBMITTED) + public void setHasSubmitted_JsonNullable(JsonNullable hasSubmitted) { + this.hasSubmitted = hasSubmitted; + } + + public void setHasSubmitted(Boolean hasSubmitted) { + this.hasSubmitted = JsonNullable.of(hasSubmitted); + } + + public FormDataAttributes idpSurvey(Boolean idpSurvey) { + this.idpSurvey = idpSurvey; + return this; + } + + /** + * Whether the form is an IDP survey. + * + * @return idpSurvey + */ + @JsonProperty(JSON_PROPERTY_IDP_SURVEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIdpSurvey() { + return idpSurvey; + } + + public void setIdpSurvey(Boolean idpSurvey) { + this.idpSurvey = idpSurvey; + } + + public FormDataAttributes modifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + return this; + } + + /** + * The time at which the form was last modified. + * + * @return modifiedAt + */ + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } + + public void setModifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + } + + public FormDataAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The name of the form. + * + * @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 FormDataAttributes orgId(Long orgId) { + this.orgId = orgId; + return this; + } + + /** + * The ID of the organization that owns this form. + * + * @return orgId + */ + @JsonProperty(JSON_PROPERTY_ORG_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getOrgId() { + return orgId; + } + + public void setOrgId(Long orgId) { + this.orgId = orgId; + } + + public FormDataAttributes publication(FormPublicationAttributes publication) { + this.publication = publication; + this.unparsed |= publication.unparsed; + return this; + } + + /** + * The attributes of a form publication. + * + * @return publication + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FormPublicationAttributes getPublication() { + return publication; + } + + public void setPublication(FormPublicationAttributes publication) { + this.publication = publication; + } + + public FormDataAttributes selfService(Boolean selfService) { + this.selfService = selfService; + return this; + } + + /** + * Whether the form is available in the self-service catalog. + * + * @return selfService + */ + @JsonProperty(JSON_PROPERTY_SELF_SERVICE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getSelfService() { + return selfService; + } + + public void setSelfService(Boolean selfService) { + this.selfService = selfService; + } + + public FormDataAttributes singleResponse(Boolean singleResponse) { + this.singleResponse = singleResponse; + return this; + } + + /** + * Whether each user can only submit one response. + * + * @return singleResponse + */ + @JsonProperty(JSON_PROPERTY_SINGLE_RESPONSE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getSingleResponse() { + return singleResponse; + } + + public void setSingleResponse(Boolean singleResponse) { + this.singleResponse = singleResponse; + } + + public FormDataAttributes userId(Long userId) { + this.userId = userId; + return this; + } + + /** + * The ID of the user who created this form. + * + * @return userId + */ + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public FormDataAttributes userUuid(UUID userUuid) { + this.userUuid = userUuid; + return this; + } + + /** + * The UUID of the user who created this form. + * + * @return userUuid + */ + @JsonProperty(JSON_PROPERTY_USER_UUID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getUserUuid() { + return userUuid; + } + + public void setUserUuid(UUID userUuid) { + this.userUuid = userUuid; + } + + public FormDataAttributes version(FormVersionAttributes version) { + this.version = version; + this.unparsed |= version.unparsed; + return this; + } + + /** + * The attributes of a form version. + * + * @return version + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FormVersionAttributes getVersion() { + return version; + } + + public void setVersion(FormVersionAttributes version) { + this.version = version; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FormDataAttributes + */ + @JsonAnySetter + public FormDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FormDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormDataAttributes formDataAttributes = (FormDataAttributes) o; + return Objects.equals(this.active, formDataAttributes.active) + && Objects.equals(this.anonymous, formDataAttributes.anonymous) + && Objects.equals(this.createdAt, formDataAttributes.createdAt) + && Objects.equals(this.datastoreConfig, formDataAttributes.datastoreConfig) + && Objects.equals(this.description, formDataAttributes.description) + && Objects.equals(this.endDate, formDataAttributes.endDate) + && Objects.equals(this.hasSubmitted, formDataAttributes.hasSubmitted) + && Objects.equals(this.idpSurvey, formDataAttributes.idpSurvey) + && Objects.equals(this.modifiedAt, formDataAttributes.modifiedAt) + && Objects.equals(this.name, formDataAttributes.name) + && Objects.equals(this.orgId, formDataAttributes.orgId) + && Objects.equals(this.publication, formDataAttributes.publication) + && Objects.equals(this.selfService, formDataAttributes.selfService) + && Objects.equals(this.singleResponse, formDataAttributes.singleResponse) + && Objects.equals(this.userId, formDataAttributes.userId) + && Objects.equals(this.userUuid, formDataAttributes.userUuid) + && Objects.equals(this.version, formDataAttributes.version) + && Objects.equals(this.additionalProperties, formDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + active, + anonymous, + createdAt, + datastoreConfig, + description, + endDate, + hasSubmitted, + idpSurvey, + modifiedAt, + name, + orgId, + publication, + selfService, + singleResponse, + userId, + userUuid, + version, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormDataAttributes {\n"); + sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" anonymous: ").append(toIndentedString(anonymous)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" datastoreConfig: ").append(toIndentedString(datastoreConfig)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" endDate: ").append(toIndentedString(endDate)).append("\n"); + sb.append(" hasSubmitted: ").append(toIndentedString(hasSubmitted)).append("\n"); + sb.append(" idpSurvey: ").append(toIndentedString(idpSurvey)).append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); + sb.append(" publication: ").append(toIndentedString(publication)).append("\n"); + sb.append(" selfService: ").append(toIndentedString(selfService)).append("\n"); + sb.append(" singleResponse: ").append(toIndentedString(singleResponse)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" userUuid: ").append(toIndentedString(userUuid)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FormDataDefinition.java b/src/main/java/com/datadog/api/client/v2/model/FormDataDefinition.java new file mode 100644 index 00000000000..a7cbdadba6f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FormDataDefinition.java @@ -0,0 +1,267 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import 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; + +/** A JSON Schema definition that describes the form's data fields. */ +@JsonPropertyOrder({ + FormDataDefinition.JSON_PROPERTY_DESCRIPTION, + FormDataDefinition.JSON_PROPERTY_PROPERTIES, + FormDataDefinition.JSON_PROPERTY_REQUIRED, + FormDataDefinition.JSON_PROPERTY_TITLE, + FormDataDefinition.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FormDataDefinition { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_PROPERTIES = "properties"; + private Map properties = null; + + public static final String JSON_PROPERTY_REQUIRED = "required"; + private List required = null; + + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public static final String JSON_PROPERTY_TYPE = "type"; + private FormDataDefinitionType type = FormDataDefinitionType.OBJECT; + + public FormDataDefinition description(String description) { + this.description = description; + return this; + } + + /** + * A description shown to form respondents. + * + * @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 FormDataDefinition properties(Map properties) { + this.properties = properties; + return this; + } + + public FormDataDefinition putPropertiesItem(String key, Object propertiesItem) { + if (this.properties == null) { + this.properties = new HashMap<>(); + } + this.properties.put(key, propertiesItem); + return this; + } + + /** + * A map of field names to their JSON Schema definitions. + * + * @return properties + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getProperties() { + return properties; + } + + public void setProperties(Map properties) { + this.properties = properties; + } + + public FormDataDefinition required(List required) { + this.required = required; + return this; + } + + public FormDataDefinition addRequiredItem(String requiredItem) { + if (this.required == null) { + this.required = new ArrayList<>(); + } + this.required.add(requiredItem); + return this; + } + + /** + * List of field names that must be answered. + * + * @return required + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUIRED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getRequired() { + return required; + } + + public void setRequired(List required) { + this.required = required; + } + + public FormDataDefinition title(String title) { + this.title = title; + return this; + } + + /** + * The title of the form schema. + * + * @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 FormDataDefinition type(FormDataDefinitionType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The root schema type. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FormDataDefinitionType getType() { + return type; + } + + public void setType(FormDataDefinitionType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FormDataDefinition + */ + @JsonAnySetter + public FormDataDefinition putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FormDataDefinition object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormDataDefinition formDataDefinition = (FormDataDefinition) o; + return Objects.equals(this.description, formDataDefinition.description) + && Objects.equals(this.properties, formDataDefinition.properties) + && Objects.equals(this.required, formDataDefinition.required) + && Objects.equals(this.title, formDataDefinition.title) + && Objects.equals(this.type, formDataDefinition.type) + && Objects.equals(this.additionalProperties, formDataDefinition.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(description, properties, required, title, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormDataDefinition {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" properties: ").append(toIndentedString(properties)).append("\n"); + sb.append(" required: ").append(toIndentedString(required)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FormDataDefinitionType.java b/src/main/java/com/datadog/api/client/v2/model/FormDataDefinitionType.java new file mode 100644 index 00000000000..1bfe68dff38 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FormDataDefinitionType.java @@ -0,0 +1,55 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The root schema type. */ +@JsonSerialize(using = FormDataDefinitionType.FormDataDefinitionTypeSerializer.class) +public class FormDataDefinitionType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("object")); + + public static final FormDataDefinitionType OBJECT = new FormDataDefinitionType("object"); + + FormDataDefinitionType(String value) { + super(value, allowedValues); + } + + public static class FormDataDefinitionTypeSerializer + extends StdSerializer { + public FormDataDefinitionTypeSerializer(Class t) { + super(t); + } + + public FormDataDefinitionTypeSerializer() { + this(null); + } + + @Override + public void serialize( + FormDataDefinitionType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static FormDataDefinitionType fromValue(String value) { + return new FormDataDefinitionType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FormDatastoreConfigAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FormDatastoreConfigAttributes.java new file mode 100644 index 00000000000..081e58b163f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FormDatastoreConfigAttributes.java @@ -0,0 +1,212 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** The datastore configuration for a form. */ +@JsonPropertyOrder({ + FormDatastoreConfigAttributes.JSON_PROPERTY_DATASTORE_ID, + FormDatastoreConfigAttributes.JSON_PROPERTY_PRIMARY_COLUMN_NAME, + FormDatastoreConfigAttributes.JSON_PROPERTY_PRIMARY_KEY_GENERATION_STRATEGY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FormDatastoreConfigAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATASTORE_ID = "datastore_id"; + private UUID datastoreId; + + public static final String JSON_PROPERTY_PRIMARY_COLUMN_NAME = "primary_column_name"; + private String primaryColumnName; + + public static final String JSON_PROPERTY_PRIMARY_KEY_GENERATION_STRATEGY = + "primary_key_generation_strategy"; + private String primaryKeyGenerationStrategy; + + public FormDatastoreConfigAttributes() {} + + @JsonCreator + public FormDatastoreConfigAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_DATASTORE_ID) UUID datastoreId, + @JsonProperty(required = true, value = JSON_PROPERTY_PRIMARY_COLUMN_NAME) + String primaryColumnName, + @JsonProperty(required = true, value = JSON_PROPERTY_PRIMARY_KEY_GENERATION_STRATEGY) + String primaryKeyGenerationStrategy) { + this.datastoreId = datastoreId; + this.primaryColumnName = primaryColumnName; + this.primaryKeyGenerationStrategy = primaryKeyGenerationStrategy; + } + + public FormDatastoreConfigAttributes datastoreId(UUID datastoreId) { + this.datastoreId = datastoreId; + return this; + } + + /** + * The ID of the datastore. + * + * @return datastoreId + */ + @JsonProperty(JSON_PROPERTY_DATASTORE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getDatastoreId() { + return datastoreId; + } + + public void setDatastoreId(UUID datastoreId) { + this.datastoreId = datastoreId; + } + + public FormDatastoreConfigAttributes primaryColumnName(String primaryColumnName) { + this.primaryColumnName = primaryColumnName; + return this; + } + + /** + * The name of the primary column in the datastore. + * + * @return primaryColumnName + */ + @JsonProperty(JSON_PROPERTY_PRIMARY_COLUMN_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPrimaryColumnName() { + return primaryColumnName; + } + + public void setPrimaryColumnName(String primaryColumnName) { + this.primaryColumnName = primaryColumnName; + } + + public FormDatastoreConfigAttributes primaryKeyGenerationStrategy( + String primaryKeyGenerationStrategy) { + this.primaryKeyGenerationStrategy = primaryKeyGenerationStrategy; + return this; + } + + /** + * The strategy used to generate primary keys in the datastore. + * + * @return primaryKeyGenerationStrategy + */ + @JsonProperty(JSON_PROPERTY_PRIMARY_KEY_GENERATION_STRATEGY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPrimaryKeyGenerationStrategy() { + return primaryKeyGenerationStrategy; + } + + public void setPrimaryKeyGenerationStrategy(String primaryKeyGenerationStrategy) { + this.primaryKeyGenerationStrategy = primaryKeyGenerationStrategy; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FormDatastoreConfigAttributes + */ + @JsonAnySetter + public FormDatastoreConfigAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FormDatastoreConfigAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormDatastoreConfigAttributes formDatastoreConfigAttributes = (FormDatastoreConfigAttributes) o; + return Objects.equals(this.datastoreId, formDatastoreConfigAttributes.datastoreId) + && Objects.equals(this.primaryColumnName, formDatastoreConfigAttributes.primaryColumnName) + && Objects.equals( + this.primaryKeyGenerationStrategy, + formDatastoreConfigAttributes.primaryKeyGenerationStrategy) + && Objects.equals( + this.additionalProperties, formDatastoreConfigAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + datastoreId, primaryColumnName, primaryKeyGenerationStrategy, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormDatastoreConfigAttributes {\n"); + sb.append(" datastoreId: ").append(toIndentedString(datastoreId)).append("\n"); + sb.append(" primaryColumnName: ").append(toIndentedString(primaryColumnName)).append("\n"); + sb.append(" primaryKeyGenerationStrategy: ") + .append(toIndentedString(primaryKeyGenerationStrategy)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FormPublicationAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FormPublicationAttributes.java new file mode 100644 index 00000000000..eaebc848ef1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FormPublicationAttributes.java @@ -0,0 +1,381 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** The attributes of a form publication. */ +@JsonPropertyOrder({ + FormPublicationAttributes.JSON_PROPERTY_CREATED_AT, + FormPublicationAttributes.JSON_PROPERTY_FORM_ID, + FormPublicationAttributes.JSON_PROPERTY_FORM_VERSION, + FormPublicationAttributes.JSON_PROPERTY_ID, + FormPublicationAttributes.JSON_PROPERTY_MODIFIED_AT, + FormPublicationAttributes.JSON_PROPERTY_ORG_ID, + FormPublicationAttributes.JSON_PROPERTY_PUBLISH_SEQ, + FormPublicationAttributes.JSON_PROPERTY_USER_ID, + FormPublicationAttributes.JSON_PROPERTY_USER_UUID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FormPublicationAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_FORM_ID = "form_id"; + private UUID formId; + + public static final String JSON_PROPERTY_FORM_VERSION = "form_version"; + private Long formVersion; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; + private OffsetDateTime modifiedAt; + + public static final String JSON_PROPERTY_ORG_ID = "org_id"; + private Long orgId; + + public static final String JSON_PROPERTY_PUBLISH_SEQ = "publish_seq"; + private Long publishSeq; + + public static final String JSON_PROPERTY_USER_ID = "user_id"; + private Long userId; + + public static final String JSON_PROPERTY_USER_UUID = "user_uuid"; + private UUID userUuid; + + public FormPublicationAttributes() {} + + @JsonCreator + public FormPublicationAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_FORM_ID) UUID formId, + @JsonProperty(required = true, value = JSON_PROPERTY_FORM_VERSION) Long formVersion, + @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED_AT) OffsetDateTime modifiedAt, + @JsonProperty(required = true, value = JSON_PROPERTY_ORG_ID) Long orgId, + @JsonProperty(required = true, value = JSON_PROPERTY_PUBLISH_SEQ) Long publishSeq, + @JsonProperty(required = true, value = JSON_PROPERTY_USER_ID) Long userId, + @JsonProperty(required = true, value = JSON_PROPERTY_USER_UUID) UUID userUuid) { + this.createdAt = createdAt; + this.formId = formId; + this.formVersion = formVersion; + this.modifiedAt = modifiedAt; + this.orgId = orgId; + this.publishSeq = publishSeq; + this.userId = userId; + this.userUuid = userUuid; + } + + public FormPublicationAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The time at which the publication was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public FormPublicationAttributes formId(UUID formId) { + this.formId = formId; + return this; + } + + /** + * The ID of the form. + * + * @return formId + */ + @JsonProperty(JSON_PROPERTY_FORM_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getFormId() { + return formId; + } + + public void setFormId(UUID formId) { + this.formId = formId; + } + + public FormPublicationAttributes formVersion(Long formVersion) { + this.formVersion = formVersion; + return this; + } + + /** + * The version number that was published. + * + * @return formVersion + */ + @JsonProperty(JSON_PROPERTY_FORM_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getFormVersion() { + return formVersion; + } + + public void setFormVersion(Long formVersion) { + this.formVersion = formVersion; + } + + public FormPublicationAttributes id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the form publication. + * + * @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 FormPublicationAttributes modifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + return this; + } + + /** + * The time at which the publication was last modified. + * + * @return modifiedAt + */ + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } + + public void setModifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + } + + public FormPublicationAttributes orgId(Long orgId) { + this.orgId = orgId; + return this; + } + + /** + * The ID of the organization that owns this publication. + * + * @return orgId + */ + @JsonProperty(JSON_PROPERTY_ORG_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getOrgId() { + return orgId; + } + + public void setOrgId(Long orgId) { + this.orgId = orgId; + } + + public FormPublicationAttributes publishSeq(Long publishSeq) { + this.publishSeq = publishSeq; + return this; + } + + /** + * The sequential publication number for this form. + * + * @return publishSeq + */ + @JsonProperty(JSON_PROPERTY_PUBLISH_SEQ) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getPublishSeq() { + return publishSeq; + } + + public void setPublishSeq(Long publishSeq) { + this.publishSeq = publishSeq; + } + + public FormPublicationAttributes userId(Long userId) { + this.userId = userId; + return this; + } + + /** + * The ID of the user who created this publication. + * + * @return userId + */ + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public FormPublicationAttributes userUuid(UUID userUuid) { + this.userUuid = userUuid; + return this; + } + + /** + * The UUID of the user who created this publication. + * + * @return userUuid + */ + @JsonProperty(JSON_PROPERTY_USER_UUID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getUserUuid() { + return userUuid; + } + + public void setUserUuid(UUID userUuid) { + this.userUuid = userUuid; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FormPublicationAttributes + */ + @JsonAnySetter + public FormPublicationAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FormPublicationAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormPublicationAttributes formPublicationAttributes = (FormPublicationAttributes) o; + return Objects.equals(this.createdAt, formPublicationAttributes.createdAt) + && Objects.equals(this.formId, formPublicationAttributes.formId) + && Objects.equals(this.formVersion, formPublicationAttributes.formVersion) + && Objects.equals(this.id, formPublicationAttributes.id) + && Objects.equals(this.modifiedAt, formPublicationAttributes.modifiedAt) + && Objects.equals(this.orgId, formPublicationAttributes.orgId) + && Objects.equals(this.publishSeq, formPublicationAttributes.publishSeq) + && Objects.equals(this.userId, formPublicationAttributes.userId) + && Objects.equals(this.userUuid, formPublicationAttributes.userUuid) + && Objects.equals( + this.additionalProperties, formPublicationAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + formId, + formVersion, + id, + modifiedAt, + orgId, + publishSeq, + userId, + userUuid, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormPublicationAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" formId: ").append(toIndentedString(formId)).append("\n"); + sb.append(" formVersion: ").append(toIndentedString(formVersion)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); + sb.append(" publishSeq: ").append(toIndentedString(publishSeq)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" userUuid: ").append(toIndentedString(userUuid)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FormPublicationData.java b/src/main/java/com/datadog/api/client/v2/model/FormPublicationData.java new file mode 100644 index 00000000000..fdfbd06d173 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FormPublicationData.java @@ -0,0 +1,209 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A form publication resource object. */ +@JsonPropertyOrder({ + FormPublicationData.JSON_PROPERTY_ATTRIBUTES, + FormPublicationData.JSON_PROPERTY_ID, + FormPublicationData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FormPublicationData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private FormPublicationAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private FormPublicationType type = FormPublicationType.FORM_PUBLICATIONS; + + public FormPublicationData() {} + + @JsonCreator + public FormPublicationData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + FormPublicationAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) FormPublicationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public FormPublicationData attributes(FormPublicationAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The attributes of a form publication. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FormPublicationAttributes getAttributes() { + return attributes; + } + + public void setAttributes(FormPublicationAttributes attributes) { + this.attributes = attributes; + } + + public FormPublicationData id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the form publication. + * + * @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 FormPublicationData type(FormPublicationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type for a form publication. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FormPublicationType getType() { + return type; + } + + public void setType(FormPublicationType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FormPublicationData + */ + @JsonAnySetter + public FormPublicationData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FormPublicationData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormPublicationData formPublicationData = (FormPublicationData) o; + return Objects.equals(this.attributes, formPublicationData.attributes) + && Objects.equals(this.id, formPublicationData.id) + && Objects.equals(this.type, formPublicationData.type) + && Objects.equals(this.additionalProperties, formPublicationData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormPublicationData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FormPublicationResponse.java b/src/main/java/com/datadog/api/client/v2/model/FormPublicationResponse.java new file mode 100644 index 00000000000..1d9f2b92d3c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FormPublicationResponse.java @@ -0,0 +1,145 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A response containing a single form publication. */ +@JsonPropertyOrder({FormPublicationResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FormPublicationResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private FormPublicationData data; + + public FormPublicationResponse() {} + + @JsonCreator + public FormPublicationResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) FormPublicationData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public FormPublicationResponse data(FormPublicationData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * A form publication resource object. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FormPublicationData getData() { + return data; + } + + public void setData(FormPublicationData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FormPublicationResponse + */ + @JsonAnySetter + public FormPublicationResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FormPublicationResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormPublicationResponse formPublicationResponse = (FormPublicationResponse) o; + return Objects.equals(this.data, formPublicationResponse.data) + && Objects.equals(this.additionalProperties, formPublicationResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormPublicationResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FormPublicationType.java b/src/main/java/com/datadog/api/client/v2/model/FormPublicationType.java new file mode 100644 index 00000000000..b922c27bc3c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FormPublicationType.java @@ -0,0 +1,56 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The resource type for a form publication. */ +@JsonSerialize(using = FormPublicationType.FormPublicationTypeSerializer.class) +public class FormPublicationType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("form_publications")); + + public static final FormPublicationType FORM_PUBLICATIONS = + new FormPublicationType("form_publications"); + + FormPublicationType(String value) { + super(value, allowedValues); + } + + public static class FormPublicationTypeSerializer extends StdSerializer { + public FormPublicationTypeSerializer(Class t) { + super(t); + } + + public FormPublicationTypeSerializer() { + this(null); + } + + @Override + public void serialize( + FormPublicationType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static FormPublicationType fromValue(String value) { + return new FormPublicationType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FormResponse.java b/src/main/java/com/datadog/api/client/v2/model/FormResponse.java new file mode 100644 index 00000000000..f43beeeba5f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FormResponse.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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A response containing a single form. */ +@JsonPropertyOrder({FormResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FormResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private FormData data; + + public FormResponse() {} + + @JsonCreator + public FormResponse(@JsonProperty(required = true, value = JSON_PROPERTY_DATA) FormData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public FormResponse data(FormData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * A form resource object. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FormData getData() { + return data; + } + + public void setData(FormData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FormResponse + */ + @JsonAnySetter + public FormResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FormResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormResponse formResponse = (FormResponse) o; + return Objects.equals(this.data, formResponse.data) + && Objects.equals(this.additionalProperties, formResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FormType.java b/src/main/java/com/datadog/api/client/v2/model/FormType.java new file mode 100644 index 00000000000..d2b02269dee --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FormType.java @@ -0,0 +1,53 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The resource type for a form. */ +@JsonSerialize(using = FormType.FormTypeSerializer.class) +public class FormType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("forms")); + + public static final FormType FORMS = new FormType("forms"); + + FormType(String value) { + super(value, allowedValues); + } + + public static class FormTypeSerializer extends StdSerializer { + public FormTypeSerializer(Class t) { + super(t); + } + + public FormTypeSerializer() { + this(null); + } + + @Override + public void serialize(FormType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static FormType fromValue(String value) { + return new FormType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FormUiDefinition.java b/src/main/java/com/datadog/api/client/v2/model/FormUiDefinition.java new file mode 100644 index 00000000000..86a96707131 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FormUiDefinition.java @@ -0,0 +1,178 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import 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; + +/** + * UI configuration for rendering form fields, including widget overrides, field ordering, and + * themes. + */ +@JsonPropertyOrder({ + FormUiDefinition.JSON_PROPERTY_UI_ORDER, + FormUiDefinition.JSON_PROPERTY_UI_THEME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FormUiDefinition { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_UI_ORDER = "ui:order"; + private List uiOrder = null; + + public static final String JSON_PROPERTY_UI_THEME = "ui:theme"; + private FormUiDefinitionUiTheme uiTheme; + + public FormUiDefinition uiOrder(List uiOrder) { + this.uiOrder = uiOrder; + return this; + } + + public FormUiDefinition addUiOrderItem(String uiOrderItem) { + if (this.uiOrder == null) { + this.uiOrder = new ArrayList<>(); + } + this.uiOrder.add(uiOrderItem); + return this; + } + + /** + * The order in which form fields are displayed. + * + * @return uiOrder + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UI_ORDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getUiOrder() { + return uiOrder; + } + + public void setUiOrder(List uiOrder) { + this.uiOrder = uiOrder; + } + + public FormUiDefinition uiTheme(FormUiDefinitionUiTheme uiTheme) { + this.uiTheme = uiTheme; + this.unparsed |= uiTheme.unparsed; + return this; + } + + /** + * The visual theme applied to the form. + * + * @return uiTheme + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UI_THEME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FormUiDefinitionUiTheme getUiTheme() { + return uiTheme; + } + + public void setUiTheme(FormUiDefinitionUiTheme uiTheme) { + this.uiTheme = uiTheme; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FormUiDefinition + */ + @JsonAnySetter + public FormUiDefinition putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FormUiDefinition object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormUiDefinition formUiDefinition = (FormUiDefinition) o; + return Objects.equals(this.uiOrder, formUiDefinition.uiOrder) + && Objects.equals(this.uiTheme, formUiDefinition.uiTheme) + && Objects.equals(this.additionalProperties, formUiDefinition.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(uiOrder, uiTheme, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormUiDefinition {\n"); + sb.append(" uiOrder: ").append(toIndentedString(uiOrder)).append("\n"); + sb.append(" uiTheme: ").append(toIndentedString(uiTheme)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FormUiDefinitionUiTheme.java b/src/main/java/com/datadog/api/client/v2/model/FormUiDefinitionUiTheme.java new file mode 100644 index 00000000000..cda14d9df75 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FormUiDefinitionUiTheme.java @@ -0,0 +1,139 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The visual theme applied to the form. */ +@JsonPropertyOrder({FormUiDefinitionUiTheme.JSON_PROPERTY_PRIMARY_COLOR}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FormUiDefinitionUiTheme { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_PRIMARY_COLOR = "primaryColor"; + private FormUiDefinitionUiThemePrimaryColor primaryColor; + + public FormUiDefinitionUiTheme primaryColor(FormUiDefinitionUiThemePrimaryColor primaryColor) { + this.primaryColor = primaryColor; + this.unparsed |= !primaryColor.isValid(); + return this; + } + + /** + * The primary color of the form theme. + * + * @return primaryColor + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRIMARY_COLOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FormUiDefinitionUiThemePrimaryColor getPrimaryColor() { + return primaryColor; + } + + public void setPrimaryColor(FormUiDefinitionUiThemePrimaryColor primaryColor) { + if (!primaryColor.isValid()) { + this.unparsed = true; + } + this.primaryColor = primaryColor; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FormUiDefinitionUiTheme + */ + @JsonAnySetter + public FormUiDefinitionUiTheme putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FormUiDefinitionUiTheme object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormUiDefinitionUiTheme formUiDefinitionUiTheme = (FormUiDefinitionUiTheme) o; + return Objects.equals(this.primaryColor, formUiDefinitionUiTheme.primaryColor) + && Objects.equals(this.additionalProperties, formUiDefinitionUiTheme.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(primaryColor, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormUiDefinitionUiTheme {\n"); + sb.append(" primaryColor: ").append(toIndentedString(primaryColor)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FormUiDefinitionUiThemePrimaryColor.java b/src/main/java/com/datadog/api/client/v2/model/FormUiDefinitionUiThemePrimaryColor.java new file mode 100644 index 00000000000..71e24841b67 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FormUiDefinitionUiThemePrimaryColor.java @@ -0,0 +1,85 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The primary color of the form theme. */ +@JsonSerialize( + using = FormUiDefinitionUiThemePrimaryColor.FormUiDefinitionUiThemePrimaryColorSerializer.class) +public class FormUiDefinitionUiThemePrimaryColor extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList( + "gray", + "red", + "orange", + "yellow", + "green", + "light-blue", + "dark-blue", + "magenta", + "indigo")); + + public static final FormUiDefinitionUiThemePrimaryColor GRAY = + new FormUiDefinitionUiThemePrimaryColor("gray"); + public static final FormUiDefinitionUiThemePrimaryColor RED = + new FormUiDefinitionUiThemePrimaryColor("red"); + public static final FormUiDefinitionUiThemePrimaryColor ORANGE = + new FormUiDefinitionUiThemePrimaryColor("orange"); + public static final FormUiDefinitionUiThemePrimaryColor YELLOW = + new FormUiDefinitionUiThemePrimaryColor("yellow"); + public static final FormUiDefinitionUiThemePrimaryColor GREEN = + new FormUiDefinitionUiThemePrimaryColor("green"); + public static final FormUiDefinitionUiThemePrimaryColor LIGHT_BLUE = + new FormUiDefinitionUiThemePrimaryColor("light-blue"); + public static final FormUiDefinitionUiThemePrimaryColor DARK_BLUE = + new FormUiDefinitionUiThemePrimaryColor("dark-blue"); + public static final FormUiDefinitionUiThemePrimaryColor MAGENTA = + new FormUiDefinitionUiThemePrimaryColor("magenta"); + public static final FormUiDefinitionUiThemePrimaryColor INDIGO = + new FormUiDefinitionUiThemePrimaryColor("indigo"); + + FormUiDefinitionUiThemePrimaryColor(String value) { + super(value, allowedValues); + } + + public static class FormUiDefinitionUiThemePrimaryColorSerializer + extends StdSerializer { + public FormUiDefinitionUiThemePrimaryColorSerializer( + Class t) { + super(t); + } + + public FormUiDefinitionUiThemePrimaryColorSerializer() { + this(null); + } + + @Override + public void serialize( + FormUiDefinitionUiThemePrimaryColor value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static FormUiDefinitionUiThemePrimaryColor fromValue(String value) { + return new FormUiDefinitionUiThemePrimaryColor(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FormUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FormUpdateAttributes.java new file mode 100644 index 00000000000..4d4c493672d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FormUpdateAttributes.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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The fields to update on a form. At least one field must be provided. */ +@JsonPropertyOrder({ + FormUpdateAttributes.JSON_PROPERTY_DATASTORE_CONFIG, + FormUpdateAttributes.JSON_PROPERTY_DESCRIPTION, + FormUpdateAttributes.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FormUpdateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATASTORE_CONFIG = "datastore_config"; + private FormDatastoreConfigAttributes datastoreConfig; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public FormUpdateAttributes datastoreConfig(FormDatastoreConfigAttributes datastoreConfig) { + this.datastoreConfig = datastoreConfig; + this.unparsed |= datastoreConfig.unparsed; + return this; + } + + /** + * The datastore configuration for a form. + * + * @return datastoreConfig + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASTORE_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FormDatastoreConfigAttributes getDatastoreConfig() { + return datastoreConfig; + } + + public void setDatastoreConfig(FormDatastoreConfigAttributes datastoreConfig) { + this.datastoreConfig = datastoreConfig; + } + + public FormUpdateAttributes description(String description) { + this.description = description; + return this; + } + + /** + * The updated description of the form. + * + * @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 FormUpdateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The updated name of the form. + * + * @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; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FormUpdateAttributes + */ + @JsonAnySetter + public FormUpdateAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FormUpdateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormUpdateAttributes formUpdateAttributes = (FormUpdateAttributes) o; + return Objects.equals(this.datastoreConfig, formUpdateAttributes.datastoreConfig) + && Objects.equals(this.description, formUpdateAttributes.description) + && Objects.equals(this.name, formUpdateAttributes.name) + && Objects.equals(this.additionalProperties, formUpdateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(datastoreConfig, description, name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormUpdateAttributes {\n"); + sb.append(" datastoreConfig: ").append(toIndentedString(datastoreConfig)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FormVersionAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FormVersionAttributes.java new file mode 100644 index 00000000000..e1c4aa09426 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FormVersionAttributes.java @@ -0,0 +1,456 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** The attributes of a form version. */ +@JsonPropertyOrder({ + FormVersionAttributes.JSON_PROPERTY_CREATED_AT, + FormVersionAttributes.JSON_PROPERTY_DATA_DEFINITION, + FormVersionAttributes.JSON_PROPERTY_DEFINITION_SIGNATURE, + FormVersionAttributes.JSON_PROPERTY_ETAG, + FormVersionAttributes.JSON_PROPERTY_ID, + FormVersionAttributes.JSON_PROPERTY_MODIFIED_AT, + FormVersionAttributes.JSON_PROPERTY_STATE, + FormVersionAttributes.JSON_PROPERTY_UI_DEFINITION, + FormVersionAttributes.JSON_PROPERTY_USER_ID, + FormVersionAttributes.JSON_PROPERTY_USER_UUID, + FormVersionAttributes.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FormVersionAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_DATA_DEFINITION = "data_definition"; + private FormDataDefinition dataDefinition; + + public static final String JSON_PROPERTY_DEFINITION_SIGNATURE = "definition_signature"; + private String definitionSignature; + + public static final String JSON_PROPERTY_ETAG = "etag"; + private String etag; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; + private OffsetDateTime modifiedAt; + + public static final String JSON_PROPERTY_STATE = "state"; + private FormVersionState state; + + public static final String JSON_PROPERTY_UI_DEFINITION = "ui_definition"; + private FormUiDefinition uiDefinition; + + public static final String JSON_PROPERTY_USER_ID = "user_id"; + private Long userId; + + public static final String JSON_PROPERTY_USER_UUID = "user_uuid"; + private UUID userUuid; + + public static final String JSON_PROPERTY_VERSION = "version"; + private Long version; + + public FormVersionAttributes() {} + + @JsonCreator + public FormVersionAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_DATA_DEFINITION) + FormDataDefinition dataDefinition, + @JsonProperty(required = true, value = JSON_PROPERTY_DEFINITION_SIGNATURE) + String definitionSignature, + @JsonProperty(required = true, value = JSON_PROPERTY_ETAG) String etag, + @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED_AT) OffsetDateTime modifiedAt, + @JsonProperty(required = true, value = JSON_PROPERTY_STATE) FormVersionState state, + @JsonProperty(required = true, value = JSON_PROPERTY_UI_DEFINITION) + FormUiDefinition uiDefinition, + @JsonProperty(required = true, value = JSON_PROPERTY_USER_ID) Long userId, + @JsonProperty(required = true, value = JSON_PROPERTY_USER_UUID) UUID userUuid, + @JsonProperty(required = true, value = JSON_PROPERTY_VERSION) Long version) { + this.createdAt = createdAt; + this.dataDefinition = dataDefinition; + this.unparsed |= dataDefinition.unparsed; + this.definitionSignature = definitionSignature; + this.etag = etag; + if (etag != null) {} + this.modifiedAt = modifiedAt; + this.state = state; + this.unparsed |= !state.isValid(); + this.uiDefinition = uiDefinition; + this.unparsed |= uiDefinition.unparsed; + this.userId = userId; + this.userUuid = userUuid; + this.version = version; + } + + public FormVersionAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The time at which the version was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public FormVersionAttributes dataDefinition(FormDataDefinition dataDefinition) { + this.dataDefinition = dataDefinition; + this.unparsed |= dataDefinition.unparsed; + return this; + } + + /** + * A JSON Schema definition that describes the form's data fields. + * + * @return dataDefinition + */ + @JsonProperty(JSON_PROPERTY_DATA_DEFINITION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FormDataDefinition getDataDefinition() { + return dataDefinition; + } + + public void setDataDefinition(FormDataDefinition dataDefinition) { + this.dataDefinition = dataDefinition; + } + + public FormVersionAttributes definitionSignature(String definitionSignature) { + this.definitionSignature = definitionSignature; + return this; + } + + /** + * The signature of the version definition. + * + * @return definitionSignature + */ + @JsonProperty(JSON_PROPERTY_DEFINITION_SIGNATURE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDefinitionSignature() { + return definitionSignature; + } + + public void setDefinitionSignature(String definitionSignature) { + this.definitionSignature = definitionSignature; + } + + public FormVersionAttributes etag(String etag) { + this.etag = etag; + if (etag != null) {} + return this; + } + + /** + * The ETag for optimistic concurrency control. + * + * @return etag + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ETAG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEtag() { + return etag; + } + + public void setEtag(String etag) { + this.etag = etag; + } + + public FormVersionAttributes id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the form version. + * + * @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 FormVersionAttributes modifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + return this; + } + + /** + * The time at which the version was last modified. + * + * @return modifiedAt + */ + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } + + public void setModifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + } + + public FormVersionAttributes state(FormVersionState state) { + this.state = state; + this.unparsed |= !state.isValid(); + return this; + } + + /** + * The state of a form version. + * + * @return state + */ + @JsonProperty(JSON_PROPERTY_STATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FormVersionState getState() { + return state; + } + + public void setState(FormVersionState state) { + if (!state.isValid()) { + this.unparsed = true; + } + this.state = state; + } + + public FormVersionAttributes uiDefinition(FormUiDefinition uiDefinition) { + this.uiDefinition = uiDefinition; + this.unparsed |= uiDefinition.unparsed; + return this; + } + + /** + * UI configuration for rendering form fields, including widget overrides, field ordering, and + * themes. + * + * @return uiDefinition + */ + @JsonProperty(JSON_PROPERTY_UI_DEFINITION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FormUiDefinition getUiDefinition() { + return uiDefinition; + } + + public void setUiDefinition(FormUiDefinition uiDefinition) { + this.uiDefinition = uiDefinition; + } + + public FormVersionAttributes userId(Long userId) { + this.userId = userId; + return this; + } + + /** + * The ID of the user who created this version. + * + * @return userId + */ + @JsonProperty(JSON_PROPERTY_USER_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public FormVersionAttributes userUuid(UUID userUuid) { + this.userUuid = userUuid; + return this; + } + + /** + * The UUID of the user who created this version. + * + * @return userUuid + */ + @JsonProperty(JSON_PROPERTY_USER_UUID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getUserUuid() { + return userUuid; + } + + public void setUserUuid(UUID userUuid) { + this.userUuid = userUuid; + } + + public FormVersionAttributes version(Long version) { + this.version = version; + return this; + } + + /** + * The sequential version number. + * + * @return version + */ + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getVersion() { + return version; + } + + public void setVersion(Long version) { + this.version = version; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FormVersionAttributes + */ + @JsonAnySetter + public FormVersionAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FormVersionAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormVersionAttributes formVersionAttributes = (FormVersionAttributes) o; + return Objects.equals(this.createdAt, formVersionAttributes.createdAt) + && Objects.equals(this.dataDefinition, formVersionAttributes.dataDefinition) + && Objects.equals(this.definitionSignature, formVersionAttributes.definitionSignature) + && Objects.equals(this.etag, formVersionAttributes.etag) + && Objects.equals(this.id, formVersionAttributes.id) + && Objects.equals(this.modifiedAt, formVersionAttributes.modifiedAt) + && Objects.equals(this.state, formVersionAttributes.state) + && Objects.equals(this.uiDefinition, formVersionAttributes.uiDefinition) + && Objects.equals(this.userId, formVersionAttributes.userId) + && Objects.equals(this.userUuid, formVersionAttributes.userUuid) + && Objects.equals(this.version, formVersionAttributes.version) + && Objects.equals(this.additionalProperties, formVersionAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + dataDefinition, + definitionSignature, + etag, + id, + modifiedAt, + state, + uiDefinition, + userId, + userUuid, + version, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormVersionAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" dataDefinition: ").append(toIndentedString(dataDefinition)).append("\n"); + sb.append(" definitionSignature: ") + .append(toIndentedString(definitionSignature)) + .append("\n"); + sb.append(" etag: ").append(toIndentedString(etag)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" uiDefinition: ").append(toIndentedString(uiDefinition)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" userUuid: ").append(toIndentedString(userUuid)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FormVersionData.java b/src/main/java/com/datadog/api/client/v2/model/FormVersionData.java new file mode 100644 index 00000000000..b26325ec0cc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FormVersionData.java @@ -0,0 +1,209 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A form version resource object. */ +@JsonPropertyOrder({ + FormVersionData.JSON_PROPERTY_ATTRIBUTES, + FormVersionData.JSON_PROPERTY_ID, + FormVersionData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FormVersionData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private FormVersionAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private FormVersionType type = FormVersionType.FORM_VERSIONS; + + public FormVersionData() {} + + @JsonCreator + public FormVersionData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + FormVersionAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) FormVersionType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public FormVersionData attributes(FormVersionAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The attributes of a form version. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FormVersionAttributes getAttributes() { + return attributes; + } + + public void setAttributes(FormVersionAttributes attributes) { + this.attributes = attributes; + } + + public FormVersionData id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the form version. + * + * @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 FormVersionData type(FormVersionType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type for a form version. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FormVersionType getType() { + return type; + } + + public void setType(FormVersionType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FormVersionData + */ + @JsonAnySetter + public FormVersionData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FormVersionData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormVersionData formVersionData = (FormVersionData) o; + return Objects.equals(this.attributes, formVersionData.attributes) + && Objects.equals(this.id, formVersionData.id) + && Objects.equals(this.type, formVersionData.type) + && Objects.equals(this.additionalProperties, formVersionData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormVersionData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FormVersionResponse.java b/src/main/java/com/datadog/api/client/v2/model/FormVersionResponse.java new file mode 100644 index 00000000000..ee8398e49b1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FormVersionResponse.java @@ -0,0 +1,145 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A response containing a single form version. */ +@JsonPropertyOrder({FormVersionResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FormVersionResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private FormVersionData data; + + public FormVersionResponse() {} + + @JsonCreator + public FormVersionResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) FormVersionData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public FormVersionResponse data(FormVersionData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * A form version resource object. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FormVersionData getData() { + return data; + } + + public void setData(FormVersionData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FormVersionResponse + */ + @JsonAnySetter + public FormVersionResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FormVersionResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormVersionResponse formVersionResponse = (FormVersionResponse) o; + return Objects.equals(this.data, formVersionResponse.data) + && Objects.equals(this.additionalProperties, formVersionResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormVersionResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FormVersionState.java b/src/main/java/com/datadog/api/client/v2/model/FormVersionState.java new file mode 100644 index 00000000000..201232f3259 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FormVersionState.java @@ -0,0 +1,55 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The state of a form version. */ +@JsonSerialize(using = FormVersionState.FormVersionStateSerializer.class) +public class FormVersionState extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("draft", "frozen")); + + public static final FormVersionState DRAFT = new FormVersionState("draft"); + public static final FormVersionState FROZEN = new FormVersionState("frozen"); + + FormVersionState(String value) { + super(value, allowedValues); + } + + public static class FormVersionStateSerializer extends StdSerializer { + public FormVersionStateSerializer(Class t) { + super(t); + } + + public FormVersionStateSerializer() { + this(null); + } + + @Override + public void serialize(FormVersionState value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static FormVersionState fromValue(String value) { + return new FormVersionState(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FormVersionType.java b/src/main/java/com/datadog/api/client/v2/model/FormVersionType.java new file mode 100644 index 00000000000..b557d8e362a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FormVersionType.java @@ -0,0 +1,54 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The resource type for a form version. */ +@JsonSerialize(using = FormVersionType.FormVersionTypeSerializer.class) +public class FormVersionType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("form_versions")); + + public static final FormVersionType FORM_VERSIONS = new FormVersionType("form_versions"); + + FormVersionType(String value) { + super(value, allowedValues); + } + + public static class FormVersionTypeSerializer extends StdSerializer { + public FormVersionTypeSerializer(Class t) { + super(t); + } + + public FormVersionTypeSerializer() { + this(null); + } + + @Override + public void serialize(FormVersionType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static FormVersionType fromValue(String value) { + return new FormVersionType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FormsResponse.java b/src/main/java/com/datadog/api/client/v2/model/FormsResponse.java new file mode 100644 index 00000000000..d3f49163bac --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FormsResponse.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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import 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; + +/** A response containing a list of forms. */ +@JsonPropertyOrder({FormsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FormsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public FormsResponse() {} + + @JsonCreator + public FormsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) { + this.data = data; + } + + public FormsResponse data(List data) { + this.data = data; + for (FormData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public FormsResponse addDataItem(FormData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * A list of form resource objects. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FormsResponse + */ + @JsonAnySetter + public FormsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FormsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormsResponse formsResponse = (FormsResponse) o; + return Objects.equals(this.data, formsResponse.data) + && Objects.equals(this.additionalProperties, formsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GetDataObservabilityMonitorRunStatusResponse.java b/src/main/java/com/datadog/api/client/v2/model/GetDataObservabilityMonitorRunStatusResponse.java new file mode 100644 index 00000000000..9b0d2d48730 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GetDataObservabilityMonitorRunStatusResponse.java @@ -0,0 +1,151 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The response for getting the status of a data observability monitor run. */ +@JsonPropertyOrder({GetDataObservabilityMonitorRunStatusResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GetDataObservabilityMonitorRunStatusResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private GetDataObservabilityMonitorRunStatusResponseData data; + + public GetDataObservabilityMonitorRunStatusResponse() {} + + @JsonCreator + public GetDataObservabilityMonitorRunStatusResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + GetDataObservabilityMonitorRunStatusResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public GetDataObservabilityMonitorRunStatusResponse data( + GetDataObservabilityMonitorRunStatusResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data object for a data observability monitor run status response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GetDataObservabilityMonitorRunStatusResponseData getData() { + return data; + } + + public void setData(GetDataObservabilityMonitorRunStatusResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GetDataObservabilityMonitorRunStatusResponse + */ + @JsonAnySetter + public GetDataObservabilityMonitorRunStatusResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GetDataObservabilityMonitorRunStatusResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDataObservabilityMonitorRunStatusResponse getDataObservabilityMonitorRunStatusResponse = + (GetDataObservabilityMonitorRunStatusResponse) o; + return Objects.equals(this.data, getDataObservabilityMonitorRunStatusResponse.data) + && Objects.equals( + this.additionalProperties, + getDataObservabilityMonitorRunStatusResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetDataObservabilityMonitorRunStatusResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GetDataObservabilityMonitorRunStatusResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/GetDataObservabilityMonitorRunStatusResponseAttributes.java new file mode 100644 index 00000000000..5a60335f36f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GetDataObservabilityMonitorRunStatusResponseAttributes.java @@ -0,0 +1,189 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The attributes of a data observability monitor run status response. */ +@JsonPropertyOrder({ + GetDataObservabilityMonitorRunStatusResponseAttributes.JSON_PROPERTY_ERROR_MESSAGE, + GetDataObservabilityMonitorRunStatusResponseAttributes.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GetDataObservabilityMonitorRunStatusResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ERROR_MESSAGE = "error_message"; + private String errorMessage; + + public static final String JSON_PROPERTY_STATUS = "status"; + private DataObservabilityMonitorRunStatus status; + + public GetDataObservabilityMonitorRunStatusResponseAttributes() {} + + @JsonCreator + public GetDataObservabilityMonitorRunStatusResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) + DataObservabilityMonitorRunStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + } + + public GetDataObservabilityMonitorRunStatusResponseAttributes errorMessage(String errorMessage) { + this.errorMessage = errorMessage; + return this; + } + + /** + * Error message describing why the monitor run failed. Only present when status is error. + * + * @return errorMessage + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getErrorMessage() { + return errorMessage; + } + + public void setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + } + + public GetDataObservabilityMonitorRunStatusResponseAttributes status( + DataObservabilityMonitorRunStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * The status of a data observability monitor run. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DataObservabilityMonitorRunStatus getStatus() { + return status; + } + + public void setStatus(DataObservabilityMonitorRunStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GetDataObservabilityMonitorRunStatusResponseAttributes + */ + @JsonAnySetter + public GetDataObservabilityMonitorRunStatusResponseAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this GetDataObservabilityMonitorRunStatusResponseAttributes object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDataObservabilityMonitorRunStatusResponseAttributes + getDataObservabilityMonitorRunStatusResponseAttributes = + (GetDataObservabilityMonitorRunStatusResponseAttributes) o; + return Objects.equals( + this.errorMessage, getDataObservabilityMonitorRunStatusResponseAttributes.errorMessage) + && Objects.equals( + this.status, getDataObservabilityMonitorRunStatusResponseAttributes.status) + && Objects.equals( + this.additionalProperties, + getDataObservabilityMonitorRunStatusResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(errorMessage, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetDataObservabilityMonitorRunStatusResponseAttributes {\n"); + sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GetDataObservabilityMonitorRunStatusResponseData.java b/src/main/java/com/datadog/api/client/v2/model/GetDataObservabilityMonitorRunStatusResponseData.java new file mode 100644 index 00000000000..8f46e558f8d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GetDataObservabilityMonitorRunStatusResponseData.java @@ -0,0 +1,218 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The data object for a data observability monitor run status response. */ +@JsonPropertyOrder({ + GetDataObservabilityMonitorRunStatusResponseData.JSON_PROPERTY_ATTRIBUTES, + GetDataObservabilityMonitorRunStatusResponseData.JSON_PROPERTY_ID, + GetDataObservabilityMonitorRunStatusResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GetDataObservabilityMonitorRunStatusResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private GetDataObservabilityMonitorRunStatusResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private DataObservabilityMonitorRunType type = DataObservabilityMonitorRunType.MONITOR_RUN; + + public GetDataObservabilityMonitorRunStatusResponseData() {} + + @JsonCreator + public GetDataObservabilityMonitorRunStatusResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + GetDataObservabilityMonitorRunStatusResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + DataObservabilityMonitorRunType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public GetDataObservabilityMonitorRunStatusResponseData attributes( + GetDataObservabilityMonitorRunStatusResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The attributes of a data observability monitor run status response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GetDataObservabilityMonitorRunStatusResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(GetDataObservabilityMonitorRunStatusResponseAttributes attributes) { + this.attributes = attributes; + } + + public GetDataObservabilityMonitorRunStatusResponseData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the monitor run. + * + * @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 GetDataObservabilityMonitorRunStatusResponseData type( + DataObservabilityMonitorRunType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The JSON:API resource type for a data observability monitor run. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DataObservabilityMonitorRunType getType() { + return type; + } + + public void setType(DataObservabilityMonitorRunType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GetDataObservabilityMonitorRunStatusResponseData + */ + @JsonAnySetter + public GetDataObservabilityMonitorRunStatusResponseData putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GetDataObservabilityMonitorRunStatusResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetDataObservabilityMonitorRunStatusResponseData + getDataObservabilityMonitorRunStatusResponseData = + (GetDataObservabilityMonitorRunStatusResponseData) o; + return Objects.equals( + this.attributes, getDataObservabilityMonitorRunStatusResponseData.attributes) + && Objects.equals(this.id, getDataObservabilityMonitorRunStatusResponseData.id) + && Objects.equals(this.type, getDataObservabilityMonitorRunStatusResponseData.type) + && Objects.equals( + this.additionalProperties, + getDataObservabilityMonitorRunStatusResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetDataObservabilityMonitorRunStatusResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GlobalOrg.java b/src/main/java/com/datadog/api/client/v2/model/GlobalOrg.java new file mode 100644 index 00000000000..880e0f90698 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GlobalOrg.java @@ -0,0 +1,249 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Organization information for a global organization association. */ +@JsonPropertyOrder({ + GlobalOrg.JSON_PROPERTY_NAME, + GlobalOrg.JSON_PROPERTY_PUBLIC_ID, + GlobalOrg.JSON_PROPERTY_SUBDOMAIN, + GlobalOrg.JSON_PROPERTY_UUID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GlobalOrg { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_PUBLIC_ID = "public_id"; + private JsonNullable publicId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SUBDOMAIN = "subdomain"; + private JsonNullable subdomain = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_UUID = "uuid"; + private UUID uuid; + + public GlobalOrg() {} + + @JsonCreator + public GlobalOrg( + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_UUID) UUID uuid) { + this.name = name; + this.uuid = uuid; + } + + public GlobalOrg name(String name) { + this.name = name; + return this; + } + + /** + * The name of the organization. + * + * @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 GlobalOrg publicId(String publicId) { + this.publicId = JsonNullable.of(publicId); + return this; + } + + /** + * The public identifier of the organization. + * + * @return publicId + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getPublicId() { + return publicId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getPublicId_JsonNullable() { + return publicId; + } + + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + public void setPublicId_JsonNullable(JsonNullable publicId) { + this.publicId = publicId; + } + + public void setPublicId(String publicId) { + this.publicId = JsonNullable.of(publicId); + } + + public GlobalOrg subdomain(String subdomain) { + this.subdomain = JsonNullable.of(subdomain); + return this; + } + + /** + * The subdomain used to access the organization, if configured. + * + * @return subdomain + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getSubdomain() { + return subdomain.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SUBDOMAIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getSubdomain_JsonNullable() { + return subdomain; + } + + @JsonProperty(JSON_PROPERTY_SUBDOMAIN) + public void setSubdomain_JsonNullable(JsonNullable subdomain) { + this.subdomain = subdomain; + } + + public void setSubdomain(String subdomain) { + this.subdomain = JsonNullable.of(subdomain); + } + + public GlobalOrg uuid(UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * The UUID of the organization. + * + * @return uuid + */ + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getUuid() { + return uuid; + } + + public void setUuid(UUID uuid) { + this.uuid = uuid; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GlobalOrg + */ + @JsonAnySetter + public GlobalOrg putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GlobalOrg object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GlobalOrg globalOrg = (GlobalOrg) o; + return Objects.equals(this.name, globalOrg.name) + && Objects.equals(this.publicId, globalOrg.publicId) + && Objects.equals(this.subdomain, globalOrg.subdomain) + && Objects.equals(this.uuid, globalOrg.uuid) + && Objects.equals(this.additionalProperties, globalOrg.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, publicId, subdomain, uuid, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GlobalOrg {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" publicId: ").append(toIndentedString(publicId)).append("\n"); + sb.append(" subdomain: ").append(toIndentedString(subdomain)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GlobalOrgAttributes.java b/src/main/java/com/datadog/api/client/v2/model/GlobalOrgAttributes.java new file mode 100644 index 00000000000..cec24faa1db --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GlobalOrgAttributes.java @@ -0,0 +1,243 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes of an organization associated with the authenticated user. */ +@JsonPropertyOrder({ + GlobalOrgAttributes.JSON_PROPERTY_ORG, + GlobalOrgAttributes.JSON_PROPERTY_REDIRECT_URL, + GlobalOrgAttributes.JSON_PROPERTY_SOURCE_REGION, + GlobalOrgAttributes.JSON_PROPERTY_USER +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GlobalOrgAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ORG = "org"; + private GlobalOrg org; + + public static final String JSON_PROPERTY_REDIRECT_URL = "redirect_url"; + private JsonNullable redirectUrl = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SOURCE_REGION = "source_region"; + private String sourceRegion; + + public static final String JSON_PROPERTY_USER = "user"; + private GlobalOrgUser user; + + public GlobalOrgAttributes() {} + + @JsonCreator + public GlobalOrgAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_ORG) GlobalOrg org, + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE_REGION) String sourceRegion, + @JsonProperty(required = true, value = JSON_PROPERTY_USER) GlobalOrgUser user) { + this.org = org; + this.unparsed |= org.unparsed; + this.sourceRegion = sourceRegion; + this.user = user; + this.unparsed |= user.unparsed; + } + + public GlobalOrgAttributes org(GlobalOrg org) { + this.org = org; + this.unparsed |= org.unparsed; + return this; + } + + /** + * Organization information for a global organization association. + * + * @return org + */ + @JsonProperty(JSON_PROPERTY_ORG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GlobalOrg getOrg() { + return org; + } + + public void setOrg(GlobalOrg org) { + this.org = org; + } + + public GlobalOrgAttributes redirectUrl(String redirectUrl) { + this.redirectUrl = JsonNullable.of(redirectUrl); + return this; + } + + /** + * The login URL used to switch into the organization, if available. + * + * @return redirectUrl + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getRedirectUrl() { + return redirectUrl.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_REDIRECT_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getRedirectUrl_JsonNullable() { + return redirectUrl; + } + + @JsonProperty(JSON_PROPERTY_REDIRECT_URL) + public void setRedirectUrl_JsonNullable(JsonNullable redirectUrl) { + this.redirectUrl = redirectUrl; + } + + public void setRedirectUrl(String redirectUrl) { + this.redirectUrl = JsonNullable.of(redirectUrl); + } + + public GlobalOrgAttributes sourceRegion(String sourceRegion) { + this.sourceRegion = sourceRegion; + return this; + } + + /** + * The source region of the organization. + * + * @return sourceRegion + */ + @JsonProperty(JSON_PROPERTY_SOURCE_REGION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSourceRegion() { + return sourceRegion; + } + + public void setSourceRegion(String sourceRegion) { + this.sourceRegion = sourceRegion; + } + + public GlobalOrgAttributes user(GlobalOrgUser user) { + this.user = user; + this.unparsed |= user.unparsed; + return this; + } + + /** + * User information for a global organization association. + * + * @return user + */ + @JsonProperty(JSON_PROPERTY_USER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GlobalOrgUser getUser() { + return user; + } + + public void setUser(GlobalOrgUser user) { + this.user = user; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GlobalOrgAttributes + */ + @JsonAnySetter + public GlobalOrgAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GlobalOrgAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GlobalOrgAttributes globalOrgAttributes = (GlobalOrgAttributes) o; + return Objects.equals(this.org, globalOrgAttributes.org) + && Objects.equals(this.redirectUrl, globalOrgAttributes.redirectUrl) + && Objects.equals(this.sourceRegion, globalOrgAttributes.sourceRegion) + && Objects.equals(this.user, globalOrgAttributes.user) + && Objects.equals(this.additionalProperties, globalOrgAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(org, redirectUrl, sourceRegion, user, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GlobalOrgAttributes {\n"); + sb.append(" org: ").append(toIndentedString(org)).append("\n"); + sb.append(" redirectUrl: ").append(toIndentedString(redirectUrl)).append("\n"); + sb.append(" sourceRegion: ").append(toIndentedString(sourceRegion)).append("\n"); + sb.append(" user: ").append(toIndentedString(user)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GlobalOrgData.java b/src/main/java/com/datadog/api/client/v2/model/GlobalOrgData.java new file mode 100644 index 00000000000..dfc5e5c60d7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GlobalOrgData.java @@ -0,0 +1,178 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** An organization associated with the authenticated user. */ +@JsonPropertyOrder({GlobalOrgData.JSON_PROPERTY_ATTRIBUTES, GlobalOrgData.JSON_PROPERTY_TYPE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GlobalOrgData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private GlobalOrgAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private GlobalOrgType type; + + public GlobalOrgData() {} + + @JsonCreator + public GlobalOrgData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + GlobalOrgAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) GlobalOrgType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public GlobalOrgData attributes(GlobalOrgAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an organization associated with the authenticated user. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GlobalOrgAttributes getAttributes() { + return attributes; + } + + public void setAttributes(GlobalOrgAttributes attributes) { + this.attributes = attributes; + } + + public GlobalOrgData type(GlobalOrgType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type for global user organizations. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GlobalOrgType getType() { + return type; + } + + public void setType(GlobalOrgType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GlobalOrgData + */ + @JsonAnySetter + public GlobalOrgData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GlobalOrgData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GlobalOrgData globalOrgData = (GlobalOrgData) o; + return Objects.equals(this.attributes, globalOrgData.attributes) + && Objects.equals(this.type, globalOrgData.type) + && Objects.equals(this.additionalProperties, globalOrgData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GlobalOrgData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GlobalOrgType.java b/src/main/java/com/datadog/api/client/v2/model/GlobalOrgType.java new file mode 100644 index 00000000000..b412efc9244 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GlobalOrgType.java @@ -0,0 +1,54 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The resource type for global user organizations. */ +@JsonSerialize(using = GlobalOrgType.GlobalOrgTypeSerializer.class) +public class GlobalOrgType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("global_user_orgs")); + + public static final GlobalOrgType GLOBAL_USER_ORGS = new GlobalOrgType("global_user_orgs"); + + GlobalOrgType(String value) { + super(value, allowedValues); + } + + public static class GlobalOrgTypeSerializer extends StdSerializer { + public GlobalOrgTypeSerializer(Class t) { + super(t); + } + + public GlobalOrgTypeSerializer() { + this(null); + } + + @Override + public void serialize(GlobalOrgType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static GlobalOrgType fromValue(String value) { + return new GlobalOrgType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GlobalOrgUser.java b/src/main/java/com/datadog/api/client/v2/model/GlobalOrgUser.java new file mode 100644 index 00000000000..243fe81ecc7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GlobalOrgUser.java @@ -0,0 +1,171 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** User information for a global organization association. */ +@JsonPropertyOrder({GlobalOrgUser.JSON_PROPERTY_HANDLE, GlobalOrgUser.JSON_PROPERTY_UUID}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GlobalOrgUser { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_HANDLE = "handle"; + private String handle; + + public static final String JSON_PROPERTY_UUID = "uuid"; + private UUID uuid; + + public GlobalOrgUser() {} + + @JsonCreator + public GlobalOrgUser( + @JsonProperty(required = true, value = JSON_PROPERTY_HANDLE) String handle, + @JsonProperty(required = true, value = JSON_PROPERTY_UUID) UUID uuid) { + this.handle = handle; + this.uuid = uuid; + } + + public GlobalOrgUser handle(String handle) { + this.handle = handle; + return this; + } + + /** + * The handle of the user. + * + * @return handle + */ + @JsonProperty(JSON_PROPERTY_HANDLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getHandle() { + return handle; + } + + public void setHandle(String handle) { + this.handle = handle; + } + + public GlobalOrgUser uuid(UUID uuid) { + this.uuid = uuid; + return this; + } + + /** + * The UUID of the user. + * + * @return uuid + */ + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UUID getUuid() { + return uuid; + } + + public void setUuid(UUID uuid) { + this.uuid = uuid; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GlobalOrgUser + */ + @JsonAnySetter + public GlobalOrgUser putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GlobalOrgUser object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GlobalOrgUser globalOrgUser = (GlobalOrgUser) o; + return Objects.equals(this.handle, globalOrgUser.handle) + && Objects.equals(this.uuid, globalOrgUser.uuid) + && Objects.equals(this.additionalProperties, globalOrgUser.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(handle, uuid, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GlobalOrgUser {\n"); + sb.append(" handle: ").append(toIndentedString(handle)).append("\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GlobalOrgsLinks.java b/src/main/java/com/datadog/api/client/v2/model/GlobalOrgsLinks.java new file mode 100644 index 00000000000..fa127e6f979 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GlobalOrgsLinks.java @@ -0,0 +1,212 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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 org.openapitools.jackson.nullable.JsonNullable; + +/** Pagination links. */ +@JsonPropertyOrder({ + GlobalOrgsLinks.JSON_PROPERTY_NEXT, + GlobalOrgsLinks.JSON_PROPERTY_PREV, + GlobalOrgsLinks.JSON_PROPERTY_SELF +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GlobalOrgsLinks { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_NEXT = "next"; + private JsonNullable next = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PREV = "prev"; + private JsonNullable prev = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SELF = "self"; + private String self; + + public GlobalOrgsLinks next(String next) { + this.next = JsonNullable.of(next); + return this; + } + + /** + * Link to the next page. + * + * @return next + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getNext() { + return next.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getNext_JsonNullable() { + return next; + } + + @JsonProperty(JSON_PROPERTY_NEXT) + public void setNext_JsonNullable(JsonNullable next) { + this.next = next; + } + + public void setNext(String next) { + this.next = JsonNullable.of(next); + } + + public GlobalOrgsLinks prev(String prev) { + this.prev = JsonNullable.of(prev); + return this; + } + + /** + * Link to the previous page. + * + * @return prev + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getPrev() { + return prev.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PREV) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getPrev_JsonNullable() { + return 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 GlobalOrgsLinks self(String self) { + this.self = self; + return this; + } + + /** + * Link to the current page. + * + * @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; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GlobalOrgsLinks + */ + @JsonAnySetter + public GlobalOrgsLinks putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GlobalOrgsLinks object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GlobalOrgsLinks globalOrgsLinks = (GlobalOrgsLinks) o; + return Objects.equals(this.next, globalOrgsLinks.next) + && Objects.equals(this.prev, globalOrgsLinks.prev) + && Objects.equals(this.self, globalOrgsLinks.self) + && Objects.equals(this.additionalProperties, globalOrgsLinks.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(next, prev, self, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GlobalOrgsLinks {\n"); + sb.append(" next: ").append(toIndentedString(next)).append("\n"); + sb.append(" prev: ").append(toIndentedString(prev)).append("\n"); + sb.append(" self: ").append(toIndentedString(self)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GlobalOrgsMeta.java b/src/main/java/com/datadog/api/client/v2/model/GlobalOrgsMeta.java new file mode 100644 index 00000000000..97650c6aab2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GlobalOrgsMeta.java @@ -0,0 +1,136 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response metadata object. */ +@JsonPropertyOrder({GlobalOrgsMeta.JSON_PROPERTY_PAGE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GlobalOrgsMeta { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_PAGE = "page"; + private GlobalOrgsMetaPage page; + + public GlobalOrgsMeta page(GlobalOrgsMetaPage page) { + this.page = page; + this.unparsed |= page.unparsed; + return this; + } + + /** + * Paging attributes. + * + * @return page + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public GlobalOrgsMetaPage getPage() { + return page; + } + + public void setPage(GlobalOrgsMetaPage page) { + this.page = page; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GlobalOrgsMeta + */ + @JsonAnySetter + public GlobalOrgsMeta putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GlobalOrgsMeta object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GlobalOrgsMeta globalOrgsMeta = (GlobalOrgsMeta) o; + return Objects.equals(this.page, globalOrgsMeta.page) + && Objects.equals(this.additionalProperties, globalOrgsMeta.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(page, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GlobalOrgsMeta {\n"); + sb.append(" page: ").append(toIndentedString(page)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GlobalOrgsMetaPage.java b/src/main/java/com/datadog/api/client/v2/model/GlobalOrgsMetaPage.java new file mode 100644 index 00000000000..2a09a290940 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GlobalOrgsMetaPage.java @@ -0,0 +1,270 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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 org.openapitools.jackson.nullable.JsonNullable; + +/** Paging attributes. */ +@JsonPropertyOrder({ + GlobalOrgsMetaPage.JSON_PROPERTY_CURSOR, + GlobalOrgsMetaPage.JSON_PROPERTY_LIMIT, + GlobalOrgsMetaPage.JSON_PROPERTY_NEXT_CURSOR, + GlobalOrgsMetaPage.JSON_PROPERTY_PREV_CURSOR, + GlobalOrgsMetaPage.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GlobalOrgsMetaPage { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CURSOR = "cursor"; + private String cursor; + + public static final String JSON_PROPERTY_LIMIT = "limit"; + private Integer limit; + + public static final String JSON_PROPERTY_NEXT_CURSOR = "next_cursor"; + private JsonNullable nextCursor = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_PREV_CURSOR = "prev_cursor"; + private JsonNullable prevCursor = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TYPE = "type"; + private GlobalOrgsMetaPageType type; + + public GlobalOrgsMetaPage cursor(String cursor) { + this.cursor = cursor; + return this; + } + + /** + * The cursor used to get the current results, if any. + * + * @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 GlobalOrgsMetaPage limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * Number of results returned. maximum: 1000 + * + * @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 GlobalOrgsMetaPage nextCursor(String nextCursor) { + this.nextCursor = JsonNullable.of(nextCursor); + return this; + } + + /** + * The cursor used to get the next results, if any. + * + * @return nextCursor + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getNextCursor() { + return nextCursor.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT_CURSOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getNextCursor_JsonNullable() { + return nextCursor; + } + + @JsonProperty(JSON_PROPERTY_NEXT_CURSOR) + public void setNextCursor_JsonNullable(JsonNullable nextCursor) { + this.nextCursor = nextCursor; + } + + public void setNextCursor(String nextCursor) { + this.nextCursor = JsonNullable.of(nextCursor); + } + + public GlobalOrgsMetaPage prevCursor(String prevCursor) { + this.prevCursor = JsonNullable.of(prevCursor); + return this; + } + + /** + * The cursor used to get the previous results, if any. + * + * @return prevCursor + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getPrevCursor() { + return prevCursor.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PREV_CURSOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getPrevCursor_JsonNullable() { + return prevCursor; + } + + @JsonProperty(JSON_PROPERTY_PREV_CURSOR) + public void setPrevCursor_JsonNullable(JsonNullable prevCursor) { + this.prevCursor = prevCursor; + } + + public void setPrevCursor(String prevCursor) { + this.prevCursor = JsonNullable.of(prevCursor); + } + + public GlobalOrgsMetaPage type(GlobalOrgsMetaPageType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Type of global orgs pagination. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public GlobalOrgsMetaPageType getType() { + return type; + } + + public void setType(GlobalOrgsMetaPageType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GlobalOrgsMetaPage + */ + @JsonAnySetter + public GlobalOrgsMetaPage putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GlobalOrgsMetaPage object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GlobalOrgsMetaPage globalOrgsMetaPage = (GlobalOrgsMetaPage) o; + return Objects.equals(this.cursor, globalOrgsMetaPage.cursor) + && Objects.equals(this.limit, globalOrgsMetaPage.limit) + && Objects.equals(this.nextCursor, globalOrgsMetaPage.nextCursor) + && Objects.equals(this.prevCursor, globalOrgsMetaPage.prevCursor) + && Objects.equals(this.type, globalOrgsMetaPage.type) + && Objects.equals(this.additionalProperties, globalOrgsMetaPage.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(cursor, limit, nextCursor, prevCursor, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GlobalOrgsMetaPage {\n"); + sb.append(" cursor: ").append(toIndentedString(cursor)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" nextCursor: ").append(toIndentedString(nextCursor)).append("\n"); + sb.append(" prevCursor: ").append(toIndentedString(prevCursor)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GlobalOrgsMetaPageType.java b/src/main/java/com/datadog/api/client/v2/model/GlobalOrgsMetaPageType.java new file mode 100644 index 00000000000..68f90d7b655 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GlobalOrgsMetaPageType.java @@ -0,0 +1,55 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Type of global orgs pagination. */ +@JsonSerialize(using = GlobalOrgsMetaPageType.GlobalOrgsMetaPageTypeSerializer.class) +public class GlobalOrgsMetaPageType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("cursor")); + + public static final GlobalOrgsMetaPageType CURSOR = new GlobalOrgsMetaPageType("cursor"); + + GlobalOrgsMetaPageType(String value) { + super(value, allowedValues); + } + + public static class GlobalOrgsMetaPageTypeSerializer + extends StdSerializer { + public GlobalOrgsMetaPageTypeSerializer(Class t) { + super(t); + } + + public GlobalOrgsMetaPageTypeSerializer() { + this(null); + } + + @Override + public void serialize( + GlobalOrgsMetaPageType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static GlobalOrgsMetaPageType fromValue(String value) { + return new GlobalOrgsMetaPageType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServicesResponse.java b/src/main/java/com/datadog/api/client/v2/model/GlobalOrgsResponse.java similarity index 64% rename from src/main/java/com/datadog/api/client/v2/model/IncidentServicesResponse.java rename to src/main/java/com/datadog/api/client/v2/model/GlobalOrgsResponse.java index fb083e744af..a2f94e64336 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentServicesResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/GlobalOrgsResponse.java @@ -19,87 +19,106 @@ import java.util.Map; import java.util.Objects; -/** Response with a list of incident service payloads. */ +/** Response containing organizations across regions for the authenticated user. */ @JsonPropertyOrder({ - IncidentServicesResponse.JSON_PROPERTY_DATA, - IncidentServicesResponse.JSON_PROPERTY_INCLUDED, - IncidentServicesResponse.JSON_PROPERTY_META + GlobalOrgsResponse.JSON_PROPERTY_DATA, + GlobalOrgsResponse.JSON_PROPERTY_LINKS, + GlobalOrgsResponse.JSON_PROPERTY_META }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class IncidentServicesResponse { +public class GlobalOrgsResponse { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private List data = new ArrayList<>(); + private List data = new ArrayList<>(); - public static final String JSON_PROPERTY_INCLUDED = "included"; - private List included = null; + public static final String JSON_PROPERTY_LINKS = "links"; + private GlobalOrgsLinks links; public static final String JSON_PROPERTY_META = "meta"; - private IncidentResponseMeta meta; + private GlobalOrgsMeta meta; - public IncidentServicesResponse() {} + public GlobalOrgsResponse() {} @JsonCreator - public IncidentServicesResponse( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - List data) { + public GlobalOrgsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) { this.data = data; } - public IncidentServicesResponse data(List data) { + public GlobalOrgsResponse data(List data) { this.data = data; - for (IncidentServiceResponseData item : data) { + for (GlobalOrgData item : data) { this.unparsed |= item.unparsed; } return this; } - public IncidentServicesResponse addDataItem(IncidentServiceResponseData dataItem) { + public GlobalOrgsResponse addDataItem(GlobalOrgData dataItem) { this.data.add(dataItem); this.unparsed |= dataItem.unparsed; return this; } /** - * An array of incident services. + * Organizations across regions for the authenticated user. * * @return data */ @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public List getData() { + public List getData() { return data; } - public void setData(List data) { + public void setData(List data) { this.data = data; } + public GlobalOrgsResponse links(GlobalOrgsLinks links) { + this.links = links; + this.unparsed |= links.unparsed; + return this; + } + /** - * Included related resources which the user requested. + * Pagination links. * - * @return included + * @return links */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonProperty(JSON_PROPERTY_LINKS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIncluded() { - return included; + public GlobalOrgsLinks getLinks() { + return links; + } + + public void setLinks(GlobalOrgsLinks links) { + this.links = links; + } + + public GlobalOrgsResponse meta(GlobalOrgsMeta meta) { + this.meta = meta; + this.unparsed |= meta.unparsed; + return this; } /** - * The metadata object containing pagination metadata. + * Response metadata object. * * @return meta */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_META) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentResponseMeta getMeta() { + public GlobalOrgsMeta getMeta() { return meta; } + public void setMeta(GlobalOrgsMeta meta) { + this.meta = meta; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -112,10 +131,10 @@ public IncidentResponseMeta getMeta() { * * @param key The arbitrary key to set * @param value The associated value - * @return IncidentServicesResponse + * @return GlobalOrgsResponse */ @JsonAnySetter - public IncidentServicesResponse putAdditionalProperty(String key, Object value) { + public GlobalOrgsResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -146,7 +165,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this IncidentServicesResponse object is equal to o. */ + /** Return true if this GlobalOrgsResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -155,24 +174,24 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { 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) - && Objects.equals(this.additionalProperties, incidentServicesResponse.additionalProperties); + GlobalOrgsResponse globalOrgsResponse = (GlobalOrgsResponse) o; + return Objects.equals(this.data, globalOrgsResponse.data) + && Objects.equals(this.links, globalOrgsResponse.links) + && Objects.equals(this.meta, globalOrgsResponse.meta) + && Objects.equals(this.additionalProperties, globalOrgsResponse.additionalProperties); } @Override public int hashCode() { - return Objects.hash(data, included, meta, additionalProperties); + return Objects.hash(data, links, meta, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class IncidentServicesResponse {\n"); + sb.append("class GlobalOrgsResponse {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatDelegatedUserAttributes.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatDelegatedUserAttributes.java new file mode 100644 index 00000000000..99fb007070a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatDelegatedUserAttributes.java @@ -0,0 +1,203 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import 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; + +/** Google Chat delegated user attributes. */ +@JsonPropertyOrder({ + GoogleChatDelegatedUserAttributes.JSON_PROPERTY_DISPLAY_NAME, + GoogleChatDelegatedUserAttributes.JSON_PROPERTY_EMAIL, + GoogleChatDelegatedUserAttributes.JSON_PROPERTY_FEATURES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatDelegatedUserAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DISPLAY_NAME = "display_name"; + private String displayName; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_FEATURES = "features"; + private List features = null; + + public GoogleChatDelegatedUserAttributes displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * The delegated user's display name. + * + * @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 GoogleChatDelegatedUserAttributes email(String email) { + this.email = email; + return this; + } + + /** + * The delegated user's email address. + * + * @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 GoogleChatDelegatedUserAttributes features(List features) { + this.features = features; + return this; + } + + public GoogleChatDelegatedUserAttributes addFeaturesItem(String featuresItem) { + if (this.features == null) { + this.features = new ArrayList<>(); + } + this.features.add(featuresItem); + return this; + } + + /** + * The list of features enabled for the delegated user. + * + * @return features + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FEATURES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getFeatures() { + return features; + } + + public void setFeatures(List features) { + this.features = features; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatDelegatedUserAttributes + */ + @JsonAnySetter + public GoogleChatDelegatedUserAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GoogleChatDelegatedUserAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatDelegatedUserAttributes googleChatDelegatedUserAttributes = + (GoogleChatDelegatedUserAttributes) o; + return Objects.equals(this.displayName, googleChatDelegatedUserAttributes.displayName) + && Objects.equals(this.email, googleChatDelegatedUserAttributes.email) + && Objects.equals(this.features, googleChatDelegatedUserAttributes.features) + && Objects.equals( + this.additionalProperties, googleChatDelegatedUserAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(displayName, email, features, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatDelegatedUserAttributes {\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" features: ").append(toIndentedString(features)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatDelegatedUserData.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatDelegatedUserData.java new file mode 100644 index 00000000000..3e8d1a00a62 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatDelegatedUserData.java @@ -0,0 +1,198 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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; + +/** Google Chat delegated user data from a response. */ +@JsonPropertyOrder({ + GoogleChatDelegatedUserData.JSON_PROPERTY_ATTRIBUTES, + GoogleChatDelegatedUserData.JSON_PROPERTY_ID, + GoogleChatDelegatedUserData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatDelegatedUserData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private GoogleChatDelegatedUserAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private GoogleChatDelegatedUserType type = + GoogleChatDelegatedUserType.GOOGLE_CHAT_DELEGATED_USER_TYPE; + + public GoogleChatDelegatedUserData attributes(GoogleChatDelegatedUserAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Google Chat delegated user attributes. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public GoogleChatDelegatedUserAttributes getAttributes() { + return attributes; + } + + public void setAttributes(GoogleChatDelegatedUserAttributes attributes) { + this.attributes = attributes; + } + + public GoogleChatDelegatedUserData id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the delegated user. + * + * @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 GoogleChatDelegatedUserData type(GoogleChatDelegatedUserType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Google Chat delegated user resource type. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public GoogleChatDelegatedUserType getType() { + return type; + } + + public void setType(GoogleChatDelegatedUserType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatDelegatedUserData + */ + @JsonAnySetter + public GoogleChatDelegatedUserData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GoogleChatDelegatedUserData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatDelegatedUserData googleChatDelegatedUserData = (GoogleChatDelegatedUserData) o; + return Objects.equals(this.attributes, googleChatDelegatedUserData.attributes) + && Objects.equals(this.id, googleChatDelegatedUserData.id) + && Objects.equals(this.type, googleChatDelegatedUserData.type) + && Objects.equals( + this.additionalProperties, googleChatDelegatedUserData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatDelegatedUserData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatDelegatedUserResponse.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatDelegatedUserResponse.java new file mode 100644 index 00000000000..6e1cb2d716e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatDelegatedUserResponse.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing a Google Chat delegated user. */ +@JsonPropertyOrder({GoogleChatDelegatedUserResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatDelegatedUserResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private GoogleChatDelegatedUserData data; + + public GoogleChatDelegatedUserResponse() {} + + @JsonCreator + public GoogleChatDelegatedUserResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) GoogleChatDelegatedUserData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public GoogleChatDelegatedUserResponse data(GoogleChatDelegatedUserData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Google Chat delegated user data from a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GoogleChatDelegatedUserData getData() { + return data; + } + + public void setData(GoogleChatDelegatedUserData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatDelegatedUserResponse + */ + @JsonAnySetter + public GoogleChatDelegatedUserResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GoogleChatDelegatedUserResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatDelegatedUserResponse googleChatDelegatedUserResponse = + (GoogleChatDelegatedUserResponse) o; + return Objects.equals(this.data, googleChatDelegatedUserResponse.data) + && Objects.equals( + this.additionalProperties, googleChatDelegatedUserResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatDelegatedUserResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatDelegatedUserType.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatDelegatedUserType.java new file mode 100644 index 00000000000..97c21d2f8ec --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatDelegatedUserType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Google Chat delegated user resource type. */ +@JsonSerialize(using = GoogleChatDelegatedUserType.GoogleChatDelegatedUserTypeSerializer.class) +public class GoogleChatDelegatedUserType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("google-chat-delegated-user")); + + public static final GoogleChatDelegatedUserType GOOGLE_CHAT_DELEGATED_USER_TYPE = + new GoogleChatDelegatedUserType("google-chat-delegated-user"); + + GoogleChatDelegatedUserType(String value) { + super(value, allowedValues); + } + + public static class GoogleChatDelegatedUserTypeSerializer + extends StdSerializer { + public GoogleChatDelegatedUserTypeSerializer(Class t) { + super(t); + } + + public GoogleChatDelegatedUserTypeSerializer() { + this(null); + } + + @Override + public void serialize( + GoogleChatDelegatedUserType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static GoogleChatDelegatedUserType fromValue(String value) { + return new GoogleChatDelegatedUserType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceRelationships.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationAttributes.java similarity index 59% rename from src/main/java/com/datadog/api/client/v2/model/IncidentServiceRelationships.java rename to src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationAttributes.java index 130776c7f58..982394f7042 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceRelationships.java +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationAttributes.java @@ -16,63 +16,61 @@ import java.util.Map; import java.util.Objects; -/** The incident service's relationships. */ +/** Google Chat organization attributes. */ @JsonPropertyOrder({ - IncidentServiceRelationships.JSON_PROPERTY_CREATED_BY, - IncidentServiceRelationships.JSON_PROPERTY_LAST_MODIFIED_BY + GoogleChatOrganizationAttributes.JSON_PROPERTY_DOMAIN_ID, + GoogleChatOrganizationAttributes.JSON_PROPERTY_DOMAIN_NAME }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class IncidentServiceRelationships { +public class GoogleChatOrganizationAttributes { @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_CREATED_BY = "created_by"; - private RelationshipToUser createdBy; + public static final String JSON_PROPERTY_DOMAIN_ID = "domain_id"; + private String domainId; - public static final String JSON_PROPERTY_LAST_MODIFIED_BY = "last_modified_by"; - private RelationshipToUser lastModifiedBy; + public static final String JSON_PROPERTY_DOMAIN_NAME = "domain_name"; + private String domainName; - public IncidentServiceRelationships createdBy(RelationshipToUser createdBy) { - this.createdBy = createdBy; - this.unparsed |= createdBy.unparsed; + public GoogleChatOrganizationAttributes domainId(String domainId) { + this.domainId = domainId; return this; } /** - * Relationship to user. + * The Google Chat organization domain ID. * - * @return createdBy + * @return domainId */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonProperty(JSON_PROPERTY_DOMAIN_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToUser getCreatedBy() { - return createdBy; + public String getDomainId() { + return domainId; } - public void setCreatedBy(RelationshipToUser createdBy) { - this.createdBy = createdBy; + public void setDomainId(String domainId) { + this.domainId = domainId; } - public IncidentServiceRelationships lastModifiedBy(RelationshipToUser lastModifiedBy) { - this.lastModifiedBy = lastModifiedBy; - this.unparsed |= lastModifiedBy.unparsed; + public GoogleChatOrganizationAttributes domainName(String domainName) { + this.domainName = domainName; return this; } /** - * Relationship to user. + * The Google Chat organization domain name. * - * @return lastModifiedBy + * @return domainName */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAST_MODIFIED_BY) + @JsonProperty(JSON_PROPERTY_DOMAIN_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RelationshipToUser getLastModifiedBy() { - return lastModifiedBy; + public String getDomainName() { + return domainName; } - public void setLastModifiedBy(RelationshipToUser lastModifiedBy) { - this.lastModifiedBy = lastModifiedBy; + public void setDomainName(String domainName) { + this.domainName = domainName; } /** @@ -87,10 +85,10 @@ public void setLastModifiedBy(RelationshipToUser lastModifiedBy) { * * @param key The arbitrary key to set * @param value The associated value - * @return IncidentServiceRelationships + * @return GoogleChatOrganizationAttributes */ @JsonAnySetter - public IncidentServiceRelationships putAdditionalProperty(String key, Object value) { + public GoogleChatOrganizationAttributes putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -121,7 +119,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this IncidentServiceRelationships object is equal to o. */ + /** Return true if this GoogleChatOrganizationAttributes object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -130,24 +128,25 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentServiceRelationships incidentServiceRelationships = (IncidentServiceRelationships) o; - return Objects.equals(this.createdBy, incidentServiceRelationships.createdBy) - && Objects.equals(this.lastModifiedBy, incidentServiceRelationships.lastModifiedBy) + GoogleChatOrganizationAttributes googleChatOrganizationAttributes = + (GoogleChatOrganizationAttributes) o; + return Objects.equals(this.domainId, googleChatOrganizationAttributes.domainId) + && Objects.equals(this.domainName, googleChatOrganizationAttributes.domainName) && Objects.equals( - this.additionalProperties, incidentServiceRelationships.additionalProperties); + this.additionalProperties, googleChatOrganizationAttributes.additionalProperties); } @Override public int hashCode() { - return Objects.hash(createdBy, lastModifiedBy, additionalProperties); + return Objects.hash(domainId, domainName, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class IncidentServiceRelationships {\n"); - sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); - sb.append(" lastModifiedBy: ").append(toIndentedString(lastModifiedBy)).append("\n"); + sb.append("class GoogleChatOrganizationAttributes {\n"); + sb.append(" domainId: ").append(toIndentedString(domainId)).append("\n"); + sb.append(" domainName: ").append(toIndentedString(domainName)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationData.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationData.java new file mode 100644 index 00000000000..4b303e44014 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationData.java @@ -0,0 +1,227 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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; + +/** Google Chat organization data from a response. */ +@JsonPropertyOrder({ + GoogleChatOrganizationData.JSON_PROPERTY_ATTRIBUTES, + GoogleChatOrganizationData.JSON_PROPERTY_ID, + GoogleChatOrganizationData.JSON_PROPERTY_RELATIONSHIPS, + GoogleChatOrganizationData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatOrganizationData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private GoogleChatOrganizationAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private GoogleChatOrganizationRelationships relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private GoogleChatOrganizationType type = + GoogleChatOrganizationType.GOOGLE_CHAT_ORGANIZATION_TYPE; + + public GoogleChatOrganizationData attributes(GoogleChatOrganizationAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Google Chat organization attributes. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public GoogleChatOrganizationAttributes getAttributes() { + return attributes; + } + + public void setAttributes(GoogleChatOrganizationAttributes attributes) { + this.attributes = attributes; + } + + public GoogleChatOrganizationData id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the Google Chat organization binding. + * + * @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 GoogleChatOrganizationData relationships( + GoogleChatOrganizationRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Google Chat organization relationships. + * + * @return relationships + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public GoogleChatOrganizationRelationships getRelationships() { + return relationships; + } + + public void setRelationships(GoogleChatOrganizationRelationships relationships) { + this.relationships = relationships; + } + + public GoogleChatOrganizationData type(GoogleChatOrganizationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Google Chat organization resource type. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public GoogleChatOrganizationType getType() { + return type; + } + + public void setType(GoogleChatOrganizationType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatOrganizationData + */ + @JsonAnySetter + public GoogleChatOrganizationData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GoogleChatOrganizationData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatOrganizationData googleChatOrganizationData = (GoogleChatOrganizationData) o; + return Objects.equals(this.attributes, googleChatOrganizationData.attributes) + && Objects.equals(this.id, googleChatOrganizationData.id) + && Objects.equals(this.relationships, googleChatOrganizationData.relationships) + && Objects.equals(this.type, googleChatOrganizationData.type) + && Objects.equals( + this.additionalProperties, googleChatOrganizationData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatOrganizationData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationRelationships.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationRelationships.java new file mode 100644 index 00000000000..1937651e8c9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationRelationships.java @@ -0,0 +1,139 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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; + +/** Google Chat organization relationships. */ +@JsonPropertyOrder({GoogleChatOrganizationRelationships.JSON_PROPERTY_DELEGATED_USER}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatOrganizationRelationships { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DELEGATED_USER = "delegated_user"; + private GoogleChatOrganizationRelationshipsDelegatedUser delegatedUser; + + public GoogleChatOrganizationRelationships delegatedUser( + GoogleChatOrganizationRelationshipsDelegatedUser delegatedUser) { + this.delegatedUser = delegatedUser; + this.unparsed |= delegatedUser.unparsed; + return this; + } + + /** + * The delegated user relationship. + * + * @return delegatedUser + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DELEGATED_USER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public GoogleChatOrganizationRelationshipsDelegatedUser getDelegatedUser() { + return delegatedUser; + } + + public void setDelegatedUser(GoogleChatOrganizationRelationshipsDelegatedUser delegatedUser) { + this.delegatedUser = delegatedUser; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatOrganizationRelationships + */ + @JsonAnySetter + public GoogleChatOrganizationRelationships putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GoogleChatOrganizationRelationships object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatOrganizationRelationships googleChatOrganizationRelationships = + (GoogleChatOrganizationRelationships) o; + return Objects.equals(this.delegatedUser, googleChatOrganizationRelationships.delegatedUser) + && Objects.equals( + this.additionalProperties, googleChatOrganizationRelationships.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(delegatedUser, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatOrganizationRelationships {\n"); + sb.append(" delegatedUser: ").append(toIndentedString(delegatedUser)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationRelationshipsDelegatedUser.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationRelationshipsDelegatedUser.java new file mode 100644 index 00000000000..abdf60e87f3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationRelationshipsDelegatedUser.java @@ -0,0 +1,142 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The delegated user relationship. */ +@JsonPropertyOrder({GoogleChatOrganizationRelationshipsDelegatedUser.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatOrganizationRelationshipsDelegatedUser { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private GoogleChatOrganizationRelationshipsDelegatedUserData data; + + public GoogleChatOrganizationRelationshipsDelegatedUser data( + GoogleChatOrganizationRelationshipsDelegatedUserData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Delegated user relationship data. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public GoogleChatOrganizationRelationshipsDelegatedUserData getData() { + return data; + } + + public void setData(GoogleChatOrganizationRelationshipsDelegatedUserData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatOrganizationRelationshipsDelegatedUser + */ + @JsonAnySetter + public GoogleChatOrganizationRelationshipsDelegatedUser putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GoogleChatOrganizationRelationshipsDelegatedUser object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatOrganizationRelationshipsDelegatedUser + googleChatOrganizationRelationshipsDelegatedUser = + (GoogleChatOrganizationRelationshipsDelegatedUser) o; + return Objects.equals(this.data, googleChatOrganizationRelationshipsDelegatedUser.data) + && Objects.equals( + this.additionalProperties, + googleChatOrganizationRelationshipsDelegatedUser.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatOrganizationRelationshipsDelegatedUser {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationRelationshipsDelegatedUserData.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationRelationshipsDelegatedUserData.java new file mode 100644 index 00000000000..bd191724e9e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationRelationshipsDelegatedUserData.java @@ -0,0 +1,177 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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; + +/** Delegated user relationship data. */ +@JsonPropertyOrder({ + GoogleChatOrganizationRelationshipsDelegatedUserData.JSON_PROPERTY_ID, + GoogleChatOrganizationRelationshipsDelegatedUserData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatOrganizationRelationshipsDelegatedUserData { + @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 GoogleChatDelegatedUserType type = + GoogleChatDelegatedUserType.GOOGLE_CHAT_DELEGATED_USER_TYPE; + + public GoogleChatOrganizationRelationshipsDelegatedUserData id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the delegated user. + * + * @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 GoogleChatOrganizationRelationshipsDelegatedUserData type( + GoogleChatDelegatedUserType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Google Chat delegated user resource type. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public GoogleChatDelegatedUserType getType() { + return type; + } + + public void setType(GoogleChatDelegatedUserType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatOrganizationRelationshipsDelegatedUserData + */ + @JsonAnySetter + public GoogleChatOrganizationRelationshipsDelegatedUserData putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this GoogleChatOrganizationRelationshipsDelegatedUserData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatOrganizationRelationshipsDelegatedUserData + googleChatOrganizationRelationshipsDelegatedUserData = + (GoogleChatOrganizationRelationshipsDelegatedUserData) o; + return Objects.equals(this.id, googleChatOrganizationRelationshipsDelegatedUserData.id) + && Objects.equals(this.type, googleChatOrganizationRelationshipsDelegatedUserData.type) + && Objects.equals( + this.additionalProperties, + googleChatOrganizationRelationshipsDelegatedUserData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatOrganizationRelationshipsDelegatedUserData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationResponse.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationResponse.java new file mode 100644 index 00000000000..7e10dc20104 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationResponse.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing a Google Chat organization binding. */ +@JsonPropertyOrder({GoogleChatOrganizationResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatOrganizationResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private GoogleChatOrganizationData data; + + public GoogleChatOrganizationResponse() {} + + @JsonCreator + public GoogleChatOrganizationResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) GoogleChatOrganizationData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public GoogleChatOrganizationResponse data(GoogleChatOrganizationData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Google Chat organization data from a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GoogleChatOrganizationData getData() { + return data; + } + + public void setData(GoogleChatOrganizationData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatOrganizationResponse + */ + @JsonAnySetter + public GoogleChatOrganizationResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GoogleChatOrganizationResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatOrganizationResponse googleChatOrganizationResponse = + (GoogleChatOrganizationResponse) o; + return Objects.equals(this.data, googleChatOrganizationResponse.data) + && Objects.equals( + this.additionalProperties, googleChatOrganizationResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatOrganizationResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationType.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationType.java new file mode 100644 index 00000000000..3b1f688ab02 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Google Chat organization resource type. */ +@JsonSerialize(using = GoogleChatOrganizationType.GoogleChatOrganizationTypeSerializer.class) +public class GoogleChatOrganizationType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("google-chat-organization")); + + public static final GoogleChatOrganizationType GOOGLE_CHAT_ORGANIZATION_TYPE = + new GoogleChatOrganizationType("google-chat-organization"); + + GoogleChatOrganizationType(String value) { + super(value, allowedValues); + } + + public static class GoogleChatOrganizationTypeSerializer + extends StdSerializer { + public GoogleChatOrganizationTypeSerializer(Class t) { + super(t); + } + + public GoogleChatOrganizationTypeSerializer() { + this(null); + } + + @Override + public void serialize( + GoogleChatOrganizationType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static GoogleChatOrganizationType fromValue(String value) { + return new GoogleChatOrganizationType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationsResponse.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationsResponse.java new file mode 100644 index 00000000000..eb4c1d83695 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatOrganizationsResponse.java @@ -0,0 +1,157 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing a list of Google Chat organization bindings. */ +@JsonPropertyOrder({GoogleChatOrganizationsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatOrganizationsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public GoogleChatOrganizationsResponse() {} + + @JsonCreator + public GoogleChatOrganizationsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public GoogleChatOrganizationsResponse data(List data) { + this.data = data; + for (GoogleChatOrganizationData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public GoogleChatOrganizationsResponse addDataItem(GoogleChatOrganizationData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * An array of Google Chat organization bindings. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatOrganizationsResponse + */ + @JsonAnySetter + public GoogleChatOrganizationsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GoogleChatOrganizationsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatOrganizationsResponse googleChatOrganizationsResponse = + (GoogleChatOrganizationsResponse) o; + return Objects.equals(this.data, googleChatOrganizationsResponse.data) + && Objects.equals( + this.additionalProperties, googleChatOrganizationsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatOrganizationsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceAttributes.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceAttributes.java new file mode 100644 index 00000000000..0ea03a1e179 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceAttributes.java @@ -0,0 +1,175 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Google Chat target audience attributes. */ +@JsonPropertyOrder({ + GoogleChatTargetAudienceAttributes.JSON_PROPERTY_AUDIENCE_ID, + GoogleChatTargetAudienceAttributes.JSON_PROPERTY_AUDIENCE_NAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatTargetAudienceAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUDIENCE_ID = "audience_id"; + private String audienceId; + + public static final String JSON_PROPERTY_AUDIENCE_NAME = "audience_name"; + private String audienceName; + + public GoogleChatTargetAudienceAttributes() {} + + @JsonCreator + public GoogleChatTargetAudienceAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_AUDIENCE_ID) String audienceId, + @JsonProperty(required = true, value = JSON_PROPERTY_AUDIENCE_NAME) String audienceName) { + this.audienceId = audienceId; + this.audienceName = audienceName; + } + + public GoogleChatTargetAudienceAttributes audienceId(String audienceId) { + this.audienceId = audienceId; + return this; + } + + /** + * The audience ID. + * + * @return audienceId + */ + @JsonProperty(JSON_PROPERTY_AUDIENCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAudienceId() { + return audienceId; + } + + public void setAudienceId(String audienceId) { + this.audienceId = audienceId; + } + + public GoogleChatTargetAudienceAttributes audienceName(String audienceName) { + this.audienceName = audienceName; + return this; + } + + /** + * The audience name. + * + * @return audienceName + */ + @JsonProperty(JSON_PROPERTY_AUDIENCE_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAudienceName() { + return audienceName; + } + + public void setAudienceName(String audienceName) { + this.audienceName = audienceName; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatTargetAudienceAttributes + */ + @JsonAnySetter + public GoogleChatTargetAudienceAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GoogleChatTargetAudienceAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatTargetAudienceAttributes googleChatTargetAudienceAttributes = + (GoogleChatTargetAudienceAttributes) o; + return Objects.equals(this.audienceId, googleChatTargetAudienceAttributes.audienceId) + && Objects.equals(this.audienceName, googleChatTargetAudienceAttributes.audienceName) + && Objects.equals( + this.additionalProperties, googleChatTargetAudienceAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(audienceId, audienceName, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatTargetAudienceAttributes {\n"); + sb.append(" audienceId: ").append(toIndentedString(audienceId)).append("\n"); + sb.append(" audienceName: ").append(toIndentedString(audienceName)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceCreateRequest.java new file mode 100644 index 00000000000..26f606d1416 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceCreateRequest.java @@ -0,0 +1,149 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Create target audience request. */ +@JsonPropertyOrder({GoogleChatTargetAudienceCreateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatTargetAudienceCreateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private GoogleChatTargetAudienceCreateRequestData data; + + public GoogleChatTargetAudienceCreateRequest() {} + + @JsonCreator + public GoogleChatTargetAudienceCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + GoogleChatTargetAudienceCreateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public GoogleChatTargetAudienceCreateRequest data( + GoogleChatTargetAudienceCreateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data for a create target audience request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GoogleChatTargetAudienceCreateRequestData getData() { + return data; + } + + public void setData(GoogleChatTargetAudienceCreateRequestData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatTargetAudienceCreateRequest + */ + @JsonAnySetter + public GoogleChatTargetAudienceCreateRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GoogleChatTargetAudienceCreateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatTargetAudienceCreateRequest googleChatTargetAudienceCreateRequest = + (GoogleChatTargetAudienceCreateRequest) o; + return Objects.equals(this.data, googleChatTargetAudienceCreateRequest.data) + && Objects.equals( + this.additionalProperties, googleChatTargetAudienceCreateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatTargetAudienceCreateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceCreateRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceCreateRequestAttributes.java new file mode 100644 index 00000000000..a0569c960cd --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceCreateRequestAttributes.java @@ -0,0 +1,180 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes for creating a Google Chat target audience. */ +@JsonPropertyOrder({ + GoogleChatTargetAudienceCreateRequestAttributes.JSON_PROPERTY_AUDIENCE_ID, + GoogleChatTargetAudienceCreateRequestAttributes.JSON_PROPERTY_AUDIENCE_NAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatTargetAudienceCreateRequestAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUDIENCE_ID = "audience_id"; + private String audienceId; + + public static final String JSON_PROPERTY_AUDIENCE_NAME = "audience_name"; + private String audienceName; + + public GoogleChatTargetAudienceCreateRequestAttributes() {} + + @JsonCreator + public GoogleChatTargetAudienceCreateRequestAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_AUDIENCE_ID) String audienceId, + @JsonProperty(required = true, value = JSON_PROPERTY_AUDIENCE_NAME) String audienceName) { + this.audienceId = audienceId; + this.audienceName = audienceName; + } + + public GoogleChatTargetAudienceCreateRequestAttributes audienceId(String audienceId) { + this.audienceId = audienceId; + return this; + } + + /** + * The audience ID. + * + * @return audienceId + */ + @JsonProperty(JSON_PROPERTY_AUDIENCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAudienceId() { + return audienceId; + } + + public void setAudienceId(String audienceId) { + this.audienceId = audienceId; + } + + public GoogleChatTargetAudienceCreateRequestAttributes audienceName(String audienceName) { + this.audienceName = audienceName; + return this; + } + + /** + * The audience name. + * + * @return audienceName + */ + @JsonProperty(JSON_PROPERTY_AUDIENCE_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAudienceName() { + return audienceName; + } + + public void setAudienceName(String audienceName) { + this.audienceName = audienceName; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatTargetAudienceCreateRequestAttributes + */ + @JsonAnySetter + public GoogleChatTargetAudienceCreateRequestAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GoogleChatTargetAudienceCreateRequestAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatTargetAudienceCreateRequestAttributes + googleChatTargetAudienceCreateRequestAttributes = + (GoogleChatTargetAudienceCreateRequestAttributes) o; + return Objects.equals( + this.audienceId, googleChatTargetAudienceCreateRequestAttributes.audienceId) + && Objects.equals( + this.audienceName, googleChatTargetAudienceCreateRequestAttributes.audienceName) + && Objects.equals( + this.additionalProperties, + googleChatTargetAudienceCreateRequestAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(audienceId, audienceName, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatTargetAudienceCreateRequestAttributes {\n"); + sb.append(" audienceId: ").append(toIndentedString(audienceId)).append("\n"); + sb.append(" audienceName: ").append(toIndentedString(audienceName)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceCreateRequestData.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceCreateRequestData.java new file mode 100644 index 00000000000..edb804b4553 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceCreateRequestData.java @@ -0,0 +1,187 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data for a create target audience request. */ +@JsonPropertyOrder({ + GoogleChatTargetAudienceCreateRequestData.JSON_PROPERTY_ATTRIBUTES, + GoogleChatTargetAudienceCreateRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatTargetAudienceCreateRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private GoogleChatTargetAudienceCreateRequestAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private GoogleChatTargetAudienceType type = + GoogleChatTargetAudienceType.GOOGLE_CHAT_TARGET_AUDIENCE_TYPE; + + public GoogleChatTargetAudienceCreateRequestData() {} + + @JsonCreator + public GoogleChatTargetAudienceCreateRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + GoogleChatTargetAudienceCreateRequestAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + GoogleChatTargetAudienceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public GoogleChatTargetAudienceCreateRequestData attributes( + GoogleChatTargetAudienceCreateRequestAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating a Google Chat target audience. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GoogleChatTargetAudienceCreateRequestAttributes getAttributes() { + return attributes; + } + + public void setAttributes(GoogleChatTargetAudienceCreateRequestAttributes attributes) { + this.attributes = attributes; + } + + public GoogleChatTargetAudienceCreateRequestData type(GoogleChatTargetAudienceType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Google Chat target audience resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GoogleChatTargetAudienceType getType() { + return type; + } + + public void setType(GoogleChatTargetAudienceType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatTargetAudienceCreateRequestData + */ + @JsonAnySetter + public GoogleChatTargetAudienceCreateRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GoogleChatTargetAudienceCreateRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatTargetAudienceCreateRequestData googleChatTargetAudienceCreateRequestData = + (GoogleChatTargetAudienceCreateRequestData) o; + return Objects.equals(this.attributes, googleChatTargetAudienceCreateRequestData.attributes) + && Objects.equals(this.type, googleChatTargetAudienceCreateRequestData.type) + && Objects.equals( + this.additionalProperties, + googleChatTargetAudienceCreateRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatTargetAudienceCreateRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceData.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceData.java new file mode 100644 index 00000000000..756a8a12ef6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceData.java @@ -0,0 +1,198 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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; + +/** Google Chat target audience data from a response. */ +@JsonPropertyOrder({ + GoogleChatTargetAudienceData.JSON_PROPERTY_ATTRIBUTES, + GoogleChatTargetAudienceData.JSON_PROPERTY_ID, + GoogleChatTargetAudienceData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatTargetAudienceData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private GoogleChatTargetAudienceAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private GoogleChatTargetAudienceType type = + GoogleChatTargetAudienceType.GOOGLE_CHAT_TARGET_AUDIENCE_TYPE; + + public GoogleChatTargetAudienceData attributes(GoogleChatTargetAudienceAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Google Chat target audience attributes. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public GoogleChatTargetAudienceAttributes getAttributes() { + return attributes; + } + + public void setAttributes(GoogleChatTargetAudienceAttributes attributes) { + this.attributes = attributes; + } + + public GoogleChatTargetAudienceData id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the target audience. + * + * @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 GoogleChatTargetAudienceData type(GoogleChatTargetAudienceType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Google Chat target audience resource type. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public GoogleChatTargetAudienceType getType() { + return type; + } + + public void setType(GoogleChatTargetAudienceType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatTargetAudienceData + */ + @JsonAnySetter + public GoogleChatTargetAudienceData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GoogleChatTargetAudienceData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatTargetAudienceData googleChatTargetAudienceData = (GoogleChatTargetAudienceData) o; + return Objects.equals(this.attributes, googleChatTargetAudienceData.attributes) + && Objects.equals(this.id, googleChatTargetAudienceData.id) + && Objects.equals(this.type, googleChatTargetAudienceData.type) + && Objects.equals( + this.additionalProperties, googleChatTargetAudienceData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatTargetAudienceData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceResponse.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceResponse.java new file mode 100644 index 00000000000..67c29825fc0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceResponse.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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing a Google Chat target audience. */ +@JsonPropertyOrder({GoogleChatTargetAudienceResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatTargetAudienceResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private GoogleChatTargetAudienceData data; + + public GoogleChatTargetAudienceResponse() {} + + @JsonCreator + public GoogleChatTargetAudienceResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + GoogleChatTargetAudienceData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public GoogleChatTargetAudienceResponse data(GoogleChatTargetAudienceData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Google Chat target audience data from a response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GoogleChatTargetAudienceData getData() { + return data; + } + + public void setData(GoogleChatTargetAudienceData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatTargetAudienceResponse + */ + @JsonAnySetter + public GoogleChatTargetAudienceResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GoogleChatTargetAudienceResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatTargetAudienceResponse googleChatTargetAudienceResponse = + (GoogleChatTargetAudienceResponse) o; + return Objects.equals(this.data, googleChatTargetAudienceResponse.data) + && Objects.equals( + this.additionalProperties, googleChatTargetAudienceResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatTargetAudienceResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceType.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceType.java new file mode 100644 index 00000000000..4e84ef49208 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Google Chat target audience resource type. */ +@JsonSerialize(using = GoogleChatTargetAudienceType.GoogleChatTargetAudienceTypeSerializer.class) +public class GoogleChatTargetAudienceType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("google-chat-target-audience")); + + public static final GoogleChatTargetAudienceType GOOGLE_CHAT_TARGET_AUDIENCE_TYPE = + new GoogleChatTargetAudienceType("google-chat-target-audience"); + + GoogleChatTargetAudienceType(String value) { + super(value, allowedValues); + } + + public static class GoogleChatTargetAudienceTypeSerializer + extends StdSerializer { + public GoogleChatTargetAudienceTypeSerializer(Class t) { + super(t); + } + + public GoogleChatTargetAudienceTypeSerializer() { + this(null); + } + + @Override + public void serialize( + GoogleChatTargetAudienceType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static GoogleChatTargetAudienceType fromValue(String value) { + return new GoogleChatTargetAudienceType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceUpdateRequest.java new file mode 100644 index 00000000000..40e58d4fea4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceUpdateRequest.java @@ -0,0 +1,149 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Update target audience request. */ +@JsonPropertyOrder({GoogleChatTargetAudienceUpdateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatTargetAudienceUpdateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private GoogleChatTargetAudienceUpdateRequestData data; + + public GoogleChatTargetAudienceUpdateRequest() {} + + @JsonCreator + public GoogleChatTargetAudienceUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + GoogleChatTargetAudienceUpdateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public GoogleChatTargetAudienceUpdateRequest data( + GoogleChatTargetAudienceUpdateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data for an update target audience request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GoogleChatTargetAudienceUpdateRequestData getData() { + return data; + } + + public void setData(GoogleChatTargetAudienceUpdateRequestData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatTargetAudienceUpdateRequest + */ + @JsonAnySetter + public GoogleChatTargetAudienceUpdateRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GoogleChatTargetAudienceUpdateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatTargetAudienceUpdateRequest googleChatTargetAudienceUpdateRequest = + (GoogleChatTargetAudienceUpdateRequest) o; + return Objects.equals(this.data, googleChatTargetAudienceUpdateRequest.data) + && Objects.equals( + this.additionalProperties, googleChatTargetAudienceUpdateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatTargetAudienceUpdateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceUpdateRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceUpdateRequestAttributes.java new file mode 100644 index 00000000000..05290941275 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceUpdateRequestAttributes.java @@ -0,0 +1,171 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes for updating a Google Chat target audience. */ +@JsonPropertyOrder({ + GoogleChatTargetAudienceUpdateRequestAttributes.JSON_PROPERTY_AUDIENCE_ID, + GoogleChatTargetAudienceUpdateRequestAttributes.JSON_PROPERTY_AUDIENCE_NAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatTargetAudienceUpdateRequestAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUDIENCE_ID = "audience_id"; + private String audienceId; + + public static final String JSON_PROPERTY_AUDIENCE_NAME = "audience_name"; + private String audienceName; + + public GoogleChatTargetAudienceUpdateRequestAttributes audienceId(String audienceId) { + this.audienceId = audienceId; + return this; + } + + /** + * The audience ID. + * + * @return audienceId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUDIENCE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAudienceId() { + return audienceId; + } + + public void setAudienceId(String audienceId) { + this.audienceId = audienceId; + } + + public GoogleChatTargetAudienceUpdateRequestAttributes audienceName(String audienceName) { + this.audienceName = audienceName; + return this; + } + + /** + * The audience name. + * + * @return audienceName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUDIENCE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAudienceName() { + return audienceName; + } + + public void setAudienceName(String audienceName) { + this.audienceName = audienceName; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatTargetAudienceUpdateRequestAttributes + */ + @JsonAnySetter + public GoogleChatTargetAudienceUpdateRequestAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GoogleChatTargetAudienceUpdateRequestAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatTargetAudienceUpdateRequestAttributes + googleChatTargetAudienceUpdateRequestAttributes = + (GoogleChatTargetAudienceUpdateRequestAttributes) o; + return Objects.equals( + this.audienceId, googleChatTargetAudienceUpdateRequestAttributes.audienceId) + && Objects.equals( + this.audienceName, googleChatTargetAudienceUpdateRequestAttributes.audienceName) + && Objects.equals( + this.additionalProperties, + googleChatTargetAudienceUpdateRequestAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(audienceId, audienceName, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatTargetAudienceUpdateRequestAttributes {\n"); + sb.append(" audienceId: ").append(toIndentedString(audienceId)).append("\n"); + sb.append(" audienceName: ").append(toIndentedString(audienceName)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceUpdateRequestData.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceUpdateRequestData.java new file mode 100644 index 00000000000..05a5dfa92a3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudienceUpdateRequestData.java @@ -0,0 +1,187 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data for an update target audience request. */ +@JsonPropertyOrder({ + GoogleChatTargetAudienceUpdateRequestData.JSON_PROPERTY_ATTRIBUTES, + GoogleChatTargetAudienceUpdateRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatTargetAudienceUpdateRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private GoogleChatTargetAudienceUpdateRequestAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private GoogleChatTargetAudienceType type = + GoogleChatTargetAudienceType.GOOGLE_CHAT_TARGET_AUDIENCE_TYPE; + + public GoogleChatTargetAudienceUpdateRequestData() {} + + @JsonCreator + public GoogleChatTargetAudienceUpdateRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + GoogleChatTargetAudienceUpdateRequestAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + GoogleChatTargetAudienceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public GoogleChatTargetAudienceUpdateRequestData attributes( + GoogleChatTargetAudienceUpdateRequestAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for updating a Google Chat target audience. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GoogleChatTargetAudienceUpdateRequestAttributes getAttributes() { + return attributes; + } + + public void setAttributes(GoogleChatTargetAudienceUpdateRequestAttributes attributes) { + this.attributes = attributes; + } + + public GoogleChatTargetAudienceUpdateRequestData type(GoogleChatTargetAudienceType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Google Chat target audience resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public GoogleChatTargetAudienceType getType() { + return type; + } + + public void setType(GoogleChatTargetAudienceType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatTargetAudienceUpdateRequestData + */ + @JsonAnySetter + public GoogleChatTargetAudienceUpdateRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GoogleChatTargetAudienceUpdateRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatTargetAudienceUpdateRequestData googleChatTargetAudienceUpdateRequestData = + (GoogleChatTargetAudienceUpdateRequestData) o; + return Objects.equals(this.attributes, googleChatTargetAudienceUpdateRequestData.attributes) + && Objects.equals(this.type, googleChatTargetAudienceUpdateRequestData.type) + && Objects.equals( + this.additionalProperties, + googleChatTargetAudienceUpdateRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatTargetAudienceUpdateRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudiencesResponse.java b/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudiencesResponse.java new file mode 100644 index 00000000000..487f35d7728 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/GoogleChatTargetAudiencesResponse.java @@ -0,0 +1,157 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing a list of Google Chat target audiences. */ +@JsonPropertyOrder({GoogleChatTargetAudiencesResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class GoogleChatTargetAudiencesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public GoogleChatTargetAudiencesResponse() {} + + @JsonCreator + public GoogleChatTargetAudiencesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public GoogleChatTargetAudiencesResponse data(List data) { + this.data = data; + for (GoogleChatTargetAudienceData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public GoogleChatTargetAudiencesResponse addDataItem(GoogleChatTargetAudienceData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * An array of Google Chat target audiences. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return GoogleChatTargetAudiencesResponse + */ + @JsonAnySetter + public GoogleChatTargetAudiencesResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this GoogleChatTargetAudiencesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GoogleChatTargetAudiencesResponse googleChatTargetAudiencesResponse = + (GoogleChatTargetAudiencesResponse) o; + return Objects.equals(this.data, googleChatTargetAudiencesResponse.data) + && Objects.equals( + this.additionalProperties, googleChatTargetAudiencesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GoogleChatTargetAudiencesResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/HamrOrgConnectionStatus.java b/src/main/java/com/datadog/api/client/v2/model/HamrOrgConnectionStatus.java index cb44cc2ec09..39a4fe8ef95 100644 --- a/src/main/java/com/datadog/api/client/v2/model/HamrOrgConnectionStatus.java +++ b/src/main/java/com/datadog/api/client/v2/model/HamrOrgConnectionStatus.java @@ -25,19 +25,19 @@ * failover - 5: RECOVERY - Recovery operation in progress */ @JsonSerialize(using = HamrOrgConnectionStatus.HamrOrgConnectionStatusSerializer.class) -public class HamrOrgConnectionStatus extends ModelEnum { +public class HamrOrgConnectionStatus extends ModelEnum { - private static final Set allowedValues = - new HashSet(Arrays.asList(0, 1, 2, 3, 4, 5)); + private static final Set allowedValues = + new HashSet(Arrays.asList(0l, 1l, 2l, 3l, 4l, 5l)); - public static final HamrOrgConnectionStatus UNSPECIFIED = new HamrOrgConnectionStatus(0); - public static final HamrOrgConnectionStatus ONBOARDING = new HamrOrgConnectionStatus(1); - public static final HamrOrgConnectionStatus PASSIVE = new HamrOrgConnectionStatus(2); - public static final HamrOrgConnectionStatus FAILOVER = new HamrOrgConnectionStatus(3); - public static final HamrOrgConnectionStatus ACTIVE = new HamrOrgConnectionStatus(4); - public static final HamrOrgConnectionStatus RECOVERY = new HamrOrgConnectionStatus(5); + public static final HamrOrgConnectionStatus UNSPECIFIED = new HamrOrgConnectionStatus(0l); + public static final HamrOrgConnectionStatus ONBOARDING = new HamrOrgConnectionStatus(1l); + public static final HamrOrgConnectionStatus PASSIVE = new HamrOrgConnectionStatus(2l); + public static final HamrOrgConnectionStatus FAILOVER = new HamrOrgConnectionStatus(3l); + public static final HamrOrgConnectionStatus ACTIVE = new HamrOrgConnectionStatus(4l); + public static final HamrOrgConnectionStatus RECOVERY = new HamrOrgConnectionStatus(5l); - HamrOrgConnectionStatus(Integer value) { + HamrOrgConnectionStatus(Long value) { super(value, allowedValues); } @@ -60,7 +60,7 @@ public void serialize( } @JsonCreator - public static HamrOrgConnectionStatus fromValue(Integer value) { + public static HamrOrgConnectionStatus fromValue(Long value) { return new HamrOrgConnectionStatus(value); } } diff --git a/src/main/java/com/datadog/api/client/v2/model/IL2CPPSourcemapAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IL2CPPSourcemapAttributes.java new file mode 100644 index 00000000000..febaade72c3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IL2CPPSourcemapAttributes.java @@ -0,0 +1,230 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of an IL2CPP mapping file. */ +@JsonPropertyOrder({ + IL2CPPSourcemapAttributes.JSON_PROPERTY_BUILD_ID, + IL2CPPSourcemapAttributes.JSON_PROPERTY_CREATED_AT, + IL2CPPSourcemapAttributes.JSON_PROPERTY_MAPKIND, + IL2CPPSourcemapAttributes.JSON_PROPERTY_SIZE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IL2CPPSourcemapAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_BUILD_ID = "build_id"; + private String buildId; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_MAPKIND = "mapkind"; + private String mapkind; + + public static final String JSON_PROPERTY_SIZE = "size"; + private Long size; + + public IL2CPPSourcemapAttributes() {} + + @JsonCreator + public IL2CPPSourcemapAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_MAPKIND) String mapkind, + @JsonProperty(required = true, value = JSON_PROPERTY_SIZE) Long size) { + this.createdAt = createdAt; + this.mapkind = mapkind; + this.size = size; + } + + public IL2CPPSourcemapAttributes buildId(String buildId) { + this.buildId = buildId; + return this; + } + + /** + * The build identifier (UUID format). + * + * @return buildId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BUILD_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBuildId() { + return buildId; + } + + public void setBuildId(String buildId) { + this.buildId = buildId; + } + + public IL2CPPSourcemapAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The timestamp when the mapping file was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public IL2CPPSourcemapAttributes mapkind(String mapkind) { + this.mapkind = mapkind; + return this; + } + + /** + * The type of source map. + * + * @return mapkind + */ + @JsonProperty(JSON_PROPERTY_MAPKIND) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMapkind() { + return mapkind; + } + + public void setMapkind(String mapkind) { + this.mapkind = mapkind; + } + + public IL2CPPSourcemapAttributes size(Long size) { + this.size = size; + return this; + } + + /** + * The size of the mapping file in bytes. + * + * @return size + */ + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getSize() { + return size; + } + + public void setSize(Long size) { + this.size = size; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IL2CPPSourcemapAttributes + */ + @JsonAnySetter + public IL2CPPSourcemapAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IL2CPPSourcemapAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IL2CPPSourcemapAttributes iL2CppSourcemapAttributes = (IL2CPPSourcemapAttributes) o; + return Objects.equals(this.buildId, iL2CppSourcemapAttributes.buildId) + && Objects.equals(this.createdAt, iL2CppSourcemapAttributes.createdAt) + && Objects.equals(this.mapkind, iL2CppSourcemapAttributes.mapkind) + && Objects.equals(this.size, iL2CppSourcemapAttributes.size) + && Objects.equals( + this.additionalProperties, iL2CppSourcemapAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(buildId, createdAt, mapkind, size, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IL2CPPSourcemapAttributes {\n"); + sb.append(" buildId: ").append(toIndentedString(buildId)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" mapkind: ").append(toIndentedString(mapkind)).append("\n"); + sb.append(" size: ").append(toIndentedString(size)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IL2CPPSourcemapData.java b/src/main/java/com/datadog/api/client/v2/model/IL2CPPSourcemapData.java new file mode 100644 index 00000000000..47a78cf2327 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IL2CPPSourcemapData.java @@ -0,0 +1,209 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** IL2CPP mapping file data object. */ +@JsonPropertyOrder({ + IL2CPPSourcemapData.JSON_PROPERTY_ATTRIBUTES, + IL2CPPSourcemapData.JSON_PROPERTY_ID, + IL2CPPSourcemapData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IL2CPPSourcemapData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IL2CPPSourcemapAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SourcemapDataType type; + + public IL2CPPSourcemapData() {} + + @JsonCreator + public IL2CPPSourcemapData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IL2CPPSourcemapAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SourcemapDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IL2CPPSourcemapData attributes(IL2CPPSourcemapAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an IL2CPP mapping file. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IL2CPPSourcemapAttributes getAttributes() { + return attributes; + } + + public void setAttributes(IL2CPPSourcemapAttributes attributes) { + this.attributes = attributes; + } + + public IL2CPPSourcemapData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the source map. + * + * @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 IL2CPPSourcemapData type(SourcemapDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type for source map objects. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SourcemapDataType getType() { + return type; + } + + public void setType(SourcemapDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IL2CPPSourcemapData + */ + @JsonAnySetter + public IL2CPPSourcemapData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IL2CPPSourcemapData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IL2CPPSourcemapData iL2CppSourcemapData = (IL2CPPSourcemapData) o; + return Objects.equals(this.attributes, iL2CppSourcemapData.attributes) + && Objects.equals(this.id, iL2CppSourcemapData.id) + && Objects.equals(this.type, iL2CppSourcemapData.type) + && Objects.equals(this.additionalProperties, iL2CppSourcemapData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IL2CPPSourcemapData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IOSSourcemapAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IOSSourcemapAttributes.java new file mode 100644 index 00000000000..6d4ce6f717c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IOSSourcemapAttributes.java @@ -0,0 +1,229 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of an iOS dSYM source map. */ +@JsonPropertyOrder({ + IOSSourcemapAttributes.JSON_PROPERTY_CREATED_AT, + IOSSourcemapAttributes.JSON_PROPERTY_MAPKIND, + IOSSourcemapAttributes.JSON_PROPERTY_SIZE, + IOSSourcemapAttributes.JSON_PROPERTY_UUIDS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IOSSourcemapAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_MAPKIND = "mapkind"; + private String mapkind; + + public static final String JSON_PROPERTY_SIZE = "size"; + private Long size; + + public static final String JSON_PROPERTY_UUIDS = "uuids"; + private String uuids; + + public IOSSourcemapAttributes() {} + + @JsonCreator + public IOSSourcemapAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_MAPKIND) String mapkind, + @JsonProperty(required = true, value = JSON_PROPERTY_SIZE) Long size) { + this.createdAt = createdAt; + this.mapkind = mapkind; + this.size = size; + } + + public IOSSourcemapAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The timestamp when the source map was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public IOSSourcemapAttributes mapkind(String mapkind) { + this.mapkind = mapkind; + return this; + } + + /** + * The type of source map. + * + * @return mapkind + */ + @JsonProperty(JSON_PROPERTY_MAPKIND) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMapkind() { + return mapkind; + } + + public void setMapkind(String mapkind) { + this.mapkind = mapkind; + } + + public IOSSourcemapAttributes size(Long size) { + this.size = size; + return this; + } + + /** + * The size of the dSYM file in bytes. + * + * @return size + */ + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getSize() { + return size; + } + + public void setSize(Long size) { + this.size = size; + } + + public IOSSourcemapAttributes uuids(String uuids) { + this.uuids = uuids; + return this; + } + + /** + * The UUID(s) associated with the dSYM file. + * + * @return uuids + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UUIDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUuids() { + return uuids; + } + + public void setUuids(String uuids) { + this.uuids = uuids; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IOSSourcemapAttributes + */ + @JsonAnySetter + public IOSSourcemapAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IOSSourcemapAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IOSSourcemapAttributes iosSourcemapAttributes = (IOSSourcemapAttributes) o; + return Objects.equals(this.createdAt, iosSourcemapAttributes.createdAt) + && Objects.equals(this.mapkind, iosSourcemapAttributes.mapkind) + && Objects.equals(this.size, iosSourcemapAttributes.size) + && Objects.equals(this.uuids, iosSourcemapAttributes.uuids) + && Objects.equals(this.additionalProperties, iosSourcemapAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, mapkind, size, uuids, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IOSSourcemapAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" mapkind: ").append(toIndentedString(mapkind)).append("\n"); + sb.append(" size: ").append(toIndentedString(size)).append("\n"); + sb.append(" uuids: ").append(toIndentedString(uuids)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IOSSourcemapData.java b/src/main/java/com/datadog/api/client/v2/model/IOSSourcemapData.java new file mode 100644 index 00000000000..926546e9b8a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IOSSourcemapData.java @@ -0,0 +1,209 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** iOS dSYM source map data object. */ +@JsonPropertyOrder({ + IOSSourcemapData.JSON_PROPERTY_ATTRIBUTES, + IOSSourcemapData.JSON_PROPERTY_ID, + IOSSourcemapData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IOSSourcemapData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private IOSSourcemapAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SourcemapDataType type; + + public IOSSourcemapData() {} + + @JsonCreator + public IOSSourcemapData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + IOSSourcemapAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SourcemapDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public IOSSourcemapData attributes(IOSSourcemapAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an iOS dSYM source map. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IOSSourcemapAttributes getAttributes() { + return attributes; + } + + public void setAttributes(IOSSourcemapAttributes attributes) { + this.attributes = attributes; + } + + public IOSSourcemapData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the source map. + * + * @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 IOSSourcemapData type(SourcemapDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type for source map objects. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SourcemapDataType getType() { + return type; + } + + public void setType(SourcemapDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IOSSourcemapData + */ + @JsonAnySetter + public IOSSourcemapData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IOSSourcemapData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IOSSourcemapData iosSourcemapData = (IOSSourcemapData) o; + return Objects.equals(this.attributes, iosSourcemapData.attributes) + && Objects.equals(this.id, iosSourcemapData.id) + && Objects.equals(this.type, iosSourcemapData.type) + && Objects.equals(this.additionalProperties, iosSourcemapData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IOSSourcemapData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IssueCaseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/IssueCaseAttributes.java index 18185f80902..26710668b6e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IssueCaseAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/IssueCaseAttributes.java @@ -30,6 +30,7 @@ IssueCaseAttributes.JSON_PROPERTY_INSIGHTS, IssueCaseAttributes.JSON_PROPERTY_JIRA_ISSUE, IssueCaseAttributes.JSON_PROPERTY_KEY, + IssueCaseAttributes.JSON_PROPERTY_LINEAR_ISSUE, IssueCaseAttributes.JSON_PROPERTY_MODIFIED_AT, IssueCaseAttributes.JSON_PROPERTY_PRIORITY, IssueCaseAttributes.JSON_PROPERTY_STATUS, @@ -67,6 +68,9 @@ public class IssueCaseAttributes { public static final String JSON_PROPERTY_KEY = "key"; private String key; + public static final String JSON_PROPERTY_LINEAR_ISSUE = "linear_issue"; + private IssueCaseLinearIssue linearIssue; + public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; private OffsetDateTime modifiedAt; @@ -284,6 +288,28 @@ public void setKey(String key) { this.key = key; } + public IssueCaseAttributes linearIssue(IssueCaseLinearIssue linearIssue) { + this.linearIssue = linearIssue; + this.unparsed |= linearIssue.unparsed; + return this; + } + + /** + * Linear issue of the case. + * + * @return linearIssue + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LINEAR_ISSUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IssueCaseLinearIssue getLinearIssue() { + return linearIssue; + } + + public void setLinearIssue(IssueCaseLinearIssue linearIssue) { + this.linearIssue = linearIssue; + } + public IssueCaseAttributes modifiedAt(OffsetDateTime modifiedAt) { this.modifiedAt = modifiedAt; return this; @@ -466,6 +492,7 @@ public boolean equals(Object o) { && Objects.equals(this.insights, issueCaseAttributes.insights) && Objects.equals(this.jiraIssue, issueCaseAttributes.jiraIssue) && Objects.equals(this.key, issueCaseAttributes.key) + && Objects.equals(this.linearIssue, issueCaseAttributes.linearIssue) && Objects.equals(this.modifiedAt, issueCaseAttributes.modifiedAt) && Objects.equals(this.priority, issueCaseAttributes.priority) && Objects.equals(this.status, issueCaseAttributes.status) @@ -486,6 +513,7 @@ public int hashCode() { insights, jiraIssue, key, + linearIssue, modifiedAt, priority, status, @@ -507,6 +535,7 @@ public String toString() { sb.append(" insights: ").append(toIndentedString(insights)).append("\n"); sb.append(" jiraIssue: ").append(toIndentedString(jiraIssue)).append("\n"); sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" linearIssue: ").append(toIndentedString(linearIssue)).append("\n"); sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/IssueCaseJiraIssue.java b/src/main/java/com/datadog/api/client/v2/model/IssueCaseJiraIssue.java index 2bed92ad4f0..b919b16b533 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IssueCaseJiraIssue.java +++ b/src/main/java/com/datadog/api/client/v2/model/IssueCaseJiraIssue.java @@ -18,6 +18,7 @@ /** Jira issue of the case. */ @JsonPropertyOrder({ + IssueCaseJiraIssue.JSON_PROPERTY_ERROR_MESSAGE, IssueCaseJiraIssue.JSON_PROPERTY_RESULT, IssueCaseJiraIssue.JSON_PROPERTY_STATUS }) @@ -25,12 +26,36 @@ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IssueCaseJiraIssue { @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ERROR_MESSAGE = "error_message"; + private String errorMessage; + public static final String JSON_PROPERTY_RESULT = "result"; private IssueCaseJiraIssueResult result; public static final String JSON_PROPERTY_STATUS = "status"; private String status; + public IssueCaseJiraIssue errorMessage(String errorMessage) { + this.errorMessage = errorMessage; + return this; + } + + /** + * Error message set when the Jira issue creation fails. + * + * @return errorMessage + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getErrorMessage() { + return errorMessage; + } + + public void setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + } + public IssueCaseJiraIssue result(IssueCaseJiraIssueResult result) { this.result = result; this.unparsed |= result.unparsed; @@ -130,20 +155,22 @@ public boolean equals(Object o) { return false; } IssueCaseJiraIssue issueCaseJiraIssue = (IssueCaseJiraIssue) o; - return Objects.equals(this.result, issueCaseJiraIssue.result) + return Objects.equals(this.errorMessage, issueCaseJiraIssue.errorMessage) + && Objects.equals(this.result, issueCaseJiraIssue.result) && Objects.equals(this.status, issueCaseJiraIssue.status) && Objects.equals(this.additionalProperties, issueCaseJiraIssue.additionalProperties); } @Override public int hashCode() { - return Objects.hash(result, status, additionalProperties); + return Objects.hash(errorMessage, result, status, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class IssueCaseJiraIssue {\n"); + sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).append("\n"); sb.append(" result: ").append(toIndentedString(result)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" additionalProperties: ") diff --git a/src/main/java/com/datadog/api/client/v2/model/IssueCaseJiraIssueResult.java b/src/main/java/com/datadog/api/client/v2/model/IssueCaseJiraIssueResult.java index 9a121c4e4d9..0a0290b48f0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IssueCaseJiraIssueResult.java +++ b/src/main/java/com/datadog/api/client/v2/model/IssueCaseJiraIssueResult.java @@ -18,15 +18,20 @@ /** Contains the identifiers and URL for a successfully created Jira issue. */ @JsonPropertyOrder({ + IssueCaseJiraIssueResult.JSON_PROPERTY_ACCOUNT_ID, IssueCaseJiraIssueResult.JSON_PROPERTY_ISSUE_ID, IssueCaseJiraIssueResult.JSON_PROPERTY_ISSUE_KEY, IssueCaseJiraIssueResult.JSON_PROPERTY_ISSUE_URL, + IssueCaseJiraIssueResult.JSON_PROPERTY_PROJECT_ID, IssueCaseJiraIssueResult.JSON_PROPERTY_PROJECT_KEY }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class IssueCaseJiraIssueResult { @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private String accountId; + public static final String JSON_PROPERTY_ISSUE_ID = "issue_id"; private String issueId; @@ -36,9 +41,33 @@ public class IssueCaseJiraIssueResult { public static final String JSON_PROPERTY_ISSUE_URL = "issue_url"; private String issueUrl; + public static final String JSON_PROPERTY_PROJECT_ID = "project_id"; + private String projectId; + public static final String JSON_PROPERTY_PROJECT_KEY = "project_key"; private String projectKey; + public IssueCaseJiraIssueResult accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Jira account identifier. + * + * @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 IssueCaseJiraIssueResult issueId(String issueId) { this.issueId = issueId; return this; @@ -102,6 +131,27 @@ public void setIssueUrl(String issueUrl) { this.issueUrl = issueUrl; } + public IssueCaseJiraIssueResult projectId(String projectId) { + this.projectId = projectId; + return this; + } + + /** + * Jira project identifier. + * + * @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 IssueCaseJiraIssueResult projectKey(String projectKey) { this.projectKey = projectKey; return this; @@ -179,25 +229,30 @@ public boolean equals(Object o) { return false; } IssueCaseJiraIssueResult issueCaseJiraIssueResult = (IssueCaseJiraIssueResult) o; - return Objects.equals(this.issueId, issueCaseJiraIssueResult.issueId) + return Objects.equals(this.accountId, issueCaseJiraIssueResult.accountId) + && Objects.equals(this.issueId, issueCaseJiraIssueResult.issueId) && Objects.equals(this.issueKey, issueCaseJiraIssueResult.issueKey) && Objects.equals(this.issueUrl, issueCaseJiraIssueResult.issueUrl) + && Objects.equals(this.projectId, issueCaseJiraIssueResult.projectId) && Objects.equals(this.projectKey, issueCaseJiraIssueResult.projectKey) && Objects.equals(this.additionalProperties, issueCaseJiraIssueResult.additionalProperties); } @Override public int hashCode() { - return Objects.hash(issueId, issueKey, issueUrl, projectKey, additionalProperties); + return Objects.hash( + accountId, issueId, issueKey, issueUrl, projectId, projectKey, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class IssueCaseJiraIssueResult {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); sb.append(" issueId: ").append(toIndentedString(issueId)).append("\n"); sb.append(" issueKey: ").append(toIndentedString(issueKey)).append("\n"); sb.append(" issueUrl: ").append(toIndentedString(issueUrl)).append("\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); sb.append(" projectKey: ").append(toIndentedString(projectKey)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/IssueCaseLinearIssue.java b/src/main/java/com/datadog/api/client/v2/model/IssueCaseLinearIssue.java new file mode 100644 index 00000000000..5b980727154 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IssueCaseLinearIssue.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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.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; + +/** Linear issue of the case. */ +@JsonPropertyOrder({ + IssueCaseLinearIssue.JSON_PROPERTY_ERROR_MESSAGE, + IssueCaseLinearIssue.JSON_PROPERTY_RESULT, + IssueCaseLinearIssue.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IssueCaseLinearIssue { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ERROR_MESSAGE = "error_message"; + private String errorMessage; + + public static final String JSON_PROPERTY_RESULT = "result"; + private IssueCaseLinearIssueResult result; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public IssueCaseLinearIssue errorMessage(String errorMessage) { + this.errorMessage = errorMessage; + return this; + } + + /** + * Error message set when the Linear issue creation fails. + * + * @return errorMessage + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getErrorMessage() { + return errorMessage; + } + + public void setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + } + + public IssueCaseLinearIssue result(IssueCaseLinearIssueResult result) { + this.result = result; + this.unparsed |= result.unparsed; + return this; + } + + /** + * Contains the identifiers and URL for a successfully created Linear issue. + * + * @return result + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IssueCaseLinearIssueResult getResult() { + return result; + } + + public void setResult(IssueCaseLinearIssueResult result) { + this.result = result; + } + + public IssueCaseLinearIssue status(String status) { + this.status = status; + return this; + } + + /** + * Creation status of the Linear issue. + * + * @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; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IssueCaseLinearIssue + */ + @JsonAnySetter + public IssueCaseLinearIssue putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IssueCaseLinearIssue object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IssueCaseLinearIssue issueCaseLinearIssue = (IssueCaseLinearIssue) o; + return Objects.equals(this.errorMessage, issueCaseLinearIssue.errorMessage) + && Objects.equals(this.result, issueCaseLinearIssue.result) + && Objects.equals(this.status, issueCaseLinearIssue.status) + && Objects.equals(this.additionalProperties, issueCaseLinearIssue.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(errorMessage, result, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IssueCaseLinearIssue {\n"); + sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).append("\n"); + sb.append(" result: ").append(toIndentedString(result)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IssueCaseLinearIssueResult.java b/src/main/java/com/datadog/api/client/v2/model/IssueCaseLinearIssueResult.java new file mode 100644 index 00000000000..a73e7a91396 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IssueCaseLinearIssueResult.java @@ -0,0 +1,246 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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; + +/** Contains the identifiers and URL for a successfully created Linear issue. */ +@JsonPropertyOrder({ + IssueCaseLinearIssueResult.JSON_PROPERTY_ACCOUNT_ID, + IssueCaseLinearIssueResult.JSON_PROPERTY_ISSUE_ID, + IssueCaseLinearIssueResult.JSON_PROPERTY_ISSUE_KEY, + IssueCaseLinearIssueResult.JSON_PROPERTY_ISSUE_URL, + IssueCaseLinearIssueResult.JSON_PROPERTY_TEAM_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IssueCaseLinearIssueResult { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private String accountId; + + public static final String JSON_PROPERTY_ISSUE_ID = "issue_id"; + private String issueId; + + public static final String JSON_PROPERTY_ISSUE_KEY = "issue_key"; + private String issueKey; + + public static final String JSON_PROPERTY_ISSUE_URL = "issue_url"; + private String issueUrl; + + public static final String JSON_PROPERTY_TEAM_ID = "team_id"; + private String teamId; + + public IssueCaseLinearIssueResult accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Linear account identifier. + * + * @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 IssueCaseLinearIssueResult issueId(String issueId) { + this.issueId = issueId; + return this; + } + + /** + * Linear issue identifier. + * + * @return issueId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ISSUE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIssueId() { + return issueId; + } + + public void setIssueId(String issueId) { + this.issueId = issueId; + } + + public IssueCaseLinearIssueResult issueKey(String issueKey) { + this.issueKey = issueKey; + return this; + } + + /** + * Linear 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 IssueCaseLinearIssueResult issueUrl(String issueUrl) { + this.issueUrl = issueUrl; + return this; + } + + /** + * Linear issue URL. + * + * @return issueUrl + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ISSUE_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIssueUrl() { + return issueUrl; + } + + public void setIssueUrl(String issueUrl) { + this.issueUrl = issueUrl; + } + + public IssueCaseLinearIssueResult teamId(String teamId) { + this.teamId = teamId; + return this; + } + + /** + * Linear team identifier. + * + * @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; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return IssueCaseLinearIssueResult + */ + @JsonAnySetter + public IssueCaseLinearIssueResult putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this IssueCaseLinearIssueResult object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IssueCaseLinearIssueResult issueCaseLinearIssueResult = (IssueCaseLinearIssueResult) o; + return Objects.equals(this.accountId, issueCaseLinearIssueResult.accountId) + && Objects.equals(this.issueId, issueCaseLinearIssueResult.issueId) + && Objects.equals(this.issueKey, issueCaseLinearIssueResult.issueKey) + && Objects.equals(this.issueUrl, issueCaseLinearIssueResult.issueUrl) + && Objects.equals(this.teamId, issueCaseLinearIssueResult.teamId) + && Objects.equals( + this.additionalProperties, issueCaseLinearIssueResult.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(accountId, issueId, issueKey, issueUrl, teamId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IssueCaseLinearIssueResult {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" issueId: ").append(toIndentedString(issueId)).append("\n"); + sb.append(" issueKey: ").append(toIndentedString(issueKey)).append("\n"); + sb.append(" issueUrl: ").append(toIndentedString(issueUrl)).append("\n"); + sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/JSSourcemapAttributes.java b/src/main/java/com/datadog/api/client/v2/model/JSSourcemapAttributes.java new file mode 100644 index 00000000000..1f42bb5a312 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/JSSourcemapAttributes.java @@ -0,0 +1,462 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a JavaScript source map. */ +@JsonPropertyOrder({ + JSSourcemapAttributes.JSON_PROPERTY_ABSOLUTE_PATH, + JSSourcemapAttributes.JSON_PROPERTY_BLOB_STORAGE_SOURCEMAP_PATH, + JSSourcemapAttributes.JSON_PROPERTY_BUILD_ID, + JSSourcemapAttributes.JSON_PROPERTY_CREATED_AT, + JSSourcemapAttributes.JSON_PROPERTY_DOMAIN, + JSSourcemapAttributes.JSON_PROPERTY_FILE_NAME, + JSSourcemapAttributes.JSON_PROPERTY_MAPKIND, + JSSourcemapAttributes.JSON_PROPERTY_SERVICE, + JSSourcemapAttributes.JSON_PROPERTY_SIZE, + JSSourcemapAttributes.JSON_PROPERTY_VARIANT, + JSSourcemapAttributes.JSON_PROPERTY_VERSION, + JSSourcemapAttributes.JSON_PROPERTY_VERSION_CODE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class JSSourcemapAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ABSOLUTE_PATH = "absolute_path"; + private String absolutePath; + + public static final String JSON_PROPERTY_BLOB_STORAGE_SOURCEMAP_PATH = + "blob_storage_sourcemap_path"; + private String blobStorageSourcemapPath; + + public static final String JSON_PROPERTY_BUILD_ID = "build_id"; + private String buildId; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_DOMAIN = "domain"; + private String domain; + + public static final String JSON_PROPERTY_FILE_NAME = "file_name"; + private String fileName; + + public static final String JSON_PROPERTY_MAPKIND = "mapkind"; + private String mapkind; + + public static final String JSON_PROPERTY_SERVICE = "service"; + private String service; + + public static final String JSON_PROPERTY_SIZE = "size"; + private Long size; + + public static final String JSON_PROPERTY_VARIANT = "variant"; + private String variant; + + public static final String JSON_PROPERTY_VERSION = "version"; + private String version; + + public static final String JSON_PROPERTY_VERSION_CODE = "version_code"; + private String versionCode; + + public JSSourcemapAttributes() {} + + @JsonCreator + public JSSourcemapAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_MAPKIND) String mapkind, + @JsonProperty(required = true, value = JSON_PROPERTY_SIZE) Long size) { + this.createdAt = createdAt; + this.mapkind = mapkind; + this.size = size; + } + + public JSSourcemapAttributes absolutePath(String absolutePath) { + this.absolutePath = absolutePath; + return this; + } + + /** + * The absolute path to the minified JavaScript file. + * + * @return absolutePath + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ABSOLUTE_PATH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAbsolutePath() { + return absolutePath; + } + + public void setAbsolutePath(String absolutePath) { + this.absolutePath = absolutePath; + } + + public JSSourcemapAttributes blobStorageSourcemapPath(String blobStorageSourcemapPath) { + this.blobStorageSourcemapPath = blobStorageSourcemapPath; + return this; + } + + /** + * The path to the source map in blob storage. + * + * @return blobStorageSourcemapPath + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BLOB_STORAGE_SOURCEMAP_PATH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBlobStorageSourcemapPath() { + return blobStorageSourcemapPath; + } + + public void setBlobStorageSourcemapPath(String blobStorageSourcemapPath) { + this.blobStorageSourcemapPath = blobStorageSourcemapPath; + } + + public JSSourcemapAttributes buildId(String buildId) { + this.buildId = buildId; + return this; + } + + /** + * The build identifier. + * + * @return buildId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BUILD_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBuildId() { + return buildId; + } + + public void setBuildId(String buildId) { + this.buildId = buildId; + } + + public JSSourcemapAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The timestamp when the source map was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public JSSourcemapAttributes domain(String domain) { + this.domain = domain; + return this; + } + + /** + * The domain associated with the source map. + * + * @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 JSSourcemapAttributes fileName(String fileName) { + this.fileName = fileName; + return this; + } + + /** + * The file name of the minified JavaScript file. + * + * @return fileName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public JSSourcemapAttributes mapkind(String mapkind) { + this.mapkind = mapkind; + return this; + } + + /** + * The type of source map. + * + * @return mapkind + */ + @JsonProperty(JSON_PROPERTY_MAPKIND) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMapkind() { + return mapkind; + } + + public void setMapkind(String mapkind) { + this.mapkind = mapkind; + } + + public JSSourcemapAttributes service(String service) { + this.service = service; + return this; + } + + /** + * The service name associated with the source map. + * + * @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 JSSourcemapAttributes size(Long size) { + this.size = size; + return this; + } + + /** + * The size of the source map file in bytes. + * + * @return size + */ + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getSize() { + return size; + } + + public void setSize(Long size) { + this.size = size; + } + + public JSSourcemapAttributes variant(String variant) { + this.variant = variant; + return this; + } + + /** + * The source map variant. + * + * @return variant + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VARIANT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVariant() { + return variant; + } + + public void setVariant(String variant) { + this.variant = variant; + } + + public JSSourcemapAttributes version(String version) { + this.version = version; + return this; + } + + /** + * The version of the service associated with the source map. + * + * @return version + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public JSSourcemapAttributes versionCode(String versionCode) { + this.versionCode = versionCode; + return this; + } + + /** + * The version code. + * + * @return versionCode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVersionCode() { + return versionCode; + } + + public void setVersionCode(String versionCode) { + this.versionCode = versionCode; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return JSSourcemapAttributes + */ + @JsonAnySetter + public JSSourcemapAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this JSSourcemapAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JSSourcemapAttributes jsSourcemapAttributes = (JSSourcemapAttributes) o; + return Objects.equals(this.absolutePath, jsSourcemapAttributes.absolutePath) + && Objects.equals( + this.blobStorageSourcemapPath, jsSourcemapAttributes.blobStorageSourcemapPath) + && Objects.equals(this.buildId, jsSourcemapAttributes.buildId) + && Objects.equals(this.createdAt, jsSourcemapAttributes.createdAt) + && Objects.equals(this.domain, jsSourcemapAttributes.domain) + && Objects.equals(this.fileName, jsSourcemapAttributes.fileName) + && Objects.equals(this.mapkind, jsSourcemapAttributes.mapkind) + && Objects.equals(this.service, jsSourcemapAttributes.service) + && Objects.equals(this.size, jsSourcemapAttributes.size) + && Objects.equals(this.variant, jsSourcemapAttributes.variant) + && Objects.equals(this.version, jsSourcemapAttributes.version) + && Objects.equals(this.versionCode, jsSourcemapAttributes.versionCode) + && Objects.equals(this.additionalProperties, jsSourcemapAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + absolutePath, + blobStorageSourcemapPath, + buildId, + createdAt, + domain, + fileName, + mapkind, + service, + size, + variant, + version, + versionCode, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JSSourcemapAttributes {\n"); + sb.append(" absolutePath: ").append(toIndentedString(absolutePath)).append("\n"); + sb.append(" blobStorageSourcemapPath: ") + .append(toIndentedString(blobStorageSourcemapPath)) + .append("\n"); + sb.append(" buildId: ").append(toIndentedString(buildId)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" fileName: ").append(toIndentedString(fileName)).append("\n"); + sb.append(" mapkind: ").append(toIndentedString(mapkind)).append("\n"); + sb.append(" service: ").append(toIndentedString(service)).append("\n"); + sb.append(" size: ").append(toIndentedString(size)).append("\n"); + sb.append(" variant: ").append(toIndentedString(variant)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" versionCode: ").append(toIndentedString(versionCode)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/JSSourcemapData.java b/src/main/java/com/datadog/api/client/v2/model/JSSourcemapData.java new file mode 100644 index 00000000000..849edba1a4e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/JSSourcemapData.java @@ -0,0 +1,209 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** JavaScript source map data object. */ +@JsonPropertyOrder({ + JSSourcemapData.JSON_PROPERTY_ATTRIBUTES, + JSSourcemapData.JSON_PROPERTY_ID, + JSSourcemapData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class JSSourcemapData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private JSSourcemapAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SourcemapDataType type; + + public JSSourcemapData() {} + + @JsonCreator + public JSSourcemapData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + JSSourcemapAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SourcemapDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public JSSourcemapData attributes(JSSourcemapAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a JavaScript source map. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public JSSourcemapAttributes getAttributes() { + return attributes; + } + + public void setAttributes(JSSourcemapAttributes attributes) { + this.attributes = attributes; + } + + public JSSourcemapData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the source map. + * + * @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 JSSourcemapData type(SourcemapDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type for source map objects. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SourcemapDataType getType() { + return type; + } + + public void setType(SourcemapDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return JSSourcemapData + */ + @JsonAnySetter + public JSSourcemapData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this JSSourcemapData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JSSourcemapData jsSourcemapData = (JSSourcemapData) o; + return Objects.equals(this.attributes, jsSourcemapData.attributes) + && Objects.equals(this.id, jsSourcemapData.id) + && Objects.equals(this.type, jsSourcemapData.type) + && Objects.equals(this.additionalProperties, jsSourcemapData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JSSourcemapData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/JVMSourcemapAttributes.java b/src/main/java/com/datadog/api/client/v2/model/JVMSourcemapAttributes.java new file mode 100644 index 00000000000..7c3d1021693 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/JVMSourcemapAttributes.java @@ -0,0 +1,346 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a JVM mapping file. */ +@JsonPropertyOrder({ + JVMSourcemapAttributes.JSON_PROPERTY_BUILD_ID, + JVMSourcemapAttributes.JSON_PROPERTY_CREATED_AT, + JVMSourcemapAttributes.JSON_PROPERTY_MAPKIND, + JVMSourcemapAttributes.JSON_PROPERTY_SERVICE, + JVMSourcemapAttributes.JSON_PROPERTY_SIZE, + JVMSourcemapAttributes.JSON_PROPERTY_VARIANT, + JVMSourcemapAttributes.JSON_PROPERTY_VERSION, + JVMSourcemapAttributes.JSON_PROPERTY_VERSION_CODE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class JVMSourcemapAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_BUILD_ID = "build_id"; + private String buildId; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_MAPKIND = "mapkind"; + private String mapkind; + + public static final String JSON_PROPERTY_SERVICE = "service"; + private String service; + + public static final String JSON_PROPERTY_SIZE = "size"; + private Long size; + + public static final String JSON_PROPERTY_VARIANT = "variant"; + private String variant; + + public static final String JSON_PROPERTY_VERSION = "version"; + private String version; + + public static final String JSON_PROPERTY_VERSION_CODE = "version_code"; + private String versionCode; + + public JVMSourcemapAttributes() {} + + @JsonCreator + public JVMSourcemapAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_MAPKIND) String mapkind, + @JsonProperty(required = true, value = JSON_PROPERTY_SIZE) Long size) { + this.createdAt = createdAt; + this.mapkind = mapkind; + this.size = size; + } + + public JVMSourcemapAttributes buildId(String buildId) { + this.buildId = buildId; + return this; + } + + /** + * The build identifier (UUID format). + * + * @return buildId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BUILD_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBuildId() { + return buildId; + } + + public void setBuildId(String buildId) { + this.buildId = buildId; + } + + public JVMSourcemapAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The timestamp when the mapping file was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public JVMSourcemapAttributes mapkind(String mapkind) { + this.mapkind = mapkind; + return this; + } + + /** + * The type of source map. + * + * @return mapkind + */ + @JsonProperty(JSON_PROPERTY_MAPKIND) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMapkind() { + return mapkind; + } + + public void setMapkind(String mapkind) { + this.mapkind = mapkind; + } + + public JVMSourcemapAttributes service(String service) { + this.service = service; + return this; + } + + /** + * The service name associated with the mapping file. + * + * @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 JVMSourcemapAttributes size(Long size) { + this.size = size; + return this; + } + + /** + * The size of the mapping file in bytes. + * + * @return size + */ + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getSize() { + return size; + } + + public void setSize(Long size) { + this.size = size; + } + + public JVMSourcemapAttributes variant(String variant) { + this.variant = variant; + return this; + } + + /** + * The build variant (e.g., release, debug). + * + * @return variant + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VARIANT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVariant() { + return variant; + } + + public void setVariant(String variant) { + this.variant = variant; + } + + public JVMSourcemapAttributes version(String version) { + this.version = version; + return this; + } + + /** + * The version of the service associated with the mapping file. + * + * @return version + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public JVMSourcemapAttributes versionCode(String versionCode) { + this.versionCode = versionCode; + return this; + } + + /** + * The version code. + * + * @return versionCode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVersionCode() { + return versionCode; + } + + public void setVersionCode(String versionCode) { + this.versionCode = versionCode; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return JVMSourcemapAttributes + */ + @JsonAnySetter + public JVMSourcemapAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this JVMSourcemapAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JVMSourcemapAttributes jvmSourcemapAttributes = (JVMSourcemapAttributes) o; + return Objects.equals(this.buildId, jvmSourcemapAttributes.buildId) + && Objects.equals(this.createdAt, jvmSourcemapAttributes.createdAt) + && Objects.equals(this.mapkind, jvmSourcemapAttributes.mapkind) + && Objects.equals(this.service, jvmSourcemapAttributes.service) + && Objects.equals(this.size, jvmSourcemapAttributes.size) + && Objects.equals(this.variant, jvmSourcemapAttributes.variant) + && Objects.equals(this.version, jvmSourcemapAttributes.version) + && Objects.equals(this.versionCode, jvmSourcemapAttributes.versionCode) + && Objects.equals(this.additionalProperties, jvmSourcemapAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + buildId, + createdAt, + mapkind, + service, + size, + variant, + version, + versionCode, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JVMSourcemapAttributes {\n"); + sb.append(" buildId: ").append(toIndentedString(buildId)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" mapkind: ").append(toIndentedString(mapkind)).append("\n"); + sb.append(" service: ").append(toIndentedString(service)).append("\n"); + sb.append(" size: ").append(toIndentedString(size)).append("\n"); + sb.append(" variant: ").append(toIndentedString(variant)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" versionCode: ").append(toIndentedString(versionCode)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/JVMSourcemapData.java b/src/main/java/com/datadog/api/client/v2/model/JVMSourcemapData.java new file mode 100644 index 00000000000..8d3f7293fc4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/JVMSourcemapData.java @@ -0,0 +1,209 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** JVM (ProGuard/R8) mapping file data object. */ +@JsonPropertyOrder({ + JVMSourcemapData.JSON_PROPERTY_ATTRIBUTES, + JVMSourcemapData.JSON_PROPERTY_ID, + JVMSourcemapData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class JVMSourcemapData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private JVMSourcemapAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SourcemapDataType type; + + public JVMSourcemapData() {} + + @JsonCreator + public JVMSourcemapData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + JVMSourcemapAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SourcemapDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public JVMSourcemapData attributes(JVMSourcemapAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a JVM mapping file. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public JVMSourcemapAttributes getAttributes() { + return attributes; + } + + public void setAttributes(JVMSourcemapAttributes attributes) { + this.attributes = attributes; + } + + public JVMSourcemapData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the source map. + * + * @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 JVMSourcemapData type(SourcemapDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type for source map objects. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SourcemapDataType getType() { + return type; + } + + public void setType(SourcemapDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return JVMSourcemapData + */ + @JsonAnySetter + public JVMSourcemapData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this JVMSourcemapData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JVMSourcemapData jvmSourcemapData = (JVMSourcemapData) o; + return Objects.equals(this.attributes, jvmSourcemapData.attributes) + && Objects.equals(this.id, jvmSourcemapData.id) + && Objects.equals(this.type, jvmSourcemapData.type) + && Objects.equals(this.additionalProperties, jvmSourcemapData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JVMSourcemapData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotatedInteractionsDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotatedInteractionsDataResponse.java index 62ae81b386a..07ea4502d9c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotatedInteractionsDataResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotatedInteractionsDataResponse.java @@ -80,7 +80,7 @@ public LLMObsAnnotatedInteractionsDataResponse id(String id) { } /** - * The queue ID. + * The annotation queue ID. * * @return id */ diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationAssessment.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationAssessment.java new file mode 100644 index 00000000000..43bd7444a27 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationAssessment.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Assessment result for a label value. */ +@JsonSerialize(using = LLMObsAnnotationAssessment.LLMObsAnnotationAssessmentSerializer.class) +public class LLMObsAnnotationAssessment extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("pass", "fail")); + + public static final LLMObsAnnotationAssessment PASS = new LLMObsAnnotationAssessment("pass"); + public static final LLMObsAnnotationAssessment FAIL = new LLMObsAnnotationAssessment("fail"); + + LLMObsAnnotationAssessment(String value) { + super(value, allowedValues); + } + + public static class LLMObsAnnotationAssessmentSerializer + extends StdSerializer { + public LLMObsAnnotationAssessmentSerializer(Class t) { + super(t); + } + + public LLMObsAnnotationAssessmentSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsAnnotationAssessment value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LLMObsAnnotationAssessment fromValue(String value) { + return new LLMObsAnnotationAssessment(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationError.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationError.java new file mode 100644 index 00000000000..86c8f4e21bc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationError.java @@ -0,0 +1,200 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A partial error for a single annotation that could not be processed. */ +@JsonPropertyOrder({ + LLMObsAnnotationError.JSON_PROPERTY_ANNOTATION_ID, + LLMObsAnnotationError.JSON_PROPERTY_ERROR, + LLMObsAnnotationError.JSON_PROPERTY_INTERACTION_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsAnnotationError { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ANNOTATION_ID = "annotation_id"; + private String annotationId; + + public static final String JSON_PROPERTY_ERROR = "error"; + private String error; + + public static final String JSON_PROPERTY_INTERACTION_ID = "interaction_id"; + private String interactionId; + + public LLMObsAnnotationError() {} + + @JsonCreator + public LLMObsAnnotationError( + @JsonProperty(required = true, value = JSON_PROPERTY_ERROR) String error, + @JsonProperty(required = true, value = JSON_PROPERTY_INTERACTION_ID) String interactionId) { + this.error = error; + this.interactionId = interactionId; + } + + public LLMObsAnnotationError annotationId(String annotationId) { + this.annotationId = annotationId; + return this; + } + + /** + * ID of the annotation that failed, if applicable. + * + * @return annotationId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ANNOTATION_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAnnotationId() { + return annotationId; + } + + public void setAnnotationId(String annotationId) { + this.annotationId = annotationId; + } + + public LLMObsAnnotationError error(String error) { + this.error = error; + return this; + } + + /** + * Error message. + * + * @return error + */ + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getError() { + return error; + } + + public void setError(String error) { + this.error = error; + } + + public LLMObsAnnotationError interactionId(String interactionId) { + this.interactionId = interactionId; + return this; + } + + /** + * ID of the interaction that failed. + * + * @return interactionId + */ + @JsonProperty(JSON_PROPERTY_INTERACTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getInteractionId() { + return interactionId; + } + + public void setInteractionId(String interactionId) { + this.interactionId = interactionId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsAnnotationError + */ + @JsonAnySetter + public LLMObsAnnotationError putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsAnnotationError object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsAnnotationError llmObsAnnotationError = (LLMObsAnnotationError) o; + return Objects.equals(this.annotationId, llmObsAnnotationError.annotationId) + && Objects.equals(this.error, llmObsAnnotationError.error) + && Objects.equals(this.interactionId, llmObsAnnotationError.interactionId) + && Objects.equals(this.additionalProperties, llmObsAnnotationError.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(annotationId, error, interactionId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsAnnotationError {\n"); + sb.append(" annotationId: ").append(toIndentedString(annotationId)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" interactionId: ").append(toIndentedString(interactionId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationItem.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationItem.java index 1eb13ce37e4..c5d3b867b6c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationItem.java +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationItem.java @@ -165,7 +165,7 @@ public LLMObsAnnotationItem putLabelValuesItem(String key, Object labelValuesIte } /** - * The label values for this annotation. + * Label values for this annotation. * * @return labelValues */ diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationItemResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationItemResponse.java new file mode 100644 index 00000000000..4516727114a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationItemResponse.java @@ -0,0 +1,338 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** A single annotation on an interaction, as returned by the API. */ +@JsonPropertyOrder({ + LLMObsAnnotationItemResponse.JSON_PROPERTY_CREATED_AT, + LLMObsAnnotationItemResponse.JSON_PROPERTY_CREATED_BY, + LLMObsAnnotationItemResponse.JSON_PROPERTY_ID, + LLMObsAnnotationItemResponse.JSON_PROPERTY_INTERACTION_ID, + LLMObsAnnotationItemResponse.JSON_PROPERTY_LABEL_VALUES, + LLMObsAnnotationItemResponse.JSON_PROPERTY_MODIFIED_AT, + LLMObsAnnotationItemResponse.JSON_PROPERTY_MODIFIED_BY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsAnnotationItemResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_CREATED_BY = "created_by"; + private String createdBy; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_INTERACTION_ID = "interaction_id"; + private String interactionId; + + public static final String JSON_PROPERTY_LABEL_VALUES = "label_values"; + private List labelValues = new ArrayList<>(); + + public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; + private OffsetDateTime modifiedAt; + + public static final String JSON_PROPERTY_MODIFIED_BY = "modified_by"; + private String modifiedBy; + + public LLMObsAnnotationItemResponse() {} + + @JsonCreator + public LLMObsAnnotationItemResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_BY) String createdBy, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_INTERACTION_ID) String interactionId, + @JsonProperty(required = true, value = JSON_PROPERTY_LABEL_VALUES) + List labelValues, + @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED_AT) OffsetDateTime modifiedAt, + @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED_BY) String modifiedBy) { + this.createdAt = createdAt; + this.createdBy = createdBy; + this.id = id; + this.interactionId = interactionId; + this.labelValues = labelValues; + this.modifiedAt = modifiedAt; + this.modifiedBy = modifiedBy; + } + + public LLMObsAnnotationItemResponse createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp when the annotation was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public LLMObsAnnotationItemResponse createdBy(String createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + * Identifier of the user who created the annotation. + * + * @return createdBy + */ + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public LLMObsAnnotationItemResponse id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the annotation. + * + * @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 LLMObsAnnotationItemResponse interactionId(String interactionId) { + this.interactionId = interactionId; + return this; + } + + /** + * Identifier of the interaction this annotation belongs to. + * + * @return interactionId + */ + @JsonProperty(JSON_PROPERTY_INTERACTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getInteractionId() { + return interactionId; + } + + public void setInteractionId(String interactionId) { + this.interactionId = interactionId; + } + + public LLMObsAnnotationItemResponse labelValues( + List labelValues) { + this.labelValues = labelValues; + for (LLMObsAnnotationLabelValueResponse item : labelValues) { + this.unparsed |= item.unparsed; + } + return this; + } + + public LLMObsAnnotationItemResponse addLabelValuesItem( + LLMObsAnnotationLabelValueResponse labelValuesItem) { + this.labelValues.add(labelValuesItem); + this.unparsed |= labelValuesItem.unparsed; + return this; + } + + /** + * Label values for this annotation. Each entry references a label schema by ID and provides the + * corresponding value. + * + * @return labelValues + */ + @JsonProperty(JSON_PROPERTY_LABEL_VALUES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getLabelValues() { + return labelValues; + } + + public void setLabelValues(List labelValues) { + this.labelValues = labelValues; + } + + public LLMObsAnnotationItemResponse modifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + return this; + } + + /** + * Timestamp when the annotation was last modified. + * + * @return modifiedAt + */ + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } + + public void setModifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + } + + public LLMObsAnnotationItemResponse modifiedBy(String modifiedBy) { + this.modifiedBy = modifiedBy; + return this; + } + + /** + * Identifier of the user who last modified the annotation. + * + * @return modifiedBy + */ + @JsonProperty(JSON_PROPERTY_MODIFIED_BY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getModifiedBy() { + return modifiedBy; + } + + public void setModifiedBy(String modifiedBy) { + this.modifiedBy = modifiedBy; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsAnnotationItemResponse + */ + @JsonAnySetter + public LLMObsAnnotationItemResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsAnnotationItemResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsAnnotationItemResponse llmObsAnnotationItemResponse = (LLMObsAnnotationItemResponse) o; + return Objects.equals(this.createdAt, llmObsAnnotationItemResponse.createdAt) + && Objects.equals(this.createdBy, llmObsAnnotationItemResponse.createdBy) + && Objects.equals(this.id, llmObsAnnotationItemResponse.id) + && Objects.equals(this.interactionId, llmObsAnnotationItemResponse.interactionId) + && Objects.equals(this.labelValues, llmObsAnnotationItemResponse.labelValues) + && Objects.equals(this.modifiedAt, llmObsAnnotationItemResponse.modifiedAt) + && Objects.equals(this.modifiedBy, llmObsAnnotationItemResponse.modifiedBy) + && Objects.equals( + this.additionalProperties, llmObsAnnotationItemResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + createdBy, + id, + interactionId, + labelValues, + modifiedAt, + modifiedBy, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsAnnotationItemResponse {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" interactionId: ").append(toIndentedString(interactionId)).append("\n"); + sb.append(" labelValues: ").append(toIndentedString(labelValues)).append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append(" modifiedBy: ").append(toIndentedString(modifiedBy)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationLabelValue.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationLabelValue.java new file mode 100644 index 00000000000..0668fca1c69 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationLabelValue.java @@ -0,0 +1,241 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * A single label value entry in an annotation. The value type must match the label + * schema type: - score: a number within the schema min/max + * range (integer if is_integer is true). - categorical: a + * string that is one of the schema values. - boolean: true + * or false. - text: any non-empty string. + */ +@JsonPropertyOrder({ + LLMObsAnnotationLabelValue.JSON_PROPERTY_ASSESSMENT, + LLMObsAnnotationLabelValue.JSON_PROPERTY_LABEL_SCHEMA_ID, + LLMObsAnnotationLabelValue.JSON_PROPERTY_REASONING, + LLMObsAnnotationLabelValue.JSON_PROPERTY_VALUE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsAnnotationLabelValue { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ASSESSMENT = "assessment"; + private LLMObsAnnotationAssessment assessment; + + public static final String JSON_PROPERTY_LABEL_SCHEMA_ID = "label_schema_id"; + private String labelSchemaId; + + public static final String JSON_PROPERTY_REASONING = "reasoning"; + private String reasoning; + + public static final String JSON_PROPERTY_VALUE = "value"; + private LLMObsAnnotationLabelValueValue value; + + public LLMObsAnnotationLabelValue() {} + + @JsonCreator + public LLMObsAnnotationLabelValue( + @JsonProperty(required = true, value = JSON_PROPERTY_LABEL_SCHEMA_ID) String labelSchemaId, + @JsonProperty(required = true, value = JSON_PROPERTY_VALUE) + LLMObsAnnotationLabelValueValue value) { + this.labelSchemaId = labelSchemaId; + this.value = value; + this.unparsed |= value.unparsed; + } + + public LLMObsAnnotationLabelValue assessment(LLMObsAnnotationAssessment assessment) { + this.assessment = assessment; + this.unparsed |= !assessment.isValid(); + return this; + } + + /** + * Assessment result for a label value. + * + * @return assessment + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ASSESSMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public LLMObsAnnotationAssessment getAssessment() { + return assessment; + } + + public void setAssessment(LLMObsAnnotationAssessment assessment) { + if (!assessment.isValid()) { + this.unparsed = true; + } + this.assessment = assessment; + } + + public LLMObsAnnotationLabelValue labelSchemaId(String labelSchemaId) { + this.labelSchemaId = labelSchemaId; + return this; + } + + /** + * ID of the label schema this value corresponds to. + * + * @return labelSchemaId + */ + @JsonProperty(JSON_PROPERTY_LABEL_SCHEMA_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getLabelSchemaId() { + return labelSchemaId; + } + + public void setLabelSchemaId(String labelSchemaId) { + this.labelSchemaId = labelSchemaId; + } + + public LLMObsAnnotationLabelValue reasoning(String reasoning) { + this.reasoning = reasoning; + return this; + } + + /** + * Free text reasoning for this label value. + * + * @return reasoning + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REASONING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getReasoning() { + return reasoning; + } + + public void setReasoning(String reasoning) { + this.reasoning = reasoning; + } + + public LLMObsAnnotationLabelValue value(LLMObsAnnotationLabelValueValue value) { + this.value = value; + this.unparsed |= value.unparsed; + return this; + } + + /** + * The value for this label. Must comply with the label schema type constraints. + * + * @return value + */ + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsAnnotationLabelValueValue getValue() { + return value; + } + + public void setValue(LLMObsAnnotationLabelValueValue value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsAnnotationLabelValue + */ + @JsonAnySetter + public LLMObsAnnotationLabelValue putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsAnnotationLabelValue object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsAnnotationLabelValue llmObsAnnotationLabelValue = (LLMObsAnnotationLabelValue) o; + return Objects.equals(this.assessment, llmObsAnnotationLabelValue.assessment) + && Objects.equals(this.labelSchemaId, llmObsAnnotationLabelValue.labelSchemaId) + && Objects.equals(this.reasoning, llmObsAnnotationLabelValue.reasoning) + && Objects.equals(this.value, llmObsAnnotationLabelValue.value) + && Objects.equals( + this.additionalProperties, llmObsAnnotationLabelValue.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(assessment, labelSchemaId, reasoning, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsAnnotationLabelValue {\n"); + sb.append(" assessment: ").append(toIndentedString(assessment)).append("\n"); + sb.append(" labelSchemaId: ").append(toIndentedString(labelSchemaId)).append("\n"); + sb.append(" reasoning: ").append(toIndentedString(reasoning)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationLabelValueResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationLabelValueResponse.java new file mode 100644 index 00000000000..e078adf1283 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationLabelValueResponse.java @@ -0,0 +1,300 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * A single label value entry in an annotation response. In addition to the submitted fields, the + * server populates type and name_when_saved to mirror the schema state at + * the time the annotation was created — these help clients display values correctly when the schema + * has since changed. + */ +@JsonPropertyOrder({ + LLMObsAnnotationLabelValueResponse.JSON_PROPERTY_ASSESSMENT, + LLMObsAnnotationLabelValueResponse.JSON_PROPERTY_LABEL_SCHEMA_ID, + LLMObsAnnotationLabelValueResponse.JSON_PROPERTY_NAME_WHEN_SAVED, + LLMObsAnnotationLabelValueResponse.JSON_PROPERTY_REASONING, + LLMObsAnnotationLabelValueResponse.JSON_PROPERTY_TYPE, + LLMObsAnnotationLabelValueResponse.JSON_PROPERTY_VALUE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsAnnotationLabelValueResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ASSESSMENT = "assessment"; + private LLMObsAnnotationAssessment assessment; + + public static final String JSON_PROPERTY_LABEL_SCHEMA_ID = "label_schema_id"; + private String labelSchemaId; + + public static final String JSON_PROPERTY_NAME_WHEN_SAVED = "name_when_saved"; + private String nameWhenSaved; + + public static final String JSON_PROPERTY_REASONING = "reasoning"; + private String reasoning; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsLabelSchemaType type; + + public static final String JSON_PROPERTY_VALUE = "value"; + private LLMObsAnnotationLabelValueValue value; + + public LLMObsAnnotationLabelValueResponse() {} + + @JsonCreator + public LLMObsAnnotationLabelValueResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_LABEL_SCHEMA_ID) String labelSchemaId, + @JsonProperty(required = true, value = JSON_PROPERTY_VALUE) + LLMObsAnnotationLabelValueValue value) { + this.labelSchemaId = labelSchemaId; + this.value = value; + this.unparsed |= value.unparsed; + } + + public LLMObsAnnotationLabelValueResponse assessment(LLMObsAnnotationAssessment assessment) { + this.assessment = assessment; + this.unparsed |= !assessment.isValid(); + return this; + } + + /** + * Assessment result for a label value. + * + * @return assessment + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ASSESSMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public LLMObsAnnotationAssessment getAssessment() { + return assessment; + } + + public void setAssessment(LLMObsAnnotationAssessment assessment) { + if (!assessment.isValid()) { + this.unparsed = true; + } + this.assessment = assessment; + } + + public LLMObsAnnotationLabelValueResponse labelSchemaId(String labelSchemaId) { + this.labelSchemaId = labelSchemaId; + return this; + } + + /** + * ID of the label schema this value corresponds to. + * + * @return labelSchemaId + */ + @JsonProperty(JSON_PROPERTY_LABEL_SCHEMA_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getLabelSchemaId() { + return labelSchemaId; + } + + public void setLabelSchemaId(String labelSchemaId) { + this.labelSchemaId = labelSchemaId; + } + + public LLMObsAnnotationLabelValueResponse nameWhenSaved(String nameWhenSaved) { + this.nameWhenSaved = nameWhenSaved; + return this; + } + + /** + * Name of the label schema at the time the annotation was created. + * + * @return nameWhenSaved + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME_WHEN_SAVED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNameWhenSaved() { + return nameWhenSaved; + } + + public void setNameWhenSaved(String nameWhenSaved) { + this.nameWhenSaved = nameWhenSaved; + } + + public LLMObsAnnotationLabelValueResponse reasoning(String reasoning) { + this.reasoning = reasoning; + return this; + } + + /** + * Free text reasoning for this label value. + * + * @return reasoning + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REASONING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getReasoning() { + return reasoning; + } + + public void setReasoning(String reasoning) { + this.reasoning = reasoning; + } + + public LLMObsAnnotationLabelValueResponse type(LLMObsLabelSchemaType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Type of a label in an annotation queue label schema. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public LLMObsLabelSchemaType getType() { + return type; + } + + public void setType(LLMObsLabelSchemaType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + public LLMObsAnnotationLabelValueResponse value(LLMObsAnnotationLabelValueValue value) { + this.value = value; + this.unparsed |= value.unparsed; + return this; + } + + /** + * The value for this label. Must comply with the label schema type constraints. + * + * @return value + */ + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsAnnotationLabelValueValue getValue() { + return value; + } + + public void setValue(LLMObsAnnotationLabelValueValue value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsAnnotationLabelValueResponse + */ + @JsonAnySetter + public LLMObsAnnotationLabelValueResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsAnnotationLabelValueResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsAnnotationLabelValueResponse llmObsAnnotationLabelValueResponse = + (LLMObsAnnotationLabelValueResponse) o; + return Objects.equals(this.assessment, llmObsAnnotationLabelValueResponse.assessment) + && Objects.equals(this.labelSchemaId, llmObsAnnotationLabelValueResponse.labelSchemaId) + && Objects.equals(this.nameWhenSaved, llmObsAnnotationLabelValueResponse.nameWhenSaved) + && Objects.equals(this.reasoning, llmObsAnnotationLabelValueResponse.reasoning) + && Objects.equals(this.type, llmObsAnnotationLabelValueResponse.type) + && Objects.equals(this.value, llmObsAnnotationLabelValueResponse.value) + && Objects.equals( + this.additionalProperties, llmObsAnnotationLabelValueResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + assessment, labelSchemaId, nameWhenSaved, reasoning, type, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsAnnotationLabelValueResponse {\n"); + sb.append(" assessment: ").append(toIndentedString(assessment)).append("\n"); + sb.append(" labelSchemaId: ").append(toIndentedString(labelSchemaId)).append("\n"); + sb.append(" nameWhenSaved: ").append(toIndentedString(nameWhenSaved)).append("\n"); + sb.append(" reasoning: ").append(toIndentedString(reasoning)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationLabelValueValue.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationLabelValueValue.java new file mode 100644 index 00000000000..0b5df371d15 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationLabelValueValue.java @@ -0,0 +1,402 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.JSON; +import com.datadog.api.client.UnparsedObject; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import jakarta.ws.rs.core.GenericType; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize( + using = LLMObsAnnotationLabelValueValue.LLMObsAnnotationLabelValueValueDeserializer.class) +@JsonSerialize( + using = LLMObsAnnotationLabelValueValue.LLMObsAnnotationLabelValueValueSerializer.class) +public class LLMObsAnnotationLabelValueValue extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(LLMObsAnnotationLabelValueValue.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class LLMObsAnnotationLabelValueValueSerializer + extends StdSerializer { + public LLMObsAnnotationLabelValueValueSerializer(Class t) { + super(t); + } + + public LLMObsAnnotationLabelValueValueSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsAnnotationLabelValueValue value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class LLMObsAnnotationLabelValueValueDeserializer + extends StdDeserializer { + public LLMObsAnnotationLabelValueValueDeserializer() { + this(LLMObsAnnotationLabelValueValue.class); + } + + public LLMObsAnnotationLabelValueValueDeserializer(Class vc) { + super(vc); + } + + @Override + public LLMObsAnnotationLabelValueValue 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 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 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(new TypeReference>() {}); + // TODO: there is no validation against JSON schema constraints + // (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); + } + + // 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); + } + + LLMObsAnnotationLabelValueValue ret = new LLMObsAnnotationLabelValueValue(); + 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 LLMObsAnnotationLabelValueValue getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "LLMObsAnnotationLabelValueValue cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public LLMObsAnnotationLabelValueValue() { + super("oneOf", Boolean.FALSE); + } + + public LLMObsAnnotationLabelValueValue(Double o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public LLMObsAnnotationLabelValueValue(String o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public LLMObsAnnotationLabelValueValue(List o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public LLMObsAnnotationLabelValueValue(Boolean o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("Double", new GenericType() {}); + schemas.put("String", new GenericType() {}); + schemas.put("List", new GenericType>() {}); + schemas.put("Boolean", new GenericType() {}); + JSON.registerDescendants( + LLMObsAnnotationLabelValueValue.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return LLMObsAnnotationLabelValueValue.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: Double, String, List<String>, Boolean + * + *

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(String.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(List.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(Boolean.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, String, List, Boolean"); + } + + /** + * Get the actual instance, which can be the following: Double, String, List<String>, + * Boolean + * + * @return The actual instance (Double, String, List<String>, Boolean) + */ + @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 `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 `List<String>`. If the actual instance is not + * `List<String>`, the ClassCastException will be thrown. + * + * @return The actual instance of `List<String>` + * @throws ClassCastException if the instance is not `List<String>` + */ + public List getList() throws ClassCastException { + return (List) 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(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationsDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationsDataAttributesRequest.java new file mode 100644 index 00000000000..a1db51acee7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationsDataAttributesRequest.java @@ -0,0 +1,159 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes for creating or updating annotations. */ +@JsonPropertyOrder({LLMObsAnnotationsDataAttributesRequest.JSON_PROPERTY_ANNOTATIONS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsAnnotationsDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ANNOTATIONS = "annotations"; + private List annotations = new ArrayList<>(); + + public LLMObsAnnotationsDataAttributesRequest() {} + + @JsonCreator + public LLMObsAnnotationsDataAttributesRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ANNOTATIONS) + List annotations) { + this.annotations = annotations; + } + + public LLMObsAnnotationsDataAttributesRequest annotations( + List annotations) { + this.annotations = annotations; + for (LLMObsUpsertAnnotationItem item : annotations) { + this.unparsed |= item.unparsed; + } + return this; + } + + public LLMObsAnnotationsDataAttributesRequest addAnnotationsItem( + LLMObsUpsertAnnotationItem annotationsItem) { + this.annotations.add(annotationsItem); + this.unparsed |= annotationsItem.unparsed; + return this; + } + + /** + * List of annotations to create or update. Must contain at least one item. + * + * @return annotations + */ + @JsonProperty(JSON_PROPERTY_ANNOTATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getAnnotations() { + return annotations; + } + + public void setAnnotations(List annotations) { + this.annotations = annotations; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsAnnotationsDataAttributesRequest + */ + @JsonAnySetter + public LLMObsAnnotationsDataAttributesRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsAnnotationsDataAttributesRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsAnnotationsDataAttributesRequest llmObsAnnotationsDataAttributesRequest = + (LLMObsAnnotationsDataAttributesRequest) o; + return Objects.equals(this.annotations, llmObsAnnotationsDataAttributesRequest.annotations) + && Objects.equals( + this.additionalProperties, llmObsAnnotationsDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(annotations, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsAnnotationsDataAttributesRequest {\n"); + sb.append(" annotations: ").append(toIndentedString(annotations)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationsDataAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationsDataAttributesResponse.java new file mode 100644 index 00000000000..b666705b826 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationsDataAttributesResponse.java @@ -0,0 +1,201 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of the annotations response. */ +@JsonPropertyOrder({ + LLMObsAnnotationsDataAttributesResponse.JSON_PROPERTY_ANNOTATIONS, + LLMObsAnnotationsDataAttributesResponse.JSON_PROPERTY_ERRORS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsAnnotationsDataAttributesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ANNOTATIONS = "annotations"; + private List annotations = new ArrayList<>(); + + public static final String JSON_PROPERTY_ERRORS = "errors"; + private List errors = null; + + public LLMObsAnnotationsDataAttributesResponse() {} + + @JsonCreator + public LLMObsAnnotationsDataAttributesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ANNOTATIONS) + List annotations) { + this.annotations = annotations; + } + + public LLMObsAnnotationsDataAttributesResponse annotations( + List annotations) { + this.annotations = annotations; + for (LLMObsAnnotationItemResponse item : annotations) { + this.unparsed |= item.unparsed; + } + return this; + } + + public LLMObsAnnotationsDataAttributesResponse addAnnotationsItem( + LLMObsAnnotationItemResponse annotationsItem) { + this.annotations.add(annotationsItem); + this.unparsed |= annotationsItem.unparsed; + return this; + } + + /** + * Successfully created or updated annotations. + * + * @return annotations + */ + @JsonProperty(JSON_PROPERTY_ANNOTATIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getAnnotations() { + return annotations; + } + + public void setAnnotations(List annotations) { + this.annotations = annotations; + } + + public LLMObsAnnotationsDataAttributesResponse errors(List errors) { + this.errors = errors; + for (LLMObsAnnotationError item : errors) { + this.unparsed |= item.unparsed; + } + return this; + } + + public LLMObsAnnotationsDataAttributesResponse addErrorsItem(LLMObsAnnotationError errorsItem) { + if (this.errors == null) { + this.errors = new ArrayList<>(); + } + this.errors.add(errorsItem); + this.unparsed |= errorsItem.unparsed; + return this; + } + + /** + * Partial errors for annotations that could not be processed. + * + * @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; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsAnnotationsDataAttributesResponse + */ + @JsonAnySetter + public LLMObsAnnotationsDataAttributesResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsAnnotationsDataAttributesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsAnnotationsDataAttributesResponse llmObsAnnotationsDataAttributesResponse = + (LLMObsAnnotationsDataAttributesResponse) o; + return Objects.equals(this.annotations, llmObsAnnotationsDataAttributesResponse.annotations) + && Objects.equals(this.errors, llmObsAnnotationsDataAttributesResponse.errors) + && Objects.equals( + this.additionalProperties, + llmObsAnnotationsDataAttributesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(annotations, errors, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsAnnotationsDataAttributesResponse {\n"); + sb.append(" annotations: ").append(toIndentedString(annotations)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationsDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationsDataRequest.java new file mode 100644 index 00000000000..c4682a4c411 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationsDataRequest.java @@ -0,0 +1,183 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object for creating or updating annotations. */ +@JsonPropertyOrder({ + LLMObsAnnotationsDataRequest.JSON_PROPERTY_ATTRIBUTES, + LLMObsAnnotationsDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsAnnotationsDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsAnnotationsDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsAnnotationsType type; + + public LLMObsAnnotationsDataRequest() {} + + @JsonCreator + public LLMObsAnnotationsDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsAnnotationsDataAttributesRequest attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LLMObsAnnotationsType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsAnnotationsDataRequest attributes( + LLMObsAnnotationsDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating or updating annotations. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsAnnotationsDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsAnnotationsDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public LLMObsAnnotationsDataRequest type(LLMObsAnnotationsType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type for LLM Observability annotations. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsAnnotationsType getType() { + return type; + } + + public void setType(LLMObsAnnotationsType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsAnnotationsDataRequest + */ + @JsonAnySetter + public LLMObsAnnotationsDataRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsAnnotationsDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsAnnotationsDataRequest llmObsAnnotationsDataRequest = (LLMObsAnnotationsDataRequest) o; + return Objects.equals(this.attributes, llmObsAnnotationsDataRequest.attributes) + && Objects.equals(this.type, llmObsAnnotationsDataRequest.type) + && Objects.equals( + this.additionalProperties, llmObsAnnotationsDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsAnnotationsDataRequest {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationsDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationsDataResponse.java new file mode 100644 index 00000000000..12a11c5d521 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationsDataResponse.java @@ -0,0 +1,211 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object for the annotations response. */ +@JsonPropertyOrder({ + LLMObsAnnotationsDataResponse.JSON_PROPERTY_ATTRIBUTES, + LLMObsAnnotationsDataResponse.JSON_PROPERTY_ID, + LLMObsAnnotationsDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsAnnotationsDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsAnnotationsDataAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsAnnotationsType type; + + public LLMObsAnnotationsDataResponse() {} + + @JsonCreator + public LLMObsAnnotationsDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsAnnotationsDataAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LLMObsAnnotationsType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsAnnotationsDataResponse attributes( + LLMObsAnnotationsDataAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of the annotations response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsAnnotationsDataAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsAnnotationsDataAttributesResponse attributes) { + this.attributes = attributes; + } + + public LLMObsAnnotationsDataResponse id(String id) { + this.id = id; + return this; + } + + /** + * The annotation queue 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 LLMObsAnnotationsDataResponse type(LLMObsAnnotationsType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type for LLM Observability annotations. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsAnnotationsType getType() { + return type; + } + + public void setType(LLMObsAnnotationsType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsAnnotationsDataResponse + */ + @JsonAnySetter + public LLMObsAnnotationsDataResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsAnnotationsDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsAnnotationsDataResponse llmObsAnnotationsDataResponse = (LLMObsAnnotationsDataResponse) o; + return Objects.equals(this.attributes, llmObsAnnotationsDataResponse.attributes) + && Objects.equals(this.id, llmObsAnnotationsDataResponse.id) + && Objects.equals(this.type, llmObsAnnotationsDataResponse.type) + && Objects.equals( + this.additionalProperties, llmObsAnnotationsDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsAnnotationsDataResponse {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationsRequest.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationsRequest.java new file mode 100644 index 00000000000..430910b6951 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationsRequest.java @@ -0,0 +1,146 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to create or update annotations on interactions in an annotation queue. */ +@JsonPropertyOrder({LLMObsAnnotationsRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsAnnotationsRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsAnnotationsDataRequest data; + + public LLMObsAnnotationsRequest() {} + + @JsonCreator + public LLMObsAnnotationsRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + LLMObsAnnotationsDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsAnnotationsRequest data(LLMObsAnnotationsDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for creating or updating annotations. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsAnnotationsDataRequest getData() { + return data; + } + + public void setData(LLMObsAnnotationsDataRequest data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsAnnotationsRequest + */ + @JsonAnySetter + public LLMObsAnnotationsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsAnnotationsRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsAnnotationsRequest llmObsAnnotationsRequest = (LLMObsAnnotationsRequest) o; + return Objects.equals(this.data, llmObsAnnotationsRequest.data) + && Objects.equals(this.additionalProperties, llmObsAnnotationsRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsAnnotationsRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationsResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationsResponse.java new file mode 100644 index 00000000000..9effd251371 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationsResponse.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing the created or updated annotations. */ +@JsonPropertyOrder({LLMObsAnnotationsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsAnnotationsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsAnnotationsDataResponse data; + + public LLMObsAnnotationsResponse() {} + + @JsonCreator + public LLMObsAnnotationsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + LLMObsAnnotationsDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsAnnotationsResponse data(LLMObsAnnotationsDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for the annotations response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsAnnotationsDataResponse getData() { + return data; + } + + public void setData(LLMObsAnnotationsDataResponse data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsAnnotationsResponse + */ + @JsonAnySetter + public LLMObsAnnotationsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsAnnotationsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsAnnotationsResponse llmObsAnnotationsResponse = (LLMObsAnnotationsResponse) o; + return Objects.equals(this.data, llmObsAnnotationsResponse.data) + && Objects.equals( + this.additionalProperties, llmObsAnnotationsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsAnnotationsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationsType.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationsType.java new file mode 100644 index 00000000000..cb92f84f1f5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsAnnotationsType.java @@ -0,0 +1,55 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Resource type for LLM Observability annotations. */ +@JsonSerialize(using = LLMObsAnnotationsType.LLMObsAnnotationsTypeSerializer.class) +public class LLMObsAnnotationsType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("annotations")); + + public static final LLMObsAnnotationsType ANNOTATIONS = new LLMObsAnnotationsType("annotations"); + + LLMObsAnnotationsType(String value) { + super(value, allowedValues); + } + + public static class LLMObsAnnotationsTypeSerializer extends StdSerializer { + public LLMObsAnnotationsTypeSerializer(Class t) { + super(t); + } + + public LLMObsAnnotationsTypeSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsAnnotationsType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LLMObsAnnotationsType fromValue(String value) { + return new LLMObsAnnotationsType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsDeleteAnnotationError.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsDeleteAnnotationError.java new file mode 100644 index 00000000000..0ba3f8e049a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsDeleteAnnotationError.java @@ -0,0 +1,174 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A partial error for a single annotation that could not be deleted. */ +@JsonPropertyOrder({ + LLMObsDeleteAnnotationError.JSON_PROPERTY_ANNOTATION_ID, + LLMObsDeleteAnnotationError.JSON_PROPERTY_ERROR +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsDeleteAnnotationError { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ANNOTATION_ID = "annotation_id"; + private String annotationId; + + public static final String JSON_PROPERTY_ERROR = "error"; + private String error; + + public LLMObsDeleteAnnotationError() {} + + @JsonCreator + public LLMObsDeleteAnnotationError( + @JsonProperty(required = true, value = JSON_PROPERTY_ANNOTATION_ID) String annotationId, + @JsonProperty(required = true, value = JSON_PROPERTY_ERROR) String error) { + this.annotationId = annotationId; + this.error = error; + } + + public LLMObsDeleteAnnotationError annotationId(String annotationId) { + this.annotationId = annotationId; + return this; + } + + /** + * ID of the annotation that could not be deleted. + * + * @return annotationId + */ + @JsonProperty(JSON_PROPERTY_ANNOTATION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAnnotationId() { + return annotationId; + } + + public void setAnnotationId(String annotationId) { + this.annotationId = annotationId; + } + + public LLMObsDeleteAnnotationError error(String error) { + this.error = error; + return this; + } + + /** + * Error message. + * + * @return error + */ + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getError() { + return error; + } + + public void setError(String error) { + this.error = error; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsDeleteAnnotationError + */ + @JsonAnySetter + public LLMObsDeleteAnnotationError putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsDeleteAnnotationError object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsDeleteAnnotationError llmObsDeleteAnnotationError = (LLMObsDeleteAnnotationError) o; + return Objects.equals(this.annotationId, llmObsDeleteAnnotationError.annotationId) + && Objects.equals(this.error, llmObsDeleteAnnotationError.error) + && Objects.equals( + this.additionalProperties, llmObsDeleteAnnotationError.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(annotationId, error, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsDeleteAnnotationError {\n"); + sb.append(" annotationId: ").append(toIndentedString(annotationId)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsDeleteAnnotationsDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsDeleteAnnotationsDataAttributesRequest.java new file mode 100644 index 00000000000..53d44530b84 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsDeleteAnnotationsDataAttributesRequest.java @@ -0,0 +1,157 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes for deleting annotations. */ +@JsonPropertyOrder({LLMObsDeleteAnnotationsDataAttributesRequest.JSON_PROPERTY_ANNOTATION_IDS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsDeleteAnnotationsDataAttributesRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ANNOTATION_IDS = "annotation_ids"; + private List annotationIds = new ArrayList<>(); + + public LLMObsDeleteAnnotationsDataAttributesRequest() {} + + @JsonCreator + public LLMObsDeleteAnnotationsDataAttributesRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ANNOTATION_IDS) + List annotationIds) { + this.annotationIds = annotationIds; + } + + public LLMObsDeleteAnnotationsDataAttributesRequest annotationIds(List annotationIds) { + this.annotationIds = annotationIds; + return this; + } + + public LLMObsDeleteAnnotationsDataAttributesRequest addAnnotationIdsItem( + String annotationIdsItem) { + this.annotationIds.add(annotationIdsItem); + return this; + } + + /** + * IDs of the annotations to delete. Must contain at least one item. + * + * @return annotationIds + */ + @JsonProperty(JSON_PROPERTY_ANNOTATION_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getAnnotationIds() { + return annotationIds; + } + + public void setAnnotationIds(List annotationIds) { + this.annotationIds = annotationIds; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsDeleteAnnotationsDataAttributesRequest + */ + @JsonAnySetter + public LLMObsDeleteAnnotationsDataAttributesRequest putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsDeleteAnnotationsDataAttributesRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsDeleteAnnotationsDataAttributesRequest llmObsDeleteAnnotationsDataAttributesRequest = + (LLMObsDeleteAnnotationsDataAttributesRequest) o; + return Objects.equals( + this.annotationIds, llmObsDeleteAnnotationsDataAttributesRequest.annotationIds) + && Objects.equals( + this.additionalProperties, + llmObsDeleteAnnotationsDataAttributesRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(annotationIds, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsDeleteAnnotationsDataAttributesRequest {\n"); + sb.append(" annotationIds: ").append(toIndentedString(annotationIds)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsDeleteAnnotationsDataAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsDeleteAnnotationsDataAttributesResponse.java new file mode 100644 index 00000000000..4a2007563ed --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsDeleteAnnotationsDataAttributesResponse.java @@ -0,0 +1,199 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of the annotation deletion response. */ +@JsonPropertyOrder({ + LLMObsDeleteAnnotationsDataAttributesResponse.JSON_PROPERTY_ANNOTATION_IDS, + LLMObsDeleteAnnotationsDataAttributesResponse.JSON_PROPERTY_ERRORS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsDeleteAnnotationsDataAttributesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ANNOTATION_IDS = "annotation_ids"; + private List annotationIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_ERRORS = "errors"; + private List errors = new ArrayList<>(); + + public LLMObsDeleteAnnotationsDataAttributesResponse() {} + + @JsonCreator + public LLMObsDeleteAnnotationsDataAttributesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ANNOTATION_IDS) + List annotationIds, + @JsonProperty(required = true, value = JSON_PROPERTY_ERRORS) + List errors) { + this.annotationIds = annotationIds; + this.errors = errors; + } + + public LLMObsDeleteAnnotationsDataAttributesResponse annotationIds(List annotationIds) { + this.annotationIds = annotationIds; + return this; + } + + public LLMObsDeleteAnnotationsDataAttributesResponse addAnnotationIdsItem( + String annotationIdsItem) { + this.annotationIds.add(annotationIdsItem); + return this; + } + + /** + * IDs of the successfully deleted annotations. + * + * @return annotationIds + */ + @JsonProperty(JSON_PROPERTY_ANNOTATION_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getAnnotationIds() { + return annotationIds; + } + + public void setAnnotationIds(List annotationIds) { + this.annotationIds = annotationIds; + } + + public LLMObsDeleteAnnotationsDataAttributesResponse errors( + List errors) { + this.errors = errors; + for (LLMObsDeleteAnnotationError item : errors) { + this.unparsed |= item.unparsed; + } + return this; + } + + public LLMObsDeleteAnnotationsDataAttributesResponse addErrorsItem( + LLMObsDeleteAnnotationError errorsItem) { + this.errors.add(errorsItem); + this.unparsed |= errorsItem.unparsed; + return this; + } + + /** + * Errors for annotations that could not be deleted. + * + * @return errors + */ + @JsonProperty(JSON_PROPERTY_ERRORS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getErrors() { + return errors; + } + + public void setErrors(List errors) { + this.errors = errors; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsDeleteAnnotationsDataAttributesResponse + */ + @JsonAnySetter + public LLMObsDeleteAnnotationsDataAttributesResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsDeleteAnnotationsDataAttributesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsDeleteAnnotationsDataAttributesResponse llmObsDeleteAnnotationsDataAttributesResponse = + (LLMObsDeleteAnnotationsDataAttributesResponse) o; + return Objects.equals( + this.annotationIds, llmObsDeleteAnnotationsDataAttributesResponse.annotationIds) + && Objects.equals(this.errors, llmObsDeleteAnnotationsDataAttributesResponse.errors) + && Objects.equals( + this.additionalProperties, + llmObsDeleteAnnotationsDataAttributesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(annotationIds, errors, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsDeleteAnnotationsDataAttributesResponse {\n"); + sb.append(" annotationIds: ").append(toIndentedString(annotationIds)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsDeleteAnnotationsDataRequest.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsDeleteAnnotationsDataRequest.java new file mode 100644 index 00000000000..c8b16250783 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsDeleteAnnotationsDataRequest.java @@ -0,0 +1,184 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object for deleting annotations. */ +@JsonPropertyOrder({ + LLMObsDeleteAnnotationsDataRequest.JSON_PROPERTY_ATTRIBUTES, + LLMObsDeleteAnnotationsDataRequest.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsDeleteAnnotationsDataRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsDeleteAnnotationsDataAttributesRequest attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsAnnotationsType type; + + public LLMObsDeleteAnnotationsDataRequest() {} + + @JsonCreator + public LLMObsDeleteAnnotationsDataRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsDeleteAnnotationsDataAttributesRequest attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LLMObsAnnotationsType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsDeleteAnnotationsDataRequest attributes( + LLMObsDeleteAnnotationsDataAttributesRequest attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for deleting annotations. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsDeleteAnnotationsDataAttributesRequest getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsDeleteAnnotationsDataAttributesRequest attributes) { + this.attributes = attributes; + } + + public LLMObsDeleteAnnotationsDataRequest type(LLMObsAnnotationsType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type for LLM Observability annotations. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsAnnotationsType getType() { + return type; + } + + public void setType(LLMObsAnnotationsType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsDeleteAnnotationsDataRequest + */ + @JsonAnySetter + public LLMObsDeleteAnnotationsDataRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsDeleteAnnotationsDataRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsDeleteAnnotationsDataRequest llmObsDeleteAnnotationsDataRequest = + (LLMObsDeleteAnnotationsDataRequest) o; + return Objects.equals(this.attributes, llmObsDeleteAnnotationsDataRequest.attributes) + && Objects.equals(this.type, llmObsDeleteAnnotationsDataRequest.type) + && Objects.equals( + this.additionalProperties, llmObsDeleteAnnotationsDataRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsDeleteAnnotationsDataRequest {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsDeleteAnnotationsDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsDeleteAnnotationsDataResponse.java new file mode 100644 index 00000000000..f32201bcf94 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsDeleteAnnotationsDataResponse.java @@ -0,0 +1,212 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object for the annotation deletion response. */ +@JsonPropertyOrder({ + LLMObsDeleteAnnotationsDataResponse.JSON_PROPERTY_ATTRIBUTES, + LLMObsDeleteAnnotationsDataResponse.JSON_PROPERTY_ID, + LLMObsDeleteAnnotationsDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsDeleteAnnotationsDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsDeleteAnnotationsDataAttributesResponse attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsAnnotationsType type; + + public LLMObsDeleteAnnotationsDataResponse() {} + + @JsonCreator + public LLMObsDeleteAnnotationsDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsDeleteAnnotationsDataAttributesResponse attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LLMObsAnnotationsType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsDeleteAnnotationsDataResponse attributes( + LLMObsDeleteAnnotationsDataAttributesResponse attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of the annotation deletion response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsDeleteAnnotationsDataAttributesResponse getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsDeleteAnnotationsDataAttributesResponse attributes) { + this.attributes = attributes; + } + + public LLMObsDeleteAnnotationsDataResponse id(String id) { + this.id = id; + return this; + } + + /** + * The annotation queue 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 LLMObsDeleteAnnotationsDataResponse type(LLMObsAnnotationsType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type for LLM Observability annotations. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsAnnotationsType getType() { + return type; + } + + public void setType(LLMObsAnnotationsType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsDeleteAnnotationsDataResponse + */ + @JsonAnySetter + public LLMObsDeleteAnnotationsDataResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsDeleteAnnotationsDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsDeleteAnnotationsDataResponse llmObsDeleteAnnotationsDataResponse = + (LLMObsDeleteAnnotationsDataResponse) o; + return Objects.equals(this.attributes, llmObsDeleteAnnotationsDataResponse.attributes) + && Objects.equals(this.id, llmObsDeleteAnnotationsDataResponse.id) + && Objects.equals(this.type, llmObsDeleteAnnotationsDataResponse.type) + && Objects.equals( + this.additionalProperties, llmObsDeleteAnnotationsDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsDeleteAnnotationsDataResponse {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsDeleteAnnotationsRequest.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsDeleteAnnotationsRequest.java new file mode 100644 index 00000000000..0efc17bbc1d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsDeleteAnnotationsRequest.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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to delete annotations from an annotation queue. */ +@JsonPropertyOrder({LLMObsDeleteAnnotationsRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsDeleteAnnotationsRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsDeleteAnnotationsDataRequest data; + + public LLMObsDeleteAnnotationsRequest() {} + + @JsonCreator + public LLMObsDeleteAnnotationsRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + LLMObsDeleteAnnotationsDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsDeleteAnnotationsRequest data(LLMObsDeleteAnnotationsDataRequest data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for deleting annotations. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsDeleteAnnotationsDataRequest getData() { + return data; + } + + public void setData(LLMObsDeleteAnnotationsDataRequest data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsDeleteAnnotationsRequest + */ + @JsonAnySetter + public LLMObsDeleteAnnotationsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsDeleteAnnotationsRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsDeleteAnnotationsRequest llmObsDeleteAnnotationsRequest = + (LLMObsDeleteAnnotationsRequest) o; + return Objects.equals(this.data, llmObsDeleteAnnotationsRequest.data) + && Objects.equals( + this.additionalProperties, llmObsDeleteAnnotationsRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsDeleteAnnotationsRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsDeleteAnnotationsResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsDeleteAnnotationsResponse.java new file mode 100644 index 00000000000..ac387638f6e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsDeleteAnnotationsResponse.java @@ -0,0 +1,151 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * Response for a batch annotation deletion. Partial errors are listed in the response if any + * annotations could not be deleted. + */ +@JsonPropertyOrder({LLMObsDeleteAnnotationsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsDeleteAnnotationsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsDeleteAnnotationsDataResponse data; + + public LLMObsDeleteAnnotationsResponse() {} + + @JsonCreator + public LLMObsDeleteAnnotationsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + LLMObsDeleteAnnotationsDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsDeleteAnnotationsResponse data(LLMObsDeleteAnnotationsDataResponse data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for the annotation deletion response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsDeleteAnnotationsDataResponse getData() { + return data; + } + + public void setData(LLMObsDeleteAnnotationsDataResponse data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsDeleteAnnotationsResponse + */ + @JsonAnySetter + public LLMObsDeleteAnnotationsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsDeleteAnnotationsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsDeleteAnnotationsResponse llmObsDeleteAnnotationsResponse = + (LLMObsDeleteAnnotationsResponse) o; + return Objects.equals(this.data, llmObsDeleteAnnotationsResponse.data) + && Objects.equals( + this.additionalProperties, llmObsDeleteAnnotationsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsDeleteAnnotationsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsExperimentDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsExperimentDataAttributesRequest.java index 67b70d3c9dc..575b7050475 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LLMObsExperimentDataAttributesRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsExperimentDataAttributesRequest.java @@ -26,7 +26,9 @@ LLMObsExperimentDataAttributesRequest.JSON_PROPERTY_ENSURE_UNIQUE, LLMObsExperimentDataAttributesRequest.JSON_PROPERTY_METADATA, LLMObsExperimentDataAttributesRequest.JSON_PROPERTY_NAME, - LLMObsExperimentDataAttributesRequest.JSON_PROPERTY_PROJECT_ID + LLMObsExperimentDataAttributesRequest.JSON_PROPERTY_PARENT_EXPERIMENT_ID, + LLMObsExperimentDataAttributesRequest.JSON_PROPERTY_PROJECT_ID, + LLMObsExperimentDataAttributesRequest.JSON_PROPERTY_RUN_COUNT }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @@ -53,17 +55,21 @@ public class LLMObsExperimentDataAttributesRequest { public static final String JSON_PROPERTY_NAME = "name"; private String name; + public static final String JSON_PROPERTY_PARENT_EXPERIMENT_ID = "parent_experiment_id"; + private String parentExperimentId; + public static final String JSON_PROPERTY_PROJECT_ID = "project_id"; private String projectId; + public static final String JSON_PROPERTY_RUN_COUNT = "run_count"; + private Integer runCount; + public LLMObsExperimentDataAttributesRequest() {} @JsonCreator public LLMObsExperimentDataAttributesRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATASET_ID) String datasetId, @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, @JsonProperty(required = true, value = JSON_PROPERTY_PROJECT_ID) String projectId) { - this.datasetId = datasetId; this.name = name; this.projectId = projectId; } @@ -107,8 +113,9 @@ public LLMObsExperimentDataAttributesRequest datasetId(String datasetId) { * * @return datasetId */ + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_DATASET_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getDatasetId() { return datasetId; } @@ -229,6 +236,27 @@ public void setName(String name) { this.name = name; } + public LLMObsExperimentDataAttributesRequest parentExperimentId(String parentExperimentId) { + this.parentExperimentId = parentExperimentId; + return this; + } + + /** + * Identifier of the parent (baseline) experiment this experiment is run against. + * + * @return parentExperimentId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PARENT_EXPERIMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getParentExperimentId() { + return parentExperimentId; + } + + public void setParentExperimentId(String parentExperimentId) { + this.parentExperimentId = parentExperimentId; + } + public LLMObsExperimentDataAttributesRequest projectId(String projectId) { this.projectId = projectId; return this; @@ -249,6 +277,27 @@ public void setProjectId(String projectId) { this.projectId = projectId; } + public LLMObsExperimentDataAttributesRequest runCount(Integer runCount) { + this.runCount = runCount; + return this; + } + + /** + * Number of runs configured for this experiment. maximum: 2147483647 + * + * @return runCount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUN_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getRunCount() { + return runCount; + } + + public void setRunCount(Integer runCount) { + this.runCount = runCount; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -313,7 +362,10 @@ public boolean equals(Object o) { && Objects.equals(this.ensureUnique, llmObsExperimentDataAttributesRequest.ensureUnique) && Objects.equals(this.metadata, llmObsExperimentDataAttributesRequest.metadata) && Objects.equals(this.name, llmObsExperimentDataAttributesRequest.name) + && Objects.equals( + this.parentExperimentId, llmObsExperimentDataAttributesRequest.parentExperimentId) && Objects.equals(this.projectId, llmObsExperimentDataAttributesRequest.projectId) + && Objects.equals(this.runCount, llmObsExperimentDataAttributesRequest.runCount) && Objects.equals( this.additionalProperties, llmObsExperimentDataAttributesRequest.additionalProperties); } @@ -328,7 +380,9 @@ public int hashCode() { ensureUnique, metadata, name, + parentExperimentId, projectId, + runCount, additionalProperties); } @@ -343,7 +397,9 @@ public String toString() { sb.append(" ensureUnique: ").append(toIndentedString(ensureUnique)).append("\n"); sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" parentExperimentId: ").append(toIndentedString(parentExperimentId)).append("\n"); sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" runCount: ").append(toIndentedString(runCount)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsExperimentDataAttributesResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsExperimentDataAttributesResponse.java index f9fc15a2e44..a028ac90e73 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LLMObsExperimentDataAttributesResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsExperimentDataAttributesResponse.java @@ -17,22 +17,40 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; /** Attributes of an LLM Observability experiment. */ @JsonPropertyOrder({ + LLMObsExperimentDataAttributesResponse.JSON_PROPERTY_AGGREGATE_DATA, + LLMObsExperimentDataAttributesResponse.JSON_PROPERTY_AUTHOR, LLMObsExperimentDataAttributesResponse.JSON_PROPERTY_CONFIG, LLMObsExperimentDataAttributesResponse.JSON_PROPERTY_CREATED_AT, LLMObsExperimentDataAttributesResponse.JSON_PROPERTY_DATASET_ID, + LLMObsExperimentDataAttributesResponse.JSON_PROPERTY_DATASET_NAME, + LLMObsExperimentDataAttributesResponse.JSON_PROPERTY_DATASET_VERSION, + LLMObsExperimentDataAttributesResponse.JSON_PROPERTY_DELETED_AT, LLMObsExperimentDataAttributesResponse.JSON_PROPERTY_DESCRIPTION, + LLMObsExperimentDataAttributesResponse.JSON_PROPERTY_ERROR, + LLMObsExperimentDataAttributesResponse.JSON_PROPERTY_EXPERIMENT, LLMObsExperimentDataAttributesResponse.JSON_PROPERTY_METADATA, LLMObsExperimentDataAttributesResponse.JSON_PROPERTY_NAME, + LLMObsExperimentDataAttributesResponse.JSON_PROPERTY_PARENT_EXPERIMENT_ID, LLMObsExperimentDataAttributesResponse.JSON_PROPERTY_PROJECT_ID, + LLMObsExperimentDataAttributesResponse.JSON_PROPERTY_RUN_COUNT, + LLMObsExperimentDataAttributesResponse.JSON_PROPERTY_STATUS, LLMObsExperimentDataAttributesResponse.JSON_PROPERTY_UPDATED_AT }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LLMObsExperimentDataAttributesResponse { @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AGGREGATE_DATA = "aggregate_data"; + private JsonNullable> aggregateData = + JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_AUTHOR = "author"; + private LLMObsExperimentUser author; + public static final String JSON_PROPERTY_CONFIG = "config"; private Map config = new HashMap(); @@ -42,18 +60,42 @@ public class LLMObsExperimentDataAttributesResponse { public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; private String datasetId; + public static final String JSON_PROPERTY_DATASET_NAME = "dataset_name"; + private JsonNullable datasetName = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DATASET_VERSION = "dataset_version"; + private Long datasetVersion; + + public static final String JSON_PROPERTY_DELETED_AT = "deleted_at"; + private JsonNullable deletedAt = JsonNullable.undefined(); + public static final String JSON_PROPERTY_DESCRIPTION = "description"; private String description; + public static final String JSON_PROPERTY_ERROR = "error"; + private JsonNullable error = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_EXPERIMENT = "experiment"; + private String experiment; + public static final String JSON_PROPERTY_METADATA = "metadata"; private Map metadata = new HashMap(); public static final String JSON_PROPERTY_NAME = "name"; private String name; + public static final String JSON_PROPERTY_PARENT_EXPERIMENT_ID = "parent_experiment_id"; + private JsonNullable parentExperimentId = JsonNullable.undefined(); + public static final String JSON_PROPERTY_PROJECT_ID = "project_id"; private String projectId; + public static final String JSON_PROPERTY_RUN_COUNT = "run_count"; + private Integer runCount; + + public static final String JSON_PROPERTY_STATUS = "status"; + private LLMObsExperimentStatus status; + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; private OffsetDateTime updatedAt; @@ -82,6 +124,74 @@ public LLMObsExperimentDataAttributesResponse( this.updatedAt = updatedAt; } + public LLMObsExperimentDataAttributesResponse aggregateData(Map aggregateData) { + this.aggregateData = JsonNullable.>of(aggregateData); + return this; + } + + public LLMObsExperimentDataAttributesResponse putAggregateDataItem( + String key, Object aggregateDataItem) { + if (this.aggregateData == null || !this.aggregateData.isPresent()) { + this.aggregateData = JsonNullable.>of(new HashMap<>()); + } + try { + this.aggregateData.get().put(key, aggregateDataItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Pre-computed aggregate metrics for this experiment run, including eval score distributions, + * token costs, and error rates. + * + * @return aggregateData + */ + @jakarta.annotation.Nullable + @JsonIgnore + public Map getAggregateData() { + return aggregateData.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_AGGREGATE_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getAggregateData_JsonNullable() { + return aggregateData; + } + + @JsonProperty(JSON_PROPERTY_AGGREGATE_DATA) + public void setAggregateData_JsonNullable(JsonNullable> aggregateData) { + this.aggregateData = aggregateData; + } + + public void setAggregateData(Map aggregateData) { + this.aggregateData = JsonNullable.>of(aggregateData); + } + + public LLMObsExperimentDataAttributesResponse author(LLMObsExperimentUser author) { + this.author = author; + this.unparsed |= author.unparsed; + return this; + } + + /** + * User data for the author of an experiment. Only present when include[user_data] is + * true. + * + * @return author + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTHOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public LLMObsExperimentUser getAuthor() { + return author; + } + + public void setAuthor(LLMObsExperimentUser author) { + this.author = author; + } + public LLMObsExperimentDataAttributesResponse config(Map config) { this.config = config; if (config != null) {} @@ -149,6 +259,90 @@ public void setDatasetId(String datasetId) { this.datasetId = datasetId; } + public LLMObsExperimentDataAttributesResponse datasetName(String datasetName) { + this.datasetName = JsonNullable.of(datasetName); + return this; + } + + /** + * Name of the dataset used in this experiment. Only present when include[dataset_names] + * is true. + * + * @return datasetName + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getDatasetName() { + return datasetName.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATASET_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getDatasetName_JsonNullable() { + return datasetName; + } + + @JsonProperty(JSON_PROPERTY_DATASET_NAME) + public void setDatasetName_JsonNullable(JsonNullable datasetName) { + this.datasetName = datasetName; + } + + public void setDatasetName(String datasetName) { + this.datasetName = JsonNullable.of(datasetName); + } + + public LLMObsExperimentDataAttributesResponse datasetVersion(Long datasetVersion) { + this.datasetVersion = datasetVersion; + return this; + } + + /** + * Version of the dataset used in this experiment. + * + * @return datasetVersion + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getDatasetVersion() { + return datasetVersion; + } + + public void setDatasetVersion(Long datasetVersion) { + this.datasetVersion = datasetVersion; + } + + public LLMObsExperimentDataAttributesResponse deletedAt(OffsetDateTime deletedAt) { + this.deletedAt = JsonNullable.of(deletedAt); + return this; + } + + /** + * Timestamp when the experiment was soft-deleted, if applicable. + * + * @return deletedAt + */ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getDeletedAt() { + return deletedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DELETED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getDeletedAt_JsonNullable() { + return deletedAt; + } + + @JsonProperty(JSON_PROPERTY_DELETED_AT) + public void setDeletedAt_JsonNullable(JsonNullable deletedAt) { + this.deletedAt = deletedAt; + } + + public void setDeletedAt(OffsetDateTime deletedAt) { + this.deletedAt = JsonNullable.of(deletedAt); + } + public LLMObsExperimentDataAttributesResponse description(String description) { this.description = description; if (description != null) {} @@ -171,6 +365,58 @@ public void setDescription(String description) { this.description = description; } + public LLMObsExperimentDataAttributesResponse error(String error) { + this.error = JsonNullable.of(error); + return this; + } + + /** + * Error message describing why the experiment failed, if applicable. + * + * @return error + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getError() { + return error.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ERROR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getError_JsonNullable() { + return 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 LLMObsExperimentDataAttributesResponse experiment(String experiment) { + this.experiment = experiment; + return this; + } + + /** + * Logical name of the experiment, shared across all runs of the same pipeline. + * + * @return experiment + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPERIMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getExperiment() { + return experiment; + } + + public void setExperiment(String experiment) { + this.experiment = experiment; + } + public LLMObsExperimentDataAttributesResponse metadata(Map metadata) { this.metadata = metadata; if (metadata != null) {} @@ -218,6 +464,37 @@ public void setName(String name) { this.name = name; } + public LLMObsExperimentDataAttributesResponse parentExperimentId(String parentExperimentId) { + this.parentExperimentId = JsonNullable.of(parentExperimentId); + return this; + } + + /** + * Identifier of the parent (baseline) experiment this experiment was run against, if any. + * + * @return parentExperimentId + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getParentExperimentId() { + return parentExperimentId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PARENT_EXPERIMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getParentExperimentId_JsonNullable() { + return parentExperimentId; + } + + @JsonProperty(JSON_PROPERTY_PARENT_EXPERIMENT_ID) + public void setParentExperimentId_JsonNullable(JsonNullable parentExperimentId) { + this.parentExperimentId = parentExperimentId; + } + + public void setParentExperimentId(String parentExperimentId) { + this.parentExperimentId = JsonNullable.of(parentExperimentId); + } + public LLMObsExperimentDataAttributesResponse projectId(String projectId) { this.projectId = projectId; return this; @@ -238,6 +515,52 @@ public void setProjectId(String projectId) { this.projectId = projectId; } + public LLMObsExperimentDataAttributesResponse runCount(Integer runCount) { + this.runCount = runCount; + return this; + } + + /** + * Expected number of runs for this experiment. maximum: 2147483647 + * + * @return runCount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUN_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getRunCount() { + return runCount; + } + + public void setRunCount(Integer runCount) { + this.runCount = runCount; + } + + public LLMObsExperimentDataAttributesResponse status(LLMObsExperimentStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * Execution status of an LLM Observability experiment. + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public LLMObsExperimentStatus getStatus() { + return status; + } + + public void setStatus(LLMObsExperimentStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + public LLMObsExperimentDataAttributesResponse updatedAt(OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; @@ -315,13 +638,25 @@ public boolean equals(Object o) { } LLMObsExperimentDataAttributesResponse llmObsExperimentDataAttributesResponse = (LLMObsExperimentDataAttributesResponse) o; - return Objects.equals(this.config, llmObsExperimentDataAttributesResponse.config) + return Objects.equals(this.aggregateData, llmObsExperimentDataAttributesResponse.aggregateData) + && Objects.equals(this.author, llmObsExperimentDataAttributesResponse.author) + && Objects.equals(this.config, llmObsExperimentDataAttributesResponse.config) && Objects.equals(this.createdAt, llmObsExperimentDataAttributesResponse.createdAt) && Objects.equals(this.datasetId, llmObsExperimentDataAttributesResponse.datasetId) + && Objects.equals(this.datasetName, llmObsExperimentDataAttributesResponse.datasetName) + && Objects.equals( + this.datasetVersion, llmObsExperimentDataAttributesResponse.datasetVersion) + && Objects.equals(this.deletedAt, llmObsExperimentDataAttributesResponse.deletedAt) && Objects.equals(this.description, llmObsExperimentDataAttributesResponse.description) + && Objects.equals(this.error, llmObsExperimentDataAttributesResponse.error) + && Objects.equals(this.experiment, llmObsExperimentDataAttributesResponse.experiment) && Objects.equals(this.metadata, llmObsExperimentDataAttributesResponse.metadata) && Objects.equals(this.name, llmObsExperimentDataAttributesResponse.name) + && Objects.equals( + this.parentExperimentId, llmObsExperimentDataAttributesResponse.parentExperimentId) && Objects.equals(this.projectId, llmObsExperimentDataAttributesResponse.projectId) + && Objects.equals(this.runCount, llmObsExperimentDataAttributesResponse.runCount) + && Objects.equals(this.status, llmObsExperimentDataAttributesResponse.status) && Objects.equals(this.updatedAt, llmObsExperimentDataAttributesResponse.updatedAt) && Objects.equals( this.additionalProperties, llmObsExperimentDataAttributesResponse.additionalProperties); @@ -330,13 +665,23 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + aggregateData, + author, config, createdAt, datasetId, + datasetName, + datasetVersion, + deletedAt, description, + error, + experiment, metadata, name, + parentExperimentId, projectId, + runCount, + status, updatedAt, additionalProperties); } @@ -345,13 +690,23 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class LLMObsExperimentDataAttributesResponse {\n"); + sb.append(" aggregateData: ").append(toIndentedString(aggregateData)).append("\n"); + sb.append(" author: ").append(toIndentedString(author)).append("\n"); sb.append(" config: ").append(toIndentedString(config)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); + sb.append(" datasetName: ").append(toIndentedString(datasetName)).append("\n"); + sb.append(" datasetVersion: ").append(toIndentedString(datasetVersion)).append("\n"); + sb.append(" deletedAt: ").append(toIndentedString(deletedAt)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" experiment: ").append(toIndentedString(experiment)).append("\n"); sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" parentExperimentId: ").append(toIndentedString(parentExperimentId)).append("\n"); sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" runCount: ").append(toIndentedString(runCount)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsExperimentSpanDataResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsExperimentSpanDataResponse.java new file mode 100644 index 00000000000..388da9bf354 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsExperimentSpanDataResponse.java @@ -0,0 +1,211 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** JSON:API data item wrapping a single experiment span with evaluations. */ +@JsonPropertyOrder({ + LLMObsExperimentSpanDataResponse.JSON_PROPERTY_ATTRIBUTES, + LLMObsExperimentSpanDataResponse.JSON_PROPERTY_ID, + LLMObsExperimentSpanDataResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsExperimentSpanDataResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsExperimentSpanWithEvals attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsExperimentSpanType type; + + public LLMObsExperimentSpanDataResponse() {} + + @JsonCreator + public LLMObsExperimentSpanDataResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsExperimentSpanWithEvals attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LLMObsExperimentSpanType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsExperimentSpanDataResponse attributes(LLMObsExperimentSpanWithEvals attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * An experiment span enriched with its associated evaluation metrics. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsExperimentSpanWithEvals getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsExperimentSpanWithEvals attributes) { + this.attributes = attributes; + } + + public LLMObsExperimentSpanDataResponse id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the span. + * + * @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 LLMObsExperimentSpanDataResponse type(LLMObsExperimentSpanType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type for a span item in an experiment spans response. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsExperimentSpanType getType() { + return type; + } + + public void setType(LLMObsExperimentSpanType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsExperimentSpanDataResponse + */ + @JsonAnySetter + public LLMObsExperimentSpanDataResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsExperimentSpanDataResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsExperimentSpanDataResponse llmObsExperimentSpanDataResponse = + (LLMObsExperimentSpanDataResponse) o; + return Objects.equals(this.attributes, llmObsExperimentSpanDataResponse.attributes) + && Objects.equals(this.id, llmObsExperimentSpanDataResponse.id) + && Objects.equals(this.type, llmObsExperimentSpanDataResponse.type) + && Objects.equals( + this.additionalProperties, llmObsExperimentSpanDataResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsExperimentSpanDataResponse {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsExperimentSpanType.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsExperimentSpanType.java new file mode 100644 index 00000000000..99627ab6e40 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsExperimentSpanType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Resource type for a span item in an experiment spans response. */ +@JsonSerialize(using = LLMObsExperimentSpanType.LLMObsExperimentSpanTypeSerializer.class) +public class LLMObsExperimentSpanType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("experiments")); + + public static final LLMObsExperimentSpanType EXPERIMENTS_SPAN = + new LLMObsExperimentSpanType("experiments"); + + LLMObsExperimentSpanType(String value) { + super(value, allowedValues); + } + + public static class LLMObsExperimentSpanTypeSerializer + extends StdSerializer { + public LLMObsExperimentSpanTypeSerializer(Class t) { + super(t); + } + + public LLMObsExperimentSpanTypeSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsExperimentSpanType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LLMObsExperimentSpanType fromValue(String value) { + return new LLMObsExperimentSpanType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsExperimentSpansResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsExperimentSpansResponse.java new file mode 100644 index 00000000000..0dfb62f8b53 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsExperimentSpansResponse.java @@ -0,0 +1,160 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * Response for listing experiment spans (v1). Returns only spans with their evaluation metrics. No + * summary metrics or pagination are included. Deprecated in favor of + * ListLLMObsExperimentEventsV3. + */ +@JsonPropertyOrder({LLMObsExperimentSpansResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsExperimentSpansResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public LLMObsExperimentSpansResponse() {} + + @JsonCreator + public LLMObsExperimentSpansResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public LLMObsExperimentSpansResponse data(List data) { + this.data = data; + for (LLMObsExperimentSpanDataResponse item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public LLMObsExperimentSpansResponse addDataItem(LLMObsExperimentSpanDataResponse dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of experiment spans with their evaluation metrics. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsExperimentSpansResponse + */ + @JsonAnySetter + public LLMObsExperimentSpansResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsExperimentSpansResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsExperimentSpansResponse llmObsExperimentSpansResponse = (LLMObsExperimentSpansResponse) o; + return Objects.equals(this.data, llmObsExperimentSpansResponse.data) + && Objects.equals( + this.additionalProperties, llmObsExperimentSpansResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsExperimentSpansResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsExperimentStatus.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsExperimentStatus.java new file mode 100644 index 00000000000..69ceaec9a73 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsExperimentStatus.java @@ -0,0 +1,60 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Execution status of an LLM Observability experiment. */ +@JsonSerialize(using = LLMObsExperimentStatus.LLMObsExperimentStatusSerializer.class) +public class LLMObsExperimentStatus extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("running", "completed", "failed", "interrupted")); + + public static final LLMObsExperimentStatus RUNNING = new LLMObsExperimentStatus("running"); + public static final LLMObsExperimentStatus COMPLETED = new LLMObsExperimentStatus("completed"); + public static final LLMObsExperimentStatus FAILED = new LLMObsExperimentStatus("failed"); + public static final LLMObsExperimentStatus INTERRUPTED = + new LLMObsExperimentStatus("interrupted"); + + LLMObsExperimentStatus(String value) { + super(value, allowedValues); + } + + public static class LLMObsExperimentStatusSerializer + extends StdSerializer { + public LLMObsExperimentStatusSerializer(Class t) { + super(t); + } + + public LLMObsExperimentStatusSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsExperimentStatus value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LLMObsExperimentStatus fromValue(String value) { + return new LLMObsExperimentStatus(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsExperimentUpdateDataAttributesRequest.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsExperimentUpdateDataAttributesRequest.java index 7d87f15d3cb..6263adab1c9 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LLMObsExperimentUpdateDataAttributesRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsExperimentUpdateDataAttributesRequest.java @@ -18,19 +18,56 @@ /** Attributes for updating an LLM Observability experiment. */ @JsonPropertyOrder({ + LLMObsExperimentUpdateDataAttributesRequest.JSON_PROPERTY_DATASET_ID, LLMObsExperimentUpdateDataAttributesRequest.JSON_PROPERTY_DESCRIPTION, - LLMObsExperimentUpdateDataAttributesRequest.JSON_PROPERTY_NAME + LLMObsExperimentUpdateDataAttributesRequest.JSON_PROPERTY_ERROR, + LLMObsExperimentUpdateDataAttributesRequest.JSON_PROPERTY_METADATA, + LLMObsExperimentUpdateDataAttributesRequest.JSON_PROPERTY_NAME, + LLMObsExperimentUpdateDataAttributesRequest.JSON_PROPERTY_STATUS }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class LLMObsExperimentUpdateDataAttributesRequest { @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATASET_ID = "dataset_id"; + private String datasetId; + public static final String JSON_PROPERTY_DESCRIPTION = "description"; private String description; + public static final String JSON_PROPERTY_ERROR = "error"; + private String error; + + public static final String JSON_PROPERTY_METADATA = "metadata"; + private Map metadata = null; + public static final String JSON_PROPERTY_NAME = "name"; private String name; + public static final String JSON_PROPERTY_STATUS = "status"; + private LLMObsExperimentStatus status; + + public LLMObsExperimentUpdateDataAttributesRequest datasetId(String datasetId) { + this.datasetId = datasetId; + return this; + } + + /** + * Updated identifier of the dataset used in this experiment. + * + * @return datasetId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASET_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDatasetId() { + return datasetId; + } + + public void setDatasetId(String datasetId) { + this.datasetId = datasetId; + } + public LLMObsExperimentUpdateDataAttributesRequest description(String description) { this.description = description; return this; @@ -52,6 +89,57 @@ public void setDescription(String description) { this.description = description; } + public LLMObsExperimentUpdateDataAttributesRequest error(String error) { + this.error = error; + return this; + } + + /** + * Error message describing why the experiment failed, if applicable. + * + * @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 LLMObsExperimentUpdateDataAttributesRequest metadata(Map metadata) { + this.metadata = metadata; + return this; + } + + public LLMObsExperimentUpdateDataAttributesRequest putMetadataItem( + String key, Object metadataItem) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, metadataItem); + return this; + } + + /** + * Updated arbitrary metadata associated with the experiment. + * + * @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 LLMObsExperimentUpdateDataAttributesRequest name(String name) { this.name = name; return this; @@ -73,6 +161,31 @@ public void setName(String name) { this.name = name; } + public LLMObsExperimentUpdateDataAttributesRequest status(LLMObsExperimentStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * Execution status of an LLM Observability experiment. + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public LLMObsExperimentStatus getStatus() { + return status; + } + + public void setStatus(LLMObsExperimentStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -131,8 +244,12 @@ public boolean equals(Object o) { } LLMObsExperimentUpdateDataAttributesRequest llmObsExperimentUpdateDataAttributesRequest = (LLMObsExperimentUpdateDataAttributesRequest) o; - return Objects.equals(this.description, llmObsExperimentUpdateDataAttributesRequest.description) + return Objects.equals(this.datasetId, llmObsExperimentUpdateDataAttributesRequest.datasetId) + && Objects.equals(this.description, llmObsExperimentUpdateDataAttributesRequest.description) + && Objects.equals(this.error, llmObsExperimentUpdateDataAttributesRequest.error) + && Objects.equals(this.metadata, llmObsExperimentUpdateDataAttributesRequest.metadata) && Objects.equals(this.name, llmObsExperimentUpdateDataAttributesRequest.name) + && Objects.equals(this.status, llmObsExperimentUpdateDataAttributesRequest.status) && Objects.equals( this.additionalProperties, llmObsExperimentUpdateDataAttributesRequest.additionalProperties); @@ -140,15 +257,20 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(description, name, additionalProperties); + return Objects.hash( + datasetId, description, error, metadata, name, status, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class LLMObsExperimentUpdateDataAttributesRequest {\n"); + sb.append(" datasetId: ").append(toIndentedString(datasetId)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsExperimentUser.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsExperimentUser.java new file mode 100644 index 00000000000..163d1ce1f9c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsExperimentUser.java @@ -0,0 +1,248 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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; + +/** + * User data for the author of an experiment. Only present when include[user_data] is + * true. + */ +@JsonPropertyOrder({ + LLMObsExperimentUser.JSON_PROPERTY_EMAIL, + LLMObsExperimentUser.JSON_PROPERTY_HANDLE, + LLMObsExperimentUser.JSON_PROPERTY_ICON, + LLMObsExperimentUser.JSON_PROPERTY_ID, + LLMObsExperimentUser.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsExperimentUser { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public static final String JSON_PROPERTY_HANDLE = "handle"; + private String handle; + + public static final String JSON_PROPERTY_ICON = "icon"; + private String icon; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public LLMObsExperimentUser email(String email) { + this.email = email; + return this; + } + + /** + * Email address of the user. + * + * @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 LLMObsExperimentUser handle(String handle) { + this.handle = handle; + return this; + } + + /** + * Username or handle associated with the user's Datadog account. + * + * @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 LLMObsExperimentUser icon(String icon) { + this.icon = icon; + return this; + } + + /** + * 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; + } + + public void setIcon(String icon) { + this.icon = icon; + } + + public LLMObsExperimentUser id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the user. + * + * @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 LLMObsExperimentUser name(String name) { + this.name = name; + return this; + } + + /** + * Display name of the user. + * + * @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; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsExperimentUser + */ + @JsonAnySetter + public LLMObsExperimentUser putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsExperimentUser object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsExperimentUser llmObsExperimentUser = (LLMObsExperimentUser) o; + return Objects.equals(this.email, llmObsExperimentUser.email) + && Objects.equals(this.handle, llmObsExperimentUser.handle) + && Objects.equals(this.icon, llmObsExperimentUser.icon) + && Objects.equals(this.id, llmObsExperimentUser.id) + && Objects.equals(this.name, llmObsExperimentUser.name) + && Objects.equals(this.additionalProperties, llmObsExperimentUser.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(email, handle, icon, id, name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsExperimentUser {\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" handle: ").append(toIndentedString(handle)).append("\n"); + sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsActivityProgress.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsActivityProgress.java new file mode 100644 index 00000000000..83c903ebbf2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsActivityProgress.java @@ -0,0 +1,214 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Progress information for a single step of a patterns run. */ +@JsonPropertyOrder({ + LLMObsPatternsActivityProgress.JSON_PROPERTY_NAME, + LLMObsPatternsActivityProgress.JSON_PROPERTY_STARTED_AT, + LLMObsPatternsActivityProgress.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsActivityProgress { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_STARTED_AT = "started_at"; + private JsonNullable startedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public LLMObsPatternsActivityProgress() {} + + @JsonCreator + public LLMObsPatternsActivityProgress( + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) String status) { + this.name = name; + this.status = status; + } + + public LLMObsPatternsActivityProgress name(String name) { + this.name = name; + return this; + } + + /** + * Name of the step. + * + * @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 LLMObsPatternsActivityProgress startedAt(OffsetDateTime startedAt) { + this.startedAt = JsonNullable.of(startedAt); + return this; + } + + /** + * Timestamp when the step started. Null if the step has not started. + * + * @return startedAt + */ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getStartedAt() { + return startedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STARTED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getStartedAt_JsonNullable() { + return startedAt; + } + + @JsonProperty(JSON_PROPERTY_STARTED_AT) + public void setStartedAt_JsonNullable(JsonNullable startedAt) { + this.startedAt = startedAt; + } + + public void setStartedAt(OffsetDateTime startedAt) { + this.startedAt = JsonNullable.of(startedAt); + } + + public LLMObsPatternsActivityProgress status(String status) { + this.status = status; + return this; + } + + /** + * Status of the step. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsActivityProgress + */ + @JsonAnySetter + public LLMObsPatternsActivityProgress putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsActivityProgress object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsActivityProgress llmObsPatternsActivityProgress = + (LLMObsPatternsActivityProgress) o; + return Objects.equals(this.name, llmObsPatternsActivityProgress.name) + && Objects.equals(this.startedAt, llmObsPatternsActivityProgress.startedAt) + && Objects.equals(this.status, llmObsPatternsActivityProgress.status) + && Objects.equals( + this.additionalProperties, llmObsPatternsActivityProgress.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, startedAt, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsActivityProgress {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" startedAt: ").append(toIndentedString(startedAt)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPoint.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPoint.java new file mode 100644 index 00000000000..8eea30c9d86 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPoint.java @@ -0,0 +1,351 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A single data point grouped into a topic. */ +@JsonPropertyOrder({ + LLMObsPatternsClusteredPoint.JSON_PROPERTY_EVENT_ID, + LLMObsPatternsClusteredPoint.JSON_PROPERTY_ID, + LLMObsPatternsClusteredPoint.JSON_PROPERTY_INPUT, + LLMObsPatternsClusteredPoint.JSON_PROPERTY_IS_INCLUDED, + LLMObsPatternsClusteredPoint.JSON_PROPERTY_IS_SUGGESTED, + LLMObsPatternsClusteredPoint.JSON_PROPERTY_SESSION_ID, + LLMObsPatternsClusteredPoint.JSON_PROPERTY_SPAN_ID, + LLMObsPatternsClusteredPoint.JSON_PROPERTY_TOPIC_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsClusteredPoint { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EVENT_ID = "event_id"; + private String eventId; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_INPUT = "input"; + private String input; + + public static final String JSON_PROPERTY_IS_INCLUDED = "is_included"; + private Boolean isIncluded; + + public static final String JSON_PROPERTY_IS_SUGGESTED = "is_suggested"; + private Boolean isSuggested; + + public static final String JSON_PROPERTY_SESSION_ID = "session_id"; + private String sessionId; + + public static final String JSON_PROPERTY_SPAN_ID = "span_id"; + private String spanId; + + public static final String JSON_PROPERTY_TOPIC_ID = "topic_id"; + private String topicId; + + public LLMObsPatternsClusteredPoint() {} + + @JsonCreator + public LLMObsPatternsClusteredPoint( + @JsonProperty(required = true, value = JSON_PROPERTY_EVENT_ID) String eventId, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_INPUT) String input, + @JsonProperty(required = true, value = JSON_PROPERTY_IS_INCLUDED) Boolean isIncluded, + @JsonProperty(required = true, value = JSON_PROPERTY_IS_SUGGESTED) Boolean isSuggested, + @JsonProperty(required = true, value = JSON_PROPERTY_SESSION_ID) String sessionId, + @JsonProperty(required = true, value = JSON_PROPERTY_SPAN_ID) String spanId, + @JsonProperty(required = true, value = JSON_PROPERTY_TOPIC_ID) String topicId) { + this.eventId = eventId; + this.id = id; + this.input = input; + this.isIncluded = isIncluded; + this.isSuggested = isSuggested; + this.sessionId = sessionId; + this.spanId = spanId; + this.topicId = topicId; + } + + public LLMObsPatternsClusteredPoint eventId(String eventId) { + this.eventId = eventId; + return this; + } + + /** + * Identifier of the source event. + * + * @return eventId + */ + @JsonProperty(JSON_PROPERTY_EVENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEventId() { + return eventId; + } + + public void setEventId(String eventId) { + this.eventId = eventId; + } + + public LLMObsPatternsClusteredPoint id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the clustered point. + * + * @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 LLMObsPatternsClusteredPoint input(String input) { + this.input = input; + return this; + } + + /** + * Input text of the source span. + * + * @return input + */ + @JsonProperty(JSON_PROPERTY_INPUT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getInput() { + return input; + } + + public void setInput(String input) { + this.input = input; + } + + public LLMObsPatternsClusteredPoint isIncluded(Boolean isIncluded) { + this.isIncluded = isIncluded; + return this; + } + + /** + * Whether the point is included in the patterns dataset. + * + * @return isIncluded + */ + @JsonProperty(JSON_PROPERTY_IS_INCLUDED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsIncluded() { + return isIncluded; + } + + public void setIsIncluded(Boolean isIncluded) { + this.isIncluded = isIncluded; + } + + public LLMObsPatternsClusteredPoint isSuggested(Boolean isSuggested) { + this.isSuggested = isSuggested; + return this; + } + + /** + * Whether the point is suggested for inclusion in the patterns dataset. + * + * @return isSuggested + */ + @JsonProperty(JSON_PROPERTY_IS_SUGGESTED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsSuggested() { + return isSuggested; + } + + public void setIsSuggested(Boolean isSuggested) { + this.isSuggested = isSuggested; + } + + public LLMObsPatternsClusteredPoint sessionId(String sessionId) { + this.sessionId = sessionId; + return this; + } + + /** + * Identifier of the source session. + * + * @return sessionId + */ + @JsonProperty(JSON_PROPERTY_SESSION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSessionId() { + return sessionId; + } + + public void setSessionId(String sessionId) { + this.sessionId = sessionId; + } + + public LLMObsPatternsClusteredPoint spanId(String spanId) { + this.spanId = spanId; + return this; + } + + /** + * Identifier of the source span. + * + * @return spanId + */ + @JsonProperty(JSON_PROPERTY_SPAN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSpanId() { + return spanId; + } + + public void setSpanId(String spanId) { + this.spanId = spanId; + } + + public LLMObsPatternsClusteredPoint topicId(String topicId) { + this.topicId = topicId; + return this; + } + + /** + * Identifier of the topic the point belongs to. + * + * @return topicId + */ + @JsonProperty(JSON_PROPERTY_TOPIC_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTopicId() { + return topicId; + } + + public void setTopicId(String topicId) { + this.topicId = topicId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsClusteredPoint + */ + @JsonAnySetter + public LLMObsPatternsClusteredPoint putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsClusteredPoint object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsClusteredPoint llmObsPatternsClusteredPoint = (LLMObsPatternsClusteredPoint) o; + return Objects.equals(this.eventId, llmObsPatternsClusteredPoint.eventId) + && Objects.equals(this.id, llmObsPatternsClusteredPoint.id) + && Objects.equals(this.input, llmObsPatternsClusteredPoint.input) + && Objects.equals(this.isIncluded, llmObsPatternsClusteredPoint.isIncluded) + && Objects.equals(this.isSuggested, llmObsPatternsClusteredPoint.isSuggested) + && Objects.equals(this.sessionId, llmObsPatternsClusteredPoint.sessionId) + && Objects.equals(this.spanId, llmObsPatternsClusteredPoint.spanId) + && Objects.equals(this.topicId, llmObsPatternsClusteredPoint.topicId) + && Objects.equals( + this.additionalProperties, llmObsPatternsClusteredPoint.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + eventId, + id, + input, + isIncluded, + isSuggested, + sessionId, + spanId, + topicId, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsClusteredPoint {\n"); + sb.append(" eventId: ").append(toIndentedString(eventId)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" input: ").append(toIndentedString(input)).append("\n"); + sb.append(" isIncluded: ").append(toIndentedString(isIncluded)).append("\n"); + sb.append(" isSuggested: ").append(toIndentedString(isSuggested)).append("\n"); + sb.append(" sessionId: ").append(toIndentedString(sessionId)).append("\n"); + sb.append(" spanId: ").append(toIndentedString(spanId)).append("\n"); + sb.append(" topicId: ").append(toIndentedString(topicId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointRef.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointRef.java new file mode 100644 index 00000000000..a1d9075bc5a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointRef.java @@ -0,0 +1,358 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * A clustered point attached inline to a topic. The metric fields are populated only when the + * request includes include_metrics=true. + */ +@JsonPropertyOrder({ + LLMObsPatternsClusteredPointRef.JSON_PROPERTY_DURATION, + LLMObsPatternsClusteredPointRef.JSON_PROPERTY_ESTIMATED_TOTAL_COST, + LLMObsPatternsClusteredPointRef.JSON_PROPERTY_EVALUATION, + LLMObsPatternsClusteredPointRef.JSON_PROPERTY_INPUT_TOKENS, + LLMObsPatternsClusteredPointRef.JSON_PROPERTY_OUTPUT_TOKENS, + LLMObsPatternsClusteredPointRef.JSON_PROPERTY_SPAN_ID, + LLMObsPatternsClusteredPointRef.JSON_PROPERTY_STATUS, + LLMObsPatternsClusteredPointRef.JSON_PROPERTY_TOTAL_TOKENS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsClusteredPointRef { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DURATION = "duration"; + private Double duration; + + public static final String JSON_PROPERTY_ESTIMATED_TOTAL_COST = "estimated_total_cost"; + private Double estimatedTotalCost; + + public static final String JSON_PROPERTY_EVALUATION = "evaluation"; + private Map evaluation = null; + + public static final String JSON_PROPERTY_INPUT_TOKENS = "input_tokens"; + private Double inputTokens; + + public static final String JSON_PROPERTY_OUTPUT_TOKENS = "output_tokens"; + private Double outputTokens; + + public static final String JSON_PROPERTY_SPAN_ID = "span_id"; + private String spanId; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public static final String JSON_PROPERTY_TOTAL_TOKENS = "total_tokens"; + private Double totalTokens; + + public LLMObsPatternsClusteredPointRef() {} + + @JsonCreator + public LLMObsPatternsClusteredPointRef( + @JsonProperty(required = true, value = JSON_PROPERTY_SPAN_ID) String spanId) { + this.spanId = spanId; + } + + public LLMObsPatternsClusteredPointRef duration(Double duration) { + this.duration = duration; + return this; + } + + /** + * Duration of the source span in nanoseconds. Included only when metrics are requested. + * + * @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 LLMObsPatternsClusteredPointRef estimatedTotalCost(Double estimatedTotalCost) { + this.estimatedTotalCost = estimatedTotalCost; + return this; + } + + /** + * Estimated total cost of the source span. Included only when metrics are requested. + * + * @return estimatedTotalCost + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESTIMATED_TOTAL_COST) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getEstimatedTotalCost() { + return estimatedTotalCost; + } + + public void setEstimatedTotalCost(Double estimatedTotalCost) { + this.estimatedTotalCost = estimatedTotalCost; + } + + public LLMObsPatternsClusteredPointRef evaluation(Map evaluation) { + this.evaluation = evaluation; + return this; + } + + public LLMObsPatternsClusteredPointRef putEvaluationItem(String key, Object evaluationItem) { + if (this.evaluation == null) { + this.evaluation = new HashMap<>(); + } + this.evaluation.put(key, evaluationItem); + return this; + } + + /** + * Evaluation results for the source span keyed by evaluation name. Included only when metrics are + * requested. + * + * @return evaluation + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVALUATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getEvaluation() { + return evaluation; + } + + public void setEvaluation(Map evaluation) { + this.evaluation = evaluation; + } + + public LLMObsPatternsClusteredPointRef inputTokens(Double inputTokens) { + this.inputTokens = inputTokens; + return this; + } + + /** + * Number of input tokens of the source span. Included only when metrics are requested. + * + * @return inputTokens + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INPUT_TOKENS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getInputTokens() { + return inputTokens; + } + + public void setInputTokens(Double inputTokens) { + this.inputTokens = inputTokens; + } + + public LLMObsPatternsClusteredPointRef outputTokens(Double outputTokens) { + this.outputTokens = outputTokens; + return this; + } + + /** + * Number of output tokens of the source span. Included only when metrics are requested. + * + * @return outputTokens + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTPUT_TOKENS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getOutputTokens() { + return outputTokens; + } + + public void setOutputTokens(Double outputTokens) { + this.outputTokens = outputTokens; + } + + public LLMObsPatternsClusteredPointRef spanId(String spanId) { + this.spanId = spanId; + return this; + } + + /** + * Identifier of the source span. + * + * @return spanId + */ + @JsonProperty(JSON_PROPERTY_SPAN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSpanId() { + return spanId; + } + + public void setSpanId(String spanId) { + this.spanId = spanId; + } + + public LLMObsPatternsClusteredPointRef status(String status) { + this.status = status; + return this; + } + + /** + * Status of the source span. Included only when metrics are requested. + * + * @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 LLMObsPatternsClusteredPointRef totalTokens(Double totalTokens) { + this.totalTokens = totalTokens; + return this; + } + + /** + * Total number of tokens of the source span. Included only when metrics are requested. + * + * @return totalTokens + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_TOKENS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getTotalTokens() { + return totalTokens; + } + + public void setTotalTokens(Double totalTokens) { + this.totalTokens = totalTokens; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsClusteredPointRef + */ + @JsonAnySetter + public LLMObsPatternsClusteredPointRef putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsClusteredPointRef object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsClusteredPointRef llmObsPatternsClusteredPointRef = + (LLMObsPatternsClusteredPointRef) o; + return Objects.equals(this.duration, llmObsPatternsClusteredPointRef.duration) + && Objects.equals( + this.estimatedTotalCost, llmObsPatternsClusteredPointRef.estimatedTotalCost) + && Objects.equals(this.evaluation, llmObsPatternsClusteredPointRef.evaluation) + && Objects.equals(this.inputTokens, llmObsPatternsClusteredPointRef.inputTokens) + && Objects.equals(this.outputTokens, llmObsPatternsClusteredPointRef.outputTokens) + && Objects.equals(this.spanId, llmObsPatternsClusteredPointRef.spanId) + && Objects.equals(this.status, llmObsPatternsClusteredPointRef.status) + && Objects.equals(this.totalTokens, llmObsPatternsClusteredPointRef.totalTokens) + && Objects.equals( + this.additionalProperties, llmObsPatternsClusteredPointRef.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + duration, + estimatedTotalCost, + evaluation, + inputTokens, + outputTokens, + spanId, + status, + totalTokens, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsClusteredPointRef {\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); + sb.append(" estimatedTotalCost: ").append(toIndentedString(estimatedTotalCost)).append("\n"); + sb.append(" evaluation: ").append(toIndentedString(evaluation)).append("\n"); + sb.append(" inputTokens: ").append(toIndentedString(inputTokens)).append("\n"); + sb.append(" outputTokens: ").append(toIndentedString(outputTokens)).append("\n"); + sb.append(" spanId: ").append(toIndentedString(spanId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" totalTokens: ").append(toIndentedString(totalTokens)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointsResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointsResponse.java new file mode 100644 index 00000000000..15f7beeecf5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointsResponse.java @@ -0,0 +1,149 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing the clustered points of an LLM Observability topic. */ +@JsonPropertyOrder({LLMObsPatternsClusteredPointsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsClusteredPointsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsPatternsClusteredPointsResponseData data; + + public LLMObsPatternsClusteredPointsResponse() {} + + @JsonCreator + public LLMObsPatternsClusteredPointsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + LLMObsPatternsClusteredPointsResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsPatternsClusteredPointsResponse data( + LLMObsPatternsClusteredPointsResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object of an LLM Observability patterns clustered points response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsClusteredPointsResponseData getData() { + return data; + } + + public void setData(LLMObsPatternsClusteredPointsResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsClusteredPointsResponse + */ + @JsonAnySetter + public LLMObsPatternsClusteredPointsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsClusteredPointsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsClusteredPointsResponse llmObsPatternsClusteredPointsResponse = + (LLMObsPatternsClusteredPointsResponse) o; + return Objects.equals(this.data, llmObsPatternsClusteredPointsResponse.data) + && Objects.equals( + this.additionalProperties, llmObsPatternsClusteredPointsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsClusteredPointsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointsResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointsResponseAttributes.java new file mode 100644 index 00000000000..520b4227fdb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointsResponseAttributes.java @@ -0,0 +1,224 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of an LLM Observability patterns clustered points response. */ +@JsonPropertyOrder({ + LLMObsPatternsClusteredPointsResponseAttributes.JSON_PROPERTY_NEXT_PAGE_TOKEN, + LLMObsPatternsClusteredPointsResponseAttributes.JSON_PROPERTY_POINTS, + LLMObsPatternsClusteredPointsResponseAttributes.JSON_PROPERTY_TOPIC_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsClusteredPointsResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_NEXT_PAGE_TOKEN = "next_page_token"; + private String nextPageToken; + + public static final String JSON_PROPERTY_POINTS = "points"; + private List points = new ArrayList<>(); + + public static final String JSON_PROPERTY_TOPIC_ID = "topic_id"; + private String topicId; + + public LLMObsPatternsClusteredPointsResponseAttributes() {} + + @JsonCreator + public LLMObsPatternsClusteredPointsResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_NEXT_PAGE_TOKEN) String nextPageToken, + @JsonProperty(required = true, value = JSON_PROPERTY_POINTS) + List points, + @JsonProperty(required = true, value = JSON_PROPERTY_TOPIC_ID) String topicId) { + this.nextPageToken = nextPageToken; + if (nextPageToken != null) {} + this.points = points; + this.topicId = topicId; + } + + public LLMObsPatternsClusteredPointsResponseAttributes nextPageToken(String nextPageToken) { + this.nextPageToken = nextPageToken; + if (nextPageToken != null) {} + return this; + } + + /** + * Pagination token for the next page of points. Null if there are no more pages. + * + * @return nextPageToken + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT_PAGE_TOKEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getNextPageToken() { + return nextPageToken; + } + + public void setNextPageToken(String nextPageToken) { + this.nextPageToken = nextPageToken; + } + + public LLMObsPatternsClusteredPointsResponseAttributes points( + List points) { + this.points = points; + for (LLMObsPatternsClusteredPoint item : points) { + this.unparsed |= item.unparsed; + } + return this; + } + + public LLMObsPatternsClusteredPointsResponseAttributes addPointsItem( + LLMObsPatternsClusteredPoint pointsItem) { + this.points.add(pointsItem); + this.unparsed |= pointsItem.unparsed; + return this; + } + + /** + * List of clustered points. + * + * @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 LLMObsPatternsClusteredPointsResponseAttributes topicId(String topicId) { + this.topicId = topicId; + return this; + } + + /** + * Identifier of the topic the points belong to. + * + * @return topicId + */ + @JsonProperty(JSON_PROPERTY_TOPIC_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTopicId() { + return topicId; + } + + public void setTopicId(String topicId) { + this.topicId = topicId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsClusteredPointsResponseAttributes + */ + @JsonAnySetter + public LLMObsPatternsClusteredPointsResponseAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsClusteredPointsResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsClusteredPointsResponseAttributes + llmObsPatternsClusteredPointsResponseAttributes = + (LLMObsPatternsClusteredPointsResponseAttributes) o; + return Objects.equals( + this.nextPageToken, llmObsPatternsClusteredPointsResponseAttributes.nextPageToken) + && Objects.equals(this.points, llmObsPatternsClusteredPointsResponseAttributes.points) + && Objects.equals(this.topicId, llmObsPatternsClusteredPointsResponseAttributes.topicId) + && Objects.equals( + this.additionalProperties, + llmObsPatternsClusteredPointsResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(nextPageToken, points, topicId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsClusteredPointsResponseAttributes {\n"); + sb.append(" nextPageToken: ").append(toIndentedString(nextPageToken)).append("\n"); + sb.append(" points: ").append(toIndentedString(points)).append("\n"); + sb.append(" topicId: ").append(toIndentedString(topicId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointsResponseData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointsResponseData.java new file mode 100644 index 00000000000..ae0c5f6af53 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointsResponseData.java @@ -0,0 +1,214 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object of an LLM Observability patterns clustered points response. */ +@JsonPropertyOrder({ + LLMObsPatternsClusteredPointsResponseData.JSON_PROPERTY_ATTRIBUTES, + LLMObsPatternsClusteredPointsResponseData.JSON_PROPERTY_ID, + LLMObsPatternsClusteredPointsResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsClusteredPointsResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsPatternsClusteredPointsResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPatternsClusteredPointsType type; + + public LLMObsPatternsClusteredPointsResponseData() {} + + @JsonCreator + public LLMObsPatternsClusteredPointsResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsPatternsClusteredPointsResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + LLMObsPatternsClusteredPointsType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsPatternsClusteredPointsResponseData attributes( + LLMObsPatternsClusteredPointsResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an LLM Observability patterns clustered points response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsClusteredPointsResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsPatternsClusteredPointsResponseAttributes attributes) { + this.attributes = attributes; + } + + public LLMObsPatternsClusteredPointsResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Identifier of the topic the points belong to. + * + * @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 LLMObsPatternsClusteredPointsResponseData type(LLMObsPatternsClusteredPointsType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type of an LLM Observability patterns clustered points response. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsClusteredPointsType getType() { + return type; + } + + public void setType(LLMObsPatternsClusteredPointsType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsClusteredPointsResponseData + */ + @JsonAnySetter + public LLMObsPatternsClusteredPointsResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsClusteredPointsResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsClusteredPointsResponseData llmObsPatternsClusteredPointsResponseData = + (LLMObsPatternsClusteredPointsResponseData) o; + return Objects.equals(this.attributes, llmObsPatternsClusteredPointsResponseData.attributes) + && Objects.equals(this.id, llmObsPatternsClusteredPointsResponseData.id) + && Objects.equals(this.type, llmObsPatternsClusteredPointsResponseData.type) + && Objects.equals( + this.additionalProperties, + llmObsPatternsClusteredPointsResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsClusteredPointsResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointsType.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointsType.java new file mode 100644 index 00000000000..fcaebbe4f73 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsClusteredPointsType.java @@ -0,0 +1,58 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Resource type of an LLM Observability patterns clustered points response. */ +@JsonSerialize( + using = LLMObsPatternsClusteredPointsType.LLMObsPatternsClusteredPointsTypeSerializer.class) +public class LLMObsPatternsClusteredPointsType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("clustered_points_response")); + + public static final LLMObsPatternsClusteredPointsType CLUSTERED_POINTS_RESPONSE = + new LLMObsPatternsClusteredPointsType("clustered_points_response"); + + LLMObsPatternsClusteredPointsType(String value) { + super(value, allowedValues); + } + + public static class LLMObsPatternsClusteredPointsTypeSerializer + extends StdSerializer { + public LLMObsPatternsClusteredPointsTypeSerializer(Class t) { + super(t); + } + + public LLMObsPatternsClusteredPointsTypeSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsPatternsClusteredPointsType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LLMObsPatternsClusteredPointsType fromValue(String value) { + return new LLMObsPatternsClusteredPointsType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigAttributes.java new file mode 100644 index 00000000000..e56b765008c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigAttributes.java @@ -0,0 +1,509 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes of an LLM Observability patterns configuration. */ +@JsonPropertyOrder({ + LLMObsPatternsConfigAttributes.JSON_PROPERTY_ACCOUNT_ID, + LLMObsPatternsConfigAttributes.JSON_PROPERTY_CREATED_AT, + LLMObsPatternsConfigAttributes.JSON_PROPERTY_EVP_QUERY, + LLMObsPatternsConfigAttributes.JSON_PROPERTY_HIERARCHY_DEPTH, + LLMObsPatternsConfigAttributes.JSON_PROPERTY_INTEGRATION_PROVIDER, + LLMObsPatternsConfigAttributes.JSON_PROPERTY_MODEL_NAME, + LLMObsPatternsConfigAttributes.JSON_PROPERTY_NAME, + LLMObsPatternsConfigAttributes.JSON_PROPERTY_NUM_RECORDS, + LLMObsPatternsConfigAttributes.JSON_PROPERTY_SAMPLING_RATIO, + LLMObsPatternsConfigAttributes.JSON_PROPERTY_SCOPE, + LLMObsPatternsConfigAttributes.JSON_PROPERTY_TEMPLATE, + LLMObsPatternsConfigAttributes.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsConfigAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private JsonNullable accountId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_EVP_QUERY = "evp_query"; + private String evpQuery; + + public static final String JSON_PROPERTY_HIERARCHY_DEPTH = "hierarchy_depth"; + private Integer hierarchyDepth; + + public static final String JSON_PROPERTY_INTEGRATION_PROVIDER = "integration_provider"; + private JsonNullable integrationProvider = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODEL_NAME = "model_name"; + private JsonNullable modelName = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_NUM_RECORDS = "num_records"; + private Integer numRecords; + + public static final String JSON_PROPERTY_SAMPLING_RATIO = "sampling_ratio"; + private Double samplingRatio; + + public static final String JSON_PROPERTY_SCOPE = "scope"; + private String scope; + + public static final String JSON_PROPERTY_TEMPLATE = "template"; + private JsonNullable template = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private OffsetDateTime updatedAt; + + public LLMObsPatternsConfigAttributes() {} + + @JsonCreator + public LLMObsPatternsConfigAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_EVP_QUERY) String evpQuery, + @JsonProperty(required = true, value = JSON_PROPERTY_HIERARCHY_DEPTH) Integer hierarchyDepth, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_NUM_RECORDS) Integer numRecords, + @JsonProperty(required = true, value = JSON_PROPERTY_SAMPLING_RATIO) Double samplingRatio, + @JsonProperty(required = true, value = JSON_PROPERTY_SCOPE) String scope, + @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt) { + this.createdAt = createdAt; + this.evpQuery = evpQuery; + this.hierarchyDepth = hierarchyDepth; + this.name = name; + this.numRecords = numRecords; + this.samplingRatio = samplingRatio; + this.scope = scope; + this.updatedAt = updatedAt; + } + + public LLMObsPatternsConfigAttributes accountId(String accountId) { + this.accountId = JsonNullable.of(accountId); + return this; + } + + /** + * Integration account ID for a bring-your-own-model configuration. + * + * @return accountId + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getAccountId() { + return accountId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getAccountId_JsonNullable() { + return accountId; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + public void setAccountId_JsonNullable(JsonNullable accountId) { + this.accountId = accountId; + } + + public void setAccountId(String accountId) { + this.accountId = JsonNullable.of(accountId); + } + + public LLMObsPatternsConfigAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp when the configuration was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public LLMObsPatternsConfigAttributes evpQuery(String evpQuery) { + this.evpQuery = evpQuery; + return this; + } + + /** + * Query that selects the spans the patterns run analyzes. + * + * @return evpQuery + */ + @JsonProperty(JSON_PROPERTY_EVP_QUERY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEvpQuery() { + return evpQuery; + } + + public void setEvpQuery(String evpQuery) { + this.evpQuery = evpQuery; + } + + public LLMObsPatternsConfigAttributes hierarchyDepth(Integer hierarchyDepth) { + this.hierarchyDepth = hierarchyDepth; + return this; + } + + /** + * Depth of the topic hierarchy to generate. maximum: 2147483647 + * + * @return hierarchyDepth + */ + @JsonProperty(JSON_PROPERTY_HIERARCHY_DEPTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getHierarchyDepth() { + return hierarchyDepth; + } + + public void setHierarchyDepth(Integer hierarchyDepth) { + this.hierarchyDepth = hierarchyDepth; + } + + public LLMObsPatternsConfigAttributes integrationProvider(String integrationProvider) { + this.integrationProvider = JsonNullable.of(integrationProvider); + return this; + } + + /** + * Integration provider for a bring-your-own-model configuration. + * + * @return integrationProvider + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getIntegrationProvider() { + return integrationProvider.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INTEGRATION_PROVIDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getIntegrationProvider_JsonNullable() { + return integrationProvider; + } + + @JsonProperty(JSON_PROPERTY_INTEGRATION_PROVIDER) + public void setIntegrationProvider_JsonNullable(JsonNullable integrationProvider) { + this.integrationProvider = integrationProvider; + } + + public void setIntegrationProvider(String integrationProvider) { + this.integrationProvider = JsonNullable.of(integrationProvider); + } + + public LLMObsPatternsConfigAttributes modelName(String modelName) { + this.modelName = JsonNullable.of(modelName); + return this; + } + + /** + * Model name for a bring-your-own-model configuration. + * + * @return modelName + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getModelName() { + return modelName.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODEL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getModelName_JsonNullable() { + return modelName; + } + + @JsonProperty(JSON_PROPERTY_MODEL_NAME) + public void setModelName_JsonNullable(JsonNullable modelName) { + this.modelName = modelName; + } + + public void setModelName(String modelName) { + this.modelName = JsonNullable.of(modelName); + } + + public LLMObsPatternsConfigAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Name of the configuration. + * + * @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 LLMObsPatternsConfigAttributes numRecords(Integer numRecords) { + this.numRecords = numRecords; + return this; + } + + /** + * Maximum number of records to process for the run. maximum: 2147483647 + * + * @return numRecords + */ + @JsonProperty(JSON_PROPERTY_NUM_RECORDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getNumRecords() { + return numRecords; + } + + public void setNumRecords(Integer numRecords) { + this.numRecords = numRecords; + } + + public LLMObsPatternsConfigAttributes samplingRatio(Double samplingRatio) { + this.samplingRatio = samplingRatio; + return this; + } + + /** + * Fraction of matching spans to sample for the run. + * + * @return samplingRatio + */ + @JsonProperty(JSON_PROPERTY_SAMPLING_RATIO) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Double getSamplingRatio() { + return samplingRatio; + } + + public void setSamplingRatio(Double samplingRatio) { + this.samplingRatio = samplingRatio; + } + + public LLMObsPatternsConfigAttributes scope(String scope) { + this.scope = scope; + return this; + } + + /** + * Scope of the configuration. + * + * @return scope + */ + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getScope() { + return scope; + } + + public void setScope(String scope) { + this.scope = scope; + } + + public LLMObsPatternsConfigAttributes template(String template) { + this.template = JsonNullable.of(template); + return this; + } + + /** + * Template used to guide topic generation. + * + * @return template + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getTemplate() { + return template.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TEMPLATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getTemplate_JsonNullable() { + return template; + } + + @JsonProperty(JSON_PROPERTY_TEMPLATE) + public void setTemplate_JsonNullable(JsonNullable template) { + this.template = template; + } + + public void setTemplate(String template) { + this.template = JsonNullable.of(template); + } + + public LLMObsPatternsConfigAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Timestamp when the configuration was last updated. + * + * @return updatedAt + */ + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsConfigAttributes + */ + @JsonAnySetter + public LLMObsPatternsConfigAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsConfigAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsConfigAttributes llmObsPatternsConfigAttributes = + (LLMObsPatternsConfigAttributes) o; + return Objects.equals(this.accountId, llmObsPatternsConfigAttributes.accountId) + && Objects.equals(this.createdAt, llmObsPatternsConfigAttributes.createdAt) + && Objects.equals(this.evpQuery, llmObsPatternsConfigAttributes.evpQuery) + && Objects.equals(this.hierarchyDepth, llmObsPatternsConfigAttributes.hierarchyDepth) + && Objects.equals( + this.integrationProvider, llmObsPatternsConfigAttributes.integrationProvider) + && Objects.equals(this.modelName, llmObsPatternsConfigAttributes.modelName) + && Objects.equals(this.name, llmObsPatternsConfigAttributes.name) + && Objects.equals(this.numRecords, llmObsPatternsConfigAttributes.numRecords) + && Objects.equals(this.samplingRatio, llmObsPatternsConfigAttributes.samplingRatio) + && Objects.equals(this.scope, llmObsPatternsConfigAttributes.scope) + && Objects.equals(this.template, llmObsPatternsConfigAttributes.template) + && Objects.equals(this.updatedAt, llmObsPatternsConfigAttributes.updatedAt) + && Objects.equals( + this.additionalProperties, llmObsPatternsConfigAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + accountId, + createdAt, + evpQuery, + hierarchyDepth, + integrationProvider, + modelName, + name, + numRecords, + samplingRatio, + scope, + template, + updatedAt, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsConfigAttributes {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" evpQuery: ").append(toIndentedString(evpQuery)).append("\n"); + sb.append(" hierarchyDepth: ").append(toIndentedString(hierarchyDepth)).append("\n"); + sb.append(" integrationProvider: ") + .append(toIndentedString(integrationProvider)) + .append("\n"); + sb.append(" modelName: ").append(toIndentedString(modelName)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" numRecords: ").append(toIndentedString(numRecords)).append("\n"); + sb.append(" samplingRatio: ").append(toIndentedString(samplingRatio)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" template: ").append(toIndentedString(template)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigItem.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigItem.java new file mode 100644 index 00000000000..fa353971976 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigItem.java @@ -0,0 +1,535 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** A single LLM Observability patterns configuration in a list response. */ +@JsonPropertyOrder({ + LLMObsPatternsConfigItem.JSON_PROPERTY_ACCOUNT_ID, + LLMObsPatternsConfigItem.JSON_PROPERTY_CREATED_AT, + LLMObsPatternsConfigItem.JSON_PROPERTY_EVP_QUERY, + LLMObsPatternsConfigItem.JSON_PROPERTY_HIERARCHY_DEPTH, + LLMObsPatternsConfigItem.JSON_PROPERTY_ID, + LLMObsPatternsConfigItem.JSON_PROPERTY_INTEGRATION_PROVIDER, + LLMObsPatternsConfigItem.JSON_PROPERTY_MODEL_NAME, + LLMObsPatternsConfigItem.JSON_PROPERTY_NAME, + LLMObsPatternsConfigItem.JSON_PROPERTY_NUM_RECORDS, + LLMObsPatternsConfigItem.JSON_PROPERTY_SAMPLING_RATIO, + LLMObsPatternsConfigItem.JSON_PROPERTY_SCOPE, + LLMObsPatternsConfigItem.JSON_PROPERTY_TEMPLATE, + LLMObsPatternsConfigItem.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsConfigItem { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private JsonNullable accountId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_EVP_QUERY = "evp_query"; + private String evpQuery; + + public static final String JSON_PROPERTY_HIERARCHY_DEPTH = "hierarchy_depth"; + private Integer hierarchyDepth; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_INTEGRATION_PROVIDER = "integration_provider"; + private JsonNullable integrationProvider = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_MODEL_NAME = "model_name"; + private JsonNullable modelName = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_NUM_RECORDS = "num_records"; + private Integer numRecords; + + public static final String JSON_PROPERTY_SAMPLING_RATIO = "sampling_ratio"; + private Double samplingRatio; + + public static final String JSON_PROPERTY_SCOPE = "scope"; + private String scope; + + public static final String JSON_PROPERTY_TEMPLATE = "template"; + private JsonNullable template = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private OffsetDateTime updatedAt; + + public LLMObsPatternsConfigItem() {} + + @JsonCreator + public LLMObsPatternsConfigItem( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_EVP_QUERY) String evpQuery, + @JsonProperty(required = true, value = JSON_PROPERTY_HIERARCHY_DEPTH) Integer hierarchyDepth, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_NUM_RECORDS) Integer numRecords, + @JsonProperty(required = true, value = JSON_PROPERTY_SAMPLING_RATIO) Double samplingRatio, + @JsonProperty(required = true, value = JSON_PROPERTY_SCOPE) String scope, + @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt) { + this.createdAt = createdAt; + this.evpQuery = evpQuery; + this.hierarchyDepth = hierarchyDepth; + this.id = id; + this.name = name; + this.numRecords = numRecords; + this.samplingRatio = samplingRatio; + this.scope = scope; + this.updatedAt = updatedAt; + } + + public LLMObsPatternsConfigItem accountId(String accountId) { + this.accountId = JsonNullable.of(accountId); + return this; + } + + /** + * Integration account ID for a bring-your-own-model configuration. + * + * @return accountId + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getAccountId() { + return accountId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getAccountId_JsonNullable() { + return accountId; + } + + @JsonProperty(JSON_PROPERTY_ACCOUNT_ID) + public void setAccountId_JsonNullable(JsonNullable accountId) { + this.accountId = accountId; + } + + public void setAccountId(String accountId) { + this.accountId = JsonNullable.of(accountId); + } + + public LLMObsPatternsConfigItem createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp when the configuration was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public LLMObsPatternsConfigItem evpQuery(String evpQuery) { + this.evpQuery = evpQuery; + return this; + } + + /** + * Query that selects the spans the patterns run analyzes. + * + * @return evpQuery + */ + @JsonProperty(JSON_PROPERTY_EVP_QUERY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEvpQuery() { + return evpQuery; + } + + public void setEvpQuery(String evpQuery) { + this.evpQuery = evpQuery; + } + + public LLMObsPatternsConfigItem hierarchyDepth(Integer hierarchyDepth) { + this.hierarchyDepth = hierarchyDepth; + return this; + } + + /** + * Depth of the topic hierarchy to generate. maximum: 2147483647 + * + * @return hierarchyDepth + */ + @JsonProperty(JSON_PROPERTY_HIERARCHY_DEPTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getHierarchyDepth() { + return hierarchyDepth; + } + + public void setHierarchyDepth(Integer hierarchyDepth) { + this.hierarchyDepth = hierarchyDepth; + } + + public LLMObsPatternsConfigItem id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the configuration. + * + * @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 LLMObsPatternsConfigItem integrationProvider(String integrationProvider) { + this.integrationProvider = JsonNullable.of(integrationProvider); + return this; + } + + /** + * Integration provider for a bring-your-own-model configuration. + * + * @return integrationProvider + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getIntegrationProvider() { + return integrationProvider.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INTEGRATION_PROVIDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getIntegrationProvider_JsonNullable() { + return integrationProvider; + } + + @JsonProperty(JSON_PROPERTY_INTEGRATION_PROVIDER) + public void setIntegrationProvider_JsonNullable(JsonNullable integrationProvider) { + this.integrationProvider = integrationProvider; + } + + public void setIntegrationProvider(String integrationProvider) { + this.integrationProvider = JsonNullable.of(integrationProvider); + } + + public LLMObsPatternsConfigItem modelName(String modelName) { + this.modelName = JsonNullable.of(modelName); + return this; + } + + /** + * Model name for a bring-your-own-model configuration. + * + * @return modelName + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getModelName() { + return modelName.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MODEL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getModelName_JsonNullable() { + return modelName; + } + + @JsonProperty(JSON_PROPERTY_MODEL_NAME) + public void setModelName_JsonNullable(JsonNullable modelName) { + this.modelName = modelName; + } + + public void setModelName(String modelName) { + this.modelName = JsonNullable.of(modelName); + } + + public LLMObsPatternsConfigItem name(String name) { + this.name = name; + return this; + } + + /** + * Name of the configuration. + * + * @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 LLMObsPatternsConfigItem numRecords(Integer numRecords) { + this.numRecords = numRecords; + return this; + } + + /** + * Maximum number of records to process for the run. maximum: 2147483647 + * + * @return numRecords + */ + @JsonProperty(JSON_PROPERTY_NUM_RECORDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getNumRecords() { + return numRecords; + } + + public void setNumRecords(Integer numRecords) { + this.numRecords = numRecords; + } + + public LLMObsPatternsConfigItem samplingRatio(Double samplingRatio) { + this.samplingRatio = samplingRatio; + return this; + } + + /** + * Fraction of matching spans to sample for the run. + * + * @return samplingRatio + */ + @JsonProperty(JSON_PROPERTY_SAMPLING_RATIO) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Double getSamplingRatio() { + return samplingRatio; + } + + public void setSamplingRatio(Double samplingRatio) { + this.samplingRatio = samplingRatio; + } + + public LLMObsPatternsConfigItem scope(String scope) { + this.scope = scope; + return this; + } + + /** + * Scope of the configuration. + * + * @return scope + */ + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getScope() { + return scope; + } + + public void setScope(String scope) { + this.scope = scope; + } + + public LLMObsPatternsConfigItem template(String template) { + this.template = JsonNullable.of(template); + return this; + } + + /** + * Template used to guide topic generation. + * + * @return template + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getTemplate() { + return template.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TEMPLATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getTemplate_JsonNullable() { + return template; + } + + @JsonProperty(JSON_PROPERTY_TEMPLATE) + public void setTemplate_JsonNullable(JsonNullable template) { + this.template = template; + } + + public void setTemplate(String template) { + this.template = JsonNullable.of(template); + } + + public LLMObsPatternsConfigItem updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Timestamp when the configuration was last updated. + * + * @return updatedAt + */ + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsConfigItem + */ + @JsonAnySetter + public LLMObsPatternsConfigItem putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsConfigItem object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsConfigItem llmObsPatternsConfigItem = (LLMObsPatternsConfigItem) o; + return Objects.equals(this.accountId, llmObsPatternsConfigItem.accountId) + && Objects.equals(this.createdAt, llmObsPatternsConfigItem.createdAt) + && Objects.equals(this.evpQuery, llmObsPatternsConfigItem.evpQuery) + && Objects.equals(this.hierarchyDepth, llmObsPatternsConfigItem.hierarchyDepth) + && Objects.equals(this.id, llmObsPatternsConfigItem.id) + && Objects.equals(this.integrationProvider, llmObsPatternsConfigItem.integrationProvider) + && Objects.equals(this.modelName, llmObsPatternsConfigItem.modelName) + && Objects.equals(this.name, llmObsPatternsConfigItem.name) + && Objects.equals(this.numRecords, llmObsPatternsConfigItem.numRecords) + && Objects.equals(this.samplingRatio, llmObsPatternsConfigItem.samplingRatio) + && Objects.equals(this.scope, llmObsPatternsConfigItem.scope) + && Objects.equals(this.template, llmObsPatternsConfigItem.template) + && Objects.equals(this.updatedAt, llmObsPatternsConfigItem.updatedAt) + && Objects.equals(this.additionalProperties, llmObsPatternsConfigItem.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + accountId, + createdAt, + evpQuery, + hierarchyDepth, + id, + integrationProvider, + modelName, + name, + numRecords, + samplingRatio, + scope, + template, + updatedAt, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsConfigItem {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" evpQuery: ").append(toIndentedString(evpQuery)).append("\n"); + sb.append(" hierarchyDepth: ").append(toIndentedString(hierarchyDepth)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" integrationProvider: ") + .append(toIndentedString(integrationProvider)) + .append("\n"); + sb.append(" modelName: ").append(toIndentedString(modelName)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" numRecords: ").append(toIndentedString(numRecords)).append("\n"); + sb.append(" samplingRatio: ").append(toIndentedString(samplingRatio)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" template: ").append(toIndentedString(template)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigResponse.java new file mode 100644 index 00000000000..b91d75ff007 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigResponse.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing a single LLM Observability patterns configuration. */ +@JsonPropertyOrder({LLMObsPatternsConfigResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsConfigResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsPatternsConfigResponseData data; + + public LLMObsPatternsConfigResponse() {} + + @JsonCreator + public LLMObsPatternsConfigResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + LLMObsPatternsConfigResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsPatternsConfigResponse data(LLMObsPatternsConfigResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object of an LLM Observability patterns configuration. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsConfigResponseData getData() { + return data; + } + + public void setData(LLMObsPatternsConfigResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsConfigResponse + */ + @JsonAnySetter + public LLMObsPatternsConfigResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsConfigResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsConfigResponse llmObsPatternsConfigResponse = (LLMObsPatternsConfigResponse) o; + return Objects.equals(this.data, llmObsPatternsConfigResponse.data) + && Objects.equals( + this.additionalProperties, llmObsPatternsConfigResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsConfigResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigResponseData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigResponseData.java new file mode 100644 index 00000000000..52c77222f3b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigResponseData.java @@ -0,0 +1,211 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object of an LLM Observability patterns configuration. */ +@JsonPropertyOrder({ + LLMObsPatternsConfigResponseData.JSON_PROPERTY_ATTRIBUTES, + LLMObsPatternsConfigResponseData.JSON_PROPERTY_ID, + LLMObsPatternsConfigResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsConfigResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsPatternsConfigAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPatternsConfigType type; + + public LLMObsPatternsConfigResponseData() {} + + @JsonCreator + public LLMObsPatternsConfigResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsPatternsConfigAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LLMObsPatternsConfigType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsPatternsConfigResponseData attributes(LLMObsPatternsConfigAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an LLM Observability patterns configuration. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsConfigAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsPatternsConfigAttributes attributes) { + this.attributes = attributes; + } + + public LLMObsPatternsConfigResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the configuration. + * + * @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 LLMObsPatternsConfigResponseData type(LLMObsPatternsConfigType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type of an LLM Observability patterns configuration. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsConfigType getType() { + return type; + } + + public void setType(LLMObsPatternsConfigType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsConfigResponseData + */ + @JsonAnySetter + public LLMObsPatternsConfigResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsConfigResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsConfigResponseData llmObsPatternsConfigResponseData = + (LLMObsPatternsConfigResponseData) o; + return Objects.equals(this.attributes, llmObsPatternsConfigResponseData.attributes) + && Objects.equals(this.id, llmObsPatternsConfigResponseData.id) + && Objects.equals(this.type, llmObsPatternsConfigResponseData.type) + && Objects.equals( + this.additionalProperties, llmObsPatternsConfigResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsConfigResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigSnapshot.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigSnapshot.java new file mode 100644 index 00000000000..66289ff5e9f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigSnapshot.java @@ -0,0 +1,311 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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; + +/** Snapshot of the configuration used for a patterns run. */ +@JsonPropertyOrder({ + LLMObsPatternsConfigSnapshot.JSON_PROPERTY_ACCOUNT_ID, + LLMObsPatternsConfigSnapshot.JSON_PROPERTY_EVP_QUERY, + LLMObsPatternsConfigSnapshot.JSON_PROPERTY_HIERARCHY_DEPTH, + LLMObsPatternsConfigSnapshot.JSON_PROPERTY_INTEGRATION_PROVIDER, + LLMObsPatternsConfigSnapshot.JSON_PROPERTY_MODEL_NAME, + LLMObsPatternsConfigSnapshot.JSON_PROPERTY_NUM_RECORDS, + LLMObsPatternsConfigSnapshot.JSON_PROPERTY_SAMPLING_RATIO +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsConfigSnapshot { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private String accountId; + + public static final String JSON_PROPERTY_EVP_QUERY = "evp_query"; + private String evpQuery; + + public static final String JSON_PROPERTY_HIERARCHY_DEPTH = "hierarchy_depth"; + private Integer hierarchyDepth; + + public static final String JSON_PROPERTY_INTEGRATION_PROVIDER = "integration_provider"; + private String integrationProvider; + + public static final String JSON_PROPERTY_MODEL_NAME = "model_name"; + private String modelName; + + public static final String JSON_PROPERTY_NUM_RECORDS = "num_records"; + private Integer numRecords; + + public static final String JSON_PROPERTY_SAMPLING_RATIO = "sampling_ratio"; + private Double samplingRatio; + + public LLMObsPatternsConfigSnapshot accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Integration account ID used for a bring-your-own-model run. + * + * @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 LLMObsPatternsConfigSnapshot evpQuery(String evpQuery) { + this.evpQuery = evpQuery; + return this; + } + + /** + * Query that selected the spans for the run. + * + * @return evpQuery + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVP_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEvpQuery() { + return evpQuery; + } + + public void setEvpQuery(String evpQuery) { + this.evpQuery = evpQuery; + } + + public LLMObsPatternsConfigSnapshot hierarchyDepth(Integer hierarchyDepth) { + this.hierarchyDepth = hierarchyDepth; + return this; + } + + /** + * Depth of the topic hierarchy generated. maximum: 2147483647 + * + * @return hierarchyDepth + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HIERARCHY_DEPTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getHierarchyDepth() { + return hierarchyDepth; + } + + public void setHierarchyDepth(Integer hierarchyDepth) { + this.hierarchyDepth = hierarchyDepth; + } + + public LLMObsPatternsConfigSnapshot integrationProvider(String integrationProvider) { + this.integrationProvider = integrationProvider; + return this; + } + + /** + * Integration provider used for a bring-your-own-model run. + * + * @return integrationProvider + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTEGRATION_PROVIDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIntegrationProvider() { + return integrationProvider; + } + + public void setIntegrationProvider(String integrationProvider) { + this.integrationProvider = integrationProvider; + } + + public LLMObsPatternsConfigSnapshot modelName(String modelName) { + this.modelName = modelName; + return this; + } + + /** + * Model name used for a bring-your-own-model run. + * + * @return modelName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getModelName() { + return modelName; + } + + public void setModelName(String modelName) { + this.modelName = modelName; + } + + public LLMObsPatternsConfigSnapshot numRecords(Integer numRecords) { + this.numRecords = numRecords; + return this; + } + + /** + * Maximum number of records processed for the run. maximum: 2147483647 + * + * @return numRecords + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUM_RECORDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getNumRecords() { + return numRecords; + } + + public void setNumRecords(Integer numRecords) { + this.numRecords = numRecords; + } + + public LLMObsPatternsConfigSnapshot samplingRatio(Double samplingRatio) { + this.samplingRatio = samplingRatio; + return this; + } + + /** + * Fraction of matching spans sampled for the run. + * + * @return samplingRatio + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SAMPLING_RATIO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getSamplingRatio() { + return samplingRatio; + } + + public void setSamplingRatio(Double samplingRatio) { + this.samplingRatio = samplingRatio; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsConfigSnapshot + */ + @JsonAnySetter + public LLMObsPatternsConfigSnapshot putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsConfigSnapshot object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsConfigSnapshot llmObsPatternsConfigSnapshot = (LLMObsPatternsConfigSnapshot) o; + return Objects.equals(this.accountId, llmObsPatternsConfigSnapshot.accountId) + && Objects.equals(this.evpQuery, llmObsPatternsConfigSnapshot.evpQuery) + && Objects.equals(this.hierarchyDepth, llmObsPatternsConfigSnapshot.hierarchyDepth) + && Objects.equals( + this.integrationProvider, llmObsPatternsConfigSnapshot.integrationProvider) + && Objects.equals(this.modelName, llmObsPatternsConfigSnapshot.modelName) + && Objects.equals(this.numRecords, llmObsPatternsConfigSnapshot.numRecords) + && Objects.equals(this.samplingRatio, llmObsPatternsConfigSnapshot.samplingRatio) + && Objects.equals( + this.additionalProperties, llmObsPatternsConfigSnapshot.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + accountId, + evpQuery, + hierarchyDepth, + integrationProvider, + modelName, + numRecords, + samplingRatio, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsConfigSnapshot {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" evpQuery: ").append(toIndentedString(evpQuery)).append("\n"); + sb.append(" hierarchyDepth: ").append(toIndentedString(hierarchyDepth)).append("\n"); + sb.append(" integrationProvider: ") + .append(toIndentedString(integrationProvider)) + .append("\n"); + sb.append(" modelName: ").append(toIndentedString(modelName)).append("\n"); + sb.append(" numRecords: ").append(toIndentedString(numRecords)).append("\n"); + sb.append(" samplingRatio: ").append(toIndentedString(samplingRatio)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigType.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigType.java new file mode 100644 index 00000000000..2f909fe74eb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Resource type of an LLM Observability patterns configuration. */ +@JsonSerialize(using = LLMObsPatternsConfigType.LLMObsPatternsConfigTypeSerializer.class) +public class LLMObsPatternsConfigType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("topic_discovery_configs")); + + public static final LLMObsPatternsConfigType TOPIC_DISCOVERY_CONFIGS = + new LLMObsPatternsConfigType("topic_discovery_configs"); + + LLMObsPatternsConfigType(String value) { + super(value, allowedValues); + } + + public static class LLMObsPatternsConfigTypeSerializer + extends StdSerializer { + public LLMObsPatternsConfigTypeSerializer(Class t) { + super(t); + } + + public LLMObsPatternsConfigTypeSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsPatternsConfigType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LLMObsPatternsConfigType fromValue(String value) { + return new LLMObsPatternsConfigType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigUpsertRequest.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigUpsertRequest.java new file mode 100644 index 00000000000..2b2384f2352 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigUpsertRequest.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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to create or update an LLM Observability patterns configuration. */ +@JsonPropertyOrder({LLMObsPatternsConfigUpsertRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsConfigUpsertRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsPatternsConfigUpsertRequestData data; + + public LLMObsPatternsConfigUpsertRequest() {} + + @JsonCreator + public LLMObsPatternsConfigUpsertRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + LLMObsPatternsConfigUpsertRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsPatternsConfigUpsertRequest data(LLMObsPatternsConfigUpsertRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for creating or updating an LLM Observability patterns configuration. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsConfigUpsertRequestData getData() { + return data; + } + + public void setData(LLMObsPatternsConfigUpsertRequestData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsConfigUpsertRequest + */ + @JsonAnySetter + public LLMObsPatternsConfigUpsertRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsConfigUpsertRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsConfigUpsertRequest llmObsPatternsConfigUpsertRequest = + (LLMObsPatternsConfigUpsertRequest) o; + return Objects.equals(this.data, llmObsPatternsConfigUpsertRequest.data) + && Objects.equals( + this.additionalProperties, llmObsPatternsConfigUpsertRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsConfigUpsertRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigUpsertRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigUpsertRequestAttributes.java new file mode 100644 index 00000000000..31ad52a1e4c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigUpsertRequestAttributes.java @@ -0,0 +1,442 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes for creating or updating an LLM Observability patterns configuration. */ +@JsonPropertyOrder({ + LLMObsPatternsConfigUpsertRequestAttributes.JSON_PROPERTY_ACCOUNT_ID, + LLMObsPatternsConfigUpsertRequestAttributes.JSON_PROPERTY_CONFIG_ID, + LLMObsPatternsConfigUpsertRequestAttributes.JSON_PROPERTY_EVP_QUERY, + LLMObsPatternsConfigUpsertRequestAttributes.JSON_PROPERTY_HIERARCHY_DEPTH, + LLMObsPatternsConfigUpsertRequestAttributes.JSON_PROPERTY_INTEGRATION_PROVIDER, + LLMObsPatternsConfigUpsertRequestAttributes.JSON_PROPERTY_MODEL_NAME, + LLMObsPatternsConfigUpsertRequestAttributes.JSON_PROPERTY_NAME, + LLMObsPatternsConfigUpsertRequestAttributes.JSON_PROPERTY_NUM_RECORDS, + LLMObsPatternsConfigUpsertRequestAttributes.JSON_PROPERTY_SAMPLING_RATIO, + LLMObsPatternsConfigUpsertRequestAttributes.JSON_PROPERTY_SCOPE, + LLMObsPatternsConfigUpsertRequestAttributes.JSON_PROPERTY_TEMPLATE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsConfigUpsertRequestAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private String accountId; + + public static final String JSON_PROPERTY_CONFIG_ID = "config_id"; + private String configId; + + public static final String JSON_PROPERTY_EVP_QUERY = "evp_query"; + private String evpQuery; + + public static final String JSON_PROPERTY_HIERARCHY_DEPTH = "hierarchy_depth"; + private Integer hierarchyDepth; + + public static final String JSON_PROPERTY_INTEGRATION_PROVIDER = "integration_provider"; + private String integrationProvider; + + public static final String JSON_PROPERTY_MODEL_NAME = "model_name"; + private String modelName; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_NUM_RECORDS = "num_records"; + private Integer numRecords; + + public static final String JSON_PROPERTY_SAMPLING_RATIO = "sampling_ratio"; + private Double samplingRatio; + + public static final String JSON_PROPERTY_SCOPE = "scope"; + private String scope; + + public static final String JSON_PROPERTY_TEMPLATE = "template"; + private String template; + + public LLMObsPatternsConfigUpsertRequestAttributes() {} + + @JsonCreator + public LLMObsPatternsConfigUpsertRequestAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_EVP_QUERY) String evpQuery, + @JsonProperty(required = true, value = JSON_PROPERTY_HIERARCHY_DEPTH) Integer hierarchyDepth, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_NUM_RECORDS) Integer numRecords, + @JsonProperty(required = true, value = JSON_PROPERTY_SAMPLING_RATIO) Double samplingRatio) { + this.evpQuery = evpQuery; + this.hierarchyDepth = hierarchyDepth; + this.name = name; + this.numRecords = numRecords; + this.samplingRatio = samplingRatio; + } + + public LLMObsPatternsConfigUpsertRequestAttributes accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Integration account ID for a bring-your-own-model configuration. + * + * @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 LLMObsPatternsConfigUpsertRequestAttributes configId(String configId) { + this.configId = configId; + return this; + } + + /** + * The ID of an existing configuration to update. If omitted, a new configuration is created. + * + * @return configId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getConfigId() { + return configId; + } + + public void setConfigId(String configId) { + this.configId = configId; + } + + public LLMObsPatternsConfigUpsertRequestAttributes evpQuery(String evpQuery) { + this.evpQuery = evpQuery; + return this; + } + + /** + * Query that selects the spans the patterns run analyzes. + * + * @return evpQuery + */ + @JsonProperty(JSON_PROPERTY_EVP_QUERY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEvpQuery() { + return evpQuery; + } + + public void setEvpQuery(String evpQuery) { + this.evpQuery = evpQuery; + } + + public LLMObsPatternsConfigUpsertRequestAttributes hierarchyDepth(Integer hierarchyDepth) { + this.hierarchyDepth = hierarchyDepth; + return this; + } + + /** + * Depth of the topic hierarchy to generate. maximum: 2147483647 + * + * @return hierarchyDepth + */ + @JsonProperty(JSON_PROPERTY_HIERARCHY_DEPTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getHierarchyDepth() { + return hierarchyDepth; + } + + public void setHierarchyDepth(Integer hierarchyDepth) { + this.hierarchyDepth = hierarchyDepth; + } + + public LLMObsPatternsConfigUpsertRequestAttributes integrationProvider( + String integrationProvider) { + this.integrationProvider = integrationProvider; + return this; + } + + /** + * Integration provider for a bring-your-own-model configuration. + * + * @return integrationProvider + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTEGRATION_PROVIDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIntegrationProvider() { + return integrationProvider; + } + + public void setIntegrationProvider(String integrationProvider) { + this.integrationProvider = integrationProvider; + } + + public LLMObsPatternsConfigUpsertRequestAttributes modelName(String modelName) { + this.modelName = modelName; + return this; + } + + /** + * Model name for a bring-your-own-model configuration. + * + * @return modelName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODEL_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getModelName() { + return modelName; + } + + public void setModelName(String modelName) { + this.modelName = modelName; + } + + public LLMObsPatternsConfigUpsertRequestAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Name of the configuration. + * + * @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 LLMObsPatternsConfigUpsertRequestAttributes numRecords(Integer numRecords) { + this.numRecords = numRecords; + return this; + } + + /** + * Maximum number of records to process for the run. maximum: 2147483647 + * + * @return numRecords + */ + @JsonProperty(JSON_PROPERTY_NUM_RECORDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Integer getNumRecords() { + return numRecords; + } + + public void setNumRecords(Integer numRecords) { + this.numRecords = numRecords; + } + + public LLMObsPatternsConfigUpsertRequestAttributes samplingRatio(Double samplingRatio) { + this.samplingRatio = samplingRatio; + return this; + } + + /** + * Fraction of matching spans to sample for the run. + * + * @return samplingRatio + */ + @JsonProperty(JSON_PROPERTY_SAMPLING_RATIO) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Double getSamplingRatio() { + return samplingRatio; + } + + public void setSamplingRatio(Double samplingRatio) { + this.samplingRatio = samplingRatio; + } + + public LLMObsPatternsConfigUpsertRequestAttributes scope(String scope) { + this.scope = scope; + return this; + } + + /** + * Scope of the configuration. + * + * @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 LLMObsPatternsConfigUpsertRequestAttributes template(String template) { + this.template = template; + return this; + } + + /** + * Template used to guide topic generation. + * + * @return template + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEMPLATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTemplate() { + return template; + } + + public void setTemplate(String template) { + this.template = template; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsConfigUpsertRequestAttributes + */ + @JsonAnySetter + public LLMObsPatternsConfigUpsertRequestAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsConfigUpsertRequestAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsConfigUpsertRequestAttributes llmObsPatternsConfigUpsertRequestAttributes = + (LLMObsPatternsConfigUpsertRequestAttributes) o; + return Objects.equals(this.accountId, llmObsPatternsConfigUpsertRequestAttributes.accountId) + && Objects.equals(this.configId, llmObsPatternsConfigUpsertRequestAttributes.configId) + && Objects.equals(this.evpQuery, llmObsPatternsConfigUpsertRequestAttributes.evpQuery) + && Objects.equals( + this.hierarchyDepth, llmObsPatternsConfigUpsertRequestAttributes.hierarchyDepth) + && Objects.equals( + this.integrationProvider, + llmObsPatternsConfigUpsertRequestAttributes.integrationProvider) + && Objects.equals(this.modelName, llmObsPatternsConfigUpsertRequestAttributes.modelName) + && Objects.equals(this.name, llmObsPatternsConfigUpsertRequestAttributes.name) + && Objects.equals(this.numRecords, llmObsPatternsConfigUpsertRequestAttributes.numRecords) + && Objects.equals( + this.samplingRatio, llmObsPatternsConfigUpsertRequestAttributes.samplingRatio) + && Objects.equals(this.scope, llmObsPatternsConfigUpsertRequestAttributes.scope) + && Objects.equals(this.template, llmObsPatternsConfigUpsertRequestAttributes.template) + && Objects.equals( + this.additionalProperties, + llmObsPatternsConfigUpsertRequestAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + accountId, + configId, + evpQuery, + hierarchyDepth, + integrationProvider, + modelName, + name, + numRecords, + samplingRatio, + scope, + template, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsConfigUpsertRequestAttributes {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" configId: ").append(toIndentedString(configId)).append("\n"); + sb.append(" evpQuery: ").append(toIndentedString(evpQuery)).append("\n"); + sb.append(" hierarchyDepth: ").append(toIndentedString(hierarchyDepth)).append("\n"); + sb.append(" integrationProvider: ") + .append(toIndentedString(integrationProvider)) + .append("\n"); + sb.append(" modelName: ").append(toIndentedString(modelName)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" numRecords: ").append(toIndentedString(numRecords)).append("\n"); + sb.append(" samplingRatio: ").append(toIndentedString(samplingRatio)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" template: ").append(toIndentedString(template)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigUpsertRequestData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigUpsertRequestData.java new file mode 100644 index 00000000000..b6127d0a0c6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigUpsertRequestData.java @@ -0,0 +1,184 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object for creating or updating an LLM Observability patterns configuration. */ +@JsonPropertyOrder({ + LLMObsPatternsConfigUpsertRequestData.JSON_PROPERTY_ATTRIBUTES, + LLMObsPatternsConfigUpsertRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsConfigUpsertRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsPatternsConfigUpsertRequestAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPatternsConfigType type; + + public LLMObsPatternsConfigUpsertRequestData() {} + + @JsonCreator + public LLMObsPatternsConfigUpsertRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsPatternsConfigUpsertRequestAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LLMObsPatternsConfigType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsPatternsConfigUpsertRequestData attributes( + LLMObsPatternsConfigUpsertRequestAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating or updating an LLM Observability patterns configuration. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsConfigUpsertRequestAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsPatternsConfigUpsertRequestAttributes attributes) { + this.attributes = attributes; + } + + public LLMObsPatternsConfigUpsertRequestData type(LLMObsPatternsConfigType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type of an LLM Observability patterns configuration. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsConfigType getType() { + return type; + } + + public void setType(LLMObsPatternsConfigType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsConfigUpsertRequestData + */ + @JsonAnySetter + public LLMObsPatternsConfigUpsertRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsConfigUpsertRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsConfigUpsertRequestData llmObsPatternsConfigUpsertRequestData = + (LLMObsPatternsConfigUpsertRequestData) o; + return Objects.equals(this.attributes, llmObsPatternsConfigUpsertRequestData.attributes) + && Objects.equals(this.type, llmObsPatternsConfigUpsertRequestData.type) + && Objects.equals( + this.additionalProperties, llmObsPatternsConfigUpsertRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsConfigUpsertRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigsListType.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigsListType.java new file mode 100644 index 00000000000..0d74e5959b8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigsListType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Resource type of a list of LLM Observability patterns configurations. */ +@JsonSerialize(using = LLMObsPatternsConfigsListType.LLMObsPatternsConfigsListTypeSerializer.class) +public class LLMObsPatternsConfigsListType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("list_topic_discovery_configs_response")); + + public static final LLMObsPatternsConfigsListType LIST_TOPIC_DISCOVERY_CONFIGS_RESPONSE = + new LLMObsPatternsConfigsListType("list_topic_discovery_configs_response"); + + LLMObsPatternsConfigsListType(String value) { + super(value, allowedValues); + } + + public static class LLMObsPatternsConfigsListTypeSerializer + extends StdSerializer { + public LLMObsPatternsConfigsListTypeSerializer(Class t) { + super(t); + } + + public LLMObsPatternsConfigsListTypeSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsPatternsConfigsListType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LLMObsPatternsConfigsListType fromValue(String value) { + return new LLMObsPatternsConfigsListType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetInstrumentedPodsResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigsResponse.java similarity index 77% rename from src/main/java/com/datadog/api/client/v2/model/FleetInstrumentedPodsResponse.java rename to src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigsResponse.java index 1991e4bcd53..9df9c57da01 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FleetInstrumentedPodsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigsResponse.java @@ -17,43 +17,43 @@ import java.util.Map; import java.util.Objects; -/** Response containing instrumented pods for a Kubernetes cluster. */ -@JsonPropertyOrder({FleetInstrumentedPodsResponse.JSON_PROPERTY_DATA}) +/** Response containing a list of LLM Observability patterns configurations. */ +@JsonPropertyOrder({LLMObsPatternsConfigsResponse.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class FleetInstrumentedPodsResponse { +public class LLMObsPatternsConfigsResponse { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private FleetInstrumentedPodsResponseData data; + private LLMObsPatternsConfigsResponseData data; - public FleetInstrumentedPodsResponse() {} + public LLMObsPatternsConfigsResponse() {} @JsonCreator - public FleetInstrumentedPodsResponse( + public LLMObsPatternsConfigsResponse( @JsonProperty(required = true, value = JSON_PROPERTY_DATA) - FleetInstrumentedPodsResponseData data) { + LLMObsPatternsConfigsResponseData data) { this.data = data; this.unparsed |= data.unparsed; } - public FleetInstrumentedPodsResponse data(FleetInstrumentedPodsResponseData data) { + public LLMObsPatternsConfigsResponse data(LLMObsPatternsConfigsResponseData data) { this.data = data; this.unparsed |= data.unparsed; return this; } /** - * The response data containing the cluster name and instrumented pod groups. + * Data object of a list of LLM Observability patterns configurations. * * @return data */ @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FleetInstrumentedPodsResponseData getData() { + public LLMObsPatternsConfigsResponseData getData() { return data; } - public void setData(FleetInstrumentedPodsResponseData data) { + public void setData(LLMObsPatternsConfigsResponseData data) { this.data = data; } @@ -69,10 +69,10 @@ public void setData(FleetInstrumentedPodsResponseData data) { * * @param key The arbitrary key to set * @param value The associated value - * @return FleetInstrumentedPodsResponse + * @return LLMObsPatternsConfigsResponse */ @JsonAnySetter - public FleetInstrumentedPodsResponse putAdditionalProperty(String key, Object value) { + public LLMObsPatternsConfigsResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -103,7 +103,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this FleetInstrumentedPodsResponse object is equal to o. */ + /** Return true if this LLMObsPatternsConfigsResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -112,10 +112,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - FleetInstrumentedPodsResponse fleetInstrumentedPodsResponse = (FleetInstrumentedPodsResponse) o; - return Objects.equals(this.data, fleetInstrumentedPodsResponse.data) + LLMObsPatternsConfigsResponse llmObsPatternsConfigsResponse = (LLMObsPatternsConfigsResponse) o; + return Objects.equals(this.data, llmObsPatternsConfigsResponse.data) && Objects.equals( - this.additionalProperties, fleetInstrumentedPodsResponse.additionalProperties); + this.additionalProperties, llmObsPatternsConfigsResponse.additionalProperties); } @Override @@ -126,7 +126,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class FleetInstrumentedPodsResponse {\n"); + sb.append("class LLMObsPatternsConfigsResponse {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetInstrumentedPodsResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigsResponseAttributes.java similarity index 59% rename from src/main/java/com/datadog/api/client/v2/model/FleetInstrumentedPodsResponseDataAttributes.java rename to src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigsResponseAttributes.java index e43732f041d..2fe74211f0b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FleetInstrumentedPodsResponseDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigsResponseAttributes.java @@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @@ -18,48 +19,52 @@ import java.util.Map; import java.util.Objects; -/** Attributes of the instrumented pods response containing the list of pod groups. */ -@JsonPropertyOrder({FleetInstrumentedPodsResponseDataAttributes.JSON_PROPERTY_GROUPS}) +/** Attributes of a list of LLM Observability patterns configurations. */ +@JsonPropertyOrder({LLMObsPatternsConfigsResponseAttributes.JSON_PROPERTY_CONFIGS}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class FleetInstrumentedPodsResponseDataAttributes { +public class LLMObsPatternsConfigsResponseAttributes { @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_GROUPS = "groups"; - private List groups = null; + public static final String JSON_PROPERTY_CONFIGS = "configs"; + private List configs = new ArrayList<>(); - public FleetInstrumentedPodsResponseDataAttributes groups( - List groups) { - this.groups = groups; - for (FleetInstrumentedPodGroupAttributes item : groups) { + public LLMObsPatternsConfigsResponseAttributes() {} + + @JsonCreator + public LLMObsPatternsConfigsResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CONFIGS) + List configs) { + this.configs = configs; + } + + public LLMObsPatternsConfigsResponseAttributes configs(List configs) { + this.configs = configs; + for (LLMObsPatternsConfigItem item : configs) { this.unparsed |= item.unparsed; } return this; } - public FleetInstrumentedPodsResponseDataAttributes addGroupsItem( - FleetInstrumentedPodGroupAttributes groupsItem) { - if (this.groups == null) { - this.groups = new ArrayList<>(); - } - this.groups.add(groupsItem); - this.unparsed |= groupsItem.unparsed; + public LLMObsPatternsConfigsResponseAttributes addConfigsItem( + LLMObsPatternsConfigItem configsItem) { + this.configs.add(configsItem); + this.unparsed |= configsItem.unparsed; return this; } /** - * Array of instrumented pod groups in the cluster. + * List of patterns configurations. * - * @return groups + * @return configs */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_GROUPS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getGroups() { - return groups; + @JsonProperty(JSON_PROPERTY_CONFIGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getConfigs() { + return configs; } - public void setGroups(List groups) { - this.groups = groups; + public void setConfigs(List configs) { + this.configs = configs; } /** @@ -74,11 +79,10 @@ public void setGroups(List groups) { * * @param key The arbitrary key to set * @param value The associated value - * @return FleetInstrumentedPodsResponseDataAttributes + * @return LLMObsPatternsConfigsResponseAttributes */ @JsonAnySetter - public FleetInstrumentedPodsResponseDataAttributes putAdditionalProperty( - String key, Object value) { + public LLMObsPatternsConfigsResponseAttributes putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -109,7 +113,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this FleetInstrumentedPodsResponseDataAttributes object is equal to o. */ + /** Return true if this LLMObsPatternsConfigsResponseAttributes object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -118,24 +122,24 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - FleetInstrumentedPodsResponseDataAttributes fleetInstrumentedPodsResponseDataAttributes = - (FleetInstrumentedPodsResponseDataAttributes) o; - return Objects.equals(this.groups, fleetInstrumentedPodsResponseDataAttributes.groups) + LLMObsPatternsConfigsResponseAttributes llmObsPatternsConfigsResponseAttributes = + (LLMObsPatternsConfigsResponseAttributes) o; + return Objects.equals(this.configs, llmObsPatternsConfigsResponseAttributes.configs) && Objects.equals( this.additionalProperties, - fleetInstrumentedPodsResponseDataAttributes.additionalProperties); + llmObsPatternsConfigsResponseAttributes.additionalProperties); } @Override public int hashCode() { - return Objects.hash(groups, additionalProperties); + return Objects.hash(configs, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class FleetInstrumentedPodsResponseDataAttributes {\n"); - sb.append(" groups: ").append(toIndentedString(groups)).append("\n"); + sb.append("class LLMObsPatternsConfigsResponseAttributes {\n"); + sb.append(" configs: ").append(toIndentedString(configs)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigsResponseData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigsResponseData.java new file mode 100644 index 00000000000..837ab67ab3c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsConfigsResponseData.java @@ -0,0 +1,213 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object of a list of LLM Observability patterns configurations. */ +@JsonPropertyOrder({ + LLMObsPatternsConfigsResponseData.JSON_PROPERTY_ATTRIBUTES, + LLMObsPatternsConfigsResponseData.JSON_PROPERTY_ID, + LLMObsPatternsConfigsResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsConfigsResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsPatternsConfigsResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPatternsConfigsListType type; + + public LLMObsPatternsConfigsResponseData() {} + + @JsonCreator + public LLMObsPatternsConfigsResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsPatternsConfigsResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + LLMObsPatternsConfigsListType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsPatternsConfigsResponseData attributes( + LLMObsPatternsConfigsResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a list of LLM Observability patterns configurations. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsConfigsResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsPatternsConfigsResponseAttributes attributes) { + this.attributes = attributes; + } + + public LLMObsPatternsConfigsResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Identifier of the list response. + * + * @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 LLMObsPatternsConfigsResponseData type(LLMObsPatternsConfigsListType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type of a list of LLM Observability patterns configurations. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsConfigsListType getType() { + return type; + } + + public void setType(LLMObsPatternsConfigsListType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsConfigsResponseData + */ + @JsonAnySetter + public LLMObsPatternsConfigsResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsConfigsResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsConfigsResponseData llmObsPatternsConfigsResponseData = + (LLMObsPatternsConfigsResponseData) o; + return Objects.equals(this.attributes, llmObsPatternsConfigsResponseData.attributes) + && Objects.equals(this.id, llmObsPatternsConfigsResponseData.id) + && Objects.equals(this.type, llmObsPatternsConfigsResponseData.type) + && Objects.equals( + this.additionalProperties, llmObsPatternsConfigsResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsConfigsResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRequestType.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRequestType.java new file mode 100644 index 00000000000..f361c8267a0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRequestType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Resource type for triggering an LLM Observability patterns run. */ +@JsonSerialize(using = LLMObsPatternsRequestType.LLMObsPatternsRequestTypeSerializer.class) +public class LLMObsPatternsRequestType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("topic_discovery")); + + public static final LLMObsPatternsRequestType TOPIC_DISCOVERY = + new LLMObsPatternsRequestType("topic_discovery"); + + LLMObsPatternsRequestType(String value) { + super(value, allowedValues); + } + + public static class LLMObsPatternsRequestTypeSerializer + extends StdSerializer { + public LLMObsPatternsRequestTypeSerializer(Class t) { + super(t); + } + + public LLMObsPatternsRequestTypeSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsPatternsRequestType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LLMObsPatternsRequestType fromValue(String value) { + return new LLMObsPatternsRequestType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunStatusResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunStatusResponse.java new file mode 100644 index 00000000000..91bde7550c2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunStatusResponse.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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing the status of an LLM Observability patterns run. */ +@JsonPropertyOrder({LLMObsPatternsRunStatusResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsRunStatusResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsPatternsRunStatusResponseData data; + + public LLMObsPatternsRunStatusResponse() {} + + @JsonCreator + public LLMObsPatternsRunStatusResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + LLMObsPatternsRunStatusResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsPatternsRunStatusResponse data(LLMObsPatternsRunStatusResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object of an LLM Observability patterns run status response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsRunStatusResponseData getData() { + return data; + } + + public void setData(LLMObsPatternsRunStatusResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsRunStatusResponse + */ + @JsonAnySetter + public LLMObsPatternsRunStatusResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsRunStatusResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsRunStatusResponse llmObsPatternsRunStatusResponse = + (LLMObsPatternsRunStatusResponse) o; + return Objects.equals(this.data, llmObsPatternsRunStatusResponse.data) + && Objects.equals( + this.additionalProperties, llmObsPatternsRunStatusResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsRunStatusResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunStatusResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunStatusResponseAttributes.java new file mode 100644 index 00000000000..ce2e0a9b799 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunStatusResponseAttributes.java @@ -0,0 +1,247 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of an LLM Observability patterns run status. */ +@JsonPropertyOrder({ + LLMObsPatternsRunStatusResponseAttributes.JSON_PROPERTY_CREATED_AT, + LLMObsPatternsRunStatusResponseAttributes.JSON_PROPERTY_PROGRESS, + LLMObsPatternsRunStatusResponseAttributes.JSON_PROPERTY_STATUS, + LLMObsPatternsRunStatusResponseAttributes.JSON_PROPERTY_STEP +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsRunStatusResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_PROGRESS = "progress"; + private List progress = new ArrayList<>(); + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public static final String JSON_PROPERTY_STEP = "step"; + private String step; + + public LLMObsPatternsRunStatusResponseAttributes() {} + + @JsonCreator + public LLMObsPatternsRunStatusResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_PROGRESS) + List progress, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) String status, + @JsonProperty(required = true, value = JSON_PROPERTY_STEP) String step) { + this.createdAt = createdAt; + this.progress = progress; + this.status = status; + this.step = step; + } + + public LLMObsPatternsRunStatusResponseAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp when the run was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public LLMObsPatternsRunStatusResponseAttributes progress( + List progress) { + this.progress = progress; + for (LLMObsPatternsActivityProgress item : progress) { + this.unparsed |= item.unparsed; + } + return this; + } + + public LLMObsPatternsRunStatusResponseAttributes addProgressItem( + LLMObsPatternsActivityProgress progressItem) { + this.progress.add(progressItem); + this.unparsed |= progressItem.unparsed; + return this; + } + + /** + * List of step-by-step progress entries for a patterns run. + * + * @return progress + */ + @JsonProperty(JSON_PROPERTY_PROGRESS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getProgress() { + return progress; + } + + public void setProgress(List progress) { + this.progress = progress; + } + + public LLMObsPatternsRunStatusResponseAttributes status(String status) { + this.status = status; + return this; + } + + /** + * Overall status of the run. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public LLMObsPatternsRunStatusResponseAttributes step(String step) { + this.step = step; + return this; + } + + /** + * The current step of the run. + * + * @return step + */ + @JsonProperty(JSON_PROPERTY_STEP) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStep() { + return step; + } + + public void setStep(String step) { + this.step = step; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsRunStatusResponseAttributes + */ + @JsonAnySetter + public LLMObsPatternsRunStatusResponseAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsRunStatusResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsRunStatusResponseAttributes llmObsPatternsRunStatusResponseAttributes = + (LLMObsPatternsRunStatusResponseAttributes) o; + return Objects.equals(this.createdAt, llmObsPatternsRunStatusResponseAttributes.createdAt) + && Objects.equals(this.progress, llmObsPatternsRunStatusResponseAttributes.progress) + && Objects.equals(this.status, llmObsPatternsRunStatusResponseAttributes.status) + && Objects.equals(this.step, llmObsPatternsRunStatusResponseAttributes.step) + && Objects.equals( + this.additionalProperties, + llmObsPatternsRunStatusResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, progress, status, step, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsRunStatusResponseAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" progress: ").append(toIndentedString(progress)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" step: ").append(toIndentedString(step)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunStatusResponseData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunStatusResponseData.java new file mode 100644 index 00000000000..0716221bd54 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunStatusResponseData.java @@ -0,0 +1,212 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object of an LLM Observability patterns run status response. */ +@JsonPropertyOrder({ + LLMObsPatternsRunStatusResponseData.JSON_PROPERTY_ATTRIBUTES, + LLMObsPatternsRunStatusResponseData.JSON_PROPERTY_ID, + LLMObsPatternsRunStatusResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsRunStatusResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsPatternsRunStatusResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPatternsRunStatusType type; + + public LLMObsPatternsRunStatusResponseData() {} + + @JsonCreator + public LLMObsPatternsRunStatusResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsPatternsRunStatusResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LLMObsPatternsRunStatusType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsPatternsRunStatusResponseData attributes( + LLMObsPatternsRunStatusResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an LLM Observability patterns run status. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsRunStatusResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsPatternsRunStatusResponseAttributes attributes) { + this.attributes = attributes; + } + + public LLMObsPatternsRunStatusResponseData id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the patterns run. + * + * @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 LLMObsPatternsRunStatusResponseData type(LLMObsPatternsRunStatusType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type of an LLM Observability patterns run status. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsRunStatusType getType() { + return type; + } + + public void setType(LLMObsPatternsRunStatusType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsRunStatusResponseData + */ + @JsonAnySetter + public LLMObsPatternsRunStatusResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsRunStatusResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsRunStatusResponseData llmObsPatternsRunStatusResponseData = + (LLMObsPatternsRunStatusResponseData) o; + return Objects.equals(this.attributes, llmObsPatternsRunStatusResponseData.attributes) + && Objects.equals(this.id, llmObsPatternsRunStatusResponseData.id) + && Objects.equals(this.type, llmObsPatternsRunStatusResponseData.type) + && Objects.equals( + this.additionalProperties, llmObsPatternsRunStatusResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsRunStatusResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunStatusType.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunStatusType.java new file mode 100644 index 00000000000..8af3ac53e2d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunStatusType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Resource type of an LLM Observability patterns run status. */ +@JsonSerialize(using = LLMObsPatternsRunStatusType.LLMObsPatternsRunStatusTypeSerializer.class) +public class LLMObsPatternsRunStatusType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("topic_discovery_run_status")); + + public static final LLMObsPatternsRunStatusType TOPIC_DISCOVERY_RUN_STATUS = + new LLMObsPatternsRunStatusType("topic_discovery_run_status"); + + LLMObsPatternsRunStatusType(String value) { + super(value, allowedValues); + } + + public static class LLMObsPatternsRunStatusTypeSerializer + extends StdSerializer { + public LLMObsPatternsRunStatusTypeSerializer(Class t) { + super(t); + } + + public LLMObsPatternsRunStatusTypeSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsPatternsRunStatusType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LLMObsPatternsRunStatusType fromValue(String value) { + return new LLMObsPatternsRunStatusType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunSummary.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunSummary.java new file mode 100644 index 00000000000..fde0e5be271 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunSummary.java @@ -0,0 +1,268 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Summary of an LLM Observability patterns run. */ +@JsonPropertyOrder({ + LLMObsPatternsRunSummary.JSON_PROPERTY_COMPLETED_AT, + LLMObsPatternsRunSummary.JSON_PROPERTY_CONFIG_SNAPSHOT, + LLMObsPatternsRunSummary.JSON_PROPERTY_CREATED_AT, + LLMObsPatternsRunSummary.JSON_PROPERTY_ID, + LLMObsPatternsRunSummary.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsRunSummary { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPLETED_AT = "completed_at"; + private JsonNullable completedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CONFIG_SNAPSHOT = "config_snapshot"; + private LLMObsPatternsConfigSnapshot configSnapshot; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public LLMObsPatternsRunSummary() {} + + @JsonCreator + public LLMObsPatternsRunSummary( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) String status) { + this.createdAt = createdAt; + this.id = id; + this.status = status; + } + + public LLMObsPatternsRunSummary completedAt(OffsetDateTime completedAt) { + this.completedAt = JsonNullable.of(completedAt); + return this; + } + + /** + * Timestamp when the run completed. Null if the run has not completed. + * + * @return completedAt + */ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getCompletedAt() { + return completedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getCompletedAt_JsonNullable() { + return completedAt; + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_AT) + public void setCompletedAt_JsonNullable(JsonNullable completedAt) { + this.completedAt = completedAt; + } + + public void setCompletedAt(OffsetDateTime completedAt) { + this.completedAt = JsonNullable.of(completedAt); + } + + public LLMObsPatternsRunSummary configSnapshot(LLMObsPatternsConfigSnapshot configSnapshot) { + this.configSnapshot = configSnapshot; + this.unparsed |= configSnapshot.unparsed; + return this; + } + + /** + * Snapshot of the configuration used for a patterns run. + * + * @return configSnapshot + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG_SNAPSHOT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public LLMObsPatternsConfigSnapshot getConfigSnapshot() { + return configSnapshot; + } + + public void setConfigSnapshot(LLMObsPatternsConfigSnapshot configSnapshot) { + this.configSnapshot = configSnapshot; + } + + public LLMObsPatternsRunSummary createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp when the run was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public LLMObsPatternsRunSummary id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the run. + * + * @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 LLMObsPatternsRunSummary status(String status) { + this.status = status; + return this; + } + + /** + * Status of the run. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsRunSummary + */ + @JsonAnySetter + public LLMObsPatternsRunSummary putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsRunSummary object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsRunSummary llmObsPatternsRunSummary = (LLMObsPatternsRunSummary) o; + return Objects.equals(this.completedAt, llmObsPatternsRunSummary.completedAt) + && Objects.equals(this.configSnapshot, llmObsPatternsRunSummary.configSnapshot) + && Objects.equals(this.createdAt, llmObsPatternsRunSummary.createdAt) + && Objects.equals(this.id, llmObsPatternsRunSummary.id) + && Objects.equals(this.status, llmObsPatternsRunSummary.status) + && Objects.equals(this.additionalProperties, llmObsPatternsRunSummary.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(completedAt, configSnapshot, createdAt, id, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsRunSummary {\n"); + sb.append(" completedAt: ").append(toIndentedString(completedAt)).append("\n"); + sb.append(" configSnapshot: ").append(toIndentedString(configSnapshot)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunsListType.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunsListType.java new file mode 100644 index 00000000000..08c01183e22 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunsListType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Resource type of a list of LLM Observability patterns runs. */ +@JsonSerialize(using = LLMObsPatternsRunsListType.LLMObsPatternsRunsListTypeSerializer.class) +public class LLMObsPatternsRunsListType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("list_topic_discovery_runs_response")); + + public static final LLMObsPatternsRunsListType LIST_TOPIC_DISCOVERY_RUNS_RESPONSE = + new LLMObsPatternsRunsListType("list_topic_discovery_runs_response"); + + LLMObsPatternsRunsListType(String value) { + super(value, allowedValues); + } + + public static class LLMObsPatternsRunsListTypeSerializer + extends StdSerializer { + public LLMObsPatternsRunsListTypeSerializer(Class t) { + super(t); + } + + public LLMObsPatternsRunsListTypeSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsPatternsRunsListType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LLMObsPatternsRunsListType fromValue(String value) { + return new LLMObsPatternsRunsListType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunsResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunsResponse.java new file mode 100644 index 00000000000..786b41790f8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunsResponse.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing the completed runs of an LLM Observability patterns configuration. */ +@JsonPropertyOrder({LLMObsPatternsRunsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsRunsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsPatternsRunsResponseData data; + + public LLMObsPatternsRunsResponse() {} + + @JsonCreator + public LLMObsPatternsRunsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + LLMObsPatternsRunsResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsPatternsRunsResponse data(LLMObsPatternsRunsResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object of an LLM Observability patterns runs response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsRunsResponseData getData() { + return data; + } + + public void setData(LLMObsPatternsRunsResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsRunsResponse + */ + @JsonAnySetter + public LLMObsPatternsRunsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsRunsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsRunsResponse llmObsPatternsRunsResponse = (LLMObsPatternsRunsResponse) o; + return Objects.equals(this.data, llmObsPatternsRunsResponse.data) + && Objects.equals( + this.additionalProperties, llmObsPatternsRunsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsRunsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunsResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunsResponseAttributes.java new file mode 100644 index 00000000000..8ee24bf881f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunsResponseAttributes.java @@ -0,0 +1,157 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of an LLM Observability patterns runs response. */ +@JsonPropertyOrder({LLMObsPatternsRunsResponseAttributes.JSON_PROPERTY_RUNS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsRunsResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_RUNS = "runs"; + private List runs = new ArrayList<>(); + + public LLMObsPatternsRunsResponseAttributes() {} + + @JsonCreator + public LLMObsPatternsRunsResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_RUNS) + List runs) { + this.runs = runs; + } + + public LLMObsPatternsRunsResponseAttributes runs(List runs) { + this.runs = runs; + for (LLMObsPatternsRunSummary item : runs) { + this.unparsed |= item.unparsed; + } + return this; + } + + public LLMObsPatternsRunsResponseAttributes addRunsItem(LLMObsPatternsRunSummary runsItem) { + this.runs.add(runsItem); + this.unparsed |= runsItem.unparsed; + return this; + } + + /** + * List of patterns runs. + * + * @return runs + */ + @JsonProperty(JSON_PROPERTY_RUNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getRuns() { + return runs; + } + + public void setRuns(List runs) { + this.runs = runs; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsRunsResponseAttributes + */ + @JsonAnySetter + public LLMObsPatternsRunsResponseAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsRunsResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsRunsResponseAttributes llmObsPatternsRunsResponseAttributes = + (LLMObsPatternsRunsResponseAttributes) o; + return Objects.equals(this.runs, llmObsPatternsRunsResponseAttributes.runs) + && Objects.equals( + this.additionalProperties, llmObsPatternsRunsResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(runs, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsRunsResponseAttributes {\n"); + sb.append(" runs: ").append(toIndentedString(runs)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunsResponseData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunsResponseData.java new file mode 100644 index 00000000000..377a8274864 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsRunsResponseData.java @@ -0,0 +1,212 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object of an LLM Observability patterns runs response. */ +@JsonPropertyOrder({ + LLMObsPatternsRunsResponseData.JSON_PROPERTY_ATTRIBUTES, + LLMObsPatternsRunsResponseData.JSON_PROPERTY_ID, + LLMObsPatternsRunsResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsRunsResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsPatternsRunsResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPatternsRunsListType type; + + public LLMObsPatternsRunsResponseData() {} + + @JsonCreator + public LLMObsPatternsRunsResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsPatternsRunsResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LLMObsPatternsRunsListType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsPatternsRunsResponseData attributes( + LLMObsPatternsRunsResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an LLM Observability patterns runs response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsRunsResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsPatternsRunsResponseAttributes attributes) { + this.attributes = attributes; + } + + public LLMObsPatternsRunsResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Identifier of the configuration the runs belong to. + * + * @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 LLMObsPatternsRunsResponseData type(LLMObsPatternsRunsListType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type of a list of LLM Observability patterns runs. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsRunsListType getType() { + return type; + } + + public void setType(LLMObsPatternsRunsListType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsRunsResponseData + */ + @JsonAnySetter + public LLMObsPatternsRunsResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsRunsResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsRunsResponseData llmObsPatternsRunsResponseData = + (LLMObsPatternsRunsResponseData) o; + return Objects.equals(this.attributes, llmObsPatternsRunsResponseData.attributes) + && Objects.equals(this.id, llmObsPatternsRunsResponseData.id) + && Objects.equals(this.type, llmObsPatternsRunsResponseData.type) + && Objects.equals( + this.additionalProperties, llmObsPatternsRunsResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsRunsResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopic.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopic.java new file mode 100644 index 00000000000..268905ab340 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopic.java @@ -0,0 +1,410 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A topic discovered by an LLM Observability patterns run. */ +@JsonPropertyOrder({ + LLMObsPatternsTopic.JSON_PROPERTY_CREATED_AT, + LLMObsPatternsTopic.JSON_PROPERTY_DESCRIPTION, + LLMObsPatternsTopic.JSON_PROPERTY_FIRST_SEEN_AT, + LLMObsPatternsTopic.JSON_PROPERTY_HIERARCHY_LEVEL, + LLMObsPatternsTopic.JSON_PROPERTY_ID, + LLMObsPatternsTopic.JSON_PROPERTY_IS_VALIDATED, + LLMObsPatternsTopic.JSON_PROPERTY_NAME, + LLMObsPatternsTopic.JSON_PROPERTY_PARENT_TOPIC_ID, + LLMObsPatternsTopic.JSON_PROPERTY_POINT_COUNT, + LLMObsPatternsTopic.JSON_PROPERTY_RUN_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsTopic { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_FIRST_SEEN_AT = "first_seen_at"; + private OffsetDateTime firstSeenAt; + + public static final String JSON_PROPERTY_HIERARCHY_LEVEL = "hierarchy_level"; + private Long hierarchyLevel; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_IS_VALIDATED = "is_validated"; + private Boolean isValidated; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_PARENT_TOPIC_ID = "parent_topic_id"; + private String parentTopicId; + + public static final String JSON_PROPERTY_POINT_COUNT = "point_count"; + private Long pointCount; + + public static final String JSON_PROPERTY_RUN_ID = "run_id"; + private String runId; + + public LLMObsPatternsTopic() {} + + @JsonCreator + public LLMObsPatternsTopic( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_DESCRIPTION) String description, + @JsonProperty(required = true, value = JSON_PROPERTY_FIRST_SEEN_AT) + OffsetDateTime firstSeenAt, + @JsonProperty(required = true, value = JSON_PROPERTY_HIERARCHY_LEVEL) Long hierarchyLevel, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_IS_VALIDATED) Boolean isValidated, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_PARENT_TOPIC_ID) String parentTopicId, + @JsonProperty(required = true, value = JSON_PROPERTY_POINT_COUNT) Long pointCount, + @JsonProperty(required = true, value = JSON_PROPERTY_RUN_ID) String runId) { + this.createdAt = createdAt; + this.description = description; + this.firstSeenAt = firstSeenAt; + this.hierarchyLevel = hierarchyLevel; + this.id = id; + this.isValidated = isValidated; + this.name = name; + this.parentTopicId = parentTopicId; + this.pointCount = pointCount; + this.runId = runId; + } + + public LLMObsPatternsTopic createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp when the topic was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public LLMObsPatternsTopic description(String description) { + this.description = description; + return this; + } + + /** + * Description of the topic. + * + * @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 LLMObsPatternsTopic firstSeenAt(OffsetDateTime firstSeenAt) { + this.firstSeenAt = firstSeenAt; + return this; + } + + /** + * Timestamp when the topic was first seen. + * + * @return firstSeenAt + */ + @JsonProperty(JSON_PROPERTY_FIRST_SEEN_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getFirstSeenAt() { + return firstSeenAt; + } + + public void setFirstSeenAt(OffsetDateTime firstSeenAt) { + this.firstSeenAt = firstSeenAt; + } + + public LLMObsPatternsTopic hierarchyLevel(Long hierarchyLevel) { + this.hierarchyLevel = hierarchyLevel; + return this; + } + + /** + * Level of the topic in the hierarchy. Level 0 is a leaf topic. + * + * @return hierarchyLevel + */ + @JsonProperty(JSON_PROPERTY_HIERARCHY_LEVEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getHierarchyLevel() { + return hierarchyLevel; + } + + public void setHierarchyLevel(Long hierarchyLevel) { + this.hierarchyLevel = hierarchyLevel; + } + + public LLMObsPatternsTopic id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the topic. + * + * @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 LLMObsPatternsTopic isValidated(Boolean isValidated) { + this.isValidated = isValidated; + return this; + } + + /** + * Whether the topic has been validated. + * + * @return isValidated + */ + @JsonProperty(JSON_PROPERTY_IS_VALIDATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsValidated() { + return isValidated; + } + + public void setIsValidated(Boolean isValidated) { + this.isValidated = isValidated; + } + + public LLMObsPatternsTopic name(String name) { + this.name = name; + return this; + } + + /** + * Name of the topic. + * + * @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 LLMObsPatternsTopic parentTopicId(String parentTopicId) { + this.parentTopicId = parentTopicId; + return this; + } + + /** + * Identifier of the parent topic. Empty for top-level topics. + * + * @return parentTopicId + */ + @JsonProperty(JSON_PROPERTY_PARENT_TOPIC_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getParentTopicId() { + return parentTopicId; + } + + public void setParentTopicId(String parentTopicId) { + this.parentTopicId = parentTopicId; + } + + public LLMObsPatternsTopic pointCount(Long pointCount) { + this.pointCount = pointCount; + return this; + } + + /** + * Number of data points assigned to the topic. + * + * @return pointCount + */ + @JsonProperty(JSON_PROPERTY_POINT_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getPointCount() { + return pointCount; + } + + public void setPointCount(Long pointCount) { + this.pointCount = pointCount; + } + + public LLMObsPatternsTopic runId(String runId) { + this.runId = runId; + return this; + } + + /** + * Identifier of the run that produced the topic. + * + * @return runId + */ + @JsonProperty(JSON_PROPERTY_RUN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRunId() { + return runId; + } + + public void setRunId(String runId) { + this.runId = runId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsTopic + */ + @JsonAnySetter + public LLMObsPatternsTopic putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsTopic object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsTopic llmObsPatternsTopic = (LLMObsPatternsTopic) o; + return Objects.equals(this.createdAt, llmObsPatternsTopic.createdAt) + && Objects.equals(this.description, llmObsPatternsTopic.description) + && Objects.equals(this.firstSeenAt, llmObsPatternsTopic.firstSeenAt) + && Objects.equals(this.hierarchyLevel, llmObsPatternsTopic.hierarchyLevel) + && Objects.equals(this.id, llmObsPatternsTopic.id) + && Objects.equals(this.isValidated, llmObsPatternsTopic.isValidated) + && Objects.equals(this.name, llmObsPatternsTopic.name) + && Objects.equals(this.parentTopicId, llmObsPatternsTopic.parentTopicId) + && Objects.equals(this.pointCount, llmObsPatternsTopic.pointCount) + && Objects.equals(this.runId, llmObsPatternsTopic.runId) + && Objects.equals(this.additionalProperties, llmObsPatternsTopic.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + description, + firstSeenAt, + hierarchyLevel, + id, + isValidated, + name, + parentTopicId, + pointCount, + runId, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsTopic {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" firstSeenAt: ").append(toIndentedString(firstSeenAt)).append("\n"); + sb.append(" hierarchyLevel: ").append(toIndentedString(hierarchyLevel)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" isValidated: ").append(toIndentedString(isValidated)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" parentTopicId: ").append(toIndentedString(parentTopicId)).append("\n"); + sb.append(" pointCount: ").append(toIndentedString(pointCount)).append("\n"); + sb.append(" runId: ").append(toIndentedString(runId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicWithClusteredPoints.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicWithClusteredPoints.java new file mode 100644 index 00000000000..a178d40536d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicWithClusteredPoints.java @@ -0,0 +1,460 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A topic discovered by an LLM Observability patterns run, including the clustered points attached + * to leaf topics. + */ +@JsonPropertyOrder({ + LLMObsPatternsTopicWithClusteredPoints.JSON_PROPERTY_CLUSTER_POINTS, + LLMObsPatternsTopicWithClusteredPoints.JSON_PROPERTY_CREATED_AT, + LLMObsPatternsTopicWithClusteredPoints.JSON_PROPERTY_DESCRIPTION, + LLMObsPatternsTopicWithClusteredPoints.JSON_PROPERTY_FIRST_SEEN_AT, + LLMObsPatternsTopicWithClusteredPoints.JSON_PROPERTY_HIERARCHY_LEVEL, + LLMObsPatternsTopicWithClusteredPoints.JSON_PROPERTY_ID, + LLMObsPatternsTopicWithClusteredPoints.JSON_PROPERTY_IS_VALIDATED, + LLMObsPatternsTopicWithClusteredPoints.JSON_PROPERTY_NAME, + LLMObsPatternsTopicWithClusteredPoints.JSON_PROPERTY_PARENT_TOPIC_ID, + LLMObsPatternsTopicWithClusteredPoints.JSON_PROPERTY_POINT_COUNT, + LLMObsPatternsTopicWithClusteredPoints.JSON_PROPERTY_RUN_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsTopicWithClusteredPoints { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CLUSTER_POINTS = "cluster_points"; + private List clusterPoints = null; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_FIRST_SEEN_AT = "first_seen_at"; + private OffsetDateTime firstSeenAt; + + public static final String JSON_PROPERTY_HIERARCHY_LEVEL = "hierarchy_level"; + private Long hierarchyLevel; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_IS_VALIDATED = "is_validated"; + private Boolean isValidated; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_PARENT_TOPIC_ID = "parent_topic_id"; + private String parentTopicId; + + public static final String JSON_PROPERTY_POINT_COUNT = "point_count"; + private Long pointCount; + + public static final String JSON_PROPERTY_RUN_ID = "run_id"; + private String runId; + + public LLMObsPatternsTopicWithClusteredPoints() {} + + @JsonCreator + public LLMObsPatternsTopicWithClusteredPoints( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_DESCRIPTION) String description, + @JsonProperty(required = true, value = JSON_PROPERTY_FIRST_SEEN_AT) + OffsetDateTime firstSeenAt, + @JsonProperty(required = true, value = JSON_PROPERTY_HIERARCHY_LEVEL) Long hierarchyLevel, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_IS_VALIDATED) Boolean isValidated, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_PARENT_TOPIC_ID) String parentTopicId, + @JsonProperty(required = true, value = JSON_PROPERTY_POINT_COUNT) Long pointCount, + @JsonProperty(required = true, value = JSON_PROPERTY_RUN_ID) String runId) { + this.createdAt = createdAt; + this.description = description; + this.firstSeenAt = firstSeenAt; + this.hierarchyLevel = hierarchyLevel; + this.id = id; + this.isValidated = isValidated; + this.name = name; + this.parentTopicId = parentTopicId; + this.pointCount = pointCount; + this.runId = runId; + } + + public LLMObsPatternsTopicWithClusteredPoints clusterPoints( + List clusterPoints) { + this.clusterPoints = clusterPoints; + for (LLMObsPatternsClusteredPointRef item : clusterPoints) { + this.unparsed |= item.unparsed; + } + return this; + } + + public LLMObsPatternsTopicWithClusteredPoints addClusterPointsItem( + LLMObsPatternsClusteredPointRef clusterPointsItem) { + if (this.clusterPoints == null) { + this.clusterPoints = new ArrayList<>(); + } + this.clusterPoints.add(clusterPointsItem); + this.unparsed |= clusterPointsItem.unparsed; + return this; + } + + /** + * List of clustered points attached to a topic. + * + * @return clusterPoints + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLUSTER_POINTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getClusterPoints() { + return clusterPoints; + } + + public void setClusterPoints(List clusterPoints) { + this.clusterPoints = clusterPoints; + } + + public LLMObsPatternsTopicWithClusteredPoints createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp when the topic was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public LLMObsPatternsTopicWithClusteredPoints description(String description) { + this.description = description; + return this; + } + + /** + * Description of the topic. + * + * @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 LLMObsPatternsTopicWithClusteredPoints firstSeenAt(OffsetDateTime firstSeenAt) { + this.firstSeenAt = firstSeenAt; + return this; + } + + /** + * Timestamp when the topic was first seen. + * + * @return firstSeenAt + */ + @JsonProperty(JSON_PROPERTY_FIRST_SEEN_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getFirstSeenAt() { + return firstSeenAt; + } + + public void setFirstSeenAt(OffsetDateTime firstSeenAt) { + this.firstSeenAt = firstSeenAt; + } + + public LLMObsPatternsTopicWithClusteredPoints hierarchyLevel(Long hierarchyLevel) { + this.hierarchyLevel = hierarchyLevel; + return this; + } + + /** + * Level of the topic in the hierarchy. Level 0 is a leaf topic. + * + * @return hierarchyLevel + */ + @JsonProperty(JSON_PROPERTY_HIERARCHY_LEVEL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getHierarchyLevel() { + return hierarchyLevel; + } + + public void setHierarchyLevel(Long hierarchyLevel) { + this.hierarchyLevel = hierarchyLevel; + } + + public LLMObsPatternsTopicWithClusteredPoints id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the topic. + * + * @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 LLMObsPatternsTopicWithClusteredPoints isValidated(Boolean isValidated) { + this.isValidated = isValidated; + return this; + } + + /** + * Whether the topic has been validated. + * + * @return isValidated + */ + @JsonProperty(JSON_PROPERTY_IS_VALIDATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsValidated() { + return isValidated; + } + + public void setIsValidated(Boolean isValidated) { + this.isValidated = isValidated; + } + + public LLMObsPatternsTopicWithClusteredPoints name(String name) { + this.name = name; + return this; + } + + /** + * Name of the topic. + * + * @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 LLMObsPatternsTopicWithClusteredPoints parentTopicId(String parentTopicId) { + this.parentTopicId = parentTopicId; + return this; + } + + /** + * Identifier of the parent topic. Empty for top-level topics. + * + * @return parentTopicId + */ + @JsonProperty(JSON_PROPERTY_PARENT_TOPIC_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getParentTopicId() { + return parentTopicId; + } + + public void setParentTopicId(String parentTopicId) { + this.parentTopicId = parentTopicId; + } + + public LLMObsPatternsTopicWithClusteredPoints pointCount(Long pointCount) { + this.pointCount = pointCount; + return this; + } + + /** + * Number of data points assigned to the topic. + * + * @return pointCount + */ + @JsonProperty(JSON_PROPERTY_POINT_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getPointCount() { + return pointCount; + } + + public void setPointCount(Long pointCount) { + this.pointCount = pointCount; + } + + public LLMObsPatternsTopicWithClusteredPoints runId(String runId) { + this.runId = runId; + return this; + } + + /** + * Identifier of the run that produced the topic. + * + * @return runId + */ + @JsonProperty(JSON_PROPERTY_RUN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRunId() { + return runId; + } + + public void setRunId(String runId) { + this.runId = runId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsTopicWithClusteredPoints + */ + @JsonAnySetter + public LLMObsPatternsTopicWithClusteredPoints putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsTopicWithClusteredPoints object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsTopicWithClusteredPoints llmObsPatternsTopicWithClusteredPoints = + (LLMObsPatternsTopicWithClusteredPoints) o; + return Objects.equals(this.clusterPoints, llmObsPatternsTopicWithClusteredPoints.clusterPoints) + && Objects.equals(this.createdAt, llmObsPatternsTopicWithClusteredPoints.createdAt) + && Objects.equals(this.description, llmObsPatternsTopicWithClusteredPoints.description) + && Objects.equals(this.firstSeenAt, llmObsPatternsTopicWithClusteredPoints.firstSeenAt) + && Objects.equals( + this.hierarchyLevel, llmObsPatternsTopicWithClusteredPoints.hierarchyLevel) + && Objects.equals(this.id, llmObsPatternsTopicWithClusteredPoints.id) + && Objects.equals(this.isValidated, llmObsPatternsTopicWithClusteredPoints.isValidated) + && Objects.equals(this.name, llmObsPatternsTopicWithClusteredPoints.name) + && Objects.equals(this.parentTopicId, llmObsPatternsTopicWithClusteredPoints.parentTopicId) + && Objects.equals(this.pointCount, llmObsPatternsTopicWithClusteredPoints.pointCount) + && Objects.equals(this.runId, llmObsPatternsTopicWithClusteredPoints.runId) + && Objects.equals( + this.additionalProperties, llmObsPatternsTopicWithClusteredPoints.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + clusterPoints, + createdAt, + description, + firstSeenAt, + hierarchyLevel, + id, + isValidated, + name, + parentTopicId, + pointCount, + runId, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsTopicWithClusteredPoints {\n"); + sb.append(" clusterPoints: ").append(toIndentedString(clusterPoints)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" firstSeenAt: ").append(toIndentedString(firstSeenAt)).append("\n"); + sb.append(" hierarchyLevel: ").append(toIndentedString(hierarchyLevel)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" isValidated: ").append(toIndentedString(isValidated)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" parentTopicId: ").append(toIndentedString(parentTopicId)).append("\n"); + sb.append(" pointCount: ").append(toIndentedString(pointCount)).append("\n"); + sb.append(" runId: ").append(toIndentedString(runId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsResponse.java new file mode 100644 index 00000000000..1df9501aaec --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsResponse.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing the topics discovered by an LLM Observability patterns run. */ +@JsonPropertyOrder({LLMObsPatternsTopicsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsTopicsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsPatternsTopicsResponseData data; + + public LLMObsPatternsTopicsResponse() {} + + @JsonCreator + public LLMObsPatternsTopicsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + LLMObsPatternsTopicsResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsPatternsTopicsResponse data(LLMObsPatternsTopicsResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object of an LLM Observability patterns topics response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsTopicsResponseData getData() { + return data; + } + + public void setData(LLMObsPatternsTopicsResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsTopicsResponse + */ + @JsonAnySetter + public LLMObsPatternsTopicsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsTopicsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsTopicsResponse llmObsPatternsTopicsResponse = (LLMObsPatternsTopicsResponse) o; + return Objects.equals(this.data, llmObsPatternsTopicsResponse.data) + && Objects.equals( + this.additionalProperties, llmObsPatternsTopicsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsTopicsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsResponseAttributes.java new file mode 100644 index 00000000000..44d056ce970 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsResponseAttributes.java @@ -0,0 +1,348 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes of an LLM Observability patterns topics response. */ +@JsonPropertyOrder({ + LLMObsPatternsTopicsResponseAttributes.JSON_PROPERTY_COMPLETED_AT, + LLMObsPatternsTopicsResponseAttributes.JSON_PROPERTY_CONFIG_ID, + LLMObsPatternsTopicsResponseAttributes.JSON_PROPERTY_CONFIG_SNAPSHOT, + LLMObsPatternsTopicsResponseAttributes.JSON_PROPERTY_CREATED_AT, + LLMObsPatternsTopicsResponseAttributes.JSON_PROPERTY_PREVIOUS_RUN_ID, + LLMObsPatternsTopicsResponseAttributes.JSON_PROPERTY_RUN_ID, + LLMObsPatternsTopicsResponseAttributes.JSON_PROPERTY_TOPICS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsTopicsResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPLETED_AT = "completed_at"; + private JsonNullable completedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CONFIG_ID = "config_id"; + private String configId; + + public static final String JSON_PROPERTY_CONFIG_SNAPSHOT = "config_snapshot"; + private LLMObsPatternsConfigSnapshot configSnapshot; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_PREVIOUS_RUN_ID = "previous_run_id"; + private String previousRunId; + + public static final String JSON_PROPERTY_RUN_ID = "run_id"; + private String runId; + + public static final String JSON_PROPERTY_TOPICS = "topics"; + private List topics = new ArrayList<>(); + + public LLMObsPatternsTopicsResponseAttributes() {} + + @JsonCreator + public LLMObsPatternsTopicsResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CONFIG_ID) String configId, + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_PREVIOUS_RUN_ID) String previousRunId, + @JsonProperty(required = true, value = JSON_PROPERTY_RUN_ID) String runId, + @JsonProperty(required = true, value = JSON_PROPERTY_TOPICS) + List topics) { + this.configId = configId; + this.createdAt = createdAt; + this.previousRunId = previousRunId; + this.runId = runId; + this.topics = topics; + } + + public LLMObsPatternsTopicsResponseAttributes completedAt(OffsetDateTime completedAt) { + this.completedAt = JsonNullable.of(completedAt); + return this; + } + + /** + * Timestamp when the run completed. Null if the run has not completed. + * + * @return completedAt + */ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getCompletedAt() { + return completedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getCompletedAt_JsonNullable() { + return completedAt; + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_AT) + public void setCompletedAt_JsonNullable(JsonNullable completedAt) { + this.completedAt = completedAt; + } + + public void setCompletedAt(OffsetDateTime completedAt) { + this.completedAt = JsonNullable.of(completedAt); + } + + public LLMObsPatternsTopicsResponseAttributes configId(String configId) { + this.configId = configId; + return this; + } + + /** + * Identifier of the configuration that produced the run. + * + * @return configId + */ + @JsonProperty(JSON_PROPERTY_CONFIG_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getConfigId() { + return configId; + } + + public void setConfigId(String configId) { + this.configId = configId; + } + + public LLMObsPatternsTopicsResponseAttributes configSnapshot( + LLMObsPatternsConfigSnapshot configSnapshot) { + this.configSnapshot = configSnapshot; + this.unparsed |= configSnapshot.unparsed; + return this; + } + + /** + * Snapshot of the configuration used for a patterns run. + * + * @return configSnapshot + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG_SNAPSHOT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public LLMObsPatternsConfigSnapshot getConfigSnapshot() { + return configSnapshot; + } + + public void setConfigSnapshot(LLMObsPatternsConfigSnapshot configSnapshot) { + this.configSnapshot = configSnapshot; + } + + public LLMObsPatternsTopicsResponseAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp when the run was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public LLMObsPatternsTopicsResponseAttributes previousRunId(String previousRunId) { + this.previousRunId = previousRunId; + return this; + } + + /** + * Identifier of the run that completed immediately before this one. Empty if none. + * + * @return previousRunId + */ + @JsonProperty(JSON_PROPERTY_PREVIOUS_RUN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPreviousRunId() { + return previousRunId; + } + + public void setPreviousRunId(String previousRunId) { + this.previousRunId = previousRunId; + } + + public LLMObsPatternsTopicsResponseAttributes runId(String runId) { + this.runId = runId; + return this; + } + + /** + * Identifier of the run that produced the topics. + * + * @return runId + */ + @JsonProperty(JSON_PROPERTY_RUN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRunId() { + return runId; + } + + public void setRunId(String runId) { + this.runId = runId; + } + + public LLMObsPatternsTopicsResponseAttributes topics(List topics) { + this.topics = topics; + for (LLMObsPatternsTopic item : topics) { + this.unparsed |= item.unparsed; + } + return this; + } + + public LLMObsPatternsTopicsResponseAttributes addTopicsItem(LLMObsPatternsTopic topicsItem) { + this.topics.add(topicsItem); + this.unparsed |= topicsItem.unparsed; + return this; + } + + /** + * List of discovered topics. + * + * @return topics + */ + @JsonProperty(JSON_PROPERTY_TOPICS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTopics() { + return topics; + } + + public void setTopics(List topics) { + this.topics = topics; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsTopicsResponseAttributes + */ + @JsonAnySetter + public LLMObsPatternsTopicsResponseAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsTopicsResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsTopicsResponseAttributes llmObsPatternsTopicsResponseAttributes = + (LLMObsPatternsTopicsResponseAttributes) o; + return Objects.equals(this.completedAt, llmObsPatternsTopicsResponseAttributes.completedAt) + && Objects.equals(this.configId, llmObsPatternsTopicsResponseAttributes.configId) + && Objects.equals( + this.configSnapshot, llmObsPatternsTopicsResponseAttributes.configSnapshot) + && Objects.equals(this.createdAt, llmObsPatternsTopicsResponseAttributes.createdAt) + && Objects.equals(this.previousRunId, llmObsPatternsTopicsResponseAttributes.previousRunId) + && Objects.equals(this.runId, llmObsPatternsTopicsResponseAttributes.runId) + && Objects.equals(this.topics, llmObsPatternsTopicsResponseAttributes.topics) + && Objects.equals( + this.additionalProperties, llmObsPatternsTopicsResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + completedAt, + configId, + configSnapshot, + createdAt, + previousRunId, + runId, + topics, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsTopicsResponseAttributes {\n"); + sb.append(" completedAt: ").append(toIndentedString(completedAt)).append("\n"); + sb.append(" configId: ").append(toIndentedString(configId)).append("\n"); + sb.append(" configSnapshot: ").append(toIndentedString(configSnapshot)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" previousRunId: ").append(toIndentedString(previousRunId)).append("\n"); + sb.append(" runId: ").append(toIndentedString(runId)).append("\n"); + sb.append(" topics: ").append(toIndentedString(topics)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsResponseData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsResponseData.java new file mode 100644 index 00000000000..31d2ab686b1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsResponseData.java @@ -0,0 +1,212 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object of an LLM Observability patterns topics response. */ +@JsonPropertyOrder({ + LLMObsPatternsTopicsResponseData.JSON_PROPERTY_ATTRIBUTES, + LLMObsPatternsTopicsResponseData.JSON_PROPERTY_ID, + LLMObsPatternsTopicsResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsTopicsResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsPatternsTopicsResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPatternsTopicsType type; + + public LLMObsPatternsTopicsResponseData() {} + + @JsonCreator + public LLMObsPatternsTopicsResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsPatternsTopicsResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LLMObsPatternsTopicsType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsPatternsTopicsResponseData attributes( + LLMObsPatternsTopicsResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an LLM Observability patterns topics response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsTopicsResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsPatternsTopicsResponseAttributes attributes) { + this.attributes = attributes; + } + + public LLMObsPatternsTopicsResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Identifier of the run the topics belong to. + * + * @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 LLMObsPatternsTopicsResponseData type(LLMObsPatternsTopicsType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type of an LLM Observability patterns topics response. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsTopicsType getType() { + return type; + } + + public void setType(LLMObsPatternsTopicsType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsTopicsResponseData + */ + @JsonAnySetter + public LLMObsPatternsTopicsResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsTopicsResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsTopicsResponseData llmObsPatternsTopicsResponseData = + (LLMObsPatternsTopicsResponseData) o; + return Objects.equals(this.attributes, llmObsPatternsTopicsResponseData.attributes) + && Objects.equals(this.id, llmObsPatternsTopicsResponseData.id) + && Objects.equals(this.type, llmObsPatternsTopicsResponseData.type) + && Objects.equals( + this.additionalProperties, llmObsPatternsTopicsResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsTopicsResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsType.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsType.java new file mode 100644 index 00000000000..bf95c9b917a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Resource type of an LLM Observability patterns topics response. */ +@JsonSerialize(using = LLMObsPatternsTopicsType.LLMObsPatternsTopicsTypeSerializer.class) +public class LLMObsPatternsTopicsType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("get_topics_response")); + + public static final LLMObsPatternsTopicsType GET_TOPICS_RESPONSE = + new LLMObsPatternsTopicsType("get_topics_response"); + + LLMObsPatternsTopicsType(String value) { + super(value, allowedValues); + } + + public static class LLMObsPatternsTopicsTypeSerializer + extends StdSerializer { + public LLMObsPatternsTopicsTypeSerializer(Class t) { + super(t); + } + + public LLMObsPatternsTopicsTypeSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsPatternsTopicsType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LLMObsPatternsTopicsType fromValue(String value) { + return new LLMObsPatternsTopicsType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsWithClusteredPointsResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsWithClusteredPointsResponse.java new file mode 100644 index 00000000000..388c27d65c6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsWithClusteredPointsResponse.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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * Response containing the topics, and the clustered points of their leaf topics, discovered by an + * LLM Observability patterns run. + */ +@JsonPropertyOrder({LLMObsPatternsTopicsWithClusteredPointsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsTopicsWithClusteredPointsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsPatternsTopicsWithClusteredPointsResponseData data; + + public LLMObsPatternsTopicsWithClusteredPointsResponse() {} + + @JsonCreator + public LLMObsPatternsTopicsWithClusteredPointsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + LLMObsPatternsTopicsWithClusteredPointsResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsPatternsTopicsWithClusteredPointsResponse data( + LLMObsPatternsTopicsWithClusteredPointsResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object of an LLM Observability patterns topics-with-clustered-points response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsTopicsWithClusteredPointsResponseData getData() { + return data; + } + + public void setData(LLMObsPatternsTopicsWithClusteredPointsResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsTopicsWithClusteredPointsResponse + */ + @JsonAnySetter + public LLMObsPatternsTopicsWithClusteredPointsResponse putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsTopicsWithClusteredPointsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsTopicsWithClusteredPointsResponse + llmObsPatternsTopicsWithClusteredPointsResponse = + (LLMObsPatternsTopicsWithClusteredPointsResponse) o; + return Objects.equals(this.data, llmObsPatternsTopicsWithClusteredPointsResponse.data) + && Objects.equals( + this.additionalProperties, + llmObsPatternsTopicsWithClusteredPointsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsTopicsWithClusteredPointsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsWithClusteredPointsResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsWithClusteredPointsResponseAttributes.java new file mode 100644 index 00000000000..8b5d3a3d0e1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsWithClusteredPointsResponseAttributes.java @@ -0,0 +1,367 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes of an LLM Observability patterns topics-with-clustered-points response. */ +@JsonPropertyOrder({ + LLMObsPatternsTopicsWithClusteredPointsResponseAttributes.JSON_PROPERTY_COMPLETED_AT, + LLMObsPatternsTopicsWithClusteredPointsResponseAttributes.JSON_PROPERTY_CONFIG_ID, + LLMObsPatternsTopicsWithClusteredPointsResponseAttributes.JSON_PROPERTY_CONFIG_SNAPSHOT, + LLMObsPatternsTopicsWithClusteredPointsResponseAttributes.JSON_PROPERTY_CREATED_AT, + LLMObsPatternsTopicsWithClusteredPointsResponseAttributes.JSON_PROPERTY_PREVIOUS_RUN_ID, + LLMObsPatternsTopicsWithClusteredPointsResponseAttributes.JSON_PROPERTY_RUN_ID, + LLMObsPatternsTopicsWithClusteredPointsResponseAttributes.JSON_PROPERTY_TOPICS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsTopicsWithClusteredPointsResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPLETED_AT = "completed_at"; + private JsonNullable completedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CONFIG_ID = "config_id"; + private String configId; + + public static final String JSON_PROPERTY_CONFIG_SNAPSHOT = "config_snapshot"; + private LLMObsPatternsConfigSnapshot configSnapshot; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_PREVIOUS_RUN_ID = "previous_run_id"; + private String previousRunId; + + public static final String JSON_PROPERTY_RUN_ID = "run_id"; + private String runId; + + public static final String JSON_PROPERTY_TOPICS = "topics"; + private List topics = new ArrayList<>(); + + public LLMObsPatternsTopicsWithClusteredPointsResponseAttributes() {} + + @JsonCreator + public LLMObsPatternsTopicsWithClusteredPointsResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CONFIG_ID) String configId, + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_PREVIOUS_RUN_ID) String previousRunId, + @JsonProperty(required = true, value = JSON_PROPERTY_RUN_ID) String runId, + @JsonProperty(required = true, value = JSON_PROPERTY_TOPICS) + List topics) { + this.configId = configId; + this.createdAt = createdAt; + this.previousRunId = previousRunId; + this.runId = runId; + this.topics = topics; + } + + public LLMObsPatternsTopicsWithClusteredPointsResponseAttributes completedAt( + OffsetDateTime completedAt) { + this.completedAt = JsonNullable.of(completedAt); + return this; + } + + /** + * Timestamp when the run completed. Null if the run has not completed. + * + * @return completedAt + */ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getCompletedAt() { + return completedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getCompletedAt_JsonNullable() { + return completedAt; + } + + @JsonProperty(JSON_PROPERTY_COMPLETED_AT) + public void setCompletedAt_JsonNullable(JsonNullable completedAt) { + this.completedAt = completedAt; + } + + public void setCompletedAt(OffsetDateTime completedAt) { + this.completedAt = JsonNullable.of(completedAt); + } + + public LLMObsPatternsTopicsWithClusteredPointsResponseAttributes configId(String configId) { + this.configId = configId; + return this; + } + + /** + * Identifier of the configuration that produced the run. + * + * @return configId + */ + @JsonProperty(JSON_PROPERTY_CONFIG_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getConfigId() { + return configId; + } + + public void setConfigId(String configId) { + this.configId = configId; + } + + public LLMObsPatternsTopicsWithClusteredPointsResponseAttributes configSnapshot( + LLMObsPatternsConfigSnapshot configSnapshot) { + this.configSnapshot = configSnapshot; + this.unparsed |= configSnapshot.unparsed; + return this; + } + + /** + * Snapshot of the configuration used for a patterns run. + * + * @return configSnapshot + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIG_SNAPSHOT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public LLMObsPatternsConfigSnapshot getConfigSnapshot() { + return configSnapshot; + } + + public void setConfigSnapshot(LLMObsPatternsConfigSnapshot configSnapshot) { + this.configSnapshot = configSnapshot; + } + + public LLMObsPatternsTopicsWithClusteredPointsResponseAttributes createdAt( + OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp when the run was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public LLMObsPatternsTopicsWithClusteredPointsResponseAttributes previousRunId( + String previousRunId) { + this.previousRunId = previousRunId; + return this; + } + + /** + * Identifier of the run that completed immediately before this one. Empty if none. + * + * @return previousRunId + */ + @JsonProperty(JSON_PROPERTY_PREVIOUS_RUN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPreviousRunId() { + return previousRunId; + } + + public void setPreviousRunId(String previousRunId) { + this.previousRunId = previousRunId; + } + + public LLMObsPatternsTopicsWithClusteredPointsResponseAttributes runId(String runId) { + this.runId = runId; + return this; + } + + /** + * Identifier of the run that produced the topics. + * + * @return runId + */ + @JsonProperty(JSON_PROPERTY_RUN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRunId() { + return runId; + } + + public void setRunId(String runId) { + this.runId = runId; + } + + public LLMObsPatternsTopicsWithClusteredPointsResponseAttributes topics( + List topics) { + this.topics = topics; + for (LLMObsPatternsTopicWithClusteredPoints item : topics) { + this.unparsed |= item.unparsed; + } + return this; + } + + public LLMObsPatternsTopicsWithClusteredPointsResponseAttributes addTopicsItem( + LLMObsPatternsTopicWithClusteredPoints topicsItem) { + this.topics.add(topicsItem); + this.unparsed |= topicsItem.unparsed; + return this; + } + + /** + * List of discovered topics with their clustered points. + * + * @return topics + */ + @JsonProperty(JSON_PROPERTY_TOPICS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTopics() { + return topics; + } + + public void setTopics(List topics) { + this.topics = topics; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsTopicsWithClusteredPointsResponseAttributes + */ + @JsonAnySetter + public LLMObsPatternsTopicsWithClusteredPointsResponseAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this LLMObsPatternsTopicsWithClusteredPointsResponseAttributes object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsTopicsWithClusteredPointsResponseAttributes + llmObsPatternsTopicsWithClusteredPointsResponseAttributes = + (LLMObsPatternsTopicsWithClusteredPointsResponseAttributes) o; + return Objects.equals( + this.completedAt, llmObsPatternsTopicsWithClusteredPointsResponseAttributes.completedAt) + && Objects.equals( + this.configId, llmObsPatternsTopicsWithClusteredPointsResponseAttributes.configId) + && Objects.equals( + this.configSnapshot, + llmObsPatternsTopicsWithClusteredPointsResponseAttributes.configSnapshot) + && Objects.equals( + this.createdAt, llmObsPatternsTopicsWithClusteredPointsResponseAttributes.createdAt) + && Objects.equals( + this.previousRunId, + llmObsPatternsTopicsWithClusteredPointsResponseAttributes.previousRunId) + && Objects.equals( + this.runId, llmObsPatternsTopicsWithClusteredPointsResponseAttributes.runId) + && Objects.equals( + this.topics, llmObsPatternsTopicsWithClusteredPointsResponseAttributes.topics) + && Objects.equals( + this.additionalProperties, + llmObsPatternsTopicsWithClusteredPointsResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + completedAt, + configId, + configSnapshot, + createdAt, + previousRunId, + runId, + topics, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsTopicsWithClusteredPointsResponseAttributes {\n"); + sb.append(" completedAt: ").append(toIndentedString(completedAt)).append("\n"); + sb.append(" configId: ").append(toIndentedString(configId)).append("\n"); + sb.append(" configSnapshot: ").append(toIndentedString(configSnapshot)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" previousRunId: ").append(toIndentedString(previousRunId)).append("\n"); + sb.append(" runId: ").append(toIndentedString(runId)).append("\n"); + sb.append(" topics: ").append(toIndentedString(topics)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsWithClusteredPointsResponseData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsWithClusteredPointsResponseData.java new file mode 100644 index 00000000000..66189fc4f85 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsWithClusteredPointsResponseData.java @@ -0,0 +1,220 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object of an LLM Observability patterns topics-with-clustered-points response. */ +@JsonPropertyOrder({ + LLMObsPatternsTopicsWithClusteredPointsResponseData.JSON_PROPERTY_ATTRIBUTES, + LLMObsPatternsTopicsWithClusteredPointsResponseData.JSON_PROPERTY_ID, + LLMObsPatternsTopicsWithClusteredPointsResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsTopicsWithClusteredPointsResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsPatternsTopicsWithClusteredPointsResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPatternsTopicsWithClusteredPointsType type; + + public LLMObsPatternsTopicsWithClusteredPointsResponseData() {} + + @JsonCreator + public LLMObsPatternsTopicsWithClusteredPointsResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsPatternsTopicsWithClusteredPointsResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + LLMObsPatternsTopicsWithClusteredPointsType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsPatternsTopicsWithClusteredPointsResponseData attributes( + LLMObsPatternsTopicsWithClusteredPointsResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an LLM Observability patterns topics-with-clustered-points response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsTopicsWithClusteredPointsResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsPatternsTopicsWithClusteredPointsResponseAttributes attributes) { + this.attributes = attributes; + } + + public LLMObsPatternsTopicsWithClusteredPointsResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Identifier of the run the topics belong to. + * + * @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 LLMObsPatternsTopicsWithClusteredPointsResponseData type( + LLMObsPatternsTopicsWithClusteredPointsType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type of an LLM Observability patterns topics-with-clustered-points response. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsTopicsWithClusteredPointsType getType() { + return type; + } + + public void setType(LLMObsPatternsTopicsWithClusteredPointsType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsTopicsWithClusteredPointsResponseData + */ + @JsonAnySetter + public LLMObsPatternsTopicsWithClusteredPointsResponseData putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this LLMObsPatternsTopicsWithClusteredPointsResponseData object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsTopicsWithClusteredPointsResponseData + llmObsPatternsTopicsWithClusteredPointsResponseData = + (LLMObsPatternsTopicsWithClusteredPointsResponseData) o; + return Objects.equals( + this.attributes, llmObsPatternsTopicsWithClusteredPointsResponseData.attributes) + && Objects.equals(this.id, llmObsPatternsTopicsWithClusteredPointsResponseData.id) + && Objects.equals(this.type, llmObsPatternsTopicsWithClusteredPointsResponseData.type) + && Objects.equals( + this.additionalProperties, + llmObsPatternsTopicsWithClusteredPointsResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsTopicsWithClusteredPointsResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsWithClusteredPointsType.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsWithClusteredPointsType.java new file mode 100644 index 00000000000..7e533ed5701 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTopicsWithClusteredPointsType.java @@ -0,0 +1,65 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Resource type of an LLM Observability patterns topics-with-clustered-points response. */ +@JsonSerialize( + using = + LLMObsPatternsTopicsWithClusteredPointsType + .LLMObsPatternsTopicsWithClusteredPointsTypeSerializer.class) +public class LLMObsPatternsTopicsWithClusteredPointsType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("get_topics_with_cluster_points_response")); + + public static final LLMObsPatternsTopicsWithClusteredPointsType + GET_TOPICS_WITH_CLUSTER_POINTS_RESPONSE = + new LLMObsPatternsTopicsWithClusteredPointsType( + "get_topics_with_cluster_points_response"); + + LLMObsPatternsTopicsWithClusteredPointsType(String value) { + super(value, allowedValues); + } + + public static class LLMObsPatternsTopicsWithClusteredPointsTypeSerializer + extends StdSerializer { + public LLMObsPatternsTopicsWithClusteredPointsTypeSerializer( + Class t) { + super(t); + } + + public LLMObsPatternsTopicsWithClusteredPointsTypeSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsPatternsTopicsWithClusteredPointsType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LLMObsPatternsTopicsWithClusteredPointsType fromValue(String value) { + return new LLMObsPatternsTopicsWithClusteredPointsType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerRequest.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerRequest.java new file mode 100644 index 00000000000..1573e1b14cf --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerRequest.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to trigger an LLM Observability patterns run. */ +@JsonPropertyOrder({LLMObsPatternsTriggerRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsTriggerRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsPatternsTriggerRequestData data; + + public LLMObsPatternsTriggerRequest() {} + + @JsonCreator + public LLMObsPatternsTriggerRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + LLMObsPatternsTriggerRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsPatternsTriggerRequest data(LLMObsPatternsTriggerRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for triggering an LLM Observability patterns run. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsTriggerRequestData getData() { + return data; + } + + public void setData(LLMObsPatternsTriggerRequestData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsTriggerRequest + */ + @JsonAnySetter + public LLMObsPatternsTriggerRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsTriggerRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsTriggerRequest llmObsPatternsTriggerRequest = (LLMObsPatternsTriggerRequest) o; + return Objects.equals(this.data, llmObsPatternsTriggerRequest.data) + && Objects.equals( + this.additionalProperties, llmObsPatternsTriggerRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsTriggerRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerRequestAttributes.java new file mode 100644 index 00000000000..1ea5200a4d2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerRequestAttributes.java @@ -0,0 +1,145 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes for triggering an LLM Observability patterns run. */ +@JsonPropertyOrder({LLMObsPatternsTriggerRequestAttributes.JSON_PROPERTY_CONFIG_ID}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsTriggerRequestAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONFIG_ID = "config_id"; + private String configId; + + public LLMObsPatternsTriggerRequestAttributes() {} + + @JsonCreator + public LLMObsPatternsTriggerRequestAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CONFIG_ID) String configId) { + this.configId = configId; + } + + public LLMObsPatternsTriggerRequestAttributes configId(String configId) { + this.configId = configId; + return this; + } + + /** + * The ID of the patterns configuration to run. + * + * @return configId + */ + @JsonProperty(JSON_PROPERTY_CONFIG_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getConfigId() { + return configId; + } + + public void setConfigId(String configId) { + this.configId = configId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsTriggerRequestAttributes + */ + @JsonAnySetter + public LLMObsPatternsTriggerRequestAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsTriggerRequestAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsTriggerRequestAttributes llmObsPatternsTriggerRequestAttributes = + (LLMObsPatternsTriggerRequestAttributes) o; + return Objects.equals(this.configId, llmObsPatternsTriggerRequestAttributes.configId) + && Objects.equals( + this.additionalProperties, llmObsPatternsTriggerRequestAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(configId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsTriggerRequestAttributes {\n"); + sb.append(" configId: ").append(toIndentedString(configId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerRequestData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerRequestData.java new file mode 100644 index 00000000000..0d5a7b401cb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerRequestData.java @@ -0,0 +1,184 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object for triggering an LLM Observability patterns run. */ +@JsonPropertyOrder({ + LLMObsPatternsTriggerRequestData.JSON_PROPERTY_ATTRIBUTES, + LLMObsPatternsTriggerRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsTriggerRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsPatternsTriggerRequestAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPatternsRequestType type; + + public LLMObsPatternsTriggerRequestData() {} + + @JsonCreator + public LLMObsPatternsTriggerRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsPatternsTriggerRequestAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LLMObsPatternsRequestType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsPatternsTriggerRequestData attributes( + LLMObsPatternsTriggerRequestAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for triggering an LLM Observability patterns run. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsTriggerRequestAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsPatternsTriggerRequestAttributes attributes) { + this.attributes = attributes; + } + + public LLMObsPatternsTriggerRequestData type(LLMObsPatternsRequestType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type for triggering an LLM Observability patterns run. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsRequestType getType() { + return type; + } + + public void setType(LLMObsPatternsRequestType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsTriggerRequestData + */ + @JsonAnySetter + public LLMObsPatternsTriggerRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsTriggerRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsTriggerRequestData llmObsPatternsTriggerRequestData = + (LLMObsPatternsTriggerRequestData) o; + return Objects.equals(this.attributes, llmObsPatternsTriggerRequestData.attributes) + && Objects.equals(this.type, llmObsPatternsTriggerRequestData.type) + && Objects.equals( + this.additionalProperties, llmObsPatternsTriggerRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsTriggerRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerResponse.java new file mode 100644 index 00000000000..dda77e8a286 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerResponse.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response after triggering an LLM Observability patterns run. */ +@JsonPropertyOrder({LLMObsPatternsTriggerResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsTriggerResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsPatternsTriggerResponseData data; + + public LLMObsPatternsTriggerResponse() {} + + @JsonCreator + public LLMObsPatternsTriggerResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + LLMObsPatternsTriggerResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsPatternsTriggerResponse data(LLMObsPatternsTriggerResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object of an LLM Observability patterns trigger response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsTriggerResponseData getData() { + return data; + } + + public void setData(LLMObsPatternsTriggerResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsTriggerResponse + */ + @JsonAnySetter + public LLMObsPatternsTriggerResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsTriggerResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsTriggerResponse llmObsPatternsTriggerResponse = (LLMObsPatternsTriggerResponse) o; + return Objects.equals(this.data, llmObsPatternsTriggerResponse.data) + && Objects.equals( + this.additionalProperties, llmObsPatternsTriggerResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsTriggerResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerResponseAttributes.java new file mode 100644 index 00000000000..71ddabd68e4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerResponseAttributes.java @@ -0,0 +1,204 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of an LLM Observability patterns trigger response. */ +@JsonPropertyOrder({ + LLMObsPatternsTriggerResponseAttributes.JSON_PROPERTY_CONFIG_ID, + LLMObsPatternsTriggerResponseAttributes.JSON_PROPERTY_RUN_ID, + LLMObsPatternsTriggerResponseAttributes.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsTriggerResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONFIG_ID = "config_id"; + private String configId; + + public static final String JSON_PROPERTY_RUN_ID = "run_id"; + private String runId; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public LLMObsPatternsTriggerResponseAttributes() {} + + @JsonCreator + public LLMObsPatternsTriggerResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CONFIG_ID) String configId, + @JsonProperty(required = true, value = JSON_PROPERTY_RUN_ID) String runId, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) String status) { + this.configId = configId; + this.runId = runId; + this.status = status; + } + + public LLMObsPatternsTriggerResponseAttributes configId(String configId) { + this.configId = configId; + return this; + } + + /** + * The ID of the patterns configuration that was run. + * + * @return configId + */ + @JsonProperty(JSON_PROPERTY_CONFIG_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getConfigId() { + return configId; + } + + public void setConfigId(String configId) { + this.configId = configId; + } + + public LLMObsPatternsTriggerResponseAttributes runId(String runId) { + this.runId = runId; + return this; + } + + /** + * The ID of the patterns run that was started. + * + * @return runId + */ + @JsonProperty(JSON_PROPERTY_RUN_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRunId() { + return runId; + } + + public void setRunId(String runId) { + this.runId = runId; + } + + public LLMObsPatternsTriggerResponseAttributes status(String status) { + this.status = status; + return this; + } + + /** + * Status of the patterns run. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsTriggerResponseAttributes + */ + @JsonAnySetter + public LLMObsPatternsTriggerResponseAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsTriggerResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsTriggerResponseAttributes llmObsPatternsTriggerResponseAttributes = + (LLMObsPatternsTriggerResponseAttributes) o; + return Objects.equals(this.configId, llmObsPatternsTriggerResponseAttributes.configId) + && Objects.equals(this.runId, llmObsPatternsTriggerResponseAttributes.runId) + && Objects.equals(this.status, llmObsPatternsTriggerResponseAttributes.status) + && Objects.equals( + this.additionalProperties, + llmObsPatternsTriggerResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(configId, runId, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsTriggerResponseAttributes {\n"); + sb.append(" configId: ").append(toIndentedString(configId)).append("\n"); + sb.append(" runId: ").append(toIndentedString(runId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerResponseData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerResponseData.java new file mode 100644 index 00000000000..e79befb15b7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerResponseData.java @@ -0,0 +1,213 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object of an LLM Observability patterns trigger response. */ +@JsonPropertyOrder({ + LLMObsPatternsTriggerResponseData.JSON_PROPERTY_ATTRIBUTES, + LLMObsPatternsTriggerResponseData.JSON_PROPERTY_ID, + LLMObsPatternsTriggerResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPatternsTriggerResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsPatternsTriggerResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPatternsTriggerResponseType type; + + public LLMObsPatternsTriggerResponseData() {} + + @JsonCreator + public LLMObsPatternsTriggerResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsPatternsTriggerResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + LLMObsPatternsTriggerResponseType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsPatternsTriggerResponseData attributes( + LLMObsPatternsTriggerResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an LLM Observability patterns trigger response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsTriggerResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsPatternsTriggerResponseAttributes attributes) { + this.attributes = attributes; + } + + public LLMObsPatternsTriggerResponseData id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the patterns configuration that was run. + * + * @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 LLMObsPatternsTriggerResponseData type(LLMObsPatternsTriggerResponseType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type of an LLM Observability patterns trigger response. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPatternsTriggerResponseType getType() { + return type; + } + + public void setType(LLMObsPatternsTriggerResponseType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPatternsTriggerResponseData + */ + @JsonAnySetter + public LLMObsPatternsTriggerResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPatternsTriggerResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPatternsTriggerResponseData llmObsPatternsTriggerResponseData = + (LLMObsPatternsTriggerResponseData) o; + return Objects.equals(this.attributes, llmObsPatternsTriggerResponseData.attributes) + && Objects.equals(this.id, llmObsPatternsTriggerResponseData.id) + && Objects.equals(this.type, llmObsPatternsTriggerResponseData.type) + && Objects.equals( + this.additionalProperties, llmObsPatternsTriggerResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPatternsTriggerResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerResponseType.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerResponseType.java new file mode 100644 index 00000000000..63f7c52d6d0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPatternsTriggerResponseType.java @@ -0,0 +1,58 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Resource type of an LLM Observability patterns trigger response. */ +@JsonSerialize( + using = LLMObsPatternsTriggerResponseType.LLMObsPatternsTriggerResponseTypeSerializer.class) +public class LLMObsPatternsTriggerResponseType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("topic_discovery_run")); + + public static final LLMObsPatternsTriggerResponseType TOPIC_DISCOVERY_RUN = + new LLMObsPatternsTriggerResponseType("topic_discovery_run"); + + LLMObsPatternsTriggerResponseType(String value) { + super(value, allowedValues); + } + + public static class LLMObsPatternsTriggerResponseTypeSerializer + extends StdSerializer { + public LLMObsPatternsTriggerResponseTypeSerializer(Class t) { + super(t); + } + + public LLMObsPatternsTriggerResponseTypeSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsPatternsTriggerResponseType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LLMObsPatternsTriggerResponseType fromValue(String value) { + return new LLMObsPatternsTriggerResponseType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsUpsertAnnotationItem.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsUpsertAnnotationItem.java new file mode 100644 index 00000000000..0818f87eff5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsUpsertAnnotationItem.java @@ -0,0 +1,190 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A single annotation to create or update. The annotation is matched by interaction_id + * and the requesting user's identity. + */ +@JsonPropertyOrder({ + LLMObsUpsertAnnotationItem.JSON_PROPERTY_INTERACTION_ID, + LLMObsUpsertAnnotationItem.JSON_PROPERTY_LABEL_VALUES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsUpsertAnnotationItem { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INTERACTION_ID = "interaction_id"; + private String interactionId; + + public static final String JSON_PROPERTY_LABEL_VALUES = "label_values"; + private List labelValues = new ArrayList<>(); + + public LLMObsUpsertAnnotationItem() {} + + @JsonCreator + public LLMObsUpsertAnnotationItem( + @JsonProperty(required = true, value = JSON_PROPERTY_INTERACTION_ID) String interactionId, + @JsonProperty(required = true, value = JSON_PROPERTY_LABEL_VALUES) + List labelValues) { + this.interactionId = interactionId; + this.labelValues = labelValues; + } + + public LLMObsUpsertAnnotationItem interactionId(String interactionId) { + this.interactionId = interactionId; + return this; + } + + /** + * ID of the interaction to annotate. + * + * @return interactionId + */ + @JsonProperty(JSON_PROPERTY_INTERACTION_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getInteractionId() { + return interactionId; + } + + public void setInteractionId(String interactionId) { + this.interactionId = interactionId; + } + + public LLMObsUpsertAnnotationItem labelValues(List labelValues) { + this.labelValues = labelValues; + for (LLMObsAnnotationLabelValue item : labelValues) { + this.unparsed |= item.unparsed; + } + return this; + } + + public LLMObsUpsertAnnotationItem addLabelValuesItem(LLMObsAnnotationLabelValue labelValuesItem) { + this.labelValues.add(labelValuesItem); + this.unparsed |= labelValuesItem.unparsed; + return this; + } + + /** + * Label values for this annotation. Each entry references a label schema by ID and provides the + * corresponding value validated against the schema type constraints. + * + * @return labelValues + */ + @JsonProperty(JSON_PROPERTY_LABEL_VALUES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getLabelValues() { + return labelValues; + } + + public void setLabelValues(List labelValues) { + this.labelValues = labelValues; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsUpsertAnnotationItem + */ + @JsonAnySetter + public LLMObsUpsertAnnotationItem putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsUpsertAnnotationItem object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsUpsertAnnotationItem llmObsUpsertAnnotationItem = (LLMObsUpsertAnnotationItem) o; + return Objects.equals(this.interactionId, llmObsUpsertAnnotationItem.interactionId) + && Objects.equals(this.labelValues, llmObsUpsertAnnotationItem.labelValues) + && Objects.equals( + this.additionalProperties, llmObsUpsertAnnotationItem.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(interactionId, labelValues, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsUpsertAnnotationItem {\n"); + sb.append(" interactionId: ").append(toIndentedString(interactionId)).append("\n"); + sb.append(" labelValues: ").append(toIndentedString(labelValues)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LatestVersionMatchPolicy.java b/src/main/java/com/datadog/api/client/v2/model/LatestVersionMatchPolicy.java new file mode 100644 index 00000000000..23105a4908b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LatestVersionMatchPolicy.java @@ -0,0 +1,58 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The policy for matching the latest form version during an upsert operation. */ +@JsonSerialize(using = LatestVersionMatchPolicy.LatestVersionMatchPolicySerializer.class) +public class LatestVersionMatchPolicy extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("none", "if_etag_match")); + + public static final LatestVersionMatchPolicy NONE = new LatestVersionMatchPolicy("none"); + public static final LatestVersionMatchPolicy IF_ETAG_MATCH = + new LatestVersionMatchPolicy("if_etag_match"); + + LatestVersionMatchPolicy(String value) { + super(value, allowedValues); + } + + public static class LatestVersionMatchPolicySerializer + extends StdSerializer { + public LatestVersionMatchPolicySerializer(Class t) { + super(t); + } + + public LatestVersionMatchPolicySerializer() { + this(null); + } + + @Override + public void serialize( + LatestVersionMatchPolicy value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LatestVersionMatchPolicy fromValue(String value) { + return new LatestVersionMatchPolicy(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LicensesListResponse.java b/src/main/java/com/datadog/api/client/v2/model/LicensesListResponse.java new file mode 100644 index 00000000000..3b61cc3ea92 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LicensesListResponse.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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * The top-level response object returned by the licenses list endpoint, containing the array of + * supported SPDX licenses. + */ +@JsonPropertyOrder({LicensesListResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LicensesListResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LicensesListResponseData data; + + public LicensesListResponse() {} + + @JsonCreator + public LicensesListResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) LicensesListResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LicensesListResponse data(LicensesListResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data object in a licenses list response, containing the list of SPDX licenses. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LicensesListResponseData getData() { + return data; + } + + public void setData(LicensesListResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LicensesListResponse + */ + @JsonAnySetter + public LicensesListResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LicensesListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LicensesListResponse licensesListResponse = (LicensesListResponse) o; + return Objects.equals(this.data, licensesListResponse.data) + && Objects.equals(this.additionalProperties, licensesListResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LicensesListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LicensesListResponseData.java b/src/main/java/com/datadog/api/client/v2/model/LicensesListResponseData.java new file mode 100644 index 00000000000..d401e877cca --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LicensesListResponseData.java @@ -0,0 +1,210 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The data object in a licenses list response, containing the list of SPDX licenses. */ +@JsonPropertyOrder({ + LicensesListResponseData.JSON_PROPERTY_ATTRIBUTES, + LicensesListResponseData.JSON_PROPERTY_ID, + LicensesListResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LicensesListResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LicensesListResponseDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LicensesListResponseDataType type = LicensesListResponseDataType.LICENSEREQUEST; + + public LicensesListResponseData() {} + + @JsonCreator + public LicensesListResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LicensesListResponseDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + LicensesListResponseDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LicensesListResponseData attributes(LicensesListResponseDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The attributes of the licenses list response, containing the array of SPDX licenses. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LicensesListResponseDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LicensesListResponseDataAttributes attributes) { + this.attributes = attributes; + } + + public LicensesListResponseData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier for this licenses list response. + * + * @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 LicensesListResponseData type(LicensesListResponseDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type identifier for license list responses. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LicensesListResponseDataType getType() { + return type; + } + + public void setType(LicensesListResponseDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LicensesListResponseData + */ + @JsonAnySetter + public LicensesListResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LicensesListResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LicensesListResponseData licensesListResponseData = (LicensesListResponseData) o; + return Objects.equals(this.attributes, licensesListResponseData.attributes) + && Objects.equals(this.id, licensesListResponseData.id) + && Objects.equals(this.type, licensesListResponseData.type) + && Objects.equals(this.additionalProperties, licensesListResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LicensesListResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LicensesListResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LicensesListResponseDataAttributes.java new file mode 100644 index 00000000000..d8f70f8d4e0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LicensesListResponseDataAttributes.java @@ -0,0 +1,159 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The attributes of the licenses list response, containing the array of SPDX licenses. */ +@JsonPropertyOrder({LicensesListResponseDataAttributes.JSON_PROPERTY_LICENSES}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LicensesListResponseDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_LICENSES = "licenses"; + private List licenses = new ArrayList<>(); + + public LicensesListResponseDataAttributes() {} + + @JsonCreator + public LicensesListResponseDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_LICENSES) + List licenses) { + this.licenses = licenses; + } + + public LicensesListResponseDataAttributes licenses( + List licenses) { + this.licenses = licenses; + for (LicensesListResponseDataAttributesLicensesItems item : licenses) { + this.unparsed |= item.unparsed; + } + return this; + } + + public LicensesListResponseDataAttributes addLicensesItem( + LicensesListResponseDataAttributesLicensesItems licensesItem) { + this.licenses.add(licensesItem); + this.unparsed |= licensesItem.unparsed; + return this; + } + + /** + * The list of SPDX licenses returned by the API. + * + * @return licenses + */ + @JsonProperty(JSON_PROPERTY_LICENSES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getLicenses() { + return licenses; + } + + public void setLicenses(List licenses) { + this.licenses = licenses; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LicensesListResponseDataAttributes + */ + @JsonAnySetter + public LicensesListResponseDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LicensesListResponseDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LicensesListResponseDataAttributes licensesListResponseDataAttributes = + (LicensesListResponseDataAttributes) o; + return Objects.equals(this.licenses, licensesListResponseDataAttributes.licenses) + && Objects.equals( + this.additionalProperties, licensesListResponseDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(licenses, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LicensesListResponseDataAttributes {\n"); + sb.append(" licenses: ").append(toIndentedString(licenses)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LicensesListResponseDataAttributesLicensesItems.java b/src/main/java/com/datadog/api/client/v2/model/LicensesListResponseDataAttributesLicensesItems.java new file mode 100644 index 00000000000..4ca362c0f99 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LicensesListResponseDataAttributesLicensesItems.java @@ -0,0 +1,208 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** An SPDX license entry returned by the licenses list endpoint. */ +@JsonPropertyOrder({ + LicensesListResponseDataAttributesLicensesItems.JSON_PROPERTY_DISPLAY_NAME, + LicensesListResponseDataAttributesLicensesItems.JSON_PROPERTY_IDENTIFIER, + LicensesListResponseDataAttributesLicensesItems.JSON_PROPERTY_SHORT_NAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LicensesListResponseDataAttributesLicensesItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DISPLAY_NAME = "display_name"; + private String displayName; + + public static final String JSON_PROPERTY_IDENTIFIER = "identifier"; + private String identifier; + + public static final String JSON_PROPERTY_SHORT_NAME = "short_name"; + private String shortName; + + public LicensesListResponseDataAttributesLicensesItems() {} + + @JsonCreator + public LicensesListResponseDataAttributesLicensesItems( + @JsonProperty(required = true, value = JSON_PROPERTY_DISPLAY_NAME) String displayName, + @JsonProperty(required = true, value = JSON_PROPERTY_IDENTIFIER) String identifier, + @JsonProperty(required = true, value = JSON_PROPERTY_SHORT_NAME) String shortName) { + this.displayName = displayName; + this.identifier = identifier; + this.shortName = shortName; + } + + public LicensesListResponseDataAttributesLicensesItems displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * The human-readable name of the license. + * + * @return displayName + */ + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + public LicensesListResponseDataAttributesLicensesItems identifier(String identifier) { + this.identifier = identifier; + return this; + } + + /** + * The SPDX identifier of the license. + * + * @return identifier + */ + @JsonProperty(JSON_PROPERTY_IDENTIFIER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(String identifier) { + this.identifier = identifier; + } + + public LicensesListResponseDataAttributesLicensesItems shortName(String shortName) { + this.shortName = shortName; + return this; + } + + /** + * The short name of the license, typically matching the SPDX identifier. + * + * @return shortName + */ + @JsonProperty(JSON_PROPERTY_SHORT_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getShortName() { + return shortName; + } + + public void setShortName(String shortName) { + this.shortName = shortName; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LicensesListResponseDataAttributesLicensesItems + */ + @JsonAnySetter + public LicensesListResponseDataAttributesLicensesItems putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LicensesListResponseDataAttributesLicensesItems object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LicensesListResponseDataAttributesLicensesItems + licensesListResponseDataAttributesLicensesItems = + (LicensesListResponseDataAttributesLicensesItems) o; + return Objects.equals( + this.displayName, licensesListResponseDataAttributesLicensesItems.displayName) + && Objects.equals( + this.identifier, licensesListResponseDataAttributesLicensesItems.identifier) + && Objects.equals(this.shortName, licensesListResponseDataAttributesLicensesItems.shortName) + && Objects.equals( + this.additionalProperties, + licensesListResponseDataAttributesLicensesItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(displayName, identifier, shortName, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LicensesListResponseDataAttributesLicensesItems {\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" identifier: ").append(toIndentedString(identifier)).append("\n"); + sb.append(" shortName: ").append(toIndentedString(shortName)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LicensesListResponseDataType.java b/src/main/java/com/datadog/api/client/v2/model/LicensesListResponseDataType.java new file mode 100644 index 00000000000..5b3355e2bdb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LicensesListResponseDataType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The type identifier for license list responses. */ +@JsonSerialize(using = LicensesListResponseDataType.LicensesListResponseDataTypeSerializer.class) +public class LicensesListResponseDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("licenserequest")); + + public static final LicensesListResponseDataType LICENSEREQUEST = + new LicensesListResponseDataType("licenserequest"); + + LicensesListResponseDataType(String value) { + super(value, allowedValues); + } + + public static class LicensesListResponseDataTypeSerializer + extends StdSerializer { + public LicensesListResponseDataTypeSerializer(Class t) { + super(t); + } + + public LicensesListResponseDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + LicensesListResponseDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LicensesListResponseDataType fromValue(String value) { + return new LicensesListResponseDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ListSharedDashboardsResponse.java b/src/main/java/com/datadog/api/client/v2/model/ListSharedDashboardsResponse.java new file mode 100644 index 00000000000..c5150145992 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ListSharedDashboardsResponse.java @@ -0,0 +1,195 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing shared dashboards for a dashboard. */ +@JsonPropertyOrder({ + ListSharedDashboardsResponse.JSON_PROPERTY_DATA, + ListSharedDashboardsResponse.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ListSharedDashboardsResponse { + @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 = new ArrayList<>(); + + public ListSharedDashboardsResponse() {} + + @JsonCreator + public ListSharedDashboardsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data, + @JsonProperty(required = true, value = JSON_PROPERTY_INCLUDED) + List included) { + this.data = data; + this.included = included; + } + + public ListSharedDashboardsResponse data(List data) { + this.data = data; + for (SharedDashboardResponse item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ListSharedDashboardsResponse addDataItem(SharedDashboardResponse dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Shared dashboards for the dashboard. + * + * @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 ListSharedDashboardsResponse included(List included) { + this.included = included; + for (SharedDashboardIncluded item : included) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ListSharedDashboardsResponse addIncludedItem(SharedDashboardIncluded includedItem) { + this.included.add(includedItem); + this.unparsed |= includedItem.unparsed; + return this; + } + + /** + * Users and dashboards related to the shared dashboards. + * + * @return included + */ + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getIncluded() { + return included; + } + + public void setIncluded(List included) { + this.included = included; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ListSharedDashboardsResponse + */ + @JsonAnySetter + public ListSharedDashboardsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ListSharedDashboardsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListSharedDashboardsResponse listSharedDashboardsResponse = (ListSharedDashboardsResponse) o; + return Objects.equals(this.data, listSharedDashboardsResponse.data) + && Objects.equals(this.included, listSharedDashboardsResponse.included) + && Objects.equals( + this.additionalProperties, listSharedDashboardsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListSharedDashboardsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ListSourcemapsResponse.java b/src/main/java/com/datadog/api/client/v2/model/ListSourcemapsResponse.java new file mode 100644 index 00000000000..7cc37b7e102 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ListSourcemapsResponse.java @@ -0,0 +1,184 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing a paginated list of source maps. */ +@JsonPropertyOrder({ + ListSourcemapsResponse.JSON_PROPERTY_DATA, + ListSourcemapsResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ListSourcemapsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public static final String JSON_PROPERTY_META = "meta"; + private SourcemapsListMeta meta; + + public ListSourcemapsResponse() {} + + @JsonCreator + public ListSourcemapsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) { + this.data = data; + } + + public ListSourcemapsResponse data(List data) { + this.data = data; + for (SourcemapItem item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ListSourcemapsResponse addDataItem(SourcemapItem dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of source map data objects. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public ListSourcemapsResponse meta(SourcemapsListMeta meta) { + this.meta = meta; + this.unparsed |= meta.unparsed; + return this; + } + + /** + * Pagination metadata for the source maps list response. + * + * @return meta + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SourcemapsListMeta getMeta() { + return meta; + } + + public void setMeta(SourcemapsListMeta meta) { + this.meta = meta; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ListSourcemapsResponse + */ + @JsonAnySetter + public ListSourcemapsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ListSourcemapsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListSourcemapsResponse listSourcemapsResponse = (ListSourcemapsResponse) o; + return Objects.equals(this.data, listSourcemapsResponse.data) + && Objects.equals(this.meta, listSourcemapsResponse.meta) + && Objects.equals(this.additionalProperties, listSourcemapsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListSourcemapsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveAttributes.java index f17c5ecef85..62bab9e112f 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 @@ -25,7 +25,9 @@ LogsArchiveAttributes.JSON_PROPERTY_COMPRESSION_METHOD, LogsArchiveAttributes.JSON_PROPERTY_DESTINATION, LogsArchiveAttributes.JSON_PROPERTY_INCLUDE_TAGS, + LogsArchiveAttributes.JSON_PROPERTY_LOOKUP_ATTRIBUTES, LogsArchiveAttributes.JSON_PROPERTY_NAME, + LogsArchiveAttributes.JSON_PROPERTY_PARTITIONING_ATTRIBUTES, LogsArchiveAttributes.JSON_PROPERTY_QUERY, LogsArchiveAttributes.JSON_PROPERTY_REHYDRATION_MAX_SCAN_SIZE_IN_GB, LogsArchiveAttributes.JSON_PROPERTY_REHYDRATION_TAGS, @@ -45,9 +47,15 @@ public class LogsArchiveAttributes { public static final String JSON_PROPERTY_INCLUDE_TAGS = "include_tags"; private Boolean includeTags = false; + public static final String JSON_PROPERTY_LOOKUP_ATTRIBUTES = "lookup_attributes"; + private List lookupAttributes = null; + public static final String JSON_PROPERTY_NAME = "name"; private String name; + public static final String JSON_PROPERTY_PARTITIONING_ATTRIBUTES = "partitioning_attributes"; + private List partitioningAttributes = null; + public static final String JSON_PROPERTY_QUERY = "query"; private String query; @@ -149,6 +157,35 @@ public void setIncludeTags(Boolean includeTags) { this.includeTags = includeTags; } + public LogsArchiveAttributes lookupAttributes(List lookupAttributes) { + this.lookupAttributes = lookupAttributes; + return this; + } + + public LogsArchiveAttributes addLookupAttributesItem(String lookupAttributesItem) { + if (this.lookupAttributes == null) { + this.lookupAttributes = new ArrayList<>(); + } + this.lookupAttributes.add(lookupAttributesItem); + return this; + } + + /** + * An array of attributes to use as lookup keys for the archive. + * + * @return lookupAttributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOOKUP_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getLookupAttributes() { + return lookupAttributes; + } + + public void setLookupAttributes(List lookupAttributes) { + this.lookupAttributes = lookupAttributes; + } + public LogsArchiveAttributes name(String name) { this.name = name; return this; @@ -169,6 +206,36 @@ public void setName(String name) { this.name = name; } + public LogsArchiveAttributes partitioningAttributes(List partitioningAttributes) { + this.partitioningAttributes = partitioningAttributes; + return this; + } + + public LogsArchiveAttributes addPartitioningAttributesItem(String partitioningAttributesItem) { + if (this.partitioningAttributes == null) { + this.partitioningAttributes = new ArrayList<>(); + } + this.partitioningAttributes.add(partitioningAttributesItem); + return this; + } + + /** + * An array of attributes to use as partition keys for the archive. The attribute used most + * frequently for querying should be first. + * + * @return partitioningAttributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PARTITIONING_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getPartitioningAttributes() { + return partitioningAttributes; + } + + public void setPartitioningAttributes(List partitioningAttributes) { + this.partitioningAttributes = partitioningAttributes; + } + public LogsArchiveAttributes query(String query) { this.query = query; return this; @@ -334,7 +401,9 @@ public boolean equals(Object o) { return Objects.equals(this.compressionMethod, logsArchiveAttributes.compressionMethod) && Objects.equals(this.destination, logsArchiveAttributes.destination) && Objects.equals(this.includeTags, logsArchiveAttributes.includeTags) + && Objects.equals(this.lookupAttributes, logsArchiveAttributes.lookupAttributes) && Objects.equals(this.name, logsArchiveAttributes.name) + && Objects.equals(this.partitioningAttributes, logsArchiveAttributes.partitioningAttributes) && Objects.equals(this.query, logsArchiveAttributes.query) && Objects.equals( this.rehydrationMaxScanSizeInGb, logsArchiveAttributes.rehydrationMaxScanSizeInGb) @@ -349,7 +418,9 @@ public int hashCode() { compressionMethod, destination, includeTags, + lookupAttributes, name, + partitioningAttributes, query, rehydrationMaxScanSizeInGb, rehydrationTags, @@ -364,7 +435,11 @@ public String toString() { sb.append(" compressionMethod: ").append(toIndentedString(compressionMethod)).append("\n"); sb.append(" destination: ").append(toIndentedString(destination)).append("\n"); sb.append(" includeTags: ").append(toIndentedString(includeTags)).append("\n"); + sb.append(" lookupAttributes: ").append(toIndentedString(lookupAttributes)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" partitioningAttributes: ") + .append(toIndentedString(partitioningAttributes)) + .append("\n"); sb.append(" query: ").append(toIndentedString(query)).append("\n"); sb.append(" rehydrationMaxScanSizeInGb: ") .append(toIndentedString(rehydrationMaxScanSizeInGb)) 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 852225135df..ca70028d18a 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 @@ -25,7 +25,9 @@ LogsArchiveCreateRequestAttributes.JSON_PROPERTY_COMPRESSION_METHOD, LogsArchiveCreateRequestAttributes.JSON_PROPERTY_DESTINATION, LogsArchiveCreateRequestAttributes.JSON_PROPERTY_INCLUDE_TAGS, + LogsArchiveCreateRequestAttributes.JSON_PROPERTY_LOOKUP_ATTRIBUTES, LogsArchiveCreateRequestAttributes.JSON_PROPERTY_NAME, + LogsArchiveCreateRequestAttributes.JSON_PROPERTY_PARTITIONING_ATTRIBUTES, LogsArchiveCreateRequestAttributes.JSON_PROPERTY_QUERY, LogsArchiveCreateRequestAttributes.JSON_PROPERTY_REHYDRATION_MAX_SCAN_SIZE_IN_GB, LogsArchiveCreateRequestAttributes.JSON_PROPERTY_REHYDRATION_TAGS @@ -44,9 +46,15 @@ public class LogsArchiveCreateRequestAttributes { public static final String JSON_PROPERTY_INCLUDE_TAGS = "include_tags"; private Boolean includeTags = false; + public static final String JSON_PROPERTY_LOOKUP_ATTRIBUTES = "lookup_attributes"; + private List lookupAttributes = null; + public static final String JSON_PROPERTY_NAME = "name"; private String name; + public static final String JSON_PROPERTY_PARTITIONING_ATTRIBUTES = "partitioning_attributes"; + private List partitioningAttributes = null; + public static final String JSON_PROPERTY_QUERY = "query"; private String query; @@ -141,6 +149,35 @@ public void setIncludeTags(Boolean includeTags) { this.includeTags = includeTags; } + public LogsArchiveCreateRequestAttributes lookupAttributes(List lookupAttributes) { + this.lookupAttributes = lookupAttributes; + return this; + } + + public LogsArchiveCreateRequestAttributes addLookupAttributesItem(String lookupAttributesItem) { + if (this.lookupAttributes == null) { + this.lookupAttributes = new ArrayList<>(); + } + this.lookupAttributes.add(lookupAttributesItem); + return this; + } + + /** + * An array of attributes to use as lookup keys for the archive. + * + * @return lookupAttributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOOKUP_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getLookupAttributes() { + return lookupAttributes; + } + + public void setLookupAttributes(List lookupAttributes) { + this.lookupAttributes = lookupAttributes; + } + public LogsArchiveCreateRequestAttributes name(String name) { this.name = name; return this; @@ -161,6 +198,38 @@ public void setName(String name) { this.name = name; } + public LogsArchiveCreateRequestAttributes partitioningAttributes( + List partitioningAttributes) { + this.partitioningAttributes = partitioningAttributes; + return this; + } + + public LogsArchiveCreateRequestAttributes addPartitioningAttributesItem( + String partitioningAttributesItem) { + if (this.partitioningAttributes == null) { + this.partitioningAttributes = new ArrayList<>(); + } + this.partitioningAttributes.add(partitioningAttributesItem); + return this; + } + + /** + * An array of attributes to use as partition keys for the archive. The attribute used most + * frequently for querying should be first. + * + * @return partitioningAttributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PARTITIONING_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getPartitioningAttributes() { + return partitioningAttributes; + } + + public void setPartitioningAttributes(List partitioningAttributes) { + this.partitioningAttributes = partitioningAttributes; + } + public LogsArchiveCreateRequestAttributes query(String query) { this.query = query; return this; @@ -304,7 +373,11 @@ public boolean equals(Object o) { this.compressionMethod, logsArchiveCreateRequestAttributes.compressionMethod) && Objects.equals(this.destination, logsArchiveCreateRequestAttributes.destination) && Objects.equals(this.includeTags, logsArchiveCreateRequestAttributes.includeTags) + && Objects.equals( + this.lookupAttributes, logsArchiveCreateRequestAttributes.lookupAttributes) && Objects.equals(this.name, logsArchiveCreateRequestAttributes.name) + && Objects.equals( + this.partitioningAttributes, logsArchiveCreateRequestAttributes.partitioningAttributes) && Objects.equals(this.query, logsArchiveCreateRequestAttributes.query) && Objects.equals( this.rehydrationMaxScanSizeInGb, @@ -320,7 +393,9 @@ public int hashCode() { compressionMethod, destination, includeTags, + lookupAttributes, name, + partitioningAttributes, query, rehydrationMaxScanSizeInGb, rehydrationTags, @@ -334,7 +409,11 @@ public String toString() { sb.append(" compressionMethod: ").append(toIndentedString(compressionMethod)).append("\n"); sb.append(" destination: ").append(toIndentedString(destination)).append("\n"); sb.append(" includeTags: ").append(toIndentedString(includeTags)).append("\n"); + sb.append(" lookupAttributes: ").append(toIndentedString(lookupAttributes)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" partitioningAttributes: ") + .append(toIndentedString(partitioningAttributes)) + .append("\n"); sb.append(" query: ").append(toIndentedString(query)).append("\n"); sb.append(" rehydrationMaxScanSizeInGb: ") .append(toIndentedString(rehydrationMaxScanSizeInGb)) diff --git a/src/main/java/com/datadog/api/client/v2/model/MaxSessionDurationType.java b/src/main/java/com/datadog/api/client/v2/model/MaxSessionDurationType.java new file mode 100644 index 00000000000..a60082f6f34 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/MaxSessionDurationType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Data type of a maximum session duration update. */ +@JsonSerialize(using = MaxSessionDurationType.MaxSessionDurationTypeSerializer.class) +public class MaxSessionDurationType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("max_session_duration")); + + public static final MaxSessionDurationType MAX_SESSION_DURATION = + new MaxSessionDurationType("max_session_duration"); + + MaxSessionDurationType(String value) { + super(value, allowedValues); + } + + public static class MaxSessionDurationTypeSerializer + extends StdSerializer { + public MaxSessionDurationTypeSerializer(Class t) { + super(t); + } + + public MaxSessionDurationTypeSerializer() { + this(null); + } + + @Override + public void serialize( + MaxSessionDurationType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static MaxSessionDurationType fromValue(String value) { + return new MaxSessionDurationType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/MaxSessionDurationUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/MaxSessionDurationUpdateAttributes.java new file mode 100644 index 00000000000..83a4451e7ac --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/MaxSessionDurationUpdateAttributes.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes for the maximum session duration update request. */ +@JsonPropertyOrder({MaxSessionDurationUpdateAttributes.JSON_PROPERTY_MAX_SESSION_DURATION}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class MaxSessionDurationUpdateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_MAX_SESSION_DURATION = "max_session_duration"; + private Long maxSessionDuration; + + public MaxSessionDurationUpdateAttributes() {} + + @JsonCreator + public MaxSessionDurationUpdateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_MAX_SESSION_DURATION) + Long maxSessionDuration) { + this.maxSessionDuration = maxSessionDuration; + } + + public MaxSessionDurationUpdateAttributes maxSessionDuration(Long maxSessionDuration) { + this.maxSessionDuration = maxSessionDuration; + return this; + } + + /** + * The maximum session duration, in seconds. minimum: 1 + * + * @return maxSessionDuration + */ + @JsonProperty(JSON_PROPERTY_MAX_SESSION_DURATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getMaxSessionDuration() { + return maxSessionDuration; + } + + public void setMaxSessionDuration(Long maxSessionDuration) { + this.maxSessionDuration = maxSessionDuration; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return MaxSessionDurationUpdateAttributes + */ + @JsonAnySetter + public MaxSessionDurationUpdateAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this MaxSessionDurationUpdateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MaxSessionDurationUpdateAttributes maxSessionDurationUpdateAttributes = + (MaxSessionDurationUpdateAttributes) o; + return Objects.equals( + this.maxSessionDuration, maxSessionDurationUpdateAttributes.maxSessionDuration) + && Objects.equals( + this.additionalProperties, maxSessionDurationUpdateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(maxSessionDuration, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MaxSessionDurationUpdateAttributes {\n"); + sb.append(" maxSessionDuration: ").append(toIndentedString(maxSessionDuration)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/MaxSessionDurationUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/MaxSessionDurationUpdateData.java new file mode 100644 index 00000000000..8b05f031694 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/MaxSessionDurationUpdateData.java @@ -0,0 +1,182 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The data object for a maximum session duration update request. */ +@JsonPropertyOrder({ + MaxSessionDurationUpdateData.JSON_PROPERTY_ATTRIBUTES, + MaxSessionDurationUpdateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class MaxSessionDurationUpdateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private MaxSessionDurationUpdateAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private MaxSessionDurationType type; + + public MaxSessionDurationUpdateData() {} + + @JsonCreator + public MaxSessionDurationUpdateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + MaxSessionDurationUpdateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) MaxSessionDurationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public MaxSessionDurationUpdateData attributes(MaxSessionDurationUpdateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for the maximum session duration update request. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public MaxSessionDurationUpdateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(MaxSessionDurationUpdateAttributes attributes) { + this.attributes = attributes; + } + + public MaxSessionDurationUpdateData type(MaxSessionDurationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Data type of a maximum session duration update. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public MaxSessionDurationType getType() { + return type; + } + + public void setType(MaxSessionDurationType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return MaxSessionDurationUpdateData + */ + @JsonAnySetter + public MaxSessionDurationUpdateData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this MaxSessionDurationUpdateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MaxSessionDurationUpdateData maxSessionDurationUpdateData = (MaxSessionDurationUpdateData) o; + return Objects.equals(this.attributes, maxSessionDurationUpdateData.attributes) + && Objects.equals(this.type, maxSessionDurationUpdateData.type) + && Objects.equals( + this.additionalProperties, maxSessionDurationUpdateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MaxSessionDurationUpdateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/MaxSessionDurationUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/MaxSessionDurationUpdateRequest.java new file mode 100644 index 00000000000..a978a43f0d6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/MaxSessionDurationUpdateRequest.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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A request to update the maximum session duration for an organization. */ +@JsonPropertyOrder({MaxSessionDurationUpdateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class MaxSessionDurationUpdateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private MaxSessionDurationUpdateData data; + + public MaxSessionDurationUpdateRequest() {} + + @JsonCreator + public MaxSessionDurationUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + MaxSessionDurationUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public MaxSessionDurationUpdateRequest data(MaxSessionDurationUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data object for a maximum session duration update request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public MaxSessionDurationUpdateData getData() { + return data; + } + + public void setData(MaxSessionDurationUpdateData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return MaxSessionDurationUpdateRequest + */ + @JsonAnySetter + public MaxSessionDurationUpdateRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this MaxSessionDurationUpdateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MaxSessionDurationUpdateRequest maxSessionDurationUpdateRequest = + (MaxSessionDurationUpdateRequest) o; + return Objects.equals(this.data, maxSessionDurationUpdateRequest.data) + && Objects.equals( + this.additionalProperties, maxSessionDurationUpdateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MaxSessionDurationUpdateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/McpScanRequest.java b/src/main/java/com/datadog/api/client/v2/model/McpScanRequest.java new file mode 100644 index 00000000000..93cef7b3dd9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/McpScanRequest.java @@ -0,0 +1,145 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The top-level request object for submitting an MCP SCA dependency scan. */ +@JsonPropertyOrder({McpScanRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class McpScanRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private McpScanRequestData data; + + public McpScanRequest() {} + + @JsonCreator + public McpScanRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) McpScanRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public McpScanRequest data(McpScanRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data object in an MCP SCA scan request, containing the scan attributes and request type. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public McpScanRequestData getData() { + return data; + } + + public void setData(McpScanRequestData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return McpScanRequest + */ + @JsonAnySetter + public McpScanRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this McpScanRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + McpScanRequest mcpScanRequest = (McpScanRequest) o; + return Objects.equals(this.data, mcpScanRequest.data) + && Objects.equals(this.additionalProperties, mcpScanRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class McpScanRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/McpScanRequestData.java b/src/main/java/com/datadog/api/client/v2/model/McpScanRequestData.java new file mode 100644 index 00000000000..62092afcc3e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/McpScanRequestData.java @@ -0,0 +1,208 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The data object in an MCP SCA scan request, containing the scan attributes and request type. */ +@JsonPropertyOrder({ + McpScanRequestData.JSON_PROPERTY_ATTRIBUTES, + McpScanRequestData.JSON_PROPERTY_ID, + McpScanRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class McpScanRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private McpScanRequestDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private McpScanRequestDataType type = McpScanRequestDataType.MCPSCANREQUEST; + + public McpScanRequestData() {} + + @JsonCreator + public McpScanRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + McpScanRequestDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) McpScanRequestDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public McpScanRequestData attributes(McpScanRequestDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The attributes of an MCP SCA scan request, describing the libraries to scan and their context. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public McpScanRequestDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(McpScanRequestDataAttributes attributes) { + this.attributes = attributes; + } + + public McpScanRequestData id(String id) { + this.id = id; + return this; + } + + /** + * An optional identifier for this scan request. + * + * @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 McpScanRequestData type(McpScanRequestDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type identifier for MCP SCA scan requests. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public McpScanRequestDataType getType() { + return type; + } + + public void setType(McpScanRequestDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return McpScanRequestData + */ + @JsonAnySetter + public McpScanRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this McpScanRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + McpScanRequestData mcpScanRequestData = (McpScanRequestData) o; + return Objects.equals(this.attributes, mcpScanRequestData.attributes) + && Objects.equals(this.id, mcpScanRequestData.id) + && Objects.equals(this.type, mcpScanRequestData.type) + && Objects.equals(this.additionalProperties, mcpScanRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class McpScanRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/McpScanRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/McpScanRequestDataAttributes.java new file mode 100644 index 00000000000..7cb1bf854a0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/McpScanRequestDataAttributes.java @@ -0,0 +1,218 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * The attributes of an MCP SCA scan request, describing the libraries to scan and their context. + */ +@JsonPropertyOrder({ + McpScanRequestDataAttributes.JSON_PROPERTY_COMMIT_HASH, + McpScanRequestDataAttributes.JSON_PROPERTY_LIBRARIES, + McpScanRequestDataAttributes.JSON_PROPERTY_RESOURCE_NAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class McpScanRequestDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMMIT_HASH = "commit_hash"; + private String commitHash; + + public static final String JSON_PROPERTY_LIBRARIES = "libraries"; + private List libraries = new ArrayList<>(); + + public static final String JSON_PROPERTY_RESOURCE_NAME = "resource_name"; + private String resourceName; + + public McpScanRequestDataAttributes() {} + + @JsonCreator + public McpScanRequestDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_COMMIT_HASH) String commitHash, + @JsonProperty(required = true, value = JSON_PROPERTY_LIBRARIES) + List libraries, + @JsonProperty(required = true, value = JSON_PROPERTY_RESOURCE_NAME) String resourceName) { + this.commitHash = commitHash; + this.libraries = libraries; + this.resourceName = resourceName; + } + + public McpScanRequestDataAttributes commitHash(String commitHash) { + this.commitHash = commitHash; + return this; + } + + /** + * The commit hash of the source code being scanned. + * + * @return commitHash + */ + @JsonProperty(JSON_PROPERTY_COMMIT_HASH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCommitHash() { + return commitHash; + } + + public void setCommitHash(String commitHash) { + this.commitHash = commitHash; + } + + public McpScanRequestDataAttributes libraries( + List libraries) { + this.libraries = libraries; + for (McpScanRequestDataAttributesLibrariesItems item : libraries) { + this.unparsed |= item.unparsed; + } + return this; + } + + public McpScanRequestDataAttributes addLibrariesItem( + McpScanRequestDataAttributesLibrariesItems librariesItem) { + this.libraries.add(librariesItem); + this.unparsed |= librariesItem.unparsed; + return this; + } + + /** + * The list of libraries to scan for vulnerabilities. + * + * @return libraries + */ + @JsonProperty(JSON_PROPERTY_LIBRARIES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getLibraries() { + return libraries; + } + + public void setLibraries(List libraries) { + this.libraries = libraries; + } + + public McpScanRequestDataAttributes resourceName(String resourceName) { + this.resourceName = resourceName; + return this; + } + + /** + * The name of the resource (typically the repository or project name) being scanned. + * + * @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; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return McpScanRequestDataAttributes + */ + @JsonAnySetter + public McpScanRequestDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this McpScanRequestDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + McpScanRequestDataAttributes mcpScanRequestDataAttributes = (McpScanRequestDataAttributes) o; + return Objects.equals(this.commitHash, mcpScanRequestDataAttributes.commitHash) + && Objects.equals(this.libraries, mcpScanRequestDataAttributes.libraries) + && Objects.equals(this.resourceName, mcpScanRequestDataAttributes.resourceName) + && Objects.equals( + this.additionalProperties, mcpScanRequestDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(commitHash, libraries, resourceName, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class McpScanRequestDataAttributes {\n"); + sb.append(" commitHash: ").append(toIndentedString(commitHash)).append("\n"); + sb.append(" libraries: ").append(toIndentedString(libraries)).append("\n"); + sb.append(" resourceName: ").append(toIndentedString(resourceName)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/McpScanRequestDataAttributesLibrariesItems.java b/src/main/java/com/datadog/api/client/v2/model/McpScanRequestDataAttributesLibrariesItems.java new file mode 100644 index 00000000000..f46ebef9bf8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/McpScanRequestDataAttributesLibrariesItems.java @@ -0,0 +1,312 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** A library declaration to include in the dependency scan. */ +@JsonPropertyOrder({ + McpScanRequestDataAttributesLibrariesItems.JSON_PROPERTY_EXCLUSIONS, + McpScanRequestDataAttributesLibrariesItems.JSON_PROPERTY_IS_DEV, + McpScanRequestDataAttributesLibrariesItems.JSON_PROPERTY_IS_DIRECT, + McpScanRequestDataAttributesLibrariesItems.JSON_PROPERTY_PACKAGE_MANAGER, + McpScanRequestDataAttributesLibrariesItems.JSON_PROPERTY_PURL, + McpScanRequestDataAttributesLibrariesItems.JSON_PROPERTY_TARGET_FRAMEWORKS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class McpScanRequestDataAttributesLibrariesItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EXCLUSIONS = "exclusions"; + private List exclusions = null; + + public static final String JSON_PROPERTY_IS_DEV = "is_dev"; + private Boolean isDev; + + public static final String JSON_PROPERTY_IS_DIRECT = "is_direct"; + private Boolean isDirect; + + public static final String JSON_PROPERTY_PACKAGE_MANAGER = "package_manager"; + private String packageManager; + + public static final String JSON_PROPERTY_PURL = "purl"; + private String purl; + + public static final String JSON_PROPERTY_TARGET_FRAMEWORKS = "target_frameworks"; + private List targetFrameworks = null; + + public McpScanRequestDataAttributesLibrariesItems() {} + + @JsonCreator + public McpScanRequestDataAttributesLibrariesItems( + @JsonProperty(required = true, value = JSON_PROPERTY_IS_DEV) Boolean isDev, + @JsonProperty(required = true, value = JSON_PROPERTY_IS_DIRECT) Boolean isDirect, + @JsonProperty(required = true, value = JSON_PROPERTY_PACKAGE_MANAGER) String packageManager, + @JsonProperty(required = true, value = JSON_PROPERTY_PURL) String purl) { + this.isDev = isDev; + this.isDirect = isDirect; + this.packageManager = packageManager; + this.purl = purl; + } + + public McpScanRequestDataAttributesLibrariesItems exclusions(List exclusions) { + this.exclusions = exclusions; + return this; + } + + public McpScanRequestDataAttributesLibrariesItems addExclusionsItem(String exclusionsItem) { + if (this.exclusions == null) { + this.exclusions = new ArrayList<>(); + } + this.exclusions.add(exclusionsItem); + return this; + } + + /** + * The list of dependency PURLs to exclude when resolving transitive dependencies for this + * library. + * + * @return exclusions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXCLUSIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getExclusions() { + return exclusions; + } + + public void setExclusions(List exclusions) { + this.exclusions = exclusions; + } + + public McpScanRequestDataAttributesLibrariesItems isDev(Boolean isDev) { + this.isDev = isDev; + return this; + } + + /** + * Whether this library is a development-only dependency. + * + * @return isDev + */ + @JsonProperty(JSON_PROPERTY_IS_DEV) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsDev() { + return isDev; + } + + public void setIsDev(Boolean isDev) { + this.isDev = isDev; + } + + public McpScanRequestDataAttributesLibrariesItems isDirect(Boolean isDirect) { + this.isDirect = isDirect; + return this; + } + + /** + * Whether this library is a direct (rather than transitive) dependency. + * + * @return isDirect + */ + @JsonProperty(JSON_PROPERTY_IS_DIRECT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getIsDirect() { + return isDirect; + } + + public void setIsDirect(Boolean isDirect) { + this.isDirect = isDirect; + } + + public McpScanRequestDataAttributesLibrariesItems packageManager(String packageManager) { + this.packageManager = packageManager; + return this; + } + + /** + * The package manager that produced this library entry (for example, npm, pip + * , nuget). + * + * @return packageManager + */ + @JsonProperty(JSON_PROPERTY_PACKAGE_MANAGER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPackageManager() { + return packageManager; + } + + public void setPackageManager(String packageManager) { + this.packageManager = packageManager; + } + + public McpScanRequestDataAttributesLibrariesItems purl(String purl) { + this.purl = purl; + return this; + } + + /** + * The Package URL (PURL) uniquely identifying the library and its version. + * + * @return purl + */ + @JsonProperty(JSON_PROPERTY_PURL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPurl() { + return purl; + } + + public void setPurl(String purl) { + this.purl = purl; + } + + public McpScanRequestDataAttributesLibrariesItems targetFrameworks( + List targetFrameworks) { + this.targetFrameworks = targetFrameworks; + return this; + } + + public McpScanRequestDataAttributesLibrariesItems addTargetFrameworksItem( + String targetFrameworksItem) { + if (this.targetFrameworks == null) { + this.targetFrameworks = new ArrayList<>(); + } + this.targetFrameworks.add(targetFrameworksItem); + return this; + } + + /** + * The list of target framework identifiers associated with the library. + * + * @return targetFrameworks + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TARGET_FRAMEWORKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTargetFrameworks() { + return targetFrameworks; + } + + public void setTargetFrameworks(List targetFrameworks) { + this.targetFrameworks = targetFrameworks; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return McpScanRequestDataAttributesLibrariesItems + */ + @JsonAnySetter + public McpScanRequestDataAttributesLibrariesItems putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this McpScanRequestDataAttributesLibrariesItems object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + McpScanRequestDataAttributesLibrariesItems mcpScanRequestDataAttributesLibrariesItems = + (McpScanRequestDataAttributesLibrariesItems) o; + return Objects.equals(this.exclusions, mcpScanRequestDataAttributesLibrariesItems.exclusions) + && Objects.equals(this.isDev, mcpScanRequestDataAttributesLibrariesItems.isDev) + && Objects.equals(this.isDirect, mcpScanRequestDataAttributesLibrariesItems.isDirect) + && Objects.equals( + this.packageManager, mcpScanRequestDataAttributesLibrariesItems.packageManager) + && Objects.equals(this.purl, mcpScanRequestDataAttributesLibrariesItems.purl) + && Objects.equals( + this.targetFrameworks, mcpScanRequestDataAttributesLibrariesItems.targetFrameworks) + && Objects.equals( + this.additionalProperties, + mcpScanRequestDataAttributesLibrariesItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + exclusions, isDev, isDirect, packageManager, purl, targetFrameworks, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class McpScanRequestDataAttributesLibrariesItems {\n"); + sb.append(" exclusions: ").append(toIndentedString(exclusions)).append("\n"); + sb.append(" isDev: ").append(toIndentedString(isDev)).append("\n"); + sb.append(" isDirect: ").append(toIndentedString(isDirect)).append("\n"); + sb.append(" packageManager: ").append(toIndentedString(packageManager)).append("\n"); + sb.append(" purl: ").append(toIndentedString(purl)).append("\n"); + sb.append(" targetFrameworks: ").append(toIndentedString(targetFrameworks)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/McpScanRequestDataType.java b/src/main/java/com/datadog/api/client/v2/model/McpScanRequestDataType.java new file mode 100644 index 00000000000..2ea0bc08b76 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/McpScanRequestDataType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The type identifier for MCP SCA scan requests. */ +@JsonSerialize(using = McpScanRequestDataType.McpScanRequestDataTypeSerializer.class) +public class McpScanRequestDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("mcpscanrequest")); + + public static final McpScanRequestDataType MCPSCANREQUEST = + new McpScanRequestDataType("mcpscanrequest"); + + McpScanRequestDataType(String value) { + super(value, allowedValues); + } + + public static class McpScanRequestDataTypeSerializer + extends StdSerializer { + public McpScanRequestDataTypeSerializer(Class t) { + super(t); + } + + public McpScanRequestDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + McpScanRequestDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static McpScanRequestDataType fromValue(String value) { + return new McpScanRequestDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/McpScanRequestResponse.java b/src/main/java/com/datadog/api/client/v2/model/McpScanRequestResponse.java new file mode 100644 index 00000000000..f3d5473694d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/McpScanRequestResponse.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * The top-level response object returned when an MCP SCA dependency scan request has been accepted. + */ +@JsonPropertyOrder({McpScanRequestResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class McpScanRequestResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private McpScanRequestResponseData data; + + public McpScanRequestResponse() {} + + @JsonCreator + public McpScanRequestResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) McpScanRequestResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public McpScanRequestResponse data(McpScanRequestResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data object returned when a scan request has been accepted. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public McpScanRequestResponseData getData() { + return data; + } + + public void setData(McpScanRequestResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return McpScanRequestResponse + */ + @JsonAnySetter + public McpScanRequestResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this McpScanRequestResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + McpScanRequestResponse mcpScanRequestResponse = (McpScanRequestResponse) o; + return Objects.equals(this.data, mcpScanRequestResponse.data) + && Objects.equals(this.additionalProperties, mcpScanRequestResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class McpScanRequestResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/McpScanRequestResponseData.java b/src/main/java/com/datadog/api/client/v2/model/McpScanRequestResponseData.java new file mode 100644 index 00000000000..ed5acd87acd --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/McpScanRequestResponseData.java @@ -0,0 +1,213 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The data object returned when a scan request has been accepted. */ +@JsonPropertyOrder({ + McpScanRequestResponseData.JSON_PROPERTY_ATTRIBUTES, + McpScanRequestResponseData.JSON_PROPERTY_ID, + McpScanRequestResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class McpScanRequestResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private McpScanRequestResponseDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private McpScanRequestResponseDataType type = + McpScanRequestResponseDataType.MCPSCANREQUESTRESPONSE; + + public McpScanRequestResponseData() {} + + @JsonCreator + public McpScanRequestResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + McpScanRequestResponseDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + McpScanRequestResponseDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public McpScanRequestResponseData attributes(McpScanRequestResponseDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The attributes returned when a scan request has been accepted, containing the job identifier + * used to poll for results. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public McpScanRequestResponseDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(McpScanRequestResponseDataAttributes attributes) { + this.attributes = attributes; + } + + public McpScanRequestResponseData id(String id) { + this.id = id; + return this; + } + + /** + * The job identifier assigned to the scan. + * + * @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 McpScanRequestResponseData type(McpScanRequestResponseDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type identifier for MCP SCA scan request responses. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public McpScanRequestResponseDataType getType() { + return type; + } + + public void setType(McpScanRequestResponseDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return McpScanRequestResponseData + */ + @JsonAnySetter + public McpScanRequestResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this McpScanRequestResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + McpScanRequestResponseData mcpScanRequestResponseData = (McpScanRequestResponseData) o; + return Objects.equals(this.attributes, mcpScanRequestResponseData.attributes) + && Objects.equals(this.id, mcpScanRequestResponseData.id) + && Objects.equals(this.type, mcpScanRequestResponseData.type) + && Objects.equals( + this.additionalProperties, mcpScanRequestResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class McpScanRequestResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/McpScanRequestResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/McpScanRequestResponseDataAttributes.java new file mode 100644 index 00000000000..878cd3d0359 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/McpScanRequestResponseDataAttributes.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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * The attributes returned when a scan request has been accepted, containing the job identifier used + * to poll for results. + */ +@JsonPropertyOrder({McpScanRequestResponseDataAttributes.JSON_PROPERTY_JOB_ID}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class McpScanRequestResponseDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_JOB_ID = "job_id"; + private String jobId; + + public McpScanRequestResponseDataAttributes() {} + + @JsonCreator + public McpScanRequestResponseDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_JOB_ID) String jobId) { + this.jobId = jobId; + } + + public McpScanRequestResponseDataAttributes jobId(String jobId) { + this.jobId = jobId; + return this; + } + + /** + * The job identifier assigned to the scan, used to retrieve the scan result. + * + * @return jobId + */ + @JsonProperty(JSON_PROPERTY_JOB_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getJobId() { + return jobId; + } + + public void setJobId(String jobId) { + this.jobId = jobId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return McpScanRequestResponseDataAttributes + */ + @JsonAnySetter + public McpScanRequestResponseDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this McpScanRequestResponseDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + McpScanRequestResponseDataAttributes mcpScanRequestResponseDataAttributes = + (McpScanRequestResponseDataAttributes) o; + return Objects.equals(this.jobId, mcpScanRequestResponseDataAttributes.jobId) + && Objects.equals( + this.additionalProperties, mcpScanRequestResponseDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(jobId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class McpScanRequestResponseDataAttributes {\n"); + sb.append(" jobId: ").append(toIndentedString(jobId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/McpScanRequestResponseDataType.java b/src/main/java/com/datadog/api/client/v2/model/McpScanRequestResponseDataType.java new file mode 100644 index 00000000000..19cb54bde5d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/McpScanRequestResponseDataType.java @@ -0,0 +1,58 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The type identifier for MCP SCA scan request responses. */ +@JsonSerialize( + using = McpScanRequestResponseDataType.McpScanRequestResponseDataTypeSerializer.class) +public class McpScanRequestResponseDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("mcpscanrequestresponse")); + + public static final McpScanRequestResponseDataType MCPSCANREQUESTRESPONSE = + new McpScanRequestResponseDataType("mcpscanrequestresponse"); + + McpScanRequestResponseDataType(String value) { + super(value, allowedValues); + } + + public static class McpScanRequestResponseDataTypeSerializer + extends StdSerializer { + public McpScanRequestResponseDataTypeSerializer(Class t) { + super(t); + } + + public McpScanRequestResponseDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + McpScanRequestResponseDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static McpScanRequestResponseDataType fromValue(String value) { + return new McpScanRequestResponseDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/NDKSourcemapAttributes.java b/src/main/java/com/datadog/api/client/v2/model/NDKSourcemapAttributes.java new file mode 100644 index 00000000000..fafc101776f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/NDKSourcemapAttributes.java @@ -0,0 +1,283 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of an Android NDK symbol file. */ +@JsonPropertyOrder({ + NDKSourcemapAttributes.JSON_PROPERTY_ARCH, + NDKSourcemapAttributes.JSON_PROPERTY_BUILD_ID, + NDKSourcemapAttributes.JSON_PROPERTY_CREATED_AT, + NDKSourcemapAttributes.JSON_PROPERTY_FILE_NAME, + NDKSourcemapAttributes.JSON_PROPERTY_MAPKIND, + NDKSourcemapAttributes.JSON_PROPERTY_SIZE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class NDKSourcemapAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ARCH = "arch"; + private String arch; + + public static final String JSON_PROPERTY_BUILD_ID = "build_id"; + private String buildId; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_FILE_NAME = "file_name"; + private String fileName; + + public static final String JSON_PROPERTY_MAPKIND = "mapkind"; + private String mapkind; + + public static final String JSON_PROPERTY_SIZE = "size"; + private Long size; + + public NDKSourcemapAttributes() {} + + @JsonCreator + public NDKSourcemapAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_MAPKIND) String mapkind, + @JsonProperty(required = true, value = JSON_PROPERTY_SIZE) Long size) { + this.createdAt = createdAt; + this.mapkind = mapkind; + this.size = size; + } + + public NDKSourcemapAttributes arch(String arch) { + this.arch = arch; + return this; + } + + /** + * The target CPU architecture. + * + * @return arch + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARCH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getArch() { + return arch; + } + + public void setArch(String arch) { + this.arch = arch; + } + + public NDKSourcemapAttributes buildId(String buildId) { + this.buildId = buildId; + return this; + } + + /** + * The build identifier (UUID format). + * + * @return buildId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BUILD_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBuildId() { + return buildId; + } + + public void setBuildId(String buildId) { + this.buildId = buildId; + } + + public NDKSourcemapAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The timestamp when the symbol file was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public NDKSourcemapAttributes fileName(String fileName) { + this.fileName = fileName; + return this; + } + + /** + * The NDK library file name. + * + * @return fileName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public NDKSourcemapAttributes mapkind(String mapkind) { + this.mapkind = mapkind; + return this; + } + + /** + * The type of source map. + * + * @return mapkind + */ + @JsonProperty(JSON_PROPERTY_MAPKIND) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMapkind() { + return mapkind; + } + + public void setMapkind(String mapkind) { + this.mapkind = mapkind; + } + + public NDKSourcemapAttributes size(Long size) { + this.size = size; + return this; + } + + /** + * The size of the symbol file in bytes. + * + * @return size + */ + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getSize() { + return size; + } + + public void setSize(Long size) { + this.size = size; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return NDKSourcemapAttributes + */ + @JsonAnySetter + public NDKSourcemapAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this NDKSourcemapAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NDKSourcemapAttributes ndkSourcemapAttributes = (NDKSourcemapAttributes) o; + return Objects.equals(this.arch, ndkSourcemapAttributes.arch) + && Objects.equals(this.buildId, ndkSourcemapAttributes.buildId) + && Objects.equals(this.createdAt, ndkSourcemapAttributes.createdAt) + && Objects.equals(this.fileName, ndkSourcemapAttributes.fileName) + && Objects.equals(this.mapkind, ndkSourcemapAttributes.mapkind) + && Objects.equals(this.size, ndkSourcemapAttributes.size) + && Objects.equals(this.additionalProperties, ndkSourcemapAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(arch, buildId, createdAt, fileName, mapkind, size, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NDKSourcemapAttributes {\n"); + sb.append(" arch: ").append(toIndentedString(arch)).append("\n"); + sb.append(" buildId: ").append(toIndentedString(buildId)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" fileName: ").append(toIndentedString(fileName)).append("\n"); + sb.append(" mapkind: ").append(toIndentedString(mapkind)).append("\n"); + sb.append(" size: ").append(toIndentedString(size)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/NDKSourcemapData.java b/src/main/java/com/datadog/api/client/v2/model/NDKSourcemapData.java new file mode 100644 index 00000000000..4cef73a927c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/NDKSourcemapData.java @@ -0,0 +1,209 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Android NDK symbol file data object. */ +@JsonPropertyOrder({ + NDKSourcemapData.JSON_PROPERTY_ATTRIBUTES, + NDKSourcemapData.JSON_PROPERTY_ID, + NDKSourcemapData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class NDKSourcemapData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private NDKSourcemapAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SourcemapDataType type; + + public NDKSourcemapData() {} + + @JsonCreator + public NDKSourcemapData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + NDKSourcemapAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SourcemapDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public NDKSourcemapData attributes(NDKSourcemapAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an Android NDK symbol file. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public NDKSourcemapAttributes getAttributes() { + return attributes; + } + + public void setAttributes(NDKSourcemapAttributes attributes) { + this.attributes = attributes; + } + + public NDKSourcemapData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the source map. + * + * @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 NDKSourcemapData type(SourcemapDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type for source map objects. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SourcemapDataType getType() { + return type; + } + + public void setType(SourcemapDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return NDKSourcemapData + */ + @JsonAnySetter + public NDKSourcemapData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this NDKSourcemapData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NDKSourcemapData ndkSourcemapData = (NDKSourcemapData) o; + return Objects.equals(this.attributes, ndkSourcemapData.attributes) + && Objects.equals(this.id, ndkSourcemapData.id) + && Objects.equals(this.type, ndkSourcemapData.type) + && Objects.equals(this.additionalProperties, ndkSourcemapData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NDKSourcemapData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/NetworkHealthInsight.java b/src/main/java/com/datadog/api/client/v2/model/NetworkHealthInsight.java new file mode 100644 index 00000000000..3cbda958128 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/NetworkHealthInsight.java @@ -0,0 +1,209 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A single network health insight describing a service-to-service connectivity issue. */ +@JsonPropertyOrder({ + NetworkHealthInsight.JSON_PROPERTY_ATTRIBUTES, + NetworkHealthInsight.JSON_PROPERTY_ID, + NetworkHealthInsight.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class NetworkHealthInsight { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private NetworkHealthInsightAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private NetworkHealthInsightsType type = NetworkHealthInsightsType.NETWORK_HEALTH_INSIGHTS; + + public NetworkHealthInsight() {} + + @JsonCreator + public NetworkHealthInsight( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + NetworkHealthInsightAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) NetworkHealthInsightsType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public NetworkHealthInsight attributes(NetworkHealthInsightAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Detailed attributes of a network health insight. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public NetworkHealthInsightAttributes getAttributes() { + return attributes; + } + + public void setAttributes(NetworkHealthInsightAttributes attributes) { + this.attributes = attributes; + } + + public NetworkHealthInsight id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier for this network health insight. + * + * @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 NetworkHealthInsight type(NetworkHealthInsightsType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type for network health insights. Always network-health-insights. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public NetworkHealthInsightsType getType() { + return type; + } + + public void setType(NetworkHealthInsightsType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return NetworkHealthInsight + */ + @JsonAnySetter + public NetworkHealthInsight putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this NetworkHealthInsight object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NetworkHealthInsight networkHealthInsight = (NetworkHealthInsight) o; + return Objects.equals(this.attributes, networkHealthInsight.attributes) + && Objects.equals(this.id, networkHealthInsight.id) + && Objects.equals(this.type, networkHealthInsight.type) + && Objects.equals(this.additionalProperties, networkHealthInsight.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NetworkHealthInsight {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/NetworkHealthInsightAttributes.java b/src/main/java/com/datadog/api/client/v2/model/NetworkHealthInsightAttributes.java new file mode 100644 index 00000000000..fcda5593ff0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/NetworkHealthInsightAttributes.java @@ -0,0 +1,652 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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; + +/** Detailed attributes of a network health insight. */ +@JsonPropertyOrder({ + NetworkHealthInsightAttributes.JSON_PROPERTY_ACCOUNT_ID, + NetworkHealthInsightAttributes.JSON_PROPERTY_CERTIFICATE_ID, + NetworkHealthInsightAttributes.JSON_PROPERTY_CERTIFICATE_LIFETIME_PERCENT, + NetworkHealthInsightAttributes.JSON_PROPERTY_CLIENT_REGION, + NetworkHealthInsightAttributes.JSON_PROPERTY_CLIENT_SERVICE, + NetworkHealthInsightAttributes.JSON_PROPERTY_DAYS_UNTIL_EXPIRATION, + NetworkHealthInsightAttributes.JSON_PROPERTY_DNS_QUERY, + NetworkHealthInsightAttributes.JSON_PROPERTY_DNS_SERVER, + NetworkHealthInsightAttributes.JSON_PROPERTY_DOMAIN_NAME, + NetworkHealthInsightAttributes.JSON_PROPERTY_FAILURE_MAGNITUDE, + NetworkHealthInsightAttributes.JSON_PROPERTY_FAILURE_RATE, + NetworkHealthInsightAttributes.JSON_PROPERTY_FAILURE_TYPE, + NetworkHealthInsightAttributes.JSON_PROPERTY_LOADBALANCER_ID, + NetworkHealthInsightAttributes.JSON_PROPERTY_SERVER_REGION, + NetworkHealthInsightAttributes.JSON_PROPERTY_SERVER_SERVICE, + NetworkHealthInsightAttributes.JSON_PROPERTY_TOTAL_REQUESTS, + NetworkHealthInsightAttributes.JSON_PROPERTY_TRAFFIC_VOLUME, + NetworkHealthInsightAttributes.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class NetworkHealthInsightAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id"; + private String accountId; + + public static final String JSON_PROPERTY_CERTIFICATE_ID = "certificate_id"; + private String certificateId; + + public static final String JSON_PROPERTY_CERTIFICATE_LIFETIME_PERCENT = + "certificate_lifetime_percent"; + private Double certificateLifetimePercent; + + public static final String JSON_PROPERTY_CLIENT_REGION = "client_region"; + private String clientRegion; + + public static final String JSON_PROPERTY_CLIENT_SERVICE = "client_service"; + private String clientService; + + public static final String JSON_PROPERTY_DAYS_UNTIL_EXPIRATION = "days_until_expiration"; + private Long daysUntilExpiration; + + public static final String JSON_PROPERTY_DNS_QUERY = "dns_query"; + private String dnsQuery; + + public static final String JSON_PROPERTY_DNS_SERVER = "dns_server"; + private String dnsServer; + + public static final String JSON_PROPERTY_DOMAIN_NAME = "domain_name"; + private String domainName; + + public static final String JSON_PROPERTY_FAILURE_MAGNITUDE = "failure_magnitude"; + private Long failureMagnitude; + + public static final String JSON_PROPERTY_FAILURE_RATE = "failure_rate"; + private Double failureRate; + + public static final String JSON_PROPERTY_FAILURE_TYPE = "failure_type"; + private NetworkHealthInsightFailureType failureType; + + public static final String JSON_PROPERTY_LOADBALANCER_ID = "loadbalancer_id"; + private String loadbalancerId; + + public static final String JSON_PROPERTY_SERVER_REGION = "server_region"; + private String serverRegion; + + public static final String JSON_PROPERTY_SERVER_SERVICE = "server_service"; + private String serverService; + + public static final String JSON_PROPERTY_TOTAL_REQUESTS = "total_requests"; + private Long totalRequests; + + public static final String JSON_PROPERTY_TRAFFIC_VOLUME = "traffic_volume"; + private NetworkHealthInsightTrafficVolume trafficVolume; + + public static final String JSON_PROPERTY_TYPE = "type"; + private NetworkHealthInsightCategory type; + + public NetworkHealthInsightAttributes accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * AWS account identifier where the certificate is located. Only set for tls-cert + * insights. + * + * @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 NetworkHealthInsightAttributes certificateId(String certificateId) { + this.certificateId = certificateId; + return this; + } + + /** + * ARN or identifier of the certificate. Only set for tls-cert insights. + * + * @return certificateId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CERTIFICATE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCertificateId() { + return certificateId; + } + + public void setCertificateId(String certificateId) { + this.certificateId = certificateId; + } + + public NetworkHealthInsightAttributes certificateLifetimePercent( + Double certificateLifetimePercent) { + this.certificateLifetimePercent = certificateLifetimePercent; + return this; + } + + /** + * Percentage of the certificate's validity period that has elapsed, ranging from 0 to 100. Only + * set for tls-cert insights. + * + * @return certificateLifetimePercent + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CERTIFICATE_LIFETIME_PERCENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getCertificateLifetimePercent() { + return certificateLifetimePercent; + } + + public void setCertificateLifetimePercent(Double certificateLifetimePercent) { + this.certificateLifetimePercent = certificateLifetimePercent; + } + + public NetworkHealthInsightAttributes clientRegion(String clientRegion) { + this.clientRegion = clientRegion; + return this; + } + + /** + * AWS region where the client is located. Only set for tls-cert insights. + * + * @return clientRegion + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLIENT_REGION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getClientRegion() { + return clientRegion; + } + + public void setClientRegion(String clientRegion) { + this.clientRegion = clientRegion; + } + + public NetworkHealthInsightAttributes clientService(String clientService) { + this.clientService = clientService; + return this; + } + + /** + * Name of the service making the request (DNS query or TLS-secured connection). Set to N/A + * when the client service cannot be determined. + * + * @return clientService + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLIENT_SERVICE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getClientService() { + return clientService; + } + + public void setClientService(String clientService) { + this.clientService = clientService; + } + + public NetworkHealthInsightAttributes daysUntilExpiration(Long daysUntilExpiration) { + this.daysUntilExpiration = daysUntilExpiration; + return this; + } + + /** + * Number of days remaining until the certificate expires. Negative values indicate the + * certificate has already expired. Only set for tls-cert insights. + * + * @return daysUntilExpiration + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DAYS_UNTIL_EXPIRATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getDaysUntilExpiration() { + return daysUntilExpiration; + } + + public void setDaysUntilExpiration(Long daysUntilExpiration) { + this.daysUntilExpiration = daysUntilExpiration; + } + + public NetworkHealthInsightAttributes dnsQuery(String dnsQuery) { + this.dnsQuery = dnsQuery; + return this; + } + + /** + * Domain name that was being resolved when the DNS failure occurred. Only set for dns + * insights. + * + * @return dnsQuery + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DNS_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDnsQuery() { + return dnsQuery; + } + + public void setDnsQuery(String dnsQuery) { + this.dnsQuery = dnsQuery; + } + + public NetworkHealthInsightAttributes dnsServer(String dnsServer) { + this.dnsServer = dnsServer; + return this; + } + + /** + * DNS server that received the failing query. Only set for dns insights. + * + * @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 NetworkHealthInsightAttributes domainName(String domainName) { + this.domainName = domainName; + return this; + } + + /** + * Domain name covered by the certificate. Only set for tls-cert insights. + * + * @return domainName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DOMAIN_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDomainName() { + return domainName; + } + + public void setDomainName(String domainName) { + this.domainName = domainName; + } + + public NetworkHealthInsightAttributes failureMagnitude(Long failureMagnitude) { + this.failureMagnitude = failureMagnitude; + return this; + } + + /** + * Count of failed events observed during the query window. Only set for dns, + * tcp, and security-group insights. minimum: 0 + * + * @return failureMagnitude + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAILURE_MAGNITUDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getFailureMagnitude() { + return failureMagnitude; + } + + public void setFailureMagnitude(Long failureMagnitude) { + this.failureMagnitude = failureMagnitude; + } + + public NetworkHealthInsightAttributes failureRate(Double failureRate) { + this.failureRate = failureRate; + return this; + } + + /** + * Percentage of requests that failed during the query window, ranging from 0 to 100. Only set for + * dns, tcp, and security-group insights. minimum: 0 + * maximum: 100 + * + * @return failureRate + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAILURE_RATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getFailureRate() { + return failureRate; + } + + public void setFailureRate(Double failureRate) { + this.failureRate = failureRate; + } + + public NetworkHealthInsightAttributes failureType(NetworkHealthInsightFailureType failureType) { + this.failureType = failureType; + this.unparsed |= !failureType.isValid(); + return this; + } + + /** + * Specific failure type within the insight category. For DNS insights: timeout, + * nxdomain, servfail, or general_failure. For TLS + * certificate insights: expired or expiring_soon. For security group + * insights: denied. + * + * @return failureType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FAILURE_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public NetworkHealthInsightFailureType getFailureType() { + return failureType; + } + + public void setFailureType(NetworkHealthInsightFailureType failureType) { + if (!failureType.isValid()) { + this.unparsed = true; + } + this.failureType = failureType; + } + + public NetworkHealthInsightAttributes loadbalancerId(String loadbalancerId) { + this.loadbalancerId = loadbalancerId; + return this; + } + + /** + * ARN of the load balancer using the certificate. Only set for tls-cert insights. + * + * @return loadbalancerId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOADBALANCER_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLoadbalancerId() { + return loadbalancerId; + } + + public void setLoadbalancerId(String loadbalancerId) { + this.loadbalancerId = loadbalancerId; + } + + public NetworkHealthInsightAttributes serverRegion(String serverRegion) { + this.serverRegion = serverRegion; + return this; + } + + /** + * AWS region where the server or load balancer is located. Only set for tls-cert + * insights. + * + * @return serverRegion + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVER_REGION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getServerRegion() { + return serverRegion; + } + + public void setServerRegion(String serverRegion) { + this.serverRegion = serverRegion; + } + + public NetworkHealthInsightAttributes serverService(String serverService) { + this.serverService = serverService; + return this; + } + + /** + * Name of the target service the client was trying to reach. + * + * @return serverService + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVER_SERVICE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getServerService() { + return serverService; + } + + public void setServerService(String serverService) { + this.serverService = serverService; + } + + public NetworkHealthInsightAttributes totalRequests(Long totalRequests) { + this.totalRequests = totalRequests; + return this; + } + + /** + * Total number of requests observed during the query window. Provides context for + * failure_magnitude and failure_rate. Only set for dns, + * tcp, and security-group insights. minimum: 0 + * + * @return totalRequests + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_REQUESTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalRequests() { + return totalRequests; + } + + public void setTotalRequests(Long totalRequests) { + this.totalRequests = totalRequests; + } + + public NetworkHealthInsightAttributes trafficVolume( + NetworkHealthInsightTrafficVolume trafficVolume) { + this.trafficVolume = trafficVolume; + this.unparsed |= trafficVolume.unparsed; + return this; + } + + /** + * Network traffic volume metrics between the client and server services during the query window. + * + * @return trafficVolume + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRAFFIC_VOLUME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public NetworkHealthInsightTrafficVolume getTrafficVolume() { + return trafficVolume; + } + + public void setTrafficVolume(NetworkHealthInsightTrafficVolume trafficVolume) { + this.trafficVolume = trafficVolume; + } + + public NetworkHealthInsightAttributes type(NetworkHealthInsightCategory type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Category of network health insight. Indicates whether the insight relates to a DNS issue ( + * dns), a TCP issue (tcp), a TLS certificate issue (tls-cert + * ), or a security group denial (security-group). + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public NetworkHealthInsightCategory getType() { + return type; + } + + public void setType(NetworkHealthInsightCategory type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return NetworkHealthInsightAttributes + */ + @JsonAnySetter + public NetworkHealthInsightAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this NetworkHealthInsightAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NetworkHealthInsightAttributes networkHealthInsightAttributes = + (NetworkHealthInsightAttributes) o; + return Objects.equals(this.accountId, networkHealthInsightAttributes.accountId) + && Objects.equals(this.certificateId, networkHealthInsightAttributes.certificateId) + && Objects.equals( + this.certificateLifetimePercent, + networkHealthInsightAttributes.certificateLifetimePercent) + && Objects.equals(this.clientRegion, networkHealthInsightAttributes.clientRegion) + && Objects.equals(this.clientService, networkHealthInsightAttributes.clientService) + && Objects.equals( + this.daysUntilExpiration, networkHealthInsightAttributes.daysUntilExpiration) + && Objects.equals(this.dnsQuery, networkHealthInsightAttributes.dnsQuery) + && Objects.equals(this.dnsServer, networkHealthInsightAttributes.dnsServer) + && Objects.equals(this.domainName, networkHealthInsightAttributes.domainName) + && Objects.equals(this.failureMagnitude, networkHealthInsightAttributes.failureMagnitude) + && Objects.equals(this.failureRate, networkHealthInsightAttributes.failureRate) + && Objects.equals(this.failureType, networkHealthInsightAttributes.failureType) + && Objects.equals(this.loadbalancerId, networkHealthInsightAttributes.loadbalancerId) + && Objects.equals(this.serverRegion, networkHealthInsightAttributes.serverRegion) + && Objects.equals(this.serverService, networkHealthInsightAttributes.serverService) + && Objects.equals(this.totalRequests, networkHealthInsightAttributes.totalRequests) + && Objects.equals(this.trafficVolume, networkHealthInsightAttributes.trafficVolume) + && Objects.equals(this.type, networkHealthInsightAttributes.type) + && Objects.equals( + this.additionalProperties, networkHealthInsightAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + accountId, + certificateId, + certificateLifetimePercent, + clientRegion, + clientService, + daysUntilExpiration, + dnsQuery, + dnsServer, + domainName, + failureMagnitude, + failureRate, + failureType, + loadbalancerId, + serverRegion, + serverService, + totalRequests, + trafficVolume, + type, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NetworkHealthInsightAttributes {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" certificateId: ").append(toIndentedString(certificateId)).append("\n"); + sb.append(" certificateLifetimePercent: ") + .append(toIndentedString(certificateLifetimePercent)) + .append("\n"); + sb.append(" clientRegion: ").append(toIndentedString(clientRegion)).append("\n"); + sb.append(" clientService: ").append(toIndentedString(clientService)).append("\n"); + sb.append(" daysUntilExpiration: ") + .append(toIndentedString(daysUntilExpiration)) + .append("\n"); + sb.append(" dnsQuery: ").append(toIndentedString(dnsQuery)).append("\n"); + sb.append(" dnsServer: ").append(toIndentedString(dnsServer)).append("\n"); + sb.append(" domainName: ").append(toIndentedString(domainName)).append("\n"); + sb.append(" failureMagnitude: ").append(toIndentedString(failureMagnitude)).append("\n"); + sb.append(" failureRate: ").append(toIndentedString(failureRate)).append("\n"); + sb.append(" failureType: ").append(toIndentedString(failureType)).append("\n"); + sb.append(" loadbalancerId: ").append(toIndentedString(loadbalancerId)).append("\n"); + sb.append(" serverRegion: ").append(toIndentedString(serverRegion)).append("\n"); + sb.append(" serverService: ").append(toIndentedString(serverService)).append("\n"); + sb.append(" totalRequests: ").append(toIndentedString(totalRequests)).append("\n"); + sb.append(" trafficVolume: ").append(toIndentedString(trafficVolume)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/NetworkHealthInsightCategory.java b/src/main/java/com/datadog/api/client/v2/model/NetworkHealthInsightCategory.java new file mode 100644 index 00000000000..20ef1fb5d91 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/NetworkHealthInsightCategory.java @@ -0,0 +1,65 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * Category of network health insight. Indicates whether the insight relates to a DNS issue ( + * dns), a TCP issue (tcp), a TLS certificate issue (tls-cert), or + * a security group denial (security-group). + */ +@JsonSerialize(using = NetworkHealthInsightCategory.NetworkHealthInsightCategorySerializer.class) +public class NetworkHealthInsightCategory extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("dns", "tcp", "tls-cert", "security-group")); + + public static final NetworkHealthInsightCategory DNS = new NetworkHealthInsightCategory("dns"); + public static final NetworkHealthInsightCategory TCP = new NetworkHealthInsightCategory("tcp"); + public static final NetworkHealthInsightCategory TLS_CERT = + new NetworkHealthInsightCategory("tls-cert"); + public static final NetworkHealthInsightCategory SECURITY_GROUP = + new NetworkHealthInsightCategory("security-group"); + + NetworkHealthInsightCategory(String value) { + super(value, allowedValues); + } + + public static class NetworkHealthInsightCategorySerializer + extends StdSerializer { + public NetworkHealthInsightCategorySerializer(Class t) { + super(t); + } + + public NetworkHealthInsightCategorySerializer() { + this(null); + } + + @Override + public void serialize( + NetworkHealthInsightCategory value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static NetworkHealthInsightCategory fromValue(String value) { + return new NetworkHealthInsightCategory(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/NetworkHealthInsightFailureType.java b/src/main/java/com/datadog/api/client/v2/model/NetworkHealthInsightFailureType.java new file mode 100644 index 00000000000..a788b54906a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/NetworkHealthInsightFailureType.java @@ -0,0 +1,83 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * Specific failure type within the insight category. For DNS insights: timeout, + * nxdomain, servfail, or general_failure. For TLS certificate + * insights: expired or expiring_soon. For security group insights: + * denied. + */ +@JsonSerialize( + using = NetworkHealthInsightFailureType.NetworkHealthInsightFailureTypeSerializer.class) +public class NetworkHealthInsightFailureType extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList( + "timeout", + "nxdomain", + "servfail", + "general_failure", + "expired", + "expiring_soon", + "denied")); + + public static final NetworkHealthInsightFailureType TIMEOUT = + new NetworkHealthInsightFailureType("timeout"); + public static final NetworkHealthInsightFailureType NXDOMAIN = + new NetworkHealthInsightFailureType("nxdomain"); + public static final NetworkHealthInsightFailureType SERVFAIL = + new NetworkHealthInsightFailureType("servfail"); + public static final NetworkHealthInsightFailureType GENERAL_FAILURE = + new NetworkHealthInsightFailureType("general_failure"); + public static final NetworkHealthInsightFailureType EXPIRED = + new NetworkHealthInsightFailureType("expired"); + public static final NetworkHealthInsightFailureType EXPIRING_SOON = + new NetworkHealthInsightFailureType("expiring_soon"); + public static final NetworkHealthInsightFailureType DENIED = + new NetworkHealthInsightFailureType("denied"); + + NetworkHealthInsightFailureType(String value) { + super(value, allowedValues); + } + + public static class NetworkHealthInsightFailureTypeSerializer + extends StdSerializer { + public NetworkHealthInsightFailureTypeSerializer(Class t) { + super(t); + } + + public NetworkHealthInsightFailureTypeSerializer() { + this(null); + } + + @Override + public void serialize( + NetworkHealthInsightFailureType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static NetworkHealthInsightFailureType fromValue(String value) { + return new NetworkHealthInsightFailureType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/NetworkHealthInsightTrafficVolume.java b/src/main/java/com/datadog/api/client/v2/model/NetworkHealthInsightTrafficVolume.java new file mode 100644 index 00000000000..2d7925d78f0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/NetworkHealthInsightTrafficVolume.java @@ -0,0 +1,195 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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; + +/** + * Network traffic volume metrics between the client and server services during the query window. + */ +@JsonPropertyOrder({ + NetworkHealthInsightTrafficVolume.JSON_PROPERTY_BYTES_READ, + NetworkHealthInsightTrafficVolume.JSON_PROPERTY_BYTES_WRITTEN, + NetworkHealthInsightTrafficVolume.JSON_PROPERTY_TOTAL_TRAFFIC +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class NetworkHealthInsightTrafficVolume { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_BYTES_READ = "bytes_read"; + private Long bytesRead; + + public static final String JSON_PROPERTY_BYTES_WRITTEN = "bytes_written"; + private Long bytesWritten; + + public static final String JSON_PROPERTY_TOTAL_TRAFFIC = "total_traffic"; + private Long totalTraffic; + + public NetworkHealthInsightTrafficVolume bytesRead(Long bytesRead) { + this.bytesRead = bytesRead; + return this; + } + + /** + * Total bytes read from the server to the client during the query window. + * + * @return bytesRead + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BYTES_READ) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getBytesRead() { + return bytesRead; + } + + public void setBytesRead(Long bytesRead) { + this.bytesRead = bytesRead; + } + + public NetworkHealthInsightTrafficVolume bytesWritten(Long bytesWritten) { + this.bytesWritten = bytesWritten; + return this; + } + + /** + * Total bytes written from the client to the server during the query window. + * + * @return bytesWritten + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BYTES_WRITTEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getBytesWritten() { + return bytesWritten; + } + + public void setBytesWritten(Long bytesWritten) { + this.bytesWritten = bytesWritten; + } + + public NetworkHealthInsightTrafficVolume totalTraffic(Long totalTraffic) { + this.totalTraffic = totalTraffic; + return this; + } + + /** + * Sum of bytes written and bytes read across the query window. + * + * @return totalTraffic + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_TRAFFIC) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalTraffic() { + return totalTraffic; + } + + public void setTotalTraffic(Long totalTraffic) { + this.totalTraffic = totalTraffic; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return NetworkHealthInsightTrafficVolume + */ + @JsonAnySetter + public NetworkHealthInsightTrafficVolume putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this NetworkHealthInsightTrafficVolume object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NetworkHealthInsightTrafficVolume networkHealthInsightTrafficVolume = + (NetworkHealthInsightTrafficVolume) o; + return Objects.equals(this.bytesRead, networkHealthInsightTrafficVolume.bytesRead) + && Objects.equals(this.bytesWritten, networkHealthInsightTrafficVolume.bytesWritten) + && Objects.equals(this.totalTraffic, networkHealthInsightTrafficVolume.totalTraffic) + && Objects.equals( + this.additionalProperties, networkHealthInsightTrafficVolume.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(bytesRead, bytesWritten, totalTraffic, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NetworkHealthInsightTrafficVolume {\n"); + sb.append(" bytesRead: ").append(toIndentedString(bytesRead)).append("\n"); + sb.append(" bytesWritten: ").append(toIndentedString(bytesWritten)).append("\n"); + sb.append(" totalTraffic: ").append(toIndentedString(totalTraffic)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/NetworkHealthInsightsResponse.java b/src/main/java/com/datadog/api/client/v2/model/NetworkHealthInsightsResponse.java new file mode 100644 index 00000000000..4a6b15050e1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/NetworkHealthInsightsResponse.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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing a list of network health insights for the organization. */ +@JsonPropertyOrder({NetworkHealthInsightsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class NetworkHealthInsightsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public NetworkHealthInsightsResponse() {} + + @JsonCreator + public NetworkHealthInsightsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) { + this.data = data; + } + + public NetworkHealthInsightsResponse data(List data) { + this.data = data; + for (NetworkHealthInsight item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public NetworkHealthInsightsResponse addDataItem(NetworkHealthInsight dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Array of network health insights returned for the query window. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return NetworkHealthInsightsResponse + */ + @JsonAnySetter + public NetworkHealthInsightsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this NetworkHealthInsightsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NetworkHealthInsightsResponse networkHealthInsightsResponse = (NetworkHealthInsightsResponse) o; + return Objects.equals(this.data, networkHealthInsightsResponse.data) + && Objects.equals( + this.additionalProperties, networkHealthInsightsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NetworkHealthInsightsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/NetworkHealthInsightsType.java b/src/main/java/com/datadog/api/client/v2/model/NetworkHealthInsightsType.java new file mode 100644 index 00000000000..fb39edd7147 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/NetworkHealthInsightsType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The resource type for network health insights. Always network-health-insights. */ +@JsonSerialize(using = NetworkHealthInsightsType.NetworkHealthInsightsTypeSerializer.class) +public class NetworkHealthInsightsType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("network-health-insights")); + + public static final NetworkHealthInsightsType NETWORK_HEALTH_INSIGHTS = + new NetworkHealthInsightsType("network-health-insights"); + + NetworkHealthInsightsType(String value) { + super(value, allowedValues); + } + + public static class NetworkHealthInsightsTypeSerializer + extends StdSerializer { + public NetworkHealthInsightsTypeSerializer(Class t) { + super(t); + } + + public NetworkHealthInsightsTypeSerializer() { + this(null); + } + + @Override + public void serialize( + NetworkHealthInsightsType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static NetworkHealthInsightsType fromValue(String value) { + return new NetworkHealthInsightsType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/NotificationRulePreviewNotificationStatus.java b/src/main/java/com/datadog/api/client/v2/model/NotificationRulePreviewNotificationStatus.java new file mode 100644 index 00000000000..7645185a225 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/NotificationRulePreviewNotificationStatus.java @@ -0,0 +1,72 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * The notification status for the given rule type. SUCCESS means a matching event was + * found and the notification was sent successfully. DEFAULT means no matching event + * was found and a default placeholder notification was sent instead. ERROR means an + * error occurred while sending the notification. + */ +@JsonSerialize( + using = + NotificationRulePreviewNotificationStatus + .NotificationRulePreviewNotificationStatusSerializer.class) +public class NotificationRulePreviewNotificationStatus extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("SUCCESS", "DEFAULT", "ERROR")); + + public static final NotificationRulePreviewNotificationStatus SUCCESS = + new NotificationRulePreviewNotificationStatus("SUCCESS"); + public static final NotificationRulePreviewNotificationStatus DEFAULT = + new NotificationRulePreviewNotificationStatus("DEFAULT"); + public static final NotificationRulePreviewNotificationStatus ERROR = + new NotificationRulePreviewNotificationStatus("ERROR"); + + NotificationRulePreviewNotificationStatus(String value) { + super(value, allowedValues); + } + + public static class NotificationRulePreviewNotificationStatusSerializer + extends StdSerializer { + public NotificationRulePreviewNotificationStatusSerializer( + Class t) { + super(t); + } + + public NotificationRulePreviewNotificationStatusSerializer() { + this(null); + } + + @Override + public void serialize( + NotificationRulePreviewNotificationStatus value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static NotificationRulePreviewNotificationStatus fromValue(String value) { + return new NotificationRulePreviewNotificationStatus(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/NotificationRulePreviewResponse.java b/src/main/java/com/datadog/api/client/v2/model/NotificationRulePreviewResponse.java new file mode 100644 index 00000000000..26c540f15e3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/NotificationRulePreviewResponse.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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response from the notification preview request. */ +@JsonPropertyOrder({NotificationRulePreviewResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class NotificationRulePreviewResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private NotificationRulePreviewResponseData data; + + public NotificationRulePreviewResponse() {} + + @JsonCreator + public NotificationRulePreviewResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + NotificationRulePreviewResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public NotificationRulePreviewResponse data(NotificationRulePreviewResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The notification preview response data. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public NotificationRulePreviewResponseData getData() { + return data; + } + + public void setData(NotificationRulePreviewResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return NotificationRulePreviewResponse + */ + @JsonAnySetter + public NotificationRulePreviewResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this NotificationRulePreviewResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationRulePreviewResponse notificationRulePreviewResponse = + (NotificationRulePreviewResponse) o; + return Objects.equals(this.data, notificationRulePreviewResponse.data) + && Objects.equals( + this.additionalProperties, notificationRulePreviewResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationRulePreviewResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/NotificationRulePreviewResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/NotificationRulePreviewResponseAttributes.java new file mode 100644 index 00000000000..da2e5c1bb56 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/NotificationRulePreviewResponseAttributes.java @@ -0,0 +1,161 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of the notification preview response. */ +@JsonPropertyOrder({NotificationRulePreviewResponseAttributes.JSON_PROPERTY_PREVIEW_RESULTS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class NotificationRulePreviewResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_PREVIEW_RESULTS = "preview_results"; + private List previewResults = new ArrayList<>(); + + public NotificationRulePreviewResponseAttributes() {} + + @JsonCreator + public NotificationRulePreviewResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_PREVIEW_RESULTS) + List previewResults) { + this.previewResults = previewResults; + } + + public NotificationRulePreviewResponseAttributes previewResults( + List previewResults) { + this.previewResults = previewResults; + for (NotificationRulePreviewResult item : previewResults) { + this.unparsed |= item.unparsed; + } + return this; + } + + public NotificationRulePreviewResponseAttributes addPreviewResultsItem( + NotificationRulePreviewResult previewResultsItem) { + this.previewResults.add(previewResultsItem); + this.unparsed |= previewResultsItem.unparsed; + return this; + } + + /** + * List of preview results for each rule type matched by the notification rule. + * + * @return previewResults + */ + @JsonProperty(JSON_PROPERTY_PREVIEW_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getPreviewResults() { + return previewResults; + } + + public void setPreviewResults(List previewResults) { + this.previewResults = previewResults; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return NotificationRulePreviewResponseAttributes + */ + @JsonAnySetter + public NotificationRulePreviewResponseAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this NotificationRulePreviewResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationRulePreviewResponseAttributes notificationRulePreviewResponseAttributes = + (NotificationRulePreviewResponseAttributes) o; + return Objects.equals( + this.previewResults, notificationRulePreviewResponseAttributes.previewResults) + && Objects.equals( + this.additionalProperties, + notificationRulePreviewResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(previewResults, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationRulePreviewResponseAttributes {\n"); + sb.append(" previewResults: ").append(toIndentedString(previewResults)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/NotificationRulePreviewResponseData.java b/src/main/java/com/datadog/api/client/v2/model/NotificationRulePreviewResponseData.java new file mode 100644 index 00000000000..017aaa39e88 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/NotificationRulePreviewResponseData.java @@ -0,0 +1,212 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The notification preview response data. */ +@JsonPropertyOrder({ + NotificationRulePreviewResponseData.JSON_PROPERTY_ATTRIBUTES, + NotificationRulePreviewResponseData.JSON_PROPERTY_ID, + NotificationRulePreviewResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class NotificationRulePreviewResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private NotificationRulePreviewResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private NotificationRulePreviewResponseType type; + + public NotificationRulePreviewResponseData() {} + + @JsonCreator + public NotificationRulePreviewResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + NotificationRulePreviewResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + NotificationRulePreviewResponseType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public NotificationRulePreviewResponseData attributes( + NotificationRulePreviewResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of the notification preview response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public NotificationRulePreviewResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(NotificationRulePreviewResponseAttributes attributes) { + this.attributes = attributes; + } + + public NotificationRulePreviewResponseData id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the notification preview response. + * + * @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 NotificationRulePreviewResponseData type(NotificationRulePreviewResponseType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of the notification preview response. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public NotificationRulePreviewResponseType getType() { + return type; + } + + public void setType(NotificationRulePreviewResponseType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return NotificationRulePreviewResponseData + */ + @JsonAnySetter + public NotificationRulePreviewResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this NotificationRulePreviewResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationRulePreviewResponseData notificationRulePreviewResponseData = + (NotificationRulePreviewResponseData) o; + return Objects.equals(this.attributes, notificationRulePreviewResponseData.attributes) + && Objects.equals(this.id, notificationRulePreviewResponseData.id) + && Objects.equals(this.type, notificationRulePreviewResponseData.type) + && Objects.equals( + this.additionalProperties, notificationRulePreviewResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationRulePreviewResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/NotificationRulePreviewResponseType.java b/src/main/java/com/datadog/api/client/v2/model/NotificationRulePreviewResponseType.java new file mode 100644 index 00000000000..6ae8dd41c9f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/NotificationRulePreviewResponseType.java @@ -0,0 +1,59 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The type of the notification preview response. */ +@JsonSerialize( + using = NotificationRulePreviewResponseType.NotificationRulePreviewResponseTypeSerializer.class) +public class NotificationRulePreviewResponseType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("notification_preview_response")); + + public static final NotificationRulePreviewResponseType NOTIFICATION_PREVIEW_RESPONSE = + new NotificationRulePreviewResponseType("notification_preview_response"); + + NotificationRulePreviewResponseType(String value) { + super(value, allowedValues); + } + + public static class NotificationRulePreviewResponseTypeSerializer + extends StdSerializer { + public NotificationRulePreviewResponseTypeSerializer( + Class t) { + super(t); + } + + public NotificationRulePreviewResponseTypeSerializer() { + this(null); + } + + @Override + public void serialize( + NotificationRulePreviewResponseType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static NotificationRulePreviewResponseType fromValue(String value) { + return new NotificationRulePreviewResponseType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/NotificationRulePreviewResult.java b/src/main/java/com/datadog/api/client/v2/model/NotificationRulePreviewResult.java new file mode 100644 index 00000000000..3a63f5a623a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/NotificationRulePreviewResult.java @@ -0,0 +1,195 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The preview result for a single rule type. */ +@JsonPropertyOrder({ + NotificationRulePreviewResult.JSON_PROPERTY_NOTIFICATION_STATUS, + NotificationRulePreviewResult.JSON_PROPERTY_RULE_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class NotificationRulePreviewResult { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_NOTIFICATION_STATUS = "notification_status"; + private NotificationRulePreviewNotificationStatus notificationStatus; + + public static final String JSON_PROPERTY_RULE_TYPE = "rule_type"; + private RuleTypesItems ruleType; + + public NotificationRulePreviewResult() {} + + @JsonCreator + public NotificationRulePreviewResult( + @JsonProperty(required = true, value = JSON_PROPERTY_NOTIFICATION_STATUS) + NotificationRulePreviewNotificationStatus notificationStatus, + @JsonProperty(required = true, value = JSON_PROPERTY_RULE_TYPE) RuleTypesItems ruleType) { + this.notificationStatus = notificationStatus; + this.unparsed |= !notificationStatus.isValid(); + this.ruleType = ruleType; + this.unparsed |= !ruleType.isValid(); + } + + public NotificationRulePreviewResult notificationStatus( + NotificationRulePreviewNotificationStatus notificationStatus) { + this.notificationStatus = notificationStatus; + this.unparsed |= !notificationStatus.isValid(); + return this; + } + + /** + * The notification status for the given rule type. SUCCESS means a matching event + * was found and the notification was sent successfully. DEFAULT means no matching + * event was found and a default placeholder notification was sent instead. ERROR + * means an error occurred while sending the notification. + * + * @return notificationStatus + */ + @JsonProperty(JSON_PROPERTY_NOTIFICATION_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public NotificationRulePreviewNotificationStatus getNotificationStatus() { + return notificationStatus; + } + + public void setNotificationStatus(NotificationRulePreviewNotificationStatus notificationStatus) { + if (!notificationStatus.isValid()) { + this.unparsed = true; + } + this.notificationStatus = notificationStatus; + } + + public NotificationRulePreviewResult ruleType(RuleTypesItems ruleType) { + this.ruleType = ruleType; + this.unparsed |= !ruleType.isValid(); + return this; + } + + /** + * Security rule type which can be used in security rules. Signal-based notification rules can + * filter signals based on rule types application_security, log_detection, workload_security, + * signal_correlation, cloud_configuration and infrastructure_configuration. Vulnerability-based + * notification rules can filter vulnerabilities based on rule types + * application_code_vulnerability, application_library_vulnerability, attack_path, + * container_image_vulnerability, identity_risk, misconfiguration, api_security, + * host_vulnerability, iac_misconfiguration, sast_vulnerability and secret_vulnerability. + * + * @return ruleType + */ + @JsonProperty(JSON_PROPERTY_RULE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RuleTypesItems getRuleType() { + return ruleType; + } + + public void setRuleType(RuleTypesItems ruleType) { + if (!ruleType.isValid()) { + this.unparsed = true; + } + this.ruleType = ruleType; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return NotificationRulePreviewResult + */ + @JsonAnySetter + public NotificationRulePreviewResult putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this NotificationRulePreviewResult object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationRulePreviewResult notificationRulePreviewResult = (NotificationRulePreviewResult) o; + return Objects.equals(this.notificationStatus, notificationRulePreviewResult.notificationStatus) + && Objects.equals(this.ruleType, notificationRulePreviewResult.ruleType) + && Objects.equals( + this.additionalProperties, notificationRulePreviewResult.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(notificationStatus, ruleType, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationRulePreviewResult {\n"); + sb.append(" notificationStatus: ").append(toIndentedString(notificationStatus)).append("\n"); + sb.append(" ruleType: ").append(toIndentedString(ruleType)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/NotificationRuleRouting.java b/src/main/java/com/datadog/api/client/v2/model/NotificationRuleRouting.java new file mode 100644 index 00000000000..5d1b6d7d311 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/NotificationRuleRouting.java @@ -0,0 +1,149 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Routing configuration for the notification rule. */ +@JsonPropertyOrder({NotificationRuleRouting.JSON_PROPERTY_MODE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class NotificationRuleRouting { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_MODE = "mode"; + private NotificationRuleRoutingMode mode; + + public NotificationRuleRouting() {} + + @JsonCreator + public NotificationRuleRouting( + @JsonProperty(required = true, value = JSON_PROPERTY_MODE) NotificationRuleRoutingMode mode) { + this.mode = mode; + this.unparsed |= !mode.isValid(); + } + + public NotificationRuleRouting mode(NotificationRuleRoutingMode mode) { + this.mode = mode; + this.unparsed |= !mode.isValid(); + return this; + } + + /** + * The routing mode for the notification rule. manual sends notifications to the + * configured targets. + * + * @return mode + */ + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public NotificationRuleRoutingMode getMode() { + return mode; + } + + public void setMode(NotificationRuleRoutingMode mode) { + if (!mode.isValid()) { + this.unparsed = true; + } + this.mode = mode; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return NotificationRuleRouting + */ + @JsonAnySetter + public NotificationRuleRouting putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this NotificationRuleRouting object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationRuleRouting notificationRuleRouting = (NotificationRuleRouting) o; + return Objects.equals(this.mode, notificationRuleRouting.mode) + && Objects.equals(this.additionalProperties, notificationRuleRouting.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(mode, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationRuleRouting {\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/NotificationRuleRoutingMode.java b/src/main/java/com/datadog/api/client/v2/model/NotificationRuleRoutingMode.java new file mode 100644 index 00000000000..c179779cda3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/NotificationRuleRoutingMode.java @@ -0,0 +1,59 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * The routing mode for the notification rule. manual sends notifications to the + * configured targets. + */ +@JsonSerialize(using = NotificationRuleRoutingMode.NotificationRuleRoutingModeSerializer.class) +public class NotificationRuleRoutingMode extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("manual")); + + public static final NotificationRuleRoutingMode MANUAL = + new NotificationRuleRoutingMode("manual"); + + NotificationRuleRoutingMode(String value) { + super(value, allowedValues); + } + + public static class NotificationRuleRoutingModeSerializer + extends StdSerializer { + public NotificationRuleRoutingModeSerializer(Class t) { + super(t); + } + + public NotificationRuleRoutingModeSerializer() { + this(null); + } + + @Override + public void serialize( + NotificationRuleRoutingMode value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static NotificationRuleRoutingMode fromValue(String value) { + return new NotificationRuleRoutingMode(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/NotificationRulesListResponse.java b/src/main/java/com/datadog/api/client/v2/model/NotificationRulesListResponse.java new file mode 100644 index 00000000000..182a10508ef --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/NotificationRulesListResponse.java @@ -0,0 +1,150 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The list of notification rules. */ +@JsonPropertyOrder({NotificationRulesListResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class NotificationRulesListResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = null; + + public NotificationRulesListResponse data(List data) { + this.data = data; + for (NotificationRule item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public NotificationRulesListResponse addDataItem(NotificationRule dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * 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; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return NotificationRulesListResponse + */ + @JsonAnySetter + public NotificationRulesListResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this NotificationRulesListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationRulesListResponse notificationRulesListResponse = (NotificationRulesListResponse) o; + return Objects.equals(this.data, notificationRulesListResponse.data) + && Objects.equals( + this.additionalProperties, notificationRulesListResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NotificationRulesListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OAuth2WellKnownSitesAttributes.java b/src/main/java/com/datadog/api/client/v2/model/OAuth2WellKnownSitesAttributes.java new file mode 100644 index 00000000000..df678db6a22 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OAuth2WellKnownSitesAttributes.java @@ -0,0 +1,152 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes containing the list of public OAuth2 sites. */ +@JsonPropertyOrder({OAuth2WellKnownSitesAttributes.JSON_PROPERTY_SITES}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OAuth2WellKnownSitesAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_SITES = "sites"; + private List sites = new ArrayList<>(); + + public OAuth2WellKnownSitesAttributes() {} + + @JsonCreator + public OAuth2WellKnownSitesAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_SITES) List sites) { + this.sites = sites; + } + + public OAuth2WellKnownSitesAttributes sites(List sites) { + this.sites = sites; + return this; + } + + public OAuth2WellKnownSitesAttributes addSitesItem(String sitesItem) { + this.sites.add(sitesItem); + return this; + } + + /** + * Array of public OAuth2 site URLs for the environment. + * + * @return sites + */ + @JsonProperty(JSON_PROPERTY_SITES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getSites() { + return sites; + } + + public void setSites(List sites) { + this.sites = sites; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OAuth2WellKnownSitesAttributes + */ + @JsonAnySetter + public OAuth2WellKnownSitesAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OAuth2WellKnownSitesAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OAuth2WellKnownSitesAttributes oAuth2WellKnownSitesAttributes = + (OAuth2WellKnownSitesAttributes) o; + return Objects.equals(this.sites, oAuth2WellKnownSitesAttributes.sites) + && Objects.equals( + this.additionalProperties, oAuth2WellKnownSitesAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(sites, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OAuth2WellKnownSitesAttributes {\n"); + sb.append(" sites: ").append(toIndentedString(sites)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OAuth2WellKnownSitesData.java b/src/main/java/com/datadog/api/client/v2/model/OAuth2WellKnownSitesData.java new file mode 100644 index 00000000000..989e49fd616 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OAuth2WellKnownSitesData.java @@ -0,0 +1,209 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object containing OAuth2 well-known sites information. */ +@JsonPropertyOrder({ + OAuth2WellKnownSitesData.JSON_PROPERTY_ATTRIBUTES, + OAuth2WellKnownSitesData.JSON_PROPERTY_ID, + OAuth2WellKnownSitesData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OAuth2WellKnownSitesData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private OAuth2WellKnownSitesAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private OAuth2WellKnownSitesEnvType type = OAuth2WellKnownSitesEnvType.ENV; + + public OAuth2WellKnownSitesData() {} + + @JsonCreator + public OAuth2WellKnownSitesData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + OAuth2WellKnownSitesAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) OAuth2WellKnownSitesEnvType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public OAuth2WellKnownSitesData attributes(OAuth2WellKnownSitesAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes containing the list of public OAuth2 sites. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OAuth2WellKnownSitesAttributes getAttributes() { + return attributes; + } + + public void setAttributes(OAuth2WellKnownSitesAttributes attributes) { + this.attributes = attributes; + } + + public OAuth2WellKnownSitesData id(String id) { + this.id = id; + return this; + } + + /** + * Environment identifier. + * + * @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 OAuth2WellKnownSitesData type(OAuth2WellKnownSitesEnvType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * JSON:API resource type for OAuth2 well-known sites environment. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OAuth2WellKnownSitesEnvType getType() { + return type; + } + + public void setType(OAuth2WellKnownSitesEnvType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OAuth2WellKnownSitesData + */ + @JsonAnySetter + public OAuth2WellKnownSitesData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OAuth2WellKnownSitesData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OAuth2WellKnownSitesData oAuth2WellKnownSitesData = (OAuth2WellKnownSitesData) o; + return Objects.equals(this.attributes, oAuth2WellKnownSitesData.attributes) + && Objects.equals(this.id, oAuth2WellKnownSitesData.id) + && Objects.equals(this.type, oAuth2WellKnownSitesData.type) + && Objects.equals(this.additionalProperties, oAuth2WellKnownSitesData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OAuth2WellKnownSitesData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OAuth2WellKnownSitesEnvType.java b/src/main/java/com/datadog/api/client/v2/model/OAuth2WellKnownSitesEnvType.java new file mode 100644 index 00000000000..b96bf498cfa --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OAuth2WellKnownSitesEnvType.java @@ -0,0 +1,55 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** JSON:API resource type for OAuth2 well-known sites environment. */ +@JsonSerialize(using = OAuth2WellKnownSitesEnvType.OAuth2WellKnownSitesEnvTypeSerializer.class) +public class OAuth2WellKnownSitesEnvType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("env")); + + public static final OAuth2WellKnownSitesEnvType ENV = new OAuth2WellKnownSitesEnvType("env"); + + OAuth2WellKnownSitesEnvType(String value) { + super(value, allowedValues); + } + + public static class OAuth2WellKnownSitesEnvTypeSerializer + extends StdSerializer { + public OAuth2WellKnownSitesEnvTypeSerializer(Class t) { + super(t); + } + + public OAuth2WellKnownSitesEnvTypeSerializer() { + this(null); + } + + @Override + public void serialize( + OAuth2WellKnownSitesEnvType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static OAuth2WellKnownSitesEnvType fromValue(String value) { + return new OAuth2WellKnownSitesEnvType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OAuth2WellKnownSitesResponse.java b/src/main/java/com/datadog/api/client/v2/model/OAuth2WellKnownSitesResponse.java new file mode 100644 index 00000000000..c68ec5e2e49 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OAuth2WellKnownSitesResponse.java @@ -0,0 +1,146 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response payload containing the list of public OAuth2 sites for discovery. */ +@JsonPropertyOrder({OAuth2WellKnownSitesResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OAuth2WellKnownSitesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private OAuth2WellKnownSitesData data; + + public OAuth2WellKnownSitesResponse() {} + + @JsonCreator + public OAuth2WellKnownSitesResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) OAuth2WellKnownSitesData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public OAuth2WellKnownSitesResponse data(OAuth2WellKnownSitesData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object containing OAuth2 well-known sites information. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OAuth2WellKnownSitesData getData() { + return data; + } + + public void setData(OAuth2WellKnownSitesData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OAuth2WellKnownSitesResponse + */ + @JsonAnySetter + public OAuth2WellKnownSitesResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OAuth2WellKnownSitesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OAuth2WellKnownSitesResponse oAuth2WellKnownSitesResponse = (OAuth2WellKnownSitesResponse) o; + return Objects.equals(this.data, oAuth2WellKnownSitesResponse.data) + && Objects.equals( + this.additionalProperties, oAuth2WellKnownSitesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OAuth2WellKnownSitesResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineConfigProcessorItem.java b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineConfigProcessorItem.java index 5507e67af27..e3f1a3d6e13 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineConfigProcessorItem.java +++ b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineConfigProcessorItem.java @@ -545,6 +545,59 @@ public ObservabilityPipelineConfigProcessorItem deserialize( e); } + // deserialize ObservabilityPipelineGenerateMetricsV2Processor + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ObservabilityPipelineGenerateMetricsV2Processor.class.equals(Integer.class) + || ObservabilityPipelineGenerateMetricsV2Processor.class.equals(Long.class) + || ObservabilityPipelineGenerateMetricsV2Processor.class.equals(Float.class) + || ObservabilityPipelineGenerateMetricsV2Processor.class.equals(Double.class) + || ObservabilityPipelineGenerateMetricsV2Processor.class.equals(Boolean.class) + || ObservabilityPipelineGenerateMetricsV2Processor.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((ObservabilityPipelineGenerateMetricsV2Processor.class.equals(Integer.class) + || ObservabilityPipelineGenerateMetricsV2Processor.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((ObservabilityPipelineGenerateMetricsV2Processor.class.equals(Float.class) + || ObservabilityPipelineGenerateMetricsV2Processor.class.equals( + Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (ObservabilityPipelineGenerateMetricsV2Processor.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (ObservabilityPipelineGenerateMetricsV2Processor.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(ObservabilityPipelineGenerateMetricsV2Processor.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((ObservabilityPipelineGenerateMetricsV2Processor) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema 'ObservabilityPipelineGenerateMetricsV2Processor'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'ObservabilityPipelineGenerateMetricsV2Processor'", + e); + } + // deserialize ObservabilityPipelineOcsfMapperProcessor try { boolean attemptParsing = true; @@ -1491,6 +1544,12 @@ public ObservabilityPipelineConfigProcessorItem(ObservabilityPipelineGenerateMet setActualInstance(o); } + public ObservabilityPipelineConfigProcessorItem( + ObservabilityPipelineGenerateMetricsV2Processor o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public ObservabilityPipelineConfigProcessorItem(ObservabilityPipelineOcsfMapperProcessor o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -1607,6 +1666,9 @@ public ObservabilityPipelineConfigProcessorItem( schemas.put( "ObservabilityPipelineGenerateMetricsProcessor", new GenericType() {}); + schemas.put( + "ObservabilityPipelineGenerateMetricsV2Processor", + new GenericType() {}); schemas.put( "ObservabilityPipelineOcsfMapperProcessor", new GenericType() {}); @@ -1674,14 +1736,15 @@ public Map getSchemas() { * ObservabilityPipelineAddHostnameProcessor, ObservabilityPipelineCustomProcessor, * ObservabilityPipelineDatadogTagsProcessor, ObservabilityPipelineDedupeProcessor, * ObservabilityPipelineEnrichmentTableProcessor, ObservabilityPipelineGenerateMetricsProcessor, - * ObservabilityPipelineOcsfMapperProcessor, ObservabilityPipelineParseGrokProcessor, - * ObservabilityPipelineParseJSONProcessor, ObservabilityPipelineParseXMLProcessor, - * ObservabilityPipelineQuotaProcessor, ObservabilityPipelineReduceProcessor, - * ObservabilityPipelineRemoveFieldsProcessor, ObservabilityPipelineRenameFieldsProcessor, - * ObservabilityPipelineSampleProcessor, ObservabilityPipelineSensitiveDataScannerProcessor, - * ObservabilityPipelineSplitArrayProcessor, ObservabilityPipelineThrottleProcessor, - * ObservabilityPipelineAddMetricTagsProcessor, ObservabilityPipelineAggregateProcessor, - * ObservabilityPipelineMetricTagsProcessor, ObservabilityPipelineRenameMetricTagsProcessor, + * ObservabilityPipelineGenerateMetricsV2Processor, ObservabilityPipelineOcsfMapperProcessor, + * ObservabilityPipelineParseGrokProcessor, ObservabilityPipelineParseJSONProcessor, + * ObservabilityPipelineParseXMLProcessor, ObservabilityPipelineQuotaProcessor, + * ObservabilityPipelineReduceProcessor, ObservabilityPipelineRemoveFieldsProcessor, + * ObservabilityPipelineRenameFieldsProcessor, ObservabilityPipelineSampleProcessor, + * ObservabilityPipelineSensitiveDataScannerProcessor, ObservabilityPipelineSplitArrayProcessor, + * ObservabilityPipelineThrottleProcessor, ObservabilityPipelineAddMetricTagsProcessor, + * ObservabilityPipelineAggregateProcessor, ObservabilityPipelineMetricTagsProcessor, + * ObservabilityPipelineRenameMetricTagsProcessor, * ObservabilityPipelineTagCardinalityLimitProcessor * *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a @@ -1734,6 +1797,11 @@ public void setActualInstance(Object instance) { super.setActualInstance(instance); return; } + if (JSON.isInstanceOf( + ObservabilityPipelineGenerateMetricsV2Processor.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } if (JSON.isInstanceOf( ObservabilityPipelineOcsfMapperProcessor.class, instance, new HashSet>())) { super.setActualInstance(instance); @@ -1835,6 +1903,7 @@ public void setActualInstance(Object instance) { + " ObservabilityPipelineDatadogTagsProcessor, ObservabilityPipelineDedupeProcessor," + " ObservabilityPipelineEnrichmentTableProcessor," + " ObservabilityPipelineGenerateMetricsProcessor," + + " ObservabilityPipelineGenerateMetricsV2Processor," + " ObservabilityPipelineOcsfMapperProcessor, ObservabilityPipelineParseGrokProcessor," + " ObservabilityPipelineParseJSONProcessor, ObservabilityPipelineParseXMLProcessor," + " ObservabilityPipelineQuotaProcessor, ObservabilityPipelineReduceProcessor," @@ -1854,14 +1923,15 @@ public void setActualInstance(Object instance) { * ObservabilityPipelineAddHostnameProcessor, ObservabilityPipelineCustomProcessor, * ObservabilityPipelineDatadogTagsProcessor, ObservabilityPipelineDedupeProcessor, * ObservabilityPipelineEnrichmentTableProcessor, ObservabilityPipelineGenerateMetricsProcessor, - * ObservabilityPipelineOcsfMapperProcessor, ObservabilityPipelineParseGrokProcessor, - * ObservabilityPipelineParseJSONProcessor, ObservabilityPipelineParseXMLProcessor, - * ObservabilityPipelineQuotaProcessor, ObservabilityPipelineReduceProcessor, - * ObservabilityPipelineRemoveFieldsProcessor, ObservabilityPipelineRenameFieldsProcessor, - * ObservabilityPipelineSampleProcessor, ObservabilityPipelineSensitiveDataScannerProcessor, - * ObservabilityPipelineSplitArrayProcessor, ObservabilityPipelineThrottleProcessor, - * ObservabilityPipelineAddMetricTagsProcessor, ObservabilityPipelineAggregateProcessor, - * ObservabilityPipelineMetricTagsProcessor, ObservabilityPipelineRenameMetricTagsProcessor, + * ObservabilityPipelineGenerateMetricsV2Processor, ObservabilityPipelineOcsfMapperProcessor, + * ObservabilityPipelineParseGrokProcessor, ObservabilityPipelineParseJSONProcessor, + * ObservabilityPipelineParseXMLProcessor, ObservabilityPipelineQuotaProcessor, + * ObservabilityPipelineReduceProcessor, ObservabilityPipelineRemoveFieldsProcessor, + * ObservabilityPipelineRenameFieldsProcessor, ObservabilityPipelineSampleProcessor, + * ObservabilityPipelineSensitiveDataScannerProcessor, ObservabilityPipelineSplitArrayProcessor, + * ObservabilityPipelineThrottleProcessor, ObservabilityPipelineAddMetricTagsProcessor, + * ObservabilityPipelineAggregateProcessor, ObservabilityPipelineMetricTagsProcessor, + * ObservabilityPipelineRenameMetricTagsProcessor, * ObservabilityPipelineTagCardinalityLimitProcessor * * @return The actual instance (ObservabilityPipelineFilterProcessor, @@ -1869,7 +1939,8 @@ public void setActualInstance(Object instance) { * ObservabilityPipelineAddHostnameProcessor, ObservabilityPipelineCustomProcessor, * ObservabilityPipelineDatadogTagsProcessor, ObservabilityPipelineDedupeProcessor, * ObservabilityPipelineEnrichmentTableProcessor, - * ObservabilityPipelineGenerateMetricsProcessor, ObservabilityPipelineOcsfMapperProcessor, + * ObservabilityPipelineGenerateMetricsProcessor, + * ObservabilityPipelineGenerateMetricsV2Processor, ObservabilityPipelineOcsfMapperProcessor, * ObservabilityPipelineParseGrokProcessor, ObservabilityPipelineParseJSONProcessor, * ObservabilityPipelineParseXMLProcessor, ObservabilityPipelineQuotaProcessor, * ObservabilityPipelineReduceProcessor, ObservabilityPipelineRemoveFieldsProcessor, @@ -1997,6 +2068,20 @@ public ObservabilityPipelineDedupeProcessor getObservabilityPipelineDedupeProces return (ObservabilityPipelineGenerateMetricsProcessor) super.getActualInstance(); } + /** + * Get the actual instance of `ObservabilityPipelineGenerateMetricsV2Processor`. If the actual + * instance is not `ObservabilityPipelineGenerateMetricsV2Processor`, the ClassCastException will + * be thrown. + * + * @return The actual instance of `ObservabilityPipelineGenerateMetricsV2Processor` + * @throws ClassCastException if the instance is not + * `ObservabilityPipelineGenerateMetricsV2Processor` + */ + public ObservabilityPipelineGenerateMetricsV2Processor + getObservabilityPipelineGenerateMetricsV2Processor() throws ClassCastException { + return (ObservabilityPipelineGenerateMetricsV2Processor) super.getActualInstance(); + } + /** * Get the actual instance of `ObservabilityPipelineOcsfMapperProcessor`. If the actual instance * is not `ObservabilityPipelineOcsfMapperProcessor`, the ClassCastException will be thrown. diff --git a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineGenerateMetricsV2Processor.java b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineGenerateMetricsV2Processor.java new file mode 100644 index 00000000000..256fcd0996e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineGenerateMetricsV2Processor.java @@ -0,0 +1,320 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * The generate_metrics processor creates custom metrics from logs. Metrics can be + * counters, gauges, or distributions and optionally grouped by log fields. The generated metrics + * must be routed to a metrics destination using the input <processor-id>.metrics + * . + * + *

Supported pipeline types: logs + */ +@JsonPropertyOrder({ + ObservabilityPipelineGenerateMetricsV2Processor.JSON_PROPERTY_DISPLAY_NAME, + ObservabilityPipelineGenerateMetricsV2Processor.JSON_PROPERTY_ENABLED, + ObservabilityPipelineGenerateMetricsV2Processor.JSON_PROPERTY_ID, + ObservabilityPipelineGenerateMetricsV2Processor.JSON_PROPERTY_INCLUDE, + ObservabilityPipelineGenerateMetricsV2Processor.JSON_PROPERTY_METRICS, + ObservabilityPipelineGenerateMetricsV2Processor.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ObservabilityPipelineGenerateMetricsV2Processor { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DISPLAY_NAME = "display_name"; + private String displayName; + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_INCLUDE = "include"; + private String include; + + public static final String JSON_PROPERTY_METRICS = "metrics"; + private List metrics = null; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ObservabilityPipelineGenerateMetricsV2ProcessorType type = + ObservabilityPipelineGenerateMetricsV2ProcessorType.GENERATE_METRICS; + + public ObservabilityPipelineGenerateMetricsV2Processor() {} + + @JsonCreator + public ObservabilityPipelineGenerateMetricsV2Processor( + @JsonProperty(required = true, value = JSON_PROPERTY_ENABLED) Boolean enabled, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + ObservabilityPipelineGenerateMetricsV2ProcessorType type) { + this.enabled = enabled; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ObservabilityPipelineGenerateMetricsV2Processor displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * The display name for a component. + * + * @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 ObservabilityPipelineGenerateMetricsV2Processor enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Indicates whether the processor is enabled. + * + * @return enabled + */ + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public ObservabilityPipelineGenerateMetricsV2Processor id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier for this component. Used to reference this component in other parts of + * the pipeline. + * + * @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 ObservabilityPipelineGenerateMetricsV2Processor include(String include) { + this.include = include; + return this; + } + + /** + * A Datadog search query used to determine which logs this processor targets. + * + * @return include + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getInclude() { + return include; + } + + public void setInclude(String include) { + this.include = include; + } + + public ObservabilityPipelineGenerateMetricsV2Processor metrics( + List metrics) { + this.metrics = metrics; + for (ObservabilityPipelineGeneratedMetric item : metrics) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ObservabilityPipelineGenerateMetricsV2Processor addMetricsItem( + ObservabilityPipelineGeneratedMetric metricsItem) { + if (this.metrics == null) { + this.metrics = new ArrayList<>(); + } + this.metrics.add(metricsItem); + this.unparsed |= metricsItem.unparsed; + return this; + } + + /** + * Configuration for generating individual metrics. + * + * @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 ObservabilityPipelineGenerateMetricsV2Processor type( + ObservabilityPipelineGenerateMetricsV2ProcessorType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The processor type. Always generate_metrics. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ObservabilityPipelineGenerateMetricsV2ProcessorType getType() { + return type; + } + + public void setType(ObservabilityPipelineGenerateMetricsV2ProcessorType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ObservabilityPipelineGenerateMetricsV2Processor + */ + @JsonAnySetter + public ObservabilityPipelineGenerateMetricsV2Processor putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ObservabilityPipelineGenerateMetricsV2Processor object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ObservabilityPipelineGenerateMetricsV2Processor + observabilityPipelineGenerateMetricsV2Processor = + (ObservabilityPipelineGenerateMetricsV2Processor) o; + return Objects.equals( + this.displayName, observabilityPipelineGenerateMetricsV2Processor.displayName) + && Objects.equals(this.enabled, observabilityPipelineGenerateMetricsV2Processor.enabled) + && Objects.equals(this.id, observabilityPipelineGenerateMetricsV2Processor.id) + && Objects.equals(this.include, observabilityPipelineGenerateMetricsV2Processor.include) + && Objects.equals(this.metrics, observabilityPipelineGenerateMetricsV2Processor.metrics) + && Objects.equals(this.type, observabilityPipelineGenerateMetricsV2Processor.type) + && Objects.equals( + this.additionalProperties, + observabilityPipelineGenerateMetricsV2Processor.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(displayName, enabled, id, include, metrics, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ObservabilityPipelineGenerateMetricsV2Processor {\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" include: ").append(toIndentedString(include)).append("\n"); + sb.append(" metrics: ").append(toIndentedString(metrics)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineGenerateMetricsV2ProcessorType.java b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineGenerateMetricsV2ProcessorType.java new file mode 100644 index 00000000000..204d2a6aec4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineGenerateMetricsV2ProcessorType.java @@ -0,0 +1,63 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The processor type. Always generate_metrics. */ +@JsonSerialize( + using = + ObservabilityPipelineGenerateMetricsV2ProcessorType + .ObservabilityPipelineGenerateMetricsV2ProcessorTypeSerializer.class) +public class ObservabilityPipelineGenerateMetricsV2ProcessorType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("generate_metrics")); + + public static final ObservabilityPipelineGenerateMetricsV2ProcessorType GENERATE_METRICS = + new ObservabilityPipelineGenerateMetricsV2ProcessorType("generate_metrics"); + + ObservabilityPipelineGenerateMetricsV2ProcessorType(String value) { + super(value, allowedValues); + } + + public static class ObservabilityPipelineGenerateMetricsV2ProcessorTypeSerializer + extends StdSerializer { + public ObservabilityPipelineGenerateMetricsV2ProcessorTypeSerializer( + Class t) { + super(t); + } + + public ObservabilityPipelineGenerateMetricsV2ProcessorTypeSerializer() { + this(null); + } + + @Override + public void serialize( + ObservabilityPipelineGenerateMetricsV2ProcessorType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ObservabilityPipelineGenerateMetricsV2ProcessorType fromValue(String value) { + return new ObservabilityPipelineGenerateMetricsV2ProcessorType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OrgSAMLPreferencesAttributes.java b/src/main/java/com/datadog/api/client/v2/model/OrgSAMLPreferencesAttributes.java new file mode 100644 index 00000000000..4d3c2d99d6f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OrgSAMLPreferencesAttributes.java @@ -0,0 +1,190 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Attributes for updating an organization's SAML preferences. */ +@JsonPropertyOrder({ + OrgSAMLPreferencesAttributes.JSON_PROPERTY_DEFAULT_ROLE_UUIDS, + OrgSAMLPreferencesAttributes.JSON_PROPERTY_JIT_DOMAINS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OrgSAMLPreferencesAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DEFAULT_ROLE_UUIDS = "default_role_uuids"; + private List defaultRoleUuids = new ArrayList<>(); + + public static final String JSON_PROPERTY_JIT_DOMAINS = "jit_domains"; + private List jitDomains = new ArrayList<>(); + + public OrgSAMLPreferencesAttributes() {} + + @JsonCreator + public OrgSAMLPreferencesAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_DEFAULT_ROLE_UUIDS) + List defaultRoleUuids, + @JsonProperty(required = true, value = JSON_PROPERTY_JIT_DOMAINS) List jitDomains) { + this.defaultRoleUuids = defaultRoleUuids; + this.jitDomains = jitDomains; + } + + public OrgSAMLPreferencesAttributes defaultRoleUuids(List defaultRoleUuids) { + this.defaultRoleUuids = defaultRoleUuids; + return this; + } + + public OrgSAMLPreferencesAttributes addDefaultRoleUuidsItem(UUID defaultRoleUuidsItem) { + this.defaultRoleUuids.add(defaultRoleUuidsItem); + return this; + } + + /** + * The UUID of the default role assigned to just-in-time provisioned users. Exactly one role UUID + * must be provided. + * + * @return defaultRoleUuids + */ + @JsonProperty(JSON_PROPERTY_DEFAULT_ROLE_UUIDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getDefaultRoleUuids() { + return defaultRoleUuids; + } + + public void setDefaultRoleUuids(List defaultRoleUuids) { + this.defaultRoleUuids = defaultRoleUuids; + } + + public OrgSAMLPreferencesAttributes jitDomains(List jitDomains) { + this.jitDomains = jitDomains; + return this; + } + + public OrgSAMLPreferencesAttributes addJitDomainsItem(String jitDomainsItem) { + this.jitDomains.add(jitDomainsItem); + return this; + } + + /** + * Email domains for which users are automatically provisioned on first SAML login (just-in-time + * provisioning). + * + * @return jitDomains + */ + @JsonProperty(JSON_PROPERTY_JIT_DOMAINS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getJitDomains() { + return jitDomains; + } + + public void setJitDomains(List jitDomains) { + this.jitDomains = jitDomains; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OrgSAMLPreferencesAttributes + */ + @JsonAnySetter + public OrgSAMLPreferencesAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OrgSAMLPreferencesAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrgSAMLPreferencesAttributes orgSamlPreferencesAttributes = (OrgSAMLPreferencesAttributes) o; + return Objects.equals(this.defaultRoleUuids, orgSamlPreferencesAttributes.defaultRoleUuids) + && Objects.equals(this.jitDomains, orgSamlPreferencesAttributes.jitDomains) + && Objects.equals( + this.additionalProperties, orgSamlPreferencesAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(defaultRoleUuids, jitDomains, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrgSAMLPreferencesAttributes {\n"); + sb.append(" defaultRoleUuids: ").append(toIndentedString(defaultRoleUuids)).append("\n"); + sb.append(" jitDomains: ").append(toIndentedString(jitDomains)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OrgSAMLPreferencesData.java b/src/main/java/com/datadog/api/client/v2/model/OrgSAMLPreferencesData.java new file mode 100644 index 00000000000..25188d12204 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OrgSAMLPreferencesData.java @@ -0,0 +1,208 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data for updating an organization's SAML preferences. */ +@JsonPropertyOrder({ + OrgSAMLPreferencesData.JSON_PROPERTY_ATTRIBUTES, + OrgSAMLPreferencesData.JSON_PROPERTY_ID, + OrgSAMLPreferencesData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OrgSAMLPreferencesData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private OrgSAMLPreferencesAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private OrgSAMLPreferencesType type = OrgSAMLPreferencesType.SAML_PREFERENCES; + + public OrgSAMLPreferencesData() {} + + @JsonCreator + public OrgSAMLPreferencesData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + OrgSAMLPreferencesAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) OrgSAMLPreferencesType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public OrgSAMLPreferencesData attributes(OrgSAMLPreferencesAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for updating an organization's SAML preferences. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OrgSAMLPreferencesAttributes getAttributes() { + return attributes; + } + + public void setAttributes(OrgSAMLPreferencesAttributes attributes) { + this.attributes = attributes; + } + + public OrgSAMLPreferencesData id(String id) { + this.id = id; + return this; + } + + /** + * The identifier of the SAML preferences resource. + * + * @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 OrgSAMLPreferencesData type(OrgSAMLPreferencesType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * SAML preferences resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OrgSAMLPreferencesType getType() { + return type; + } + + public void setType(OrgSAMLPreferencesType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OrgSAMLPreferencesData + */ + @JsonAnySetter + public OrgSAMLPreferencesData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OrgSAMLPreferencesData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrgSAMLPreferencesData orgSamlPreferencesData = (OrgSAMLPreferencesData) o; + return Objects.equals(this.attributes, orgSamlPreferencesData.attributes) + && Objects.equals(this.id, orgSamlPreferencesData.id) + && Objects.equals(this.type, orgSamlPreferencesData.type) + && Objects.equals(this.additionalProperties, orgSamlPreferencesData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrgSAMLPreferencesData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OrgSAMLPreferencesType.java b/src/main/java/com/datadog/api/client/v2/model/OrgSAMLPreferencesType.java new file mode 100644 index 00000000000..00c7ff9c5ad --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OrgSAMLPreferencesType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** SAML preferences resource type. */ +@JsonSerialize(using = OrgSAMLPreferencesType.OrgSAMLPreferencesTypeSerializer.class) +public class OrgSAMLPreferencesType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("saml_preferences")); + + public static final OrgSAMLPreferencesType SAML_PREFERENCES = + new OrgSAMLPreferencesType("saml_preferences"); + + OrgSAMLPreferencesType(String value) { + super(value, allowedValues); + } + + public static class OrgSAMLPreferencesTypeSerializer + extends StdSerializer { + public OrgSAMLPreferencesTypeSerializer(Class t) { + super(t); + } + + public OrgSAMLPreferencesTypeSerializer() { + this(null); + } + + @Override + public void serialize( + OrgSAMLPreferencesType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static OrgSAMLPreferencesType fromValue(String value) { + return new OrgSAMLPreferencesType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OrgSAMLPreferencesUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/OrgSAMLPreferencesUpdateRequest.java new file mode 100644 index 00000000000..70d23c3724a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OrgSAMLPreferencesUpdateRequest.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to update an organization's SAML preferences. */ +@JsonPropertyOrder({OrgSAMLPreferencesUpdateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OrgSAMLPreferencesUpdateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private OrgSAMLPreferencesData data; + + public OrgSAMLPreferencesUpdateRequest() {} + + @JsonCreator + public OrgSAMLPreferencesUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) OrgSAMLPreferencesData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public OrgSAMLPreferencesUpdateRequest data(OrgSAMLPreferencesData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data for updating an organization's SAML preferences. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OrgSAMLPreferencesData getData() { + return data; + } + + public void setData(OrgSAMLPreferencesData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OrgSAMLPreferencesUpdateRequest + */ + @JsonAnySetter + public OrgSAMLPreferencesUpdateRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OrgSAMLPreferencesUpdateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrgSAMLPreferencesUpdateRequest orgSamlPreferencesUpdateRequest = + (OrgSAMLPreferencesUpdateRequest) o; + return Objects.equals(this.data, orgSamlPreferencesUpdateRequest.data) + && Objects.equals( + this.additionalProperties, orgSamlPreferencesUpdateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrgSAMLPreferencesUpdateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipEvidenceAttributes.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipEvidenceAttributes.java new file mode 100644 index 00000000000..e9e4a0b8388 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipEvidenceAttributes.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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The attributes of an ownership evidence response. */ +@JsonPropertyOrder({OwnershipEvidenceAttributes.JSON_PROPERTY_EVIDENCE_VERSIONS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OwnershipEvidenceAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EVIDENCE_VERSIONS = "evidence_versions"; + private List> evidenceVersions = new ArrayList<>(); + + public OwnershipEvidenceAttributes() {} + + @JsonCreator + public OwnershipEvidenceAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_EVIDENCE_VERSIONS) + List> evidenceVersions) { + this.evidenceVersions = evidenceVersions; + if (evidenceVersions != null) {} + } + + public OwnershipEvidenceAttributes evidenceVersions(List> evidenceVersions) { + this.evidenceVersions = evidenceVersions; + return this; + } + + public OwnershipEvidenceAttributes addEvidenceVersionsItem( + Map evidenceVersionsItem) { + this.evidenceVersions.add(evidenceVersionsItem); + return this; + } + + /** + * The list of evidence versions associated with an inference. + * + * @return evidenceVersions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVIDENCE_VERSIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getEvidenceVersions() { + return evidenceVersions; + } + + public void setEvidenceVersions(List> evidenceVersions) { + this.evidenceVersions = evidenceVersions; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OwnershipEvidenceAttributes + */ + @JsonAnySetter + public OwnershipEvidenceAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OwnershipEvidenceAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OwnershipEvidenceAttributes ownershipEvidenceAttributes = (OwnershipEvidenceAttributes) o; + return Objects.equals(this.evidenceVersions, ownershipEvidenceAttributes.evidenceVersions) + && Objects.equals( + this.additionalProperties, ownershipEvidenceAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(evidenceVersions, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OwnershipEvidenceAttributes {\n"); + sb.append(" evidenceVersions: ").append(toIndentedString(evidenceVersions)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipEvidenceData.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipEvidenceData.java new file mode 100644 index 00000000000..79e5d636c68 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipEvidenceData.java @@ -0,0 +1,210 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The data wrapper for an ownership evidence response. */ +@JsonPropertyOrder({ + OwnershipEvidenceData.JSON_PROPERTY_ATTRIBUTES, + OwnershipEvidenceData.JSON_PROPERTY_ID, + OwnershipEvidenceData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OwnershipEvidenceData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private OwnershipEvidenceAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private OwnershipEvidenceType type = OwnershipEvidenceType.OWNERSHIP_EVIDENCE; + + public OwnershipEvidenceData() {} + + @JsonCreator + public OwnershipEvidenceData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + OwnershipEvidenceAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) OwnershipEvidenceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public OwnershipEvidenceData attributes(OwnershipEvidenceAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The attributes of an ownership evidence response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipEvidenceAttributes getAttributes() { + return attributes; + } + + public void setAttributes(OwnershipEvidenceAttributes attributes) { + this.attributes = attributes; + } + + public OwnershipEvidenceData id(String id) { + this.id = id; + return this; + } + + /** + * The identifier of the resource the evidence applies to. + * + * @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 OwnershipEvidenceData type(OwnershipEvidenceType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of the ownership evidence resource. The value should always be + * ownership_evidence. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipEvidenceType getType() { + return type; + } + + public void setType(OwnershipEvidenceType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OwnershipEvidenceData + */ + @JsonAnySetter + public OwnershipEvidenceData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OwnershipEvidenceData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OwnershipEvidenceData ownershipEvidenceData = (OwnershipEvidenceData) o; + return Objects.equals(this.attributes, ownershipEvidenceData.attributes) + && Objects.equals(this.id, ownershipEvidenceData.id) + && Objects.equals(this.type, ownershipEvidenceData.type) + && Objects.equals(this.additionalProperties, ownershipEvidenceData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OwnershipEvidenceData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipEvidenceResponse.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipEvidenceResponse.java new file mode 100644 index 00000000000..cd17c2f5eee --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipEvidenceResponse.java @@ -0,0 +1,149 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * The response returned when retrieving the evidence backing an ownership inference for an owner + * type. + */ +@JsonPropertyOrder({OwnershipEvidenceResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OwnershipEvidenceResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private OwnershipEvidenceData data; + + public OwnershipEvidenceResponse() {} + + @JsonCreator + public OwnershipEvidenceResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) OwnershipEvidenceData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public OwnershipEvidenceResponse data(OwnershipEvidenceData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data wrapper for an ownership evidence response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipEvidenceData getData() { + return data; + } + + public void setData(OwnershipEvidenceData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OwnershipEvidenceResponse + */ + @JsonAnySetter + public OwnershipEvidenceResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OwnershipEvidenceResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OwnershipEvidenceResponse ownershipEvidenceResponse = (OwnershipEvidenceResponse) o; + return Objects.equals(this.data, ownershipEvidenceResponse.data) + && Objects.equals( + this.additionalProperties, ownershipEvidenceResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OwnershipEvidenceResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipEvidenceType.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipEvidenceType.java new file mode 100644 index 00000000000..58593391cf4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipEvidenceType.java @@ -0,0 +1,59 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * The type of the ownership evidence resource. The value should always be ownership_evidence + * . + */ +@JsonSerialize(using = OwnershipEvidenceType.OwnershipEvidenceTypeSerializer.class) +public class OwnershipEvidenceType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("ownership_evidence")); + + public static final OwnershipEvidenceType OWNERSHIP_EVIDENCE = + new OwnershipEvidenceType("ownership_evidence"); + + OwnershipEvidenceType(String value) { + super(value, allowedValues); + } + + public static class OwnershipEvidenceTypeSerializer extends StdSerializer { + public OwnershipEvidenceTypeSerializer(Class t) { + super(t); + } + + public OwnershipEvidenceTypeSerializer() { + this(null); + } + + @Override + public void serialize( + OwnershipEvidenceType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static OwnershipEvidenceType fromValue(String value) { + return new OwnershipEvidenceType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipFeedbackAction.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipFeedbackAction.java new file mode 100644 index 00000000000..408da89c014 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipFeedbackAction.java @@ -0,0 +1,59 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The feedback action to apply to an inference. */ +@JsonSerialize(using = OwnershipFeedbackAction.OwnershipFeedbackActionSerializer.class) +public class OwnershipFeedbackAction extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("confirm", "reject", "correct", "persist")); + + public static final OwnershipFeedbackAction CONFIRM = new OwnershipFeedbackAction("confirm"); + public static final OwnershipFeedbackAction REJECT = new OwnershipFeedbackAction("reject"); + public static final OwnershipFeedbackAction CORRECT = new OwnershipFeedbackAction("correct"); + public static final OwnershipFeedbackAction PERSIST = new OwnershipFeedbackAction("persist"); + + OwnershipFeedbackAction(String value) { + super(value, allowedValues); + } + + public static class OwnershipFeedbackActionSerializer + extends StdSerializer { + public OwnershipFeedbackActionSerializer(Class t) { + super(t); + } + + public OwnershipFeedbackActionSerializer() { + this(null); + } + + @Override + public void serialize( + OwnershipFeedbackAction value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static OwnershipFeedbackAction fromValue(String value) { + return new OwnershipFeedbackAction(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipFeedbackRequest.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipFeedbackRequest.java new file mode 100644 index 00000000000..f875eb6d3ca --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipFeedbackRequest.java @@ -0,0 +1,146 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The request body for submitting ownership feedback. */ +@JsonPropertyOrder({OwnershipFeedbackRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OwnershipFeedbackRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private OwnershipFeedbackRequestData data; + + public OwnershipFeedbackRequest() {} + + @JsonCreator + public OwnershipFeedbackRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + OwnershipFeedbackRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public OwnershipFeedbackRequest data(OwnershipFeedbackRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data wrapper for an ownership feedback request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipFeedbackRequestData getData() { + return data; + } + + public void setData(OwnershipFeedbackRequestData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OwnershipFeedbackRequest + */ + @JsonAnySetter + public OwnershipFeedbackRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OwnershipFeedbackRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OwnershipFeedbackRequest ownershipFeedbackRequest = (OwnershipFeedbackRequest) o; + return Objects.equals(this.data, ownershipFeedbackRequest.data) + && Objects.equals(this.additionalProperties, ownershipFeedbackRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OwnershipFeedbackRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipFeedbackRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipFeedbackRequestAttributes.java new file mode 100644 index 00000000000..f1862e53e26 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipFeedbackRequestAttributes.java @@ -0,0 +1,364 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** The attributes of an ownership feedback request. */ +@JsonPropertyOrder({ + OwnershipFeedbackRequestAttributes.JSON_PROPERTY_ACTION, + OwnershipFeedbackRequestAttributes.JSON_PROPERTY_ACTOR_HANDLE, + OwnershipFeedbackRequestAttributes.JSON_PROPERTY_ACTOR_TYPE, + OwnershipFeedbackRequestAttributes.JSON_PROPERTY_CORRECTED_OWNER_HANDLE, + OwnershipFeedbackRequestAttributes.JSON_PROPERTY_CORRECTED_OWNER_TYPE, + OwnershipFeedbackRequestAttributes.JSON_PROPERTY_INFERENCE_CHECKSUM, + OwnershipFeedbackRequestAttributes.JSON_PROPERTY_REASON +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OwnershipFeedbackRequestAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACTION = "action"; + private OwnershipFeedbackAction action; + + public static final String JSON_PROPERTY_ACTOR_HANDLE = "actor_handle"; + private String actorHandle; + + public static final String JSON_PROPERTY_ACTOR_TYPE = "actor_type"; + private String actorType; + + public static final String JSON_PROPERTY_CORRECTED_OWNER_HANDLE = "corrected_owner_handle"; + private JsonNullable correctedOwnerHandle = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CORRECTED_OWNER_TYPE = "corrected_owner_type"; + private JsonNullable correctedOwnerType = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_INFERENCE_CHECKSUM = "inference_checksum"; + private String inferenceChecksum; + + public static final String JSON_PROPERTY_REASON = "reason"; + private JsonNullable reason = JsonNullable.undefined(); + + public OwnershipFeedbackRequestAttributes() {} + + @JsonCreator + public OwnershipFeedbackRequestAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_ACTION) OwnershipFeedbackAction action, + @JsonProperty(required = true, value = JSON_PROPERTY_ACTOR_HANDLE) String actorHandle, + @JsonProperty(required = true, value = JSON_PROPERTY_ACTOR_TYPE) String actorType, + @JsonProperty(required = true, value = JSON_PROPERTY_INFERENCE_CHECKSUM) + String inferenceChecksum) { + this.action = action; + this.unparsed |= !action.isValid(); + this.actorHandle = actorHandle; + this.actorType = actorType; + this.inferenceChecksum = inferenceChecksum; + } + + public OwnershipFeedbackRequestAttributes action(OwnershipFeedbackAction action) { + this.action = action; + this.unparsed |= !action.isValid(); + return this; + } + + /** + * The feedback action to apply to an inference. + * + * @return action + */ + @JsonProperty(JSON_PROPERTY_ACTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipFeedbackAction getAction() { + return action; + } + + public void setAction(OwnershipFeedbackAction action) { + if (!action.isValid()) { + this.unparsed = true; + } + this.action = action; + } + + public OwnershipFeedbackRequestAttributes actorHandle(String actorHandle) { + this.actorHandle = actorHandle; + return this; + } + + /** + * The handle of the actor submitting the feedback. + * + * @return actorHandle + */ + @JsonProperty(JSON_PROPERTY_ACTOR_HANDLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getActorHandle() { + return actorHandle; + } + + public void setActorHandle(String actorHandle) { + this.actorHandle = actorHandle; + } + + public OwnershipFeedbackRequestAttributes actorType(String actorType) { + this.actorType = actorType; + return this; + } + + /** + * The type of actor submitting the feedback, for example user or service + * . + * + * @return actorType + */ + @JsonProperty(JSON_PROPERTY_ACTOR_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getActorType() { + return actorType; + } + + public void setActorType(String actorType) { + this.actorType = actorType; + } + + public OwnershipFeedbackRequestAttributes correctedOwnerHandle(String correctedOwnerHandle) { + this.correctedOwnerHandle = JsonNullable.of(correctedOwnerHandle); + return this; + } + + /** + * The corrected owner handle. Required when action is correct. + * + * @return correctedOwnerHandle + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getCorrectedOwnerHandle() { + return correctedOwnerHandle.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CORRECTED_OWNER_HANDLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getCorrectedOwnerHandle_JsonNullable() { + return correctedOwnerHandle; + } + + @JsonProperty(JSON_PROPERTY_CORRECTED_OWNER_HANDLE) + public void setCorrectedOwnerHandle_JsonNullable(JsonNullable correctedOwnerHandle) { + this.correctedOwnerHandle = correctedOwnerHandle; + } + + public void setCorrectedOwnerHandle(String correctedOwnerHandle) { + this.correctedOwnerHandle = JsonNullable.of(correctedOwnerHandle); + } + + public OwnershipFeedbackRequestAttributes correctedOwnerType(String correctedOwnerType) { + this.correctedOwnerType = JsonNullable.of(correctedOwnerType); + return this; + } + + /** + * The corrected owner type. Required when action is correct. + * + * @return correctedOwnerType + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getCorrectedOwnerType() { + return correctedOwnerType.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CORRECTED_OWNER_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getCorrectedOwnerType_JsonNullable() { + return correctedOwnerType; + } + + @JsonProperty(JSON_PROPERTY_CORRECTED_OWNER_TYPE) + public void setCorrectedOwnerType_JsonNullable(JsonNullable correctedOwnerType) { + this.correctedOwnerType = correctedOwnerType; + } + + public void setCorrectedOwnerType(String correctedOwnerType) { + this.correctedOwnerType = JsonNullable.of(correctedOwnerType); + } + + public OwnershipFeedbackRequestAttributes inferenceChecksum(String inferenceChecksum) { + this.inferenceChecksum = inferenceChecksum; + return this; + } + + /** + * The checksum of the inference being acted upon. Must match the current inference checksum or + * the request returns a conflict. + * + * @return inferenceChecksum + */ + @JsonProperty(JSON_PROPERTY_INFERENCE_CHECKSUM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getInferenceChecksum() { + return inferenceChecksum; + } + + public void setInferenceChecksum(String inferenceChecksum) { + this.inferenceChecksum = inferenceChecksum; + } + + public OwnershipFeedbackRequestAttributes reason(String reason) { + this.reason = JsonNullable.of(reason); + return this; + } + + /** + * An optional free-form reason explaining the feedback. + * + * @return reason + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getReason() { + return reason.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getReason_JsonNullable() { + return reason; + } + + @JsonProperty(JSON_PROPERTY_REASON) + public void setReason_JsonNullable(JsonNullable reason) { + this.reason = reason; + } + + public void setReason(String reason) { + this.reason = JsonNullable.of(reason); + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OwnershipFeedbackRequestAttributes + */ + @JsonAnySetter + public OwnershipFeedbackRequestAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OwnershipFeedbackRequestAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OwnershipFeedbackRequestAttributes ownershipFeedbackRequestAttributes = + (OwnershipFeedbackRequestAttributes) o; + return Objects.equals(this.action, ownershipFeedbackRequestAttributes.action) + && Objects.equals(this.actorHandle, ownershipFeedbackRequestAttributes.actorHandle) + && Objects.equals(this.actorType, ownershipFeedbackRequestAttributes.actorType) + && Objects.equals( + this.correctedOwnerHandle, ownershipFeedbackRequestAttributes.correctedOwnerHandle) + && Objects.equals( + this.correctedOwnerType, ownershipFeedbackRequestAttributes.correctedOwnerType) + && Objects.equals( + this.inferenceChecksum, ownershipFeedbackRequestAttributes.inferenceChecksum) + && Objects.equals(this.reason, ownershipFeedbackRequestAttributes.reason) + && Objects.equals( + this.additionalProperties, ownershipFeedbackRequestAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + action, + actorHandle, + actorType, + correctedOwnerHandle, + correctedOwnerType, + inferenceChecksum, + reason, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OwnershipFeedbackRequestAttributes {\n"); + sb.append(" action: ").append(toIndentedString(action)).append("\n"); + sb.append(" actorHandle: ").append(toIndentedString(actorHandle)).append("\n"); + sb.append(" actorType: ").append(toIndentedString(actorType)).append("\n"); + sb.append(" correctedOwnerHandle: ") + .append(toIndentedString(correctedOwnerHandle)) + .append("\n"); + sb.append(" correctedOwnerType: ").append(toIndentedString(correctedOwnerType)).append("\n"); + sb.append(" inferenceChecksum: ").append(toIndentedString(inferenceChecksum)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipFeedbackRequestData.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipFeedbackRequestData.java new file mode 100644 index 00000000000..9dbbf553ff8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipFeedbackRequestData.java @@ -0,0 +1,183 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The data wrapper for an ownership feedback request. */ +@JsonPropertyOrder({ + OwnershipFeedbackRequestData.JSON_PROPERTY_ATTRIBUTES, + OwnershipFeedbackRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OwnershipFeedbackRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private OwnershipFeedbackRequestAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private OwnershipFeedbackType type = OwnershipFeedbackType.OWNERSHIP_FEEDBACK; + + public OwnershipFeedbackRequestData() {} + + @JsonCreator + public OwnershipFeedbackRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + OwnershipFeedbackRequestAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) OwnershipFeedbackType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public OwnershipFeedbackRequestData attributes(OwnershipFeedbackRequestAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The attributes of an ownership feedback request. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipFeedbackRequestAttributes getAttributes() { + return attributes; + } + + public void setAttributes(OwnershipFeedbackRequestAttributes attributes) { + this.attributes = attributes; + } + + public OwnershipFeedbackRequestData type(OwnershipFeedbackType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of the ownership feedback request resource. The value should always be + * ownership_feedback. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipFeedbackType getType() { + return type; + } + + public void setType(OwnershipFeedbackType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OwnershipFeedbackRequestData + */ + @JsonAnySetter + public OwnershipFeedbackRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OwnershipFeedbackRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OwnershipFeedbackRequestData ownershipFeedbackRequestData = (OwnershipFeedbackRequestData) o; + return Objects.equals(this.attributes, ownershipFeedbackRequestData.attributes) + && Objects.equals(this.type, ownershipFeedbackRequestData.type) + && Objects.equals( + this.additionalProperties, ownershipFeedbackRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OwnershipFeedbackRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipFeedbackResponse.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipFeedbackResponse.java new file mode 100644 index 00000000000..bfe77eb0982 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipFeedbackResponse.java @@ -0,0 +1,146 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The response returned after applying ownership feedback to an inference. */ +@JsonPropertyOrder({OwnershipFeedbackResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OwnershipFeedbackResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private OwnershipFeedbackResultData data; + + public OwnershipFeedbackResponse() {} + + @JsonCreator + public OwnershipFeedbackResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) OwnershipFeedbackResultData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public OwnershipFeedbackResponse data(OwnershipFeedbackResultData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data wrapper for an ownership feedback result response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipFeedbackResultData getData() { + return data; + } + + public void setData(OwnershipFeedbackResultData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OwnershipFeedbackResponse + */ + @JsonAnySetter + public OwnershipFeedbackResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OwnershipFeedbackResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OwnershipFeedbackResponse ownershipFeedbackResponse = (OwnershipFeedbackResponse) o; + return Objects.equals(this.data, ownershipFeedbackResponse.data) + && Objects.equals( + this.additionalProperties, ownershipFeedbackResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OwnershipFeedbackResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipFeedbackResultAttributes.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipFeedbackResultAttributes.java new file mode 100644 index 00000000000..ce34990e646 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipFeedbackResultAttributes.java @@ -0,0 +1,358 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** The attributes of an ownership feedback result. */ +@JsonPropertyOrder({ + OwnershipFeedbackResultAttributes.JSON_PROPERTY_ACTION, + OwnershipFeedbackResultAttributes.JSON_PROPERTY_CHECKSUM, + OwnershipFeedbackResultAttributes.JSON_PROPERTY_NEW_STATUS, + OwnershipFeedbackResultAttributes.JSON_PROPERTY_OWNER_TYPE, + OwnershipFeedbackResultAttributes.JSON_PROPERTY_PREVIOUS_STATUS, + OwnershipFeedbackResultAttributes.JSON_PROPERTY_PRIMARY_CONTACT_REF, + OwnershipFeedbackResultAttributes.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OwnershipFeedbackResultAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACTION = "action"; + private OwnershipFeedbackAction action; + + public static final String JSON_PROPERTY_CHECKSUM = "checksum"; + private String checksum; + + public static final String JSON_PROPERTY_NEW_STATUS = "new_status"; + private OwnershipInferenceStatus newStatus; + + public static final String JSON_PROPERTY_OWNER_TYPE = "owner_type"; + private OwnershipOwnerType ownerType; + + public static final String JSON_PROPERTY_PREVIOUS_STATUS = "previous_status"; + private OwnershipInferenceStatus previousStatus; + + public static final String JSON_PROPERTY_PRIMARY_CONTACT_REF = "primary_contact_ref"; + private JsonNullable primaryContactRef = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private OffsetDateTime updatedAt; + + public OwnershipFeedbackResultAttributes() {} + + @JsonCreator + public OwnershipFeedbackResultAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_ACTION) OwnershipFeedbackAction action, + @JsonProperty(required = true, value = JSON_PROPERTY_CHECKSUM) String checksum, + @JsonProperty(required = true, value = JSON_PROPERTY_NEW_STATUS) + OwnershipInferenceStatus newStatus, + @JsonProperty(required = true, value = JSON_PROPERTY_OWNER_TYPE) OwnershipOwnerType ownerType, + @JsonProperty(required = true, value = JSON_PROPERTY_PREVIOUS_STATUS) + OwnershipInferenceStatus previousStatus, + @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt) { + this.action = action; + this.unparsed |= !action.isValid(); + this.checksum = checksum; + this.newStatus = newStatus; + this.unparsed |= !newStatus.isValid(); + this.ownerType = ownerType; + this.unparsed |= !ownerType.isValid(); + this.previousStatus = previousStatus; + this.unparsed |= !previousStatus.isValid(); + this.updatedAt = updatedAt; + } + + public OwnershipFeedbackResultAttributes action(OwnershipFeedbackAction action) { + this.action = action; + this.unparsed |= !action.isValid(); + return this; + } + + /** + * The feedback action to apply to an inference. + * + * @return action + */ + @JsonProperty(JSON_PROPERTY_ACTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipFeedbackAction getAction() { + return action; + } + + public void setAction(OwnershipFeedbackAction action) { + if (!action.isValid()) { + this.unparsed = true; + } + this.action = action; + } + + public OwnershipFeedbackResultAttributes checksum(String checksum) { + this.checksum = checksum; + return this; + } + + /** + * The checksum of the inference after the feedback was applied. + * + * @return checksum + */ + @JsonProperty(JSON_PROPERTY_CHECKSUM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getChecksum() { + return checksum; + } + + public void setChecksum(String checksum) { + this.checksum = checksum; + } + + public OwnershipFeedbackResultAttributes newStatus(OwnershipInferenceStatus newStatus) { + this.newStatus = newStatus; + this.unparsed |= !newStatus.isValid(); + return this; + } + + /** + * The lifecycle status of an ownership inference. + * + * @return newStatus + */ + @JsonProperty(JSON_PROPERTY_NEW_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipInferenceStatus getNewStatus() { + return newStatus; + } + + public void setNewStatus(OwnershipInferenceStatus newStatus) { + if (!newStatus.isValid()) { + this.unparsed = true; + } + this.newStatus = newStatus; + } + + public OwnershipFeedbackResultAttributes ownerType(OwnershipOwnerType ownerType) { + this.ownerType = ownerType; + this.unparsed |= !ownerType.isValid(); + return this; + } + + /** + * The owner type for an ownership inference. + * + * @return ownerType + */ + @JsonProperty(JSON_PROPERTY_OWNER_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipOwnerType getOwnerType() { + return ownerType; + } + + public void setOwnerType(OwnershipOwnerType ownerType) { + if (!ownerType.isValid()) { + this.unparsed = true; + } + this.ownerType = ownerType; + } + + public OwnershipFeedbackResultAttributes previousStatus(OwnershipInferenceStatus previousStatus) { + this.previousStatus = previousStatus; + this.unparsed |= !previousStatus.isValid(); + return this; + } + + /** + * The lifecycle status of an ownership inference. + * + * @return previousStatus + */ + @JsonProperty(JSON_PROPERTY_PREVIOUS_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipInferenceStatus getPreviousStatus() { + return previousStatus; + } + + public void setPreviousStatus(OwnershipInferenceStatus previousStatus) { + if (!previousStatus.isValid()) { + this.unparsed = true; + } + this.previousStatus = previousStatus; + } + + public OwnershipFeedbackResultAttributes primaryContactRef(String primaryContactRef) { + this.primaryContactRef = JsonNullable.of(primaryContactRef); + return this; + } + + /** + * The primary contact reference for the inferred owner after the feedback was applied, formatted + * as ref:handle/<owner_handle>. + * + * @return primaryContactRef + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getPrimaryContactRef() { + return primaryContactRef.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PRIMARY_CONTACT_REF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getPrimaryContactRef_JsonNullable() { + return primaryContactRef; + } + + @JsonProperty(JSON_PROPERTY_PRIMARY_CONTACT_REF) + public void setPrimaryContactRef_JsonNullable(JsonNullable primaryContactRef) { + this.primaryContactRef = primaryContactRef; + } + + public void setPrimaryContactRef(String primaryContactRef) { + this.primaryContactRef = JsonNullable.of(primaryContactRef); + } + + public OwnershipFeedbackResultAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * The time when the inference was updated by the feedback. + * + * @return updatedAt + */ + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OwnershipFeedbackResultAttributes + */ + @JsonAnySetter + public OwnershipFeedbackResultAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OwnershipFeedbackResultAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OwnershipFeedbackResultAttributes ownershipFeedbackResultAttributes = + (OwnershipFeedbackResultAttributes) o; + return Objects.equals(this.action, ownershipFeedbackResultAttributes.action) + && Objects.equals(this.checksum, ownershipFeedbackResultAttributes.checksum) + && Objects.equals(this.newStatus, ownershipFeedbackResultAttributes.newStatus) + && Objects.equals(this.ownerType, ownershipFeedbackResultAttributes.ownerType) + && Objects.equals(this.previousStatus, ownershipFeedbackResultAttributes.previousStatus) + && Objects.equals( + this.primaryContactRef, ownershipFeedbackResultAttributes.primaryContactRef) + && Objects.equals(this.updatedAt, ownershipFeedbackResultAttributes.updatedAt) + && Objects.equals( + this.additionalProperties, ownershipFeedbackResultAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + action, + checksum, + newStatus, + ownerType, + previousStatus, + primaryContactRef, + updatedAt, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OwnershipFeedbackResultAttributes {\n"); + sb.append(" action: ").append(toIndentedString(action)).append("\n"); + sb.append(" checksum: ").append(toIndentedString(checksum)).append("\n"); + sb.append(" newStatus: ").append(toIndentedString(newStatus)).append("\n"); + sb.append(" ownerType: ").append(toIndentedString(ownerType)).append("\n"); + sb.append(" previousStatus: ").append(toIndentedString(previousStatus)).append("\n"); + sb.append(" primaryContactRef: ").append(toIndentedString(primaryContactRef)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipFeedbackResultData.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipFeedbackResultData.java new file mode 100644 index 00000000000..5a4e14e01f8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipFeedbackResultData.java @@ -0,0 +1,211 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The data wrapper for an ownership feedback result response. */ +@JsonPropertyOrder({ + OwnershipFeedbackResultData.JSON_PROPERTY_ATTRIBUTES, + OwnershipFeedbackResultData.JSON_PROPERTY_ID, + OwnershipFeedbackResultData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OwnershipFeedbackResultData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private OwnershipFeedbackResultAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private OwnershipFeedbackResultType type = OwnershipFeedbackResultType.OWNERSHIP_FEEDBACK_RESULT; + + public OwnershipFeedbackResultData() {} + + @JsonCreator + public OwnershipFeedbackResultData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + OwnershipFeedbackResultAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) OwnershipFeedbackResultType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public OwnershipFeedbackResultData attributes(OwnershipFeedbackResultAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The attributes of an ownership feedback result. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipFeedbackResultAttributes getAttributes() { + return attributes; + } + + public void setAttributes(OwnershipFeedbackResultAttributes attributes) { + this.attributes = attributes; + } + + public OwnershipFeedbackResultData id(String id) { + this.id = id; + return this; + } + + /** + * The identifier of the resource that the feedback was applied to. + * + * @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 OwnershipFeedbackResultData type(OwnershipFeedbackResultType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of the ownership feedback result resource. The value should always be + * ownership_feedback_result. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipFeedbackResultType getType() { + return type; + } + + public void setType(OwnershipFeedbackResultType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OwnershipFeedbackResultData + */ + @JsonAnySetter + public OwnershipFeedbackResultData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OwnershipFeedbackResultData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OwnershipFeedbackResultData ownershipFeedbackResultData = (OwnershipFeedbackResultData) o; + return Objects.equals(this.attributes, ownershipFeedbackResultData.attributes) + && Objects.equals(this.id, ownershipFeedbackResultData.id) + && Objects.equals(this.type, ownershipFeedbackResultData.type) + && Objects.equals( + this.additionalProperties, ownershipFeedbackResultData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OwnershipFeedbackResultData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipFeedbackResultType.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipFeedbackResultType.java new file mode 100644 index 00000000000..15f2af9204f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipFeedbackResultType.java @@ -0,0 +1,60 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * The type of the ownership feedback result resource. The value should always be + * ownership_feedback_result. + */ +@JsonSerialize(using = OwnershipFeedbackResultType.OwnershipFeedbackResultTypeSerializer.class) +public class OwnershipFeedbackResultType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("ownership_feedback_result")); + + public static final OwnershipFeedbackResultType OWNERSHIP_FEEDBACK_RESULT = + new OwnershipFeedbackResultType("ownership_feedback_result"); + + OwnershipFeedbackResultType(String value) { + super(value, allowedValues); + } + + public static class OwnershipFeedbackResultTypeSerializer + extends StdSerializer { + public OwnershipFeedbackResultTypeSerializer(Class t) { + super(t); + } + + public OwnershipFeedbackResultTypeSerializer() { + this(null); + } + + @Override + public void serialize( + OwnershipFeedbackResultType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static OwnershipFeedbackResultType fromValue(String value) { + return new OwnershipFeedbackResultType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipFeedbackType.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipFeedbackType.java new file mode 100644 index 00000000000..b96d1328ea8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipFeedbackType.java @@ -0,0 +1,59 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * The type of the ownership feedback request resource. The value should always be + * ownership_feedback. + */ +@JsonSerialize(using = OwnershipFeedbackType.OwnershipFeedbackTypeSerializer.class) +public class OwnershipFeedbackType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("ownership_feedback")); + + public static final OwnershipFeedbackType OWNERSHIP_FEEDBACK = + new OwnershipFeedbackType("ownership_feedback"); + + OwnershipFeedbackType(String value) { + super(value, allowedValues); + } + + public static class OwnershipFeedbackTypeSerializer extends StdSerializer { + public OwnershipFeedbackTypeSerializer(Class t) { + super(t); + } + + public OwnershipFeedbackTypeSerializer() { + this(null); + } + + @Override + public void serialize( + OwnershipFeedbackType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static OwnershipFeedbackType fromValue(String value) { + return new OwnershipFeedbackType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipHistoryAttributes.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipHistoryAttributes.java new file mode 100644 index 00000000000..9f9502cd720 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipHistoryAttributes.java @@ -0,0 +1,188 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The attributes of an ownership history response. */ +@JsonPropertyOrder({ + OwnershipHistoryAttributes.JSON_PROPERTY_ITEMS, + OwnershipHistoryAttributes.JSON_PROPERTY_PAGINATION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OwnershipHistoryAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ITEMS = "items"; + private List items = new ArrayList<>(); + + public static final String JSON_PROPERTY_PAGINATION = "pagination"; + private OwnershipHistoryPagination pagination; + + public OwnershipHistoryAttributes() {} + + @JsonCreator + public OwnershipHistoryAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_ITEMS) List items, + @JsonProperty(required = true, value = JSON_PROPERTY_PAGINATION) + OwnershipHistoryPagination pagination) { + this.items = items; + this.pagination = pagination; + this.unparsed |= pagination.unparsed; + } + + public OwnershipHistoryAttributes items(List items) { + this.items = items; + for (OwnershipHistoryItem item : items) { + this.unparsed |= item.unparsed; + } + return this; + } + + public OwnershipHistoryAttributes addItemsItem(OwnershipHistoryItem itemsItem) { + this.items.add(itemsItem); + this.unparsed |= itemsItem.unparsed; + return this; + } + + /** + * The list of history entries returned for this page. + * + * @return items + */ + @JsonProperty(JSON_PROPERTY_ITEMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getItems() { + return items; + } + + public void setItems(List items) { + this.items = items; + } + + public OwnershipHistoryAttributes pagination(OwnershipHistoryPagination pagination) { + this.pagination = pagination; + this.unparsed |= pagination.unparsed; + return this; + } + + /** + * Cursor-based pagination metadata for the history response. + * + * @return pagination + */ + @JsonProperty(JSON_PROPERTY_PAGINATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipHistoryPagination getPagination() { + return pagination; + } + + public void setPagination(OwnershipHistoryPagination pagination) { + this.pagination = pagination; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OwnershipHistoryAttributes + */ + @JsonAnySetter + public OwnershipHistoryAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OwnershipHistoryAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OwnershipHistoryAttributes ownershipHistoryAttributes = (OwnershipHistoryAttributes) o; + return Objects.equals(this.items, ownershipHistoryAttributes.items) + && Objects.equals(this.pagination, ownershipHistoryAttributes.pagination) + && Objects.equals( + this.additionalProperties, ownershipHistoryAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(items, pagination, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OwnershipHistoryAttributes {\n"); + sb.append(" items: ").append(toIndentedString(items)).append("\n"); + sb.append(" pagination: ").append(toIndentedString(pagination)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipHistoryData.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipHistoryData.java new file mode 100644 index 00000000000..8100b7e514f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipHistoryData.java @@ -0,0 +1,210 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The data wrapper for an ownership history response. */ +@JsonPropertyOrder({ + OwnershipHistoryData.JSON_PROPERTY_ATTRIBUTES, + OwnershipHistoryData.JSON_PROPERTY_ID, + OwnershipHistoryData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OwnershipHistoryData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private OwnershipHistoryAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private OwnershipHistoryType type = OwnershipHistoryType.OWNERSHIP_HISTORY; + + public OwnershipHistoryData() {} + + @JsonCreator + public OwnershipHistoryData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + OwnershipHistoryAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) OwnershipHistoryType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public OwnershipHistoryData attributes(OwnershipHistoryAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The attributes of an ownership history response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipHistoryAttributes getAttributes() { + return attributes; + } + + public void setAttributes(OwnershipHistoryAttributes attributes) { + this.attributes = attributes; + } + + public OwnershipHistoryData id(String id) { + this.id = id; + return this; + } + + /** + * The resource identifier for which history is returned. + * + * @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 OwnershipHistoryData type(OwnershipHistoryType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of the ownership history resource. The value should always be ownership_history + * . + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipHistoryType getType() { + return type; + } + + public void setType(OwnershipHistoryType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OwnershipHistoryData + */ + @JsonAnySetter + public OwnershipHistoryData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OwnershipHistoryData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OwnershipHistoryData ownershipHistoryData = (OwnershipHistoryData) o; + return Objects.equals(this.attributes, ownershipHistoryData.attributes) + && Objects.equals(this.id, ownershipHistoryData.id) + && Objects.equals(this.type, ownershipHistoryData.type) + && Objects.equals(this.additionalProperties, ownershipHistoryData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OwnershipHistoryData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipHistoryItem.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipHistoryItem.java new file mode 100644 index 00000000000..7084f55c26c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipHistoryItem.java @@ -0,0 +1,592 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** A single ownership inference history entry. */ +@JsonPropertyOrder({ + OwnershipHistoryItem.JSON_PROPERTY_CHECKSUM, + OwnershipHistoryItem.JSON_PROPERTY_CONFIDENCE, + OwnershipHistoryItem.JSON_PROPERTY_CREATED_AT, + OwnershipHistoryItem.JSON_PROPERTY_EVIDENCE_VERSIONS, + OwnershipHistoryItem.JSON_PROPERTY_EXPLANATION, + OwnershipHistoryItem.JSON_PROPERTY_FAILED_AT, + OwnershipHistoryItem.JSON_PROPERTY_FAILURE_REASON, + OwnershipHistoryItem.JSON_PROPERTY_ID, + OwnershipHistoryItem.JSON_PROPERTY_OWNER_TYPE, + OwnershipHistoryItem.JSON_PROPERTY_PRIMARY_CONTACT_REF, + OwnershipHistoryItem.JSON_PROPERTY_RESOURCE_ID, + OwnershipHistoryItem.JSON_PROPERTY_RETRY_SCHEDULE, + OwnershipHistoryItem.JSON_PROPERTY_SOURCES, + OwnershipHistoryItem.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OwnershipHistoryItem { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CHECKSUM = "checksum"; + private String checksum; + + public static final String JSON_PROPERTY_CONFIDENCE = "confidence"; + private String confidence; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_EVIDENCE_VERSIONS = "evidence_versions"; + private List> evidenceVersions = new ArrayList<>(); + + public static final String JSON_PROPERTY_EXPLANATION = "explanation"; + private String explanation; + + public static final String JSON_PROPERTY_FAILED_AT = "failed_at"; + private JsonNullable failedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_FAILURE_REASON = "failure_reason"; + private JsonNullable failureReason = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_OWNER_TYPE = "owner_type"; + private OwnershipOwnerType ownerType; + + public static final String JSON_PROPERTY_PRIMARY_CONTACT_REF = "primary_contact_ref"; + private JsonNullable primaryContactRef = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_RESOURCE_ID = "resource_id"; + private String resourceId; + + public static final String JSON_PROPERTY_RETRY_SCHEDULE = "retry_schedule"; + private JsonNullable retrySchedule = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SOURCES = "sources"; + private List> sources = new ArrayList<>(); + + public static final String JSON_PROPERTY_STATUS = "status"; + private OwnershipInferenceStatus status; + + public OwnershipHistoryItem() {} + + @JsonCreator + public OwnershipHistoryItem( + @JsonProperty(required = true, value = JSON_PROPERTY_CHECKSUM) String checksum, + @JsonProperty(required = true, value = JSON_PROPERTY_CONFIDENCE) String confidence, + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_EVIDENCE_VERSIONS) + List> evidenceVersions, + @JsonProperty(required = true, value = JSON_PROPERTY_EXPLANATION) String explanation, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) Long id, + @JsonProperty(required = true, value = JSON_PROPERTY_OWNER_TYPE) OwnershipOwnerType ownerType, + @JsonProperty(required = true, value = JSON_PROPERTY_RESOURCE_ID) String resourceId, + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCES) + List> sources, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) + OwnershipInferenceStatus status) { + this.checksum = checksum; + this.confidence = confidence; + this.createdAt = createdAt; + this.evidenceVersions = evidenceVersions; + if (evidenceVersions != null) {} + this.explanation = explanation; + this.id = id; + this.ownerType = ownerType; + this.unparsed |= !ownerType.isValid(); + this.resourceId = resourceId; + this.sources = sources; + this.status = status; + this.unparsed |= !status.isValid(); + } + + public OwnershipHistoryItem checksum(String checksum) { + this.checksum = checksum; + return this; + } + + /** + * A checksum identifying the state of the inference at this point in time. + * + * @return checksum + */ + @JsonProperty(JSON_PROPERTY_CHECKSUM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getChecksum() { + return checksum; + } + + public void setChecksum(String checksum) { + this.checksum = checksum; + } + + public OwnershipHistoryItem confidence(String confidence) { + this.confidence = confidence; + return this; + } + + /** + * The confidence score of the inference, expressed as a numeric string with up to four decimal + * places. + * + * @return confidence + */ + @JsonProperty(JSON_PROPERTY_CONFIDENCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getConfidence() { + return confidence; + } + + public void setConfidence(String confidence) { + this.confidence = confidence; + } + + public OwnershipHistoryItem createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The time this history entry was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public OwnershipHistoryItem evidenceVersions(List> evidenceVersions) { + this.evidenceVersions = evidenceVersions; + return this; + } + + public OwnershipHistoryItem addEvidenceVersionsItem(Map evidenceVersionsItem) { + this.evidenceVersions.add(evidenceVersionsItem); + return this; + } + + /** + * The list of evidence versions associated with an inference. + * + * @return evidenceVersions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVIDENCE_VERSIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getEvidenceVersions() { + return evidenceVersions; + } + + public void setEvidenceVersions(List> evidenceVersions) { + this.evidenceVersions = evidenceVersions; + } + + public OwnershipHistoryItem explanation(String explanation) { + this.explanation = explanation; + return this; + } + + /** + * A human-readable explanation of how the inference was produced. + * + * @return explanation + */ + @JsonProperty(JSON_PROPERTY_EXPLANATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getExplanation() { + return explanation; + } + + public void setExplanation(String explanation) { + this.explanation = explanation; + } + + public OwnershipHistoryItem failedAt(OffsetDateTime failedAt) { + this.failedAt = JsonNullable.of(failedAt); + return this; + } + + /** + * The time when this inference failed, if applicable. + * + * @return failedAt + */ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getFailedAt() { + return failedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_FAILED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getFailedAt_JsonNullable() { + return failedAt; + } + + @JsonProperty(JSON_PROPERTY_FAILED_AT) + public void setFailedAt_JsonNullable(JsonNullable failedAt) { + this.failedAt = failedAt; + } + + public void setFailedAt(OffsetDateTime failedAt) { + this.failedAt = JsonNullable.of(failedAt); + } + + public OwnershipHistoryItem failureReason(String failureReason) { + this.failureReason = JsonNullable.of(failureReason); + return this; + } + + /** + * The reason why this inference failed, if applicable. + * + * @return failureReason + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getFailureReason() { + return failureReason.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_FAILURE_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getFailureReason_JsonNullable() { + return failureReason; + } + + @JsonProperty(JSON_PROPERTY_FAILURE_REASON) + public void setFailureReason_JsonNullable(JsonNullable failureReason) { + this.failureReason = failureReason; + } + + public void setFailureReason(String failureReason) { + this.failureReason = JsonNullable.of(failureReason); + } + + public OwnershipHistoryItem id(Long id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the history entry. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public OwnershipHistoryItem ownerType(OwnershipOwnerType ownerType) { + this.ownerType = ownerType; + this.unparsed |= !ownerType.isValid(); + return this; + } + + /** + * The owner type for an ownership inference. + * + * @return ownerType + */ + @JsonProperty(JSON_PROPERTY_OWNER_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipOwnerType getOwnerType() { + return ownerType; + } + + public void setOwnerType(OwnershipOwnerType ownerType) { + if (!ownerType.isValid()) { + this.unparsed = true; + } + this.ownerType = ownerType; + } + + public OwnershipHistoryItem primaryContactRef(String primaryContactRef) { + this.primaryContactRef = JsonNullable.of(primaryContactRef); + return this; + } + + /** + * The primary contact reference for the inferred owner, formatted as + * ref:handle/<owner_handle>. + * + * @return primaryContactRef + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getPrimaryContactRef() { + return primaryContactRef.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PRIMARY_CONTACT_REF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getPrimaryContactRef_JsonNullable() { + return primaryContactRef; + } + + @JsonProperty(JSON_PROPERTY_PRIMARY_CONTACT_REF) + public void setPrimaryContactRef_JsonNullable(JsonNullable primaryContactRef) { + this.primaryContactRef = primaryContactRef; + } + + public void setPrimaryContactRef(String primaryContactRef) { + this.primaryContactRef = JsonNullable.of(primaryContactRef); + } + + public OwnershipHistoryItem resourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * The identifier of the resource that the inference applies to. + * + * @return resourceId + */ + @JsonProperty(JSON_PROPERTY_RESOURCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public OwnershipHistoryItem retrySchedule(OffsetDateTime retrySchedule) { + this.retrySchedule = JsonNullable.of(retrySchedule); + return this; + } + + /** + * The scheduled retry time for a failed inference, if applicable. + * + * @return retrySchedule + */ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getRetrySchedule() { + return retrySchedule.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_RETRY_SCHEDULE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getRetrySchedule_JsonNullable() { + return retrySchedule; + } + + @JsonProperty(JSON_PROPERTY_RETRY_SCHEDULE) + public void setRetrySchedule_JsonNullable(JsonNullable retrySchedule) { + this.retrySchedule = retrySchedule; + } + + public void setRetrySchedule(OffsetDateTime retrySchedule) { + this.retrySchedule = JsonNullable.of(retrySchedule); + } + + public OwnershipHistoryItem sources(List> sources) { + this.sources = sources; + return this; + } + + public OwnershipHistoryItem addSourcesItem(Map sourcesItem) { + this.sources.add(sourcesItem); + return this; + } + + /** + * The list of sources backing an ownership inference. Empty when the inference status is not + * whitelisted to expose sources. + * + * @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 OwnershipHistoryItem status(OwnershipInferenceStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * The lifecycle status of an ownership inference. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipInferenceStatus getStatus() { + return status; + } + + public void setStatus(OwnershipInferenceStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OwnershipHistoryItem + */ + @JsonAnySetter + public OwnershipHistoryItem putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OwnershipHistoryItem object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OwnershipHistoryItem ownershipHistoryItem = (OwnershipHistoryItem) o; + return Objects.equals(this.checksum, ownershipHistoryItem.checksum) + && Objects.equals(this.confidence, ownershipHistoryItem.confidence) + && Objects.equals(this.createdAt, ownershipHistoryItem.createdAt) + && Objects.equals(this.evidenceVersions, ownershipHistoryItem.evidenceVersions) + && Objects.equals(this.explanation, ownershipHistoryItem.explanation) + && Objects.equals(this.failedAt, ownershipHistoryItem.failedAt) + && Objects.equals(this.failureReason, ownershipHistoryItem.failureReason) + && Objects.equals(this.id, ownershipHistoryItem.id) + && Objects.equals(this.ownerType, ownershipHistoryItem.ownerType) + && Objects.equals(this.primaryContactRef, ownershipHistoryItem.primaryContactRef) + && Objects.equals(this.resourceId, ownershipHistoryItem.resourceId) + && Objects.equals(this.retrySchedule, ownershipHistoryItem.retrySchedule) + && Objects.equals(this.sources, ownershipHistoryItem.sources) + && Objects.equals(this.status, ownershipHistoryItem.status) + && Objects.equals(this.additionalProperties, ownershipHistoryItem.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + checksum, + confidence, + createdAt, + evidenceVersions, + explanation, + failedAt, + failureReason, + id, + ownerType, + primaryContactRef, + resourceId, + retrySchedule, + sources, + status, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OwnershipHistoryItem {\n"); + sb.append(" checksum: ").append(toIndentedString(checksum)).append("\n"); + sb.append(" confidence: ").append(toIndentedString(confidence)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" evidenceVersions: ").append(toIndentedString(evidenceVersions)).append("\n"); + sb.append(" explanation: ").append(toIndentedString(explanation)).append("\n"); + sb.append(" failedAt: ").append(toIndentedString(failedAt)).append("\n"); + sb.append(" failureReason: ").append(toIndentedString(failureReason)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" ownerType: ").append(toIndentedString(ownerType)).append("\n"); + sb.append(" primaryContactRef: ").append(toIndentedString(primaryContactRef)).append("\n"); + sb.append(" resourceId: ").append(toIndentedString(resourceId)).append("\n"); + sb.append(" retrySchedule: ").append(toIndentedString(retrySchedule)).append("\n"); + sb.append(" sources: ").append(toIndentedString(sources)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipHistoryPagination.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipHistoryPagination.java new file mode 100644 index 00000000000..801cf870620 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipHistoryPagination.java @@ -0,0 +1,185 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Cursor-based pagination metadata for the history response. */ +@JsonPropertyOrder({ + OwnershipHistoryPagination.JSON_PROPERTY_HAS_MORE, + OwnershipHistoryPagination.JSON_PROPERTY_NEXT_CURSOR +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OwnershipHistoryPagination { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_HAS_MORE = "has_more"; + private Boolean hasMore; + + public static final String JSON_PROPERTY_NEXT_CURSOR = "next_cursor"; + private JsonNullable nextCursor = JsonNullable.undefined(); + + public OwnershipHistoryPagination() {} + + @JsonCreator + public OwnershipHistoryPagination( + @JsonProperty(required = true, value = JSON_PROPERTY_HAS_MORE) Boolean hasMore) { + this.hasMore = hasMore; + } + + public OwnershipHistoryPagination hasMore(Boolean hasMore) { + this.hasMore = hasMore; + return this; + } + + /** + * Whether more history entries are available beyond this page. + * + * @return hasMore + */ + @JsonProperty(JSON_PROPERTY_HAS_MORE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getHasMore() { + return hasMore; + } + + public void setHasMore(Boolean hasMore) { + this.hasMore = hasMore; + } + + public OwnershipHistoryPagination nextCursor(String nextCursor) { + this.nextCursor = JsonNullable.of(nextCursor); + return this; + } + + /** + * An opaque, base64-encoded cursor token. Pass it as the cursor query parameter to + * retrieve the next page. Absent or null when there are no further pages. + * + * @return nextCursor + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getNextCursor() { + return nextCursor.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NEXT_CURSOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getNextCursor_JsonNullable() { + return nextCursor; + } + + @JsonProperty(JSON_PROPERTY_NEXT_CURSOR) + public void setNextCursor_JsonNullable(JsonNullable nextCursor) { + this.nextCursor = nextCursor; + } + + public void setNextCursor(String nextCursor) { + this.nextCursor = JsonNullable.of(nextCursor); + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OwnershipHistoryPagination + */ + @JsonAnySetter + public OwnershipHistoryPagination putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OwnershipHistoryPagination object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OwnershipHistoryPagination ownershipHistoryPagination = (OwnershipHistoryPagination) o; + return Objects.equals(this.hasMore, ownershipHistoryPagination.hasMore) + && Objects.equals(this.nextCursor, ownershipHistoryPagination.nextCursor) + && Objects.equals( + this.additionalProperties, ownershipHistoryPagination.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(hasMore, nextCursor, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OwnershipHistoryPagination {\n"); + sb.append(" hasMore: ").append(toIndentedString(hasMore)).append("\n"); + sb.append(" nextCursor: ").append(toIndentedString(nextCursor)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipHistoryResponse.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipHistoryResponse.java new file mode 100644 index 00000000000..8c293117b2a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipHistoryResponse.java @@ -0,0 +1,145 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The response returned when listing the inference history for a resource. */ +@JsonPropertyOrder({OwnershipHistoryResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OwnershipHistoryResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private OwnershipHistoryData data; + + public OwnershipHistoryResponse() {} + + @JsonCreator + public OwnershipHistoryResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) OwnershipHistoryData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public OwnershipHistoryResponse data(OwnershipHistoryData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data wrapper for an ownership history response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipHistoryData getData() { + return data; + } + + public void setData(OwnershipHistoryData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OwnershipHistoryResponse + */ + @JsonAnySetter + public OwnershipHistoryResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OwnershipHistoryResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OwnershipHistoryResponse ownershipHistoryResponse = (OwnershipHistoryResponse) o; + return Objects.equals(this.data, ownershipHistoryResponse.data) + && Objects.equals(this.additionalProperties, ownershipHistoryResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OwnershipHistoryResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipHistoryType.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipHistoryType.java new file mode 100644 index 00000000000..f6f542163db --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipHistoryType.java @@ -0,0 +1,59 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * The type of the ownership history resource. The value should always be ownership_history + * . + */ +@JsonSerialize(using = OwnershipHistoryType.OwnershipHistoryTypeSerializer.class) +public class OwnershipHistoryType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("ownership_history")); + + public static final OwnershipHistoryType OWNERSHIP_HISTORY = + new OwnershipHistoryType("ownership_history"); + + OwnershipHistoryType(String value) { + super(value, allowedValues); + } + + public static class OwnershipHistoryTypeSerializer extends StdSerializer { + public OwnershipHistoryTypeSerializer(Class t) { + super(t); + } + + public OwnershipHistoryTypeSerializer() { + this(null); + } + + @Override + public void serialize( + OwnershipHistoryType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static OwnershipHistoryType fromValue(String value) { + return new OwnershipHistoryType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipInferenceAttributes.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipInferenceAttributes.java new file mode 100644 index 00000000000..92610a0d54d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipInferenceAttributes.java @@ -0,0 +1,451 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** The attributes of a single ownership inference. */ +@JsonPropertyOrder({ + OwnershipInferenceAttributes.JSON_PROPERTY_CHECKSUM, + OwnershipInferenceAttributes.JSON_PROPERTY_CONFIDENCE, + OwnershipInferenceAttributes.JSON_PROPERTY_CREATED_AT, + OwnershipInferenceAttributes.JSON_PROPERTY_EVIDENCE_VERSIONS, + OwnershipInferenceAttributes.JSON_PROPERTY_EXPLANATION, + OwnershipInferenceAttributes.JSON_PROPERTY_OWNER_TYPE, + OwnershipInferenceAttributes.JSON_PROPERTY_PRIMARY_CONTACT_REF, + OwnershipInferenceAttributes.JSON_PROPERTY_SOURCES, + OwnershipInferenceAttributes.JSON_PROPERTY_STATUS, + OwnershipInferenceAttributes.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OwnershipInferenceAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CHECKSUM = "checksum"; + private String checksum; + + public static final String JSON_PROPERTY_CONFIDENCE = "confidence"; + private String confidence; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_EVIDENCE_VERSIONS = "evidence_versions"; + private List> evidenceVersions = new ArrayList<>(); + + public static final String JSON_PROPERTY_EXPLANATION = "explanation"; + private String explanation; + + public static final String JSON_PROPERTY_OWNER_TYPE = "owner_type"; + private OwnershipOwnerType ownerType; + + public static final String JSON_PROPERTY_PRIMARY_CONTACT_REF = "primary_contact_ref"; + private JsonNullable primaryContactRef = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SOURCES = "sources"; + private List> sources = new ArrayList<>(); + + public static final String JSON_PROPERTY_STATUS = "status"; + private OwnershipInferenceStatus status; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private OffsetDateTime updatedAt; + + public OwnershipInferenceAttributes() {} + + @JsonCreator + public OwnershipInferenceAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CHECKSUM) String checksum, + @JsonProperty(required = true, value = JSON_PROPERTY_CONFIDENCE) String confidence, + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_EVIDENCE_VERSIONS) + List> evidenceVersions, + @JsonProperty(required = true, value = JSON_PROPERTY_EXPLANATION) String explanation, + @JsonProperty(required = true, value = JSON_PROPERTY_OWNER_TYPE) OwnershipOwnerType ownerType, + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCES) + List> sources, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) OwnershipInferenceStatus status, + @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt) { + this.checksum = checksum; + this.confidence = confidence; + this.createdAt = createdAt; + this.evidenceVersions = evidenceVersions; + if (evidenceVersions != null) {} + this.explanation = explanation; + this.ownerType = ownerType; + this.unparsed |= !ownerType.isValid(); + this.sources = sources; + this.status = status; + this.unparsed |= !status.isValid(); + this.updatedAt = updatedAt; + } + + public OwnershipInferenceAttributes checksum(String checksum) { + this.checksum = checksum; + return this; + } + + /** + * A checksum that uniquely identifies the current state of the inference. Required when + * submitting feedback. + * + * @return checksum + */ + @JsonProperty(JSON_PROPERTY_CHECKSUM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getChecksum() { + return checksum; + } + + public void setChecksum(String checksum) { + this.checksum = checksum; + } + + public OwnershipInferenceAttributes confidence(String confidence) { + this.confidence = confidence; + return this; + } + + /** + * The confidence score of the inference, expressed as a numeric string with up to four decimal + * places. + * + * @return confidence + */ + @JsonProperty(JSON_PROPERTY_CONFIDENCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getConfidence() { + return confidence; + } + + public void setConfidence(String confidence) { + this.confidence = confidence; + } + + public OwnershipInferenceAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The time when the inference was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public OwnershipInferenceAttributes evidenceVersions(List> evidenceVersions) { + this.evidenceVersions = evidenceVersions; + return this; + } + + public OwnershipInferenceAttributes addEvidenceVersionsItem( + Map evidenceVersionsItem) { + this.evidenceVersions.add(evidenceVersionsItem); + return this; + } + + /** + * The list of evidence versions associated with an inference. + * + * @return evidenceVersions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVIDENCE_VERSIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getEvidenceVersions() { + return evidenceVersions; + } + + public void setEvidenceVersions(List> evidenceVersions) { + this.evidenceVersions = evidenceVersions; + } + + public OwnershipInferenceAttributes explanation(String explanation) { + this.explanation = explanation; + return this; + } + + /** + * A human-readable explanation of how the inference was produced. + * + * @return explanation + */ + @JsonProperty(JSON_PROPERTY_EXPLANATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getExplanation() { + return explanation; + } + + public void setExplanation(String explanation) { + this.explanation = explanation; + } + + public OwnershipInferenceAttributes ownerType(OwnershipOwnerType ownerType) { + this.ownerType = ownerType; + this.unparsed |= !ownerType.isValid(); + return this; + } + + /** + * The owner type for an ownership inference. + * + * @return ownerType + */ + @JsonProperty(JSON_PROPERTY_OWNER_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipOwnerType getOwnerType() { + return ownerType; + } + + public void setOwnerType(OwnershipOwnerType ownerType) { + if (!ownerType.isValid()) { + this.unparsed = true; + } + this.ownerType = ownerType; + } + + public OwnershipInferenceAttributes primaryContactRef(String primaryContactRef) { + this.primaryContactRef = JsonNullable.of(primaryContactRef); + return this; + } + + /** + * The primary contact reference for the inferred owner, formatted as + * ref:handle/<owner_handle>. + * + * @return primaryContactRef + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getPrimaryContactRef() { + return primaryContactRef.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PRIMARY_CONTACT_REF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getPrimaryContactRef_JsonNullable() { + return primaryContactRef; + } + + @JsonProperty(JSON_PROPERTY_PRIMARY_CONTACT_REF) + public void setPrimaryContactRef_JsonNullable(JsonNullable primaryContactRef) { + this.primaryContactRef = primaryContactRef; + } + + public void setPrimaryContactRef(String primaryContactRef) { + this.primaryContactRef = JsonNullable.of(primaryContactRef); + } + + public OwnershipInferenceAttributes sources(List> sources) { + this.sources = sources; + return this; + } + + public OwnershipInferenceAttributes addSourcesItem(Map sourcesItem) { + this.sources.add(sourcesItem); + return this; + } + + /** + * The list of sources backing an ownership inference. Empty when the inference status is not + * whitelisted to expose sources. + * + * @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 OwnershipInferenceAttributes status(OwnershipInferenceStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * The lifecycle status of an ownership inference. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipInferenceStatus getStatus() { + return status; + } + + public void setStatus(OwnershipInferenceStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + + public OwnershipInferenceAttributes updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * The time when the inference was last updated. + * + * @return updatedAt + */ + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OwnershipInferenceAttributes + */ + @JsonAnySetter + public OwnershipInferenceAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OwnershipInferenceAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OwnershipInferenceAttributes ownershipInferenceAttributes = (OwnershipInferenceAttributes) o; + return Objects.equals(this.checksum, ownershipInferenceAttributes.checksum) + && Objects.equals(this.confidence, ownershipInferenceAttributes.confidence) + && Objects.equals(this.createdAt, ownershipInferenceAttributes.createdAt) + && Objects.equals(this.evidenceVersions, ownershipInferenceAttributes.evidenceVersions) + && Objects.equals(this.explanation, ownershipInferenceAttributes.explanation) + && Objects.equals(this.ownerType, ownershipInferenceAttributes.ownerType) + && Objects.equals(this.primaryContactRef, ownershipInferenceAttributes.primaryContactRef) + && Objects.equals(this.sources, ownershipInferenceAttributes.sources) + && Objects.equals(this.status, ownershipInferenceAttributes.status) + && Objects.equals(this.updatedAt, ownershipInferenceAttributes.updatedAt) + && Objects.equals( + this.additionalProperties, ownershipInferenceAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + checksum, + confidence, + createdAt, + evidenceVersions, + explanation, + ownerType, + primaryContactRef, + sources, + status, + updatedAt, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OwnershipInferenceAttributes {\n"); + sb.append(" checksum: ").append(toIndentedString(checksum)).append("\n"); + sb.append(" confidence: ").append(toIndentedString(confidence)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" evidenceVersions: ").append(toIndentedString(evidenceVersions)).append("\n"); + sb.append(" explanation: ").append(toIndentedString(explanation)).append("\n"); + sb.append(" ownerType: ").append(toIndentedString(ownerType)).append("\n"); + sb.append(" primaryContactRef: ").append(toIndentedString(primaryContactRef)).append("\n"); + sb.append(" sources: ").append(toIndentedString(sources)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipInferenceData.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipInferenceData.java new file mode 100644 index 00000000000..0d9d3a6aac3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipInferenceData.java @@ -0,0 +1,210 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The data wrapper for a single ownership inference response. */ +@JsonPropertyOrder({ + OwnershipInferenceData.JSON_PROPERTY_ATTRIBUTES, + OwnershipInferenceData.JSON_PROPERTY_ID, + OwnershipInferenceData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OwnershipInferenceData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private OwnershipInferenceAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private OwnershipInferenceType type = OwnershipInferenceType.OWNERSHIP_INFERENCE; + + public OwnershipInferenceData() {} + + @JsonCreator + public OwnershipInferenceData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + OwnershipInferenceAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) OwnershipInferenceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public OwnershipInferenceData attributes(OwnershipInferenceAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The attributes of a single ownership inference. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipInferenceAttributes getAttributes() { + return attributes; + } + + public void setAttributes(OwnershipInferenceAttributes attributes) { + this.attributes = attributes; + } + + public OwnershipInferenceData id(String id) { + this.id = id; + return this; + } + + /** + * The identifier of the inference, formatted as resource_id:owner_type. + * + * @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 OwnershipInferenceData type(OwnershipInferenceType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of the ownership inference resource. The value should always be + * ownership_inference. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipInferenceType getType() { + return type; + } + + public void setType(OwnershipInferenceType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OwnershipInferenceData + */ + @JsonAnySetter + public OwnershipInferenceData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OwnershipInferenceData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OwnershipInferenceData ownershipInferenceData = (OwnershipInferenceData) o; + return Objects.equals(this.attributes, ownershipInferenceData.attributes) + && Objects.equals(this.id, ownershipInferenceData.id) + && Objects.equals(this.type, ownershipInferenceData.type) + && Objects.equals(this.additionalProperties, ownershipInferenceData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OwnershipInferenceData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipInferenceItem.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipInferenceItem.java new file mode 100644 index 00000000000..9db4003b5af --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipInferenceItem.java @@ -0,0 +1,478 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** A single ownership inference, scoped to a specific owner type. */ +@JsonPropertyOrder({ + OwnershipInferenceItem.JSON_PROPERTY_CHECKSUM, + OwnershipInferenceItem.JSON_PROPERTY_CONFIDENCE, + OwnershipInferenceItem.JSON_PROPERTY_CREATED_AT, + OwnershipInferenceItem.JSON_PROPERTY_EVIDENCE_VERSIONS, + OwnershipInferenceItem.JSON_PROPERTY_EXPLANATION, + OwnershipInferenceItem.JSON_PROPERTY_ID, + OwnershipInferenceItem.JSON_PROPERTY_OWNER_TYPE, + OwnershipInferenceItem.JSON_PROPERTY_PRIMARY_CONTACT_REF, + OwnershipInferenceItem.JSON_PROPERTY_SOURCES, + OwnershipInferenceItem.JSON_PROPERTY_STATUS, + OwnershipInferenceItem.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OwnershipInferenceItem { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CHECKSUM = "checksum"; + private String checksum; + + public static final String JSON_PROPERTY_CONFIDENCE = "confidence"; + private String confidence; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_EVIDENCE_VERSIONS = "evidence_versions"; + private List> evidenceVersions = new ArrayList<>(); + + public static final String JSON_PROPERTY_EXPLANATION = "explanation"; + private String explanation; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_OWNER_TYPE = "owner_type"; + private OwnershipOwnerType ownerType; + + public static final String JSON_PROPERTY_PRIMARY_CONTACT_REF = "primary_contact_ref"; + private JsonNullable primaryContactRef = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_SOURCES = "sources"; + private List> sources = new ArrayList<>(); + + public static final String JSON_PROPERTY_STATUS = "status"; + private OwnershipInferenceStatus status; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private OffsetDateTime updatedAt; + + public OwnershipInferenceItem() {} + + @JsonCreator + public OwnershipInferenceItem( + @JsonProperty(required = true, value = JSON_PROPERTY_CHECKSUM) String checksum, + @JsonProperty(required = true, value = JSON_PROPERTY_CONFIDENCE) String confidence, + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_EVIDENCE_VERSIONS) + List> evidenceVersions, + @JsonProperty(required = true, value = JSON_PROPERTY_EXPLANATION) String explanation, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_OWNER_TYPE) OwnershipOwnerType ownerType, + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCES) + List> sources, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) OwnershipInferenceStatus status, + @JsonProperty(required = true, value = JSON_PROPERTY_UPDATED_AT) OffsetDateTime updatedAt) { + this.checksum = checksum; + this.confidence = confidence; + this.createdAt = createdAt; + this.evidenceVersions = evidenceVersions; + if (evidenceVersions != null) {} + this.explanation = explanation; + this.id = id; + this.ownerType = ownerType; + this.unparsed |= !ownerType.isValid(); + this.sources = sources; + this.status = status; + this.unparsed |= !status.isValid(); + this.updatedAt = updatedAt; + } + + public OwnershipInferenceItem checksum(String checksum) { + this.checksum = checksum; + return this; + } + + /** + * A checksum that uniquely identifies the current state of the inference. Required when + * submitting feedback. + * + * @return checksum + */ + @JsonProperty(JSON_PROPERTY_CHECKSUM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getChecksum() { + return checksum; + } + + public void setChecksum(String checksum) { + this.checksum = checksum; + } + + public OwnershipInferenceItem confidence(String confidence) { + this.confidence = confidence; + return this; + } + + /** + * The confidence score of the inference, expressed as a numeric string with up to four decimal + * places. + * + * @return confidence + */ + @JsonProperty(JSON_PROPERTY_CONFIDENCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getConfidence() { + return confidence; + } + + public void setConfidence(String confidence) { + this.confidence = confidence; + } + + public OwnershipInferenceItem createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The time when the inference was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public OwnershipInferenceItem evidenceVersions(List> evidenceVersions) { + this.evidenceVersions = evidenceVersions; + return this; + } + + public OwnershipInferenceItem addEvidenceVersionsItem(Map evidenceVersionsItem) { + this.evidenceVersions.add(evidenceVersionsItem); + return this; + } + + /** + * The list of evidence versions associated with an inference. + * + * @return evidenceVersions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVIDENCE_VERSIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List> getEvidenceVersions() { + return evidenceVersions; + } + + public void setEvidenceVersions(List> evidenceVersions) { + this.evidenceVersions = evidenceVersions; + } + + public OwnershipInferenceItem explanation(String explanation) { + this.explanation = explanation; + return this; + } + + /** + * A human-readable explanation of how the inference was produced. + * + * @return explanation + */ + @JsonProperty(JSON_PROPERTY_EXPLANATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getExplanation() { + return explanation; + } + + public void setExplanation(String explanation) { + this.explanation = explanation; + } + + public OwnershipInferenceItem id(String id) { + this.id = id; + return this; + } + + /** + * The identifier of the inference, formatted as resource_id:owner_type. + * + * @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 OwnershipInferenceItem ownerType(OwnershipOwnerType ownerType) { + this.ownerType = ownerType; + this.unparsed |= !ownerType.isValid(); + return this; + } + + /** + * The owner type for an ownership inference. + * + * @return ownerType + */ + @JsonProperty(JSON_PROPERTY_OWNER_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipOwnerType getOwnerType() { + return ownerType; + } + + public void setOwnerType(OwnershipOwnerType ownerType) { + if (!ownerType.isValid()) { + this.unparsed = true; + } + this.ownerType = ownerType; + } + + public OwnershipInferenceItem primaryContactRef(String primaryContactRef) { + this.primaryContactRef = JsonNullable.of(primaryContactRef); + return this; + } + + /** + * The primary contact reference for the inferred owner, formatted as + * ref:handle/<owner_handle>. + * + * @return primaryContactRef + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getPrimaryContactRef() { + return primaryContactRef.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_PRIMARY_CONTACT_REF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getPrimaryContactRef_JsonNullable() { + return primaryContactRef; + } + + @JsonProperty(JSON_PROPERTY_PRIMARY_CONTACT_REF) + public void setPrimaryContactRef_JsonNullable(JsonNullable primaryContactRef) { + this.primaryContactRef = primaryContactRef; + } + + public void setPrimaryContactRef(String primaryContactRef) { + this.primaryContactRef = JsonNullable.of(primaryContactRef); + } + + public OwnershipInferenceItem sources(List> sources) { + this.sources = sources; + return this; + } + + public OwnershipInferenceItem addSourcesItem(Map sourcesItem) { + this.sources.add(sourcesItem); + return this; + } + + /** + * The list of sources backing an ownership inference. Empty when the inference status is not + * whitelisted to expose sources. + * + * @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 OwnershipInferenceItem status(OwnershipInferenceStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * The lifecycle status of an ownership inference. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipInferenceStatus getStatus() { + return status; + } + + public void setStatus(OwnershipInferenceStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + + public OwnershipInferenceItem updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * The time when the inference was last updated. + * + * @return updatedAt + */ + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OwnershipInferenceItem + */ + @JsonAnySetter + public OwnershipInferenceItem putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OwnershipInferenceItem object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OwnershipInferenceItem ownershipInferenceItem = (OwnershipInferenceItem) o; + return Objects.equals(this.checksum, ownershipInferenceItem.checksum) + && Objects.equals(this.confidence, ownershipInferenceItem.confidence) + && Objects.equals(this.createdAt, ownershipInferenceItem.createdAt) + && Objects.equals(this.evidenceVersions, ownershipInferenceItem.evidenceVersions) + && Objects.equals(this.explanation, ownershipInferenceItem.explanation) + && Objects.equals(this.id, ownershipInferenceItem.id) + && Objects.equals(this.ownerType, ownershipInferenceItem.ownerType) + && Objects.equals(this.primaryContactRef, ownershipInferenceItem.primaryContactRef) + && Objects.equals(this.sources, ownershipInferenceItem.sources) + && Objects.equals(this.status, ownershipInferenceItem.status) + && Objects.equals(this.updatedAt, ownershipInferenceItem.updatedAt) + && Objects.equals(this.additionalProperties, ownershipInferenceItem.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + checksum, + confidence, + createdAt, + evidenceVersions, + explanation, + id, + ownerType, + primaryContactRef, + sources, + status, + updatedAt, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OwnershipInferenceItem {\n"); + sb.append(" checksum: ").append(toIndentedString(checksum)).append("\n"); + sb.append(" confidence: ").append(toIndentedString(confidence)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" evidenceVersions: ").append(toIndentedString(evidenceVersions)).append("\n"); + sb.append(" explanation: ").append(toIndentedString(explanation)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" ownerType: ").append(toIndentedString(ownerType)).append("\n"); + sb.append(" primaryContactRef: ").append(toIndentedString(primaryContactRef)).append("\n"); + sb.append(" sources: ").append(toIndentedString(sources)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipInferenceListAttributes.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipInferenceListAttributes.java new file mode 100644 index 00000000000..e3bb1e54428 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipInferenceListAttributes.java @@ -0,0 +1,157 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The attributes of the ownership inferences collection response. */ +@JsonPropertyOrder({OwnershipInferenceListAttributes.JSON_PROPERTY_ITEMS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OwnershipInferenceListAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ITEMS = "items"; + private List items = new ArrayList<>(); + + public OwnershipInferenceListAttributes() {} + + @JsonCreator + public OwnershipInferenceListAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_ITEMS) + List items) { + this.items = items; + } + + public OwnershipInferenceListAttributes items(List items) { + this.items = items; + for (OwnershipInferenceItem item : items) { + this.unparsed |= item.unparsed; + } + return this; + } + + public OwnershipInferenceListAttributes addItemsItem(OwnershipInferenceItem itemsItem) { + this.items.add(itemsItem); + this.unparsed |= itemsItem.unparsed; + return this; + } + + /** + * The list of inferences for a resource, with one inference per owner type. + * + * @return items + */ + @JsonProperty(JSON_PROPERTY_ITEMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getItems() { + return items; + } + + public void setItems(List items) { + this.items = items; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OwnershipInferenceListAttributes + */ + @JsonAnySetter + public OwnershipInferenceListAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OwnershipInferenceListAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OwnershipInferenceListAttributes ownershipInferenceListAttributes = + (OwnershipInferenceListAttributes) o; + return Objects.equals(this.items, ownershipInferenceListAttributes.items) + && Objects.equals( + this.additionalProperties, ownershipInferenceListAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(items, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OwnershipInferenceListAttributes {\n"); + sb.append(" items: ").append(toIndentedString(items)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipInferenceListData.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipInferenceListData.java new file mode 100644 index 00000000000..a62a3346ffb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipInferenceListData.java @@ -0,0 +1,211 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The data wrapper for the ownership inferences collection response. */ +@JsonPropertyOrder({ + OwnershipInferenceListData.JSON_PROPERTY_ATTRIBUTES, + OwnershipInferenceListData.JSON_PROPERTY_ID, + OwnershipInferenceListData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OwnershipInferenceListData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private OwnershipInferenceListAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private OwnershipInferencesType type = OwnershipInferencesType.OWNERSHIP_INFERENCES; + + public OwnershipInferenceListData() {} + + @JsonCreator + public OwnershipInferenceListData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + OwnershipInferenceListAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) OwnershipInferencesType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public OwnershipInferenceListData attributes(OwnershipInferenceListAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The attributes of the ownership inferences collection response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipInferenceListAttributes getAttributes() { + return attributes; + } + + public void setAttributes(OwnershipInferenceListAttributes attributes) { + this.attributes = attributes; + } + + public OwnershipInferenceListData id(String id) { + this.id = id; + return this; + } + + /** + * The resource identifier associated with the returned inferences. + * + * @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 OwnershipInferenceListData type(OwnershipInferencesType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of the ownership inferences collection resource. The value should always be + * ownership_inferences. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipInferencesType getType() { + return type; + } + + public void setType(OwnershipInferencesType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OwnershipInferenceListData + */ + @JsonAnySetter + public OwnershipInferenceListData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OwnershipInferenceListData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OwnershipInferenceListData ownershipInferenceListData = (OwnershipInferenceListData) o; + return Objects.equals(this.attributes, ownershipInferenceListData.attributes) + && Objects.equals(this.id, ownershipInferenceListData.id) + && Objects.equals(this.type, ownershipInferenceListData.type) + && Objects.equals( + this.additionalProperties, ownershipInferenceListData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OwnershipInferenceListData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipInferenceListResponse.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipInferenceListResponse.java new file mode 100644 index 00000000000..068cb0714af --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipInferenceListResponse.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The response returned when listing all current ownership inferences for a resource. */ +@JsonPropertyOrder({OwnershipInferenceListResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OwnershipInferenceListResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private OwnershipInferenceListData data; + + public OwnershipInferenceListResponse() {} + + @JsonCreator + public OwnershipInferenceListResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) OwnershipInferenceListData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public OwnershipInferenceListResponse data(OwnershipInferenceListData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data wrapper for the ownership inferences collection response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipInferenceListData getData() { + return data; + } + + public void setData(OwnershipInferenceListData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OwnershipInferenceListResponse + */ + @JsonAnySetter + public OwnershipInferenceListResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OwnershipInferenceListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OwnershipInferenceListResponse ownershipInferenceListResponse = + (OwnershipInferenceListResponse) o; + return Objects.equals(this.data, ownershipInferenceListResponse.data) + && Objects.equals( + this.additionalProperties, ownershipInferenceListResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OwnershipInferenceListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipInferenceResponse.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipInferenceResponse.java new file mode 100644 index 00000000000..e158b5349b2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipInferenceResponse.java @@ -0,0 +1,146 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The response returned when retrieving a single ownership inference for an owner type. */ +@JsonPropertyOrder({OwnershipInferenceResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class OwnershipInferenceResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private OwnershipInferenceData data; + + public OwnershipInferenceResponse() {} + + @JsonCreator + public OwnershipInferenceResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) OwnershipInferenceData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public OwnershipInferenceResponse data(OwnershipInferenceData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data wrapper for a single ownership inference response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OwnershipInferenceData getData() { + return data; + } + + public void setData(OwnershipInferenceData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return OwnershipInferenceResponse + */ + @JsonAnySetter + public OwnershipInferenceResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this OwnershipInferenceResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OwnershipInferenceResponse ownershipInferenceResponse = (OwnershipInferenceResponse) o; + return Objects.equals(this.data, ownershipInferenceResponse.data) + && Objects.equals( + this.additionalProperties, ownershipInferenceResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OwnershipInferenceResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipInferenceStatus.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipInferenceStatus.java new file mode 100644 index 00000000000..65ae9b2a11a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipInferenceStatus.java @@ -0,0 +1,64 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The lifecycle status of an ownership inference. */ +@JsonSerialize(using = OwnershipInferenceStatus.OwnershipInferenceStatusSerializer.class) +public class OwnershipInferenceStatus extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList("suggested", "persisted", "overridden", "failed", "unknown")); + + public static final OwnershipInferenceStatus SUGGESTED = + new OwnershipInferenceStatus("suggested"); + public static final OwnershipInferenceStatus PERSISTED = + new OwnershipInferenceStatus("persisted"); + public static final OwnershipInferenceStatus OVERRIDDEN = + new OwnershipInferenceStatus("overridden"); + public static final OwnershipInferenceStatus FAILED = new OwnershipInferenceStatus("failed"); + public static final OwnershipInferenceStatus UNKNOWN = new OwnershipInferenceStatus("unknown"); + + OwnershipInferenceStatus(String value) { + super(value, allowedValues); + } + + public static class OwnershipInferenceStatusSerializer + extends StdSerializer { + public OwnershipInferenceStatusSerializer(Class t) { + super(t); + } + + public OwnershipInferenceStatusSerializer() { + this(null); + } + + @Override + public void serialize( + OwnershipInferenceStatus value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static OwnershipInferenceStatus fromValue(String value) { + return new OwnershipInferenceStatus(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipInferenceType.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipInferenceType.java new file mode 100644 index 00000000000..38f97260d33 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipInferenceType.java @@ -0,0 +1,60 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * The type of the ownership inference resource. The value should always be + * ownership_inference. + */ +@JsonSerialize(using = OwnershipInferenceType.OwnershipInferenceTypeSerializer.class) +public class OwnershipInferenceType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("ownership_inference")); + + public static final OwnershipInferenceType OWNERSHIP_INFERENCE = + new OwnershipInferenceType("ownership_inference"); + + OwnershipInferenceType(String value) { + super(value, allowedValues); + } + + public static class OwnershipInferenceTypeSerializer + extends StdSerializer { + public OwnershipInferenceTypeSerializer(Class t) { + super(t); + } + + public OwnershipInferenceTypeSerializer() { + this(null); + } + + @Override + public void serialize( + OwnershipInferenceType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static OwnershipInferenceType fromValue(String value) { + return new OwnershipInferenceType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipInferencesType.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipInferencesType.java new file mode 100644 index 00000000000..55f590ad362 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipInferencesType.java @@ -0,0 +1,60 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * The type of the ownership inferences collection resource. The value should always be + * ownership_inferences. + */ +@JsonSerialize(using = OwnershipInferencesType.OwnershipInferencesTypeSerializer.class) +public class OwnershipInferencesType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("ownership_inferences")); + + public static final OwnershipInferencesType OWNERSHIP_INFERENCES = + new OwnershipInferencesType("ownership_inferences"); + + OwnershipInferencesType(String value) { + super(value, allowedValues); + } + + public static class OwnershipInferencesTypeSerializer + extends StdSerializer { + public OwnershipInferencesTypeSerializer(Class t) { + super(t); + } + + public OwnershipInferencesTypeSerializer() { + this(null); + } + + @Override + public void serialize( + OwnershipInferencesType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static OwnershipInferencesType fromValue(String value) { + return new OwnershipInferencesType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/OwnershipOwnerType.java b/src/main/java/com/datadog/api/client/v2/model/OwnershipOwnerType.java new file mode 100644 index 00000000000..c38f87b13cf --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/OwnershipOwnerType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The owner type for an ownership inference. */ +@JsonSerialize(using = OwnershipOwnerType.OwnershipOwnerTypeSerializer.class) +public class OwnershipOwnerType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("user", "team", "service", "unknown")); + + public static final OwnershipOwnerType USER = new OwnershipOwnerType("user"); + public static final OwnershipOwnerType TEAM = new OwnershipOwnerType("team"); + public static final OwnershipOwnerType SERVICE = new OwnershipOwnerType("service"); + public static final OwnershipOwnerType UNKNOWN = new OwnershipOwnerType("unknown"); + + OwnershipOwnerType(String value) { + super(value, allowedValues); + } + + public static class OwnershipOwnerTypeSerializer extends StdSerializer { + public OwnershipOwnerTypeSerializer(Class t) { + super(t); + } + + public OwnershipOwnerTypeSerializer() { + this(null); + } + + @Override + public void serialize(OwnershipOwnerType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static OwnershipOwnerType fromValue(String value) { + return new OwnershipOwnerType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/PatchNotificationRuleParametersDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/PatchNotificationRuleParametersDataAttributes.java index 3b6c2660645..5c92fd73237 100644 --- a/src/main/java/com/datadog/api/client/v2/model/PatchNotificationRuleParametersDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/PatchNotificationRuleParametersDataAttributes.java @@ -25,6 +25,7 @@ @JsonPropertyOrder({ PatchNotificationRuleParametersDataAttributes.JSON_PROPERTY_ENABLED, PatchNotificationRuleParametersDataAttributes.JSON_PROPERTY_NAME, + PatchNotificationRuleParametersDataAttributes.JSON_PROPERTY_ROUTING, PatchNotificationRuleParametersDataAttributes.JSON_PROPERTY_SELECTORS, PatchNotificationRuleParametersDataAttributes.JSON_PROPERTY_TARGETS, PatchNotificationRuleParametersDataAttributes.JSON_PROPERTY_TIME_AGGREGATION, @@ -40,6 +41,9 @@ public class PatchNotificationRuleParametersDataAttributes { public static final String JSON_PROPERTY_NAME = "name"; private String name; + public static final String JSON_PROPERTY_ROUTING = "routing"; + private NotificationRuleRouting routing; + public static final String JSON_PROPERTY_SELECTORS = "selectors"; private Selectors selectors; @@ -94,6 +98,28 @@ public void setName(String name) { this.name = name; } + public PatchNotificationRuleParametersDataAttributes routing(NotificationRuleRouting routing) { + this.routing = routing; + this.unparsed |= routing.unparsed; + return this; + } + + /** + * Routing configuration for the notification rule. + * + * @return routing + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROUTING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public NotificationRuleRouting getRouting() { + return routing; + } + + public void setRouting(NotificationRuleRouting routing) { + this.routing = routing; + } + public PatchNotificationRuleParametersDataAttributes selectors(Selectors selectors) { this.selectors = selectors; this.unparsed |= selectors.unparsed; @@ -255,6 +281,7 @@ public boolean equals(Object o) { (PatchNotificationRuleParametersDataAttributes) o; return Objects.equals(this.enabled, patchNotificationRuleParametersDataAttributes.enabled) && Objects.equals(this.name, patchNotificationRuleParametersDataAttributes.name) + && Objects.equals(this.routing, patchNotificationRuleParametersDataAttributes.routing) && Objects.equals(this.selectors, patchNotificationRuleParametersDataAttributes.selectors) && Objects.equals(this.targets, patchNotificationRuleParametersDataAttributes.targets) && Objects.equals( @@ -268,7 +295,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - enabled, name, selectors, targets, timeAggregation, version, additionalProperties); + enabled, name, routing, selectors, targets, timeAggregation, version, additionalProperties); } @Override @@ -277,6 +304,7 @@ public String toString() { sb.append("class PatchNotificationRuleParametersDataAttributes {\n"); sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" routing: ").append(toIndentedString(routing)).append("\n"); sb.append(" selectors: ").append(toIndentedString(selectors)).append("\n"); sb.append(" targets: ").append(toIndentedString(targets)).append("\n"); sb.append(" timeAggregation: ").append(toIndentedString(timeAggregation)).append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/ProjectNotificationSettings.java b/src/main/java/com/datadog/api/client/v2/model/ProjectNotificationSettings.java index f35fdb2d49d..20703b2f36e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ProjectNotificationSettings.java +++ b/src/main/java/com/datadog/api/client/v2/model/ProjectNotificationSettings.java @@ -35,7 +35,7 @@ public class ProjectNotificationSettings { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DESTINATIONS = "destinations"; - private List destinations = null; + private List destinations = null; public static final String JSON_PROPERTY_ENABLED = "enabled"; private Boolean enabled; @@ -65,12 +65,12 @@ public class ProjectNotificationSettings { "notify_on_case_unassignment"; private Boolean notifyOnCaseUnassignment; - public ProjectNotificationSettings destinations(List destinations) { + public ProjectNotificationSettings destinations(List destinations) { this.destinations = destinations; return this; } - public ProjectNotificationSettings addDestinationsItem(Integer destinationsItem) { + public ProjectNotificationSettings addDestinationsItem(Long destinationsItem) { if (this.destinations == null) { this.destinations = new ArrayList<>(); } @@ -86,11 +86,11 @@ public ProjectNotificationSettings addDestinationsItem(Integer destinationsItem) @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_DESTINATIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getDestinations() { + public List getDestinations() { return destinations; } - public void setDestinations(List destinations) { + public void setDestinations(List destinations) { this.destinations = destinations; } diff --git a/src/main/java/com/datadog/api/client/v2/model/PublishFormData.java b/src/main/java/com/datadog/api/client/v2/model/PublishFormData.java new file mode 100644 index 00000000000..6bb47d9a50d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PublishFormData.java @@ -0,0 +1,178 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The data for publishing a form version. */ +@JsonPropertyOrder({PublishFormData.JSON_PROPERTY_ATTRIBUTES, PublishFormData.JSON_PROPERTY_TYPE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class PublishFormData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private PublishFormDataAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private FormPublicationType type = FormPublicationType.FORM_PUBLICATIONS; + + public PublishFormData() {} + + @JsonCreator + public PublishFormData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + PublishFormDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) FormPublicationType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public PublishFormData attributes(PublishFormDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The attributes for publishing a form version. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public PublishFormDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(PublishFormDataAttributes attributes) { + this.attributes = attributes; + } + + public PublishFormData type(FormPublicationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type for a form publication. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FormPublicationType getType() { + return type; + } + + public void setType(FormPublicationType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return PublishFormData + */ + @JsonAnySetter + public PublishFormData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this PublishFormData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PublishFormData publishFormData = (PublishFormData) o; + return Objects.equals(this.attributes, publishFormData.attributes) + && Objects.equals(this.type, publishFormData.type) + && Objects.equals(this.additionalProperties, publishFormData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PublishFormData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/PublishFormDataAttributes.java similarity index 68% rename from src/main/java/com/datadog/api/client/v2/model/IncidentServiceUpdateAttributes.java rename to src/main/java/com/datadog/api/client/v2/model/PublishFormDataAttributes.java index 826f02ba7a2..4357125db15 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceUpdateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/PublishFormDataAttributes.java @@ -17,41 +17,41 @@ import java.util.Map; import java.util.Objects; -/** The incident service's attributes for an update request. */ -@JsonPropertyOrder({IncidentServiceUpdateAttributes.JSON_PROPERTY_NAME}) +/** The attributes for publishing a form version. */ +@JsonPropertyOrder({PublishFormDataAttributes.JSON_PROPERTY_VERSION}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class IncidentServiceUpdateAttributes { +public class PublishFormDataAttributes { @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_NAME = "name"; - private String name; + public static final String JSON_PROPERTY_VERSION = "version"; + private Long version; - public IncidentServiceUpdateAttributes() {} + public PublishFormDataAttributes() {} @JsonCreator - public IncidentServiceUpdateAttributes( - @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { - this.name = name; + public PublishFormDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_VERSION) Long version) { + this.version = version; } - public IncidentServiceUpdateAttributes name(String name) { - this.name = name; + public PublishFormDataAttributes version(Long version) { + this.version = version; return this; } /** - * Name of the incident service. + * The version number to publish. * - * @return name + * @return version */ - @JsonProperty(JSON_PROPERTY_NAME) + @JsonProperty(JSON_PROPERTY_VERSION) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getName() { - return name; + public Long getVersion() { + return version; } - public void setName(String name) { - this.name = name; + public void setVersion(Long version) { + this.version = version; } /** @@ -66,10 +66,10 @@ public void setName(String name) { * * @param key The arbitrary key to set * @param value The associated value - * @return IncidentServiceUpdateAttributes + * @return PublishFormDataAttributes */ @JsonAnySetter - public IncidentServiceUpdateAttributes putAdditionalProperty(String key, Object value) { + public PublishFormDataAttributes putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -100,7 +100,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this IncidentServiceUpdateAttributes object is equal to o. */ + /** Return true if this PublishFormDataAttributes object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -109,23 +109,22 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentServiceUpdateAttributes incidentServiceUpdateAttributes = - (IncidentServiceUpdateAttributes) o; - return Objects.equals(this.name, incidentServiceUpdateAttributes.name) + PublishFormDataAttributes publishFormDataAttributes = (PublishFormDataAttributes) o; + return Objects.equals(this.version, publishFormDataAttributes.version) && Objects.equals( - this.additionalProperties, incidentServiceUpdateAttributes.additionalProperties); + this.additionalProperties, publishFormDataAttributes.additionalProperties); } @Override public int hashCode() { - return Objects.hash(name, additionalProperties); + return Objects.hash(version, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class IncidentServiceUpdateAttributes {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("class PublishFormDataAttributes {\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/PublishFormRequest.java b/src/main/java/com/datadog/api/client/v2/model/PublishFormRequest.java new file mode 100644 index 00000000000..a5aa36daefd --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PublishFormRequest.java @@ -0,0 +1,145 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A request to publish a form version. */ +@JsonPropertyOrder({PublishFormRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class PublishFormRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private PublishFormData data; + + public PublishFormRequest() {} + + @JsonCreator + public PublishFormRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) PublishFormData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public PublishFormRequest data(PublishFormData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data for publishing a form version. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public PublishFormData getData() { + return data; + } + + public void setData(PublishFormData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return PublishFormRequest + */ + @JsonAnySetter + public PublishFormRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this PublishFormRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PublishFormRequest publishFormRequest = (PublishFormRequest) o; + return Objects.equals(this.data, publishFormRequest.data) + && Objects.equals(this.additionalProperties, publishFormRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PublishFormRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReactNativeSourcemapAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ReactNativeSourcemapAttributes.java new file mode 100644 index 00000000000..15aef24fa08 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReactNativeSourcemapAttributes.java @@ -0,0 +1,404 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a React Native source map. */ +@JsonPropertyOrder({ + ReactNativeSourcemapAttributes.JSON_PROPERTY_BUILD_NUMBER, + ReactNativeSourcemapAttributes.JSON_PROPERTY_BUNDLE_NAME, + ReactNativeSourcemapAttributes.JSON_PROPERTY_BUNDLE_VERSION, + ReactNativeSourcemapAttributes.JSON_PROPERTY_CREATED_AT, + ReactNativeSourcemapAttributes.JSON_PROPERTY_DEBUG_ID, + ReactNativeSourcemapAttributes.JSON_PROPERTY_MAPKIND, + ReactNativeSourcemapAttributes.JSON_PROPERTY_PLATFORM, + ReactNativeSourcemapAttributes.JSON_PROPERTY_SERVICE, + ReactNativeSourcemapAttributes.JSON_PROPERTY_SIZE, + ReactNativeSourcemapAttributes.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReactNativeSourcemapAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_BUILD_NUMBER = "build_number"; + private String buildNumber; + + public static final String JSON_PROPERTY_BUNDLE_NAME = "bundle_name"; + private String bundleName; + + public static final String JSON_PROPERTY_BUNDLE_VERSION = "bundle_version"; + private String bundleVersion; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_DEBUG_ID = "debug_id"; + private String debugId; + + public static final String JSON_PROPERTY_MAPKIND = "mapkind"; + private String mapkind; + + public static final String JSON_PROPERTY_PLATFORM = "platform"; + private String platform; + + public static final String JSON_PROPERTY_SERVICE = "service"; + private String service; + + public static final String JSON_PROPERTY_SIZE = "size"; + private Long size; + + public static final String JSON_PROPERTY_VERSION = "version"; + private String version; + + public ReactNativeSourcemapAttributes() {} + + @JsonCreator + public ReactNativeSourcemapAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_MAPKIND) String mapkind, + @JsonProperty(required = true, value = JSON_PROPERTY_SIZE) Long size) { + this.createdAt = createdAt; + this.mapkind = mapkind; + this.size = size; + } + + public ReactNativeSourcemapAttributes buildNumber(String buildNumber) { + this.buildNumber = buildNumber; + return this; + } + + /** + * The build number. + * + * @return buildNumber + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BUILD_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBuildNumber() { + return buildNumber; + } + + public void setBuildNumber(String buildNumber) { + this.buildNumber = buildNumber; + } + + public ReactNativeSourcemapAttributes bundleName(String bundleName) { + this.bundleName = bundleName; + return this; + } + + /** + * The bundle name. + * + * @return bundleName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BUNDLE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBundleName() { + return bundleName; + } + + public void setBundleName(String bundleName) { + this.bundleName = bundleName; + } + + public ReactNativeSourcemapAttributes bundleVersion(String bundleVersion) { + this.bundleVersion = bundleVersion; + return this; + } + + /** + * The bundle version. + * + * @return bundleVersion + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BUNDLE_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBundleVersion() { + return bundleVersion; + } + + public void setBundleVersion(String bundleVersion) { + this.bundleVersion = bundleVersion; + } + + public ReactNativeSourcemapAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The timestamp when the source map was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public ReactNativeSourcemapAttributes debugId(String debugId) { + this.debugId = debugId; + return this; + } + + /** + * The debug identifier (UUID format). + * + * @return debugId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEBUG_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDebugId() { + return debugId; + } + + public void setDebugId(String debugId) { + this.debugId = debugId; + } + + public ReactNativeSourcemapAttributes mapkind(String mapkind) { + this.mapkind = mapkind; + return this; + } + + /** + * The type of source map. + * + * @return mapkind + */ + @JsonProperty(JSON_PROPERTY_MAPKIND) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMapkind() { + return mapkind; + } + + public void setMapkind(String mapkind) { + this.mapkind = mapkind; + } + + public ReactNativeSourcemapAttributes platform(String platform) { + this.platform = platform; + return this; + } + + /** + * The platform the source map was built for (e.g., ios, android). + * + * @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 ReactNativeSourcemapAttributes service(String service) { + this.service = service; + return this; + } + + /** + * The service name associated with the source map. + * + * @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 ReactNativeSourcemapAttributes size(Long size) { + this.size = size; + return this; + } + + /** + * The size of the source map file in bytes. + * + * @return size + */ + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getSize() { + return size; + } + + public void setSize(Long size) { + this.size = size; + } + + public ReactNativeSourcemapAttributes version(String version) { + this.version = version; + return this; + } + + /** + * The version of the service associated with the source map. + * + * @return version + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReactNativeSourcemapAttributes + */ + @JsonAnySetter + public ReactNativeSourcemapAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReactNativeSourcemapAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReactNativeSourcemapAttributes reactNativeSourcemapAttributes = + (ReactNativeSourcemapAttributes) o; + return Objects.equals(this.buildNumber, reactNativeSourcemapAttributes.buildNumber) + && Objects.equals(this.bundleName, reactNativeSourcemapAttributes.bundleName) + && Objects.equals(this.bundleVersion, reactNativeSourcemapAttributes.bundleVersion) + && Objects.equals(this.createdAt, reactNativeSourcemapAttributes.createdAt) + && Objects.equals(this.debugId, reactNativeSourcemapAttributes.debugId) + && Objects.equals(this.mapkind, reactNativeSourcemapAttributes.mapkind) + && Objects.equals(this.platform, reactNativeSourcemapAttributes.platform) + && Objects.equals(this.service, reactNativeSourcemapAttributes.service) + && Objects.equals(this.size, reactNativeSourcemapAttributes.size) + && Objects.equals(this.version, reactNativeSourcemapAttributes.version) + && Objects.equals( + this.additionalProperties, reactNativeSourcemapAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + buildNumber, + bundleName, + bundleVersion, + createdAt, + debugId, + mapkind, + platform, + service, + size, + version, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReactNativeSourcemapAttributes {\n"); + sb.append(" buildNumber: ").append(toIndentedString(buildNumber)).append("\n"); + sb.append(" bundleName: ").append(toIndentedString(bundleName)).append("\n"); + sb.append(" bundleVersion: ").append(toIndentedString(bundleVersion)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" debugId: ").append(toIndentedString(debugId)).append("\n"); + sb.append(" mapkind: ").append(toIndentedString(mapkind)).append("\n"); + sb.append(" platform: ").append(toIndentedString(platform)).append("\n"); + sb.append(" service: ").append(toIndentedString(service)).append("\n"); + sb.append(" size: ").append(toIndentedString(size)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReactNativeSourcemapData.java b/src/main/java/com/datadog/api/client/v2/model/ReactNativeSourcemapData.java new file mode 100644 index 00000000000..0d79c73ce3a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReactNativeSourcemapData.java @@ -0,0 +1,209 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** React Native source map data object. */ +@JsonPropertyOrder({ + ReactNativeSourcemapData.JSON_PROPERTY_ATTRIBUTES, + ReactNativeSourcemapData.JSON_PROPERTY_ID, + ReactNativeSourcemapData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReactNativeSourcemapData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ReactNativeSourcemapAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SourcemapDataType type; + + public ReactNativeSourcemapData() {} + + @JsonCreator + public ReactNativeSourcemapData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + ReactNativeSourcemapAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SourcemapDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ReactNativeSourcemapData attributes(ReactNativeSourcemapAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a React Native source map. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReactNativeSourcemapAttributes getAttributes() { + return attributes; + } + + public void setAttributes(ReactNativeSourcemapAttributes attributes) { + this.attributes = attributes; + } + + public ReactNativeSourcemapData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the source map. + * + * @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 ReactNativeSourcemapData type(SourcemapDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type for source map objects. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SourcemapDataType getType() { + return type; + } + + public void setType(SourcemapDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReactNativeSourcemapData + */ + @JsonAnySetter + public ReactNativeSourcemapData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReactNativeSourcemapData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReactNativeSourcemapData reactNativeSourcemapData = (ReactNativeSourcemapData) o; + return Objects.equals(this.attributes, reactNativeSourcemapData.attributes) + && Objects.equals(this.id, reactNativeSourcemapData.id) + && Objects.equals(this.type, reactNativeSourcemapData.type) + && Objects.equals(this.additionalProperties, reactNativeSourcemapData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReactNativeSourcemapData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReportScheduleAuthor.java b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleAuthor.java new file mode 100644 index 00000000000..8214b5bc771 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleAuthor.java @@ -0,0 +1,209 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A user included as a related JSON:API resource. */ +@JsonPropertyOrder({ + ReportScheduleAuthor.JSON_PROPERTY_ATTRIBUTES, + ReportScheduleAuthor.JSON_PROPERTY_ID, + ReportScheduleAuthor.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReportScheduleAuthor { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ReportScheduleAuthorAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ReportScheduleAuthorType type; + + public ReportScheduleAuthor() {} + + @JsonCreator + public ReportScheduleAuthor( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + ReportScheduleAuthorAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ReportScheduleAuthorType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ReportScheduleAuthor attributes(ReportScheduleAuthorAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of the report author. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReportScheduleAuthorAttributes getAttributes() { + return attributes; + } + + public void setAttributes(ReportScheduleAuthorAttributes attributes) { + this.attributes = attributes; + } + + public ReportScheduleAuthor id(String id) { + this.id = id; + return this; + } + + /** + * The user UUID. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public ReportScheduleAuthor type(ReportScheduleAuthorType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * JSON:API resource type for the included report author. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReportScheduleAuthorType getType() { + return type; + } + + public void setType(ReportScheduleAuthorType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReportScheduleAuthor + */ + @JsonAnySetter + public ReportScheduleAuthor putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReportScheduleAuthor object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReportScheduleAuthor reportScheduleAuthor = (ReportScheduleAuthor) o; + return Objects.equals(this.attributes, reportScheduleAuthor.attributes) + && Objects.equals(this.id, reportScheduleAuthor.id) + && Objects.equals(this.type, reportScheduleAuthor.type) + && Objects.equals(this.additionalProperties, reportScheduleAuthor.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReportScheduleAuthor {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleAuthorAttributes.java similarity index 61% rename from src/main/java/com/datadog/api/client/v2/model/IncidentServiceResponseAttributes.java rename to src/main/java/com/datadog/api/client/v2/model/ReportScheduleAuthorAttributes.java index 07fd65afd14..6bf698f3d63 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceResponseAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleAuthorAttributes.java @@ -8,71 +8,78 @@ import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.time.OffsetDateTime; import java.util.HashMap; import java.util.Map; import java.util.Objects; -/** The incident service's attributes from a response. */ +/** Attributes of the report author. */ @JsonPropertyOrder({ - IncidentServiceResponseAttributes.JSON_PROPERTY_CREATED, - IncidentServiceResponseAttributes.JSON_PROPERTY_MODIFIED, - IncidentServiceResponseAttributes.JSON_PROPERTY_NAME + ReportScheduleAuthorAttributes.JSON_PROPERTY_EMAIL, + ReportScheduleAuthorAttributes.JSON_PROPERTY_NAME }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class IncidentServiceResponseAttributes { +public class ReportScheduleAuthorAttributes { @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_CREATED = "created"; - private OffsetDateTime created; - - public static final String JSON_PROPERTY_MODIFIED = "modified"; - private OffsetDateTime modified; + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; public static final String JSON_PROPERTY_NAME = "name"; private String name; - /** - * 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; + public ReportScheduleAuthorAttributes() {} + + @JsonCreator + public ReportScheduleAuthorAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_EMAIL) String email, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { + this.email = email; + if (email != null) {} + this.name = name; + if (name != null) {} + } + + public ReportScheduleAuthorAttributes email(String email) { + this.email = email; + if (email != null) {} + return this; } /** - * Timestamp of when the incident service was modified. + * The email address of the report author, or null if unavailable. * - * @return modified + * @return email */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MODIFIED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getModified() { - return modified; + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; } - public IncidentServiceResponseAttributes name(String name) { + public ReportScheduleAuthorAttributes name(String name) { this.name = name; + if (name != null) {} return this; } /** - * Name of the incident service. + * The display name of the report author, or null if unavailable. * * @return name */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getName() { return name; } @@ -93,10 +100,10 @@ public void setName(String name) { * * @param key The arbitrary key to set * @param value The associated value - * @return IncidentServiceResponseAttributes + * @return ReportScheduleAuthorAttributes */ @JsonAnySetter - public IncidentServiceResponseAttributes putAdditionalProperty(String key, Object value) { + public ReportScheduleAuthorAttributes putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -127,7 +134,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this IncidentServiceResponseAttributes object is equal to o. */ + /** Return true if this ReportScheduleAuthorAttributes object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -136,26 +143,24 @@ 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) + ReportScheduleAuthorAttributes reportScheduleAuthorAttributes = + (ReportScheduleAuthorAttributes) o; + return Objects.equals(this.email, reportScheduleAuthorAttributes.email) + && Objects.equals(this.name, reportScheduleAuthorAttributes.name) && Objects.equals( - this.additionalProperties, incidentServiceResponseAttributes.additionalProperties); + this.additionalProperties, reportScheduleAuthorAttributes.additionalProperties); } @Override public int hashCode() { - return Objects.hash(created, modified, name, additionalProperties); + return Objects.hash(email, name, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class IncidentServiceResponseAttributes {\n"); - sb.append(" created: ").append(toIndentedString(created)).append("\n"); - sb.append(" modified: ").append(toIndentedString(modified)).append("\n"); + sb.append("class ReportScheduleAuthorAttributes {\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/ReportScheduleAuthorRelationship.java b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleAuthorRelationship.java new file mode 100644 index 00000000000..310094155f6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleAuthorRelationship.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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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; + +/** Relationship to the author of the report schedule. */ +@JsonPropertyOrder({ReportScheduleAuthorRelationship.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReportScheduleAuthorRelationship { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private ReportScheduleAuthorRelationshipData data; + + public ReportScheduleAuthorRelationship() {} + + @JsonCreator + public ReportScheduleAuthorRelationship( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + ReportScheduleAuthorRelationshipData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public ReportScheduleAuthorRelationship data(ReportScheduleAuthorRelationshipData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Relationship data for the author of the report schedule. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReportScheduleAuthorRelationshipData getData() { + return data; + } + + public void setData(ReportScheduleAuthorRelationshipData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReportScheduleAuthorRelationship + */ + @JsonAnySetter + public ReportScheduleAuthorRelationship putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReportScheduleAuthorRelationship object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReportScheduleAuthorRelationship reportScheduleAuthorRelationship = + (ReportScheduleAuthorRelationship) o; + return Objects.equals(this.data, reportScheduleAuthorRelationship.data) + && Objects.equals( + this.additionalProperties, reportScheduleAuthorRelationship.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReportScheduleAuthorRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReportScheduleAuthorRelationshipData.java b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleAuthorRelationshipData.java new file mode 100644 index 00000000000..191cccc83d7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleAuthorRelationshipData.java @@ -0,0 +1,180 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Relationship data for the author of the report schedule. */ +@JsonPropertyOrder({ + ReportScheduleAuthorRelationshipData.JSON_PROPERTY_ID, + ReportScheduleAuthorRelationshipData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReportScheduleAuthorRelationshipData { + @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 ReportScheduleAuthorType type; + + public ReportScheduleAuthorRelationshipData() {} + + @JsonCreator + public ReportScheduleAuthorRelationshipData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ReportScheduleAuthorType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ReportScheduleAuthorRelationshipData id(String id) { + this.id = id; + return this; + } + + /** + * The user UUID of the report schedule author. + * + * @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 ReportScheduleAuthorRelationshipData type(ReportScheduleAuthorType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * JSON:API resource type for the included report author. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReportScheduleAuthorType getType() { + return type; + } + + public void setType(ReportScheduleAuthorType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReportScheduleAuthorRelationshipData + */ + @JsonAnySetter + public ReportScheduleAuthorRelationshipData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReportScheduleAuthorRelationshipData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReportScheduleAuthorRelationshipData reportScheduleAuthorRelationshipData = + (ReportScheduleAuthorRelationshipData) o; + return Objects.equals(this.id, reportScheduleAuthorRelationshipData.id) + && Objects.equals(this.type, reportScheduleAuthorRelationshipData.type) + && Objects.equals( + this.additionalProperties, reportScheduleAuthorRelationshipData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReportScheduleAuthorRelationshipData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReportScheduleAuthorType.java b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleAuthorType.java new file mode 100644 index 00000000000..8ee5b985b06 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleAuthorType.java @@ -0,0 +1,55 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** JSON:API resource type for the included report author. */ +@JsonSerialize(using = ReportScheduleAuthorType.ReportScheduleAuthorTypeSerializer.class) +public class ReportScheduleAuthorType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("users")); + + public static final ReportScheduleAuthorType USERS = new ReportScheduleAuthorType("users"); + + ReportScheduleAuthorType(String value) { + super(value, allowedValues); + } + + public static class ReportScheduleAuthorTypeSerializer + extends StdSerializer { + public ReportScheduleAuthorTypeSerializer(Class t) { + super(t); + } + + public ReportScheduleAuthorTypeSerializer() { + this(null); + } + + @Override + public void serialize( + ReportScheduleAuthorType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ReportScheduleAuthorType fromValue(String value) { + return new ReportScheduleAuthorType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReportScheduleCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleCreateRequest.java new file mode 100644 index 00000000000..4ecf483028d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleCreateRequest.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request body for creating a report schedule. */ +@JsonPropertyOrder({ReportScheduleCreateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReportScheduleCreateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private ReportScheduleCreateRequestData data; + + public ReportScheduleCreateRequest() {} + + @JsonCreator + public ReportScheduleCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + ReportScheduleCreateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public ReportScheduleCreateRequest data(ReportScheduleCreateRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The JSON:API data object for a report schedule creation request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReportScheduleCreateRequestData getData() { + return data; + } + + public void setData(ReportScheduleCreateRequestData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReportScheduleCreateRequest + */ + @JsonAnySetter + public ReportScheduleCreateRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReportScheduleCreateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReportScheduleCreateRequest reportScheduleCreateRequest = (ReportScheduleCreateRequest) o; + return Objects.equals(this.data, reportScheduleCreateRequest.data) + && Objects.equals( + this.additionalProperties, reportScheduleCreateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReportScheduleCreateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReportScheduleCreateRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleCreateRequestAttributes.java new file mode 100644 index 00000000000..937a9104d2e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleCreateRequestAttributes.java @@ -0,0 +1,473 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** The configuration of the report schedule to create. */ +@JsonPropertyOrder({ + ReportScheduleCreateRequestAttributes.JSON_PROPERTY_DELIVERY_FORMAT, + ReportScheduleCreateRequestAttributes.JSON_PROPERTY_DESCRIPTION, + ReportScheduleCreateRequestAttributes.JSON_PROPERTY_RECIPIENTS, + ReportScheduleCreateRequestAttributes.JSON_PROPERTY_RESOURCE_ID, + ReportScheduleCreateRequestAttributes.JSON_PROPERTY_RESOURCE_TYPE, + ReportScheduleCreateRequestAttributes.JSON_PROPERTY_RRULE, + ReportScheduleCreateRequestAttributes.JSON_PROPERTY_TAB_ID, + ReportScheduleCreateRequestAttributes.JSON_PROPERTY_TEMPLATE_VARIABLES, + ReportScheduleCreateRequestAttributes.JSON_PROPERTY_TIMEFRAME, + ReportScheduleCreateRequestAttributes.JSON_PROPERTY_TIMEZONE, + ReportScheduleCreateRequestAttributes.JSON_PROPERTY_TITLE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReportScheduleCreateRequestAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DELIVERY_FORMAT = "delivery_format"; + private ReportScheduleDeliveryFormat deliveryFormat; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_RECIPIENTS = "recipients"; + private List recipients = new ArrayList<>(); + + public static final String JSON_PROPERTY_RESOURCE_ID = "resource_id"; + private String resourceId; + + public static final String JSON_PROPERTY_RESOURCE_TYPE = "resource_type"; + private ReportScheduleResourceType resourceType; + + public static final String JSON_PROPERTY_RRULE = "rrule"; + private String rrule; + + public static final String JSON_PROPERTY_TAB_ID = "tab_id"; + private UUID tabId; + + public static final String JSON_PROPERTY_TEMPLATE_VARIABLES = "template_variables"; + private List templateVariables = new ArrayList<>(); + + public static final String JSON_PROPERTY_TIMEFRAME = "timeframe"; + private String timeframe; + + public static final String JSON_PROPERTY_TIMEZONE = "timezone"; + private String timezone; + + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public ReportScheduleCreateRequestAttributes() {} + + @JsonCreator + public ReportScheduleCreateRequestAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_DESCRIPTION) String description, + @JsonProperty(required = true, value = JSON_PROPERTY_RECIPIENTS) List recipients, + @JsonProperty(required = true, value = JSON_PROPERTY_RESOURCE_ID) String resourceId, + @JsonProperty(required = true, value = JSON_PROPERTY_RESOURCE_TYPE) + ReportScheduleResourceType resourceType, + @JsonProperty(required = true, value = JSON_PROPERTY_RRULE) String rrule, + @JsonProperty(required = true, value = JSON_PROPERTY_TEMPLATE_VARIABLES) + List templateVariables, + @JsonProperty(required = true, value = JSON_PROPERTY_TIMEFRAME) String timeframe, + @JsonProperty(required = true, value = JSON_PROPERTY_TIMEZONE) String timezone, + @JsonProperty(required = true, value = JSON_PROPERTY_TITLE) String title) { + this.description = description; + this.recipients = recipients; + this.resourceId = resourceId; + this.resourceType = resourceType; + this.unparsed |= !resourceType.isValid(); + this.rrule = rrule; + this.templateVariables = templateVariables; + this.timeframe = timeframe; + this.timezone = timezone; + this.title = title; + } + + public ReportScheduleCreateRequestAttributes deliveryFormat( + ReportScheduleDeliveryFormat deliveryFormat) { + this.deliveryFormat = deliveryFormat; + this.unparsed |= !deliveryFormat.isValid(); + return this; + } + + /** + * How a PDF-export report is delivered. pdf attaches a PDF file, png + * embeds an inline PNG image, and pdf_and_png delivers both. + * + * @return deliveryFormat + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DELIVERY_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ReportScheduleDeliveryFormat getDeliveryFormat() { + return deliveryFormat; + } + + public void setDeliveryFormat(ReportScheduleDeliveryFormat deliveryFormat) { + if (!deliveryFormat.isValid()) { + this.unparsed = true; + } + this.deliveryFormat = deliveryFormat; + } + + public ReportScheduleCreateRequestAttributes description(String description) { + this.description = description; + return this; + } + + /** + * A description of the report, up to 4096 characters. + * + * @return description + */ + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public ReportScheduleCreateRequestAttributes recipients(List recipients) { + this.recipients = recipients; + return this; + } + + public ReportScheduleCreateRequestAttributes addRecipientsItem(String recipientsItem) { + this.recipients.add(recipientsItem); + return this; + } + + /** + * The recipients of the report. Each entry is an email address, a Slack channel reference in the + * form slack:{team_id}.{channel_id}.{channel_name}, or a Microsoft Teams channel + * reference in the form teams:{tenant_id}|{team_id}|{channel_id}. + * + * @return recipients + */ + @JsonProperty(JSON_PROPERTY_RECIPIENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getRecipients() { + return recipients; + } + + public void setRecipients(List recipients) { + this.recipients = recipients; + } + + public ReportScheduleCreateRequestAttributes resourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * The identifier of the dashboard or integration dashboard to render in the report. + * + * @return resourceId + */ + @JsonProperty(JSON_PROPERTY_RESOURCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public ReportScheduleCreateRequestAttributes resourceType( + ReportScheduleResourceType resourceType) { + this.resourceType = resourceType; + this.unparsed |= !resourceType.isValid(); + return this; + } + + /** + * The type of dashboard resource the report schedule targets. + * + * @return resourceType + */ + @JsonProperty(JSON_PROPERTY_RESOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReportScheduleResourceType getResourceType() { + return resourceType; + } + + public void setResourceType(ReportScheduleResourceType resourceType) { + if (!resourceType.isValid()) { + this.unparsed = true; + } + this.resourceType = resourceType; + } + + public ReportScheduleCreateRequestAttributes rrule(String rrule) { + this.rrule = rrule; + return this; + } + + /** + * The recurrence rule for the schedule, expressed as an iCalendar RRULE string. + * + * @return rrule + */ + @JsonProperty(JSON_PROPERTY_RRULE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRrule() { + return rrule; + } + + public void setRrule(String rrule) { + this.rrule = rrule; + } + + public ReportScheduleCreateRequestAttributes tabId(UUID tabId) { + this.tabId = tabId; + return this; + } + + /** + * The identifier of the dashboard tab to render, when the dashboard has tabs. + * + * @return tabId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAB_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getTabId() { + return tabId; + } + + public void setTabId(UUID tabId) { + this.tabId = tabId; + } + + public ReportScheduleCreateRequestAttributes templateVariables( + List templateVariables) { + this.templateVariables = templateVariables; + for (ReportScheduleTemplateVariable item : templateVariables) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ReportScheduleCreateRequestAttributes addTemplateVariablesItem( + ReportScheduleTemplateVariable templateVariablesItem) { + this.templateVariables.add(templateVariablesItem); + this.unparsed |= templateVariablesItem.unparsed; + return this; + } + + /** + * The dashboard template variables applied when rendering the report. + * + * @return templateVariables + */ + @JsonProperty(JSON_PROPERTY_TEMPLATE_VARIABLES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTemplateVariables() { + return templateVariables; + } + + public void setTemplateVariables(List templateVariables) { + this.templateVariables = templateVariables; + } + + public ReportScheduleCreateRequestAttributes timeframe(String timeframe) { + this.timeframe = timeframe; + return this; + } + + /** + * The relative timeframe of data to include in the report. + * + * @return timeframe + */ + @JsonProperty(JSON_PROPERTY_TIMEFRAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTimeframe() { + return timeframe; + } + + public void setTimeframe(String timeframe) { + this.timeframe = timeframe; + } + + public ReportScheduleCreateRequestAttributes timezone(String timezone) { + this.timezone = timezone; + return this; + } + + /** + * The IANA time zone identifier the recurrence rule is evaluated in. + * + * @return timezone + */ + @JsonProperty(JSON_PROPERTY_TIMEZONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTimezone() { + return timezone; + } + + public void setTimezone(String timezone) { + this.timezone = timezone; + } + + public ReportScheduleCreateRequestAttributes title(String title) { + this.title = title; + return this; + } + + /** + * The title of the report, between 1 and 78 characters. + * + * @return title + */ + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReportScheduleCreateRequestAttributes + */ + @JsonAnySetter + public ReportScheduleCreateRequestAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReportScheduleCreateRequestAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReportScheduleCreateRequestAttributes reportScheduleCreateRequestAttributes = + (ReportScheduleCreateRequestAttributes) o; + return Objects.equals(this.deliveryFormat, reportScheduleCreateRequestAttributes.deliveryFormat) + && Objects.equals(this.description, reportScheduleCreateRequestAttributes.description) + && Objects.equals(this.recipients, reportScheduleCreateRequestAttributes.recipients) + && Objects.equals(this.resourceId, reportScheduleCreateRequestAttributes.resourceId) + && Objects.equals(this.resourceType, reportScheduleCreateRequestAttributes.resourceType) + && Objects.equals(this.rrule, reportScheduleCreateRequestAttributes.rrule) + && Objects.equals(this.tabId, reportScheduleCreateRequestAttributes.tabId) + && Objects.equals( + this.templateVariables, reportScheduleCreateRequestAttributes.templateVariables) + && Objects.equals(this.timeframe, reportScheduleCreateRequestAttributes.timeframe) + && Objects.equals(this.timezone, reportScheduleCreateRequestAttributes.timezone) + && Objects.equals(this.title, reportScheduleCreateRequestAttributes.title) + && Objects.equals( + this.additionalProperties, reportScheduleCreateRequestAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + deliveryFormat, + description, + recipients, + resourceId, + resourceType, + rrule, + tabId, + templateVariables, + timeframe, + timezone, + title, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReportScheduleCreateRequestAttributes {\n"); + sb.append(" deliveryFormat: ").append(toIndentedString(deliveryFormat)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" recipients: ").append(toIndentedString(recipients)).append("\n"); + sb.append(" resourceId: ").append(toIndentedString(resourceId)).append("\n"); + sb.append(" resourceType: ").append(toIndentedString(resourceType)).append("\n"); + sb.append(" rrule: ").append(toIndentedString(rrule)).append("\n"); + sb.append(" tabId: ").append(toIndentedString(tabId)).append("\n"); + sb.append(" templateVariables: ").append(toIndentedString(templateVariables)).append("\n"); + sb.append(" timeframe: ").append(toIndentedString(timeframe)).append("\n"); + sb.append(" timezone: ").append(toIndentedString(timezone)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReportScheduleCreateRequestData.java b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleCreateRequestData.java new file mode 100644 index 00000000000..0331af455a2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleCreateRequestData.java @@ -0,0 +1,184 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The JSON:API data object for a report schedule creation request. */ +@JsonPropertyOrder({ + ReportScheduleCreateRequestData.JSON_PROPERTY_ATTRIBUTES, + ReportScheduleCreateRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReportScheduleCreateRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ReportScheduleCreateRequestAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ReportScheduleType type; + + public ReportScheduleCreateRequestData() {} + + @JsonCreator + public ReportScheduleCreateRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + ReportScheduleCreateRequestAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ReportScheduleType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ReportScheduleCreateRequestData attributes( + ReportScheduleCreateRequestAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The configuration of the report schedule to create. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReportScheduleCreateRequestAttributes getAttributes() { + return attributes; + } + + public void setAttributes(ReportScheduleCreateRequestAttributes attributes) { + this.attributes = attributes; + } + + public ReportScheduleCreateRequestData type(ReportScheduleType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * JSON:API resource type for report schedules. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReportScheduleType getType() { + return type; + } + + public void setType(ReportScheduleType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReportScheduleCreateRequestData + */ + @JsonAnySetter + public ReportScheduleCreateRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReportScheduleCreateRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReportScheduleCreateRequestData reportScheduleCreateRequestData = + (ReportScheduleCreateRequestData) o; + return Objects.equals(this.attributes, reportScheduleCreateRequestData.attributes) + && Objects.equals(this.type, reportScheduleCreateRequestData.type) + && Objects.equals( + this.additionalProperties, reportScheduleCreateRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReportScheduleCreateRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReportScheduleDeliveryFormat.java b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleDeliveryFormat.java new file mode 100644 index 00000000000..67177e49314 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleDeliveryFormat.java @@ -0,0 +1,62 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * How a PDF-export report is delivered. pdf attaches a PDF file, png + * embeds an inline PNG image, and pdf_and_png delivers both. + */ +@JsonSerialize(using = ReportScheduleDeliveryFormat.ReportScheduleDeliveryFormatSerializer.class) +public class ReportScheduleDeliveryFormat extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("pdf", "png", "pdf_and_png")); + + public static final ReportScheduleDeliveryFormat PDF = new ReportScheduleDeliveryFormat("pdf"); + public static final ReportScheduleDeliveryFormat PNG = new ReportScheduleDeliveryFormat("png"); + public static final ReportScheduleDeliveryFormat PDF_AND_PNG = + new ReportScheduleDeliveryFormat("pdf_and_png"); + + ReportScheduleDeliveryFormat(String value) { + super(value, allowedValues); + } + + public static class ReportScheduleDeliveryFormatSerializer + extends StdSerializer { + public ReportScheduleDeliveryFormatSerializer(Class t) { + super(t); + } + + public ReportScheduleDeliveryFormatSerializer() { + this(null); + } + + @Override + public void serialize( + ReportScheduleDeliveryFormat value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ReportScheduleDeliveryFormat fromValue(String value) { + return new ReportScheduleDeliveryFormat(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReportScheduleIncludedResource.java b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleIncludedResource.java new file mode 100644 index 00000000000..aa0de0fcb67 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleIncludedResource.java @@ -0,0 +1,218 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.JSON; +import com.datadog.api.client.UnparsedObject; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import jakarta.ws.rs.core.GenericType; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize( + using = ReportScheduleIncludedResource.ReportScheduleIncludedResourceDeserializer.class) +@JsonSerialize( + using = ReportScheduleIncludedResource.ReportScheduleIncludedResourceSerializer.class) +public class ReportScheduleIncludedResource extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(ReportScheduleIncludedResource.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class ReportScheduleIncludedResourceSerializer + extends StdSerializer { + public ReportScheduleIncludedResourceSerializer(Class t) { + super(t); + } + + public ReportScheduleIncludedResourceSerializer() { + this(null); + } + + @Override + public void serialize( + ReportScheduleIncludedResource value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class ReportScheduleIncludedResourceDeserializer + extends StdDeserializer { + public ReportScheduleIncludedResourceDeserializer() { + this(ReportScheduleIncludedResource.class); + } + + public ReportScheduleIncludedResourceDeserializer(Class vc) { + super(vc); + } + + @Override + public ReportScheduleIncludedResource deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + Object tmp = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize ReportScheduleAuthor + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ReportScheduleAuthor.class.equals(Integer.class) + || ReportScheduleAuthor.class.equals(Long.class) + || ReportScheduleAuthor.class.equals(Float.class) + || ReportScheduleAuthor.class.equals(Double.class) + || ReportScheduleAuthor.class.equals(Boolean.class) + || ReportScheduleAuthor.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((ReportScheduleAuthor.class.equals(Integer.class) + || ReportScheduleAuthor.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((ReportScheduleAuthor.class.equals(Float.class) + || ReportScheduleAuthor.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (ReportScheduleAuthor.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (ReportScheduleAuthor.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(ReportScheduleAuthor.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((ReportScheduleAuthor) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'ReportScheduleAuthor'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ReportScheduleAuthor'", e); + } + + ReportScheduleIncludedResource ret = new ReportScheduleIncludedResource(); + if (match == 1) { + ret.setActualInstance(deserialized); + } else { + Map res = + new ObjectMapper() + .readValue( + tree.traverse(jp.getCodec()).readValueAsTree().toString(), + new TypeReference>() {}); + ret.setActualInstance(new UnparsedObject(res)); + } + return ret; + } + + /** Handle deserialization of the 'null' value. */ + @Override + public ReportScheduleIncludedResource getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "ReportScheduleIncludedResource cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public ReportScheduleIncludedResource() { + super("oneOf", Boolean.FALSE); + } + + public ReportScheduleIncludedResource(ReportScheduleAuthor o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("ReportScheduleAuthor", new GenericType() {}); + JSON.registerDescendants( + ReportScheduleIncludedResource.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return ReportScheduleIncludedResource.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: ReportScheduleAuthor + * + *

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(ReportScheduleAuthor.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 ReportScheduleAuthor"); + } + + /** + * Get the actual instance, which can be the following: ReportScheduleAuthor + * + * @return The actual instance (ReportScheduleAuthor) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `ReportScheduleAuthor`. If the actual instance is not + * `ReportScheduleAuthor`, the ClassCastException will be thrown. + * + * @return The actual instance of `ReportScheduleAuthor` + * @throws ClassCastException if the instance is not `ReportScheduleAuthor` + */ + public ReportScheduleAuthor getReportScheduleAuthor() throws ClassCastException { + return (ReportScheduleAuthor) super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReportSchedulePatchRequest.java b/src/main/java/com/datadog/api/client/v2/model/ReportSchedulePatchRequest.java new file mode 100644 index 00000000000..0cb307d1a89 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReportSchedulePatchRequest.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request body for updating a report schedule. */ +@JsonPropertyOrder({ReportSchedulePatchRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReportSchedulePatchRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private ReportSchedulePatchRequestData data; + + public ReportSchedulePatchRequest() {} + + @JsonCreator + public ReportSchedulePatchRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + ReportSchedulePatchRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public ReportSchedulePatchRequest data(ReportSchedulePatchRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The JSON:API data object for a report schedule update request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReportSchedulePatchRequestData getData() { + return data; + } + + public void setData(ReportSchedulePatchRequestData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReportSchedulePatchRequest + */ + @JsonAnySetter + public ReportSchedulePatchRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReportSchedulePatchRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReportSchedulePatchRequest reportSchedulePatchRequest = (ReportSchedulePatchRequest) o; + return Objects.equals(this.data, reportSchedulePatchRequest.data) + && Objects.equals( + this.additionalProperties, reportSchedulePatchRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReportSchedulePatchRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReportSchedulePatchRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ReportSchedulePatchRequestAttributes.java new file mode 100644 index 00000000000..a8b581912e4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReportSchedulePatchRequestAttributes.java @@ -0,0 +1,411 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** + * The updated configuration of the report schedule. These values replace the existing ones; the + * targeted resource (resource_id and resource_type) cannot be changed. + */ +@JsonPropertyOrder({ + ReportSchedulePatchRequestAttributes.JSON_PROPERTY_DELIVERY_FORMAT, + ReportSchedulePatchRequestAttributes.JSON_PROPERTY_DESCRIPTION, + ReportSchedulePatchRequestAttributes.JSON_PROPERTY_RECIPIENTS, + ReportSchedulePatchRequestAttributes.JSON_PROPERTY_RRULE, + ReportSchedulePatchRequestAttributes.JSON_PROPERTY_TAB_ID, + ReportSchedulePatchRequestAttributes.JSON_PROPERTY_TEMPLATE_VARIABLES, + ReportSchedulePatchRequestAttributes.JSON_PROPERTY_TIMEFRAME, + ReportSchedulePatchRequestAttributes.JSON_PROPERTY_TIMEZONE, + ReportSchedulePatchRequestAttributes.JSON_PROPERTY_TITLE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReportSchedulePatchRequestAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DELIVERY_FORMAT = "delivery_format"; + private ReportScheduleDeliveryFormat deliveryFormat; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_RECIPIENTS = "recipients"; + private List recipients = new ArrayList<>(); + + public static final String JSON_PROPERTY_RRULE = "rrule"; + private String rrule; + + public static final String JSON_PROPERTY_TAB_ID = "tab_id"; + private UUID tabId; + + public static final String JSON_PROPERTY_TEMPLATE_VARIABLES = "template_variables"; + private List templateVariables = new ArrayList<>(); + + public static final String JSON_PROPERTY_TIMEFRAME = "timeframe"; + private String timeframe; + + public static final String JSON_PROPERTY_TIMEZONE = "timezone"; + private String timezone; + + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public ReportSchedulePatchRequestAttributes() {} + + @JsonCreator + public ReportSchedulePatchRequestAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_DESCRIPTION) String description, + @JsonProperty(required = true, value = JSON_PROPERTY_RECIPIENTS) List recipients, + @JsonProperty(required = true, value = JSON_PROPERTY_RRULE) String rrule, + @JsonProperty(required = true, value = JSON_PROPERTY_TEMPLATE_VARIABLES) + List templateVariables, + @JsonProperty(required = true, value = JSON_PROPERTY_TIMEFRAME) String timeframe, + @JsonProperty(required = true, value = JSON_PROPERTY_TIMEZONE) String timezone, + @JsonProperty(required = true, value = JSON_PROPERTY_TITLE) String title) { + this.description = description; + this.recipients = recipients; + this.rrule = rrule; + this.templateVariables = templateVariables; + this.timeframe = timeframe; + this.timezone = timezone; + this.title = title; + } + + public ReportSchedulePatchRequestAttributes deliveryFormat( + ReportScheduleDeliveryFormat deliveryFormat) { + this.deliveryFormat = deliveryFormat; + this.unparsed |= !deliveryFormat.isValid(); + return this; + } + + /** + * How a PDF-export report is delivered. pdf attaches a PDF file, png + * embeds an inline PNG image, and pdf_and_png delivers both. + * + * @return deliveryFormat + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DELIVERY_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ReportScheduleDeliveryFormat getDeliveryFormat() { + return deliveryFormat; + } + + public void setDeliveryFormat(ReportScheduleDeliveryFormat deliveryFormat) { + if (!deliveryFormat.isValid()) { + this.unparsed = true; + } + this.deliveryFormat = deliveryFormat; + } + + public ReportSchedulePatchRequestAttributes description(String description) { + this.description = description; + return this; + } + + /** + * A description of the report, up to 4096 characters. + * + * @return description + */ + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public ReportSchedulePatchRequestAttributes recipients(List recipients) { + this.recipients = recipients; + return this; + } + + public ReportSchedulePatchRequestAttributes addRecipientsItem(String recipientsItem) { + this.recipients.add(recipientsItem); + return this; + } + + /** + * The recipients of the report. Each entry is an email address, a Slack channel reference in the + * form slack:{team_id}.{channel_id}.{channel_name}, or a Microsoft Teams channel + * reference in the form teams:{tenant_id}|{team_id}|{channel_id}. + * + * @return recipients + */ + @JsonProperty(JSON_PROPERTY_RECIPIENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getRecipients() { + return recipients; + } + + public void setRecipients(List recipients) { + this.recipients = recipients; + } + + public ReportSchedulePatchRequestAttributes rrule(String rrule) { + this.rrule = rrule; + return this; + } + + /** + * The recurrence rule for the schedule, expressed as an iCalendar RRULE string. + * + * @return rrule + */ + @JsonProperty(JSON_PROPERTY_RRULE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRrule() { + return rrule; + } + + public void setRrule(String rrule) { + this.rrule = rrule; + } + + public ReportSchedulePatchRequestAttributes tabId(UUID tabId) { + this.tabId = tabId; + return this; + } + + /** + * The identifier of the dashboard tab to render, when the dashboard has tabs. + * + * @return tabId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAB_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getTabId() { + return tabId; + } + + public void setTabId(UUID tabId) { + this.tabId = tabId; + } + + public ReportSchedulePatchRequestAttributes templateVariables( + List templateVariables) { + this.templateVariables = templateVariables; + for (ReportScheduleTemplateVariable item : templateVariables) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ReportSchedulePatchRequestAttributes addTemplateVariablesItem( + ReportScheduleTemplateVariable templateVariablesItem) { + this.templateVariables.add(templateVariablesItem); + this.unparsed |= templateVariablesItem.unparsed; + return this; + } + + /** + * The dashboard template variables applied when rendering the report. + * + * @return templateVariables + */ + @JsonProperty(JSON_PROPERTY_TEMPLATE_VARIABLES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTemplateVariables() { + return templateVariables; + } + + public void setTemplateVariables(List templateVariables) { + this.templateVariables = templateVariables; + } + + public ReportSchedulePatchRequestAttributes timeframe(String timeframe) { + this.timeframe = timeframe; + return this; + } + + /** + * The relative timeframe of data to include in the report. + * + * @return timeframe + */ + @JsonProperty(JSON_PROPERTY_TIMEFRAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTimeframe() { + return timeframe; + } + + public void setTimeframe(String timeframe) { + this.timeframe = timeframe; + } + + public ReportSchedulePatchRequestAttributes timezone(String timezone) { + this.timezone = timezone; + return this; + } + + /** + * The IANA time zone identifier the recurrence rule is evaluated in. + * + * @return timezone + */ + @JsonProperty(JSON_PROPERTY_TIMEZONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTimezone() { + return timezone; + } + + public void setTimezone(String timezone) { + this.timezone = timezone; + } + + public ReportSchedulePatchRequestAttributes title(String title) { + this.title = title; + return this; + } + + /** + * The title of the report, between 1 and 78 characters. + * + * @return title + */ + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReportSchedulePatchRequestAttributes + */ + @JsonAnySetter + public ReportSchedulePatchRequestAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReportSchedulePatchRequestAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReportSchedulePatchRequestAttributes reportSchedulePatchRequestAttributes = + (ReportSchedulePatchRequestAttributes) o; + return Objects.equals(this.deliveryFormat, reportSchedulePatchRequestAttributes.deliveryFormat) + && Objects.equals(this.description, reportSchedulePatchRequestAttributes.description) + && Objects.equals(this.recipients, reportSchedulePatchRequestAttributes.recipients) + && Objects.equals(this.rrule, reportSchedulePatchRequestAttributes.rrule) + && Objects.equals(this.tabId, reportSchedulePatchRequestAttributes.tabId) + && Objects.equals( + this.templateVariables, reportSchedulePatchRequestAttributes.templateVariables) + && Objects.equals(this.timeframe, reportSchedulePatchRequestAttributes.timeframe) + && Objects.equals(this.timezone, reportSchedulePatchRequestAttributes.timezone) + && Objects.equals(this.title, reportSchedulePatchRequestAttributes.title) + && Objects.equals( + this.additionalProperties, reportSchedulePatchRequestAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + deliveryFormat, + description, + recipients, + rrule, + tabId, + templateVariables, + timeframe, + timezone, + title, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReportSchedulePatchRequestAttributes {\n"); + sb.append(" deliveryFormat: ").append(toIndentedString(deliveryFormat)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" recipients: ").append(toIndentedString(recipients)).append("\n"); + sb.append(" rrule: ").append(toIndentedString(rrule)).append("\n"); + sb.append(" tabId: ").append(toIndentedString(tabId)).append("\n"); + sb.append(" templateVariables: ").append(toIndentedString(templateVariables)).append("\n"); + sb.append(" timeframe: ").append(toIndentedString(timeframe)).append("\n"); + sb.append(" timezone: ").append(toIndentedString(timezone)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReportSchedulePatchRequestData.java b/src/main/java/com/datadog/api/client/v2/model/ReportSchedulePatchRequestData.java new file mode 100644 index 00000000000..88aa77fb0ed --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReportSchedulePatchRequestData.java @@ -0,0 +1,185 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The JSON:API data object for a report schedule update request. */ +@JsonPropertyOrder({ + ReportSchedulePatchRequestData.JSON_PROPERTY_ATTRIBUTES, + ReportSchedulePatchRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReportSchedulePatchRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ReportSchedulePatchRequestAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ReportScheduleType type; + + public ReportSchedulePatchRequestData() {} + + @JsonCreator + public ReportSchedulePatchRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + ReportSchedulePatchRequestAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ReportScheduleType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ReportSchedulePatchRequestData attributes( + ReportSchedulePatchRequestAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The updated configuration of the report schedule. These values replace the existing ones; the + * targeted resource (resource_id and resource_type) cannot be changed. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReportSchedulePatchRequestAttributes getAttributes() { + return attributes; + } + + public void setAttributes(ReportSchedulePatchRequestAttributes attributes) { + this.attributes = attributes; + } + + public ReportSchedulePatchRequestData type(ReportScheduleType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * JSON:API resource type for report schedules. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReportScheduleType getType() { + return type; + } + + public void setType(ReportScheduleType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReportSchedulePatchRequestData + */ + @JsonAnySetter + public ReportSchedulePatchRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReportSchedulePatchRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReportSchedulePatchRequestData reportSchedulePatchRequestData = + (ReportSchedulePatchRequestData) o; + return Objects.equals(this.attributes, reportSchedulePatchRequestData.attributes) + && Objects.equals(this.type, reportSchedulePatchRequestData.type) + && Objects.equals( + this.additionalProperties, reportSchedulePatchRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReportSchedulePatchRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReportScheduleResourceType.java b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleResourceType.java new file mode 100644 index 00000000000..2a31918bae7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleResourceType.java @@ -0,0 +1,59 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The type of dashboard resource the report schedule targets. */ +@JsonSerialize(using = ReportScheduleResourceType.ReportScheduleResourceTypeSerializer.class) +public class ReportScheduleResourceType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("dashboard", "integration_dashboard")); + + public static final ReportScheduleResourceType DASHBOARD = + new ReportScheduleResourceType("dashboard"); + public static final ReportScheduleResourceType INTEGRATION_DASHBOARD = + new ReportScheduleResourceType("integration_dashboard"); + + ReportScheduleResourceType(String value) { + super(value, allowedValues); + } + + public static class ReportScheduleResourceTypeSerializer + extends StdSerializer { + public ReportScheduleResourceTypeSerializer(Class t) { + super(t); + } + + public ReportScheduleResourceTypeSerializer() { + this(null); + } + + @Override + public void serialize( + ReportScheduleResourceType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ReportScheduleResourceType fromValue(String value) { + return new ReportScheduleResourceType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReportScheduleResponse.java b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleResponse.java new file mode 100644 index 00000000000..ce64b1d3b71 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleResponse.java @@ -0,0 +1,188 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing a single report schedule. */ +@JsonPropertyOrder({ + ReportScheduleResponse.JSON_PROPERTY_DATA, + ReportScheduleResponse.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReportScheduleResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private ReportScheduleResponseData data; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included = null; + + public ReportScheduleResponse() {} + + @JsonCreator + public ReportScheduleResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) ReportScheduleResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public ReportScheduleResponse data(ReportScheduleResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The JSON:API data object representing a report schedule. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReportScheduleResponseData getData() { + return data; + } + + public void setData(ReportScheduleResponseData data) { + this.data = data; + } + + public ReportScheduleResponse included(List included) { + this.included = included; + for (ReportScheduleIncludedResource item : included) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ReportScheduleResponse addIncludedItem(ReportScheduleIncludedResource includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + this.unparsed |= includedItem.unparsed; + return this; + } + + /** + * Related resources included with the report schedule, such as the author. + * + * @return included + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getIncluded() { + return included; + } + + public void setIncluded(List included) { + this.included = included; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReportScheduleResponse + */ + @JsonAnySetter + public ReportScheduleResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReportScheduleResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReportScheduleResponse reportScheduleResponse = (ReportScheduleResponse) o; + return Objects.equals(this.data, reportScheduleResponse.data) + && Objects.equals(this.included, reportScheduleResponse.included) + && Objects.equals(this.additionalProperties, reportScheduleResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReportScheduleResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReportScheduleResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleResponseAttributes.java new file mode 100644 index 00000000000..bed20d70f60 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleResponseAttributes.java @@ -0,0 +1,559 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** The configuration and derived state of a report schedule. */ +@JsonPropertyOrder({ + ReportScheduleResponseAttributes.JSON_PROPERTY_DELIVERY_FORMAT, + ReportScheduleResponseAttributes.JSON_PROPERTY_DESCRIPTION, + ReportScheduleResponseAttributes.JSON_PROPERTY_NEXT_RECURRENCE, + ReportScheduleResponseAttributes.JSON_PROPERTY_RECIPIENTS, + ReportScheduleResponseAttributes.JSON_PROPERTY_RESOURCE_ID, + ReportScheduleResponseAttributes.JSON_PROPERTY_RESOURCE_TYPE, + ReportScheduleResponseAttributes.JSON_PROPERTY_RRULE, + ReportScheduleResponseAttributes.JSON_PROPERTY_STATUS, + ReportScheduleResponseAttributes.JSON_PROPERTY_TAB_ID, + ReportScheduleResponseAttributes.JSON_PROPERTY_TEMPLATE_VARIABLES, + ReportScheduleResponseAttributes.JSON_PROPERTY_TIMEFRAME, + ReportScheduleResponseAttributes.JSON_PROPERTY_TIMEZONE, + ReportScheduleResponseAttributes.JSON_PROPERTY_TITLE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReportScheduleResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DELIVERY_FORMAT = "delivery_format"; + private JsonNullable deliveryFormat = + JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_NEXT_RECURRENCE = "next_recurrence"; + private Long nextRecurrence; + + public static final String JSON_PROPERTY_RECIPIENTS = "recipients"; + private List recipients = new ArrayList<>(); + + public static final String JSON_PROPERTY_RESOURCE_ID = "resource_id"; + private String resourceId; + + public static final String JSON_PROPERTY_RESOURCE_TYPE = "resource_type"; + private ReportScheduleResourceType resourceType; + + public static final String JSON_PROPERTY_RRULE = "rrule"; + private String rrule; + + public static final String JSON_PROPERTY_STATUS = "status"; + private ReportScheduleStatus status; + + public static final String JSON_PROPERTY_TAB_ID = "tab_id"; + private String tabId; + + public static final String JSON_PROPERTY_TEMPLATE_VARIABLES = "template_variables"; + private List templateVariables = new ArrayList<>(); + + public static final String JSON_PROPERTY_TIMEFRAME = "timeframe"; + private String timeframe; + + public static final String JSON_PROPERTY_TIMEZONE = "timezone"; + private String timezone; + + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public ReportScheduleResponseAttributes() {} + + @JsonCreator + public ReportScheduleResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_DESCRIPTION) String description, + @JsonProperty(required = true, value = JSON_PROPERTY_NEXT_RECURRENCE) Long nextRecurrence, + @JsonProperty(required = true, value = JSON_PROPERTY_RECIPIENTS) List recipients, + @JsonProperty(required = true, value = JSON_PROPERTY_RESOURCE_ID) String resourceId, + @JsonProperty(required = true, value = JSON_PROPERTY_RESOURCE_TYPE) + ReportScheduleResourceType resourceType, + @JsonProperty(required = true, value = JSON_PROPERTY_RRULE) String rrule, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) ReportScheduleStatus status, + @JsonProperty(required = true, value = JSON_PROPERTY_TAB_ID) String tabId, + @JsonProperty(required = true, value = JSON_PROPERTY_TEMPLATE_VARIABLES) + List templateVariables, + @JsonProperty(required = true, value = JSON_PROPERTY_TIMEFRAME) String timeframe, + @JsonProperty(required = true, value = JSON_PROPERTY_TIMEZONE) String timezone, + @JsonProperty(required = true, value = JSON_PROPERTY_TITLE) String title) { + this.description = description; + this.nextRecurrence = nextRecurrence; + if (nextRecurrence != null) {} + this.recipients = recipients; + this.resourceId = resourceId; + this.resourceType = resourceType; + this.unparsed |= !resourceType.isValid(); + this.rrule = rrule; + this.status = status; + this.unparsed |= !status.isValid(); + this.tabId = tabId; + if (tabId != null) {} + this.templateVariables = templateVariables; + this.timeframe = timeframe; + if (timeframe != null) {} + this.timezone = timezone; + this.title = title; + } + + public ReportScheduleResponseAttributes deliveryFormat( + ReportScheduleResponseAttributesDeliveryFormat deliveryFormat) { + this.deliveryFormat = + JsonNullable.of(deliveryFormat); + return this; + } + + /** + * The delivery format for dashboard report schedules, or null if not set. + * + * @return deliveryFormat + */ + @jakarta.annotation.Nullable + @JsonIgnore + public ReportScheduleResponseAttributesDeliveryFormat getDeliveryFormat() { + return deliveryFormat.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DELIVERY_FORMAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable + getDeliveryFormat_JsonNullable() { + return deliveryFormat; + } + + @JsonProperty(JSON_PROPERTY_DELIVERY_FORMAT) + public void setDeliveryFormat_JsonNullable( + JsonNullable deliveryFormat) { + this.deliveryFormat = deliveryFormat; + } + + public void setDeliveryFormat(ReportScheduleResponseAttributesDeliveryFormat deliveryFormat) { + if (!deliveryFormat.isValid()) { + this.unparsed = true; + } + this.deliveryFormat = + JsonNullable.of(deliveryFormat); + } + + public ReportScheduleResponseAttributes description(String description) { + this.description = description; + return this; + } + + /** + * The description of the report. + * + * @return description + */ + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public ReportScheduleResponseAttributes nextRecurrence(Long nextRecurrence) { + this.nextRecurrence = nextRecurrence; + if (nextRecurrence != null) {} + return this; + } + + /** + * The Unix timestamp, in milliseconds, of the next scheduled delivery, or null if + * none is scheduled. + * + * @return nextRecurrence + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT_RECURRENCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getNextRecurrence() { + return nextRecurrence; + } + + public void setNextRecurrence(Long nextRecurrence) { + this.nextRecurrence = nextRecurrence; + } + + public ReportScheduleResponseAttributes recipients(List recipients) { + this.recipients = recipients; + return this; + } + + public ReportScheduleResponseAttributes addRecipientsItem(String recipientsItem) { + this.recipients.add(recipientsItem); + return this; + } + + /** + * The recipients of the report (email addresses, Slack channel references, or Microsoft Teams + * channel references). + * + * @return recipients + */ + @JsonProperty(JSON_PROPERTY_RECIPIENTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getRecipients() { + return recipients; + } + + public void setRecipients(List recipients) { + this.recipients = recipients; + } + + public ReportScheduleResponseAttributes resourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * The identifier of the resource rendered in the report. + * + * @return resourceId + */ + @JsonProperty(JSON_PROPERTY_RESOURCE_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getResourceId() { + return resourceId; + } + + public void setResourceId(String resourceId) { + this.resourceId = resourceId; + } + + public ReportScheduleResponseAttributes resourceType(ReportScheduleResourceType resourceType) { + this.resourceType = resourceType; + this.unparsed |= !resourceType.isValid(); + return this; + } + + /** + * The type of dashboard resource the report schedule targets. + * + * @return resourceType + */ + @JsonProperty(JSON_PROPERTY_RESOURCE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReportScheduleResourceType getResourceType() { + return resourceType; + } + + public void setResourceType(ReportScheduleResourceType resourceType) { + if (!resourceType.isValid()) { + this.unparsed = true; + } + this.resourceType = resourceType; + } + + public ReportScheduleResponseAttributes rrule(String rrule) { + this.rrule = rrule; + return this; + } + + /** + * The recurrence rule for the schedule, expressed as an iCalendar RRULE string. + * + * @return rrule + */ + @JsonProperty(JSON_PROPERTY_RRULE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRrule() { + return rrule; + } + + public void setRrule(String rrule) { + this.rrule = rrule; + } + + public ReportScheduleResponseAttributes status(ReportScheduleStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * Whether the schedule is currently delivering reports (active) or paused ( + * inactive). + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReportScheduleStatus getStatus() { + return status; + } + + public void setStatus(ReportScheduleStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + + public ReportScheduleResponseAttributes tabId(String tabId) { + this.tabId = tabId; + if (tabId != null) {} + return this; + } + + /** + * The identifier of the dashboard tab rendered in the report, or null if not set. + * + * @return tabId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAB_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTabId() { + return tabId; + } + + public void setTabId(String tabId) { + this.tabId = tabId; + } + + public ReportScheduleResponseAttributes templateVariables( + List templateVariables) { + this.templateVariables = templateVariables; + for (ReportScheduleTemplateVariable item : templateVariables) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ReportScheduleResponseAttributes addTemplateVariablesItem( + ReportScheduleTemplateVariable templateVariablesItem) { + this.templateVariables.add(templateVariablesItem); + this.unparsed |= templateVariablesItem.unparsed; + return this; + } + + /** + * The dashboard template variables applied when rendering the report. + * + * @return templateVariables + */ + @JsonProperty(JSON_PROPERTY_TEMPLATE_VARIABLES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTemplateVariables() { + return templateVariables; + } + + public void setTemplateVariables(List templateVariables) { + this.templateVariables = templateVariables; + } + + public ReportScheduleResponseAttributes timeframe(String timeframe) { + this.timeframe = timeframe; + if (timeframe != null) {} + return this; + } + + /** + * The relative timeframe of data included in the report, or null if not set. + * + * @return timeframe + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMEFRAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTimeframe() { + return timeframe; + } + + public void setTimeframe(String timeframe) { + this.timeframe = timeframe; + } + + public ReportScheduleResponseAttributes timezone(String timezone) { + this.timezone = timezone; + return this; + } + + /** + * The IANA time zone identifier the recurrence rule is evaluated in. + * + * @return timezone + */ + @JsonProperty(JSON_PROPERTY_TIMEZONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTimezone() { + return timezone; + } + + public void setTimezone(String timezone) { + this.timezone = timezone; + } + + public ReportScheduleResponseAttributes title(String title) { + this.title = title; + return this; + } + + /** + * The title of the report. + * + * @return title + */ + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReportScheduleResponseAttributes + */ + @JsonAnySetter + public ReportScheduleResponseAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReportScheduleResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReportScheduleResponseAttributes reportScheduleResponseAttributes = + (ReportScheduleResponseAttributes) o; + return Objects.equals(this.deliveryFormat, reportScheduleResponseAttributes.deliveryFormat) + && Objects.equals(this.description, reportScheduleResponseAttributes.description) + && Objects.equals(this.nextRecurrence, reportScheduleResponseAttributes.nextRecurrence) + && Objects.equals(this.recipients, reportScheduleResponseAttributes.recipients) + && Objects.equals(this.resourceId, reportScheduleResponseAttributes.resourceId) + && Objects.equals(this.resourceType, reportScheduleResponseAttributes.resourceType) + && Objects.equals(this.rrule, reportScheduleResponseAttributes.rrule) + && Objects.equals(this.status, reportScheduleResponseAttributes.status) + && Objects.equals(this.tabId, reportScheduleResponseAttributes.tabId) + && Objects.equals( + this.templateVariables, reportScheduleResponseAttributes.templateVariables) + && Objects.equals(this.timeframe, reportScheduleResponseAttributes.timeframe) + && Objects.equals(this.timezone, reportScheduleResponseAttributes.timezone) + && Objects.equals(this.title, reportScheduleResponseAttributes.title) + && Objects.equals( + this.additionalProperties, reportScheduleResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + deliveryFormat, + description, + nextRecurrence, + recipients, + resourceId, + resourceType, + rrule, + status, + tabId, + templateVariables, + timeframe, + timezone, + title, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReportScheduleResponseAttributes {\n"); + sb.append(" deliveryFormat: ").append(toIndentedString(deliveryFormat)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" nextRecurrence: ").append(toIndentedString(nextRecurrence)).append("\n"); + sb.append(" recipients: ").append(toIndentedString(recipients)).append("\n"); + sb.append(" resourceId: ").append(toIndentedString(resourceId)).append("\n"); + sb.append(" resourceType: ").append(toIndentedString(resourceType)).append("\n"); + sb.append(" rrule: ").append(toIndentedString(rrule)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" tabId: ").append(toIndentedString(tabId)).append("\n"); + sb.append(" templateVariables: ").append(toIndentedString(templateVariables)).append("\n"); + sb.append(" timeframe: ").append(toIndentedString(timeframe)).append("\n"); + sb.append(" timezone: ").append(toIndentedString(timezone)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReportScheduleResponseAttributesDeliveryFormat.java b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleResponseAttributesDeliveryFormat.java new file mode 100644 index 00000000000..d0cecc8279f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleResponseAttributesDeliveryFormat.java @@ -0,0 +1,67 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The delivery format for dashboard report schedules, or null if not set. */ +@JsonSerialize( + using = + ReportScheduleResponseAttributesDeliveryFormat + .ReportScheduleResponseAttributesDeliveryFormatSerializer.class) +public class ReportScheduleResponseAttributesDeliveryFormat extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("pdf", "png", "pdf_and_png")); + + public static final ReportScheduleResponseAttributesDeliveryFormat PDF = + new ReportScheduleResponseAttributesDeliveryFormat("pdf"); + public static final ReportScheduleResponseAttributesDeliveryFormat PNG = + new ReportScheduleResponseAttributesDeliveryFormat("png"); + public static final ReportScheduleResponseAttributesDeliveryFormat PDF_AND_PNG = + new ReportScheduleResponseAttributesDeliveryFormat("pdf_and_png"); + + ReportScheduleResponseAttributesDeliveryFormat(String value) { + super(value, allowedValues); + } + + public static class ReportScheduleResponseAttributesDeliveryFormatSerializer + extends StdSerializer { + public ReportScheduleResponseAttributesDeliveryFormatSerializer( + Class t) { + super(t); + } + + public ReportScheduleResponseAttributesDeliveryFormatSerializer() { + this(null); + } + + @Override + public void serialize( + ReportScheduleResponseAttributesDeliveryFormat value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ReportScheduleResponseAttributesDeliveryFormat fromValue(String value) { + return new ReportScheduleResponseAttributesDeliveryFormat(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReportScheduleResponseData.java b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleResponseData.java new file mode 100644 index 00000000000..bcff22c8066 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleResponseData.java @@ -0,0 +1,242 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The JSON:API data object representing a report schedule. */ +@JsonPropertyOrder({ + ReportScheduleResponseData.JSON_PROPERTY_ATTRIBUTES, + ReportScheduleResponseData.JSON_PROPERTY_ID, + ReportScheduleResponseData.JSON_PROPERTY_RELATIONSHIPS, + ReportScheduleResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReportScheduleResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ReportScheduleResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private ReportScheduleResponseRelationships relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ReportScheduleType type; + + public ReportScheduleResponseData() {} + + @JsonCreator + public ReportScheduleResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + ReportScheduleResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_RELATIONSHIPS) + ReportScheduleResponseRelationships relationships, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ReportScheduleType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ReportScheduleResponseData attributes(ReportScheduleResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The configuration and derived state of a report schedule. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReportScheduleResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(ReportScheduleResponseAttributes attributes) { + this.attributes = attributes; + } + + public ReportScheduleResponseData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the report schedule. + * + * @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 ReportScheduleResponseData relationships( + ReportScheduleResponseRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Relationships for the report schedule. + * + * @return relationships + */ + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReportScheduleResponseRelationships getRelationships() { + return relationships; + } + + public void setRelationships(ReportScheduleResponseRelationships relationships) { + this.relationships = relationships; + } + + public ReportScheduleResponseData type(ReportScheduleType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * JSON:API resource type for report schedules. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReportScheduleType getType() { + return type; + } + + public void setType(ReportScheduleType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReportScheduleResponseData + */ + @JsonAnySetter + public ReportScheduleResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReportScheduleResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReportScheduleResponseData reportScheduleResponseData = (ReportScheduleResponseData) o; + return Objects.equals(this.attributes, reportScheduleResponseData.attributes) + && Objects.equals(this.id, reportScheduleResponseData.id) + && Objects.equals(this.relationships, reportScheduleResponseData.relationships) + && Objects.equals(this.type, reportScheduleResponseData.type) + && Objects.equals( + this.additionalProperties, reportScheduleResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReportScheduleResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReportScheduleResponseRelationships.java b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleResponseRelationships.java new file mode 100644 index 00000000000..14f9b0071b8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleResponseRelationships.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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Relationships for the report schedule. */ +@JsonPropertyOrder({ReportScheduleResponseRelationships.JSON_PROPERTY_AUTHOR}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReportScheduleResponseRelationships { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTHOR = "author"; + private ReportScheduleAuthorRelationship author; + + public ReportScheduleResponseRelationships() {} + + @JsonCreator + public ReportScheduleResponseRelationships( + @JsonProperty(required = true, value = JSON_PROPERTY_AUTHOR) + ReportScheduleAuthorRelationship author) { + this.author = author; + this.unparsed |= author.unparsed; + } + + public ReportScheduleResponseRelationships author(ReportScheduleAuthorRelationship author) { + this.author = author; + this.unparsed |= author.unparsed; + return this; + } + + /** + * Relationship to the author of the report schedule. + * + * @return author + */ + @JsonProperty(JSON_PROPERTY_AUTHOR) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ReportScheduleAuthorRelationship getAuthor() { + return author; + } + + public void setAuthor(ReportScheduleAuthorRelationship author) { + this.author = author; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReportScheduleResponseRelationships + */ + @JsonAnySetter + public ReportScheduleResponseRelationships putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReportScheduleResponseRelationships object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReportScheduleResponseRelationships reportScheduleResponseRelationships = + (ReportScheduleResponseRelationships) o; + return Objects.equals(this.author, reportScheduleResponseRelationships.author) + && Objects.equals( + this.additionalProperties, reportScheduleResponseRelationships.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(author, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReportScheduleResponseRelationships {\n"); + sb.append(" author: ").append(toIndentedString(author)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReportScheduleStatus.java b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleStatus.java new file mode 100644 index 00000000000..327a790a3ac --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleStatus.java @@ -0,0 +1,59 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * Whether the schedule is currently delivering reports (active) or paused ( + * inactive). + */ +@JsonSerialize(using = ReportScheduleStatus.ReportScheduleStatusSerializer.class) +public class ReportScheduleStatus extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("active", "inactive")); + + public static final ReportScheduleStatus ACTIVE = new ReportScheduleStatus("active"); + public static final ReportScheduleStatus INACTIVE = new ReportScheduleStatus("inactive"); + + ReportScheduleStatus(String value) { + super(value, allowedValues); + } + + public static class ReportScheduleStatusSerializer extends StdSerializer { + public ReportScheduleStatusSerializer(Class t) { + super(t); + } + + public ReportScheduleStatusSerializer() { + this(null); + } + + @Override + public void serialize( + ReportScheduleStatus value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ReportScheduleStatus fromValue(String value) { + return new ReportScheduleStatus(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReportScheduleTemplateVariable.java b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleTemplateVariable.java new file mode 100644 index 00000000000..5876f1caa7a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleTemplateVariable.java @@ -0,0 +1,182 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** A dashboard template variable applied when rendering the report. */ +@JsonPropertyOrder({ + ReportScheduleTemplateVariable.JSON_PROPERTY_NAME, + ReportScheduleTemplateVariable.JSON_PROPERTY_VALUES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ReportScheduleTemplateVariable { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_VALUES = "values"; + private List values = new ArrayList<>(); + + public ReportScheduleTemplateVariable() {} + + @JsonCreator + public ReportScheduleTemplateVariable( + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_VALUES) List values) { + this.name = name; + this.values = values; + } + + public ReportScheduleTemplateVariable name(String name) { + this.name = name; + return this; + } + + /** + * The name of the template variable. + * + * @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 ReportScheduleTemplateVariable values(List values) { + this.values = values; + return this; + } + + public ReportScheduleTemplateVariable addValuesItem(String valuesItem) { + this.values.add(valuesItem); + return this; + } + + /** + * The selected values for the template variable. + * + * @return values + */ + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getValues() { + return values; + } + + public void setValues(List values) { + this.values = values; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ReportScheduleTemplateVariable + */ + @JsonAnySetter + public ReportScheduleTemplateVariable putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ReportScheduleTemplateVariable object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ReportScheduleTemplateVariable reportScheduleTemplateVariable = + (ReportScheduleTemplateVariable) o; + return Objects.equals(this.name, reportScheduleTemplateVariable.name) + && Objects.equals(this.values, reportScheduleTemplateVariable.values) + && Objects.equals( + this.additionalProperties, reportScheduleTemplateVariable.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, values, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ReportScheduleTemplateVariable {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ReportScheduleType.java b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleType.java new file mode 100644 index 00000000000..b4cfc8f217a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ReportScheduleType.java @@ -0,0 +1,53 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** JSON:API resource type for report schedules. */ +@JsonSerialize(using = ReportScheduleType.ReportScheduleTypeSerializer.class) +public class ReportScheduleType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("schedule")); + + public static final ReportScheduleType SCHEDULE = new ReportScheduleType("schedule"); + + ReportScheduleType(String value) { + super(value, allowedValues); + } + + public static class ReportScheduleTypeSerializer extends StdSerializer { + public ReportScheduleTypeSerializer(Class t) { + super(t); + } + + public ReportScheduleTypeSerializer() { + this(null); + } + + @Override + public void serialize(ReportScheduleType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ReportScheduleType fromValue(String value) { + return new ReportScheduleType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RumMetricCompute.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricCompute.java index ac4ff8f3d14..de90b9463ff 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RumMetricCompute.java +++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricCompute.java @@ -17,7 +17,7 @@ import java.util.Map; import java.util.Objects; -/** The compute rule to compute the rum-based metric. */ +/** The compute rule to compute the RUM-based metric. */ @JsonPropertyOrder({ RumMetricCompute.JSON_PROPERTY_AGGREGATION_TYPE, RumMetricCompute.JSON_PROPERTY_INCLUDE_PERCENTILES, @@ -98,7 +98,7 @@ public RumMetricCompute path(String path) { } /** - * The path to the value the rum-based metric will aggregate on. Only present when + * The path to the value the RUM-based metric will aggregate on. Only present when * aggregation_type is distribution. * * @return path diff --git a/src/main/java/com/datadog/api/client/v2/model/RumMetricCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricCreateAttributes.java index f8f85740413..886b7c0f2f3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RumMetricCreateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricCreateAttributes.java @@ -19,7 +19,7 @@ import java.util.Map; import java.util.Objects; -/** The object describing the Datadog rum-based metric to create. */ +/** The object describing the Datadog RUM-based metric to create. */ @JsonPropertyOrder({ RumMetricCreateAttributes.JSON_PROPERTY_COMPUTE, RumMetricCreateAttributes.JSON_PROPERTY_EVENT_TYPE, @@ -66,7 +66,7 @@ public RumMetricCreateAttributes compute(RumMetricCompute compute) { } /** - * The compute rule to compute the rum-based metric. + * The compute rule to compute the RUM-based metric. * * @return compute */ @@ -111,7 +111,7 @@ public RumMetricCreateAttributes filter(RumMetricFilter filter) { } /** - * The rum-based metric filter. Events matching this filter will be aggregated in this metric. + * The RUM-based metric filter. Events matching this filter will be aggregated in this metric. * * @return filter */ diff --git a/src/main/java/com/datadog/api/client/v2/model/RumMetricCreateData.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricCreateData.java index f63c74e3145..1c0381320aa 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RumMetricCreateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricCreateData.java @@ -17,7 +17,7 @@ import java.util.Map; import java.util.Objects; -/** The new rum-based metric properties. */ +/** The new RUM-based metric properties. */ @JsonPropertyOrder({ RumMetricCreateData.JSON_PROPERTY_ATTRIBUTES, RumMetricCreateData.JSON_PROPERTY_ID, @@ -58,7 +58,7 @@ public RumMetricCreateData attributes(RumMetricCreateAttributes attributes) { } /** - * The object describing the Datadog rum-based metric to create. + * The object describing the Datadog RUM-based metric to create. * * @return attributes */ @@ -78,7 +78,7 @@ public RumMetricCreateData id(String id) { } /** - * The name of the rum-based metric. + * The name of the RUM-based metric. * * @return id */ diff --git a/src/main/java/com/datadog/api/client/v2/model/RumMetricCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricCreateRequest.java index 67e8d95463a..94c4e92a9e4 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RumMetricCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricCreateRequest.java @@ -17,7 +17,7 @@ import java.util.Map; import java.util.Objects; -/** The new rum-based metric body. */ +/** The new RUM-based metric body. */ @JsonPropertyOrder({RumMetricCreateRequest.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @@ -42,7 +42,7 @@ public RumMetricCreateRequest data(RumMetricCreateData data) { } /** - * The new rum-based metric properties. + * The new RUM-based metric properties. * * @return data */ diff --git a/src/main/java/com/datadog/api/client/v2/model/RumMetricFilter.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricFilter.java index 8f737436471..3410c88da61 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RumMetricFilter.java +++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricFilter.java @@ -17,7 +17,7 @@ import java.util.Map; import java.util.Objects; -/** The rum-based metric filter. Events matching this filter will be aggregated in this metric. */ +/** The RUM-based metric filter. Events matching this filter will be aggregated in this metric. */ @JsonPropertyOrder({RumMetricFilter.JSON_PROPERTY_QUERY}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") diff --git a/src/main/java/com/datadog/api/client/v2/model/RumMetricGroupBy.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricGroupBy.java index fd46a3cbf50..fbd7e193b57 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RumMetricGroupBy.java +++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricGroupBy.java @@ -42,7 +42,7 @@ public RumMetricGroupBy path(String path) { } /** - * The path to the value the rum-based metric will be aggregated over. + * The path to the value the RUM-based metric will be aggregated over. * * @return path */ diff --git a/src/main/java/com/datadog/api/client/v2/model/RumMetricResponse.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricResponse.java index e9fcba1b385..fad12daff74 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RumMetricResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricResponse.java @@ -16,7 +16,7 @@ import java.util.Map; import java.util.Objects; -/** The rum-based metric object. */ +/** The RUM-based metric object. */ @JsonPropertyOrder({RumMetricResponse.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @@ -32,7 +32,7 @@ public RumMetricResponse data(RumMetricResponseData data) { } /** - * The rum-based metric properties. + * The RUM-based metric properties. * * @return data */ diff --git a/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseAttributes.java index 153154838d6..8f6515f6cfc 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseAttributes.java @@ -18,7 +18,7 @@ import java.util.Map; import java.util.Objects; -/** The object describing a Datadog rum-based metric. */ +/** The object describing a Datadog RUM-based metric. */ @JsonPropertyOrder({ RumMetricResponseAttributes.JSON_PROPERTY_COMPUTE, RumMetricResponseAttributes.JSON_PROPERTY_EVENT_TYPE, @@ -52,7 +52,7 @@ public RumMetricResponseAttributes compute(RumMetricResponseCompute compute) { } /** - * The compute rule to compute the rum-based metric. + * The compute rule to compute the RUM-based metric. * * @return compute */ @@ -99,7 +99,7 @@ public RumMetricResponseAttributes filter(RumMetricResponseFilter filter) { } /** - * The rum-based metric filter. RUM events matching this filter will be aggregated in this metric. + * The RUM-based metric filter. RUM events matching this filter will be aggregated in this metric. * * @return filter */ diff --git a/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseCompute.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseCompute.java index 04050ebcaba..c37da631fd9 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseCompute.java +++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseCompute.java @@ -16,7 +16,7 @@ import java.util.Map; import java.util.Objects; -/** The compute rule to compute the rum-based metric. */ +/** The compute rule to compute the RUM-based metric. */ @JsonPropertyOrder({ RumMetricResponseCompute.JSON_PROPERTY_AGGREGATION_TYPE, RumMetricResponseCompute.JSON_PROPERTY_INCLUDE_PERCENTILES, @@ -88,7 +88,7 @@ public RumMetricResponseCompute path(String path) { } /** - * The path to the value the rum-based metric will aggregate on. Only present when + * The path to the value the RUM-based metric will aggregate on. Only present when * aggregation_type is distribution. * * @return path diff --git a/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseData.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseData.java index a4d64fd601c..dec7191be0b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseData.java +++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseData.java @@ -16,7 +16,7 @@ import java.util.Map; import java.util.Objects; -/** The rum-based metric properties. */ +/** The RUM-based metric properties. */ @JsonPropertyOrder({ RumMetricResponseData.JSON_PROPERTY_ATTRIBUTES, RumMetricResponseData.JSON_PROPERTY_ID, @@ -42,7 +42,7 @@ public RumMetricResponseData attributes(RumMetricResponseAttributes attributes) } /** - * The object describing a Datadog rum-based metric. + * The object describing a Datadog RUM-based metric. * * @return attributes */ @@ -63,7 +63,7 @@ public RumMetricResponseData id(String id) { } /** - * The name of the rum-based metric. + * The name of the RUM-based metric. * * @return id */ diff --git a/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseFilter.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseFilter.java index 50d0a4ad45a..73cc8bd1049 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseFilter.java +++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseFilter.java @@ -17,7 +17,7 @@ import java.util.Objects; /** - * The rum-based metric filter. RUM events matching this filter will be aggregated in this metric. + * The RUM-based metric filter. RUM events matching this filter will be aggregated in this metric. */ @JsonPropertyOrder({RumMetricResponseFilter.JSON_PROPERTY_QUERY}) @jakarta.annotation.Generated( diff --git a/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseGroupBy.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseGroupBy.java index 758259b1968..77a395c9b16 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseGroupBy.java +++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseGroupBy.java @@ -37,7 +37,7 @@ public RumMetricResponseGroupBy path(String path) { } /** - * The path to the value the rum-based metric will be aggregated over. + * The path to the value the RUM-based metric will be aggregated over. * * @return path */ diff --git a/src/main/java/com/datadog/api/client/v2/model/RumMetricUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricUpdateAttributes.java index 68a8b6db02a..65c045ecc94 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RumMetricUpdateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricUpdateAttributes.java @@ -18,7 +18,7 @@ import java.util.Map; import java.util.Objects; -/** The rum-based metric properties that will be updated. */ +/** The RUM-based metric properties that will be updated. */ @JsonPropertyOrder({ RumMetricUpdateAttributes.JSON_PROPERTY_COMPUTE, RumMetricUpdateAttributes.JSON_PROPERTY_FILTER, @@ -44,7 +44,7 @@ public RumMetricUpdateAttributes compute(RumMetricUpdateCompute compute) { } /** - * The compute rule to compute the rum-based metric. + * The compute rule to compute the RUM-based metric. * * @return compute */ @@ -66,7 +66,7 @@ public RumMetricUpdateAttributes filter(RumMetricFilter filter) { } /** - * The rum-based metric filter. Events matching this filter will be aggregated in this metric. + * The RUM-based metric filter. Events matching this filter will be aggregated in this metric. * * @return filter */ diff --git a/src/main/java/com/datadog/api/client/v2/model/RumMetricUpdateCompute.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricUpdateCompute.java index 4566485ccca..8f323384d2a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RumMetricUpdateCompute.java +++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricUpdateCompute.java @@ -16,7 +16,7 @@ import java.util.Map; import java.util.Objects; -/** The compute rule to compute the rum-based metric. */ +/** The compute rule to compute the RUM-based metric. */ @JsonPropertyOrder({RumMetricUpdateCompute.JSON_PROPERTY_INCLUDE_PERCENTILES}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") diff --git a/src/main/java/com/datadog/api/client/v2/model/RumMetricUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricUpdateData.java index 3af36d6a282..5c6e0ae7108 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RumMetricUpdateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricUpdateData.java @@ -17,7 +17,7 @@ import java.util.Map; import java.util.Objects; -/** The new rum-based metric properties. */ +/** The new RUM-based metric properties. */ @JsonPropertyOrder({ RumMetricUpdateData.JSON_PROPERTY_ATTRIBUTES, RumMetricUpdateData.JSON_PROPERTY_ID, @@ -56,7 +56,7 @@ public RumMetricUpdateData attributes(RumMetricUpdateAttributes attributes) { } /** - * The rum-based metric properties that will be updated. + * The RUM-based metric properties that will be updated. * * @return attributes */ @@ -76,7 +76,7 @@ public RumMetricUpdateData id(String id) { } /** - * The name of the rum-based metric. + * The name of the RUM-based metric. * * @return id */ diff --git a/src/main/java/com/datadog/api/client/v2/model/RumMetricUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricUpdateRequest.java index a3d3863b71a..a63d9e304d8 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RumMetricUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricUpdateRequest.java @@ -17,7 +17,7 @@ import java.util.Map; import java.util.Objects; -/** The new rum-based metric body. */ +/** The new RUM-based metric body. */ @JsonPropertyOrder({RumMetricUpdateRequest.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @@ -42,7 +42,7 @@ public RumMetricUpdateRequest data(RumMetricUpdateData data) { } /** - * The new rum-based metric properties. + * The new RUM-based metric properties. * * @return data */ diff --git a/src/main/java/com/datadog/api/client/v2/model/RumMetricsResponse.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricsResponse.java index 048565a607d..60f3d659dfb 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RumMetricsResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricsResponse.java @@ -18,7 +18,7 @@ import java.util.Map; import java.util.Objects; -/** All the available rum-based metric objects. */ +/** All the available RUM-based metric objects. */ @JsonPropertyOrder({RumMetricsResponse.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @@ -45,7 +45,7 @@ public RumMetricsResponse addDataItem(RumMetricResponseData dataItem) { } /** - * A list of rum-based metric objects. + * A list of RUM-based metric objects. * * @return data */ diff --git a/src/main/java/com/datadog/api/client/v2/model/RumRateLimitAdaptiveConfig.java b/src/main/java/com/datadog/api/client/v2/model/RumRateLimitAdaptiveConfig.java new file mode 100644 index 00000000000..f2d4353a4a2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRateLimitAdaptiveConfig.java @@ -0,0 +1,146 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The configuration used when mode is adaptive. */ +@JsonPropertyOrder({RumRateLimitAdaptiveConfig.JSON_PROPERTY_MAX_RETENTION_RATE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRateLimitAdaptiveConfig { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_MAX_RETENTION_RATE = "max_retention_rate"; + private Double maxRetentionRate; + + public RumRateLimitAdaptiveConfig() {} + + @JsonCreator + public RumRateLimitAdaptiveConfig( + @JsonProperty(required = true, value = JSON_PROPERTY_MAX_RETENTION_RATE) + Double maxRetentionRate) { + this.maxRetentionRate = maxRetentionRate; + } + + public RumRateLimitAdaptiveConfig maxRetentionRate(Double maxRetentionRate) { + this.maxRetentionRate = maxRetentionRate; + return this; + } + + /** + * The maximum fraction of sessions to retain, in the range (0, 1]. minimum: 0 + * maximum: 1 + * + * @return maxRetentionRate + */ + @JsonProperty(JSON_PROPERTY_MAX_RETENTION_RATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Double getMaxRetentionRate() { + return maxRetentionRate; + } + + public void setMaxRetentionRate(Double maxRetentionRate) { + this.maxRetentionRate = maxRetentionRate; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RumRateLimitAdaptiveConfig + */ + @JsonAnySetter + public RumRateLimitAdaptiveConfig putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RumRateLimitAdaptiveConfig object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRateLimitAdaptiveConfig rumRateLimitAdaptiveConfig = (RumRateLimitAdaptiveConfig) o; + return Objects.equals(this.maxRetentionRate, rumRateLimitAdaptiveConfig.maxRetentionRate) + && Objects.equals( + this.additionalProperties, rumRateLimitAdaptiveConfig.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(maxRetentionRate, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRateLimitAdaptiveConfig {\n"); + sb.append(" maxRetentionRate: ").append(toIndentedString(maxRetentionRate)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RumRateLimitConfigAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RumRateLimitConfigAttributes.java new file mode 100644 index 00000000000..4c32d21db25 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRateLimitConfigAttributes.java @@ -0,0 +1,290 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The RUM rate limit configuration properties. */ +@JsonPropertyOrder({ + RumRateLimitConfigAttributes.JSON_PROPERTY_ADAPTIVE, + RumRateLimitConfigAttributes.JSON_PROPERTY_CUSTOM, + RumRateLimitConfigAttributes.JSON_PROPERTY_MODE, + RumRateLimitConfigAttributes.JSON_PROPERTY_ORG_ID, + RumRateLimitConfigAttributes.JSON_PROPERTY_UPDATED_AT, + RumRateLimitConfigAttributes.JSON_PROPERTY_UPDATED_BY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRateLimitConfigAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ADAPTIVE = "adaptive"; + private RumRateLimitAdaptiveConfig adaptive; + + public static final String JSON_PROPERTY_CUSTOM = "custom"; + private RumRateLimitCustomConfig custom; + + public static final String JSON_PROPERTY_MODE = "mode"; + private RumRateLimitMode mode; + + public static final String JSON_PROPERTY_ORG_ID = "org_id"; + private Long orgId; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private String updatedAt; + + public static final String JSON_PROPERTY_UPDATED_BY = "updated_by"; + private String updatedBy; + + public RumRateLimitConfigAttributes() {} + + @JsonCreator + public RumRateLimitConfigAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_MODE) RumRateLimitMode mode, + @JsonProperty(required = true, value = JSON_PROPERTY_ORG_ID) Long orgId) { + this.mode = mode; + this.unparsed |= !mode.isValid(); + this.orgId = orgId; + } + + public RumRateLimitConfigAttributes adaptive(RumRateLimitAdaptiveConfig adaptive) { + this.adaptive = adaptive; + this.unparsed |= adaptive.unparsed; + return this; + } + + /** + * The configuration used when mode is adaptive. + * + * @return adaptive + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADAPTIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RumRateLimitAdaptiveConfig getAdaptive() { + return adaptive; + } + + public void setAdaptive(RumRateLimitAdaptiveConfig adaptive) { + this.adaptive = adaptive; + } + + public RumRateLimitConfigAttributes custom(RumRateLimitCustomConfig custom) { + this.custom = custom; + this.unparsed |= custom.unparsed; + return this; + } + + /** + * The configuration used when mode is custom. + * + * @return custom + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RumRateLimitCustomConfig getCustom() { + return custom; + } + + public void setCustom(RumRateLimitCustomConfig custom) { + this.custom = custom; + } + + public RumRateLimitConfigAttributes mode(RumRateLimitMode mode) { + this.mode = mode; + this.unparsed |= !mode.isValid(); + return this; + } + + /** + * The rate limit mode. custom enforces a fixed session limit, while adaptive + * dynamically adjusts retention. + * + * @return mode + */ + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRateLimitMode getMode() { + return mode; + } + + public void setMode(RumRateLimitMode mode) { + if (!mode.isValid()) { + this.unparsed = true; + } + this.mode = mode; + } + + public RumRateLimitConfigAttributes orgId(Long orgId) { + this.orgId = orgId; + return this; + } + + /** + * The ID of the organization the rate limit configuration belongs to. + * + * @return orgId + */ + @JsonProperty(JSON_PROPERTY_ORG_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getOrgId() { + return orgId; + } + + public void setOrgId(Long orgId) { + this.orgId = orgId; + } + + public RumRateLimitConfigAttributes updatedAt(String updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * The date the rate limit configuration was last updated. + * + * @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 RumRateLimitConfigAttributes updatedBy(String updatedBy) { + this.updatedBy = updatedBy; + return this; + } + + /** + * The handle of the user who last updated the rate limit configuration. + * + * @return updatedBy + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUpdatedBy() { + return updatedBy; + } + + public void setUpdatedBy(String updatedBy) { + this.updatedBy = updatedBy; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RumRateLimitConfigAttributes + */ + @JsonAnySetter + public RumRateLimitConfigAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RumRateLimitConfigAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRateLimitConfigAttributes rumRateLimitConfigAttributes = (RumRateLimitConfigAttributes) o; + return Objects.equals(this.adaptive, rumRateLimitConfigAttributes.adaptive) + && Objects.equals(this.custom, rumRateLimitConfigAttributes.custom) + && Objects.equals(this.mode, rumRateLimitConfigAttributes.mode) + && Objects.equals(this.orgId, rumRateLimitConfigAttributes.orgId) + && Objects.equals(this.updatedAt, rumRateLimitConfigAttributes.updatedAt) + && Objects.equals(this.updatedBy, rumRateLimitConfigAttributes.updatedBy) + && Objects.equals( + this.additionalProperties, rumRateLimitConfigAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(adaptive, custom, mode, orgId, updatedAt, updatedBy, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRateLimitConfigAttributes {\n"); + sb.append(" adaptive: ").append(toIndentedString(adaptive)).append("\n"); + sb.append(" custom: ").append(toIndentedString(custom)).append("\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" updatedBy: ").append(toIndentedString(updatedBy)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RumRateLimitConfigData.java b/src/main/java/com/datadog/api/client/v2/model/RumRateLimitConfigData.java new file mode 100644 index 00000000000..8846c44b7ab --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRateLimitConfigData.java @@ -0,0 +1,209 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The RUM rate limit configuration object. */ +@JsonPropertyOrder({ + RumRateLimitConfigData.JSON_PROPERTY_ATTRIBUTES, + RumRateLimitConfigData.JSON_PROPERTY_ID, + RumRateLimitConfigData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRateLimitConfigData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RumRateLimitConfigAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private RumRateLimitConfigType type = RumRateLimitConfigType.RUM_RATE_LIMIT_CONFIG; + + public RumRateLimitConfigData() {} + + @JsonCreator + public RumRateLimitConfigData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + RumRateLimitConfigAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RumRateLimitConfigType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public RumRateLimitConfigData attributes(RumRateLimitConfigAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The RUM rate limit configuration properties. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRateLimitConfigAttributes getAttributes() { + return attributes; + } + + public void setAttributes(RumRateLimitConfigAttributes attributes) { + this.attributes = attributes; + } + + public RumRateLimitConfigData id(String id) { + this.id = id; + return this; + } + + /** + * The identifier of the scope the rate limit configuration applies to. + * + * @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 RumRateLimitConfigData type(RumRateLimitConfigType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of the resource, always rum_rate_limit_config. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRateLimitConfigType getType() { + return type; + } + + public void setType(RumRateLimitConfigType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RumRateLimitConfigData + */ + @JsonAnySetter + public RumRateLimitConfigData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RumRateLimitConfigData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRateLimitConfigData rumRateLimitConfigData = (RumRateLimitConfigData) o; + return Objects.equals(this.attributes, rumRateLimitConfigData.attributes) + && Objects.equals(this.id, rumRateLimitConfigData.id) + && Objects.equals(this.type, rumRateLimitConfigData.type) + && Objects.equals(this.additionalProperties, rumRateLimitConfigData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRateLimitConfigData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RumRateLimitConfigResponse.java b/src/main/java/com/datadog/api/client/v2/model/RumRateLimitConfigResponse.java new file mode 100644 index 00000000000..6b746db0b65 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRateLimitConfigResponse.java @@ -0,0 +1,146 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The RUM rate limit configuration response. */ +@JsonPropertyOrder({RumRateLimitConfigResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRateLimitConfigResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private RumRateLimitConfigData data; + + public RumRateLimitConfigResponse() {} + + @JsonCreator + public RumRateLimitConfigResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) RumRateLimitConfigData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public RumRateLimitConfigResponse data(RumRateLimitConfigData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The RUM rate limit configuration object. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRateLimitConfigData getData() { + return data; + } + + public void setData(RumRateLimitConfigData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RumRateLimitConfigResponse + */ + @JsonAnySetter + public RumRateLimitConfigResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RumRateLimitConfigResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRateLimitConfigResponse rumRateLimitConfigResponse = (RumRateLimitConfigResponse) o; + return Objects.equals(this.data, rumRateLimitConfigResponse.data) + && Objects.equals( + this.additionalProperties, rumRateLimitConfigResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRateLimitConfigResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RumRateLimitConfigType.java b/src/main/java/com/datadog/api/client/v2/model/RumRateLimitConfigType.java new file mode 100644 index 00000000000..5c3238f126a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRateLimitConfigType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The type of the resource, always rum_rate_limit_config. */ +@JsonSerialize(using = RumRateLimitConfigType.RumRateLimitConfigTypeSerializer.class) +public class RumRateLimitConfigType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("rum_rate_limit_config")); + + public static final RumRateLimitConfigType RUM_RATE_LIMIT_CONFIG = + new RumRateLimitConfigType("rum_rate_limit_config"); + + RumRateLimitConfigType(String value) { + super(value, allowedValues); + } + + public static class RumRateLimitConfigTypeSerializer + extends StdSerializer { + public RumRateLimitConfigTypeSerializer(Class t) { + super(t); + } + + public RumRateLimitConfigTypeSerializer() { + this(null); + } + + @Override + public void serialize( + RumRateLimitConfigType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RumRateLimitConfigType fromValue(String value) { + return new RumRateLimitConfigType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RumRateLimitConfigUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RumRateLimitConfigUpdateAttributes.java new file mode 100644 index 00000000000..5eb0dc261ad --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRateLimitConfigUpdateAttributes.java @@ -0,0 +1,209 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The RUM rate limit configuration properties to create or update. */ +@JsonPropertyOrder({ + RumRateLimitConfigUpdateAttributes.JSON_PROPERTY_ADAPTIVE, + RumRateLimitConfigUpdateAttributes.JSON_PROPERTY_CUSTOM, + RumRateLimitConfigUpdateAttributes.JSON_PROPERTY_MODE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRateLimitConfigUpdateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ADAPTIVE = "adaptive"; + private RumRateLimitAdaptiveConfig adaptive; + + public static final String JSON_PROPERTY_CUSTOM = "custom"; + private RumRateLimitCustomConfig custom; + + public static final String JSON_PROPERTY_MODE = "mode"; + private RumRateLimitMode mode; + + public RumRateLimitConfigUpdateAttributes() {} + + @JsonCreator + public RumRateLimitConfigUpdateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_MODE) RumRateLimitMode mode) { + this.mode = mode; + this.unparsed |= !mode.isValid(); + } + + public RumRateLimitConfigUpdateAttributes adaptive(RumRateLimitAdaptiveConfig adaptive) { + this.adaptive = adaptive; + this.unparsed |= adaptive.unparsed; + return this; + } + + /** + * The configuration used when mode is adaptive. + * + * @return adaptive + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADAPTIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RumRateLimitAdaptiveConfig getAdaptive() { + return adaptive; + } + + public void setAdaptive(RumRateLimitAdaptiveConfig adaptive) { + this.adaptive = adaptive; + } + + public RumRateLimitConfigUpdateAttributes custom(RumRateLimitCustomConfig custom) { + this.custom = custom; + this.unparsed |= custom.unparsed; + return this; + } + + /** + * The configuration used when mode is custom. + * + * @return custom + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RumRateLimitCustomConfig getCustom() { + return custom; + } + + public void setCustom(RumRateLimitCustomConfig custom) { + this.custom = custom; + } + + public RumRateLimitConfigUpdateAttributes mode(RumRateLimitMode mode) { + this.mode = mode; + this.unparsed |= !mode.isValid(); + return this; + } + + /** + * The rate limit mode. custom enforces a fixed session limit, while adaptive + * dynamically adjusts retention. + * + * @return mode + */ + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRateLimitMode getMode() { + return mode; + } + + public void setMode(RumRateLimitMode mode) { + if (!mode.isValid()) { + this.unparsed = true; + } + this.mode = mode; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RumRateLimitConfigUpdateAttributes + */ + @JsonAnySetter + public RumRateLimitConfigUpdateAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RumRateLimitConfigUpdateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRateLimitConfigUpdateAttributes rumRateLimitConfigUpdateAttributes = + (RumRateLimitConfigUpdateAttributes) o; + return Objects.equals(this.adaptive, rumRateLimitConfigUpdateAttributes.adaptive) + && Objects.equals(this.custom, rumRateLimitConfigUpdateAttributes.custom) + && Objects.equals(this.mode, rumRateLimitConfigUpdateAttributes.mode) + && Objects.equals( + this.additionalProperties, rumRateLimitConfigUpdateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(adaptive, custom, mode, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRateLimitConfigUpdateAttributes {\n"); + sb.append(" adaptive: ").append(toIndentedString(adaptive)).append("\n"); + sb.append(" custom: ").append(toIndentedString(custom)).append("\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RumRateLimitConfigUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/RumRateLimitConfigUpdateData.java new file mode 100644 index 00000000000..65a0c90cec3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRateLimitConfigUpdateData.java @@ -0,0 +1,211 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The RUM rate limit configuration to create or update. */ +@JsonPropertyOrder({ + RumRateLimitConfigUpdateData.JSON_PROPERTY_ATTRIBUTES, + RumRateLimitConfigUpdateData.JSON_PROPERTY_ID, + RumRateLimitConfigUpdateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRateLimitConfigUpdateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RumRateLimitConfigUpdateAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private RumRateLimitConfigType type = RumRateLimitConfigType.RUM_RATE_LIMIT_CONFIG; + + public RumRateLimitConfigUpdateData() {} + + @JsonCreator + public RumRateLimitConfigUpdateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + RumRateLimitConfigUpdateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RumRateLimitConfigType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public RumRateLimitConfigUpdateData attributes(RumRateLimitConfigUpdateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The RUM rate limit configuration properties to create or update. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRateLimitConfigUpdateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(RumRateLimitConfigUpdateAttributes attributes) { + this.attributes = attributes; + } + + public RumRateLimitConfigUpdateData id(String id) { + this.id = id; + return this; + } + + /** + * The identifier of the scope the rate limit configuration applies to. Must match scope_id + * in the path. + * + * @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 RumRateLimitConfigUpdateData type(RumRateLimitConfigType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of the resource, always rum_rate_limit_config. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRateLimitConfigType getType() { + return type; + } + + public void setType(RumRateLimitConfigType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RumRateLimitConfigUpdateData + */ + @JsonAnySetter + public RumRateLimitConfigUpdateData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RumRateLimitConfigUpdateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRateLimitConfigUpdateData rumRateLimitConfigUpdateData = (RumRateLimitConfigUpdateData) o; + return Objects.equals(this.attributes, rumRateLimitConfigUpdateData.attributes) + && Objects.equals(this.id, rumRateLimitConfigUpdateData.id) + && Objects.equals(this.type, rumRateLimitConfigUpdateData.type) + && Objects.equals( + this.additionalProperties, rumRateLimitConfigUpdateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRateLimitConfigUpdateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RumRateLimitConfigUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/RumRateLimitConfigUpdateRequest.java new file mode 100644 index 00000000000..73486e0ccea --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRateLimitConfigUpdateRequest.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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The body of a request to create or update a RUM rate limit configuration. */ +@JsonPropertyOrder({RumRateLimitConfigUpdateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRateLimitConfigUpdateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private RumRateLimitConfigUpdateData data; + + public RumRateLimitConfigUpdateRequest() {} + + @JsonCreator + public RumRateLimitConfigUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + RumRateLimitConfigUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public RumRateLimitConfigUpdateRequest data(RumRateLimitConfigUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The RUM rate limit configuration to create or update. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRateLimitConfigUpdateData getData() { + return data; + } + + public void setData(RumRateLimitConfigUpdateData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RumRateLimitConfigUpdateRequest + */ + @JsonAnySetter + public RumRateLimitConfigUpdateRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RumRateLimitConfigUpdateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRateLimitConfigUpdateRequest rumRateLimitConfigUpdateRequest = + (RumRateLimitConfigUpdateRequest) o; + return Objects.equals(this.data, rumRateLimitConfigUpdateRequest.data) + && Objects.equals( + this.additionalProperties, rumRateLimitConfigUpdateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRateLimitConfigUpdateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RumRateLimitCustomConfig.java b/src/main/java/com/datadog/api/client/v2/model/RumRateLimitCustomConfig.java new file mode 100644 index 00000000000..d1a7623794b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRateLimitCustomConfig.java @@ -0,0 +1,277 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The configuration used when mode is custom. */ +@JsonPropertyOrder({ + RumRateLimitCustomConfig.JSON_PROPERTY_DAILY_RESET_TIME, + RumRateLimitCustomConfig.JSON_PROPERTY_DAILY_RESET_TIMEZONE, + RumRateLimitCustomConfig.JSON_PROPERTY_QUOTA_REACHED_ACTION, + RumRateLimitCustomConfig.JSON_PROPERTY_SESSION_LIMIT, + RumRateLimitCustomConfig.JSON_PROPERTY_WINDOW_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumRateLimitCustomConfig { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DAILY_RESET_TIME = "daily_reset_time"; + private String dailyResetTime; + + public static final String JSON_PROPERTY_DAILY_RESET_TIMEZONE = "daily_reset_timezone"; + private String dailyResetTimezone; + + public static final String JSON_PROPERTY_QUOTA_REACHED_ACTION = "quota_reached_action"; + private RumRateLimitQuotaReachedAction quotaReachedAction; + + public static final String JSON_PROPERTY_SESSION_LIMIT = "session_limit"; + private Long sessionLimit; + + public static final String JSON_PROPERTY_WINDOW_TYPE = "window_type"; + private RumRateLimitWindowType windowType; + + public RumRateLimitCustomConfig() {} + + @JsonCreator + public RumRateLimitCustomConfig( + @JsonProperty(required = true, value = JSON_PROPERTY_DAILY_RESET_TIME) String dailyResetTime, + @JsonProperty(required = true, value = JSON_PROPERTY_DAILY_RESET_TIMEZONE) + String dailyResetTimezone, + @JsonProperty(required = true, value = JSON_PROPERTY_QUOTA_REACHED_ACTION) + RumRateLimitQuotaReachedAction quotaReachedAction, + @JsonProperty(required = true, value = JSON_PROPERTY_SESSION_LIMIT) Long sessionLimit, + @JsonProperty(required = true, value = JSON_PROPERTY_WINDOW_TYPE) + RumRateLimitWindowType windowType) { + this.dailyResetTime = dailyResetTime; + this.dailyResetTimezone = dailyResetTimezone; + this.quotaReachedAction = quotaReachedAction; + this.unparsed |= !quotaReachedAction.isValid(); + this.sessionLimit = sessionLimit; + this.windowType = windowType; + this.unparsed |= !windowType.isValid(); + } + + public RumRateLimitCustomConfig dailyResetTime(String dailyResetTime) { + this.dailyResetTime = dailyResetTime; + return this; + } + + /** + * The time of day when the daily quota resets, in HH:MM 24-hour format. + * + * @return dailyResetTime + */ + @JsonProperty(JSON_PROPERTY_DAILY_RESET_TIME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDailyResetTime() { + return dailyResetTime; + } + + public void setDailyResetTime(String dailyResetTime) { + this.dailyResetTime = dailyResetTime; + } + + public RumRateLimitCustomConfig dailyResetTimezone(String dailyResetTimezone) { + this.dailyResetTimezone = dailyResetTimezone; + return this; + } + + /** + * The timezone offset used for the daily reset time, in ±HH:MM format. + * + * @return dailyResetTimezone + */ + @JsonProperty(JSON_PROPERTY_DAILY_RESET_TIMEZONE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDailyResetTimezone() { + return dailyResetTimezone; + } + + public void setDailyResetTimezone(String dailyResetTimezone) { + this.dailyResetTimezone = dailyResetTimezone; + } + + public RumRateLimitCustomConfig quotaReachedAction( + RumRateLimitQuotaReachedAction quotaReachedAction) { + this.quotaReachedAction = quotaReachedAction; + this.unparsed |= !quotaReachedAction.isValid(); + return this; + } + + /** + * The action to take when the session quota is reached. + * + * @return quotaReachedAction + */ + @JsonProperty(JSON_PROPERTY_QUOTA_REACHED_ACTION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRateLimitQuotaReachedAction getQuotaReachedAction() { + return quotaReachedAction; + } + + public void setQuotaReachedAction(RumRateLimitQuotaReachedAction quotaReachedAction) { + if (!quotaReachedAction.isValid()) { + this.unparsed = true; + } + this.quotaReachedAction = quotaReachedAction; + } + + public RumRateLimitCustomConfig sessionLimit(Long sessionLimit) { + this.sessionLimit = sessionLimit; + return this; + } + + /** + * The maximum number of sessions allowed within the window. minimum: 1 + * + * @return sessionLimit + */ + @JsonProperty(JSON_PROPERTY_SESSION_LIMIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getSessionLimit() { + return sessionLimit; + } + + public void setSessionLimit(Long sessionLimit) { + this.sessionLimit = sessionLimit; + } + + public RumRateLimitCustomConfig windowType(RumRateLimitWindowType windowType) { + this.windowType = windowType; + this.unparsed |= !windowType.isValid(); + return this; + } + + /** + * The window type over which the session limit is enforced. + * + * @return windowType + */ + @JsonProperty(JSON_PROPERTY_WINDOW_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumRateLimitWindowType getWindowType() { + return windowType; + } + + public void setWindowType(RumRateLimitWindowType windowType) { + if (!windowType.isValid()) { + this.unparsed = true; + } + this.windowType = windowType; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RumRateLimitCustomConfig + */ + @JsonAnySetter + public RumRateLimitCustomConfig putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RumRateLimitCustomConfig object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumRateLimitCustomConfig rumRateLimitCustomConfig = (RumRateLimitCustomConfig) o; + return Objects.equals(this.dailyResetTime, rumRateLimitCustomConfig.dailyResetTime) + && Objects.equals(this.dailyResetTimezone, rumRateLimitCustomConfig.dailyResetTimezone) + && Objects.equals(this.quotaReachedAction, rumRateLimitCustomConfig.quotaReachedAction) + && Objects.equals(this.sessionLimit, rumRateLimitCustomConfig.sessionLimit) + && Objects.equals(this.windowType, rumRateLimitCustomConfig.windowType) + && Objects.equals(this.additionalProperties, rumRateLimitCustomConfig.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + dailyResetTime, + dailyResetTimezone, + quotaReachedAction, + sessionLimit, + windowType, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumRateLimitCustomConfig {\n"); + sb.append(" dailyResetTime: ").append(toIndentedString(dailyResetTime)).append("\n"); + sb.append(" dailyResetTimezone: ").append(toIndentedString(dailyResetTimezone)).append("\n"); + sb.append(" quotaReachedAction: ").append(toIndentedString(quotaReachedAction)).append("\n"); + sb.append(" sessionLimit: ").append(toIndentedString(sessionLimit)).append("\n"); + sb.append(" windowType: ").append(toIndentedString(windowType)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RumRateLimitMode.java b/src/main/java/com/datadog/api/client/v2/model/RumRateLimitMode.java new file mode 100644 index 00000000000..386cf07e47a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRateLimitMode.java @@ -0,0 +1,58 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * The rate limit mode. custom enforces a fixed session limit, while adaptive + * dynamically adjusts retention. + */ +@JsonSerialize(using = RumRateLimitMode.RumRateLimitModeSerializer.class) +public class RumRateLimitMode extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("custom", "adaptive")); + + public static final RumRateLimitMode CUSTOM = new RumRateLimitMode("custom"); + public static final RumRateLimitMode ADAPTIVE = new RumRateLimitMode("adaptive"); + + RumRateLimitMode(String value) { + super(value, allowedValues); + } + + public static class RumRateLimitModeSerializer extends StdSerializer { + public RumRateLimitModeSerializer(Class t) { + super(t); + } + + public RumRateLimitModeSerializer() { + this(null); + } + + @Override + public void serialize(RumRateLimitMode value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RumRateLimitMode fromValue(String value) { + return new RumRateLimitMode(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RumRateLimitQuotaReachedAction.java b/src/main/java/com/datadog/api/client/v2/model/RumRateLimitQuotaReachedAction.java new file mode 100644 index 00000000000..c3847c2dc5c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRateLimitQuotaReachedAction.java @@ -0,0 +1,60 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The action to take when the session quota is reached. */ +@JsonSerialize( + using = RumRateLimitQuotaReachedAction.RumRateLimitQuotaReachedActionSerializer.class) +public class RumRateLimitQuotaReachedAction extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("stop", "slowdown")); + + public static final RumRateLimitQuotaReachedAction STOP = + new RumRateLimitQuotaReachedAction("stop"); + public static final RumRateLimitQuotaReachedAction SLOWDOWN = + new RumRateLimitQuotaReachedAction("slowdown"); + + RumRateLimitQuotaReachedAction(String value) { + super(value, allowedValues); + } + + public static class RumRateLimitQuotaReachedActionSerializer + extends StdSerializer { + public RumRateLimitQuotaReachedActionSerializer(Class t) { + super(t); + } + + public RumRateLimitQuotaReachedActionSerializer() { + this(null); + } + + @Override + public void serialize( + RumRateLimitQuotaReachedAction value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RumRateLimitQuotaReachedAction fromValue(String value) { + return new RumRateLimitQuotaReachedAction(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RumRateLimitScopeType.java b/src/main/java/com/datadog/api/client/v2/model/RumRateLimitScopeType.java new file mode 100644 index 00000000000..793ccd67fae --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRateLimitScopeType.java @@ -0,0 +1,55 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The type of scope the rate limit configuration applies to. */ +@JsonSerialize(using = RumRateLimitScopeType.RumRateLimitScopeTypeSerializer.class) +public class RumRateLimitScopeType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("application")); + + public static final RumRateLimitScopeType APPLICATION = new RumRateLimitScopeType("application"); + + RumRateLimitScopeType(String value) { + super(value, allowedValues); + } + + public static class RumRateLimitScopeTypeSerializer extends StdSerializer { + public RumRateLimitScopeTypeSerializer(Class t) { + super(t); + } + + public RumRateLimitScopeTypeSerializer() { + this(null); + } + + @Override + public void serialize( + RumRateLimitScopeType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RumRateLimitScopeType fromValue(String value) { + return new RumRateLimitScopeType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RumRateLimitWindowType.java b/src/main/java/com/datadog/api/client/v2/model/RumRateLimitWindowType.java new file mode 100644 index 00000000000..1439da26bfb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumRateLimitWindowType.java @@ -0,0 +1,55 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The window type over which the session limit is enforced. */ +@JsonSerialize(using = RumRateLimitWindowType.RumRateLimitWindowTypeSerializer.class) +public class RumRateLimitWindowType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("daily")); + + public static final RumRateLimitWindowType DAILY = new RumRateLimitWindowType("daily"); + + RumRateLimitWindowType(String value) { + super(value, allowedValues); + } + + public static class RumRateLimitWindowTypeSerializer + extends StdSerializer { + public RumRateLimitWindowTypeSerializer(Class t) { + super(t); + } + + public RumRateLimitWindowTypeSerializer() { + this(null); + } + + @Override + public void serialize( + RumRateLimitWindowType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RumRateLimitWindowType fromValue(String value) { + return new RumRateLimitWindowType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RunDataObservabilityMonitorResponse.java b/src/main/java/com/datadog/api/client/v2/model/RunDataObservabilityMonitorResponse.java new file mode 100644 index 00000000000..9b67c53f70e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RunDataObservabilityMonitorResponse.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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The response returned when a data observability monitor run is triggered. */ +@JsonPropertyOrder({RunDataObservabilityMonitorResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RunDataObservabilityMonitorResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private RunDataObservabilityMonitorResponseData data; + + public RunDataObservabilityMonitorResponse() {} + + @JsonCreator + public RunDataObservabilityMonitorResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + RunDataObservabilityMonitorResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public RunDataObservabilityMonitorResponse data(RunDataObservabilityMonitorResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data object returned when a data observability monitor run is triggered. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RunDataObservabilityMonitorResponseData getData() { + return data; + } + + public void setData(RunDataObservabilityMonitorResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RunDataObservabilityMonitorResponse + */ + @JsonAnySetter + public RunDataObservabilityMonitorResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RunDataObservabilityMonitorResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RunDataObservabilityMonitorResponse runDataObservabilityMonitorResponse = + (RunDataObservabilityMonitorResponse) o; + return Objects.equals(this.data, runDataObservabilityMonitorResponse.data) + && Objects.equals( + this.additionalProperties, runDataObservabilityMonitorResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RunDataObservabilityMonitorResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RunDataObservabilityMonitorResponseData.java b/src/main/java/com/datadog/api/client/v2/model/RunDataObservabilityMonitorResponseData.java new file mode 100644 index 00000000000..afcb4dc3ca7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RunDataObservabilityMonitorResponseData.java @@ -0,0 +1,182 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The data object returned when a data observability monitor run is triggered. */ +@JsonPropertyOrder({ + RunDataObservabilityMonitorResponseData.JSON_PROPERTY_ID, + RunDataObservabilityMonitorResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RunDataObservabilityMonitorResponseData { + @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 DataObservabilityMonitorRunType type = DataObservabilityMonitorRunType.MONITOR_RUN; + + public RunDataObservabilityMonitorResponseData() {} + + @JsonCreator + public RunDataObservabilityMonitorResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + DataObservabilityMonitorRunType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public RunDataObservabilityMonitorResponseData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the monitor run. + * + * @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 RunDataObservabilityMonitorResponseData type(DataObservabilityMonitorRunType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The JSON:API resource type for a data observability monitor run. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DataObservabilityMonitorRunType getType() { + return type; + } + + public void setType(DataObservabilityMonitorRunType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return RunDataObservabilityMonitorResponseData + */ + @JsonAnySetter + public RunDataObservabilityMonitorResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this RunDataObservabilityMonitorResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RunDataObservabilityMonitorResponseData runDataObservabilityMonitorResponseData = + (RunDataObservabilityMonitorResponseData) o; + return Objects.equals(this.id, runDataObservabilityMonitorResponseData.id) + && Objects.equals(this.type, runDataObservabilityMonitorResponseData.type) + && Objects.equals( + this.additionalProperties, + runDataObservabilityMonitorResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RunDataObservabilityMonitorResponseData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceResponseData.java b/src/main/java/com/datadog/api/client/v2/model/SAMLConfiguration.java similarity index 70% rename from src/main/java/com/datadog/api/client/v2/model/IncidentServiceResponseData.java rename to src/main/java/com/datadog/api/client/v2/model/SAMLConfiguration.java index a2d7f8d8a2f..8a8f5868e1f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceResponseData.java +++ b/src/main/java/com/datadog/api/client/v2/model/SAMLConfiguration.java @@ -17,69 +17,69 @@ import java.util.Map; import java.util.Objects; -/** Incident Service data from responses. */ +/** A SAML configuration object. */ @JsonPropertyOrder({ - IncidentServiceResponseData.JSON_PROPERTY_ATTRIBUTES, - IncidentServiceResponseData.JSON_PROPERTY_ID, - IncidentServiceResponseData.JSON_PROPERTY_RELATIONSHIPS, - IncidentServiceResponseData.JSON_PROPERTY_TYPE + SAMLConfiguration.JSON_PROPERTY_ATTRIBUTES, + SAMLConfiguration.JSON_PROPERTY_ID, + SAMLConfiguration.JSON_PROPERTY_RELATIONSHIPS, + SAMLConfiguration.JSON_PROPERTY_TYPE }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class IncidentServiceResponseData { +public class SAMLConfiguration { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; - private IncidentServiceResponseAttributes attributes; + private SAMLConfigurationAttributes attributes; public static final String JSON_PROPERTY_ID = "id"; private String id; public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; - private IncidentServiceRelationships relationships; + private SAMLConfigurationRelationships relationships; public static final String JSON_PROPERTY_TYPE = "type"; - private IncidentServiceType type = IncidentServiceType.SERVICES; + private SAMLConfigurationsType type = SAMLConfigurationsType.SAML_CONFIGURATIONS; - public IncidentServiceResponseData() {} + public SAMLConfiguration() {} @JsonCreator - public IncidentServiceResponseData( + public SAMLConfiguration( @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentServiceType type) { + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SAMLConfigurationsType type) { this.id = id; this.type = type; this.unparsed |= !type.isValid(); } - public IncidentServiceResponseData attributes(IncidentServiceResponseAttributes attributes) { + public SAMLConfiguration attributes(SAMLConfigurationAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * The incident service's attributes from a response. + * Attributes of a SAML configuration. * * @return attributes */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTRIBUTES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentServiceResponseAttributes getAttributes() { + public SAMLConfigurationAttributes getAttributes() { return attributes; } - public void setAttributes(IncidentServiceResponseAttributes attributes) { + public void setAttributes(SAMLConfigurationAttributes attributes) { this.attributes = attributes; } - public IncidentServiceResponseData id(String id) { + public SAMLConfiguration id(String id) { this.id = id; return this; } /** - * The incident service's ID. + * The UUID of the SAML configuration. * * @return id */ @@ -93,36 +93,46 @@ public void setId(String id) { this.id = id; } + public SAMLConfiguration relationships(SAMLConfigurationRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + /** - * The incident service's relationships. + * Relationships of a SAML configuration. * * @return relationships */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentServiceRelationships getRelationships() { + public SAMLConfigurationRelationships getRelationships() { return relationships; } - public IncidentServiceResponseData type(IncidentServiceType type) { + public void setRelationships(SAMLConfigurationRelationships relationships) { + this.relationships = relationships; + } + + public SAMLConfiguration type(SAMLConfigurationsType type) { this.type = type; this.unparsed |= !type.isValid(); return this; } /** - * Incident service resource type. + * SAML configurations resource type. * * @return type */ @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentServiceType getType() { + public SAMLConfigurationsType getType() { return type; } - public void setType(IncidentServiceType type) { + public void setType(SAMLConfigurationsType type) { if (!type.isValid()) { this.unparsed = true; } @@ -141,10 +151,10 @@ public void setType(IncidentServiceType type) { * * @param key The arbitrary key to set * @param value The associated value - * @return IncidentServiceResponseData + * @return SAMLConfiguration */ @JsonAnySetter - public IncidentServiceResponseData putAdditionalProperty(String key, Object value) { + public SAMLConfiguration putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -175,7 +185,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this IncidentServiceResponseData object is equal to o. */ + /** Return true if this SAMLConfiguration object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -184,13 +194,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { 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) - && Objects.equals( - this.additionalProperties, incidentServiceResponseData.additionalProperties); + SAMLConfiguration samlConfiguration = (SAMLConfiguration) o; + return Objects.equals(this.attributes, samlConfiguration.attributes) + && Objects.equals(this.id, samlConfiguration.id) + && Objects.equals(this.relationships, samlConfiguration.relationships) + && Objects.equals(this.type, samlConfiguration.type) + && Objects.equals(this.additionalProperties, samlConfiguration.additionalProperties); } @Override @@ -201,7 +210,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class IncidentServiceResponseData {\n"); + sb.append("class SAMLConfiguration {\n"); sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/SAMLConfigurationAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SAMLConfigurationAttributes.java new file mode 100644 index 00000000000..76b540b16ea --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SAMLConfigurationAttributes.java @@ -0,0 +1,366 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Attributes of a SAML configuration. */ +@JsonPropertyOrder({ + SAMLConfigurationAttributes.JSON_PROPERTY_ASSERTION_CONSUMER_SERVICE, + SAMLConfigurationAttributes.JSON_PROPERTY_CREATED_AT, + SAMLConfigurationAttributes.JSON_PROPERTY_ENTITY_ID, + SAMLConfigurationAttributes.JSON_PROPERTY_EXPIRES_AT, + SAMLConfigurationAttributes.JSON_PROPERTY_IDP_INITIATED, + SAMLConfigurationAttributes.JSON_PROPERTY_JIT_DOMAINS, + SAMLConfigurationAttributes.JSON_PROPERTY_MODIFIED_AT, + SAMLConfigurationAttributes.JSON_PROPERTY_SSO_URL +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SAMLConfigurationAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ASSERTION_CONSUMER_SERVICE = + "assertion_consumer_service"; + private List assertionConsumerService = null; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_ENTITY_ID = "entity_id"; + private String entityId; + + public static final String JSON_PROPERTY_EXPIRES_AT = "expires_at"; + private JsonNullable expiresAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_IDP_INITIATED = "idp_initiated"; + private Boolean idpInitiated; + + public static final String JSON_PROPERTY_JIT_DOMAINS = "jit_domains"; + private List jitDomains = null; + + public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; + private OffsetDateTime modifiedAt; + + public static final String JSON_PROPERTY_SSO_URL = "sso_url"; + private JsonNullable ssoUrl = JsonNullable.undefined(); + + public SAMLConfigurationAttributes assertionConsumerService( + List assertionConsumerService) { + this.assertionConsumerService = assertionConsumerService; + return this; + } + + public SAMLConfigurationAttributes addAssertionConsumerServiceItem( + String assertionConsumerServiceItem) { + if (this.assertionConsumerService == null) { + this.assertionConsumerService = new ArrayList<>(); + } + this.assertionConsumerService.add(assertionConsumerServiceItem); + return this; + } + + /** + * The assertion consumer service (ACS) URLs that the identity provider posts SAML responses to. + * + * @return assertionConsumerService + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ASSERTION_CONSUMER_SERVICE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAssertionConsumerService() { + return assertionConsumerService; + } + + public void setAssertionConsumerService(List assertionConsumerService) { + this.assertionConsumerService = assertionConsumerService; + } + + /** + * Creation time of the SAML configuration. + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public SAMLConfigurationAttributes entityId(String entityId) { + this.entityId = entityId; + return this; + } + + /** + * The service provider entity ID Datadog presents to the identity provider. + * + * @return entityId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENTITY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEntityId() { + return entityId; + } + + public void setEntityId(String entityId) { + this.entityId = entityId; + } + + public SAMLConfigurationAttributes expiresAt(OffsetDateTime expiresAt) { + this.expiresAt = JsonNullable.of(expiresAt); + return this; + } + + /** + * Expiration time of the uploaded identity provider metadata. + * + * @return expiresAt + */ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getExpiresAt() { + return expiresAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_EXPIRES_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getExpiresAt_JsonNullable() { + return expiresAt; + } + + @JsonProperty(JSON_PROPERTY_EXPIRES_AT) + public void setExpiresAt_JsonNullable(JsonNullable expiresAt) { + this.expiresAt = expiresAt; + } + + public void setExpiresAt(OffsetDateTime expiresAt) { + this.expiresAt = JsonNullable.of(expiresAt); + } + + public SAMLConfigurationAttributes idpInitiated(Boolean idpInitiated) { + this.idpInitiated = idpInitiated; + return this; + } + + /** + * Whether identity-provider-initiated login is enabled for the organization. + * + * @return idpInitiated + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDP_INITIATED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIdpInitiated() { + return idpInitiated; + } + + public void setIdpInitiated(Boolean idpInitiated) { + this.idpInitiated = idpInitiated; + } + + public SAMLConfigurationAttributes jitDomains(List jitDomains) { + this.jitDomains = jitDomains; + return this; + } + + public SAMLConfigurationAttributes addJitDomainsItem(String jitDomainsItem) { + if (this.jitDomains == null) { + this.jitDomains = new ArrayList<>(); + } + this.jitDomains.add(jitDomainsItem); + return this; + } + + /** + * Email domains for which users are automatically provisioned on first SAML login (just-in-time + * provisioning). + * + * @return jitDomains + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_JIT_DOMAINS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getJitDomains() { + return jitDomains; + } + + public void setJitDomains(List jitDomains) { + this.jitDomains = jitDomains; + } + + /** + * Time of the last SAML configuration modification. + * + * @return modifiedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } + + public SAMLConfigurationAttributes ssoUrl(String ssoUrl) { + this.ssoUrl = JsonNullable.of(ssoUrl); + return this; + } + + /** + * The single sign-on URL users can visit to start a SAML login. Returns null when + * the organization is identity-provider-initiated and has no subdomain. + * + * @return ssoUrl + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getSsoUrl() { + return ssoUrl.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SSO_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getSsoUrl_JsonNullable() { + return ssoUrl; + } + + @JsonProperty(JSON_PROPERTY_SSO_URL) + public void setSsoUrl_JsonNullable(JsonNullable ssoUrl) { + this.ssoUrl = ssoUrl; + } + + public void setSsoUrl(String ssoUrl) { + this.ssoUrl = JsonNullable.of(ssoUrl); + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SAMLConfigurationAttributes + */ + @JsonAnySetter + public SAMLConfigurationAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SAMLConfigurationAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SAMLConfigurationAttributes samlConfigurationAttributes = (SAMLConfigurationAttributes) o; + return Objects.equals( + this.assertionConsumerService, samlConfigurationAttributes.assertionConsumerService) + && Objects.equals(this.createdAt, samlConfigurationAttributes.createdAt) + && Objects.equals(this.entityId, samlConfigurationAttributes.entityId) + && Objects.equals(this.expiresAt, samlConfigurationAttributes.expiresAt) + && Objects.equals(this.idpInitiated, samlConfigurationAttributes.idpInitiated) + && Objects.equals(this.jitDomains, samlConfigurationAttributes.jitDomains) + && Objects.equals(this.modifiedAt, samlConfigurationAttributes.modifiedAt) + && Objects.equals(this.ssoUrl, samlConfigurationAttributes.ssoUrl) + && Objects.equals( + this.additionalProperties, samlConfigurationAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + assertionConsumerService, + createdAt, + entityId, + expiresAt, + idpInitiated, + jitDomains, + modifiedAt, + ssoUrl, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SAMLConfigurationAttributes {\n"); + sb.append(" assertionConsumerService: ") + .append(toIndentedString(assertionConsumerService)) + .append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" entityId: ").append(toIndentedString(entityId)).append("\n"); + sb.append(" expiresAt: ").append(toIndentedString(expiresAt)).append("\n"); + sb.append(" idpInitiated: ").append(toIndentedString(idpInitiated)).append("\n"); + sb.append(" jitDomains: ").append(toIndentedString(jitDomains)).append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append(" ssoUrl: ").append(toIndentedString(ssoUrl)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SAMLConfigurationRelationships.java b/src/main/java/com/datadog/api/client/v2/model/SAMLConfigurationRelationships.java new file mode 100644 index 00000000000..7be53b91292 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SAMLConfigurationRelationships.java @@ -0,0 +1,138 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Relationships of a SAML configuration. */ +@JsonPropertyOrder({SAMLConfigurationRelationships.JSON_PROPERTY_DEFAULT_ROLES}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SAMLConfigurationRelationships { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DEFAULT_ROLES = "default_roles"; + private RelationshipToRoles defaultRoles; + + public SAMLConfigurationRelationships defaultRoles(RelationshipToRoles defaultRoles) { + this.defaultRoles = defaultRoles; + this.unparsed |= defaultRoles.unparsed; + return this; + } + + /** + * Relationship to roles. + * + * @return defaultRoles + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEFAULT_ROLES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RelationshipToRoles getDefaultRoles() { + return defaultRoles; + } + + public void setDefaultRoles(RelationshipToRoles defaultRoles) { + this.defaultRoles = defaultRoles; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SAMLConfigurationRelationships + */ + @JsonAnySetter + public SAMLConfigurationRelationships putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SAMLConfigurationRelationships object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SAMLConfigurationRelationships samlConfigurationRelationships = + (SAMLConfigurationRelationships) o; + return Objects.equals(this.defaultRoles, samlConfigurationRelationships.defaultRoles) + && Objects.equals( + this.additionalProperties, samlConfigurationRelationships.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(defaultRoles, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SAMLConfigurationRelationships {\n"); + sb.append(" defaultRoles: ").append(toIndentedString(defaultRoles)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SAMLConfigurationResponse.java b/src/main/java/com/datadog/api/client/v2/model/SAMLConfigurationResponse.java new file mode 100644 index 00000000000..c4ec4d38f82 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SAMLConfigurationResponse.java @@ -0,0 +1,189 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing a single SAML configuration. */ +@JsonPropertyOrder({ + SAMLConfigurationResponse.JSON_PROPERTY_DATA, + SAMLConfigurationResponse.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SAMLConfigurationResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private SAMLConfiguration data; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included = null; + + public SAMLConfigurationResponse() {} + + @JsonCreator + public SAMLConfigurationResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) SAMLConfiguration data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public SAMLConfigurationResponse data(SAMLConfiguration data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * A SAML configuration object. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SAMLConfiguration getData() { + return data; + } + + public void setData(SAMLConfiguration data) { + this.data = data; + } + + public SAMLConfigurationResponse included(List included) { + this.included = included; + for (Role item : included) { + this.unparsed |= item.unparsed; + } + return this; + } + + public SAMLConfigurationResponse addIncludedItem(Role includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + this.unparsed |= includedItem.unparsed; + return this; + } + + /** + * Resources related to the SAML configuration, such as the default roles. + * + * @return included + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getIncluded() { + return included; + } + + public void setIncluded(List included) { + this.included = included; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SAMLConfigurationResponse + */ + @JsonAnySetter + public SAMLConfigurationResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SAMLConfigurationResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SAMLConfigurationResponse samlConfigurationResponse = (SAMLConfigurationResponse) o; + return Objects.equals(this.data, samlConfigurationResponse.data) + && Objects.equals(this.included, samlConfigurationResponse.included) + && Objects.equals( + this.additionalProperties, samlConfigurationResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SAMLConfigurationResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SAMLConfigurationUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SAMLConfigurationUpdateAttributes.java new file mode 100644 index 00000000000..04b2e9e58fc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SAMLConfigurationUpdateAttributes.java @@ -0,0 +1,177 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import 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; + +/** Attributes for updating a SAML configuration. */ +@JsonPropertyOrder({ + SAMLConfigurationUpdateAttributes.JSON_PROPERTY_IDP_INITIATED, + SAMLConfigurationUpdateAttributes.JSON_PROPERTY_JIT_DOMAINS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SAMLConfigurationUpdateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_IDP_INITIATED = "idp_initiated"; + private Boolean idpInitiated; + + public static final String JSON_PROPERTY_JIT_DOMAINS = "jit_domains"; + private List jitDomains = null; + + public SAMLConfigurationUpdateAttributes idpInitiated(Boolean idpInitiated) { + this.idpInitiated = idpInitiated; + return this; + } + + /** + * Whether identity-provider-initiated login is enabled for the organization. + * + * @return idpInitiated + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IDP_INITIATED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIdpInitiated() { + return idpInitiated; + } + + public void setIdpInitiated(Boolean idpInitiated) { + this.idpInitiated = idpInitiated; + } + + public SAMLConfigurationUpdateAttributes jitDomains(List jitDomains) { + this.jitDomains = jitDomains; + return this; + } + + public SAMLConfigurationUpdateAttributes addJitDomainsItem(String jitDomainsItem) { + if (this.jitDomains == null) { + this.jitDomains = new ArrayList<>(); + } + this.jitDomains.add(jitDomainsItem); + return this; + } + + /** + * Email domains for which users are automatically provisioned on first SAML login (just-in-time + * provisioning). A default role is required to enable just-in-time provisioning. + * + * @return jitDomains + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_JIT_DOMAINS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getJitDomains() { + return jitDomains; + } + + public void setJitDomains(List jitDomains) { + this.jitDomains = jitDomains; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SAMLConfigurationUpdateAttributes + */ + @JsonAnySetter + public SAMLConfigurationUpdateAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SAMLConfigurationUpdateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SAMLConfigurationUpdateAttributes samlConfigurationUpdateAttributes = + (SAMLConfigurationUpdateAttributes) o; + return Objects.equals(this.idpInitiated, samlConfigurationUpdateAttributes.idpInitiated) + && Objects.equals(this.jitDomains, samlConfigurationUpdateAttributes.jitDomains) + && Objects.equals( + this.additionalProperties, samlConfigurationUpdateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(idpInitiated, jitDomains, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SAMLConfigurationUpdateAttributes {\n"); + sb.append(" idpInitiated: ").append(toIndentedString(idpInitiated)).append("\n"); + sb.append(" jitDomains: ").append(toIndentedString(jitDomains)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SAMLConfigurationUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/SAMLConfigurationUpdateData.java new file mode 100644 index 00000000000..1daed0c9330 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SAMLConfigurationUpdateData.java @@ -0,0 +1,235 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data for updating a SAML configuration. */ +@JsonPropertyOrder({ + SAMLConfigurationUpdateData.JSON_PROPERTY_ATTRIBUTES, + SAMLConfigurationUpdateData.JSON_PROPERTY_ID, + SAMLConfigurationUpdateData.JSON_PROPERTY_RELATIONSHIPS, + SAMLConfigurationUpdateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SAMLConfigurationUpdateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private SAMLConfigurationUpdateAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private SAMLConfigurationRelationships relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SAMLConfigurationsType type = SAMLConfigurationsType.SAML_CONFIGURATIONS; + + public SAMLConfigurationUpdateData() {} + + @JsonCreator + public SAMLConfigurationUpdateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SAMLConfigurationsType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public SAMLConfigurationUpdateData attributes(SAMLConfigurationUpdateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for updating a SAML configuration. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SAMLConfigurationUpdateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(SAMLConfigurationUpdateAttributes attributes) { + this.attributes = attributes; + } + + public SAMLConfigurationUpdateData id(String id) { + this.id = id; + return this; + } + + /** + * The UUID of the SAML configuration to update. Must match the UUID in the URL path. + * + * @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 SAMLConfigurationUpdateData relationships(SAMLConfigurationRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Relationships of a SAML configuration. + * + * @return relationships + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SAMLConfigurationRelationships getRelationships() { + return relationships; + } + + public void setRelationships(SAMLConfigurationRelationships relationships) { + this.relationships = relationships; + } + + public SAMLConfigurationUpdateData type(SAMLConfigurationsType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * SAML configurations resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SAMLConfigurationsType getType() { + return type; + } + + public void setType(SAMLConfigurationsType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SAMLConfigurationUpdateData + */ + @JsonAnySetter + public SAMLConfigurationUpdateData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SAMLConfigurationUpdateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SAMLConfigurationUpdateData samlConfigurationUpdateData = (SAMLConfigurationUpdateData) o; + return Objects.equals(this.attributes, samlConfigurationUpdateData.attributes) + && Objects.equals(this.id, samlConfigurationUpdateData.id) + && Objects.equals(this.relationships, samlConfigurationUpdateData.relationships) + && Objects.equals(this.type, samlConfigurationUpdateData.type) + && Objects.equals( + this.additionalProperties, samlConfigurationUpdateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SAMLConfigurationUpdateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SAMLConfigurationUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/SAMLConfigurationUpdateRequest.java new file mode 100644 index 00000000000..228f86214f4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SAMLConfigurationUpdateRequest.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to update a SAML configuration. */ +@JsonPropertyOrder({SAMLConfigurationUpdateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SAMLConfigurationUpdateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private SAMLConfigurationUpdateData data; + + public SAMLConfigurationUpdateRequest() {} + + @JsonCreator + public SAMLConfigurationUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) SAMLConfigurationUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public SAMLConfigurationUpdateRequest data(SAMLConfigurationUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data for updating a SAML configuration. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SAMLConfigurationUpdateData getData() { + return data; + } + + public void setData(SAMLConfigurationUpdateData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SAMLConfigurationUpdateRequest + */ + @JsonAnySetter + public SAMLConfigurationUpdateRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SAMLConfigurationUpdateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SAMLConfigurationUpdateRequest samlConfigurationUpdateRequest = + (SAMLConfigurationUpdateRequest) o; + return Objects.equals(this.data, samlConfigurationUpdateRequest.data) + && Objects.equals( + this.additionalProperties, samlConfigurationUpdateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SAMLConfigurationUpdateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SAMLConfigurationsResponse.java b/src/main/java/com/datadog/api/client/v2/model/SAMLConfigurationsResponse.java new file mode 100644 index 00000000000..6540745c6a9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SAMLConfigurationsResponse.java @@ -0,0 +1,191 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing a list of SAML configurations. */ +@JsonPropertyOrder({ + SAMLConfigurationsResponse.JSON_PROPERTY_DATA, + SAMLConfigurationsResponse.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SAMLConfigurationsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = null; + + public static final String JSON_PROPERTY_INCLUDED = "included"; + private List included = null; + + public SAMLConfigurationsResponse data(List data) { + this.data = data; + for (SAMLConfiguration item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public SAMLConfigurationsResponse addDataItem(SAMLConfiguration dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Array of SAML configurations. An organization has at most one SAML configuration. + * + * @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 SAMLConfigurationsResponse included(List included) { + this.included = included; + for (Role item : included) { + this.unparsed |= item.unparsed; + } + return this; + } + + public SAMLConfigurationsResponse addIncludedItem(Role includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + this.unparsed |= includedItem.unparsed; + return this; + } + + /** + * Resources related to the SAML configurations, such as the default roles. + * + * @return included + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getIncluded() { + return included; + } + + public void setIncluded(List included) { + this.included = included; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SAMLConfigurationsResponse + */ + @JsonAnySetter + public SAMLConfigurationsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SAMLConfigurationsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SAMLConfigurationsResponse samlConfigurationsResponse = (SAMLConfigurationsResponse) o; + return Objects.equals(this.data, samlConfigurationsResponse.data) + && Objects.equals(this.included, samlConfigurationsResponse.included) + && Objects.equals( + this.additionalProperties, samlConfigurationsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SAMLConfigurationsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SAMLConfigurationsType.java b/src/main/java/com/datadog/api/client/v2/model/SAMLConfigurationsType.java new file mode 100644 index 00000000000..b3e82203718 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SAMLConfigurationsType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** SAML configurations resource type. */ +@JsonSerialize(using = SAMLConfigurationsType.SAMLConfigurationsTypeSerializer.class) +public class SAMLConfigurationsType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("saml_configurations")); + + public static final SAMLConfigurationsType SAML_CONFIGURATIONS = + new SAMLConfigurationsType("saml_configurations"); + + SAMLConfigurationsType(String value) { + super(value, allowedValues); + } + + public static class SAMLConfigurationsTypeSerializer + extends StdSerializer { + public SAMLConfigurationsTypeSerializer(Class t) { + super(t); + } + + public SAMLConfigurationsTypeSerializer() { + this(null); + } + + @Override + public void serialize( + SAMLConfigurationsType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SAMLConfigurationsType fromValue(String value) { + return new SAMLConfigurationsType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceIncludedItems.java b/src/main/java/com/datadog/api/client/v2/model/ScanResultResponse.java similarity index 59% rename from src/main/java/com/datadog/api/client/v2/model/IncidentServiceIncludedItems.java rename to src/main/java/com/datadog/api/client/v2/model/ScanResultResponse.java index 69a4e52d7bc..c94a0723e53 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceIncludedItems.java +++ b/src/main/java/com/datadog/api/client/v2/model/ScanResultResponse.java @@ -36,44 +36,40 @@ @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()); +@JsonDeserialize(using = ScanResultResponse.ScanResultResponseDeserializer.class) +@JsonSerialize(using = ScanResultResponse.ScanResultResponseSerializer.class) +public class ScanResultResponse extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(ScanResultResponse.class.getName()); @JsonIgnore public boolean unparsed = false; - public static class IncidentServiceIncludedItemsSerializer - extends StdSerializer { - public IncidentServiceIncludedItemsSerializer(Class t) { + public static class ScanResultResponseSerializer extends StdSerializer { + public ScanResultResponseSerializer(Class t) { super(t); } - public IncidentServiceIncludedItemsSerializer() { + public ScanResultResponseSerializer() { this(null); } @Override - public void serialize( - IncidentServiceIncludedItems value, JsonGenerator jgen, SerializerProvider provider) + public void serialize(ScanResultResponse value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { jgen.writeObject(value.getActualInstance()); } } - public static class IncidentServiceIncludedItemsDeserializer - extends StdDeserializer { - public IncidentServiceIncludedItemsDeserializer() { - this(IncidentServiceIncludedItems.class); + public static class ScanResultResponseDeserializer extends StdDeserializer { + public ScanResultResponseDeserializer() { + this(ScanResultResponse.class); } - public IncidentServiceIncludedItemsDeserializer(Class vc) { + public ScanResultResponseDeserializer(Class vc) { super(vc); } @Override - public IncidentServiceIncludedItems deserialize(JsonParser jp, DeserializationContext ctxt) + public ScanResultResponse deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { JsonNode tree = jp.readValueAsTree(); Object deserialized = null; @@ -81,48 +77,48 @@ public IncidentServiceIncludedItems deserialize(JsonParser jp, DeserializationCo boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); int match = 0; JsonToken token = tree.traverse(jp.getCodec()).nextToken(); - // deserialize User + // deserialize Map 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)) { + if (Map.class.equals(Integer.class) + || Map.class.equals(Long.class) + || Map.class.equals(Float.class) + || Map.class.equals(Double.class) + || Map.class.equals(Boolean.class) + || Map.class.equals(String.class)) { attemptParsing = typeCoercion; if (!attemptParsing) { attemptParsing |= - ((User.class.equals(Integer.class) || User.class.equals(Long.class)) + ((Map.class.equals(Integer.class) || Map.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); attemptParsing |= - ((User.class.equals(Float.class) || User.class.equals(Double.class)) + ((Map.class.equals(Float.class) || Map.class.equals(Double.class)) && (token == JsonToken.VALUE_NUMBER_FLOAT || token == JsonToken.VALUE_NUMBER_INT)); attemptParsing |= - (User.class.equals(Boolean.class) + (Map.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); - attemptParsing |= (User.class.equals(String.class) && token == JsonToken.VALUE_STRING); + attemptParsing |= (Map.class.equals(String.class) && token == JsonToken.VALUE_STRING); } } if (attemptParsing) { - tmp = tree.traverse(jp.getCodec()).readValueAs(User.class); + tmp = + tree.traverse(jp.getCodec()).readValueAs(new TypeReference>() {}); // TODO: there is no validation against JSON schema constraints // (min, 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'"); + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'Map'"); } } catch (Exception e) { // deserialization failed, continue - log.log(Level.FINER, "Input data does not match schema 'User'", e); + log.log(Level.FINER, "Input data does not match schema 'Map'", e); } - IncidentServiceIncludedItems ret = new IncidentServiceIncludedItems(); + ScanResultResponse ret = new ScanResultResponse(); if (match == 1) { ret.setActualInstance(deserialized); } else { @@ -138,46 +134,44 @@ public IncidentServiceIncludedItems deserialize(JsonParser jp, DeserializationCo /** Handle deserialization of the 'null' value. */ @Override - public IncidentServiceIncludedItems getNullValue(DeserializationContext ctxt) + public ScanResultResponse getNullValue(DeserializationContext ctxt) throws JsonMappingException { - throw new JsonMappingException( - ctxt.getParser(), "IncidentServiceIncludedItems cannot be null"); + throw new JsonMappingException(ctxt.getParser(), "ScanResultResponse cannot be null"); } } // store a list of schema names defined in oneOf public static final Map schemas = new HashMap(); - public IncidentServiceIncludedItems() { + public ScanResultResponse() { super("oneOf", Boolean.FALSE); } - public IncidentServiceIncludedItems(User o) { + public ScanResultResponse(Map o) { super("oneOf", Boolean.FALSE); setActualInstance(o); } static { - schemas.put("User", new GenericType() {}); - JSON.registerDescendants( - IncidentServiceIncludedItems.class, Collections.unmodifiableMap(schemas)); + schemas.put("Map", new GenericType>() {}); + JSON.registerDescendants(ScanResultResponse.class, Collections.unmodifiableMap(schemas)); } @Override public Map getSchemas() { - return IncidentServiceIncludedItems.schemas; + return ScanResultResponse.schemas; } /** * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: User + * against the oneOf child schemas: Map<String, Object> * *

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>())) { + if (JSON.isInstanceOf(Map.class, instance, new HashSet>())) { super.setActualInstance(instance); return; } @@ -186,13 +180,13 @@ public void setActualInstance(Object instance) { super.setActualInstance(instance); return; } - throw new RuntimeException("Invalid instance type. Must be User"); + throw new RuntimeException("Invalid instance type. Must be Map"); } /** - * Get the actual instance, which can be the following: User + * Get the actual instance, which can be the following: Map<String, Object> * - * @return The actual instance (User) + * @return The actual instance (Map<String, Object>) */ @Override public Object getActualInstance() { @@ -200,13 +194,13 @@ public Object getActualInstance() { } /** - * Get the actual instance of `User`. If the actual instance is not `User`, the ClassCastException - * will be thrown. + * Get the actual instance of `Map<String, Object>`. If the actual instance is not + * `Map<String, Object>`, the ClassCastException will be thrown. * - * @return The actual instance of `User` - * @throws ClassCastException if the instance is not `User` + * @return The actual instance of `Map<String, Object>` + * @throws ClassCastException if the instance is not `Map<String, Object>` */ - public User getUser() throws ClassCastException { - return (User) super.getActualInstance(); + public Map getMap() throws ClassCastException { + return (Map) super.getActualInstance(); } } diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceNowTicketsDataType.java b/src/main/java/com/datadog/api/client/v2/model/ServiceNowTicketsDataType.java new file mode 100644 index 00000000000..747561684d7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceNowTicketsDataType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** ServiceNow tickets resource type. */ +@JsonSerialize(using = ServiceNowTicketsDataType.ServiceNowTicketsDataTypeSerializer.class) +public class ServiceNowTicketsDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("servicenow_tickets")); + + public static final ServiceNowTicketsDataType SERVICENOW_TICKETS = + new ServiceNowTicketsDataType("servicenow_tickets"); + + ServiceNowTicketsDataType(String value) { + super(value, allowedValues); + } + + public static class ServiceNowTicketsDataTypeSerializer + extends StdSerializer { + public ServiceNowTicketsDataTypeSerializer(Class t) { + super(t); + } + + public ServiceNowTicketsDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + ServiceNowTicketsDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ServiceNowTicketsDataType fromValue(String value) { + return new ServiceNowTicketsDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceRepositoryInfoDataType.java b/src/main/java/com/datadog/api/client/v2/model/ServiceRepositoryInfoDataType.java new file mode 100644 index 00000000000..7d0c4c0e088 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceRepositoryInfoDataType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The resource type for service repository info objects. */ +@JsonSerialize(using = ServiceRepositoryInfoDataType.ServiceRepositoryInfoDataTypeSerializer.class) +public class ServiceRepositoryInfoDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("service_repository_info")); + + public static final ServiceRepositoryInfoDataType SERVICE_REPOSITORY_INFO = + new ServiceRepositoryInfoDataType("service_repository_info"); + + ServiceRepositoryInfoDataType(String value) { + super(value, allowedValues); + } + + public static class ServiceRepositoryInfoDataTypeSerializer + extends StdSerializer { + public ServiceRepositoryInfoDataTypeSerializer(Class t) { + super(t); + } + + public ServiceRepositoryInfoDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + ServiceRepositoryInfoDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ServiceRepositoryInfoDataType fromValue(String value) { + return new ServiceRepositoryInfoDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceRepositoryInfoRequest.java b/src/main/java/com/datadog/api/client/v2/model/ServiceRepositoryInfoRequest.java new file mode 100644 index 00000000000..8882d661923 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceRepositoryInfoRequest.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request body for retrieving service repository information. */ +@JsonPropertyOrder({ServiceRepositoryInfoRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ServiceRepositoryInfoRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private ServiceRepositoryInfoRequestData data; + + public ServiceRepositoryInfoRequest() {} + + @JsonCreator + public ServiceRepositoryInfoRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + ServiceRepositoryInfoRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public ServiceRepositoryInfoRequest data(ServiceRepositoryInfoRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for the service repository info request. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ServiceRepositoryInfoRequestData getData() { + return data; + } + + public void setData(ServiceRepositoryInfoRequestData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ServiceRepositoryInfoRequest + */ + @JsonAnySetter + public ServiceRepositoryInfoRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ServiceRepositoryInfoRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ServiceRepositoryInfoRequest serviceRepositoryInfoRequest = (ServiceRepositoryInfoRequest) o; + return Objects.equals(this.data, serviceRepositoryInfoRequest.data) + && Objects.equals( + this.additionalProperties, serviceRepositoryInfoRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ServiceRepositoryInfoRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceRepositoryInfoRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ServiceRepositoryInfoRequestAttributes.java new file mode 100644 index 00000000000..1255d2d4f61 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceRepositoryInfoRequestAttributes.java @@ -0,0 +1,175 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes for the service repository info request. */ +@JsonPropertyOrder({ + ServiceRepositoryInfoRequestAttributes.JSON_PROPERTY_SERVICE, + ServiceRepositoryInfoRequestAttributes.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ServiceRepositoryInfoRequestAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_SERVICE = "service"; + private String service; + + public static final String JSON_PROPERTY_VERSION = "version"; + private String version; + + public ServiceRepositoryInfoRequestAttributes() {} + + @JsonCreator + public ServiceRepositoryInfoRequestAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_SERVICE) String service, + @JsonProperty(required = true, value = JSON_PROPERTY_VERSION) String version) { + this.service = service; + this.version = version; + } + + public ServiceRepositoryInfoRequestAttributes service(String service) { + this.service = service; + return this; + } + + /** + * The name of the service. + * + * @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 ServiceRepositoryInfoRequestAttributes version(String version) { + this.version = version; + return this; + } + + /** + * The version of the service. + * + * @return version + */ + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ServiceRepositoryInfoRequestAttributes + */ + @JsonAnySetter + public ServiceRepositoryInfoRequestAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ServiceRepositoryInfoRequestAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ServiceRepositoryInfoRequestAttributes serviceRepositoryInfoRequestAttributes = + (ServiceRepositoryInfoRequestAttributes) o; + return Objects.equals(this.service, serviceRepositoryInfoRequestAttributes.service) + && Objects.equals(this.version, serviceRepositoryInfoRequestAttributes.version) + && Objects.equals( + this.additionalProperties, serviceRepositoryInfoRequestAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(service, version, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ServiceRepositoryInfoRequestAttributes {\n"); + sb.append(" service: ").append(toIndentedString(service)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceRepositoryInfoRequestData.java b/src/main/java/com/datadog/api/client/v2/model/ServiceRepositoryInfoRequestData.java new file mode 100644 index 00000000000..2381b398d22 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceRepositoryInfoRequestData.java @@ -0,0 +1,185 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object for the service repository info request. */ +@JsonPropertyOrder({ + ServiceRepositoryInfoRequestData.JSON_PROPERTY_ATTRIBUTES, + ServiceRepositoryInfoRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ServiceRepositoryInfoRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ServiceRepositoryInfoRequestAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ServiceRepositoryInfoDataType type; + + public ServiceRepositoryInfoRequestData() {} + + @JsonCreator + public ServiceRepositoryInfoRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + ServiceRepositoryInfoRequestAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + ServiceRepositoryInfoDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ServiceRepositoryInfoRequestData attributes( + ServiceRepositoryInfoRequestAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for the service repository info request. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ServiceRepositoryInfoRequestAttributes getAttributes() { + return attributes; + } + + public void setAttributes(ServiceRepositoryInfoRequestAttributes attributes) { + this.attributes = attributes; + } + + public ServiceRepositoryInfoRequestData type(ServiceRepositoryInfoDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type for service repository info objects. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ServiceRepositoryInfoDataType getType() { + return type; + } + + public void setType(ServiceRepositoryInfoDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ServiceRepositoryInfoRequestData + */ + @JsonAnySetter + public ServiceRepositoryInfoRequestData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ServiceRepositoryInfoRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ServiceRepositoryInfoRequestData serviceRepositoryInfoRequestData = + (ServiceRepositoryInfoRequestData) o; + return Objects.equals(this.attributes, serviceRepositoryInfoRequestData.attributes) + && Objects.equals(this.type, serviceRepositoryInfoRequestData.type) + && Objects.equals( + this.additionalProperties, serviceRepositoryInfoRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ServiceRepositoryInfoRequestData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceRepositoryInfoResponse.java b/src/main/java/com/datadog/api/client/v2/model/ServiceRepositoryInfoResponse.java new file mode 100644 index 00000000000..7514c7bb174 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceRepositoryInfoResponse.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing service repository information. */ +@JsonPropertyOrder({ServiceRepositoryInfoResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ServiceRepositoryInfoResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private ServiceRepositoryInfoResponseData data; + + public ServiceRepositoryInfoResponse() {} + + @JsonCreator + public ServiceRepositoryInfoResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + ServiceRepositoryInfoResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public ServiceRepositoryInfoResponse data(ServiceRepositoryInfoResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for the service repository info response. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ServiceRepositoryInfoResponseData getData() { + return data; + } + + public void setData(ServiceRepositoryInfoResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ServiceRepositoryInfoResponse + */ + @JsonAnySetter + public ServiceRepositoryInfoResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ServiceRepositoryInfoResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ServiceRepositoryInfoResponse serviceRepositoryInfoResponse = (ServiceRepositoryInfoResponse) o; + return Objects.equals(this.data, serviceRepositoryInfoResponse.data) + && Objects.equals( + this.additionalProperties, serviceRepositoryInfoResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ServiceRepositoryInfoResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceRepositoryInfoResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ServiceRepositoryInfoResponseAttributes.java new file mode 100644 index 00000000000..0e311cfb5eb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceRepositoryInfoResponseAttributes.java @@ -0,0 +1,208 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of the service repository information. */ +@JsonPropertyOrder({ + ServiceRepositoryInfoResponseAttributes.JSON_PROPERTY_COMMIT_SHA, + ServiceRepositoryInfoResponseAttributes.JSON_PROPERTY_REPOSITORY_URL, + ServiceRepositoryInfoResponseAttributes.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ServiceRepositoryInfoResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMMIT_SHA = "commit_sha"; + private String commitSha; + + public static final String JSON_PROPERTY_REPOSITORY_URL = "repository_url"; + private String repositoryUrl; + + public static final String JSON_PROPERTY_STATUS = "status"; + private ServiceRepositoryInfoStatus status; + + public ServiceRepositoryInfoResponseAttributes() {} + + @JsonCreator + public ServiceRepositoryInfoResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) + ServiceRepositoryInfoStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + } + + public ServiceRepositoryInfoResponseAttributes commitSha(String commitSha) { + this.commitSha = commitSha; + return this; + } + + /** + * The SHA of the commit associated with the service version. + * + * @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; + } + + public ServiceRepositoryInfoResponseAttributes repositoryUrl(String repositoryUrl) { + this.repositoryUrl = repositoryUrl; + return this; + } + + /** + * The URL of the source code repository. + * + * @return repositoryUrl + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REPOSITORY_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRepositoryUrl() { + return repositoryUrl; + } + + public void setRepositoryUrl(String repositoryUrl) { + this.repositoryUrl = repositoryUrl; + } + + public ServiceRepositoryInfoResponseAttributes status(ServiceRepositoryInfoStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * The status of the service repository info lookup. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ServiceRepositoryInfoStatus getStatus() { + return status; + } + + public void setStatus(ServiceRepositoryInfoStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ServiceRepositoryInfoResponseAttributes + */ + @JsonAnySetter + public ServiceRepositoryInfoResponseAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ServiceRepositoryInfoResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ServiceRepositoryInfoResponseAttributes serviceRepositoryInfoResponseAttributes = + (ServiceRepositoryInfoResponseAttributes) o; + return Objects.equals(this.commitSha, serviceRepositoryInfoResponseAttributes.commitSha) + && Objects.equals(this.repositoryUrl, serviceRepositoryInfoResponseAttributes.repositoryUrl) + && Objects.equals(this.status, serviceRepositoryInfoResponseAttributes.status) + && Objects.equals( + this.additionalProperties, + serviceRepositoryInfoResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(commitSha, repositoryUrl, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ServiceRepositoryInfoResponseAttributes {\n"); + sb.append(" commitSha: ").append(toIndentedString(commitSha)).append("\n"); + sb.append(" repositoryUrl: ").append(toIndentedString(repositoryUrl)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceRepositoryInfoResponseData.java b/src/main/java/com/datadog/api/client/v2/model/ServiceRepositoryInfoResponseData.java new file mode 100644 index 00000000000..8a0fc9304c1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceRepositoryInfoResponseData.java @@ -0,0 +1,213 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object for the service repository info response. */ +@JsonPropertyOrder({ + ServiceRepositoryInfoResponseData.JSON_PROPERTY_ATTRIBUTES, + ServiceRepositoryInfoResponseData.JSON_PROPERTY_ID, + ServiceRepositoryInfoResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ServiceRepositoryInfoResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ServiceRepositoryInfoResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ServiceRepositoryInfoDataType type; + + public ServiceRepositoryInfoResponseData() {} + + @JsonCreator + public ServiceRepositoryInfoResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + ServiceRepositoryInfoResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + ServiceRepositoryInfoDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ServiceRepositoryInfoResponseData attributes( + ServiceRepositoryInfoResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of the service repository information. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ServiceRepositoryInfoResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(ServiceRepositoryInfoResponseAttributes attributes) { + this.attributes = attributes; + } + + public ServiceRepositoryInfoResponseData id(String id) { + this.id = id; + return this; + } + + /** + * The identifier composed of the service name and version. + * + * @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 ServiceRepositoryInfoResponseData type(ServiceRepositoryInfoDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type for service repository info objects. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ServiceRepositoryInfoDataType getType() { + return type; + } + + public void setType(ServiceRepositoryInfoDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ServiceRepositoryInfoResponseData + */ + @JsonAnySetter + public ServiceRepositoryInfoResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ServiceRepositoryInfoResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ServiceRepositoryInfoResponseData serviceRepositoryInfoResponseData = + (ServiceRepositoryInfoResponseData) o; + return Objects.equals(this.attributes, serviceRepositoryInfoResponseData.attributes) + && Objects.equals(this.id, serviceRepositoryInfoResponseData.id) + && Objects.equals(this.type, serviceRepositoryInfoResponseData.type) + && Objects.equals( + this.additionalProperties, serviceRepositoryInfoResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ServiceRepositoryInfoResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ServiceRepositoryInfoStatus.java b/src/main/java/com/datadog/api/client/v2/model/ServiceRepositoryInfoStatus.java new file mode 100644 index 00000000000..50ce8353ebd --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ServiceRepositoryInfoStatus.java @@ -0,0 +1,66 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The status of the service repository info lookup. */ +@JsonSerialize(using = ServiceRepositoryInfoStatus.ServiceRepositoryInfoStatusSerializer.class) +public class ServiceRepositoryInfoStatus extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList("success", "not_found", "no_repository", "internal_error", "unknown")); + + public static final ServiceRepositoryInfoStatus SUCCESS = + new ServiceRepositoryInfoStatus("success"); + public static final ServiceRepositoryInfoStatus NOT_FOUND = + new ServiceRepositoryInfoStatus("not_found"); + public static final ServiceRepositoryInfoStatus NO_REPOSITORY = + new ServiceRepositoryInfoStatus("no_repository"); + public static final ServiceRepositoryInfoStatus INTERNAL_ERROR = + new ServiceRepositoryInfoStatus("internal_error"); + public static final ServiceRepositoryInfoStatus UNKNOWN = + new ServiceRepositoryInfoStatus("unknown"); + + ServiceRepositoryInfoStatus(String value) { + super(value, allowedValues); + } + + public static class ServiceRepositoryInfoStatusSerializer + extends StdSerializer { + public ServiceRepositoryInfoStatusSerializer(Class t) { + super(t); + } + + public ServiceRepositoryInfoStatusSerializer() { + this(null); + } + + @Override + public void serialize( + ServiceRepositoryInfoStatus value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ServiceRepositoryInfoStatus fromValue(String value) { + return new ServiceRepositoryInfoStatus(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SharedDashboardIncluded.java b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardIncluded.java new file mode 100644 index 00000000000..ad99807120a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardIncluded.java @@ -0,0 +1,286 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.JSON; +import com.datadog.api.client.UnparsedObject; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import jakarta.ws.rs.core.GenericType; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = SharedDashboardIncluded.SharedDashboardIncludedDeserializer.class) +@JsonSerialize(using = SharedDashboardIncluded.SharedDashboardIncludedSerializer.class) +public class SharedDashboardIncluded extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(SharedDashboardIncluded.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class SharedDashboardIncludedSerializer + extends StdSerializer { + public SharedDashboardIncludedSerializer(Class t) { + super(t); + } + + public SharedDashboardIncludedSerializer() { + this(null); + } + + @Override + public void serialize( + SharedDashboardIncluded value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class SharedDashboardIncludedDeserializer + extends StdDeserializer { + public SharedDashboardIncludedDeserializer() { + this(SharedDashboardIncluded.class); + } + + public SharedDashboardIncludedDeserializer(Class vc) { + super(vc); + } + + @Override + public SharedDashboardIncluded 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 SharedDashboardIncludedDashboard + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SharedDashboardIncludedDashboard.class.equals(Integer.class) + || SharedDashboardIncludedDashboard.class.equals(Long.class) + || SharedDashboardIncludedDashboard.class.equals(Float.class) + || SharedDashboardIncludedDashboard.class.equals(Double.class) + || SharedDashboardIncludedDashboard.class.equals(Boolean.class) + || SharedDashboardIncludedDashboard.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((SharedDashboardIncludedDashboard.class.equals(Integer.class) + || SharedDashboardIncludedDashboard.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((SharedDashboardIncludedDashboard.class.equals(Float.class) + || SharedDashboardIncludedDashboard.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (SharedDashboardIncludedDashboard.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (SharedDashboardIncludedDashboard.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SharedDashboardIncludedDashboard.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((SharedDashboardIncludedDashboard) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SharedDashboardIncludedDashboard'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, "Input data does not match schema 'SharedDashboardIncludedDashboard'", e); + } + + // deserialize SharedDashboardIncludedUser + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SharedDashboardIncludedUser.class.equals(Integer.class) + || SharedDashboardIncludedUser.class.equals(Long.class) + || SharedDashboardIncludedUser.class.equals(Float.class) + || SharedDashboardIncludedUser.class.equals(Double.class) + || SharedDashboardIncludedUser.class.equals(Boolean.class) + || SharedDashboardIncludedUser.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((SharedDashboardIncludedUser.class.equals(Integer.class) + || SharedDashboardIncludedUser.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((SharedDashboardIncludedUser.class.equals(Float.class) + || SharedDashboardIncludedUser.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (SharedDashboardIncludedUser.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (SharedDashboardIncludedUser.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SharedDashboardIncludedUser.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((SharedDashboardIncludedUser) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SharedDashboardIncludedUser'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SharedDashboardIncludedUser'", e); + } + + SharedDashboardIncluded ret = new SharedDashboardIncluded(); + 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 SharedDashboardIncluded getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "SharedDashboardIncluded cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public SharedDashboardIncluded() { + super("oneOf", Boolean.FALSE); + } + + public SharedDashboardIncluded(SharedDashboardIncludedDashboard o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public SharedDashboardIncluded(SharedDashboardIncludedUser o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put( + "SharedDashboardIncludedDashboard", new GenericType() {}); + schemas.put("SharedDashboardIncludedUser", new GenericType() {}); + JSON.registerDescendants(SharedDashboardIncluded.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return SharedDashboardIncluded.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: SharedDashboardIncludedDashboard, SharedDashboardIncludedUser + * + *

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( + SharedDashboardIncludedDashboard.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(SharedDashboardIncludedUser.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 SharedDashboardIncludedDashboard," + + " SharedDashboardIncludedUser"); + } + + /** + * Get the actual instance, which can be the following: SharedDashboardIncludedDashboard, + * SharedDashboardIncludedUser + * + * @return The actual instance (SharedDashboardIncludedDashboard, SharedDashboardIncludedUser) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `SharedDashboardIncludedDashboard`. If the actual instance is not + * `SharedDashboardIncludedDashboard`, the ClassCastException will be thrown. + * + * @return The actual instance of `SharedDashboardIncludedDashboard` + * @throws ClassCastException if the instance is not `SharedDashboardIncludedDashboard` + */ + public SharedDashboardIncludedDashboard getSharedDashboardIncludedDashboard() + throws ClassCastException { + return (SharedDashboardIncludedDashboard) super.getActualInstance(); + } + + /** + * Get the actual instance of `SharedDashboardIncludedUser`. If the actual instance is not + * `SharedDashboardIncludedUser`, the ClassCastException will be thrown. + * + * @return The actual instance of `SharedDashboardIncludedUser` + * @throws ClassCastException if the instance is not `SharedDashboardIncludedUser` + */ + public SharedDashboardIncludedUser getSharedDashboardIncludedUser() throws ClassCastException { + return (SharedDashboardIncludedUser) super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SharedDashboardIncludedDashboard.java b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardIncludedDashboard.java new file mode 100644 index 00000000000..81177686223 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardIncludedDashboard.java @@ -0,0 +1,214 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Included dashboard resource. */ +@JsonPropertyOrder({ + SharedDashboardIncludedDashboard.JSON_PROPERTY_ATTRIBUTES, + SharedDashboardIncludedDashboard.JSON_PROPERTY_ID, + SharedDashboardIncludedDashboard.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SharedDashboardIncludedDashboard { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private SharedDashboardIncludedDashboardAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SharedDashboardIncludedDashboardType type = + SharedDashboardIncludedDashboardType.DASHBOARD; + + public SharedDashboardIncludedDashboard() {} + + @JsonCreator + public SharedDashboardIncludedDashboard( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + SharedDashboardIncludedDashboardAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + SharedDashboardIncludedDashboardType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public SharedDashboardIncludedDashboard attributes( + SharedDashboardIncludedDashboardAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of the included dashboard. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SharedDashboardIncludedDashboardAttributes getAttributes() { + return attributes; + } + + public void setAttributes(SharedDashboardIncludedDashboardAttributes attributes) { + this.attributes = attributes; + } + + public SharedDashboardIncludedDashboard id(String id) { + this.id = id; + return this; + } + + /** + * ID of the dashboard. + * + * @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 SharedDashboardIncludedDashboard type(SharedDashboardIncludedDashboardType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Included dashboard resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SharedDashboardIncludedDashboardType getType() { + return type; + } + + public void setType(SharedDashboardIncludedDashboardType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SharedDashboardIncludedDashboard + */ + @JsonAnySetter + public SharedDashboardIncludedDashboard putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SharedDashboardIncludedDashboard object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SharedDashboardIncludedDashboard sharedDashboardIncludedDashboard = + (SharedDashboardIncludedDashboard) o; + return Objects.equals(this.attributes, sharedDashboardIncludedDashboard.attributes) + && Objects.equals(this.id, sharedDashboardIncludedDashboard.id) + && Objects.equals(this.type, sharedDashboardIncludedDashboard.type) + && Objects.equals( + this.additionalProperties, sharedDashboardIncludedDashboard.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SharedDashboardIncludedDashboard {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SharedDashboardIncludedDashboardAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardIncludedDashboardAttributes.java new file mode 100644 index 00000000000..d288cfc366b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardIncludedDashboardAttributes.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of the included dashboard. */ +@JsonPropertyOrder({SharedDashboardIncludedDashboardAttributes.JSON_PROPERTY_TITLE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SharedDashboardIncludedDashboardAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public SharedDashboardIncludedDashboardAttributes() {} + + @JsonCreator + public SharedDashboardIncludedDashboardAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_TITLE) String title) { + this.title = title; + } + + public SharedDashboardIncludedDashboardAttributes title(String title) { + this.title = title; + return this; + } + + /** + * Dashboard title. + * + * @return title + */ + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SharedDashboardIncludedDashboardAttributes + */ + @JsonAnySetter + public SharedDashboardIncludedDashboardAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SharedDashboardIncludedDashboardAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SharedDashboardIncludedDashboardAttributes sharedDashboardIncludedDashboardAttributes = + (SharedDashboardIncludedDashboardAttributes) o; + return Objects.equals(this.title, sharedDashboardIncludedDashboardAttributes.title) + && Objects.equals( + this.additionalProperties, + sharedDashboardIncludedDashboardAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(title, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SharedDashboardIncludedDashboardAttributes {\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SharedDashboardIncludedDashboardType.java b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardIncludedDashboardType.java new file mode 100644 index 00000000000..cac118f62b3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardIncludedDashboardType.java @@ -0,0 +1,59 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Included dashboard resource type. */ +@JsonSerialize( + using = + SharedDashboardIncludedDashboardType.SharedDashboardIncludedDashboardTypeSerializer.class) +public class SharedDashboardIncludedDashboardType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("dashboard")); + + public static final SharedDashboardIncludedDashboardType DASHBOARD = + new SharedDashboardIncludedDashboardType("dashboard"); + + SharedDashboardIncludedDashboardType(String value) { + super(value, allowedValues); + } + + public static class SharedDashboardIncludedDashboardTypeSerializer + extends StdSerializer { + public SharedDashboardIncludedDashboardTypeSerializer( + Class t) { + super(t); + } + + public SharedDashboardIncludedDashboardTypeSerializer() { + this(null); + } + + @Override + public void serialize( + SharedDashboardIncludedDashboardType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SharedDashboardIncludedDashboardType fromValue(String value) { + return new SharedDashboardIncludedDashboardType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetInstrumentedPodsResponseData.java b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardIncludedUser.java similarity index 70% rename from src/main/java/com/datadog/api/client/v2/model/FleetInstrumentedPodsResponseData.java rename to src/main/java/com/datadog/api/client/v2/model/SharedDashboardIncludedUser.java index 76d6d9300b6..d7ee65d82fb 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FleetInstrumentedPodsResponseData.java +++ b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardIncludedUser.java @@ -17,68 +17,68 @@ import java.util.Map; import java.util.Objects; -/** The response data containing the cluster name and instrumented pod groups. */ +/** Included user resource. */ @JsonPropertyOrder({ - FleetInstrumentedPodsResponseData.JSON_PROPERTY_ATTRIBUTES, - FleetInstrumentedPodsResponseData.JSON_PROPERTY_ID, - FleetInstrumentedPodsResponseData.JSON_PROPERTY_TYPE + SharedDashboardIncludedUser.JSON_PROPERTY_ATTRIBUTES, + SharedDashboardIncludedUser.JSON_PROPERTY_ID, + SharedDashboardIncludedUser.JSON_PROPERTY_TYPE }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class FleetInstrumentedPodsResponseData { +public class SharedDashboardIncludedUser { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; - private FleetInstrumentedPodsResponseDataAttributes attributes; + private SharedDashboardIncludedUserAttributes attributes; public static final String JSON_PROPERTY_ID = "id"; private String id; public static final String JSON_PROPERTY_TYPE = "type"; - private String type; + private UserResourceType type = UserResourceType.USER; - public FleetInstrumentedPodsResponseData() {} + public SharedDashboardIncludedUser() {} @JsonCreator - public FleetInstrumentedPodsResponseData( + public SharedDashboardIncludedUser( @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) - FleetInstrumentedPodsResponseDataAttributes attributes, + SharedDashboardIncludedUserAttributes attributes, @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) String type) { + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) UserResourceType type) { this.attributes = attributes; this.unparsed |= attributes.unparsed; this.id = id; this.type = type; + this.unparsed |= !type.isValid(); } - public FleetInstrumentedPodsResponseData attributes( - FleetInstrumentedPodsResponseDataAttributes attributes) { + public SharedDashboardIncludedUser attributes(SharedDashboardIncludedUserAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * Attributes of the instrumented pods response containing the list of pod groups. + * Attributes of the included user. * * @return attributes */ @JsonProperty(JSON_PROPERTY_ATTRIBUTES) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public FleetInstrumentedPodsResponseDataAttributes getAttributes() { + public SharedDashboardIncludedUserAttributes getAttributes() { return attributes; } - public void setAttributes(FleetInstrumentedPodsResponseDataAttributes attributes) { + public void setAttributes(SharedDashboardIncludedUserAttributes attributes) { this.attributes = attributes; } - public FleetInstrumentedPodsResponseData id(String id) { + public SharedDashboardIncludedUser id(String id) { this.id = id; return this; } /** - * The cluster name identifier. + * ID of the user. * * @return id */ @@ -92,23 +92,27 @@ public void setId(String id) { this.id = id; } - public FleetInstrumentedPodsResponseData type(String type) { + public SharedDashboardIncludedUser type(UserResourceType type) { this.type = type; + this.unparsed |= !type.isValid(); return this; } /** - * Resource type. + * User resource type. * * @return type */ @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public String getType() { + public UserResourceType getType() { return type; } - public void setType(String type) { + public void setType(UserResourceType type) { + if (!type.isValid()) { + this.unparsed = true; + } this.type = type; } @@ -124,10 +128,10 @@ public void setType(String type) { * * @param key The arbitrary key to set * @param value The associated value - * @return FleetInstrumentedPodsResponseData + * @return SharedDashboardIncludedUser */ @JsonAnySetter - public FleetInstrumentedPodsResponseData putAdditionalProperty(String key, Object value) { + public SharedDashboardIncludedUser putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -158,7 +162,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this FleetInstrumentedPodsResponseData object is equal to o. */ + /** Return true if this SharedDashboardIncludedUser object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -167,13 +171,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - FleetInstrumentedPodsResponseData fleetInstrumentedPodsResponseData = - (FleetInstrumentedPodsResponseData) o; - return Objects.equals(this.attributes, fleetInstrumentedPodsResponseData.attributes) - && Objects.equals(this.id, fleetInstrumentedPodsResponseData.id) - && Objects.equals(this.type, fleetInstrumentedPodsResponseData.type) + SharedDashboardIncludedUser sharedDashboardIncludedUser = (SharedDashboardIncludedUser) o; + return Objects.equals(this.attributes, sharedDashboardIncludedUser.attributes) + && Objects.equals(this.id, sharedDashboardIncludedUser.id) + && Objects.equals(this.type, sharedDashboardIncludedUser.type) && Objects.equals( - this.additionalProperties, fleetInstrumentedPodsResponseData.additionalProperties); + this.additionalProperties, sharedDashboardIncludedUser.additionalProperties); } @Override @@ -184,7 +187,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class FleetInstrumentedPodsResponseData {\n"); + sb.append("class SharedDashboardIncludedUser {\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"); diff --git a/src/main/java/com/datadog/api/client/v2/model/SharedDashboardIncludedUserAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardIncludedUserAttributes.java new file mode 100644 index 00000000000..3f94b4c174d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardIncludedUserAttributes.java @@ -0,0 +1,175 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of the included user. */ +@JsonPropertyOrder({ + SharedDashboardIncludedUserAttributes.JSON_PROPERTY_HANDLE, + SharedDashboardIncludedUserAttributes.JSON_PROPERTY_NAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SharedDashboardIncludedUserAttributes { + @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; + + public SharedDashboardIncludedUserAttributes() {} + + @JsonCreator + public SharedDashboardIncludedUserAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_HANDLE) String handle, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { + this.handle = handle; + this.name = name; + } + + public SharedDashboardIncludedUserAttributes handle(String handle) { + this.handle = handle; + return this; + } + + /** + * User handle. + * + * @return handle + */ + @JsonProperty(JSON_PROPERTY_HANDLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getHandle() { + return handle; + } + + public void setHandle(String handle) { + this.handle = handle; + } + + public SharedDashboardIncludedUserAttributes name(String name) { + this.name = name; + return this; + } + + /** + * User display name. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SharedDashboardIncludedUserAttributes + */ + @JsonAnySetter + public SharedDashboardIncludedUserAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SharedDashboardIncludedUserAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SharedDashboardIncludedUserAttributes sharedDashboardIncludedUserAttributes = + (SharedDashboardIncludedUserAttributes) o; + return Objects.equals(this.handle, sharedDashboardIncludedUserAttributes.handle) + && Objects.equals(this.name, sharedDashboardIncludedUserAttributes.name) + && Objects.equals( + this.additionalProperties, sharedDashboardIncludedUserAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(handle, name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SharedDashboardIncludedUserAttributes {\n"); + sb.append(" handle: ").append(toIndentedString(handle)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SharedDashboardInvitee.java b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardInvitee.java new file mode 100644 index 00000000000..bcd741bc452 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardInvitee.java @@ -0,0 +1,206 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Invitee that can access an invite-only shared dashboard. */ +@JsonPropertyOrder({ + SharedDashboardInvitee.JSON_PROPERTY_ACCESS_EXPIRATION, + SharedDashboardInvitee.JSON_PROPERTY_CREATED_AT, + SharedDashboardInvitee.JSON_PROPERTY_EMAIL +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SharedDashboardInvitee { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCESS_EXPIRATION = "access_expiration"; + private OffsetDateTime accessExpiration; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private String email; + + public SharedDashboardInvitee() {} + + @JsonCreator + public SharedDashboardInvitee( + @JsonProperty(required = true, value = JSON_PROPERTY_ACCESS_EXPIRATION) + OffsetDateTime accessExpiration, + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_EMAIL) String email) { + this.accessExpiration = accessExpiration; + if (accessExpiration != null) {} + this.createdAt = createdAt; + this.email = email; + } + + public SharedDashboardInvitee accessExpiration(OffsetDateTime accessExpiration) { + this.accessExpiration = accessExpiration; + if (accessExpiration != null) {} + return this; + } + + /** + * Time when the invitee's access expires. + * + * @return accessExpiration + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCESS_EXPIRATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getAccessExpiration() { + return accessExpiration; + } + + public void setAccessExpiration(OffsetDateTime accessExpiration) { + this.accessExpiration = accessExpiration; + } + + public SharedDashboardInvitee createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Time when the invitee was added. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public SharedDashboardInvitee email(String email) { + this.email = email; + return this; + } + + /** + * Email address of the invitee. + * + * @return email + */ + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SharedDashboardInvitee + */ + @JsonAnySetter + public SharedDashboardInvitee putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SharedDashboardInvitee object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SharedDashboardInvitee sharedDashboardInvitee = (SharedDashboardInvitee) o; + return Objects.equals(this.accessExpiration, sharedDashboardInvitee.accessExpiration) + && Objects.equals(this.createdAt, sharedDashboardInvitee.createdAt) + && Objects.equals(this.email, sharedDashboardInvitee.email) + && Objects.equals(this.additionalProperties, sharedDashboardInvitee.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(accessExpiration, createdAt, email, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SharedDashboardInvitee {\n"); + sb.append(" accessExpiration: ").append(toIndentedString(accessExpiration)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SharedDashboardRelationshipDashboard.java b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardRelationshipDashboard.java new file mode 100644 index 00000000000..23257211d47 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardRelationshipDashboard.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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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; + +/** Dashboard associated with the shared dashboard. */ +@JsonPropertyOrder({SharedDashboardRelationshipDashboard.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SharedDashboardRelationshipDashboard { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private SharedDashboardRelationshipDashboardData data; + + public SharedDashboardRelationshipDashboard() {} + + @JsonCreator + public SharedDashboardRelationshipDashboard( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + SharedDashboardRelationshipDashboardData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public SharedDashboardRelationshipDashboard data(SharedDashboardRelationshipDashboardData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Dashboard relationship data. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SharedDashboardRelationshipDashboardData getData() { + return data; + } + + public void setData(SharedDashboardRelationshipDashboardData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SharedDashboardRelationshipDashboard + */ + @JsonAnySetter + public SharedDashboardRelationshipDashboard putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SharedDashboardRelationshipDashboard object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SharedDashboardRelationshipDashboard sharedDashboardRelationshipDashboard = + (SharedDashboardRelationshipDashboard) o; + return Objects.equals(this.data, sharedDashboardRelationshipDashboard.data) + && Objects.equals( + this.additionalProperties, sharedDashboardRelationshipDashboard.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SharedDashboardRelationshipDashboard {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SharedDashboardRelationshipDashboardData.java b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardRelationshipDashboardData.java new file mode 100644 index 00000000000..aa7b29362b8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardRelationshipDashboardData.java @@ -0,0 +1,183 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Dashboard relationship data. */ +@JsonPropertyOrder({ + SharedDashboardRelationshipDashboardData.JSON_PROPERTY_ID, + SharedDashboardRelationshipDashboardData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SharedDashboardRelationshipDashboardData { + @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 SharedDashboardIncludedDashboardType type = + SharedDashboardIncludedDashboardType.DASHBOARD; + + public SharedDashboardRelationshipDashboardData() {} + + @JsonCreator + public SharedDashboardRelationshipDashboardData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + SharedDashboardIncludedDashboardType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public SharedDashboardRelationshipDashboardData id(String id) { + this.id = id; + return this; + } + + /** + * ID of the dashboard. + * + * @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 SharedDashboardRelationshipDashboardData type(SharedDashboardIncludedDashboardType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Included dashboard resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SharedDashboardIncludedDashboardType getType() { + return type; + } + + public void setType(SharedDashboardIncludedDashboardType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SharedDashboardRelationshipDashboardData + */ + @JsonAnySetter + public SharedDashboardRelationshipDashboardData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SharedDashboardRelationshipDashboardData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SharedDashboardRelationshipDashboardData sharedDashboardRelationshipDashboardData = + (SharedDashboardRelationshipDashboardData) o; + return Objects.equals(this.id, sharedDashboardRelationshipDashboardData.id) + && Objects.equals(this.type, sharedDashboardRelationshipDashboardData.type) + && Objects.equals( + this.additionalProperties, + sharedDashboardRelationshipDashboardData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SharedDashboardRelationshipDashboardData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SharedDashboardRelationshipSharer.java b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardRelationshipSharer.java new file mode 100644 index 00000000000..d125e5d6ebb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardRelationshipSharer.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** User who shared the dashboard. */ +@JsonPropertyOrder({SharedDashboardRelationshipSharer.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SharedDashboardRelationshipSharer { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private UserRelationshipData data; + + public SharedDashboardRelationshipSharer() {} + + @JsonCreator + public SharedDashboardRelationshipSharer( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) UserRelationshipData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public SharedDashboardRelationshipSharer data(UserRelationshipData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Relationship to user object. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UserRelationshipData getData() { + return data; + } + + public void setData(UserRelationshipData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SharedDashboardRelationshipSharer + */ + @JsonAnySetter + public SharedDashboardRelationshipSharer putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SharedDashboardRelationshipSharer object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SharedDashboardRelationshipSharer sharedDashboardRelationshipSharer = + (SharedDashboardRelationshipSharer) o; + return Objects.equals(this.data, sharedDashboardRelationshipSharer.data) + && Objects.equals( + this.additionalProperties, sharedDashboardRelationshipSharer.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SharedDashboardRelationshipSharer {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SharedDashboardRelationships.java b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardRelationships.java new file mode 100644 index 00000000000..033b2a853b7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardRelationships.java @@ -0,0 +1,180 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Relationships of a shared dashboard. */ +@JsonPropertyOrder({ + SharedDashboardRelationships.JSON_PROPERTY_DASHBOARD, + SharedDashboardRelationships.JSON_PROPERTY_SHARER +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SharedDashboardRelationships { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DASHBOARD = "dashboard"; + private SharedDashboardRelationshipDashboard dashboard; + + public static final String JSON_PROPERTY_SHARER = "sharer"; + private SharedDashboardRelationshipSharer sharer; + + public SharedDashboardRelationships() {} + + @JsonCreator + public SharedDashboardRelationships( + @JsonProperty(required = true, value = JSON_PROPERTY_DASHBOARD) + SharedDashboardRelationshipDashboard dashboard, + @JsonProperty(required = true, value = JSON_PROPERTY_SHARER) + SharedDashboardRelationshipSharer sharer) { + this.dashboard = dashboard; + this.unparsed |= dashboard.unparsed; + this.sharer = sharer; + this.unparsed |= sharer.unparsed; + } + + public SharedDashboardRelationships dashboard(SharedDashboardRelationshipDashboard dashboard) { + this.dashboard = dashboard; + this.unparsed |= dashboard.unparsed; + return this; + } + + /** + * Dashboard associated with the shared dashboard. + * + * @return dashboard + */ + @JsonProperty(JSON_PROPERTY_DASHBOARD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SharedDashboardRelationshipDashboard getDashboard() { + return dashboard; + } + + public void setDashboard(SharedDashboardRelationshipDashboard dashboard) { + this.dashboard = dashboard; + } + + public SharedDashboardRelationships sharer(SharedDashboardRelationshipSharer sharer) { + this.sharer = sharer; + this.unparsed |= sharer.unparsed; + return this; + } + + /** + * User who shared the dashboard. + * + * @return sharer + */ + @JsonProperty(JSON_PROPERTY_SHARER) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SharedDashboardRelationshipSharer getSharer() { + return sharer; + } + + public void setSharer(SharedDashboardRelationshipSharer sharer) { + this.sharer = sharer; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SharedDashboardRelationships + */ + @JsonAnySetter + public SharedDashboardRelationships putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SharedDashboardRelationships object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SharedDashboardRelationships sharedDashboardRelationships = (SharedDashboardRelationships) o; + return Objects.equals(this.dashboard, sharedDashboardRelationships.dashboard) + && Objects.equals(this.sharer, sharedDashboardRelationships.sharer) + && Objects.equals( + this.additionalProperties, sharedDashboardRelationships.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(dashboard, sharer, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SharedDashboardRelationships {\n"); + sb.append(" dashboard: ").append(toIndentedString(dashboard)).append("\n"); + sb.append(" sharer: ").append(toIndentedString(sharer)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SharedDashboardResponse.java b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardResponse.java new file mode 100644 index 00000000000..b1678bd0a13 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardResponse.java @@ -0,0 +1,240 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A shared dashboard response resource. */ +@JsonPropertyOrder({ + SharedDashboardResponse.JSON_PROPERTY_ATTRIBUTES, + SharedDashboardResponse.JSON_PROPERTY_ID, + SharedDashboardResponse.JSON_PROPERTY_RELATIONSHIPS, + SharedDashboardResponse.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SharedDashboardResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private SharedDashboardResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private SharedDashboardRelationships relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SharedDashboardType type = SharedDashboardType.SHARED_DASHBOARD; + + public SharedDashboardResponse() {} + + @JsonCreator + public SharedDashboardResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + SharedDashboardResponseAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_RELATIONSHIPS) + SharedDashboardRelationships relationships, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SharedDashboardType 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 SharedDashboardResponse attributes(SharedDashboardResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a shared dashboard response. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SharedDashboardResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(SharedDashboardResponseAttributes attributes) { + this.attributes = attributes; + } + + public SharedDashboardResponse id(String id) { + this.id = id; + return this; + } + + /** + * ID of the shared dashboard. + * + * @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 SharedDashboardResponse relationships(SharedDashboardRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Relationships of a shared dashboard. + * + * @return relationships + */ + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SharedDashboardRelationships getRelationships() { + return relationships; + } + + public void setRelationships(SharedDashboardRelationships relationships) { + this.relationships = relationships; + } + + public SharedDashboardResponse type(SharedDashboardType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Shared dashboard resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SharedDashboardType getType() { + return type; + } + + public void setType(SharedDashboardType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SharedDashboardResponse + */ + @JsonAnySetter + public SharedDashboardResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SharedDashboardResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SharedDashboardResponse sharedDashboardResponse = (SharedDashboardResponse) o; + return Objects.equals(this.attributes, sharedDashboardResponse.attributes) + && Objects.equals(this.id, sharedDashboardResponse.id) + && Objects.equals(this.relationships, sharedDashboardResponse.relationships) + && Objects.equals(this.type, sharedDashboardResponse.type) + && Objects.equals(this.additionalProperties, sharedDashboardResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SharedDashboardResponse {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SharedDashboardResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardResponseAttributes.java new file mode 100644 index 00000000000..7e33114d03e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardResponseAttributes.java @@ -0,0 +1,628 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a shared dashboard response. */ +@JsonPropertyOrder({ + SharedDashboardResponseAttributes.JSON_PROPERTY_CREATED_AT, + SharedDashboardResponseAttributes.JSON_PROPERTY_EMBEDDABLE_DOMAINS, + SharedDashboardResponseAttributes.JSON_PROPERTY_EXPIRATION, + SharedDashboardResponseAttributes.JSON_PROPERTY_GLOBAL_TIME, + SharedDashboardResponseAttributes.JSON_PROPERTY_GLOBAL_TIME_SELECTABLE, + SharedDashboardResponseAttributes.JSON_PROPERTY_INVITEES, + SharedDashboardResponseAttributes.JSON_PROPERTY_LAST_ACCESSED, + SharedDashboardResponseAttributes.JSON_PROPERTY_SELECTABLE_TEMPLATE_VARS, + SharedDashboardResponseAttributes.JSON_PROPERTY_SHARE_TYPE, + SharedDashboardResponseAttributes.JSON_PROPERTY_SHARER_DISABLED, + SharedDashboardResponseAttributes.JSON_PROPERTY_STATUS, + SharedDashboardResponseAttributes.JSON_PROPERTY_TITLE, + SharedDashboardResponseAttributes.JSON_PROPERTY_TOKEN, + SharedDashboardResponseAttributes.JSON_PROPERTY_URL, + SharedDashboardResponseAttributes.JSON_PROPERTY_VIEWING_PREFERENCES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SharedDashboardResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_EMBEDDABLE_DOMAINS = "embeddable_domains"; + private List embeddableDomains = new ArrayList<>(); + + public static final String JSON_PROPERTY_EXPIRATION = "expiration"; + private OffsetDateTime expiration; + + public static final String JSON_PROPERTY_GLOBAL_TIME = "global_time"; + private Map globalTime = new HashMap(); + + public static final String JSON_PROPERTY_GLOBAL_TIME_SELECTABLE = "global_time_selectable"; + private Boolean globalTimeSelectable; + + public static final String JSON_PROPERTY_INVITEES = "invitees"; + private List invitees = new ArrayList<>(); + + public static final String JSON_PROPERTY_LAST_ACCESSED = "last_accessed"; + private OffsetDateTime lastAccessed; + + public static final String JSON_PROPERTY_SELECTABLE_TEMPLATE_VARS = "selectable_template_vars"; + private List selectableTemplateVars = + new ArrayList<>(); + + public static final String JSON_PROPERTY_SHARE_TYPE = "share_type"; + private SharedDashboardShareType shareType; + + public static final String JSON_PROPERTY_SHARER_DISABLED = "sharer_disabled"; + private Boolean sharerDisabled; + + public static final String JSON_PROPERTY_STATUS = "status"; + private SharedDashboardStatus status; + + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public static final String JSON_PROPERTY_TOKEN = "token"; + private String token; + + public static final String JSON_PROPERTY_URL = "url"; + private String url; + + public static final String JSON_PROPERTY_VIEWING_PREFERENCES = "viewing_preferences"; + private SharedDashboardViewingPreferences viewingPreferences; + + public SharedDashboardResponseAttributes() {} + + @JsonCreator + public SharedDashboardResponseAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_EMBEDDABLE_DOMAINS) + List embeddableDomains, + @JsonProperty(required = true, value = JSON_PROPERTY_EXPIRATION) OffsetDateTime expiration, + @JsonProperty(required = true, value = JSON_PROPERTY_GLOBAL_TIME) + Map globalTime, + @JsonProperty(required = true, value = JSON_PROPERTY_GLOBAL_TIME_SELECTABLE) + Boolean globalTimeSelectable, + @JsonProperty(required = true, value = JSON_PROPERTY_INVITEES) + List invitees, + @JsonProperty(required = true, value = JSON_PROPERTY_LAST_ACCESSED) + OffsetDateTime lastAccessed, + @JsonProperty(required = true, value = JSON_PROPERTY_SELECTABLE_TEMPLATE_VARS) + List selectableTemplateVars, + @JsonProperty(required = true, value = JSON_PROPERTY_SHARE_TYPE) + SharedDashboardShareType shareType, + @JsonProperty(required = true, value = JSON_PROPERTY_SHARER_DISABLED) Boolean sharerDisabled, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) SharedDashboardStatus status, + @JsonProperty(required = true, value = JSON_PROPERTY_TITLE) String title, + @JsonProperty(required = true, value = JSON_PROPERTY_TOKEN) String token, + @JsonProperty(required = true, value = JSON_PROPERTY_URL) String url, + @JsonProperty(required = true, value = JSON_PROPERTY_VIEWING_PREFERENCES) + SharedDashboardViewingPreferences viewingPreferences) { + this.createdAt = createdAt; + this.embeddableDomains = embeddableDomains; + this.expiration = expiration; + if (expiration != null) {} + this.globalTime = globalTime; + if (globalTime != null) {} + this.globalTimeSelectable = globalTimeSelectable; + this.invitees = invitees; + this.lastAccessed = lastAccessed; + if (lastAccessed != null) {} + this.selectableTemplateVars = selectableTemplateVars; + this.shareType = shareType; + this.unparsed |= !shareType.isValid(); + this.sharerDisabled = sharerDisabled; + this.status = status; + this.unparsed |= !status.isValid(); + this.title = title; + this.token = token; + this.url = url; + this.viewingPreferences = viewingPreferences; + this.unparsed |= viewingPreferences.unparsed; + } + + public SharedDashboardResponseAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Time when the shared dashboard was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public SharedDashboardResponseAttributes embeddableDomains(List embeddableDomains) { + this.embeddableDomains = embeddableDomains; + return this; + } + + public SharedDashboardResponseAttributes addEmbeddableDomainsItem(String embeddableDomainsItem) { + this.embeddableDomains.add(embeddableDomainsItem); + return this; + } + + /** + * Domains where embed-type shared dashboards can be embedded. + * + * @return embeddableDomains + */ + @JsonProperty(JSON_PROPERTY_EMBEDDABLE_DOMAINS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getEmbeddableDomains() { + return embeddableDomains; + } + + public void setEmbeddableDomains(List embeddableDomains) { + this.embeddableDomains = embeddableDomains; + } + + public SharedDashboardResponseAttributes expiration(OffsetDateTime expiration) { + this.expiration = expiration; + if (expiration != null) {} + return this; + } + + /** + * Time when the shared dashboard expires. + * + * @return expiration + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPIRATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getExpiration() { + return expiration; + } + + public void setExpiration(OffsetDateTime expiration) { + this.expiration = expiration; + } + + public SharedDashboardResponseAttributes globalTime(Map globalTime) { + this.globalTime = globalTime; + if (globalTime != null) {} + return this; + } + + public SharedDashboardResponseAttributes putGlobalTimeItem(String key, Object globalTimeItem) { + this.globalTime.put(key, globalTimeItem); + return this; + } + + /** + * Default time range configuration for the shared dashboard. + * + * @return globalTime + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GLOBAL_TIME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Map getGlobalTime() { + return globalTime; + } + + public void setGlobalTime(Map globalTime) { + this.globalTime = globalTime; + } + + public SharedDashboardResponseAttributes globalTimeSelectable(Boolean globalTimeSelectable) { + this.globalTimeSelectable = globalTimeSelectable; + return this; + } + + /** + * Whether viewers can select a different global time setting. + * + * @return globalTimeSelectable + */ + @JsonProperty(JSON_PROPERTY_GLOBAL_TIME_SELECTABLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getGlobalTimeSelectable() { + return globalTimeSelectable; + } + + public void setGlobalTimeSelectable(Boolean globalTimeSelectable) { + this.globalTimeSelectable = globalTimeSelectable; + } + + public SharedDashboardResponseAttributes invitees(List invitees) { + this.invitees = invitees; + for (SharedDashboardInvitee item : invitees) { + this.unparsed |= item.unparsed; + } + return this; + } + + public SharedDashboardResponseAttributes addInviteesItem(SharedDashboardInvitee inviteesItem) { + this.invitees.add(inviteesItem); + this.unparsed |= inviteesItem.unparsed; + return this; + } + + /** + * Invitees for invite-only shared dashboards. + * + * @return invitees + */ + @JsonProperty(JSON_PROPERTY_INVITEES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getInvitees() { + return invitees; + } + + public void setInvitees(List invitees) { + this.invitees = invitees; + } + + public SharedDashboardResponseAttributes lastAccessed(OffsetDateTime lastAccessed) { + this.lastAccessed = lastAccessed; + if (lastAccessed != null) {} + return this; + } + + /** + * Time when the shared dashboard was last accessed. + * + * @return lastAccessed + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_ACCESSED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getLastAccessed() { + return lastAccessed; + } + + public void setLastAccessed(OffsetDateTime lastAccessed) { + this.lastAccessed = lastAccessed; + } + + public SharedDashboardResponseAttributes selectableTemplateVars( + List selectableTemplateVars) { + this.selectableTemplateVars = selectableTemplateVars; + for (SharedDashboardSelectableTemplateVariable item : selectableTemplateVars) { + this.unparsed |= item.unparsed; + } + return this; + } + + public SharedDashboardResponseAttributes addSelectableTemplateVarsItem( + SharedDashboardSelectableTemplateVariable selectableTemplateVarsItem) { + this.selectableTemplateVars.add(selectableTemplateVarsItem); + this.unparsed |= selectableTemplateVarsItem.unparsed; + return this; + } + + /** + * Template variables that viewers can modify. + * + * @return selectableTemplateVars + */ + @JsonProperty(JSON_PROPERTY_SELECTABLE_TEMPLATE_VARS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getSelectableTemplateVars() { + return selectableTemplateVars; + } + + public void setSelectableTemplateVars( + List selectableTemplateVars) { + this.selectableTemplateVars = selectableTemplateVars; + } + + public SharedDashboardResponseAttributes shareType(SharedDashboardShareType shareType) { + this.shareType = shareType; + this.unparsed |= !shareType.isValid(); + return this; + } + + /** + * Type of dashboard sharing. + * + * @return shareType + */ + @JsonProperty(JSON_PROPERTY_SHARE_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SharedDashboardShareType getShareType() { + return shareType; + } + + public void setShareType(SharedDashboardShareType shareType) { + if (!shareType.isValid()) { + this.unparsed = true; + } + this.shareType = shareType; + } + + public SharedDashboardResponseAttributes sharerDisabled(Boolean sharerDisabled) { + this.sharerDisabled = sharerDisabled; + return this; + } + + /** + * Whether the user who shared the dashboard is disabled. + * + * @return sharerDisabled + */ + @JsonProperty(JSON_PROPERTY_SHARER_DISABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getSharerDisabled() { + return sharerDisabled; + } + + public void setSharerDisabled(Boolean sharerDisabled) { + this.sharerDisabled = sharerDisabled; + } + + public SharedDashboardResponseAttributes status(SharedDashboardStatus status) { + this.status = status; + this.unparsed |= !status.isValid(); + return this; + } + + /** + * Status of the shared dashboard. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SharedDashboardStatus getStatus() { + return status; + } + + public void setStatus(SharedDashboardStatus status) { + if (!status.isValid()) { + this.unparsed = true; + } + this.status = status; + } + + public SharedDashboardResponseAttributes title(String title) { + this.title = title; + return this; + } + + /** + * Display title for the shared dashboard. + * + * @return title + */ + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public SharedDashboardResponseAttributes token(String token) { + this.token = token; + return this; + } + + /** + * Token assigned to the shared dashboard. + * + * @return token + */ + @JsonProperty(JSON_PROPERTY_TOKEN) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getToken() { + return token; + } + + public void setToken(String token) { + this.token = token; + } + + public SharedDashboardResponseAttributes url(String url) { + this.url = url; + return this; + } + + /** + * URL for the shared dashboard. + * + * @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 SharedDashboardResponseAttributes viewingPreferences( + SharedDashboardViewingPreferences viewingPreferences) { + this.viewingPreferences = viewingPreferences; + this.unparsed |= viewingPreferences.unparsed; + return this; + } + + /** + * Display settings for the shared dashboard. + * + * @return viewingPreferences + */ + @JsonProperty(JSON_PROPERTY_VIEWING_PREFERENCES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SharedDashboardViewingPreferences getViewingPreferences() { + return viewingPreferences; + } + + public void setViewingPreferences(SharedDashboardViewingPreferences viewingPreferences) { + this.viewingPreferences = viewingPreferences; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SharedDashboardResponseAttributes + */ + @JsonAnySetter + public SharedDashboardResponseAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SharedDashboardResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SharedDashboardResponseAttributes sharedDashboardResponseAttributes = + (SharedDashboardResponseAttributes) o; + return Objects.equals(this.createdAt, sharedDashboardResponseAttributes.createdAt) + && Objects.equals( + this.embeddableDomains, sharedDashboardResponseAttributes.embeddableDomains) + && Objects.equals(this.expiration, sharedDashboardResponseAttributes.expiration) + && Objects.equals(this.globalTime, sharedDashboardResponseAttributes.globalTime) + && Objects.equals( + this.globalTimeSelectable, sharedDashboardResponseAttributes.globalTimeSelectable) + && Objects.equals(this.invitees, sharedDashboardResponseAttributes.invitees) + && Objects.equals(this.lastAccessed, sharedDashboardResponseAttributes.lastAccessed) + && Objects.equals( + this.selectableTemplateVars, sharedDashboardResponseAttributes.selectableTemplateVars) + && Objects.equals(this.shareType, sharedDashboardResponseAttributes.shareType) + && Objects.equals(this.sharerDisabled, sharedDashboardResponseAttributes.sharerDisabled) + && Objects.equals(this.status, sharedDashboardResponseAttributes.status) + && Objects.equals(this.title, sharedDashboardResponseAttributes.title) + && Objects.equals(this.token, sharedDashboardResponseAttributes.token) + && Objects.equals(this.url, sharedDashboardResponseAttributes.url) + && Objects.equals( + this.viewingPreferences, sharedDashboardResponseAttributes.viewingPreferences) + && Objects.equals( + this.additionalProperties, sharedDashboardResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + embeddableDomains, + expiration, + globalTime, + globalTimeSelectable, + invitees, + lastAccessed, + selectableTemplateVars, + shareType, + sharerDisabled, + status, + title, + token, + url, + viewingPreferences, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SharedDashboardResponseAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" embeddableDomains: ").append(toIndentedString(embeddableDomains)).append("\n"); + sb.append(" expiration: ").append(toIndentedString(expiration)).append("\n"); + sb.append(" globalTime: ").append(toIndentedString(globalTime)).append("\n"); + sb.append(" globalTimeSelectable: ") + .append(toIndentedString(globalTimeSelectable)) + .append("\n"); + sb.append(" invitees: ").append(toIndentedString(invitees)).append("\n"); + sb.append(" lastAccessed: ").append(toIndentedString(lastAccessed)).append("\n"); + sb.append(" selectableTemplateVars: ") + .append(toIndentedString(selectableTemplateVars)) + .append("\n"); + sb.append(" shareType: ").append(toIndentedString(shareType)).append("\n"); + sb.append(" sharerDisabled: ").append(toIndentedString(sharerDisabled)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" token: ").append(toIndentedString(token)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" viewingPreferences: ").append(toIndentedString(viewingPreferences)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SharedDashboardSelectableTemplateVariable.java b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardSelectableTemplateVariable.java new file mode 100644 index 00000000000..c6074e7fc01 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardSelectableTemplateVariable.java @@ -0,0 +1,304 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** A template variable that viewers can modify on the shared dashboard. */ +@JsonPropertyOrder({ + SharedDashboardSelectableTemplateVariable.JSON_PROPERTY_ALLOW_ANY_VALUE, + SharedDashboardSelectableTemplateVariable.JSON_PROPERTY_DEFAULT_VALUES, + SharedDashboardSelectableTemplateVariable.JSON_PROPERTY_NAME, + SharedDashboardSelectableTemplateVariable.JSON_PROPERTY_PREFIX, + SharedDashboardSelectableTemplateVariable.JSON_PROPERTY_TYPE, + SharedDashboardSelectableTemplateVariable.JSON_PROPERTY_VISIBLE_TAGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SharedDashboardSelectableTemplateVariable { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ALLOW_ANY_VALUE = "allow_any_value"; + private Boolean allowAnyValue; + + public static final String JSON_PROPERTY_DEFAULT_VALUES = "default_values"; + private List defaultValues = new ArrayList<>(); + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_PREFIX = "prefix"; + private String prefix; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public static final String JSON_PROPERTY_VISIBLE_TAGS = "visible_tags"; + private List visibleTags = new ArrayList<>(); + + public SharedDashboardSelectableTemplateVariable() {} + + @JsonCreator + public SharedDashboardSelectableTemplateVariable( + @JsonProperty(required = true, value = JSON_PROPERTY_ALLOW_ANY_VALUE) Boolean allowAnyValue, + @JsonProperty(required = true, value = JSON_PROPERTY_DEFAULT_VALUES) + List defaultValues, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_PREFIX) String prefix, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) String type, + @JsonProperty(required = true, value = JSON_PROPERTY_VISIBLE_TAGS) List visibleTags) { + this.allowAnyValue = allowAnyValue; + this.defaultValues = defaultValues; + this.name = name; + this.prefix = prefix; + this.type = type; + this.visibleTags = visibleTags; + } + + public SharedDashboardSelectableTemplateVariable allowAnyValue(Boolean allowAnyValue) { + this.allowAnyValue = allowAnyValue; + return this; + } + + /** + * Whether viewers can see all tag values for the template variable and specify any value. + * + * @return allowAnyValue + */ + @JsonProperty(JSON_PROPERTY_ALLOW_ANY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getAllowAnyValue() { + return allowAnyValue; + } + + public void setAllowAnyValue(Boolean allowAnyValue) { + this.allowAnyValue = allowAnyValue; + } + + public SharedDashboardSelectableTemplateVariable defaultValues(List defaultValues) { + this.defaultValues = defaultValues; + return this; + } + + public SharedDashboardSelectableTemplateVariable addDefaultValuesItem(String defaultValuesItem) { + this.defaultValues.add(defaultValuesItem); + return this; + } + + /** + * Default selected values for the variable. + * + * @return defaultValues + */ + @JsonProperty(JSON_PROPERTY_DEFAULT_VALUES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getDefaultValues() { + return defaultValues; + } + + public void setDefaultValues(List defaultValues) { + this.defaultValues = defaultValues; + } + + public SharedDashboardSelectableTemplateVariable name(String name) { + this.name = name; + return this; + } + + /** + * Name of the template variable. + * + * @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 SharedDashboardSelectableTemplateVariable prefix(String prefix) { + this.prefix = prefix; + return this; + } + + /** + * Tag prefix for the variable. + * + * @return prefix + */ + @JsonProperty(JSON_PROPERTY_PREFIX) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPrefix() { + return prefix; + } + + public void setPrefix(String prefix) { + this.prefix = prefix; + } + + public SharedDashboardSelectableTemplateVariable type(String type) { + this.type = type; + return this; + } + + /** + * Type of the template variable. + * + * @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 SharedDashboardSelectableTemplateVariable visibleTags(List visibleTags) { + this.visibleTags = visibleTags; + return this; + } + + public SharedDashboardSelectableTemplateVariable addVisibleTagsItem(String visibleTagsItem) { + this.visibleTags.add(visibleTagsItem); + return this; + } + + /** + * Restricts which tag values are visible to the viewer. + * + * @return visibleTags + */ + @JsonProperty(JSON_PROPERTY_VISIBLE_TAGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getVisibleTags() { + return visibleTags; + } + + public void setVisibleTags(List visibleTags) { + this.visibleTags = visibleTags; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SharedDashboardSelectableTemplateVariable + */ + @JsonAnySetter + public SharedDashboardSelectableTemplateVariable putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SharedDashboardSelectableTemplateVariable object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SharedDashboardSelectableTemplateVariable sharedDashboardSelectableTemplateVariable = + (SharedDashboardSelectableTemplateVariable) o; + return Objects.equals( + this.allowAnyValue, sharedDashboardSelectableTemplateVariable.allowAnyValue) + && Objects.equals( + this.defaultValues, sharedDashboardSelectableTemplateVariable.defaultValues) + && Objects.equals(this.name, sharedDashboardSelectableTemplateVariable.name) + && Objects.equals(this.prefix, sharedDashboardSelectableTemplateVariable.prefix) + && Objects.equals(this.type, sharedDashboardSelectableTemplateVariable.type) + && Objects.equals(this.visibleTags, sharedDashboardSelectableTemplateVariable.visibleTags) + && Objects.equals( + this.additionalProperties, + sharedDashboardSelectableTemplateVariable.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + allowAnyValue, defaultValues, name, prefix, type, visibleTags, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SharedDashboardSelectableTemplateVariable {\n"); + sb.append(" allowAnyValue: ").append(toIndentedString(allowAnyValue)).append("\n"); + sb.append(" defaultValues: ").append(toIndentedString(defaultValues)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" prefix: ").append(toIndentedString(prefix)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" visibleTags: ").append(toIndentedString(visibleTags)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SharedDashboardShareType.java b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardShareType.java new file mode 100644 index 00000000000..0936d5723ef --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardShareType.java @@ -0,0 +1,60 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Type of dashboard sharing. */ +@JsonSerialize(using = SharedDashboardShareType.SharedDashboardShareTypeSerializer.class) +public class SharedDashboardShareType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("open", "invite", "embed", "secure-embed")); + + public static final SharedDashboardShareType OPEN = new SharedDashboardShareType("open"); + public static final SharedDashboardShareType INVITE = new SharedDashboardShareType("invite"); + public static final SharedDashboardShareType EMBED = new SharedDashboardShareType("embed"); + public static final SharedDashboardShareType SECURE_EMBED = + new SharedDashboardShareType("secure-embed"); + + SharedDashboardShareType(String value) { + super(value, allowedValues); + } + + public static class SharedDashboardShareTypeSerializer + extends StdSerializer { + public SharedDashboardShareTypeSerializer(Class t) { + super(t); + } + + public SharedDashboardShareTypeSerializer() { + this(null); + } + + @Override + public void serialize( + SharedDashboardShareType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SharedDashboardShareType fromValue(String value) { + return new SharedDashboardShareType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SharedDashboardStatus.java b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardStatus.java new file mode 100644 index 00000000000..6ccf0aa3bb0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardStatus.java @@ -0,0 +1,56 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Status of the shared dashboard. */ +@JsonSerialize(using = SharedDashboardStatus.SharedDashboardStatusSerializer.class) +public class SharedDashboardStatus extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("active", "paused")); + + public static final SharedDashboardStatus ACTIVE = new SharedDashboardStatus("active"); + public static final SharedDashboardStatus PAUSED = new SharedDashboardStatus("paused"); + + SharedDashboardStatus(String value) { + super(value, allowedValues); + } + + public static class SharedDashboardStatusSerializer extends StdSerializer { + public SharedDashboardStatusSerializer(Class t) { + super(t); + } + + public SharedDashboardStatusSerializer() { + this(null); + } + + @Override + public void serialize( + SharedDashboardStatus value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SharedDashboardStatus fromValue(String value) { + return new SharedDashboardStatus(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SharedDashboardType.java b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardType.java new file mode 100644 index 00000000000..78e0d1ab210 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardType.java @@ -0,0 +1,56 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Shared dashboard resource type. */ +@JsonSerialize(using = SharedDashboardType.SharedDashboardTypeSerializer.class) +public class SharedDashboardType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("shared_dashboard")); + + public static final SharedDashboardType SHARED_DASHBOARD = + new SharedDashboardType("shared_dashboard"); + + SharedDashboardType(String value) { + super(value, allowedValues); + } + + public static class SharedDashboardTypeSerializer extends StdSerializer { + public SharedDashboardTypeSerializer(Class t) { + super(t); + } + + public SharedDashboardTypeSerializer() { + this(null); + } + + @Override + public void serialize( + SharedDashboardType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SharedDashboardType fromValue(String value) { + return new SharedDashboardType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SharedDashboardViewingPreferences.java b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardViewingPreferences.java new file mode 100644 index 00000000000..f5782dbbdc3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardViewingPreferences.java @@ -0,0 +1,182 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Display settings for the shared dashboard. */ +@JsonPropertyOrder({ + SharedDashboardViewingPreferences.JSON_PROPERTY_HIGH_DENSITY, + SharedDashboardViewingPreferences.JSON_PROPERTY_THEME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SharedDashboardViewingPreferences { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_HIGH_DENSITY = "high_density"; + private Boolean highDensity; + + public static final String JSON_PROPERTY_THEME = "theme"; + private SharedDashboardViewingPreferencesTheme theme; + + public SharedDashboardViewingPreferences() {} + + @JsonCreator + public SharedDashboardViewingPreferences( + @JsonProperty(required = true, value = JSON_PROPERTY_HIGH_DENSITY) Boolean highDensity, + @JsonProperty(required = true, value = JSON_PROPERTY_THEME) + SharedDashboardViewingPreferencesTheme theme) { + this.highDensity = highDensity; + this.theme = theme; + this.unparsed |= !theme.isValid(); + } + + public SharedDashboardViewingPreferences highDensity(Boolean highDensity) { + this.highDensity = highDensity; + return this; + } + + /** + * Whether widgets are displayed in high-density mode. + * + * @return highDensity + */ + @JsonProperty(JSON_PROPERTY_HIGH_DENSITY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getHighDensity() { + return highDensity; + } + + public void setHighDensity(Boolean highDensity) { + this.highDensity = highDensity; + } + + public SharedDashboardViewingPreferences theme(SharedDashboardViewingPreferencesTheme theme) { + this.theme = theme; + this.unparsed |= !theme.isValid(); + return this; + } + + /** + * The theme of the shared dashboard view. system follows the viewer's system + * default. + * + * @return theme + */ + @JsonProperty(JSON_PROPERTY_THEME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SharedDashboardViewingPreferencesTheme getTheme() { + return theme; + } + + public void setTheme(SharedDashboardViewingPreferencesTheme theme) { + if (!theme.isValid()) { + this.unparsed = true; + } + this.theme = theme; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SharedDashboardViewingPreferences + */ + @JsonAnySetter + public SharedDashboardViewingPreferences putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SharedDashboardViewingPreferences object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SharedDashboardViewingPreferences sharedDashboardViewingPreferences = + (SharedDashboardViewingPreferences) o; + return Objects.equals(this.highDensity, sharedDashboardViewingPreferences.highDensity) + && Objects.equals(this.theme, sharedDashboardViewingPreferences.theme) + && Objects.equals( + this.additionalProperties, sharedDashboardViewingPreferences.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(highDensity, theme, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SharedDashboardViewingPreferences {\n"); + sb.append(" highDensity: ").append(toIndentedString(highDensity)).append("\n"); + sb.append(" theme: ").append(toIndentedString(theme)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SharedDashboardViewingPreferencesTheme.java b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardViewingPreferencesTheme.java new file mode 100644 index 00000000000..1c9a5441c00 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SharedDashboardViewingPreferencesTheme.java @@ -0,0 +1,69 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * The theme of the shared dashboard view. system follows the viewer's system default. + */ +@JsonSerialize( + using = + SharedDashboardViewingPreferencesTheme.SharedDashboardViewingPreferencesThemeSerializer + .class) +public class SharedDashboardViewingPreferencesTheme extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("system", "light", "dark")); + + public static final SharedDashboardViewingPreferencesTheme SYSTEM = + new SharedDashboardViewingPreferencesTheme("system"); + public static final SharedDashboardViewingPreferencesTheme LIGHT = + new SharedDashboardViewingPreferencesTheme("light"); + public static final SharedDashboardViewingPreferencesTheme DARK = + new SharedDashboardViewingPreferencesTheme("dark"); + + SharedDashboardViewingPreferencesTheme(String value) { + super(value, allowedValues); + } + + public static class SharedDashboardViewingPreferencesThemeSerializer + extends StdSerializer { + public SharedDashboardViewingPreferencesThemeSerializer( + Class t) { + super(t); + } + + public SharedDashboardViewingPreferencesThemeSerializer() { + this(null); + } + + @Override + public void serialize( + SharedDashboardViewingPreferencesTheme value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SharedDashboardViewingPreferencesTheme fromValue(String value) { + return new SharedDashboardViewingPreferencesTheme(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SingleEntityContextResponse.java b/src/main/java/com/datadog/api/client/v2/model/SingleEntityContextResponse.java new file mode 100644 index 00000000000..6ec79cd6615 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SingleEntityContextResponse.java @@ -0,0 +1,146 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response from the single entity context endpoint, containing the matching entity. */ +@JsonPropertyOrder({SingleEntityContextResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SingleEntityContextResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private EntityContextEntity data; + + public SingleEntityContextResponse() {} + + @JsonCreator + public SingleEntityContextResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) EntityContextEntity data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public SingleEntityContextResponse data(EntityContextEntity data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * A single entity returned by the entity context endpoint. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EntityContextEntity getData() { + return data; + } + + public void setData(EntityContextEntity data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SingleEntityContextResponse + */ + @JsonAnySetter + public SingleEntityContextResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SingleEntityContextResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SingleEntityContextResponse singleEntityContextResponse = (SingleEntityContextResponse) o; + return Objects.equals(this.data, singleEntityContextResponse.data) + && Objects.equals( + this.additionalProperties, singleEntityContextResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SingleEntityContextResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetClustersResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SlackUserBindingData.java similarity index 61% rename from src/main/java/com/datadog/api/client/v2/model/FleetClustersResponseDataAttributes.java rename to src/main/java/com/datadog/api/client/v2/model/SlackUserBindingData.java index 2e87eccbb5a..2ba08e2a1a1 100644 --- a/src/main/java/com/datadog/api/client/v2/model/FleetClustersResponseDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/SlackUserBindingData.java @@ -12,52 +12,66 @@ import 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; -/** Attributes of the fleet clusters response containing the list of clusters. */ -@JsonPropertyOrder({FleetClustersResponseDataAttributes.JSON_PROPERTY_CLUSTERS}) +/** Slack team ID data from a response. */ +@JsonPropertyOrder({SlackUserBindingData.JSON_PROPERTY_ID, SlackUserBindingData.JSON_PROPERTY_TYPE}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class FleetClustersResponseDataAttributes { +public class SlackUserBindingData { @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_CLUSTERS = "clusters"; - private List clusters = null; + public static final String JSON_PROPERTY_ID = "id"; + private String id; - public FleetClustersResponseDataAttributes clusters(List clusters) { - this.clusters = clusters; - for (FleetClusterAttributes item : clusters) { - this.unparsed |= item.unparsed; - } + public static final String JSON_PROPERTY_TYPE = "type"; + private SlackUserBindingType type = SlackUserBindingType.TEAM_ID; + + public SlackUserBindingData id(String id) { + this.id = id; return this; } - public FleetClustersResponseDataAttributes addClustersItem(FleetClusterAttributes clustersItem) { - if (this.clusters == null) { - this.clusters = new ArrayList<>(); - } - this.clusters.add(clustersItem); - this.unparsed |= clustersItem.unparsed; + /** + * The Slack team ID. + * + * @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 SlackUserBindingData type(SlackUserBindingType type) { + this.type = type; + this.unparsed |= !type.isValid(); return this; } /** - * Array of clusters matching the query criteria. + * Slack user binding resource type. * - * @return clusters + * @return type */ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CLUSTERS) + @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getClusters() { - return clusters; + public SlackUserBindingType getType() { + return type; } - public void setClusters(List clusters) { - this.clusters = clusters; + public void setType(SlackUserBindingType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; } /** @@ -72,10 +86,10 @@ public void setClusters(List clusters) { * * @param key The arbitrary key to set * @param value The associated value - * @return FleetClustersResponseDataAttributes + * @return SlackUserBindingData */ @JsonAnySetter - public FleetClustersResponseDataAttributes putAdditionalProperty(String key, Object value) { + public SlackUserBindingData putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -106,7 +120,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this FleetClustersResponseDataAttributes object is equal to o. */ + /** Return true if this SlackUserBindingData object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -115,23 +129,23 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - FleetClustersResponseDataAttributes fleetClustersResponseDataAttributes = - (FleetClustersResponseDataAttributes) o; - return Objects.equals(this.clusters, fleetClustersResponseDataAttributes.clusters) - && Objects.equals( - this.additionalProperties, fleetClustersResponseDataAttributes.additionalProperties); + SlackUserBindingData slackUserBindingData = (SlackUserBindingData) o; + return Objects.equals(this.id, slackUserBindingData.id) + && Objects.equals(this.type, slackUserBindingData.type) + && Objects.equals(this.additionalProperties, slackUserBindingData.additionalProperties); } @Override public int hashCode() { - return Objects.hash(clusters, additionalProperties); + return Objects.hash(id, type, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class FleetClustersResponseDataAttributes {\n"); - sb.append(" clusters: ").append(toIndentedString(clusters)).append("\n"); + sb.append("class SlackUserBindingData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/SlackUserBindingType.java b/src/main/java/com/datadog/api/client/v2/model/SlackUserBindingType.java new file mode 100644 index 00000000000..8e550ba03f1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SlackUserBindingType.java @@ -0,0 +1,54 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Slack user binding resource type. */ +@JsonSerialize(using = SlackUserBindingType.SlackUserBindingTypeSerializer.class) +public class SlackUserBindingType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("team_id")); + + public static final SlackUserBindingType TEAM_ID = new SlackUserBindingType("team_id"); + + SlackUserBindingType(String value) { + super(value, allowedValues); + } + + public static class SlackUserBindingTypeSerializer extends StdSerializer { + public SlackUserBindingTypeSerializer(Class t) { + super(t); + } + + public SlackUserBindingTypeSerializer() { + this(null); + } + + @Override + public void serialize( + SlackUserBindingType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SlackUserBindingType fromValue(String value) { + return new SlackUserBindingType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SlackUserBindingsResponse.java b/src/main/java/com/datadog/api/client/v2/model/SlackUserBindingsResponse.java new file mode 100644 index 00000000000..ef85fb7d405 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SlackUserBindingsResponse.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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response with a list of Slack user bindings. */ +@JsonPropertyOrder({SlackUserBindingsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SlackUserBindingsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public SlackUserBindingsResponse() {} + + @JsonCreator + public SlackUserBindingsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) { + this.data = data; + } + + public SlackUserBindingsResponse data(List data) { + this.data = data; + for (SlackUserBindingData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public SlackUserBindingsResponse addDataItem(SlackUserBindingData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * An array of Slack user bindings. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SlackUserBindingsResponse + */ + @JsonAnySetter + public SlackUserBindingsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SlackUserBindingsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SlackUserBindingsResponse slackUserBindingsResponse = (SlackUserBindingsResponse) o; + return Objects.equals(this.data, slackUserBindingsResponse.data) + && Objects.equals( + this.additionalProperties, slackUserBindingsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SlackUserBindingsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SourcemapDataType.java b/src/main/java/com/datadog/api/client/v2/model/SourcemapDataType.java new file mode 100644 index 00000000000..f39d75c2891 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SourcemapDataType.java @@ -0,0 +1,53 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The resource type for source map objects. */ +@JsonSerialize(using = SourcemapDataType.SourcemapDataTypeSerializer.class) +public class SourcemapDataType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("sourcemaps")); + + public static final SourcemapDataType SOURCEMAPS = new SourcemapDataType("sourcemaps"); + + SourcemapDataType(String value) { + super(value, allowedValues); + } + + public static class SourcemapDataTypeSerializer extends StdSerializer { + public SourcemapDataTypeSerializer(Class t) { + super(t); + } + + public SourcemapDataTypeSerializer() { + this(null); + } + + @Override + public void serialize(SourcemapDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SourcemapDataType fromValue(String value) { + return new SourcemapDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SourcemapFileAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SourcemapFileAttributes.java new file mode 100644 index 00000000000..58b564c14c6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SourcemapFileAttributes.java @@ -0,0 +1,377 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a JavaScript source map file. */ +@JsonPropertyOrder({ + SourcemapFileAttributes.JSON_PROPERTY_FILE, + SourcemapFileAttributes.JSON_PROPERTY_MAPPINGS, + SourcemapFileAttributes.JSON_PROPERTY_MINIFIED_LINE_LENGTHS, + SourcemapFileAttributes.JSON_PROPERTY_NAMES, + SourcemapFileAttributes.JSON_PROPERTY_SOURCE_ROOT, + SourcemapFileAttributes.JSON_PROPERTY_SOURCES, + SourcemapFileAttributes.JSON_PROPERTY_SOURCES_CONTENT, + SourcemapFileAttributes.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SourcemapFileAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FILE = "file"; + private String file; + + public static final String JSON_PROPERTY_MAPPINGS = "mappings"; + private String mappings; + + public static final String JSON_PROPERTY_MINIFIED_LINE_LENGTHS = "minifiedLineLengths"; + private List minifiedLineLengths = new ArrayList<>(); + + public static final String JSON_PROPERTY_NAMES = "names"; + private List names = new ArrayList<>(); + + public static final String JSON_PROPERTY_SOURCE_ROOT = "sourceRoot"; + private String sourceRoot; + + public static final String JSON_PROPERTY_SOURCES = "sources"; + private List sources = new ArrayList<>(); + + public static final String JSON_PROPERTY_SOURCES_CONTENT = "sourcesContent"; + private List sourcesContent = new ArrayList<>(); + + public static final String JSON_PROPERTY_VERSION = "version"; + private Long version; + + public SourcemapFileAttributes() {} + + @JsonCreator + public SourcemapFileAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_FILE) String file, + @JsonProperty(required = true, value = JSON_PROPERTY_MAPPINGS) String mappings, + @JsonProperty(required = true, value = JSON_PROPERTY_MINIFIED_LINE_LENGTHS) + List minifiedLineLengths, + @JsonProperty(required = true, value = JSON_PROPERTY_NAMES) List names, + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE_ROOT) String sourceRoot, + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCES) List sources, + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCES_CONTENT) + List sourcesContent, + @JsonProperty(required = true, value = JSON_PROPERTY_VERSION) Long version) { + this.file = file; + this.mappings = mappings; + this.minifiedLineLengths = minifiedLineLengths; + this.names = names; + this.sourceRoot = sourceRoot; + this.sources = sources; + this.sourcesContent = sourcesContent; + this.version = version; + } + + public SourcemapFileAttributes file(String file) { + this.file = file; + return this; + } + + /** + * The name of the minified JavaScript file. + * + * @return file + */ + @JsonProperty(JSON_PROPERTY_FILE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getFile() { + return file; + } + + public void setFile(String file) { + this.file = file; + } + + public SourcemapFileAttributes mappings(String mappings) { + this.mappings = mappings; + return this; + } + + /** + * The Base64 VLQ encoded string that maps positions in the minified file to positions in the + * original source files. + * + * @return mappings + */ + @JsonProperty(JSON_PROPERTY_MAPPINGS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMappings() { + return mappings; + } + + public void setMappings(String mappings) { + this.mappings = mappings; + } + + public SourcemapFileAttributes minifiedLineLengths(List minifiedLineLengths) { + this.minifiedLineLengths = minifiedLineLengths; + return this; + } + + public SourcemapFileAttributes addMinifiedLineLengthsItem(Long minifiedLineLengthsItem) { + this.minifiedLineLengths.add(minifiedLineLengthsItem); + return this; + } + + /** + * List of character counts for each line in the minified file. + * + * @return minifiedLineLengths + */ + @JsonProperty(JSON_PROPERTY_MINIFIED_LINE_LENGTHS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getMinifiedLineLengths() { + return minifiedLineLengths; + } + + public void setMinifiedLineLengths(List minifiedLineLengths) { + this.minifiedLineLengths = minifiedLineLengths; + } + + public SourcemapFileAttributes names(List names) { + this.names = names; + return this; + } + + public SourcemapFileAttributes addNamesItem(Object namesItem) { + this.names.add(namesItem); + return this; + } + + /** + * List of symbol names referenced in the mappings. + * + * @return names + */ + @JsonProperty(JSON_PROPERTY_NAMES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getNames() { + return names; + } + + public void setNames(List names) { + this.names = names; + } + + public SourcemapFileAttributes sourceRoot(String sourceRoot) { + this.sourceRoot = sourceRoot; + return this; + } + + /** + * The root path prepended to source file paths. + * + * @return sourceRoot + */ + @JsonProperty(JSON_PROPERTY_SOURCE_ROOT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSourceRoot() { + return sourceRoot; + } + + public void setSourceRoot(String sourceRoot) { + this.sourceRoot = sourceRoot; + } + + public SourcemapFileAttributes sources(List sources) { + this.sources = sources; + return this; + } + + public SourcemapFileAttributes addSourcesItem(String sourcesItem) { + this.sources.add(sourcesItem); + return this; + } + + /** + * List of original source file paths. + * + * @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 SourcemapFileAttributes sourcesContent(List sourcesContent) { + this.sourcesContent = sourcesContent; + return this; + } + + public SourcemapFileAttributes addSourcesContentItem(String sourcesContentItem) { + this.sourcesContent.add(sourcesContentItem); + return this; + } + + /** + * List of original source file contents corresponding to the paths in sources. + * + * @return sourcesContent + */ + @JsonProperty(JSON_PROPERTY_SOURCES_CONTENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getSourcesContent() { + return sourcesContent; + } + + public void setSourcesContent(List sourcesContent) { + this.sourcesContent = sourcesContent; + } + + public SourcemapFileAttributes version(Long version) { + this.version = version; + return this; + } + + /** + * The version of the source map format (typically 3). + * + * @return version + */ + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getVersion() { + return version; + } + + public void setVersion(Long version) { + this.version = version; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SourcemapFileAttributes + */ + @JsonAnySetter + public SourcemapFileAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SourcemapFileAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SourcemapFileAttributes sourcemapFileAttributes = (SourcemapFileAttributes) o; + return Objects.equals(this.file, sourcemapFileAttributes.file) + && Objects.equals(this.mappings, sourcemapFileAttributes.mappings) + && Objects.equals(this.minifiedLineLengths, sourcemapFileAttributes.minifiedLineLengths) + && Objects.equals(this.names, sourcemapFileAttributes.names) + && Objects.equals(this.sourceRoot, sourcemapFileAttributes.sourceRoot) + && Objects.equals(this.sources, sourcemapFileAttributes.sources) + && Objects.equals(this.sourcesContent, sourcemapFileAttributes.sourcesContent) + && Objects.equals(this.version, sourcemapFileAttributes.version) + && Objects.equals(this.additionalProperties, sourcemapFileAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + file, + mappings, + minifiedLineLengths, + names, + sourceRoot, + sources, + sourcesContent, + version, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SourcemapFileAttributes {\n"); + sb.append(" file: ").append(toIndentedString(file)).append("\n"); + sb.append(" mappings: ").append(toIndentedString(mappings)).append("\n"); + sb.append(" minifiedLineLengths: ") + .append(toIndentedString(minifiedLineLengths)) + .append("\n"); + sb.append(" names: ").append(toIndentedString(names)).append("\n"); + sb.append(" sourceRoot: ").append(toIndentedString(sourceRoot)).append("\n"); + sb.append(" sources: ").append(toIndentedString(sources)).append("\n"); + sb.append(" sourcesContent: ").append(toIndentedString(sourcesContent)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SourcemapFileData.java b/src/main/java/com/datadog/api/client/v2/model/SourcemapFileData.java new file mode 100644 index 00000000000..5f065192f10 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SourcemapFileData.java @@ -0,0 +1,209 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** JavaScript source map file data object. */ +@JsonPropertyOrder({ + SourcemapFileData.JSON_PROPERTY_ATTRIBUTES, + SourcemapFileData.JSON_PROPERTY_ID, + SourcemapFileData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SourcemapFileData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private SourcemapFileAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SourcemapFileDataType type; + + public SourcemapFileData() {} + + @JsonCreator + public SourcemapFileData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + SourcemapFileAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SourcemapFileDataType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public SourcemapFileData attributes(SourcemapFileAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a JavaScript source map file. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SourcemapFileAttributes getAttributes() { + return attributes; + } + + public void setAttributes(SourcemapFileAttributes attributes) { + this.attributes = attributes; + } + + public SourcemapFileData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the source map file, typically the path to the file. + * + * @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 SourcemapFileData type(SourcemapFileDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type for source map file objects. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SourcemapFileDataType getType() { + return type; + } + + public void setType(SourcemapFileDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SourcemapFileData + */ + @JsonAnySetter + public SourcemapFileData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SourcemapFileData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SourcemapFileData sourcemapFileData = (SourcemapFileData) o; + return Objects.equals(this.attributes, sourcemapFileData.attributes) + && Objects.equals(this.id, sourcemapFileData.id) + && Objects.equals(this.type, sourcemapFileData.type) + && Objects.equals(this.additionalProperties, sourcemapFileData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SourcemapFileData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SourcemapFileDataType.java b/src/main/java/com/datadog/api/client/v2/model/SourcemapFileDataType.java new file mode 100644 index 00000000000..d37a3fed548 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SourcemapFileDataType.java @@ -0,0 +1,56 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The resource type for source map file objects. */ +@JsonSerialize(using = SourcemapFileDataType.SourcemapFileDataTypeSerializer.class) +public class SourcemapFileDataType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("sourcemap_files")); + + public static final SourcemapFileDataType SOURCEMAP_FILES = + new SourcemapFileDataType("sourcemap_files"); + + SourcemapFileDataType(String value) { + super(value, allowedValues); + } + + public static class SourcemapFileDataTypeSerializer extends StdSerializer { + public SourcemapFileDataTypeSerializer(Class t) { + super(t); + } + + public SourcemapFileDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + SourcemapFileDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SourcemapFileDataType fromValue(String value) { + return new SourcemapFileDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SourcemapFileResponse.java b/src/main/java/com/datadog/api/client/v2/model/SourcemapFileResponse.java new file mode 100644 index 00000000000..df429bd54ff --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SourcemapFileResponse.java @@ -0,0 +1,145 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing a JavaScript source map file. */ +@JsonPropertyOrder({SourcemapFileResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SourcemapFileResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private SourcemapFileData data; + + public SourcemapFileResponse() {} + + @JsonCreator + public SourcemapFileResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) SourcemapFileData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public SourcemapFileResponse data(SourcemapFileData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * JavaScript source map file data object. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SourcemapFileData getData() { + return data; + } + + public void setData(SourcemapFileData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SourcemapFileResponse + */ + @JsonAnySetter + public SourcemapFileResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SourcemapFileResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SourcemapFileResponse sourcemapFileResponse = (SourcemapFileResponse) o; + return Objects.equals(this.data, sourcemapFileResponse.data) + && Objects.equals(this.additionalProperties, sourcemapFileResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SourcemapFileResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SourcemapItem.java b/src/main/java/com/datadog/api/client/v2/model/SourcemapItem.java new file mode 100644 index 00000000000..a53de2b5646 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SourcemapItem.java @@ -0,0 +1,673 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.JSON; +import com.datadog.api.client.UnparsedObject; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import jakarta.ws.rs.core.GenericType; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = SourcemapItem.SourcemapItemDeserializer.class) +@JsonSerialize(using = SourcemapItem.SourcemapItemSerializer.class) +public class SourcemapItem extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(SourcemapItem.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class SourcemapItemSerializer extends StdSerializer { + public SourcemapItemSerializer(Class t) { + super(t); + } + + public SourcemapItemSerializer() { + this(null); + } + + @Override + public void serialize(SourcemapItem value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class SourcemapItemDeserializer extends StdDeserializer { + public SourcemapItemDeserializer() { + this(SourcemapItem.class); + } + + public SourcemapItemDeserializer(Class vc) { + super(vc); + } + + @Override + public SourcemapItem 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 JSSourcemapData + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (JSSourcemapData.class.equals(Integer.class) + || JSSourcemapData.class.equals(Long.class) + || JSSourcemapData.class.equals(Float.class) + || JSSourcemapData.class.equals(Double.class) + || JSSourcemapData.class.equals(Boolean.class) + || JSSourcemapData.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((JSSourcemapData.class.equals(Integer.class) + || JSSourcemapData.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((JSSourcemapData.class.equals(Float.class) + || JSSourcemapData.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (JSSourcemapData.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (JSSourcemapData.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(JSSourcemapData.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((JSSourcemapData) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'JSSourcemapData'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'JSSourcemapData'", e); + } + + // deserialize ReactNativeSourcemapData + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ReactNativeSourcemapData.class.equals(Integer.class) + || ReactNativeSourcemapData.class.equals(Long.class) + || ReactNativeSourcemapData.class.equals(Float.class) + || ReactNativeSourcemapData.class.equals(Double.class) + || ReactNativeSourcemapData.class.equals(Boolean.class) + || ReactNativeSourcemapData.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((ReactNativeSourcemapData.class.equals(Integer.class) + || ReactNativeSourcemapData.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((ReactNativeSourcemapData.class.equals(Float.class) + || ReactNativeSourcemapData.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (ReactNativeSourcemapData.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (ReactNativeSourcemapData.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(ReactNativeSourcemapData.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((ReactNativeSourcemapData) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'ReactNativeSourcemapData'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ReactNativeSourcemapData'", e); + } + + // deserialize IOSSourcemapData + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IOSSourcemapData.class.equals(Integer.class) + || IOSSourcemapData.class.equals(Long.class) + || IOSSourcemapData.class.equals(Float.class) + || IOSSourcemapData.class.equals(Double.class) + || IOSSourcemapData.class.equals(Boolean.class) + || IOSSourcemapData.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((IOSSourcemapData.class.equals(Integer.class) + || IOSSourcemapData.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((IOSSourcemapData.class.equals(Float.class) + || IOSSourcemapData.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (IOSSourcemapData.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (IOSSourcemapData.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(IOSSourcemapData.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((IOSSourcemapData) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'IOSSourcemapData'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'IOSSourcemapData'", e); + } + + // deserialize JVMSourcemapData + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (JVMSourcemapData.class.equals(Integer.class) + || JVMSourcemapData.class.equals(Long.class) + || JVMSourcemapData.class.equals(Float.class) + || JVMSourcemapData.class.equals(Double.class) + || JVMSourcemapData.class.equals(Boolean.class) + || JVMSourcemapData.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((JVMSourcemapData.class.equals(Integer.class) + || JVMSourcemapData.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((JVMSourcemapData.class.equals(Float.class) + || JVMSourcemapData.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (JVMSourcemapData.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (JVMSourcemapData.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(JVMSourcemapData.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((JVMSourcemapData) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'JVMSourcemapData'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'JVMSourcemapData'", e); + } + + // deserialize FlutterSourcemapData + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (FlutterSourcemapData.class.equals(Integer.class) + || FlutterSourcemapData.class.equals(Long.class) + || FlutterSourcemapData.class.equals(Float.class) + || FlutterSourcemapData.class.equals(Double.class) + || FlutterSourcemapData.class.equals(Boolean.class) + || FlutterSourcemapData.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((FlutterSourcemapData.class.equals(Integer.class) + || FlutterSourcemapData.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((FlutterSourcemapData.class.equals(Float.class) + || FlutterSourcemapData.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (FlutterSourcemapData.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (FlutterSourcemapData.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(FlutterSourcemapData.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((FlutterSourcemapData) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'FlutterSourcemapData'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'FlutterSourcemapData'", e); + } + + // deserialize ELFSourcemapData + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ELFSourcemapData.class.equals(Integer.class) + || ELFSourcemapData.class.equals(Long.class) + || ELFSourcemapData.class.equals(Float.class) + || ELFSourcemapData.class.equals(Double.class) + || ELFSourcemapData.class.equals(Boolean.class) + || ELFSourcemapData.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((ELFSourcemapData.class.equals(Integer.class) + || ELFSourcemapData.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((ELFSourcemapData.class.equals(Float.class) + || ELFSourcemapData.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (ELFSourcemapData.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (ELFSourcemapData.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(ELFSourcemapData.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((ELFSourcemapData) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'ELFSourcemapData'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'ELFSourcemapData'", e); + } + + // deserialize NDKSourcemapData + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (NDKSourcemapData.class.equals(Integer.class) + || NDKSourcemapData.class.equals(Long.class) + || NDKSourcemapData.class.equals(Float.class) + || NDKSourcemapData.class.equals(Double.class) + || NDKSourcemapData.class.equals(Boolean.class) + || NDKSourcemapData.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((NDKSourcemapData.class.equals(Integer.class) + || NDKSourcemapData.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((NDKSourcemapData.class.equals(Float.class) + || NDKSourcemapData.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (NDKSourcemapData.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (NDKSourcemapData.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(NDKSourcemapData.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((NDKSourcemapData) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'NDKSourcemapData'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'NDKSourcemapData'", e); + } + + // deserialize IL2CPPSourcemapData + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IL2CPPSourcemapData.class.equals(Integer.class) + || IL2CPPSourcemapData.class.equals(Long.class) + || IL2CPPSourcemapData.class.equals(Float.class) + || IL2CPPSourcemapData.class.equals(Double.class) + || IL2CPPSourcemapData.class.equals(Boolean.class) + || IL2CPPSourcemapData.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((IL2CPPSourcemapData.class.equals(Integer.class) + || IL2CPPSourcemapData.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((IL2CPPSourcemapData.class.equals(Float.class) + || IL2CPPSourcemapData.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (IL2CPPSourcemapData.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (IL2CPPSourcemapData.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(IL2CPPSourcemapData.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((IL2CPPSourcemapData) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'IL2CPPSourcemapData'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'IL2CPPSourcemapData'", e); + } + + SourcemapItem ret = new SourcemapItem(); + 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 SourcemapItem getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "SourcemapItem cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public SourcemapItem() { + super("oneOf", Boolean.FALSE); + } + + public SourcemapItem(JSSourcemapData o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public SourcemapItem(ReactNativeSourcemapData o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public SourcemapItem(IOSSourcemapData o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public SourcemapItem(JVMSourcemapData o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public SourcemapItem(FlutterSourcemapData o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public SourcemapItem(ELFSourcemapData o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public SourcemapItem(NDKSourcemapData o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public SourcemapItem(IL2CPPSourcemapData o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("JSSourcemapData", new GenericType() {}); + schemas.put("ReactNativeSourcemapData", new GenericType() {}); + schemas.put("IOSSourcemapData", new GenericType() {}); + schemas.put("JVMSourcemapData", new GenericType() {}); + schemas.put("FlutterSourcemapData", new GenericType() {}); + schemas.put("ELFSourcemapData", new GenericType() {}); + schemas.put("NDKSourcemapData", new GenericType() {}); + schemas.put("IL2CPPSourcemapData", new GenericType() {}); + JSON.registerDescendants(SourcemapItem.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return SourcemapItem.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: JSSourcemapData, ReactNativeSourcemapData, IOSSourcemapData, + * JVMSourcemapData, FlutterSourcemapData, ELFSourcemapData, NDKSourcemapData, IL2CPPSourcemapData + * + *

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(JSSourcemapData.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(ReactNativeSourcemapData.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(IOSSourcemapData.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(JVMSourcemapData.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(FlutterSourcemapData.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(ELFSourcemapData.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(NDKSourcemapData.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(IL2CPPSourcemapData.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 JSSourcemapData, ReactNativeSourcemapData," + + " IOSSourcemapData, JVMSourcemapData, FlutterSourcemapData, ELFSourcemapData," + + " NDKSourcemapData, IL2CPPSourcemapData"); + } + + /** + * Get the actual instance, which can be the following: JSSourcemapData, ReactNativeSourcemapData, + * IOSSourcemapData, JVMSourcemapData, FlutterSourcemapData, ELFSourcemapData, NDKSourcemapData, + * IL2CPPSourcemapData + * + * @return The actual instance (JSSourcemapData, ReactNativeSourcemapData, IOSSourcemapData, + * JVMSourcemapData, FlutterSourcemapData, ELFSourcemapData, NDKSourcemapData, + * IL2CPPSourcemapData) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `JSSourcemapData`. If the actual instance is not `JSSourcemapData`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `JSSourcemapData` + * @throws ClassCastException if the instance is not `JSSourcemapData` + */ + public JSSourcemapData getJSSourcemapData() throws ClassCastException { + return (JSSourcemapData) super.getActualInstance(); + } + + /** + * Get the actual instance of `ReactNativeSourcemapData`. If the actual instance is not + * `ReactNativeSourcemapData`, the ClassCastException will be thrown. + * + * @return The actual instance of `ReactNativeSourcemapData` + * @throws ClassCastException if the instance is not `ReactNativeSourcemapData` + */ + public ReactNativeSourcemapData getReactNativeSourcemapData() throws ClassCastException { + return (ReactNativeSourcemapData) super.getActualInstance(); + } + + /** + * Get the actual instance of `IOSSourcemapData`. If the actual instance is not + * `IOSSourcemapData`, the ClassCastException will be thrown. + * + * @return The actual instance of `IOSSourcemapData` + * @throws ClassCastException if the instance is not `IOSSourcemapData` + */ + public IOSSourcemapData getIOSSourcemapData() throws ClassCastException { + return (IOSSourcemapData) super.getActualInstance(); + } + + /** + * Get the actual instance of `JVMSourcemapData`. If the actual instance is not + * `JVMSourcemapData`, the ClassCastException will be thrown. + * + * @return The actual instance of `JVMSourcemapData` + * @throws ClassCastException if the instance is not `JVMSourcemapData` + */ + public JVMSourcemapData getJVMSourcemapData() throws ClassCastException { + return (JVMSourcemapData) super.getActualInstance(); + } + + /** + * Get the actual instance of `FlutterSourcemapData`. If the actual instance is not + * `FlutterSourcemapData`, the ClassCastException will be thrown. + * + * @return The actual instance of `FlutterSourcemapData` + * @throws ClassCastException if the instance is not `FlutterSourcemapData` + */ + public FlutterSourcemapData getFlutterSourcemapData() throws ClassCastException { + return (FlutterSourcemapData) super.getActualInstance(); + } + + /** + * Get the actual instance of `ELFSourcemapData`. If the actual instance is not + * `ELFSourcemapData`, the ClassCastException will be thrown. + * + * @return The actual instance of `ELFSourcemapData` + * @throws ClassCastException if the instance is not `ELFSourcemapData` + */ + public ELFSourcemapData getELFSourcemapData() throws ClassCastException { + return (ELFSourcemapData) super.getActualInstance(); + } + + /** + * Get the actual instance of `NDKSourcemapData`. If the actual instance is not + * `NDKSourcemapData`, the ClassCastException will be thrown. + * + * @return The actual instance of `NDKSourcemapData` + * @throws ClassCastException if the instance is not `NDKSourcemapData` + */ + public NDKSourcemapData getNDKSourcemapData() throws ClassCastException { + return (NDKSourcemapData) super.getActualInstance(); + } + + /** + * Get the actual instance of `IL2CPPSourcemapData`. If the actual instance is not + * `IL2CPPSourcemapData`, the ClassCastException will be thrown. + * + * @return The actual instance of `IL2CPPSourcemapData` + * @throws ClassCastException if the instance is not `IL2CPPSourcemapData` + */ + public IL2CPPSourcemapData getIL2CPPSourcemapData() throws ClassCastException { + return (IL2CPPSourcemapData) super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SourcemapMapKind.java b/src/main/java/com/datadog/api/client/v2/model/SourcemapMapKind.java new file mode 100644 index 00000000000..3f617b49beb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SourcemapMapKind.java @@ -0,0 +1,62 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The type of source map. */ +@JsonSerialize(using = SourcemapMapKind.SourcemapMapKindSerializer.class) +public class SourcemapMapKind extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList("js", "jvm", "ios", "react", "flutter", "elf", "ndk", "il2cpp")); + + public static final SourcemapMapKind JS = new SourcemapMapKind("js"); + public static final SourcemapMapKind JVM = new SourcemapMapKind("jvm"); + public static final SourcemapMapKind IOS = new SourcemapMapKind("ios"); + public static final SourcemapMapKind REACT = new SourcemapMapKind("react"); + public static final SourcemapMapKind FLUTTER = new SourcemapMapKind("flutter"); + public static final SourcemapMapKind ELF = new SourcemapMapKind("elf"); + public static final SourcemapMapKind NDK = new SourcemapMapKind("ndk"); + public static final SourcemapMapKind IL2CPP = new SourcemapMapKind("il2cpp"); + + SourcemapMapKind(String value) { + super(value, allowedValues); + } + + public static class SourcemapMapKindSerializer extends StdSerializer { + public SourcemapMapKindSerializer(Class t) { + super(t); + } + + public SourcemapMapKindSerializer() { + this(null); + } + + @Override + public void serialize(SourcemapMapKind value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SourcemapMapKind fromValue(String value) { + return new SourcemapMapKind(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SourcemapsListMeta.java b/src/main/java/com/datadog/api/client/v2/model/SourcemapsListMeta.java new file mode 100644 index 00000000000..ea4c262a8e9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SourcemapsListMeta.java @@ -0,0 +1,145 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Pagination metadata for the source maps list response. */ +@JsonPropertyOrder({SourcemapsListMeta.JSON_PROPERTY_PAGE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SourcemapsListMeta { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_PAGE = "page"; + private SourcemapsListMetaPage page; + + public SourcemapsListMeta() {} + + @JsonCreator + public SourcemapsListMeta( + @JsonProperty(required = true, value = JSON_PROPERTY_PAGE) SourcemapsListMetaPage page) { + this.page = page; + this.unparsed |= page.unparsed; + } + + public SourcemapsListMeta page(SourcemapsListMetaPage page) { + this.page = page; + this.unparsed |= page.unparsed; + return this; + } + + /** + * Page information for the source maps list response. + * + * @return page + */ + @JsonProperty(JSON_PROPERTY_PAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SourcemapsListMetaPage getPage() { + return page; + } + + public void setPage(SourcemapsListMetaPage page) { + this.page = page; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SourcemapsListMeta + */ + @JsonAnySetter + public SourcemapsListMeta putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SourcemapsListMeta object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SourcemapsListMeta sourcemapsListMeta = (SourcemapsListMeta) o; + return Objects.equals(this.page, sourcemapsListMeta.page) + && Objects.equals(this.additionalProperties, sourcemapsListMeta.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(page, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SourcemapsListMeta {\n"); + sb.append(" page: ").append(toIndentedString(page)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SourcemapsListMetaPage.java b/src/main/java/com/datadog/api/client/v2/model/SourcemapsListMetaPage.java new file mode 100644 index 00000000000..2147d0de90f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SourcemapsListMetaPage.java @@ -0,0 +1,174 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Page information for the source maps list response. */ +@JsonPropertyOrder({ + SourcemapsListMetaPage.JSON_PROPERTY_HAS_MORE_RESULTS, + SourcemapsListMetaPage.JSON_PROPERTY_TOTAL_FILTERED_COUNT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SourcemapsListMetaPage { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_HAS_MORE_RESULTS = "has_more_results"; + private Boolean hasMoreResults; + + public static final String JSON_PROPERTY_TOTAL_FILTERED_COUNT = "total_filtered_count"; + private Long totalFilteredCount; + + public SourcemapsListMetaPage() {} + + @JsonCreator + public SourcemapsListMetaPage( + @JsonProperty(required = true, value = JSON_PROPERTY_HAS_MORE_RESULTS) Boolean hasMoreResults, + @JsonProperty(required = true, value = JSON_PROPERTY_TOTAL_FILTERED_COUNT) + Long totalFilteredCount) { + this.hasMoreResults = hasMoreResults; + this.totalFilteredCount = totalFilteredCount; + } + + public SourcemapsListMetaPage hasMoreResults(Boolean hasMoreResults) { + this.hasMoreResults = hasMoreResults; + return this; + } + + /** + * Whether there are more results available beyond the current page. + * + * @return hasMoreResults + */ + @JsonProperty(JSON_PROPERTY_HAS_MORE_RESULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getHasMoreResults() { + return hasMoreResults; + } + + public void setHasMoreResults(Boolean hasMoreResults) { + this.hasMoreResults = hasMoreResults; + } + + public SourcemapsListMetaPage totalFilteredCount(Long totalFilteredCount) { + this.totalFilteredCount = totalFilteredCount; + return this; + } + + /** + * Total number of source maps matching the filter criteria. + * + * @return totalFilteredCount + */ + @JsonProperty(JSON_PROPERTY_TOTAL_FILTERED_COUNT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getTotalFilteredCount() { + return totalFilteredCount; + } + + public void setTotalFilteredCount(Long totalFilteredCount) { + this.totalFilteredCount = totalFilteredCount; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SourcemapsListMetaPage + */ + @JsonAnySetter + public SourcemapsListMetaPage putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SourcemapsListMetaPage object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SourcemapsListMetaPage sourcemapsListMetaPage = (SourcemapsListMetaPage) o; + return Objects.equals(this.hasMoreResults, sourcemapsListMetaPage.hasMoreResults) + && Objects.equals(this.totalFilteredCount, sourcemapsListMetaPage.totalFilteredCount) + && Objects.equals(this.additionalProperties, sourcemapsListMetaPage.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(hasMoreResults, totalFilteredCount, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SourcemapsListMetaPage {\n"); + sb.append(" hasMoreResults: ").append(toIndentedString(hasMoreResults)).append("\n"); + sb.append(" totalFilteredCount: ").append(toIndentedString(totalFilteredCount)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SourcemapsResponse.java b/src/main/java/com/datadog/api/client/v2/model/SourcemapsResponse.java new file mode 100644 index 00000000000..ef030d98de0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SourcemapsResponse.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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing a list of affected source maps. */ +@JsonPropertyOrder({SourcemapsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SourcemapsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public SourcemapsResponse() {} + + @JsonCreator + public SourcemapsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) { + this.data = data; + } + + public SourcemapsResponse data(List data) { + this.data = data; + for (SourcemapItem item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public SourcemapsResponse addDataItem(SourcemapItem dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of source map data objects. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SourcemapsResponse + */ + @JsonAnySetter + public SourcemapsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SourcemapsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SourcemapsResponse sourcemapsResponse = (SourcemapsResponse) o; + return Objects.equals(this.data, sourcemapsResponse.data) + && Objects.equals(this.additionalProperties, sourcemapsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SourcemapsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StegadographyGetWidgetsRequest.java b/src/main/java/com/datadog/api/client/v2/model/StegadographyGetWidgetsRequest.java new file mode 100644 index 00000000000..40c1883b835 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StegadographyGetWidgetsRequest.java @@ -0,0 +1,146 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.io.File; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Multipart form data containing the PNG image to scan for watermarks. */ +@JsonPropertyOrder({StegadographyGetWidgetsRequest.JSON_PROPERTY_IMAGE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StegadographyGetWidgetsRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_IMAGE = "image"; + private File image; + + public StegadographyGetWidgetsRequest() {} + + @JsonCreator + public StegadographyGetWidgetsRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_IMAGE) File image) { + this.image = image; + } + + public StegadographyGetWidgetsRequest image(File image) { + this.image = image; + return this; + } + + /** + * PNG image file to scan for embedded watermarks. + * + * @return image + */ + @JsonProperty(JSON_PROPERTY_IMAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public File getImage() { + return image; + } + + public void setImage(File image) { + this.image = image; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return StegadographyGetWidgetsRequest + */ + @JsonAnySetter + public StegadographyGetWidgetsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this StegadographyGetWidgetsRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StegadographyGetWidgetsRequest stegadographyGetWidgetsRequest = + (StegadographyGetWidgetsRequest) o; + return Objects.equals(this.image, stegadographyGetWidgetsRequest.image) + && Objects.equals( + this.additionalProperties, stegadographyGetWidgetsRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(image, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StegadographyGetWidgetsRequest {\n"); + sb.append(" image: ").append(toIndentedString(image)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StegadographyGetWidgetsResponse.java b/src/main/java/com/datadog/api/client/v2/model/StegadographyGetWidgetsResponse.java new file mode 100644 index 00000000000..12ead50b9f0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StegadographyGetWidgetsResponse.java @@ -0,0 +1,156 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing watermarked widgets recovered from an image. */ +@JsonPropertyOrder({StegadographyGetWidgetsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StegadographyGetWidgetsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public StegadographyGetWidgetsResponse() {} + + @JsonCreator + public StegadographyGetWidgetsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) { + this.data = data; + } + + public StegadographyGetWidgetsResponse data(List data) { + this.data = data; + for (StegadographyWidget item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public StegadographyGetWidgetsResponse addDataItem(StegadographyWidget dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of watermarked widget resources recovered from an image. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return StegadographyGetWidgetsResponse + */ + @JsonAnySetter + public StegadographyGetWidgetsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this StegadographyGetWidgetsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StegadographyGetWidgetsResponse stegadographyGetWidgetsResponse = + (StegadographyGetWidgetsResponse) o; + return Objects.equals(this.data, stegadographyGetWidgetsResponse.data) + && Objects.equals( + this.additionalProperties, stegadographyGetWidgetsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StegadographyGetWidgetsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StegadographyWidget.java b/src/main/java/com/datadog/api/client/v2/model/StegadographyWidget.java new file mode 100644 index 00000000000..81f9b4e9c65 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StegadographyWidget.java @@ -0,0 +1,209 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A single watermarked widget resource recovered from an image. */ +@JsonPropertyOrder({ + StegadographyWidget.JSON_PROPERTY_ATTRIBUTES, + StegadographyWidget.JSON_PROPERTY_ID, + StegadographyWidget.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StegadographyWidget { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private StegadographyWidgetAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private StegadographyWidgetType type; + + public StegadographyWidget() {} + + @JsonCreator + public StegadographyWidget( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + StegadographyWidgetAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) StegadographyWidgetType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public StegadographyWidget attributes(StegadographyWidgetAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a watermarked widget recovered from an image. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StegadographyWidgetAttributes getAttributes() { + return attributes; + } + + public void setAttributes(StegadographyWidgetAttributes attributes) { + this.attributes = attributes; + } + + public StegadographyWidget id(String id) { + this.id = id; + return this; + } + + /** + * Composite identifier formed from the organization ID and watermark, separated by a colon. + * + * @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 StegadographyWidget type(StegadographyWidgetType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Stegadography widget resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public StegadographyWidgetType getType() { + return type; + } + + public void setType(StegadographyWidgetType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return StegadographyWidget + */ + @JsonAnySetter + public StegadographyWidget putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this StegadographyWidget object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StegadographyWidget stegadographyWidget = (StegadographyWidget) o; + return Objects.equals(this.attributes, stegadographyWidget.attributes) + && Objects.equals(this.id, stegadographyWidget.id) + && Objects.equals(this.type, stegadographyWidget.type) + && Objects.equals(this.additionalProperties, stegadographyWidget.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StegadographyWidget {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StegadographyWidgetAttributes.java b/src/main/java/com/datadog/api/client/v2/model/StegadographyWidgetAttributes.java new file mode 100644 index 00000000000..ef20b63f05b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StegadographyWidgetAttributes.java @@ -0,0 +1,230 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a watermarked widget recovered from an image. */ +@JsonPropertyOrder({ + StegadographyWidgetAttributes.JSON_PROPERTY_LOCATIONX, + StegadographyWidgetAttributes.JSON_PROPERTY_LOCATIONY, + StegadographyWidgetAttributes.JSON_PROPERTY_RAW_DATA, + StegadographyWidgetAttributes.JSON_PROPERTY_WATERMARK +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class StegadographyWidgetAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_LOCATIONX = "locationx"; + private Long locationx; + + public static final String JSON_PROPERTY_LOCATIONY = "locationy"; + private Long locationy; + + public static final String JSON_PROPERTY_RAW_DATA = "rawData"; + private String rawData; + + public static final String JSON_PROPERTY_WATERMARK = "watermark"; + private String watermark; + + public StegadographyWidgetAttributes() {} + + @JsonCreator + public StegadographyWidgetAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_LOCATIONX) Long locationx, + @JsonProperty(required = true, value = JSON_PROPERTY_LOCATIONY) Long locationy, + @JsonProperty(required = true, value = JSON_PROPERTY_RAW_DATA) String rawData, + @JsonProperty(required = true, value = JSON_PROPERTY_WATERMARK) String watermark) { + this.locationx = locationx; + this.locationy = locationy; + this.rawData = rawData; + this.watermark = watermark; + } + + public StegadographyWidgetAttributes locationx(Long locationx) { + this.locationx = locationx; + return this; + } + + /** + * Horizontal pixel coordinate where the watermark was found in the image. + * + * @return locationx + */ + @JsonProperty(JSON_PROPERTY_LOCATIONX) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getLocationx() { + return locationx; + } + + public void setLocationx(Long locationx) { + this.locationx = locationx; + } + + public StegadographyWidgetAttributes locationy(Long locationy) { + this.locationy = locationy; + return this; + } + + /** + * Vertical pixel coordinate where the watermark was found in the image. + * + * @return locationy + */ + @JsonProperty(JSON_PROPERTY_LOCATIONY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getLocationy() { + return locationy; + } + + public void setLocationy(Long locationy) { + this.locationy = locationy; + } + + public StegadographyWidgetAttributes rawData(String rawData) { + this.rawData = rawData; + return this; + } + + /** + * JSON-encoded string representing the widget state. + * + * @return rawData + */ + @JsonProperty(JSON_PROPERTY_RAW_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRawData() { + return rawData; + } + + public void setRawData(String rawData) { + this.rawData = rawData; + } + + public StegadographyWidgetAttributes watermark(String watermark) { + this.watermark = watermark; + return this; + } + + /** + * Hex-encoded watermark string identifying the widget. + * + * @return watermark + */ + @JsonProperty(JSON_PROPERTY_WATERMARK) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getWatermark() { + return watermark; + } + + public void setWatermark(String watermark) { + this.watermark = watermark; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return StegadographyWidgetAttributes + */ + @JsonAnySetter + public StegadographyWidgetAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this StegadographyWidgetAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StegadographyWidgetAttributes stegadographyWidgetAttributes = (StegadographyWidgetAttributes) o; + return Objects.equals(this.locationx, stegadographyWidgetAttributes.locationx) + && Objects.equals(this.locationy, stegadographyWidgetAttributes.locationy) + && Objects.equals(this.rawData, stegadographyWidgetAttributes.rawData) + && Objects.equals(this.watermark, stegadographyWidgetAttributes.watermark) + && Objects.equals( + this.additionalProperties, stegadographyWidgetAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(locationx, locationy, rawData, watermark, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StegadographyWidgetAttributes {\n"); + sb.append(" locationx: ").append(toIndentedString(locationx)).append("\n"); + sb.append(" locationy: ").append(toIndentedString(locationy)).append("\n"); + sb.append(" rawData: ").append(toIndentedString(rawData)).append("\n"); + sb.append(" watermark: ").append(toIndentedString(watermark)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/StegadographyWidgetType.java b/src/main/java/com/datadog/api/client/v2/model/StegadographyWidgetType.java new file mode 100644 index 00000000000..7381be45c82 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/StegadographyWidgetType.java @@ -0,0 +1,55 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Stegadography widget resource type. */ +@JsonSerialize(using = StegadographyWidgetType.StegadographyWidgetTypeSerializer.class) +public class StegadographyWidgetType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("widget")); + + public static final StegadographyWidgetType WIDGET = new StegadographyWidgetType("widget"); + + StegadographyWidgetType(String value) { + super(value, allowedValues); + } + + public static class StegadographyWidgetTypeSerializer + extends StdSerializer { + public StegadographyWidgetTypeSerializer(Class t) { + super(t); + } + + public StegadographyWidgetTypeSerializer() { + this(null); + } + + @Override + public void serialize( + StegadographyWidgetType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static StegadographyWidgetType fromValue(String value) { + return new StegadographyWidgetType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleAttributes.java b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleAttributes.java new file mode 100644 index 00000000000..419e3f72440 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleAttributes.java @@ -0,0 +1,410 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a tag indexing rule. */ +@JsonPropertyOrder({ + TagIndexingRuleAttributes.JSON_PROPERTY_CREATED_AT, + TagIndexingRuleAttributes.JSON_PROPERTY_CREATED_BY_HANDLE, + TagIndexingRuleAttributes.JSON_PROPERTY_EXCLUDE_TAGS_MODE, + TagIndexingRuleAttributes.JSON_PROPERTY_IGNORED_METRIC_NAME_MATCHES, + TagIndexingRuleAttributes.JSON_PROPERTY_METRIC_NAME_MATCHES, + TagIndexingRuleAttributes.JSON_PROPERTY_MODIFIED_AT, + TagIndexingRuleAttributes.JSON_PROPERTY_MODIFIED_BY_HANDLE, + TagIndexingRuleAttributes.JSON_PROPERTY_NAME, + TagIndexingRuleAttributes.JSON_PROPERTY_OPTIONS, + TagIndexingRuleAttributes.JSON_PROPERTY_RULE_ORDER, + TagIndexingRuleAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagIndexingRuleAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_CREATED_BY_HANDLE = "created_by_handle"; + private String createdByHandle; + + public static final String JSON_PROPERTY_EXCLUDE_TAGS_MODE = "exclude_tags_mode"; + private Boolean excludeTagsMode; + + public static final String JSON_PROPERTY_IGNORED_METRIC_NAME_MATCHES = + "ignored_metric_name_matches"; + private List ignoredMetricNameMatches = null; + + public static final String JSON_PROPERTY_METRIC_NAME_MATCHES = "metric_name_matches"; + private List metricNameMatches = null; + + public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; + private OffsetDateTime modifiedAt; + + public static final String JSON_PROPERTY_MODIFIED_BY_HANDLE = "modified_by_handle"; + private String modifiedByHandle; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_OPTIONS = "options"; + private TagIndexingRuleOptions options; + + public static final String JSON_PROPERTY_RULE_ORDER = "rule_order"; + private Long ruleOrder; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + /** + * Timestamp when the rule was created. + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + /** + * Handle of the user who created the rule. + * + * @return createdByHandle + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY_HANDLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCreatedByHandle() { + return createdByHandle; + } + + public TagIndexingRuleAttributes excludeTagsMode(Boolean excludeTagsMode) { + this.excludeTagsMode = excludeTagsMode; + return this; + } + + /** + * When true, the rule excludes the listed tags and indexes all others. When false (default), the + * rule includes only the listed tags. + * + * @return excludeTagsMode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXCLUDE_TAGS_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getExcludeTagsMode() { + return excludeTagsMode; + } + + public void setExcludeTagsMode(Boolean excludeTagsMode) { + this.excludeTagsMode = excludeTagsMode; + } + + public TagIndexingRuleAttributes ignoredMetricNameMatches(List ignoredMetricNameMatches) { + this.ignoredMetricNameMatches = ignoredMetricNameMatches; + return this; + } + + public TagIndexingRuleAttributes addIgnoredMetricNameMatchesItem( + String ignoredMetricNameMatchesItem) { + if (this.ignoredMetricNameMatches == null) { + this.ignoredMetricNameMatches = new ArrayList<>(); + } + this.ignoredMetricNameMatches.add(ignoredMetricNameMatchesItem); + return this; + } + + /** + * Metric name prefixes excluded from the rule's scope. + * + * @return ignoredMetricNameMatches + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IGNORED_METRIC_NAME_MATCHES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getIgnoredMetricNameMatches() { + return ignoredMetricNameMatches; + } + + public void setIgnoredMetricNameMatches(List ignoredMetricNameMatches) { + this.ignoredMetricNameMatches = ignoredMetricNameMatches; + } + + public TagIndexingRuleAttributes metricNameMatches(List metricNameMatches) { + this.metricNameMatches = metricNameMatches; + return this; + } + + public TagIndexingRuleAttributes addMetricNameMatchesItem(String metricNameMatchesItem) { + if (this.metricNameMatches == null) { + this.metricNameMatches = new ArrayList<>(); + } + this.metricNameMatches.add(metricNameMatchesItem); + return this; + } + + /** + * Metric name prefixes (glob patterns) this rule applies to. + * + * @return metricNameMatches + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC_NAME_MATCHES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getMetricNameMatches() { + return metricNameMatches; + } + + public void setMetricNameMatches(List metricNameMatches) { + this.metricNameMatches = metricNameMatches; + } + + /** + * Timestamp when the rule was last modified. + * + * @return modifiedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } + + /** + * Handle of the user who last modified the rule. + * + * @return modifiedByHandle + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODIFIED_BY_HANDLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getModifiedByHandle() { + return modifiedByHandle; + } + + public TagIndexingRuleAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Human-readable name for the rule. + * + * @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 TagIndexingRuleAttributes options(TagIndexingRuleOptions options) { + this.options = options; + this.unparsed |= options.unparsed; + return this; + } + + /** + * Versioned configuration options for a tag indexing rule. + * + * @return options + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TagIndexingRuleOptions getOptions() { + return options; + } + + public void setOptions(TagIndexingRuleOptions options) { + this.options = options; + } + + /** + * Evaluation order within the org. Lower values are evaluated first. Assigned server-side on + * create (max+1); pass on update to change the rule's position. + * + * @return ruleOrder + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RULE_ORDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getRuleOrder() { + return ruleOrder; + } + + public TagIndexingRuleAttributes tags(List tags) { + this.tags = tags; + return this; + } + + public TagIndexingRuleAttributes addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Tag keys managed by this rule. + * + * @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; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagIndexingRuleAttributes + */ + @JsonAnySetter + public TagIndexingRuleAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagIndexingRuleAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagIndexingRuleAttributes tagIndexingRuleAttributes = (TagIndexingRuleAttributes) o; + return Objects.equals(this.createdAt, tagIndexingRuleAttributes.createdAt) + && Objects.equals(this.createdByHandle, tagIndexingRuleAttributes.createdByHandle) + && Objects.equals(this.excludeTagsMode, tagIndexingRuleAttributes.excludeTagsMode) + && Objects.equals( + this.ignoredMetricNameMatches, tagIndexingRuleAttributes.ignoredMetricNameMatches) + && Objects.equals(this.metricNameMatches, tagIndexingRuleAttributes.metricNameMatches) + && Objects.equals(this.modifiedAt, tagIndexingRuleAttributes.modifiedAt) + && Objects.equals(this.modifiedByHandle, tagIndexingRuleAttributes.modifiedByHandle) + && Objects.equals(this.name, tagIndexingRuleAttributes.name) + && Objects.equals(this.options, tagIndexingRuleAttributes.options) + && Objects.equals(this.ruleOrder, tagIndexingRuleAttributes.ruleOrder) + && Objects.equals(this.tags, tagIndexingRuleAttributes.tags) + && Objects.equals( + this.additionalProperties, tagIndexingRuleAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + createdByHandle, + excludeTagsMode, + ignoredMetricNameMatches, + metricNameMatches, + modifiedAt, + modifiedByHandle, + name, + options, + ruleOrder, + tags, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagIndexingRuleAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" createdByHandle: ").append(toIndentedString(createdByHandle)).append("\n"); + sb.append(" excludeTagsMode: ").append(toIndentedString(excludeTagsMode)).append("\n"); + sb.append(" ignoredMetricNameMatches: ") + .append(toIndentedString(ignoredMetricNameMatches)) + .append("\n"); + sb.append(" metricNameMatches: ").append(toIndentedString(metricNameMatches)).append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append(" modifiedByHandle: ").append(toIndentedString(modifiedByHandle)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" options: ").append(toIndentedString(options)).append("\n"); + sb.append(" ruleOrder: ").append(toIndentedString(ruleOrder)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleCreateAttributes.java new file mode 100644 index 00000000000..01bb1208c49 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleCreateAttributes.java @@ -0,0 +1,322 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes for creating a tag indexing rule. */ +@JsonPropertyOrder({ + TagIndexingRuleCreateAttributes.JSON_PROPERTY_EXCLUDE_TAGS_MODE, + TagIndexingRuleCreateAttributes.JSON_PROPERTY_IGNORED_METRIC_NAME_MATCHES, + TagIndexingRuleCreateAttributes.JSON_PROPERTY_METRIC_NAME_MATCHES, + TagIndexingRuleCreateAttributes.JSON_PROPERTY_NAME, + TagIndexingRuleCreateAttributes.JSON_PROPERTY_OPTIONS, + TagIndexingRuleCreateAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagIndexingRuleCreateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EXCLUDE_TAGS_MODE = "exclude_tags_mode"; + private Boolean excludeTagsMode; + + public static final String JSON_PROPERTY_IGNORED_METRIC_NAME_MATCHES = + "ignored_metric_name_matches"; + private List ignoredMetricNameMatches = null; + + public static final String JSON_PROPERTY_METRIC_NAME_MATCHES = "metric_name_matches"; + private List metricNameMatches = new ArrayList<>(); + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_OPTIONS = "options"; + private TagIndexingRuleOptions options; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + public TagIndexingRuleCreateAttributes() {} + + @JsonCreator + public TagIndexingRuleCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_METRIC_NAME_MATCHES) + List metricNameMatches, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { + this.metricNameMatches = metricNameMatches; + this.name = name; + } + + public TagIndexingRuleCreateAttributes excludeTagsMode(Boolean excludeTagsMode) { + this.excludeTagsMode = excludeTagsMode; + return this; + } + + /** + * When true, the rule excludes the listed tags and indexes all others. When false (default), the + * rule includes only the listed tags. + * + * @return excludeTagsMode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXCLUDE_TAGS_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getExcludeTagsMode() { + return excludeTagsMode; + } + + public void setExcludeTagsMode(Boolean excludeTagsMode) { + this.excludeTagsMode = excludeTagsMode; + } + + public TagIndexingRuleCreateAttributes ignoredMetricNameMatches( + List ignoredMetricNameMatches) { + this.ignoredMetricNameMatches = ignoredMetricNameMatches; + return this; + } + + public TagIndexingRuleCreateAttributes addIgnoredMetricNameMatchesItem( + String ignoredMetricNameMatchesItem) { + if (this.ignoredMetricNameMatches == null) { + this.ignoredMetricNameMatches = new ArrayList<>(); + } + this.ignoredMetricNameMatches.add(ignoredMetricNameMatchesItem); + return this; + } + + /** + * Metric name prefixes excluded from the rule's scope. + * + * @return ignoredMetricNameMatches + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IGNORED_METRIC_NAME_MATCHES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getIgnoredMetricNameMatches() { + return ignoredMetricNameMatches; + } + + public void setIgnoredMetricNameMatches(List ignoredMetricNameMatches) { + this.ignoredMetricNameMatches = ignoredMetricNameMatches; + } + + public TagIndexingRuleCreateAttributes metricNameMatches(List metricNameMatches) { + this.metricNameMatches = metricNameMatches; + return this; + } + + public TagIndexingRuleCreateAttributes addMetricNameMatchesItem(String metricNameMatchesItem) { + this.metricNameMatches.add(metricNameMatchesItem); + return this; + } + + /** + * Metric name prefixes (glob patterns) this rule applies to. + * + * @return metricNameMatches + */ + @JsonProperty(JSON_PROPERTY_METRIC_NAME_MATCHES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getMetricNameMatches() { + return metricNameMatches; + } + + public void setMetricNameMatches(List metricNameMatches) { + this.metricNameMatches = metricNameMatches; + } + + public TagIndexingRuleCreateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Human-readable name for the rule. + * + * @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 TagIndexingRuleCreateAttributes options(TagIndexingRuleOptions options) { + this.options = options; + this.unparsed |= options.unparsed; + return this; + } + + /** + * Versioned configuration options for a tag indexing rule. + * + * @return options + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TagIndexingRuleOptions getOptions() { + return options; + } + + public void setOptions(TagIndexingRuleOptions options) { + this.options = options; + } + + public TagIndexingRuleCreateAttributes tags(List tags) { + this.tags = tags; + return this; + } + + public TagIndexingRuleCreateAttributes addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Tag keys managed by this rule. + * + * @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; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagIndexingRuleCreateAttributes + */ + @JsonAnySetter + public TagIndexingRuleCreateAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagIndexingRuleCreateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagIndexingRuleCreateAttributes tagIndexingRuleCreateAttributes = + (TagIndexingRuleCreateAttributes) o; + return Objects.equals(this.excludeTagsMode, tagIndexingRuleCreateAttributes.excludeTagsMode) + && Objects.equals( + this.ignoredMetricNameMatches, tagIndexingRuleCreateAttributes.ignoredMetricNameMatches) + && Objects.equals(this.metricNameMatches, tagIndexingRuleCreateAttributes.metricNameMatches) + && Objects.equals(this.name, tagIndexingRuleCreateAttributes.name) + && Objects.equals(this.options, tagIndexingRuleCreateAttributes.options) + && Objects.equals(this.tags, tagIndexingRuleCreateAttributes.tags) + && Objects.equals( + this.additionalProperties, tagIndexingRuleCreateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + excludeTagsMode, + ignoredMetricNameMatches, + metricNameMatches, + name, + options, + tags, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagIndexingRuleCreateAttributes {\n"); + sb.append(" excludeTagsMode: ").append(toIndentedString(excludeTagsMode)).append("\n"); + sb.append(" ignoredMetricNameMatches: ") + .append(toIndentedString(ignoredMetricNameMatches)) + .append("\n"); + sb.append(" metricNameMatches: ").append(toIndentedString(metricNameMatches)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" options: ").append(toIndentedString(options)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleCreateData.java b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleCreateData.java new file mode 100644 index 00000000000..5bd84b359b7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleCreateData.java @@ -0,0 +1,182 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object for creating a tag indexing rule. */ +@JsonPropertyOrder({ + TagIndexingRuleCreateData.JSON_PROPERTY_ATTRIBUTES, + TagIndexingRuleCreateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagIndexingRuleCreateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private TagIndexingRuleCreateAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private TagIndexingRuleType type = TagIndexingRuleType.TAG_INDEXING_RULES; + + public TagIndexingRuleCreateData() {} + + @JsonCreator + public TagIndexingRuleCreateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + TagIndexingRuleCreateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) TagIndexingRuleType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public TagIndexingRuleCreateData attributes(TagIndexingRuleCreateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating a tag indexing rule. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TagIndexingRuleCreateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(TagIndexingRuleCreateAttributes attributes) { + this.attributes = attributes; + } + + public TagIndexingRuleCreateData type(TagIndexingRuleType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The tag indexing rule resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TagIndexingRuleType getType() { + return type; + } + + public void setType(TagIndexingRuleType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagIndexingRuleCreateData + */ + @JsonAnySetter + public TagIndexingRuleCreateData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagIndexingRuleCreateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagIndexingRuleCreateData tagIndexingRuleCreateData = (TagIndexingRuleCreateData) o; + return Objects.equals(this.attributes, tagIndexingRuleCreateData.attributes) + && Objects.equals(this.type, tagIndexingRuleCreateData.type) + && Objects.equals( + this.additionalProperties, tagIndexingRuleCreateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagIndexingRuleCreateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleCreateRequest.java similarity index 78% rename from src/main/java/com/datadog/api/client/v2/model/IncidentServiceUpdateRequest.java rename to src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleCreateRequest.java index f0755dcb513..b72b9e18041 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceUpdateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleCreateRequest.java @@ -17,42 +17,42 @@ import java.util.Map; import java.util.Objects; -/** Update request with an incident service payload. */ -@JsonPropertyOrder({IncidentServiceUpdateRequest.JSON_PROPERTY_DATA}) +/** Request body for creating a tag indexing rule. */ +@JsonPropertyOrder({TagIndexingRuleCreateRequest.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class IncidentServiceUpdateRequest { +public class TagIndexingRuleCreateRequest { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private IncidentServiceUpdateData data; + private TagIndexingRuleCreateData data; - public IncidentServiceUpdateRequest() {} + public TagIndexingRuleCreateRequest() {} @JsonCreator - public IncidentServiceUpdateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) IncidentServiceUpdateData data) { + public TagIndexingRuleCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) TagIndexingRuleCreateData data) { this.data = data; this.unparsed |= data.unparsed; } - public IncidentServiceUpdateRequest data(IncidentServiceUpdateData data) { + public TagIndexingRuleCreateRequest data(TagIndexingRuleCreateData data) { this.data = data; this.unparsed |= data.unparsed; return this; } /** - * Incident Service payload for update requests. + * Data object for creating a tag indexing rule. * * @return data */ @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentServiceUpdateData getData() { + public TagIndexingRuleCreateData getData() { return data; } - public void setData(IncidentServiceUpdateData data) { + public void setData(TagIndexingRuleCreateData data) { this.data = data; } @@ -68,10 +68,10 @@ public void setData(IncidentServiceUpdateData data) { * * @param key The arbitrary key to set * @param value The associated value - * @return IncidentServiceUpdateRequest + * @return TagIndexingRuleCreateRequest */ @JsonAnySetter - public IncidentServiceUpdateRequest putAdditionalProperty(String key, Object value) { + public TagIndexingRuleCreateRequest putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -102,7 +102,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this IncidentServiceUpdateRequest object is equal to o. */ + /** Return true if this TagIndexingRuleCreateRequest object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -111,10 +111,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentServiceUpdateRequest incidentServiceUpdateRequest = (IncidentServiceUpdateRequest) o; - return Objects.equals(this.data, incidentServiceUpdateRequest.data) + TagIndexingRuleCreateRequest tagIndexingRuleCreateRequest = (TagIndexingRuleCreateRequest) o; + return Objects.equals(this.data, tagIndexingRuleCreateRequest.data) && Objects.equals( - this.additionalProperties, incidentServiceUpdateRequest.additionalProperties); + this.additionalProperties, tagIndexingRuleCreateRequest.additionalProperties); } @Override @@ -125,7 +125,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class IncidentServiceUpdateRequest {\n"); + sb.append("class TagIndexingRuleCreateRequest {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleData.java b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleData.java new file mode 100644 index 00000000000..3e42d9a6a54 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleData.java @@ -0,0 +1,196 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A tag indexing rule resource object. */ +@JsonPropertyOrder({ + TagIndexingRuleData.JSON_PROPERTY_ATTRIBUTES, + TagIndexingRuleData.JSON_PROPERTY_ID, + TagIndexingRuleData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagIndexingRuleData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private TagIndexingRuleAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private TagIndexingRuleType type = TagIndexingRuleType.TAG_INDEXING_RULES; + + public TagIndexingRuleData attributes(TagIndexingRuleAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a tag indexing rule. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TagIndexingRuleAttributes getAttributes() { + return attributes; + } + + public void setAttributes(TagIndexingRuleAttributes attributes) { + this.attributes = attributes; + } + + public TagIndexingRuleData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier (UUID) of the tag indexing rule. + * + * @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 TagIndexingRuleData type(TagIndexingRuleType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The tag indexing rule resource type. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TagIndexingRuleType getType() { + return type; + } + + public void setType(TagIndexingRuleType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagIndexingRuleData + */ + @JsonAnySetter + public TagIndexingRuleData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagIndexingRuleData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagIndexingRuleData tagIndexingRuleData = (TagIndexingRuleData) o; + return Objects.equals(this.attributes, tagIndexingRuleData.attributes) + && Objects.equals(this.id, tagIndexingRuleData.id) + && Objects.equals(this.type, tagIndexingRuleData.type) + && Objects.equals(this.additionalProperties, tagIndexingRuleData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagIndexingRuleData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleDynamicTags.java b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleDynamicTags.java new file mode 100644 index 00000000000..5f391515de3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleDynamicTags.java @@ -0,0 +1,169 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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; + +/** Configuration for including dynamically queried tags. */ +@JsonPropertyOrder({ + TagIndexingRuleDynamicTags.JSON_PROPERTY_QUERIED_TAGS_WINDOW_SECONDS, + TagIndexingRuleDynamicTags.JSON_PROPERTY_RELATED_ASSET_TAGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagIndexingRuleDynamicTags { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_QUERIED_TAGS_WINDOW_SECONDS = + "queried_tags_window_seconds"; + private Long queriedTagsWindowSeconds; + + public static final String JSON_PROPERTY_RELATED_ASSET_TAGS = "related_asset_tags"; + private Boolean relatedAssetTags; + + public TagIndexingRuleDynamicTags queriedTagsWindowSeconds(Long queriedTagsWindowSeconds) { + this.queriedTagsWindowSeconds = queriedTagsWindowSeconds; + return this; + } + + /** + * Window in seconds for evaluating queried tags. + * + * @return queriedTagsWindowSeconds + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERIED_TAGS_WINDOW_SECONDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getQueriedTagsWindowSeconds() { + return queriedTagsWindowSeconds; + } + + public void setQueriedTagsWindowSeconds(Long queriedTagsWindowSeconds) { + this.queriedTagsWindowSeconds = queriedTagsWindowSeconds; + } + + public TagIndexingRuleDynamicTags relatedAssetTags(Boolean relatedAssetTags) { + this.relatedAssetTags = relatedAssetTags; + return this; + } + + /** + * When true, tags from related assets are included. + * + * @return relatedAssetTags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATED_ASSET_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRelatedAssetTags() { + return relatedAssetTags; + } + + public void setRelatedAssetTags(Boolean relatedAssetTags) { + this.relatedAssetTags = relatedAssetTags; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagIndexingRuleDynamicTags + */ + @JsonAnySetter + public TagIndexingRuleDynamicTags putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagIndexingRuleDynamicTags object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagIndexingRuleDynamicTags tagIndexingRuleDynamicTags = (TagIndexingRuleDynamicTags) o; + return Objects.equals( + this.queriedTagsWindowSeconds, tagIndexingRuleDynamicTags.queriedTagsWindowSeconds) + && Objects.equals(this.relatedAssetTags, tagIndexingRuleDynamicTags.relatedAssetTags) + && Objects.equals( + this.additionalProperties, tagIndexingRuleDynamicTags.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(queriedTagsWindowSeconds, relatedAssetTags, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagIndexingRuleDynamicTags {\n"); + sb.append(" queriedTagsWindowSeconds: ") + .append(toIndentedString(queriedTagsWindowSeconds)) + .append("\n"); + sb.append(" relatedAssetTags: ").append(toIndentedString(relatedAssetTags)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleExemptionAttributes.java b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleExemptionAttributes.java new file mode 100644 index 00000000000..e8aa59e7422 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleExemptionAttributes.java @@ -0,0 +1,204 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a tag indexing rule exemption. */ +@JsonPropertyOrder({ + TagIndexingRuleExemptionAttributes.JSON_PROPERTY_CREATED_AT, + TagIndexingRuleExemptionAttributes.JSON_PROPERTY_CREATED_BY_HANDLE, + TagIndexingRuleExemptionAttributes.JSON_PROPERTY_KIND, + TagIndexingRuleExemptionAttributes.JSON_PROPERTY_REASON +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagIndexingRuleExemptionAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_CREATED_BY_HANDLE = "created_by_handle"; + private String createdByHandle; + + public static final String JSON_PROPERTY_KIND = "kind"; + private String kind; + + public static final String JSON_PROPERTY_REASON = "reason"; + private String reason; + + /** + * Timestamp when the exemption was created. + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + /** + * Handle of the user who created the exemption. + * + * @return createdByHandle + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_BY_HANDLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCreatedByHandle() { + return createdByHandle; + } + + public TagIndexingRuleExemptionAttributes kind(String kind) { + this.kind = kind; + return this; + } + + /** + * Discriminates between an explicit exemption (exemption) and a pre-existing legacy + * tag configuration acting as an implicit exclusion (legacy_tag_configuration). + * + * @return kind + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KIND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getKind() { + return kind; + } + + public void setKind(String kind) { + this.kind = kind; + } + + public TagIndexingRuleExemptionAttributes reason(String reason) { + this.reason = reason; + return this; + } + + /** + * The reason the metric is exempt from tag indexing rules. + * + * @return reason + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getReason() { + return reason; + } + + public void setReason(String reason) { + this.reason = reason; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagIndexingRuleExemptionAttributes + */ + @JsonAnySetter + public TagIndexingRuleExemptionAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagIndexingRuleExemptionAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagIndexingRuleExemptionAttributes tagIndexingRuleExemptionAttributes = + (TagIndexingRuleExemptionAttributes) o; + return Objects.equals(this.createdAt, tagIndexingRuleExemptionAttributes.createdAt) + && Objects.equals(this.createdByHandle, tagIndexingRuleExemptionAttributes.createdByHandle) + && Objects.equals(this.kind, tagIndexingRuleExemptionAttributes.kind) + && Objects.equals(this.reason, tagIndexingRuleExemptionAttributes.reason) + && Objects.equals( + this.additionalProperties, tagIndexingRuleExemptionAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, createdByHandle, kind, reason, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagIndexingRuleExemptionAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" createdByHandle: ").append(toIndentedString(createdByHandle)).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleExemptionCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleExemptionCreateAttributes.java new file mode 100644 index 00000000000..f4f50ca556b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleExemptionCreateAttributes.java @@ -0,0 +1,146 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes for creating a tag indexing rule exemption. */ +@JsonPropertyOrder({TagIndexingRuleExemptionCreateAttributes.JSON_PROPERTY_REASON}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagIndexingRuleExemptionCreateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_REASON = "reason"; + private String reason; + + public TagIndexingRuleExemptionCreateAttributes() {} + + @JsonCreator + public TagIndexingRuleExemptionCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_REASON) String reason) { + this.reason = reason; + } + + public TagIndexingRuleExemptionCreateAttributes reason(String reason) { + this.reason = reason; + return this; + } + + /** + * The reason the metric is exempt from tag indexing rules. + * + * @return reason + */ + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getReason() { + return reason; + } + + public void setReason(String reason) { + this.reason = reason; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagIndexingRuleExemptionCreateAttributes + */ + @JsonAnySetter + public TagIndexingRuleExemptionCreateAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagIndexingRuleExemptionCreateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagIndexingRuleExemptionCreateAttributes tagIndexingRuleExemptionCreateAttributes = + (TagIndexingRuleExemptionCreateAttributes) o; + return Objects.equals(this.reason, tagIndexingRuleExemptionCreateAttributes.reason) + && Objects.equals( + this.additionalProperties, + tagIndexingRuleExemptionCreateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(reason, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagIndexingRuleExemptionCreateAttributes {\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleExemptionCreateData.java b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleExemptionCreateData.java new file mode 100644 index 00000000000..9253b446aac --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleExemptionCreateData.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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.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; + +/** Data object for creating a tag indexing rule exemption. */ +@JsonPropertyOrder({ + TagIndexingRuleExemptionCreateData.JSON_PROPERTY_ATTRIBUTES, + TagIndexingRuleExemptionCreateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagIndexingRuleExemptionCreateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private TagIndexingRuleExemptionCreateAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private TagIndexingRuleExemptionType type = + TagIndexingRuleExemptionType.TAG_INDEXING_RULE_EXEMPTIONS; + + public TagIndexingRuleExemptionCreateData() {} + + @JsonCreator + public TagIndexingRuleExemptionCreateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + TagIndexingRuleExemptionCreateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + TagIndexingRuleExemptionType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public TagIndexingRuleExemptionCreateData attributes( + TagIndexingRuleExemptionCreateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating a tag indexing rule exemption. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TagIndexingRuleExemptionCreateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(TagIndexingRuleExemptionCreateAttributes attributes) { + this.attributes = attributes; + } + + public TagIndexingRuleExemptionCreateData type(TagIndexingRuleExemptionType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The tag indexing rule exemption resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TagIndexingRuleExemptionType getType() { + return type; + } + + public void setType(TagIndexingRuleExemptionType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagIndexingRuleExemptionCreateData + */ + @JsonAnySetter + public TagIndexingRuleExemptionCreateData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagIndexingRuleExemptionCreateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagIndexingRuleExemptionCreateData tagIndexingRuleExemptionCreateData = + (TagIndexingRuleExemptionCreateData) o; + return Objects.equals(this.attributes, tagIndexingRuleExemptionCreateData.attributes) + && Objects.equals(this.type, tagIndexingRuleExemptionCreateData.type) + && Objects.equals( + this.additionalProperties, tagIndexingRuleExemptionCreateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagIndexingRuleExemptionCreateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleExemptionCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleExemptionCreateRequest.java new file mode 100644 index 00000000000..bf66e8dbf68 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleExemptionCreateRequest.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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request body for creating a tag indexing rule exemption. */ +@JsonPropertyOrder({TagIndexingRuleExemptionCreateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagIndexingRuleExemptionCreateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private TagIndexingRuleExemptionCreateData data; + + public TagIndexingRuleExemptionCreateRequest() {} + + @JsonCreator + public TagIndexingRuleExemptionCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + TagIndexingRuleExemptionCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public TagIndexingRuleExemptionCreateRequest data(TagIndexingRuleExemptionCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for creating a tag indexing rule exemption. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TagIndexingRuleExemptionCreateData getData() { + return data; + } + + public void setData(TagIndexingRuleExemptionCreateData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagIndexingRuleExemptionCreateRequest + */ + @JsonAnySetter + public TagIndexingRuleExemptionCreateRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagIndexingRuleExemptionCreateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagIndexingRuleExemptionCreateRequest tagIndexingRuleExemptionCreateRequest = + (TagIndexingRuleExemptionCreateRequest) o; + return Objects.equals(this.data, tagIndexingRuleExemptionCreateRequest.data) + && Objects.equals( + this.additionalProperties, tagIndexingRuleExemptionCreateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagIndexingRuleExemptionCreateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleExemptionData.java b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleExemptionData.java new file mode 100644 index 00000000000..01858f4d8dd --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleExemptionData.java @@ -0,0 +1,198 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A tag indexing rule exemption resource object. */ +@JsonPropertyOrder({ + TagIndexingRuleExemptionData.JSON_PROPERTY_ATTRIBUTES, + TagIndexingRuleExemptionData.JSON_PROPERTY_ID, + TagIndexingRuleExemptionData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagIndexingRuleExemptionData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private TagIndexingRuleExemptionAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private TagIndexingRuleExemptionType type = + TagIndexingRuleExemptionType.TAG_INDEXING_RULE_EXEMPTIONS; + + public TagIndexingRuleExemptionData attributes(TagIndexingRuleExemptionAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a tag indexing rule exemption. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TagIndexingRuleExemptionAttributes getAttributes() { + return attributes; + } + + public void setAttributes(TagIndexingRuleExemptionAttributes attributes) { + this.attributes = attributes; + } + + public TagIndexingRuleExemptionData id(String id) { + this.id = id; + return this; + } + + /** + * The metric name, used as the resource ID. + * + * @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 TagIndexingRuleExemptionData type(TagIndexingRuleExemptionType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The tag indexing rule exemption resource type. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TagIndexingRuleExemptionType getType() { + return type; + } + + public void setType(TagIndexingRuleExemptionType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagIndexingRuleExemptionData + */ + @JsonAnySetter + public TagIndexingRuleExemptionData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagIndexingRuleExemptionData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagIndexingRuleExemptionData tagIndexingRuleExemptionData = (TagIndexingRuleExemptionData) o; + return Objects.equals(this.attributes, tagIndexingRuleExemptionData.attributes) + && Objects.equals(this.id, tagIndexingRuleExemptionData.id) + && Objects.equals(this.type, tagIndexingRuleExemptionData.type) + && Objects.equals( + this.additionalProperties, tagIndexingRuleExemptionData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagIndexingRuleExemptionData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleExemptionResponse.java b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleExemptionResponse.java new file mode 100644 index 00000000000..bd4a02a69c7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleExemptionResponse.java @@ -0,0 +1,138 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing a tag indexing rule exemption. */ +@JsonPropertyOrder({TagIndexingRuleExemptionResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagIndexingRuleExemptionResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private TagIndexingRuleExemptionData data; + + public TagIndexingRuleExemptionResponse data(TagIndexingRuleExemptionData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * A tag indexing rule exemption resource object. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TagIndexingRuleExemptionData getData() { + return data; + } + + public void setData(TagIndexingRuleExemptionData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagIndexingRuleExemptionResponse + */ + @JsonAnySetter + public TagIndexingRuleExemptionResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagIndexingRuleExemptionResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagIndexingRuleExemptionResponse tagIndexingRuleExemptionResponse = + (TagIndexingRuleExemptionResponse) o; + return Objects.equals(this.data, tagIndexingRuleExemptionResponse.data) + && Objects.equals( + this.additionalProperties, tagIndexingRuleExemptionResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagIndexingRuleExemptionResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleExemptionType.java b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleExemptionType.java new file mode 100644 index 00000000000..92a9e76685d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleExemptionType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The tag indexing rule exemption resource type. */ +@JsonSerialize(using = TagIndexingRuleExemptionType.TagIndexingRuleExemptionTypeSerializer.class) +public class TagIndexingRuleExemptionType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("tag_indexing_rule_exemptions")); + + public static final TagIndexingRuleExemptionType TAG_INDEXING_RULE_EXEMPTIONS = + new TagIndexingRuleExemptionType("tag_indexing_rule_exemptions"); + + TagIndexingRuleExemptionType(String value) { + super(value, allowedValues); + } + + public static class TagIndexingRuleExemptionTypeSerializer + extends StdSerializer { + public TagIndexingRuleExemptionTypeSerializer(Class t) { + super(t); + } + + public TagIndexingRuleExemptionTypeSerializer() { + this(null); + } + + @Override + public void serialize( + TagIndexingRuleExemptionType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static TagIndexingRuleExemptionType fromValue(String value) { + return new TagIndexingRuleExemptionType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleMetricMatch.java b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleMetricMatch.java new file mode 100644 index 00000000000..ee1dc1d06f3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleMetricMatch.java @@ -0,0 +1,255 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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; + +/** Criteria for matching metrics based on query state. */ +@JsonPropertyOrder({ + TagIndexingRuleMetricMatch.JSON_PROPERTY_IS_QUERIED, + TagIndexingRuleMetricMatch.JSON_PROPERTY_NOT_QUERIED, + TagIndexingRuleMetricMatch.JSON_PROPERTY_NOT_USED_IN_ASSETS, + TagIndexingRuleMetricMatch.JSON_PROPERTY_QUERIED_WINDOW_SECONDS, + TagIndexingRuleMetricMatch.JSON_PROPERTY_USED_IN_ASSETS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagIndexingRuleMetricMatch { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_IS_QUERIED = "is_queried"; + private Boolean isQueried; + + public static final String JSON_PROPERTY_NOT_QUERIED = "not_queried"; + private Boolean notQueried; + + public static final String JSON_PROPERTY_NOT_USED_IN_ASSETS = "not_used_in_assets"; + private Boolean notUsedInAssets; + + public static final String JSON_PROPERTY_QUERIED_WINDOW_SECONDS = "queried_window_seconds"; + private Long queriedWindowSeconds; + + public static final String JSON_PROPERTY_USED_IN_ASSETS = "used_in_assets"; + private Boolean usedInAssets; + + public TagIndexingRuleMetricMatch isQueried(Boolean isQueried) { + this.isQueried = isQueried; + return this; + } + + /** + * Match metrics that are being queried. + * + * @return isQueried + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_QUERIED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsQueried() { + return isQueried; + } + + public void setIsQueried(Boolean isQueried) { + this.isQueried = isQueried; + } + + public TagIndexingRuleMetricMatch notQueried(Boolean notQueried) { + this.notQueried = notQueried; + return this; + } + + /** + * Match metrics that are not being queried. + * + * @return notQueried + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOT_QUERIED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getNotQueried() { + return notQueried; + } + + public void setNotQueried(Boolean notQueried) { + this.notQueried = notQueried; + } + + public TagIndexingRuleMetricMatch notUsedInAssets(Boolean notUsedInAssets) { + this.notUsedInAssets = notUsedInAssets; + return this; + } + + /** + * Match metrics not used in any dashboards or monitors. + * + * @return notUsedInAssets + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NOT_USED_IN_ASSETS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getNotUsedInAssets() { + return notUsedInAssets; + } + + public void setNotUsedInAssets(Boolean notUsedInAssets) { + this.notUsedInAssets = notUsedInAssets; + } + + public TagIndexingRuleMetricMatch queriedWindowSeconds(Long queriedWindowSeconds) { + this.queriedWindowSeconds = queriedWindowSeconds; + return this; + } + + /** + * Window in seconds for evaluating query state. + * + * @return queriedWindowSeconds + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERIED_WINDOW_SECONDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getQueriedWindowSeconds() { + return queriedWindowSeconds; + } + + public void setQueriedWindowSeconds(Long queriedWindowSeconds) { + this.queriedWindowSeconds = queriedWindowSeconds; + } + + public TagIndexingRuleMetricMatch usedInAssets(Boolean usedInAssets) { + this.usedInAssets = usedInAssets; + return this; + } + + /** + * Match metrics used in dashboards or monitors. + * + * @return usedInAssets + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USED_IN_ASSETS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getUsedInAssets() { + return usedInAssets; + } + + public void setUsedInAssets(Boolean usedInAssets) { + this.usedInAssets = usedInAssets; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagIndexingRuleMetricMatch + */ + @JsonAnySetter + public TagIndexingRuleMetricMatch putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagIndexingRuleMetricMatch object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagIndexingRuleMetricMatch tagIndexingRuleMetricMatch = (TagIndexingRuleMetricMatch) o; + return Objects.equals(this.isQueried, tagIndexingRuleMetricMatch.isQueried) + && Objects.equals(this.notQueried, tagIndexingRuleMetricMatch.notQueried) + && Objects.equals(this.notUsedInAssets, tagIndexingRuleMetricMatch.notUsedInAssets) + && Objects.equals( + this.queriedWindowSeconds, tagIndexingRuleMetricMatch.queriedWindowSeconds) + && Objects.equals(this.usedInAssets, tagIndexingRuleMetricMatch.usedInAssets) + && Objects.equals( + this.additionalProperties, tagIndexingRuleMetricMatch.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + isQueried, + notQueried, + notUsedInAssets, + queriedWindowSeconds, + usedInAssets, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagIndexingRuleMetricMatch {\n"); + sb.append(" isQueried: ").append(toIndentedString(isQueried)).append("\n"); + sb.append(" notQueried: ").append(toIndentedString(notQueried)).append("\n"); + sb.append(" notUsedInAssets: ").append(toIndentedString(notUsedInAssets)).append("\n"); + sb.append(" queriedWindowSeconds: ") + .append(toIndentedString(queriedWindowSeconds)) + .append("\n"); + sb.append(" usedInAssets: ").append(toIndentedString(usedInAssets)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleOptions.java b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleOptions.java new file mode 100644 index 00000000000..e78c343c62a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleOptions.java @@ -0,0 +1,165 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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; + +/** Versioned configuration options for a tag indexing rule. */ +@JsonPropertyOrder({ + TagIndexingRuleOptions.JSON_PROPERTY_DATA, + TagIndexingRuleOptions.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagIndexingRuleOptions { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private TagIndexingRuleOptionsData data; + + public static final String JSON_PROPERTY_VERSION = "version"; + private Long version; + + public TagIndexingRuleOptions data(TagIndexingRuleOptionsData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data payload for tag indexing rule options. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TagIndexingRuleOptionsData getData() { + return data; + } + + public void setData(TagIndexingRuleOptionsData data) { + this.data = data; + } + + public TagIndexingRuleOptions version(Long version) { + this.version = version; + return this; + } + + /** + * Options schema version. Only 1 is supported. + * + * @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; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagIndexingRuleOptions + */ + @JsonAnySetter + public TagIndexingRuleOptions putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagIndexingRuleOptions object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagIndexingRuleOptions tagIndexingRuleOptions = (TagIndexingRuleOptions) o; + return Objects.equals(this.data, tagIndexingRuleOptions.data) + && Objects.equals(this.version, tagIndexingRuleOptions.version) + && Objects.equals(this.additionalProperties, tagIndexingRuleOptions.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, version, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagIndexingRuleOptions {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleOptionsData.java b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleOptionsData.java new file mode 100644 index 00000000000..fb632b90887 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleOptionsData.java @@ -0,0 +1,234 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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; + +/** Data payload for tag indexing rule options. */ +@JsonPropertyOrder({ + TagIndexingRuleOptionsData.JSON_PROPERTY_DYNAMIC_TAGS, + TagIndexingRuleOptionsData.JSON_PROPERTY_MANAGE_PREEXISTING_METRICS, + TagIndexingRuleOptionsData.JSON_PROPERTY_METRIC_MATCH, + TagIndexingRuleOptionsData.JSON_PROPERTY_OVERRIDE_PREVIOUS_RULES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagIndexingRuleOptionsData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DYNAMIC_TAGS = "dynamic_tags"; + private TagIndexingRuleDynamicTags dynamicTags; + + public static final String JSON_PROPERTY_MANAGE_PREEXISTING_METRICS = + "manage_preexisting_metrics"; + private Boolean managePreexistingMetrics; + + public static final String JSON_PROPERTY_METRIC_MATCH = "metric_match"; + private TagIndexingRuleMetricMatch metricMatch; + + public static final String JSON_PROPERTY_OVERRIDE_PREVIOUS_RULES = "override_previous_rules"; + private Boolean overridePreviousRules; + + public TagIndexingRuleOptionsData dynamicTags(TagIndexingRuleDynamicTags dynamicTags) { + this.dynamicTags = dynamicTags; + this.unparsed |= dynamicTags.unparsed; + return this; + } + + /** + * Configuration for including dynamically queried tags. + * + * @return dynamicTags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DYNAMIC_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TagIndexingRuleDynamicTags getDynamicTags() { + return dynamicTags; + } + + public void setDynamicTags(TagIndexingRuleDynamicTags dynamicTags) { + this.dynamicTags = dynamicTags; + } + + public TagIndexingRuleOptionsData managePreexistingMetrics(Boolean managePreexistingMetrics) { + this.managePreexistingMetrics = managePreexistingMetrics; + return this; + } + + /** + * When true, the rule applies to metrics that were ingested before the rule was created. + * + * @return managePreexistingMetrics + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MANAGE_PREEXISTING_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getManagePreexistingMetrics() { + return managePreexistingMetrics; + } + + public void setManagePreexistingMetrics(Boolean managePreexistingMetrics) { + this.managePreexistingMetrics = managePreexistingMetrics; + } + + public TagIndexingRuleOptionsData metricMatch(TagIndexingRuleMetricMatch metricMatch) { + this.metricMatch = metricMatch; + this.unparsed |= metricMatch.unparsed; + return this; + } + + /** + * Criteria for matching metrics based on query state. + * + * @return metricMatch + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC_MATCH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TagIndexingRuleMetricMatch getMetricMatch() { + return metricMatch; + } + + public void setMetricMatch(TagIndexingRuleMetricMatch metricMatch) { + this.metricMatch = metricMatch; + } + + public TagIndexingRuleOptionsData overridePreviousRules(Boolean overridePreviousRules) { + this.overridePreviousRules = overridePreviousRules; + return this; + } + + /** + * When true, this rule's tag list overrides tags configured by earlier rules for the same metric. + * When false (default), tags from all matching rules are combined. + * + * @return overridePreviousRules + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OVERRIDE_PREVIOUS_RULES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getOverridePreviousRules() { + return overridePreviousRules; + } + + public void setOverridePreviousRules(Boolean overridePreviousRules) { + this.overridePreviousRules = overridePreviousRules; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagIndexingRuleOptionsData + */ + @JsonAnySetter + public TagIndexingRuleOptionsData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagIndexingRuleOptionsData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagIndexingRuleOptionsData tagIndexingRuleOptionsData = (TagIndexingRuleOptionsData) o; + return Objects.equals(this.dynamicTags, tagIndexingRuleOptionsData.dynamicTags) + && Objects.equals( + this.managePreexistingMetrics, tagIndexingRuleOptionsData.managePreexistingMetrics) + && Objects.equals(this.metricMatch, tagIndexingRuleOptionsData.metricMatch) + && Objects.equals( + this.overridePreviousRules, tagIndexingRuleOptionsData.overridePreviousRules) + && Objects.equals( + this.additionalProperties, tagIndexingRuleOptionsData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + dynamicTags, + managePreexistingMetrics, + metricMatch, + overridePreviousRules, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagIndexingRuleOptionsData {\n"); + sb.append(" dynamicTags: ").append(toIndentedString(dynamicTags)).append("\n"); + sb.append(" managePreexistingMetrics: ") + .append(toIndentedString(managePreexistingMetrics)) + .append("\n"); + sb.append(" metricMatch: ").append(toIndentedString(metricMatch)).append("\n"); + sb.append(" overridePreviousRules: ") + .append(toIndentedString(overridePreviousRules)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleOrderAttributes.java b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleOrderAttributes.java new file mode 100644 index 00000000000..871848a1428 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleOrderAttributes.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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import 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; + +/** Attributes for the reorder operation. */ +@JsonPropertyOrder({TagIndexingRuleOrderAttributes.JSON_PROPERTY_RULE_IDS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagIndexingRuleOrderAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_RULE_IDS = "rule_ids"; + private List ruleIds = null; + + public TagIndexingRuleOrderAttributes ruleIds(List ruleIds) { + this.ruleIds = ruleIds; + return this; + } + + public TagIndexingRuleOrderAttributes addRuleIdsItem(String ruleIdsItem) { + if (this.ruleIds == null) { + this.ruleIds = new ArrayList<>(); + } + this.ruleIds.add(ruleIdsItem); + return this; + } + + /** + * Ordered list of tag indexing rule UUIDs. The server assigns rule_order 1, 2, … matching + * position in this list. + * + * @return ruleIds + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RULE_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getRuleIds() { + return ruleIds; + } + + public void setRuleIds(List ruleIds) { + this.ruleIds = ruleIds; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagIndexingRuleOrderAttributes + */ + @JsonAnySetter + public TagIndexingRuleOrderAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagIndexingRuleOrderAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagIndexingRuleOrderAttributes tagIndexingRuleOrderAttributes = + (TagIndexingRuleOrderAttributes) o; + return Objects.equals(this.ruleIds, tagIndexingRuleOrderAttributes.ruleIds) + && Objects.equals( + this.additionalProperties, tagIndexingRuleOrderAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(ruleIds, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagIndexingRuleOrderAttributes {\n"); + sb.append(" ruleIds: ").append(toIndentedString(ruleIds)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleOrderData.java b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleOrderData.java new file mode 100644 index 00000000000..c20700eaca8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleOrderData.java @@ -0,0 +1,181 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object for the reorder operation. */ +@JsonPropertyOrder({ + TagIndexingRuleOrderData.JSON_PROPERTY_ATTRIBUTES, + TagIndexingRuleOrderData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagIndexingRuleOrderData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private TagIndexingRuleOrderAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private TagIndexingRuleType type = TagIndexingRuleType.TAG_INDEXING_RULES; + + public TagIndexingRuleOrderData() {} + + @JsonCreator + public TagIndexingRuleOrderData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + TagIndexingRuleOrderAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) TagIndexingRuleType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public TagIndexingRuleOrderData attributes(TagIndexingRuleOrderAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for the reorder operation. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TagIndexingRuleOrderAttributes getAttributes() { + return attributes; + } + + public void setAttributes(TagIndexingRuleOrderAttributes attributes) { + this.attributes = attributes; + } + + public TagIndexingRuleOrderData type(TagIndexingRuleType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The tag indexing rule resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TagIndexingRuleType getType() { + return type; + } + + public void setType(TagIndexingRuleType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagIndexingRuleOrderData + */ + @JsonAnySetter + public TagIndexingRuleOrderData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagIndexingRuleOrderData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagIndexingRuleOrderData tagIndexingRuleOrderData = (TagIndexingRuleOrderData) o; + return Objects.equals(this.attributes, tagIndexingRuleOrderData.attributes) + && Objects.equals(this.type, tagIndexingRuleOrderData.type) + && Objects.equals(this.additionalProperties, tagIndexingRuleOrderData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagIndexingRuleOrderData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleOrderRequest.java b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleOrderRequest.java new file mode 100644 index 00000000000..bd5e6dec58d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleOrderRequest.java @@ -0,0 +1,146 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request body for reordering tag indexing rules. */ +@JsonPropertyOrder({TagIndexingRuleOrderRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagIndexingRuleOrderRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private TagIndexingRuleOrderData data; + + public TagIndexingRuleOrderRequest() {} + + @JsonCreator + public TagIndexingRuleOrderRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) TagIndexingRuleOrderData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public TagIndexingRuleOrderRequest data(TagIndexingRuleOrderData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for the reorder operation. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TagIndexingRuleOrderData getData() { + return data; + } + + public void setData(TagIndexingRuleOrderData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagIndexingRuleOrderRequest + */ + @JsonAnySetter + public TagIndexingRuleOrderRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagIndexingRuleOrderRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagIndexingRuleOrderRequest tagIndexingRuleOrderRequest = (TagIndexingRuleOrderRequest) o; + return Objects.equals(this.data, tagIndexingRuleOrderRequest.data) + && Objects.equals( + this.additionalProperties, tagIndexingRuleOrderRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagIndexingRuleOrderRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleResponse.java b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleResponse.java new file mode 100644 index 00000000000..0a570779def --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleResponse.java @@ -0,0 +1,136 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing a single tag indexing rule. */ +@JsonPropertyOrder({TagIndexingRuleResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagIndexingRuleResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private TagIndexingRuleData data; + + public TagIndexingRuleResponse data(TagIndexingRuleData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * A tag indexing rule resource object. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TagIndexingRuleData getData() { + return data; + } + + public void setData(TagIndexingRuleData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagIndexingRuleResponse + */ + @JsonAnySetter + public TagIndexingRuleResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagIndexingRuleResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagIndexingRuleResponse tagIndexingRuleResponse = (TagIndexingRuleResponse) o; + return Objects.equals(this.data, tagIndexingRuleResponse.data) + && Objects.equals(this.additionalProperties, tagIndexingRuleResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagIndexingRuleResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleType.java b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleType.java new file mode 100644 index 00000000000..761dda356ba --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleType.java @@ -0,0 +1,56 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The tag indexing rule resource type. */ +@JsonSerialize(using = TagIndexingRuleType.TagIndexingRuleTypeSerializer.class) +public class TagIndexingRuleType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("tag_indexing_rules")); + + public static final TagIndexingRuleType TAG_INDEXING_RULES = + new TagIndexingRuleType("tag_indexing_rules"); + + TagIndexingRuleType(String value) { + super(value, allowedValues); + } + + public static class TagIndexingRuleTypeSerializer extends StdSerializer { + public TagIndexingRuleTypeSerializer(Class t) { + super(t); + } + + public TagIndexingRuleTypeSerializer() { + this(null); + } + + @Override + public void serialize( + TagIndexingRuleType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static TagIndexingRuleType fromValue(String value) { + return new TagIndexingRuleType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleUpdateAttributes.java new file mode 100644 index 00000000000..5fd03288710 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleUpdateAttributes.java @@ -0,0 +1,346 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import 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; + +/** + * Attributes for updating a tag indexing rule. All fields are optional; omitted fields are + * unchanged. + */ +@JsonPropertyOrder({ + TagIndexingRuleUpdateAttributes.JSON_PROPERTY_EXCLUDE_TAGS_MODE, + TagIndexingRuleUpdateAttributes.JSON_PROPERTY_IGNORED_METRIC_NAME_MATCHES, + TagIndexingRuleUpdateAttributes.JSON_PROPERTY_METRIC_NAME_MATCHES, + TagIndexingRuleUpdateAttributes.JSON_PROPERTY_NAME, + TagIndexingRuleUpdateAttributes.JSON_PROPERTY_OPTIONS, + TagIndexingRuleUpdateAttributes.JSON_PROPERTY_RULE_ORDER, + TagIndexingRuleUpdateAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagIndexingRuleUpdateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EXCLUDE_TAGS_MODE = "exclude_tags_mode"; + private Boolean excludeTagsMode; + + public static final String JSON_PROPERTY_IGNORED_METRIC_NAME_MATCHES = + "ignored_metric_name_matches"; + private List ignoredMetricNameMatches = null; + + public static final String JSON_PROPERTY_METRIC_NAME_MATCHES = "metric_name_matches"; + private List metricNameMatches = null; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_OPTIONS = "options"; + private TagIndexingRuleOptions options; + + public static final String JSON_PROPERTY_RULE_ORDER = "rule_order"; + private Long ruleOrder; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + public TagIndexingRuleUpdateAttributes excludeTagsMode(Boolean excludeTagsMode) { + this.excludeTagsMode = excludeTagsMode; + return this; + } + + /** + * When true, the rule excludes the listed tags and indexes all others. + * + * @return excludeTagsMode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXCLUDE_TAGS_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getExcludeTagsMode() { + return excludeTagsMode; + } + + public void setExcludeTagsMode(Boolean excludeTagsMode) { + this.excludeTagsMode = excludeTagsMode; + } + + public TagIndexingRuleUpdateAttributes ignoredMetricNameMatches( + List ignoredMetricNameMatches) { + this.ignoredMetricNameMatches = ignoredMetricNameMatches; + return this; + } + + public TagIndexingRuleUpdateAttributes addIgnoredMetricNameMatchesItem( + String ignoredMetricNameMatchesItem) { + if (this.ignoredMetricNameMatches == null) { + this.ignoredMetricNameMatches = new ArrayList<>(); + } + this.ignoredMetricNameMatches.add(ignoredMetricNameMatchesItem); + return this; + } + + /** + * Metric name prefixes excluded from the rule's scope. + * + * @return ignoredMetricNameMatches + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IGNORED_METRIC_NAME_MATCHES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getIgnoredMetricNameMatches() { + return ignoredMetricNameMatches; + } + + public void setIgnoredMetricNameMatches(List ignoredMetricNameMatches) { + this.ignoredMetricNameMatches = ignoredMetricNameMatches; + } + + public TagIndexingRuleUpdateAttributes metricNameMatches(List metricNameMatches) { + this.metricNameMatches = metricNameMatches; + return this; + } + + public TagIndexingRuleUpdateAttributes addMetricNameMatchesItem(String metricNameMatchesItem) { + if (this.metricNameMatches == null) { + this.metricNameMatches = new ArrayList<>(); + } + this.metricNameMatches.add(metricNameMatchesItem); + return this; + } + + /** + * Metric name prefixes (glob patterns) this rule applies to. + * + * @return metricNameMatches + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_METRIC_NAME_MATCHES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getMetricNameMatches() { + return metricNameMatches; + } + + public void setMetricNameMatches(List metricNameMatches) { + this.metricNameMatches = metricNameMatches; + } + + public TagIndexingRuleUpdateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Human-readable name for the rule. + * + * @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 TagIndexingRuleUpdateAttributes options(TagIndexingRuleOptions options) { + this.options = options; + this.unparsed |= options.unparsed; + return this; + } + + /** + * Versioned configuration options for a tag indexing rule. + * + * @return options + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TagIndexingRuleOptions getOptions() { + return options; + } + + public void setOptions(TagIndexingRuleOptions options) { + this.options = options; + } + + public TagIndexingRuleUpdateAttributes ruleOrder(Long ruleOrder) { + this.ruleOrder = ruleOrder; + return this; + } + + /** + * Desired evaluation order. Returns 409 if the value conflicts with another rule; use POST + * /api/v2/metrics/tag-indexing-rules/order for atomic re-sequencing. + * + * @return ruleOrder + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RULE_ORDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getRuleOrder() { + return ruleOrder; + } + + public void setRuleOrder(Long ruleOrder) { + this.ruleOrder = ruleOrder; + } + + public TagIndexingRuleUpdateAttributes tags(List tags) { + this.tags = tags; + return this; + } + + public TagIndexingRuleUpdateAttributes addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Tag keys managed by this rule. + * + * @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; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagIndexingRuleUpdateAttributes + */ + @JsonAnySetter + public TagIndexingRuleUpdateAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagIndexingRuleUpdateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagIndexingRuleUpdateAttributes tagIndexingRuleUpdateAttributes = + (TagIndexingRuleUpdateAttributes) o; + return Objects.equals(this.excludeTagsMode, tagIndexingRuleUpdateAttributes.excludeTagsMode) + && Objects.equals( + this.ignoredMetricNameMatches, tagIndexingRuleUpdateAttributes.ignoredMetricNameMatches) + && Objects.equals(this.metricNameMatches, tagIndexingRuleUpdateAttributes.metricNameMatches) + && Objects.equals(this.name, tagIndexingRuleUpdateAttributes.name) + && Objects.equals(this.options, tagIndexingRuleUpdateAttributes.options) + && Objects.equals(this.ruleOrder, tagIndexingRuleUpdateAttributes.ruleOrder) + && Objects.equals(this.tags, tagIndexingRuleUpdateAttributes.tags) + && Objects.equals( + this.additionalProperties, tagIndexingRuleUpdateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + excludeTagsMode, + ignoredMetricNameMatches, + metricNameMatches, + name, + options, + ruleOrder, + tags, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagIndexingRuleUpdateAttributes {\n"); + sb.append(" excludeTagsMode: ").append(toIndentedString(excludeTagsMode)).append("\n"); + sb.append(" ignoredMetricNameMatches: ") + .append(toIndentedString(ignoredMetricNameMatches)) + .append("\n"); + sb.append(" metricNameMatches: ").append(toIndentedString(metricNameMatches)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" options: ").append(toIndentedString(options)).append("\n"); + sb.append(" ruleOrder: ").append(toIndentedString(ruleOrder)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceCreateData.java b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleUpdateData.java similarity index 66% rename from src/main/java/com/datadog/api/client/v2/model/IncidentServiceCreateData.java rename to src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleUpdateData.java index 206e0392fa8..79e3e3ba5c2 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceCreateData.java +++ b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleUpdateData.java @@ -17,86 +17,71 @@ import java.util.Map; import java.util.Objects; -/** Incident Service payload for create requests. */ +/** Data object for updating a tag indexing rule. */ @JsonPropertyOrder({ - IncidentServiceCreateData.JSON_PROPERTY_ATTRIBUTES, - IncidentServiceCreateData.JSON_PROPERTY_RELATIONSHIPS, - IncidentServiceCreateData.JSON_PROPERTY_TYPE + TagIndexingRuleUpdateData.JSON_PROPERTY_ATTRIBUTES, + TagIndexingRuleUpdateData.JSON_PROPERTY_TYPE }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class IncidentServiceCreateData { +public class TagIndexingRuleUpdateData { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; - private IncidentServiceCreateAttributes attributes; - - public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; - private IncidentServiceRelationships relationships; + private TagIndexingRuleUpdateAttributes attributes; public static final String JSON_PROPERTY_TYPE = "type"; - private IncidentServiceType type = IncidentServiceType.SERVICES; + private TagIndexingRuleType type = TagIndexingRuleType.TAG_INDEXING_RULES; - public IncidentServiceCreateData() {} + public TagIndexingRuleUpdateData() {} @JsonCreator - public IncidentServiceCreateData( - @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IncidentServiceType type) { + public TagIndexingRuleUpdateData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) TagIndexingRuleType type) { this.type = type; this.unparsed |= !type.isValid(); } - public IncidentServiceCreateData attributes(IncidentServiceCreateAttributes attributes) { + public TagIndexingRuleUpdateData attributes(TagIndexingRuleUpdateAttributes attributes) { this.attributes = attributes; this.unparsed |= attributes.unparsed; return this; } /** - * The incident service's attributes for a create request. + * Attributes for updating a tag indexing rule. All fields are optional; omitted fields are + * unchanged. * * @return attributes */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTRIBUTES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public IncidentServiceCreateAttributes getAttributes() { + public TagIndexingRuleUpdateAttributes getAttributes() { return attributes; } - public void setAttributes(IncidentServiceCreateAttributes attributes) { + public void setAttributes(TagIndexingRuleUpdateAttributes attributes) { this.attributes = attributes; } - /** - * 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; - } - - public IncidentServiceCreateData type(IncidentServiceType type) { + public TagIndexingRuleUpdateData type(TagIndexingRuleType type) { this.type = type; this.unparsed |= !type.isValid(); return this; } /** - * Incident service resource type. + * The tag indexing rule resource type. * * @return type */ @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentServiceType getType() { + public TagIndexingRuleType getType() { return type; } - public void setType(IncidentServiceType type) { + public void setType(TagIndexingRuleType type) { if (!type.isValid()) { this.unparsed = true; } @@ -115,10 +100,10 @@ public void setType(IncidentServiceType type) { * * @param key The arbitrary key to set * @param value The associated value - * @return IncidentServiceCreateData + * @return TagIndexingRuleUpdateData */ @JsonAnySetter - public IncidentServiceCreateData putAdditionalProperty(String key, Object value) { + public TagIndexingRuleUpdateData putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -149,7 +134,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this IncidentServiceCreateData object is equal to o. */ + /** Return true if this TagIndexingRuleUpdateData object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -158,25 +143,23 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { 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) + TagIndexingRuleUpdateData tagIndexingRuleUpdateData = (TagIndexingRuleUpdateData) o; + return Objects.equals(this.attributes, tagIndexingRuleUpdateData.attributes) + && Objects.equals(this.type, tagIndexingRuleUpdateData.type) && Objects.equals( - this.additionalProperties, incidentServiceCreateData.additionalProperties); + this.additionalProperties, tagIndexingRuleUpdateData.additionalProperties); } @Override public int hashCode() { - return Objects.hash(attributes, relationships, type, additionalProperties); + return Objects.hash(attributes, type, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class IncidentServiceCreateData {\n"); + sb.append("class TagIndexingRuleUpdateData {\n"); sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); - sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleUpdateRequest.java similarity index 78% rename from src/main/java/com/datadog/api/client/v2/model/IncidentServiceCreateRequest.java rename to src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleUpdateRequest.java index a85ac03c86e..e3adf37e006 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceCreateRequest.java +++ b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRuleUpdateRequest.java @@ -17,42 +17,42 @@ import java.util.Map; import java.util.Objects; -/** Create request with an incident service payload. */ -@JsonPropertyOrder({IncidentServiceCreateRequest.JSON_PROPERTY_DATA}) +/** Request body for updating a tag indexing rule. */ +@JsonPropertyOrder({TagIndexingRuleUpdateRequest.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class IncidentServiceCreateRequest { +public class TagIndexingRuleUpdateRequest { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private IncidentServiceCreateData data; + private TagIndexingRuleUpdateData data; - public IncidentServiceCreateRequest() {} + public TagIndexingRuleUpdateRequest() {} @JsonCreator - public IncidentServiceCreateRequest( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) IncidentServiceCreateData data) { + public TagIndexingRuleUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) TagIndexingRuleUpdateData data) { this.data = data; this.unparsed |= data.unparsed; } - public IncidentServiceCreateRequest data(IncidentServiceCreateData data) { + public TagIndexingRuleUpdateRequest data(TagIndexingRuleUpdateData data) { this.data = data; this.unparsed |= data.unparsed; return this; } /** - * Incident Service payload for create requests. + * Data object for updating a tag indexing rule. * * @return data */ @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentServiceCreateData getData() { + public TagIndexingRuleUpdateData getData() { return data; } - public void setData(IncidentServiceCreateData data) { + public void setData(TagIndexingRuleUpdateData data) { this.data = data; } @@ -68,10 +68,10 @@ public void setData(IncidentServiceCreateData data) { * * @param key The arbitrary key to set * @param value The associated value - * @return IncidentServiceCreateRequest + * @return TagIndexingRuleUpdateRequest */ @JsonAnySetter - public IncidentServiceCreateRequest putAdditionalProperty(String key, Object value) { + public TagIndexingRuleUpdateRequest putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -102,7 +102,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this IncidentServiceCreateRequest object is equal to o. */ + /** Return true if this TagIndexingRuleUpdateRequest object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -111,10 +111,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentServiceCreateRequest incidentServiceCreateRequest = (IncidentServiceCreateRequest) o; - return Objects.equals(this.data, incidentServiceCreateRequest.data) + TagIndexingRuleUpdateRequest tagIndexingRuleUpdateRequest = (TagIndexingRuleUpdateRequest) o; + return Objects.equals(this.data, tagIndexingRuleUpdateRequest.data) && Objects.equals( - this.additionalProperties, incidentServiceCreateRequest.additionalProperties); + this.additionalProperties, tagIndexingRuleUpdateRequest.additionalProperties); } @Override @@ -125,7 +125,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class IncidentServiceCreateRequest {\n"); + sb.append("class TagIndexingRuleUpdateRequest {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/TagIndexingRulesResponse.java b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRulesResponse.java new file mode 100644 index 00000000000..fe010cac8ee --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRulesResponse.java @@ -0,0 +1,207 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing a page of tag indexing rules. */ +@JsonPropertyOrder({ + TagIndexingRulesResponse.JSON_PROPERTY_DATA, + TagIndexingRulesResponse.JSON_PROPERTY_LINKS, + TagIndexingRulesResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagIndexingRulesResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = null; + + public static final String JSON_PROPERTY_LINKS = "links"; + private MetricsListResponseLinks links; + + public static final String JSON_PROPERTY_META = "meta"; + private TagIndexingRulesResponseMeta meta; + + public TagIndexingRulesResponse data(List data) { + this.data = data; + for (TagIndexingRuleData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public TagIndexingRulesResponse addDataItem(TagIndexingRuleData dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Array of tag indexing rule objects. + * + * @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 TagIndexingRulesResponse links(MetricsListResponseLinks links) { + this.links = links; + this.unparsed |= links.unparsed; + return this; + } + + /** + * Pagination links. Only present if pagination query parameters were provided. + * + * @return links + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public MetricsListResponseLinks getLinks() { + return links; + } + + public void setLinks(MetricsListResponseLinks links) { + this.links = links; + } + + public TagIndexingRulesResponse meta(TagIndexingRulesResponseMeta meta) { + this.meta = meta; + this.unparsed |= meta.unparsed; + return this; + } + + /** + * Pagination metadata for a list of tag indexing rules. + * + * @return meta + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TagIndexingRulesResponseMeta getMeta() { + return meta; + } + + public void setMeta(TagIndexingRulesResponseMeta meta) { + this.meta = meta; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagIndexingRulesResponse + */ + @JsonAnySetter + public TagIndexingRulesResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagIndexingRulesResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagIndexingRulesResponse tagIndexingRulesResponse = (TagIndexingRulesResponse) o; + return Objects.equals(this.data, tagIndexingRulesResponse.data) + && Objects.equals(this.links, tagIndexingRulesResponse.links) + && Objects.equals(this.meta, tagIndexingRulesResponse.meta) + && Objects.equals(this.additionalProperties, tagIndexingRulesResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, links, meta, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagIndexingRulesResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagIndexingRulesResponseMeta.java b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRulesResponseMeta.java new file mode 100644 index 00000000000..46b08a5c663 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagIndexingRulesResponseMeta.java @@ -0,0 +1,136 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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; + +/** Pagination metadata for a list of tag indexing rules. */ +@JsonPropertyOrder({TagIndexingRulesResponseMeta.JSON_PROPERTY_TOTAL}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagIndexingRulesResponseMeta { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_TOTAL = "total"; + private Long total; + + public TagIndexingRulesResponseMeta total(Long total) { + this.total = total; + return this; + } + + /** + * Total number of tag indexing rules in the org. + * + * @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; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagIndexingRulesResponseMeta + */ + @JsonAnySetter + public TagIndexingRulesResponseMeta putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagIndexingRulesResponseMeta object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagIndexingRulesResponseMeta tagIndexingRulesResponseMeta = (TagIndexingRulesResponseMeta) o; + return Objects.equals(this.total, tagIndexingRulesResponseMeta.total) + && Objects.equals( + this.additionalProperties, tagIndexingRulesResponseMeta.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(total, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagIndexingRulesResponseMeta {\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagPoliciesListResponse.java b/src/main/java/com/datadog/api/client/v2/model/TagPoliciesListResponse.java new file mode 100644 index 00000000000..00151490402 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagPoliciesListResponse.java @@ -0,0 +1,196 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** A page of tag policies. */ +@JsonPropertyOrder({ + TagPoliciesListResponse.JSON_PROPERTY_DATA, + TagPoliciesListResponse.JSON_PROPERTY_INCLUDED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagPoliciesListResponse { + @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 TagPoliciesListResponse() {} + + @JsonCreator + public TagPoliciesListResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) { + this.data = data; + } + + public TagPoliciesListResponse data(List data) { + this.data = data; + for (TagPolicyData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public TagPoliciesListResponse addDataItem(TagPolicyData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * An array of tag policy data objects. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public TagPoliciesListResponse included(List included) { + this.included = included; + for (TagPolicyScoreData item : included) { + this.unparsed |= item.unparsed; + } + return this; + } + + public TagPoliciesListResponse addIncludedItem(TagPolicyScoreData includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + this.unparsed |= includedItem.unparsed; + return this; + } + + /** + * Related resources fetched alongside the primary tag policies. Populated when an include + * query parameter is supplied. + * + * @return included + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCLUDED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getIncluded() { + return included; + } + + public void setIncluded(List included) { + this.included = included; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagPoliciesListResponse + */ + @JsonAnySetter + public TagPoliciesListResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagPoliciesListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagPoliciesListResponse tagPoliciesListResponse = (TagPoliciesListResponse) o; + return Objects.equals(this.data, tagPoliciesListResponse.data) + && Objects.equals(this.included, tagPoliciesListResponse.included) + && Objects.equals(this.additionalProperties, tagPoliciesListResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, included, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagPoliciesListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" included: ").append(toIndentedString(included)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagPolicyAttributes.java b/src/main/java/com/datadog/api/client/v2/model/TagPolicyAttributes.java new file mode 100644 index 00000000000..df8b4e8db40 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagPolicyAttributes.java @@ -0,0 +1,624 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** The attributes of a tag policy resource. */ +@JsonPropertyOrder({ + TagPolicyAttributes.JSON_PROPERTY_CREATED_AT, + TagPolicyAttributes.JSON_PROPERTY_CREATED_BY, + TagPolicyAttributes.JSON_PROPERTY_DELETED_AT, + TagPolicyAttributes.JSON_PROPERTY_DELETED_BY, + TagPolicyAttributes.JSON_PROPERTY_ENABLED, + TagPolicyAttributes.JSON_PROPERTY_MODIFIED_AT, + TagPolicyAttributes.JSON_PROPERTY_MODIFIED_BY, + TagPolicyAttributes.JSON_PROPERTY_NEGATED, + TagPolicyAttributes.JSON_PROPERTY_POLICY_NAME, + TagPolicyAttributes.JSON_PROPERTY_POLICY_TYPE, + TagPolicyAttributes.JSON_PROPERTY_REQUIRED, + TagPolicyAttributes.JSON_PROPERTY_SCOPE, + TagPolicyAttributes.JSON_PROPERTY_SOURCE, + TagPolicyAttributes.JSON_PROPERTY_TAG_KEY, + TagPolicyAttributes.JSON_PROPERTY_TAG_VALUE_PATTERNS, + TagPolicyAttributes.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagPolicyAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_CREATED_BY = "created_by"; + private String createdBy; + + public static final String JSON_PROPERTY_DELETED_AT = "deleted_at"; + private JsonNullable deletedAt = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DELETED_BY = "deleted_by"; + private JsonNullable deletedBy = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_MODIFIED_AT = "modified_at"; + private OffsetDateTime modifiedAt; + + public static final String JSON_PROPERTY_MODIFIED_BY = "modified_by"; + private String modifiedBy; + + public static final String JSON_PROPERTY_NEGATED = "negated"; + private Boolean negated; + + public static final String JSON_PROPERTY_POLICY_NAME = "policy_name"; + private String policyName; + + public static final String JSON_PROPERTY_POLICY_TYPE = "policy_type"; + private TagPolicyType policyType; + + public static final String JSON_PROPERTY_REQUIRED = "required"; + private Boolean required; + + public static final String JSON_PROPERTY_SCOPE = "scope"; + private String scope; + + public static final String JSON_PROPERTY_SOURCE = "source"; + private TagPolicySource source; + + public static final String JSON_PROPERTY_TAG_KEY = "tag_key"; + private String tagKey; + + public static final String JSON_PROPERTY_TAG_VALUE_PATTERNS = "tag_value_patterns"; + private List tagValuePatterns = new ArrayList<>(); + + public static final String JSON_PROPERTY_VERSION = "version"; + private Long version; + + public TagPolicyAttributes() {} + + @JsonCreator + public TagPolicyAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_AT) OffsetDateTime createdAt, + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_BY) String createdBy, + @JsonProperty(required = true, value = JSON_PROPERTY_ENABLED) Boolean enabled, + @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED_AT) OffsetDateTime modifiedAt, + @JsonProperty(required = true, value = JSON_PROPERTY_MODIFIED_BY) String modifiedBy, + @JsonProperty(required = true, value = JSON_PROPERTY_NEGATED) Boolean negated, + @JsonProperty(required = true, value = JSON_PROPERTY_POLICY_NAME) String policyName, + @JsonProperty(required = true, value = JSON_PROPERTY_POLICY_TYPE) TagPolicyType policyType, + @JsonProperty(required = true, value = JSON_PROPERTY_REQUIRED) Boolean required, + @JsonProperty(required = true, value = JSON_PROPERTY_SCOPE) String scope, + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE) TagPolicySource source, + @JsonProperty(required = true, value = JSON_PROPERTY_TAG_KEY) String tagKey, + @JsonProperty(required = true, value = JSON_PROPERTY_TAG_VALUE_PATTERNS) + List tagValuePatterns, + @JsonProperty(required = true, value = JSON_PROPERTY_VERSION) Long version) { + this.createdAt = createdAt; + this.createdBy = createdBy; + this.enabled = enabled; + this.modifiedAt = modifiedAt; + this.modifiedBy = modifiedBy; + this.negated = negated; + this.policyName = policyName; + this.policyType = policyType; + this.unparsed |= !policyType.isValid(); + this.required = required; + this.scope = scope; + this.source = source; + this.unparsed |= !source.isValid(); + this.tagKey = tagKey; + this.tagValuePatterns = tagValuePatterns; + this.version = version; + } + + public TagPolicyAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * The RFC 3339 timestamp at which the policy was created. + * + * @return createdAt + */ + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public TagPolicyAttributes createdBy(String createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + * The identifier of the user who created the policy. + * + * @return createdBy + */ + @JsonProperty(JSON_PROPERTY_CREATED_BY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public TagPolicyAttributes deletedAt(OffsetDateTime deletedAt) { + this.deletedAt = JsonNullable.of(deletedAt); + return this; + } + + /** + * The RFC 3339 timestamp at which the policy was soft-deleted. null if the policy + * has not been deleted. Only present when include_deleted=true is requested. + * + * @return deletedAt + */ + @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getDeletedAt() { + return deletedAt.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DELETED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getDeletedAt_JsonNullable() { + return deletedAt; + } + + @JsonProperty(JSON_PROPERTY_DELETED_AT) + public void setDeletedAt_JsonNullable(JsonNullable deletedAt) { + this.deletedAt = deletedAt; + } + + public void setDeletedAt(OffsetDateTime deletedAt) { + this.deletedAt = JsonNullable.of(deletedAt); + } + + public TagPolicyAttributes deletedBy(String deletedBy) { + this.deletedBy = JsonNullable.of(deletedBy); + return this; + } + + /** + * The identifier of the user who soft-deleted the policy. null if the policy has not + * been deleted. + * + * @return deletedBy + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getDeletedBy() { + return deletedBy.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DELETED_BY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getDeletedBy_JsonNullable() { + return deletedBy; + } + + @JsonProperty(JSON_PROPERTY_DELETED_BY) + public void setDeletedBy_JsonNullable(JsonNullable deletedBy) { + this.deletedBy = deletedBy; + } + + public void setDeletedBy(String deletedBy) { + this.deletedBy = JsonNullable.of(deletedBy); + } + + public TagPolicyAttributes enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the policy is currently enforced. + * + * @return enabled + */ + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public TagPolicyAttributes modifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + return this; + } + + /** + * The RFC 3339 timestamp at which the policy was last modified. + * + * @return modifiedAt + */ + @JsonProperty(JSON_PROPERTY_MODIFIED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getModifiedAt() { + return modifiedAt; + } + + public void setModifiedAt(OffsetDateTime modifiedAt) { + this.modifiedAt = modifiedAt; + } + + public TagPolicyAttributes modifiedBy(String modifiedBy) { + this.modifiedBy = modifiedBy; + return this; + } + + /** + * The identifier of the user who last modified the policy. + * + * @return modifiedBy + */ + @JsonProperty(JSON_PROPERTY_MODIFIED_BY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getModifiedBy() { + return modifiedBy; + } + + public void setModifiedBy(String modifiedBy) { + this.modifiedBy = modifiedBy; + } + + public TagPolicyAttributes negated(Boolean negated) { + this.negated = negated; + return this; + } + + /** + * When true, the policy matches tag values that do NOT match any of the supplied + * patterns. + * + * @return negated + */ + @JsonProperty(JSON_PROPERTY_NEGATED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getNegated() { + return negated; + } + + public void setNegated(Boolean negated) { + this.negated = negated; + } + + public TagPolicyAttributes policyName(String policyName) { + this.policyName = policyName; + return this; + } + + /** + * Human-readable name for the tag policy. + * + * @return policyName + */ + @JsonProperty(JSON_PROPERTY_POLICY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPolicyName() { + return policyName; + } + + public void setPolicyName(String policyName) { + this.policyName = policyName; + } + + public TagPolicyAttributes policyType(TagPolicyType policyType) { + this.policyType = policyType; + this.unparsed |= !policyType.isValid(); + return this; + } + + /** + * How the policy is enforced. blocking rejects telemetry that violates the policy. + * surfacing only highlights non-compliant telemetry without blocking it. + * + * @return policyType + */ + @JsonProperty(JSON_PROPERTY_POLICY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TagPolicyType getPolicyType() { + return policyType; + } + + public void setPolicyType(TagPolicyType policyType) { + if (!policyType.isValid()) { + this.unparsed = true; + } + this.policyType = policyType; + } + + public TagPolicyAttributes required(Boolean required) { + this.required = required; + return this; + } + + /** + * When true, telemetry without this tag is treated as a violation. + * + * @return required + */ + @JsonProperty(JSON_PROPERTY_REQUIRED) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getRequired() { + return required; + } + + public void setRequired(Boolean required) { + this.required = required; + } + + public TagPolicyAttributes scope(String scope) { + this.scope = scope; + return this; + } + + /** + * The scope the policy applies within. + * + * @return scope + */ + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getScope() { + return scope; + } + + public void setScope(String scope) { + this.scope = scope; + } + + public TagPolicyAttributes source(TagPolicySource source) { + this.source = source; + this.unparsed |= !source.isValid(); + return this; + } + + /** + * The telemetry source that a tag policy applies to. + * + * @return source + */ + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TagPolicySource getSource() { + return source; + } + + public void setSource(TagPolicySource source) { + if (!source.isValid()) { + this.unparsed = true; + } + this.source = source; + } + + public TagPolicyAttributes tagKey(String tagKey) { + this.tagKey = tagKey; + return this; + } + + /** + * The tag key that the policy governs. + * + * @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 TagPolicyAttributes tagValuePatterns(List tagValuePatterns) { + this.tagValuePatterns = tagValuePatterns; + return this; + } + + public TagPolicyAttributes addTagValuePatternsItem(String tagValuePatternsItem) { + this.tagValuePatterns.add(tagValuePatternsItem); + return this; + } + + /** + * The patterns that valid values for the tag key must match. + * + * @return tagValuePatterns + */ + @JsonProperty(JSON_PROPERTY_TAG_VALUE_PATTERNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTagValuePatterns() { + return tagValuePatterns; + } + + public void setTagValuePatterns(List tagValuePatterns) { + this.tagValuePatterns = tagValuePatterns; + } + + public TagPolicyAttributes version(Long version) { + this.version = version; + return this; + } + + /** + * A monotonically increasing version counter that is incremented on each update. + * + * @return version + */ + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getVersion() { + return version; + } + + public void setVersion(Long version) { + this.version = version; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagPolicyAttributes + */ + @JsonAnySetter + public TagPolicyAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagPolicyAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagPolicyAttributes tagPolicyAttributes = (TagPolicyAttributes) o; + return Objects.equals(this.createdAt, tagPolicyAttributes.createdAt) + && Objects.equals(this.createdBy, tagPolicyAttributes.createdBy) + && Objects.equals(this.deletedAt, tagPolicyAttributes.deletedAt) + && Objects.equals(this.deletedBy, tagPolicyAttributes.deletedBy) + && Objects.equals(this.enabled, tagPolicyAttributes.enabled) + && Objects.equals(this.modifiedAt, tagPolicyAttributes.modifiedAt) + && Objects.equals(this.modifiedBy, tagPolicyAttributes.modifiedBy) + && Objects.equals(this.negated, tagPolicyAttributes.negated) + && Objects.equals(this.policyName, tagPolicyAttributes.policyName) + && Objects.equals(this.policyType, tagPolicyAttributes.policyType) + && Objects.equals(this.required, tagPolicyAttributes.required) + && Objects.equals(this.scope, tagPolicyAttributes.scope) + && Objects.equals(this.source, tagPolicyAttributes.source) + && Objects.equals(this.tagKey, tagPolicyAttributes.tagKey) + && Objects.equals(this.tagValuePatterns, tagPolicyAttributes.tagValuePatterns) + && Objects.equals(this.version, tagPolicyAttributes.version) + && Objects.equals(this.additionalProperties, tagPolicyAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + createdBy, + deletedAt, + deletedBy, + enabled, + modifiedAt, + modifiedBy, + negated, + policyName, + policyType, + required, + scope, + source, + tagKey, + tagValuePatterns, + version, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagPolicyAttributes {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n"); + sb.append(" deletedAt: ").append(toIndentedString(deletedAt)).append("\n"); + sb.append(" deletedBy: ").append(toIndentedString(deletedBy)).append("\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n"); + sb.append(" modifiedBy: ").append(toIndentedString(modifiedBy)).append("\n"); + sb.append(" negated: ").append(toIndentedString(negated)).append("\n"); + sb.append(" policyName: ").append(toIndentedString(policyName)).append("\n"); + sb.append(" policyType: ").append(toIndentedString(policyType)).append("\n"); + sb.append(" required: ").append(toIndentedString(required)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" tagKey: ").append(toIndentedString(tagKey)).append("\n"); + sb.append(" tagValuePatterns: ").append(toIndentedString(tagValuePatterns)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagPolicyCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/TagPolicyCreateAttributes.java new file mode 100644 index 00000000000..d0a92645549 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagPolicyCreateAttributes.java @@ -0,0 +1,402 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes that can be supplied when creating a tag policy. */ +@JsonPropertyOrder({ + TagPolicyCreateAttributes.JSON_PROPERTY_ENABLED, + TagPolicyCreateAttributes.JSON_PROPERTY_NEGATED, + TagPolicyCreateAttributes.JSON_PROPERTY_POLICY_NAME, + TagPolicyCreateAttributes.JSON_PROPERTY_POLICY_TYPE, + TagPolicyCreateAttributes.JSON_PROPERTY_REQUIRED, + TagPolicyCreateAttributes.JSON_PROPERTY_SCOPE, + TagPolicyCreateAttributes.JSON_PROPERTY_SOURCE, + TagPolicyCreateAttributes.JSON_PROPERTY_TAG_KEY, + TagPolicyCreateAttributes.JSON_PROPERTY_TAG_VALUE_PATTERNS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagPolicyCreateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_NEGATED = "negated"; + private Boolean negated; + + public static final String JSON_PROPERTY_POLICY_NAME = "policy_name"; + private String policyName; + + public static final String JSON_PROPERTY_POLICY_TYPE = "policy_type"; + private TagPolicyCreateType policyType; + + public static final String JSON_PROPERTY_REQUIRED = "required"; + private Boolean required; + + public static final String JSON_PROPERTY_SCOPE = "scope"; + private String scope; + + public static final String JSON_PROPERTY_SOURCE = "source"; + private TagPolicySource source; + + public static final String JSON_PROPERTY_TAG_KEY = "tag_key"; + private String tagKey; + + public static final String JSON_PROPERTY_TAG_VALUE_PATTERNS = "tag_value_patterns"; + private List tagValuePatterns = new ArrayList<>(); + + public TagPolicyCreateAttributes() {} + + @JsonCreator + public TagPolicyCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_POLICY_NAME) String policyName, + @JsonProperty(required = true, value = JSON_PROPERTY_POLICY_TYPE) + TagPolicyCreateType policyType, + @JsonProperty(required = true, value = JSON_PROPERTY_SCOPE) String scope, + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE) TagPolicySource source, + @JsonProperty(required = true, value = JSON_PROPERTY_TAG_KEY) String tagKey, + @JsonProperty(required = true, value = JSON_PROPERTY_TAG_VALUE_PATTERNS) + List tagValuePatterns) { + this.policyName = policyName; + this.policyType = policyType; + this.unparsed |= !policyType.isValid(); + this.scope = scope; + this.source = source; + this.unparsed |= !source.isValid(); + this.tagKey = tagKey; + this.tagValuePatterns = tagValuePatterns; + } + + public TagPolicyCreateAttributes enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the policy is currently enforced. Defaults to true for newly created + * policies. + * + * @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 TagPolicyCreateAttributes negated(Boolean negated) { + this.negated = negated; + return this; + } + + /** + * When true, the policy matches tag values that do NOT match any of the supplied + * patterns. Defaults to false. + * + * @return negated + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEGATED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getNegated() { + return negated; + } + + public void setNegated(Boolean negated) { + this.negated = negated; + } + + public TagPolicyCreateAttributes policyName(String policyName) { + this.policyName = policyName; + return this; + } + + /** + * Human-readable name for the tag policy. + * + * @return policyName + */ + @JsonProperty(JSON_PROPERTY_POLICY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPolicyName() { + return policyName; + } + + public void setPolicyName(String policyName) { + this.policyName = policyName; + } + + public TagPolicyCreateAttributes policyType(TagPolicyCreateType policyType) { + this.policyType = policyType; + this.unparsed |= !policyType.isValid(); + return this; + } + + /** + * The policy type allowed when creating a tag policy. Only surfacing is accepted at + * creation time. + * + * @return policyType + */ + @JsonProperty(JSON_PROPERTY_POLICY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TagPolicyCreateType getPolicyType() { + return policyType; + } + + public void setPolicyType(TagPolicyCreateType policyType) { + if (!policyType.isValid()) { + this.unparsed = true; + } + this.policyType = policyType; + } + + public TagPolicyCreateAttributes required(Boolean required) { + this.required = required; + return this; + } + + /** + * When true, telemetry without this tag is treated as a violation. Defaults to + * false. + * + * @return required + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUIRED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRequired() { + return required; + } + + public void setRequired(Boolean required) { + this.required = required; + } + + public TagPolicyCreateAttributes scope(String scope) { + this.scope = scope; + return this; + } + + /** + * The scope the policy applies within. Typically an environment, team, or organization-level + * identifier used to limit where the policy is enforced. + * + * @return scope + */ + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getScope() { + return scope; + } + + public void setScope(String scope) { + this.scope = scope; + } + + public TagPolicyCreateAttributes source(TagPolicySource source) { + this.source = source; + this.unparsed |= !source.isValid(); + return this; + } + + /** + * The telemetry source that a tag policy applies to. + * + * @return source + */ + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TagPolicySource getSource() { + return source; + } + + public void setSource(TagPolicySource source) { + if (!source.isValid()) { + this.unparsed = true; + } + this.source = source; + } + + public TagPolicyCreateAttributes tagKey(String tagKey) { + this.tagKey = tagKey; + return this; + } + + /** + * The tag key that the policy governs (for example, service). + * + * @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 TagPolicyCreateAttributes tagValuePatterns(List tagValuePatterns) { + this.tagValuePatterns = tagValuePatterns; + return this; + } + + public TagPolicyCreateAttributes addTagValuePatternsItem(String tagValuePatternsItem) { + this.tagValuePatterns.add(tagValuePatternsItem); + return this; + } + + /** + * One or more patterns that valid values for the tag key must match. At least one pattern is + * required. + * + * @return tagValuePatterns + */ + @JsonProperty(JSON_PROPERTY_TAG_VALUE_PATTERNS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTagValuePatterns() { + return tagValuePatterns; + } + + public void setTagValuePatterns(List tagValuePatterns) { + this.tagValuePatterns = tagValuePatterns; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagPolicyCreateAttributes + */ + @JsonAnySetter + public TagPolicyCreateAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagPolicyCreateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagPolicyCreateAttributes tagPolicyCreateAttributes = (TagPolicyCreateAttributes) o; + return Objects.equals(this.enabled, tagPolicyCreateAttributes.enabled) + && Objects.equals(this.negated, tagPolicyCreateAttributes.negated) + && Objects.equals(this.policyName, tagPolicyCreateAttributes.policyName) + && Objects.equals(this.policyType, tagPolicyCreateAttributes.policyType) + && Objects.equals(this.required, tagPolicyCreateAttributes.required) + && Objects.equals(this.scope, tagPolicyCreateAttributes.scope) + && Objects.equals(this.source, tagPolicyCreateAttributes.source) + && Objects.equals(this.tagKey, tagPolicyCreateAttributes.tagKey) + && Objects.equals(this.tagValuePatterns, tagPolicyCreateAttributes.tagValuePatterns) + && Objects.equals( + this.additionalProperties, tagPolicyCreateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + enabled, + negated, + policyName, + policyType, + required, + scope, + source, + tagKey, + tagValuePatterns, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagPolicyCreateAttributes {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" negated: ").append(toIndentedString(negated)).append("\n"); + sb.append(" policyName: ").append(toIndentedString(policyName)).append("\n"); + sb.append(" policyType: ").append(toIndentedString(policyType)).append("\n"); + sb.append(" required: ").append(toIndentedString(required)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" tagKey: ").append(toIndentedString(tagKey)).append("\n"); + sb.append(" tagValuePatterns: ").append(toIndentedString(tagValuePatterns)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagPolicyCreateData.java b/src/main/java/com/datadog/api/client/v2/model/TagPolicyCreateData.java new file mode 100644 index 00000000000..f82eb2aa6f1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagPolicyCreateData.java @@ -0,0 +1,181 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object for creating a tag policy. */ +@JsonPropertyOrder({ + TagPolicyCreateData.JSON_PROPERTY_ATTRIBUTES, + TagPolicyCreateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagPolicyCreateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private TagPolicyCreateAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private TagPolicyResourceType type; + + public TagPolicyCreateData() {} + + @JsonCreator + public TagPolicyCreateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + TagPolicyCreateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) TagPolicyResourceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public TagPolicyCreateData attributes(TagPolicyCreateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes that can be supplied when creating a tag policy. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TagPolicyCreateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(TagPolicyCreateAttributes attributes) { + this.attributes = attributes; + } + + public TagPolicyCreateData type(TagPolicyResourceType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * JSON:API resource type for a tag policy. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TagPolicyResourceType getType() { + return type; + } + + public void setType(TagPolicyResourceType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagPolicyCreateData + */ + @JsonAnySetter + public TagPolicyCreateData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagPolicyCreateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagPolicyCreateData tagPolicyCreateData = (TagPolicyCreateData) o; + return Objects.equals(this.attributes, tagPolicyCreateData.attributes) + && Objects.equals(this.type, tagPolicyCreateData.type) + && Objects.equals(this.additionalProperties, tagPolicyCreateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagPolicyCreateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagPolicyCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/TagPolicyCreateRequest.java new file mode 100644 index 00000000000..6691eee42df --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagPolicyCreateRequest.java @@ -0,0 +1,145 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Payload for creating a new tag policy. */ +@JsonPropertyOrder({TagPolicyCreateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagPolicyCreateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private TagPolicyCreateData data; + + public TagPolicyCreateRequest() {} + + @JsonCreator + public TagPolicyCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) TagPolicyCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public TagPolicyCreateRequest data(TagPolicyCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for creating a tag policy. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TagPolicyCreateData getData() { + return data; + } + + public void setData(TagPolicyCreateData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagPolicyCreateRequest + */ + @JsonAnySetter + public TagPolicyCreateRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagPolicyCreateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagPolicyCreateRequest tagPolicyCreateRequest = (TagPolicyCreateRequest) o; + return Objects.equals(this.data, tagPolicyCreateRequest.data) + && Objects.equals(this.additionalProperties, tagPolicyCreateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagPolicyCreateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceType.java b/src/main/java/com/datadog/api/client/v2/model/TagPolicyCreateType.java similarity index 58% rename from src/main/java/com/datadog/api/client/v2/model/IncidentServiceType.java rename to src/main/java/com/datadog/api/client/v2/model/TagPolicyCreateType.java index 06e99481931..7bdc140efc0 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceType.java +++ b/src/main/java/com/datadog/api/client/v2/model/TagPolicyCreateType.java @@ -18,37 +18,40 @@ import java.util.HashSet; import java.util.Set; -/** Incident service resource type. */ -@JsonSerialize(using = IncidentServiceType.IncidentServiceTypeSerializer.class) -public class IncidentServiceType extends ModelEnum { +/** + * The policy type allowed when creating a tag policy. Only surfacing is accepted at + * creation time. + */ +@JsonSerialize(using = TagPolicyCreateType.TagPolicyCreateTypeSerializer.class) +public class TagPolicyCreateType extends ModelEnum { - private static final Set allowedValues = new HashSet(Arrays.asList("services")); + private static final Set allowedValues = new HashSet(Arrays.asList("surfacing")); - public static final IncidentServiceType SERVICES = new IncidentServiceType("services"); + public static final TagPolicyCreateType SURFACING = new TagPolicyCreateType("surfacing"); - IncidentServiceType(String value) { + TagPolicyCreateType(String value) { super(value, allowedValues); } - public static class IncidentServiceTypeSerializer extends StdSerializer { - public IncidentServiceTypeSerializer(Class t) { + public static class TagPolicyCreateTypeSerializer extends StdSerializer { + public TagPolicyCreateTypeSerializer(Class t) { super(t); } - public IncidentServiceTypeSerializer() { + public TagPolicyCreateTypeSerializer() { this(null); } @Override public void serialize( - IncidentServiceType value, JsonGenerator jgen, SerializerProvider provider) + TagPolicyCreateType value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { jgen.writeObject(value.value); } } @JsonCreator - public static IncidentServiceType fromValue(String value) { - return new IncidentServiceType(value); + public static TagPolicyCreateType fromValue(String value) { + return new TagPolicyCreateType(value); } } diff --git a/src/main/java/com/datadog/api/client/v2/model/TagPolicyData.java b/src/main/java/com/datadog/api/client/v2/model/TagPolicyData.java new file mode 100644 index 00000000000..302fd73b697 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagPolicyData.java @@ -0,0 +1,238 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A tag policy resource. */ +@JsonPropertyOrder({ + TagPolicyData.JSON_PROPERTY_ATTRIBUTES, + TagPolicyData.JSON_PROPERTY_ID, + TagPolicyData.JSON_PROPERTY_RELATIONSHIPS, + TagPolicyData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagPolicyData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private TagPolicyAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private TagPolicyRelationships relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private TagPolicyResourceType type; + + public TagPolicyData() {} + + @JsonCreator + public TagPolicyData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + TagPolicyAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) TagPolicyResourceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public TagPolicyData attributes(TagPolicyAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The attributes of a tag policy resource. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TagPolicyAttributes getAttributes() { + return attributes; + } + + public void setAttributes(TagPolicyAttributes attributes) { + this.attributes = attributes; + } + + public TagPolicyData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the tag policy. + * + * @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 TagPolicyData relationships(TagPolicyRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Related resources for a tag policy. Only present when the corresponding include + * query parameter is supplied. + * + * @return relationships + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TagPolicyRelationships getRelationships() { + return relationships; + } + + public void setRelationships(TagPolicyRelationships relationships) { + this.relationships = relationships; + } + + public TagPolicyData type(TagPolicyResourceType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * JSON:API resource type for a tag policy. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TagPolicyResourceType getType() { + return type; + } + + public void setType(TagPolicyResourceType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagPolicyData + */ + @JsonAnySetter + public TagPolicyData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagPolicyData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagPolicyData tagPolicyData = (TagPolicyData) o; + return Objects.equals(this.attributes, tagPolicyData.attributes) + && Objects.equals(this.id, tagPolicyData.id) + && Objects.equals(this.relationships, tagPolicyData.relationships) + && Objects.equals(this.type, tagPolicyData.type) + && Objects.equals(this.additionalProperties, tagPolicyData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagPolicyData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagPolicyInclude.java b/src/main/java/com/datadog/api/client/v2/model/TagPolicyInclude.java new file mode 100644 index 00000000000..6c88da7b102 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagPolicyInclude.java @@ -0,0 +1,56 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * A related resource to include alongside a tag policy in the response. Currently the only + * supported value is score. + */ +@JsonSerialize(using = TagPolicyInclude.TagPolicyIncludeSerializer.class) +public class TagPolicyInclude extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("score")); + + public static final TagPolicyInclude SCORE = new TagPolicyInclude("score"); + + TagPolicyInclude(String value) { + super(value, allowedValues); + } + + public static class TagPolicyIncludeSerializer extends StdSerializer { + public TagPolicyIncludeSerializer(Class t) { + super(t); + } + + public TagPolicyIncludeSerializer() { + this(null); + } + + @Override + public void serialize(TagPolicyInclude value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static TagPolicyInclude fromValue(String value) { + return new TagPolicyInclude(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagPolicyRelationships.java b/src/main/java/com/datadog/api/client/v2/model/TagPolicyRelationships.java new file mode 100644 index 00000000000..8bf9f7a825d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagPolicyRelationships.java @@ -0,0 +1,139 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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; + +/** + * Related resources for a tag policy. Only present when the corresponding include + * query parameter is supplied. + */ +@JsonPropertyOrder({TagPolicyRelationships.JSON_PROPERTY_SCORE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagPolicyRelationships { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_SCORE = "score"; + private TagPolicyScoreRelationship score; + + public TagPolicyRelationships score(TagPolicyScoreRelationship score) { + this.score = score; + this.unparsed |= score.unparsed; + return this; + } + + /** + * A relationship to the compliance score resource for this policy. + * + * @return score + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCORE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TagPolicyScoreRelationship getScore() { + return score; + } + + public void setScore(TagPolicyScoreRelationship score) { + this.score = score; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagPolicyRelationships + */ + @JsonAnySetter + public TagPolicyRelationships putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagPolicyRelationships object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagPolicyRelationships tagPolicyRelationships = (TagPolicyRelationships) o; + return Objects.equals(this.score, tagPolicyRelationships.score) + && Objects.equals(this.additionalProperties, tagPolicyRelationships.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(score, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagPolicyRelationships {\n"); + sb.append(" score: ").append(toIndentedString(score)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagPolicyResourceType.java b/src/main/java/com/datadog/api/client/v2/model/TagPolicyResourceType.java new file mode 100644 index 00000000000..f420305461d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagPolicyResourceType.java @@ -0,0 +1,54 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** JSON:API resource type for a tag policy. */ +@JsonSerialize(using = TagPolicyResourceType.TagPolicyResourceTypeSerializer.class) +public class TagPolicyResourceType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("tag_policy")); + + public static final TagPolicyResourceType TAG_POLICY = new TagPolicyResourceType("tag_policy"); + + TagPolicyResourceType(String value) { + super(value, allowedValues); + } + + public static class TagPolicyResourceTypeSerializer extends StdSerializer { + public TagPolicyResourceTypeSerializer(Class t) { + super(t); + } + + public TagPolicyResourceTypeSerializer() { + this(null); + } + + @Override + public void serialize( + TagPolicyResourceType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static TagPolicyResourceType fromValue(String value) { + return new TagPolicyResourceType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceResponse.java b/src/main/java/com/datadog/api/client/v2/model/TagPolicyResponse.java similarity index 68% rename from src/main/java/com/datadog/api/client/v2/model/IncidentServiceResponse.java rename to src/main/java/com/datadog/api/client/v2/model/TagPolicyResponse.java index 3bd4e5328d5..d3cbceb3d6b 100644 --- a/src/main/java/com/datadog/api/client/v2/model/IncidentServiceResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/TagPolicyResponse.java @@ -13,68 +13,88 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; -/** Response with an incident service payload. */ -@JsonPropertyOrder({ - IncidentServiceResponse.JSON_PROPERTY_DATA, - IncidentServiceResponse.JSON_PROPERTY_INCLUDED -}) +/** A single tag policy. */ +@JsonPropertyOrder({TagPolicyResponse.JSON_PROPERTY_DATA, TagPolicyResponse.JSON_PROPERTY_INCLUDED}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class IncidentServiceResponse { +public class TagPolicyResponse { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private IncidentServiceResponseData data; + private TagPolicyData data; public static final String JSON_PROPERTY_INCLUDED = "included"; - private List included = null; + private List included = null; - public IncidentServiceResponse() {} + public TagPolicyResponse() {} @JsonCreator - public IncidentServiceResponse( - @JsonProperty(required = true, value = JSON_PROPERTY_DATA) IncidentServiceResponseData data) { + public TagPolicyResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) TagPolicyData data) { this.data = data; this.unparsed |= data.unparsed; } - public IncidentServiceResponse data(IncidentServiceResponseData data) { + public TagPolicyResponse data(TagPolicyData data) { this.data = data; this.unparsed |= data.unparsed; return this; } /** - * Incident Service data from responses. + * A tag policy resource. * * @return data */ @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public IncidentServiceResponseData getData() { + public TagPolicyData getData() { return data; } - public void setData(IncidentServiceResponseData data) { + public void setData(TagPolicyData data) { this.data = data; } + public TagPolicyResponse included(List included) { + this.included = included; + for (TagPolicyScoreData item : included) { + this.unparsed |= item.unparsed; + } + return this; + } + + public TagPolicyResponse addIncludedItem(TagPolicyScoreData includedItem) { + if (this.included == null) { + this.included = new ArrayList<>(); + } + this.included.add(includedItem); + this.unparsed |= includedItem.unparsed; + return this; + } + /** - * Included objects from relationships. + * Related resources fetched alongside the primary tag policies. Populated when an include + * query parameter is supplied. * * @return included */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_INCLUDED) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getIncluded() { + public List getIncluded() { return included; } + public void setIncluded(List included) { + this.included = included; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -87,10 +107,10 @@ public List getIncluded() { * * @param key The arbitrary key to set * @param value The associated value - * @return IncidentServiceResponse + * @return TagPolicyResponse */ @JsonAnySetter - public IncidentServiceResponse putAdditionalProperty(String key, Object value) { + public TagPolicyResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -121,7 +141,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this IncidentServiceResponse object is equal to o. */ + /** Return true if this TagPolicyResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -130,10 +150,10 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - IncidentServiceResponse incidentServiceResponse = (IncidentServiceResponse) o; - return Objects.equals(this.data, incidentServiceResponse.data) - && Objects.equals(this.included, incidentServiceResponse.included) - && Objects.equals(this.additionalProperties, incidentServiceResponse.additionalProperties); + TagPolicyResponse tagPolicyResponse = (TagPolicyResponse) o; + return Objects.equals(this.data, tagPolicyResponse.data) + && Objects.equals(this.included, tagPolicyResponse.included) + && Objects.equals(this.additionalProperties, tagPolicyResponse.additionalProperties); } @Override @@ -144,7 +164,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class IncidentServiceResponse {\n"); + sb.append("class TagPolicyResponse {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" included: ").append(toIndentedString(included)).append("\n"); sb.append(" additionalProperties: ") diff --git a/src/main/java/com/datadog/api/client/v2/model/TagPolicyScoreAttributes.java b/src/main/java/com/datadog/api/client/v2/model/TagPolicyScoreAttributes.java new file mode 100644 index 00000000000..1fce6452a29 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagPolicyScoreAttributes.java @@ -0,0 +1,233 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a tag policy compliance score. */ +@JsonPropertyOrder({ + TagPolicyScoreAttributes.JSON_PROPERTY_SCORE, + TagPolicyScoreAttributes.JSON_PROPERTY_TS_END, + TagPolicyScoreAttributes.JSON_PROPERTY_TS_START, + TagPolicyScoreAttributes.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagPolicyScoreAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_SCORE = "score"; + private Double score; + + public static final String JSON_PROPERTY_TS_END = "ts_end"; + private Long tsEnd; + + public static final String JSON_PROPERTY_TS_START = "ts_start"; + private Long tsStart; + + public static final String JSON_PROPERTY_VERSION = "version"; + private Long version; + + public TagPolicyScoreAttributes() {} + + @JsonCreator + public TagPolicyScoreAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_SCORE) Double score, + @JsonProperty(required = true, value = JSON_PROPERTY_TS_END) Long tsEnd, + @JsonProperty(required = true, value = JSON_PROPERTY_TS_START) Long tsStart, + @JsonProperty(required = true, value = JSON_PROPERTY_VERSION) Long version) { + this.score = score; + if (score != null) {} + this.tsEnd = tsEnd; + this.tsStart = tsStart; + this.version = version; + } + + public TagPolicyScoreAttributes score(Double score) { + this.score = score; + if (score != null) {} + return this; + } + + /** + * The compliance score for the policy over the requested time window, as a percentage between 0 + * and 100. null indicates that no relevant telemetry was found. + * + * @return score + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCORE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Double getScore() { + return score; + } + + public void setScore(Double score) { + this.score = score; + } + + public TagPolicyScoreAttributes tsEnd(Long tsEnd) { + this.tsEnd = tsEnd; + return this; + } + + /** + * End of the time window the score was computed over, as a Unix timestamp in milliseconds. + * + * @return tsEnd + */ + @JsonProperty(JSON_PROPERTY_TS_END) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getTsEnd() { + return tsEnd; + } + + public void setTsEnd(Long tsEnd) { + this.tsEnd = tsEnd; + } + + public TagPolicyScoreAttributes tsStart(Long tsStart) { + this.tsStart = tsStart; + return this; + } + + /** + * Start of the time window the score was computed over, as a Unix timestamp in milliseconds. + * + * @return tsStart + */ + @JsonProperty(JSON_PROPERTY_TS_START) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getTsStart() { + return tsStart; + } + + public void setTsStart(Long tsStart) { + this.tsStart = tsStart; + } + + public TagPolicyScoreAttributes version(Long version) { + this.version = version; + return this; + } + + /** + * The version of the tag policy that the score was computed against. + * + * @return version + */ + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getVersion() { + return version; + } + + public void setVersion(Long version) { + this.version = version; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagPolicyScoreAttributes + */ + @JsonAnySetter + public TagPolicyScoreAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagPolicyScoreAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagPolicyScoreAttributes tagPolicyScoreAttributes = (TagPolicyScoreAttributes) o; + return Objects.equals(this.score, tagPolicyScoreAttributes.score) + && Objects.equals(this.tsEnd, tagPolicyScoreAttributes.tsEnd) + && Objects.equals(this.tsStart, tagPolicyScoreAttributes.tsStart) + && Objects.equals(this.version, tagPolicyScoreAttributes.version) + && Objects.equals(this.additionalProperties, tagPolicyScoreAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(score, tsEnd, tsStart, version, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagPolicyScoreAttributes {\n"); + sb.append(" score: ").append(toIndentedString(score)).append("\n"); + sb.append(" tsEnd: ").append(toIndentedString(tsEnd)).append("\n"); + sb.append(" tsStart: ").append(toIndentedString(tsStart)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagPolicyScoreData.java b/src/main/java/com/datadog/api/client/v2/model/TagPolicyScoreData.java new file mode 100644 index 00000000000..2a8edb37fca --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagPolicyScoreData.java @@ -0,0 +1,209 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A compliance score resource for a tag policy. */ +@JsonPropertyOrder({ + TagPolicyScoreData.JSON_PROPERTY_ATTRIBUTES, + TagPolicyScoreData.JSON_PROPERTY_ID, + TagPolicyScoreData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagPolicyScoreData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private TagPolicyScoreAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private TagPolicyScoreResourceType type; + + public TagPolicyScoreData() {} + + @JsonCreator + public TagPolicyScoreData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + TagPolicyScoreAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) TagPolicyScoreResourceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public TagPolicyScoreData attributes(TagPolicyScoreAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a tag policy compliance score. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TagPolicyScoreAttributes getAttributes() { + return attributes; + } + + public void setAttributes(TagPolicyScoreAttributes attributes) { + this.attributes = attributes; + } + + public TagPolicyScoreData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the compliance score resource. + * + * @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 TagPolicyScoreData type(TagPolicyScoreResourceType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * JSON:API resource type for a tag policy compliance score. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TagPolicyScoreResourceType getType() { + return type; + } + + public void setType(TagPolicyScoreResourceType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagPolicyScoreData + */ + @JsonAnySetter + public TagPolicyScoreData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagPolicyScoreData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagPolicyScoreData tagPolicyScoreData = (TagPolicyScoreData) o; + return Objects.equals(this.attributes, tagPolicyScoreData.attributes) + && Objects.equals(this.id, tagPolicyScoreData.id) + && Objects.equals(this.type, tagPolicyScoreData.type) + && Objects.equals(this.additionalProperties, tagPolicyScoreData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagPolicyScoreData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagPolicyScoreRelationship.java b/src/main/java/com/datadog/api/client/v2/model/TagPolicyScoreRelationship.java new file mode 100644 index 00000000000..4c6c2338db3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagPolicyScoreRelationship.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A relationship to the compliance score resource for this policy. */ +@JsonPropertyOrder({TagPolicyScoreRelationship.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagPolicyScoreRelationship { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private TagPolicyScoreRelationshipData data; + + public TagPolicyScoreRelationship() {} + + @JsonCreator + public TagPolicyScoreRelationship( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + TagPolicyScoreRelationshipData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public TagPolicyScoreRelationship data(TagPolicyScoreRelationshipData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Identifier of the related compliance score resource. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TagPolicyScoreRelationshipData getData() { + return data; + } + + public void setData(TagPolicyScoreRelationshipData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagPolicyScoreRelationship + */ + @JsonAnySetter + public TagPolicyScoreRelationship putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagPolicyScoreRelationship object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagPolicyScoreRelationship tagPolicyScoreRelationship = (TagPolicyScoreRelationship) o; + return Objects.equals(this.data, tagPolicyScoreRelationship.data) + && Objects.equals( + this.additionalProperties, tagPolicyScoreRelationship.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagPolicyScoreRelationship {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagPolicyScoreRelationshipData.java b/src/main/java/com/datadog/api/client/v2/model/TagPolicyScoreRelationshipData.java new file mode 100644 index 00000000000..1779f4954e5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagPolicyScoreRelationshipData.java @@ -0,0 +1,180 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Identifier of the related compliance score resource. */ +@JsonPropertyOrder({ + TagPolicyScoreRelationshipData.JSON_PROPERTY_ID, + TagPolicyScoreRelationshipData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagPolicyScoreRelationshipData { + @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 TagPolicyScoreResourceType type; + + public TagPolicyScoreRelationshipData() {} + + @JsonCreator + public TagPolicyScoreRelationshipData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) TagPolicyScoreResourceType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public TagPolicyScoreRelationshipData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the related compliance score resource. + * + * @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 TagPolicyScoreRelationshipData type(TagPolicyScoreResourceType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * JSON:API resource type for a tag policy compliance score. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TagPolicyScoreResourceType getType() { + return type; + } + + public void setType(TagPolicyScoreResourceType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagPolicyScoreRelationshipData + */ + @JsonAnySetter + public TagPolicyScoreRelationshipData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagPolicyScoreRelationshipData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagPolicyScoreRelationshipData tagPolicyScoreRelationshipData = + (TagPolicyScoreRelationshipData) o; + return Objects.equals(this.id, tagPolicyScoreRelationshipData.id) + && Objects.equals(this.type, tagPolicyScoreRelationshipData.type) + && Objects.equals( + this.additionalProperties, tagPolicyScoreRelationshipData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagPolicyScoreRelationshipData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagPolicyScoreResourceType.java b/src/main/java/com/datadog/api/client/v2/model/TagPolicyScoreResourceType.java new file mode 100644 index 00000000000..b6fefba46f8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagPolicyScoreResourceType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** JSON:API resource type for a tag policy compliance score. */ +@JsonSerialize(using = TagPolicyScoreResourceType.TagPolicyScoreResourceTypeSerializer.class) +public class TagPolicyScoreResourceType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("tag_policy_score")); + + public static final TagPolicyScoreResourceType TAG_POLICY_SCORE = + new TagPolicyScoreResourceType("tag_policy_score"); + + TagPolicyScoreResourceType(String value) { + super(value, allowedValues); + } + + public static class TagPolicyScoreResourceTypeSerializer + extends StdSerializer { + public TagPolicyScoreResourceTypeSerializer(Class t) { + super(t); + } + + public TagPolicyScoreResourceTypeSerializer() { + this(null); + } + + @Override + public void serialize( + TagPolicyScoreResourceType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static TagPolicyScoreResourceType fromValue(String value) { + return new TagPolicyScoreResourceType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagPolicyScoreResponse.java b/src/main/java/com/datadog/api/client/v2/model/TagPolicyScoreResponse.java new file mode 100644 index 00000000000..063edc423f3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagPolicyScoreResponse.java @@ -0,0 +1,145 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A tag policy compliance score. */ +@JsonPropertyOrder({TagPolicyScoreResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagPolicyScoreResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private TagPolicyScoreData data; + + public TagPolicyScoreResponse() {} + + @JsonCreator + public TagPolicyScoreResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) TagPolicyScoreData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public TagPolicyScoreResponse data(TagPolicyScoreData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * A compliance score resource for a tag policy. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TagPolicyScoreData getData() { + return data; + } + + public void setData(TagPolicyScoreData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagPolicyScoreResponse + */ + @JsonAnySetter + public TagPolicyScoreResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagPolicyScoreResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagPolicyScoreResponse tagPolicyScoreResponse = (TagPolicyScoreResponse) o; + return Objects.equals(this.data, tagPolicyScoreResponse.data) + && Objects.equals(this.additionalProperties, tagPolicyScoreResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagPolicyScoreResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagPolicySource.java b/src/main/java/com/datadog/api/client/v2/model/TagPolicySource.java new file mode 100644 index 00000000000..fae2c66be0f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagPolicySource.java @@ -0,0 +1,58 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The telemetry source that a tag policy applies to. */ +@JsonSerialize(using = TagPolicySource.TagPolicySourceSerializer.class) +public class TagPolicySource extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("logs", "spans", "metrics", "rum", "feed")); + + public static final TagPolicySource LOGS = new TagPolicySource("logs"); + public static final TagPolicySource SPANS = new TagPolicySource("spans"); + public static final TagPolicySource METRICS = new TagPolicySource("metrics"); + public static final TagPolicySource RUM = new TagPolicySource("rum"); + public static final TagPolicySource FEED = new TagPolicySource("feed"); + + TagPolicySource(String value) { + super(value, allowedValues); + } + + public static class TagPolicySourceSerializer extends StdSerializer { + public TagPolicySourceSerializer(Class t) { + super(t); + } + + public TagPolicySourceSerializer() { + this(null); + } + + @Override + public void serialize(TagPolicySource value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static TagPolicySource fromValue(String value) { + return new TagPolicySource(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagPolicyType.java b/src/main/java/com/datadog/api/client/v2/model/TagPolicyType.java new file mode 100644 index 00000000000..fece6577b57 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagPolicyType.java @@ -0,0 +1,58 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * How the policy is enforced. blocking rejects telemetry that violates the policy. + * surfacing only highlights non-compliant telemetry without blocking it. + */ +@JsonSerialize(using = TagPolicyType.TagPolicyTypeSerializer.class) +public class TagPolicyType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("blocking", "surfacing")); + + public static final TagPolicyType BLOCKING = new TagPolicyType("blocking"); + public static final TagPolicyType SURFACING = new TagPolicyType("surfacing"); + + TagPolicyType(String value) { + super(value, allowedValues); + } + + public static class TagPolicyTypeSerializer extends StdSerializer { + public TagPolicyTypeSerializer(Class t) { + super(t); + } + + public TagPolicyTypeSerializer() { + this(null); + } + + @Override + public void serialize(TagPolicyType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static TagPolicyType fromValue(String value) { + return new TagPolicyType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagPolicyUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/TagPolicyUpdateAttributes.java new file mode 100644 index 00000000000..0fafc50b784 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagPolicyUpdateAttributes.java @@ -0,0 +1,355 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import 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; + +/** + * Mutable attributes of a tag policy. Each field is optional; omitting a field leaves its current + * value unchanged. The source of a policy cannot be changed. + */ +@JsonPropertyOrder({ + TagPolicyUpdateAttributes.JSON_PROPERTY_ENABLED, + TagPolicyUpdateAttributes.JSON_PROPERTY_NEGATED, + TagPolicyUpdateAttributes.JSON_PROPERTY_POLICY_NAME, + TagPolicyUpdateAttributes.JSON_PROPERTY_POLICY_TYPE, + TagPolicyUpdateAttributes.JSON_PROPERTY_REQUIRED, + TagPolicyUpdateAttributes.JSON_PROPERTY_SCOPE, + TagPolicyUpdateAttributes.JSON_PROPERTY_TAG_KEY, + TagPolicyUpdateAttributes.JSON_PROPERTY_TAG_VALUE_PATTERNS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagPolicyUpdateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_NEGATED = "negated"; + private Boolean negated; + + public static final String JSON_PROPERTY_POLICY_NAME = "policy_name"; + private String policyName; + + public static final String JSON_PROPERTY_POLICY_TYPE = "policy_type"; + private TagPolicyType policyType; + + public static final String JSON_PROPERTY_REQUIRED = "required"; + private Boolean required; + + public static final String JSON_PROPERTY_SCOPE = "scope"; + private String scope; + + public static final String JSON_PROPERTY_TAG_KEY = "tag_key"; + private String tagKey; + + public static final String JSON_PROPERTY_TAG_VALUE_PATTERNS = "tag_value_patterns"; + private List tagValuePatterns = null; + + public TagPolicyUpdateAttributes enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the policy is currently enforced. + * + * @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 TagPolicyUpdateAttributes negated(Boolean negated) { + this.negated = negated; + return this; + } + + /** + * When true, the policy matches tag values that do NOT match any of the supplied + * patterns. + * + * @return negated + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEGATED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getNegated() { + return negated; + } + + public void setNegated(Boolean negated) { + this.negated = negated; + } + + public TagPolicyUpdateAttributes policyName(String policyName) { + this.policyName = policyName; + return this; + } + + /** + * Human-readable name for the tag policy. + * + * @return policyName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POLICY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPolicyName() { + return policyName; + } + + public void setPolicyName(String policyName) { + this.policyName = policyName; + } + + public TagPolicyUpdateAttributes policyType(TagPolicyType policyType) { + this.policyType = policyType; + this.unparsed |= !policyType.isValid(); + return this; + } + + /** + * How the policy is enforced. blocking rejects telemetry that violates the policy. + * surfacing only highlights non-compliant telemetry without blocking it. + * + * @return policyType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POLICY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TagPolicyType getPolicyType() { + return policyType; + } + + public void setPolicyType(TagPolicyType policyType) { + if (!policyType.isValid()) { + this.unparsed = true; + } + this.policyType = policyType; + } + + public TagPolicyUpdateAttributes required(Boolean required) { + this.required = required; + return this; + } + + /** + * When true, telemetry without this tag is treated as a violation. + * + * @return required + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUIRED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRequired() { + return required; + } + + public void setRequired(Boolean required) { + this.required = required; + } + + public TagPolicyUpdateAttributes scope(String scope) { + this.scope = scope; + return this; + } + + /** + * The scope the policy applies within. + * + * @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 TagPolicyUpdateAttributes tagKey(String tagKey) { + this.tagKey = tagKey; + return this; + } + + /** + * The tag key that the policy governs. + * + * @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 TagPolicyUpdateAttributes tagValuePatterns(List tagValuePatterns) { + this.tagValuePatterns = tagValuePatterns; + return this; + } + + public TagPolicyUpdateAttributes addTagValuePatternsItem(String tagValuePatternsItem) { + if (this.tagValuePatterns == null) { + this.tagValuePatterns = new ArrayList<>(); + } + this.tagValuePatterns.add(tagValuePatternsItem); + return this; + } + + /** + * One or more patterns that valid values for the tag key must match. + * + * @return tagValuePatterns + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAG_VALUE_PATTERNS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTagValuePatterns() { + return tagValuePatterns; + } + + public void setTagValuePatterns(List tagValuePatterns) { + this.tagValuePatterns = tagValuePatterns; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagPolicyUpdateAttributes + */ + @JsonAnySetter + public TagPolicyUpdateAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagPolicyUpdateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagPolicyUpdateAttributes tagPolicyUpdateAttributes = (TagPolicyUpdateAttributes) o; + return Objects.equals(this.enabled, tagPolicyUpdateAttributes.enabled) + && Objects.equals(this.negated, tagPolicyUpdateAttributes.negated) + && Objects.equals(this.policyName, tagPolicyUpdateAttributes.policyName) + && Objects.equals(this.policyType, tagPolicyUpdateAttributes.policyType) + && Objects.equals(this.required, tagPolicyUpdateAttributes.required) + && Objects.equals(this.scope, tagPolicyUpdateAttributes.scope) + && Objects.equals(this.tagKey, tagPolicyUpdateAttributes.tagKey) + && Objects.equals(this.tagValuePatterns, tagPolicyUpdateAttributes.tagValuePatterns) + && Objects.equals( + this.additionalProperties, tagPolicyUpdateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + enabled, + negated, + policyName, + policyType, + required, + scope, + tagKey, + tagValuePatterns, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagPolicyUpdateAttributes {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" negated: ").append(toIndentedString(negated)).append("\n"); + sb.append(" policyName: ").append(toIndentedString(policyName)).append("\n"); + sb.append(" policyType: ").append(toIndentedString(policyType)).append("\n"); + sb.append(" required: ").append(toIndentedString(required)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" tagKey: ").append(toIndentedString(tagKey)).append("\n"); + sb.append(" tagValuePatterns: ").append(toIndentedString(tagValuePatterns)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagPolicyUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/TagPolicyUpdateData.java new file mode 100644 index 00000000000..f621c314427 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagPolicyUpdateData.java @@ -0,0 +1,207 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object for updating a tag policy. */ +@JsonPropertyOrder({ + TagPolicyUpdateData.JSON_PROPERTY_ATTRIBUTES, + TagPolicyUpdateData.JSON_PROPERTY_ID, + TagPolicyUpdateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagPolicyUpdateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private TagPolicyUpdateAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private TagPolicyResourceType type; + + public TagPolicyUpdateData() {} + + @JsonCreator + public TagPolicyUpdateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) TagPolicyResourceType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public TagPolicyUpdateData attributes(TagPolicyUpdateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Mutable attributes of a tag policy. Each field is optional; omitting a field leaves its current + * value unchanged. The source of a policy cannot be changed. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TagPolicyUpdateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(TagPolicyUpdateAttributes attributes) { + this.attributes = attributes; + } + + public TagPolicyUpdateData id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier of the tag policy being updated. + * + * @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 TagPolicyUpdateData type(TagPolicyResourceType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * JSON:API resource type for a tag policy. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TagPolicyResourceType getType() { + return type; + } + + public void setType(TagPolicyResourceType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagPolicyUpdateData + */ + @JsonAnySetter + public TagPolicyUpdateData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagPolicyUpdateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagPolicyUpdateData tagPolicyUpdateData = (TagPolicyUpdateData) o; + return Objects.equals(this.attributes, tagPolicyUpdateData.attributes) + && Objects.equals(this.id, tagPolicyUpdateData.id) + && Objects.equals(this.type, tagPolicyUpdateData.type) + && Objects.equals(this.additionalProperties, tagPolicyUpdateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagPolicyUpdateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TagPolicyUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/TagPolicyUpdateRequest.java new file mode 100644 index 00000000000..9c14521cf95 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TagPolicyUpdateRequest.java @@ -0,0 +1,145 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Payload for updating an existing tag policy. Only the supplied fields are modified. */ +@JsonPropertyOrder({TagPolicyUpdateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TagPolicyUpdateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private TagPolicyUpdateData data; + + public TagPolicyUpdateRequest() {} + + @JsonCreator + public TagPolicyUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) TagPolicyUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public TagPolicyUpdateRequest data(TagPolicyUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for updating a tag policy. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TagPolicyUpdateData getData() { + return data; + } + + public void setData(TagPolicyUpdateData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return TagPolicyUpdateRequest + */ + @JsonAnySetter + public TagPolicyUpdateRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this TagPolicyUpdateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TagPolicyUpdateRequest tagPolicyUpdateRequest = (TagPolicyUpdateRequest) o; + return Objects.equals(this.data, tagPolicyUpdateRequest.data) + && Objects.equals(this.additionalProperties, tagPolicyUpdateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TagPolicyUpdateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UpdateFormData.java b/src/main/java/com/datadog/api/client/v2/model/UpdateFormData.java new file mode 100644 index 00000000000..dcd5690e62c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpdateFormData.java @@ -0,0 +1,209 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** The data for updating a form. */ +@JsonPropertyOrder({ + UpdateFormData.JSON_PROPERTY_ATTRIBUTES, + UpdateFormData.JSON_PROPERTY_ID, + UpdateFormData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UpdateFormData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private UpdateFormDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private FormType type = FormType.FORMS; + + public UpdateFormData() {} + + @JsonCreator + public UpdateFormData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + UpdateFormDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) FormType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public UpdateFormData attributes(UpdateFormDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The attributes for updating a form. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UpdateFormDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(UpdateFormDataAttributes attributes) { + this.attributes = attributes; + } + + public UpdateFormData id(UUID id) { + this.id = id; + return this; + } + + /** + * The ID of the form. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public UpdateFormData type(FormType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type for a form. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FormType getType() { + return type; + } + + public void setType(FormType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UpdateFormData + */ + @JsonAnySetter + public UpdateFormData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this UpdateFormData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateFormData updateFormData = (UpdateFormData) o; + return Objects.equals(this.attributes, updateFormData.attributes) + && Objects.equals(this.id, updateFormData.id) + && Objects.equals(this.type, updateFormData.type) + && Objects.equals(this.additionalProperties, updateFormData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateFormData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UpdateFormDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/UpdateFormDataAttributes.java new file mode 100644 index 00000000000..40ed5445ae9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpdateFormDataAttributes.java @@ -0,0 +1,146 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The attributes for updating a form. */ +@JsonPropertyOrder({UpdateFormDataAttributes.JSON_PROPERTY_FORM_UPDATE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UpdateFormDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FORM_UPDATE = "form_update"; + private FormUpdateAttributes formUpdate; + + public UpdateFormDataAttributes() {} + + @JsonCreator + public UpdateFormDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_FORM_UPDATE) + FormUpdateAttributes formUpdate) { + this.formUpdate = formUpdate; + this.unparsed |= formUpdate.unparsed; + } + + public UpdateFormDataAttributes formUpdate(FormUpdateAttributes formUpdate) { + this.formUpdate = formUpdate; + this.unparsed |= formUpdate.unparsed; + return this; + } + + /** + * The fields to update on a form. At least one field must be provided. + * + * @return formUpdate + */ + @JsonProperty(JSON_PROPERTY_FORM_UPDATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FormUpdateAttributes getFormUpdate() { + return formUpdate; + } + + public void setFormUpdate(FormUpdateAttributes formUpdate) { + this.formUpdate = formUpdate; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UpdateFormDataAttributes + */ + @JsonAnySetter + public UpdateFormDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this UpdateFormDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateFormDataAttributes updateFormDataAttributes = (UpdateFormDataAttributes) o; + return Objects.equals(this.formUpdate, updateFormDataAttributes.formUpdate) + && Objects.equals(this.additionalProperties, updateFormDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(formUpdate, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateFormDataAttributes {\n"); + sb.append(" formUpdate: ").append(toIndentedString(formUpdate)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UpdateFormRequest.java b/src/main/java/com/datadog/api/client/v2/model/UpdateFormRequest.java new file mode 100644 index 00000000000..0a0f0d663ba --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpdateFormRequest.java @@ -0,0 +1,145 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A request to update a form. */ +@JsonPropertyOrder({UpdateFormRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UpdateFormRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private UpdateFormData data; + + public UpdateFormRequest() {} + + @JsonCreator + public UpdateFormRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) UpdateFormData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public UpdateFormRequest data(UpdateFormData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data for updating a form. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UpdateFormData getData() { + return data; + } + + public void setData(UpdateFormData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UpdateFormRequest + */ + @JsonAnySetter + public UpdateFormRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this UpdateFormRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateFormRequest updateFormRequest = (UpdateFormRequest) o; + return Objects.equals(this.data, updateFormRequest.data) + && Objects.equals(this.additionalProperties, updateFormRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateFormRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UpsertAndPublishFormVersionData.java b/src/main/java/com/datadog/api/client/v2/model/UpsertAndPublishFormVersionData.java new file mode 100644 index 00000000000..3f026a05c1d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpsertAndPublishFormVersionData.java @@ -0,0 +1,184 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The data for upserting and publishing a form version. */ +@JsonPropertyOrder({ + UpsertAndPublishFormVersionData.JSON_PROPERTY_ATTRIBUTES, + UpsertAndPublishFormVersionData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UpsertAndPublishFormVersionData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private UpsertAndPublishFormVersionDataAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private FormVersionType type = FormVersionType.FORM_VERSIONS; + + public UpsertAndPublishFormVersionData() {} + + @JsonCreator + public UpsertAndPublishFormVersionData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + UpsertAndPublishFormVersionDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) FormVersionType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public UpsertAndPublishFormVersionData attributes( + UpsertAndPublishFormVersionDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The attributes for upserting and publishing a form version. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UpsertAndPublishFormVersionDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(UpsertAndPublishFormVersionDataAttributes attributes) { + this.attributes = attributes; + } + + public UpsertAndPublishFormVersionData type(FormVersionType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type for a form version. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FormVersionType getType() { + return type; + } + + public void setType(FormVersionType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UpsertAndPublishFormVersionData + */ + @JsonAnySetter + public UpsertAndPublishFormVersionData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this UpsertAndPublishFormVersionData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpsertAndPublishFormVersionData upsertAndPublishFormVersionData = + (UpsertAndPublishFormVersionData) o; + return Objects.equals(this.attributes, upsertAndPublishFormVersionData.attributes) + && Objects.equals(this.type, upsertAndPublishFormVersionData.type) + && Objects.equals( + this.additionalProperties, upsertAndPublishFormVersionData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpsertAndPublishFormVersionData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UpsertAndPublishFormVersionDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/UpsertAndPublishFormVersionDataAttributes.java new file mode 100644 index 00000000000..22c29dcfdf3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpsertAndPublishFormVersionDataAttributes.java @@ -0,0 +1,217 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The attributes for upserting and publishing a form version. */ +@JsonPropertyOrder({ + UpsertAndPublishFormVersionDataAttributes.JSON_PROPERTY_DATA_DEFINITION, + UpsertAndPublishFormVersionDataAttributes.JSON_PROPERTY_UI_DEFINITION, + UpsertAndPublishFormVersionDataAttributes.JSON_PROPERTY_UPSERT_PARAMS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UpsertAndPublishFormVersionDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA_DEFINITION = "data_definition"; + private FormDataDefinition dataDefinition; + + public static final String JSON_PROPERTY_UI_DEFINITION = "ui_definition"; + private FormUiDefinition uiDefinition; + + public static final String JSON_PROPERTY_UPSERT_PARAMS = "upsert_params"; + private UpsertAndPublishFormVersionUpsertParams upsertParams; + + public UpsertAndPublishFormVersionDataAttributes() {} + + @JsonCreator + public UpsertAndPublishFormVersionDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA_DEFINITION) + FormDataDefinition dataDefinition, + @JsonProperty(required = true, value = JSON_PROPERTY_UI_DEFINITION) + FormUiDefinition uiDefinition, + @JsonProperty(required = true, value = JSON_PROPERTY_UPSERT_PARAMS) + UpsertAndPublishFormVersionUpsertParams upsertParams) { + this.dataDefinition = dataDefinition; + this.unparsed |= dataDefinition.unparsed; + this.uiDefinition = uiDefinition; + this.unparsed |= uiDefinition.unparsed; + this.upsertParams = upsertParams; + this.unparsed |= upsertParams.unparsed; + } + + public UpsertAndPublishFormVersionDataAttributes dataDefinition( + FormDataDefinition dataDefinition) { + this.dataDefinition = dataDefinition; + this.unparsed |= dataDefinition.unparsed; + return this; + } + + /** + * A JSON Schema definition that describes the form's data fields. + * + * @return dataDefinition + */ + @JsonProperty(JSON_PROPERTY_DATA_DEFINITION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FormDataDefinition getDataDefinition() { + return dataDefinition; + } + + public void setDataDefinition(FormDataDefinition dataDefinition) { + this.dataDefinition = dataDefinition; + } + + public UpsertAndPublishFormVersionDataAttributes uiDefinition(FormUiDefinition uiDefinition) { + this.uiDefinition = uiDefinition; + this.unparsed |= uiDefinition.unparsed; + return this; + } + + /** + * UI configuration for rendering form fields, including widget overrides, field ordering, and + * themes. + * + * @return uiDefinition + */ + @JsonProperty(JSON_PROPERTY_UI_DEFINITION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FormUiDefinition getUiDefinition() { + return uiDefinition; + } + + public void setUiDefinition(FormUiDefinition uiDefinition) { + this.uiDefinition = uiDefinition; + } + + public UpsertAndPublishFormVersionDataAttributes upsertParams( + UpsertAndPublishFormVersionUpsertParams upsertParams) { + this.upsertParams = upsertParams; + this.unparsed |= upsertParams.unparsed; + return this; + } + + /** + * Concurrency control parameters for the upsert and publish operation. + * + * @return upsertParams + */ + @JsonProperty(JSON_PROPERTY_UPSERT_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UpsertAndPublishFormVersionUpsertParams getUpsertParams() { + return upsertParams; + } + + public void setUpsertParams(UpsertAndPublishFormVersionUpsertParams upsertParams) { + this.upsertParams = upsertParams; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UpsertAndPublishFormVersionDataAttributes + */ + @JsonAnySetter + public UpsertAndPublishFormVersionDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this UpsertAndPublishFormVersionDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpsertAndPublishFormVersionDataAttributes upsertAndPublishFormVersionDataAttributes = + (UpsertAndPublishFormVersionDataAttributes) o; + return Objects.equals( + this.dataDefinition, upsertAndPublishFormVersionDataAttributes.dataDefinition) + && Objects.equals(this.uiDefinition, upsertAndPublishFormVersionDataAttributes.uiDefinition) + && Objects.equals(this.upsertParams, upsertAndPublishFormVersionDataAttributes.upsertParams) + && Objects.equals( + this.additionalProperties, + upsertAndPublishFormVersionDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(dataDefinition, uiDefinition, upsertParams, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpsertAndPublishFormVersionDataAttributes {\n"); + sb.append(" dataDefinition: ").append(toIndentedString(dataDefinition)).append("\n"); + sb.append(" uiDefinition: ").append(toIndentedString(uiDefinition)).append("\n"); + sb.append(" upsertParams: ").append(toIndentedString(upsertParams)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UpsertAndPublishFormVersionRequest.java b/src/main/java/com/datadog/api/client/v2/model/UpsertAndPublishFormVersionRequest.java new file mode 100644 index 00000000000..37140ff2ff4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpsertAndPublishFormVersionRequest.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 com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A request to upsert and publish a form version in a single transaction. */ +@JsonPropertyOrder({UpsertAndPublishFormVersionRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UpsertAndPublishFormVersionRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private UpsertAndPublishFormVersionData data; + + public UpsertAndPublishFormVersionRequest() {} + + @JsonCreator + public UpsertAndPublishFormVersionRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + UpsertAndPublishFormVersionData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public UpsertAndPublishFormVersionRequest data(UpsertAndPublishFormVersionData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data for upserting and publishing a form version. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UpsertAndPublishFormVersionData getData() { + return data; + } + + public void setData(UpsertAndPublishFormVersionData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UpsertAndPublishFormVersionRequest + */ + @JsonAnySetter + public UpsertAndPublishFormVersionRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this UpsertAndPublishFormVersionRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpsertAndPublishFormVersionRequest upsertAndPublishFormVersionRequest = + (UpsertAndPublishFormVersionRequest) o; + return Objects.equals(this.data, upsertAndPublishFormVersionRequest.data) + && Objects.equals( + this.additionalProperties, upsertAndPublishFormVersionRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpsertAndPublishFormVersionRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UpsertAndPublishFormVersionUpsertParams.java b/src/main/java/com/datadog/api/client/v2/model/UpsertAndPublishFormVersionUpsertParams.java new file mode 100644 index 00000000000..907054c1119 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpsertAndPublishFormVersionUpsertParams.java @@ -0,0 +1,146 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Concurrency control parameters for the upsert and publish operation. */ +@JsonPropertyOrder({UpsertAndPublishFormVersionUpsertParams.JSON_PROPERTY_ETAG}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UpsertAndPublishFormVersionUpsertParams { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ETAG = "etag"; + private String etag; + + public UpsertAndPublishFormVersionUpsertParams() {} + + @JsonCreator + public UpsertAndPublishFormVersionUpsertParams( + @JsonProperty(required = true, value = JSON_PROPERTY_ETAG) String etag) { + this.etag = etag; + } + + public UpsertAndPublishFormVersionUpsertParams etag(String etag) { + this.etag = etag; + return this; + } + + /** + * The ETag of the latest version used for optimistic concurrency control. + * + * @return etag + */ + @JsonProperty(JSON_PROPERTY_ETAG) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEtag() { + return etag; + } + + public void setEtag(String etag) { + this.etag = etag; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UpsertAndPublishFormVersionUpsertParams + */ + @JsonAnySetter + public UpsertAndPublishFormVersionUpsertParams putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this UpsertAndPublishFormVersionUpsertParams object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpsertAndPublishFormVersionUpsertParams upsertAndPublishFormVersionUpsertParams = + (UpsertAndPublishFormVersionUpsertParams) o; + return Objects.equals(this.etag, upsertAndPublishFormVersionUpsertParams.etag) + && Objects.equals( + this.additionalProperties, + upsertAndPublishFormVersionUpsertParams.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(etag, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpsertAndPublishFormVersionUpsertParams {\n"); + sb.append(" etag: ").append(toIndentedString(etag)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UpsertFormVersionData.java b/src/main/java/com/datadog/api/client/v2/model/UpsertFormVersionData.java new file mode 100644 index 00000000000..cc63050a574 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpsertFormVersionData.java @@ -0,0 +1,181 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The data for creating or updating a form version. */ +@JsonPropertyOrder({ + UpsertFormVersionData.JSON_PROPERTY_ATTRIBUTES, + UpsertFormVersionData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UpsertFormVersionData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private UpsertFormVersionDataAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private FormVersionType type = FormVersionType.FORM_VERSIONS; + + public UpsertFormVersionData() {} + + @JsonCreator + public UpsertFormVersionData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + UpsertFormVersionDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) FormVersionType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public UpsertFormVersionData attributes(UpsertFormVersionDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The attributes for creating or updating a form version. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UpsertFormVersionDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(UpsertFormVersionDataAttributes attributes) { + this.attributes = attributes; + } + + public UpsertFormVersionData type(FormVersionType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type for a form version. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FormVersionType getType() { + return type; + } + + public void setType(FormVersionType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UpsertFormVersionData + */ + @JsonAnySetter + public UpsertFormVersionData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this UpsertFormVersionData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpsertFormVersionData upsertFormVersionData = (UpsertFormVersionData) o; + return Objects.equals(this.attributes, upsertFormVersionData.attributes) + && Objects.equals(this.type, upsertFormVersionData.type) + && Objects.equals(this.additionalProperties, upsertFormVersionData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpsertFormVersionData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UpsertFormVersionDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/UpsertFormVersionDataAttributes.java new file mode 100644 index 00000000000..4bb350dcce7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpsertFormVersionDataAttributes.java @@ -0,0 +1,246 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The attributes for creating or updating a form version. */ +@JsonPropertyOrder({ + UpsertFormVersionDataAttributes.JSON_PROPERTY_DATA_DEFINITION, + UpsertFormVersionDataAttributes.JSON_PROPERTY_STATE, + UpsertFormVersionDataAttributes.JSON_PROPERTY_UI_DEFINITION, + UpsertFormVersionDataAttributes.JSON_PROPERTY_UPSERT_PARAMS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UpsertFormVersionDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA_DEFINITION = "data_definition"; + private FormDataDefinition dataDefinition; + + public static final String JSON_PROPERTY_STATE = "state"; + private FormVersionState state; + + public static final String JSON_PROPERTY_UI_DEFINITION = "ui_definition"; + private FormUiDefinition uiDefinition; + + public static final String JSON_PROPERTY_UPSERT_PARAMS = "upsert_params"; + private UpsertFormVersionUpsertParams upsertParams; + + public UpsertFormVersionDataAttributes() {} + + @JsonCreator + public UpsertFormVersionDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA_DEFINITION) + FormDataDefinition dataDefinition, + @JsonProperty(required = true, value = JSON_PROPERTY_STATE) FormVersionState state, + @JsonProperty(required = true, value = JSON_PROPERTY_UI_DEFINITION) + FormUiDefinition uiDefinition, + @JsonProperty(required = true, value = JSON_PROPERTY_UPSERT_PARAMS) + UpsertFormVersionUpsertParams upsertParams) { + this.dataDefinition = dataDefinition; + this.unparsed |= dataDefinition.unparsed; + this.state = state; + this.unparsed |= !state.isValid(); + this.uiDefinition = uiDefinition; + this.unparsed |= uiDefinition.unparsed; + this.upsertParams = upsertParams; + this.unparsed |= upsertParams.unparsed; + } + + public UpsertFormVersionDataAttributes dataDefinition(FormDataDefinition dataDefinition) { + this.dataDefinition = dataDefinition; + this.unparsed |= dataDefinition.unparsed; + return this; + } + + /** + * A JSON Schema definition that describes the form's data fields. + * + * @return dataDefinition + */ + @JsonProperty(JSON_PROPERTY_DATA_DEFINITION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FormDataDefinition getDataDefinition() { + return dataDefinition; + } + + public void setDataDefinition(FormDataDefinition dataDefinition) { + this.dataDefinition = dataDefinition; + } + + public UpsertFormVersionDataAttributes state(FormVersionState state) { + this.state = state; + this.unparsed |= !state.isValid(); + return this; + } + + /** + * The state of a form version. + * + * @return state + */ + @JsonProperty(JSON_PROPERTY_STATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FormVersionState getState() { + return state; + } + + public void setState(FormVersionState state) { + if (!state.isValid()) { + this.unparsed = true; + } + this.state = state; + } + + public UpsertFormVersionDataAttributes uiDefinition(FormUiDefinition uiDefinition) { + this.uiDefinition = uiDefinition; + this.unparsed |= uiDefinition.unparsed; + return this; + } + + /** + * UI configuration for rendering form fields, including widget overrides, field ordering, and + * themes. + * + * @return uiDefinition + */ + @JsonProperty(JSON_PROPERTY_UI_DEFINITION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FormUiDefinition getUiDefinition() { + return uiDefinition; + } + + public void setUiDefinition(FormUiDefinition uiDefinition) { + this.uiDefinition = uiDefinition; + } + + public UpsertFormVersionDataAttributes upsertParams(UpsertFormVersionUpsertParams upsertParams) { + this.upsertParams = upsertParams; + this.unparsed |= upsertParams.unparsed; + return this; + } + + /** + * Concurrency control parameters for the form version upsert operation. + * + * @return upsertParams + */ + @JsonProperty(JSON_PROPERTY_UPSERT_PARAMS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UpsertFormVersionUpsertParams getUpsertParams() { + return upsertParams; + } + + public void setUpsertParams(UpsertFormVersionUpsertParams upsertParams) { + this.upsertParams = upsertParams; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UpsertFormVersionDataAttributes + */ + @JsonAnySetter + public UpsertFormVersionDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this UpsertFormVersionDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpsertFormVersionDataAttributes upsertFormVersionDataAttributes = + (UpsertFormVersionDataAttributes) o; + return Objects.equals(this.dataDefinition, upsertFormVersionDataAttributes.dataDefinition) + && Objects.equals(this.state, upsertFormVersionDataAttributes.state) + && Objects.equals(this.uiDefinition, upsertFormVersionDataAttributes.uiDefinition) + && Objects.equals(this.upsertParams, upsertFormVersionDataAttributes.upsertParams) + && Objects.equals( + this.additionalProperties, upsertFormVersionDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(dataDefinition, state, uiDefinition, upsertParams, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpsertFormVersionDataAttributes {\n"); + sb.append(" dataDefinition: ").append(toIndentedString(dataDefinition)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" uiDefinition: ").append(toIndentedString(uiDefinition)).append("\n"); + sb.append(" upsertParams: ").append(toIndentedString(upsertParams)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UpsertFormVersionRequest.java b/src/main/java/com/datadog/api/client/v2/model/UpsertFormVersionRequest.java new file mode 100644 index 00000000000..0ef595bcf49 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpsertFormVersionRequest.java @@ -0,0 +1,145 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A request to create or update a form version. */ +@JsonPropertyOrder({UpsertFormVersionRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UpsertFormVersionRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private UpsertFormVersionData data; + + public UpsertFormVersionRequest() {} + + @JsonCreator + public UpsertFormVersionRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) UpsertFormVersionData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public UpsertFormVersionRequest data(UpsertFormVersionData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The data for creating or updating a form version. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public UpsertFormVersionData getData() { + return data; + } + + public void setData(UpsertFormVersionData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UpsertFormVersionRequest + */ + @JsonAnySetter + public UpsertFormVersionRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this UpsertFormVersionRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpsertFormVersionRequest upsertFormVersionRequest = (UpsertFormVersionRequest) o; + return Objects.equals(this.data, upsertFormVersionRequest.data) + && Objects.equals(this.additionalProperties, upsertFormVersionRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpsertFormVersionRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UpsertFormVersionUpsertParams.java b/src/main/java/com/datadog/api/client/v2/model/UpsertFormVersionUpsertParams.java new file mode 100644 index 00000000000..3037b144075 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UpsertFormVersionUpsertParams.java @@ -0,0 +1,218 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Concurrency control parameters for the form version upsert operation. */ +@JsonPropertyOrder({ + UpsertFormVersionUpsertParams.JSON_PROPERTY_ETAG, + UpsertFormVersionUpsertParams.JSON_PROPERTY_INSERT_ONLY, + UpsertFormVersionUpsertParams.JSON_PROPERTY_MATCH_POLICY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UpsertFormVersionUpsertParams { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ETAG = "etag"; + private JsonNullable etag = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_INSERT_ONLY = "insert_only"; + private Boolean insertOnly; + + public static final String JSON_PROPERTY_MATCH_POLICY = "match_policy"; + private LatestVersionMatchPolicy matchPolicy; + + public UpsertFormVersionUpsertParams() {} + + @JsonCreator + public UpsertFormVersionUpsertParams( + @JsonProperty(required = true, value = JSON_PROPERTY_MATCH_POLICY) + LatestVersionMatchPolicy matchPolicy) { + this.matchPolicy = matchPolicy; + this.unparsed |= !matchPolicy.isValid(); + } + + public UpsertFormVersionUpsertParams etag(String etag) { + this.etag = JsonNullable.of(etag); + return this; + } + + /** + * The ETag of the latest version. Required when match_policy is if_etag_match + * . + * + * @return etag + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getEtag() { + return etag.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ETAG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getEtag_JsonNullable() { + return etag; + } + + @JsonProperty(JSON_PROPERTY_ETAG) + public void setEtag_JsonNullable(JsonNullable etag) { + this.etag = etag; + } + + public void setEtag(String etag) { + this.etag = JsonNullable.of(etag); + } + + public UpsertFormVersionUpsertParams insertOnly(Boolean insertOnly) { + this.insertOnly = insertOnly; + return this; + } + + /** + * If true, only a new version may be inserted; updating the current draft is not allowed. + * + * @return insertOnly + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INSERT_ONLY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getInsertOnly() { + return insertOnly; + } + + public void setInsertOnly(Boolean insertOnly) { + this.insertOnly = insertOnly; + } + + public UpsertFormVersionUpsertParams matchPolicy(LatestVersionMatchPolicy matchPolicy) { + this.matchPolicy = matchPolicy; + this.unparsed |= !matchPolicy.isValid(); + return this; + } + + /** + * The policy for matching the latest form version during an upsert operation. + * + * @return matchPolicy + */ + @JsonProperty(JSON_PROPERTY_MATCH_POLICY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LatestVersionMatchPolicy getMatchPolicy() { + return matchPolicy; + } + + public void setMatchPolicy(LatestVersionMatchPolicy matchPolicy) { + if (!matchPolicy.isValid()) { + this.unparsed = true; + } + this.matchPolicy = matchPolicy; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UpsertFormVersionUpsertParams + */ + @JsonAnySetter + public UpsertFormVersionUpsertParams putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this UpsertFormVersionUpsertParams object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpsertFormVersionUpsertParams upsertFormVersionUpsertParams = (UpsertFormVersionUpsertParams) o; + return Objects.equals(this.etag, upsertFormVersionUpsertParams.etag) + && Objects.equals(this.insertOnly, upsertFormVersionUpsertParams.insertOnly) + && Objects.equals(this.matchPolicy, upsertFormVersionUpsertParams.matchPolicy) + && Objects.equals( + this.additionalProperties, upsertFormVersionUpsertParams.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(etag, insertOnly, matchPolicy, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpsertFormVersionUpsertParams {\n"); + sb.append(" etag: ").append(toIndentedString(etag)).append("\n"); + sb.append(" insertOnly: ").append(toIndentedString(insertOnly)).append("\n"); + sb.append(" matchPolicy: ").append(toIndentedString(matchPolicy)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UsageSummaryAvailableFieldsAttributes.java b/src/main/java/com/datadog/api/client/v2/model/UsageSummaryAvailableFieldsAttributes.java new file mode 100644 index 00000000000..3393ce72a6d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UsageSummaryAvailableFieldsAttributes.java @@ -0,0 +1,226 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * The lists of field names returned by GET /api/v1/usage/summary at each of its three + * response levels. Each list contains every key the data endpoint emits—both typed fields declared + * in the OpenAPI spec and untyped keys exposed through additionalProperties. + */ +@JsonPropertyOrder({ + UsageSummaryAvailableFieldsAttributes.JSON_PROPERTY_DATE_FIELDS, + UsageSummaryAvailableFieldsAttributes.JSON_PROPERTY_DATE_ORG_FIELDS, + UsageSummaryAvailableFieldsAttributes.JSON_PROPERTY_RESPONSE_FIELDS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UsageSummaryAvailableFieldsAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATE_FIELDS = "date_fields"; + private List dateFields = null; + + public static final String JSON_PROPERTY_DATE_ORG_FIELDS = "date_org_fields"; + private List dateOrgFields = null; + + public static final String JSON_PROPERTY_RESPONSE_FIELDS = "response_fields"; + private List responseFields = null; + + public UsageSummaryAvailableFieldsAttributes dateFields(List dateFields) { + this.dateFields = dateFields; + return this; + } + + public UsageSummaryAvailableFieldsAttributes addDateFieldsItem(String dateFieldsItem) { + if (this.dateFields == null) { + this.dateFields = new ArrayList<>(); + } + this.dateFields.add(dateFieldsItem); + return this; + } + + /** + * Sorted list of every key returned inside each UsageSummaryDate entry of + * usage[] (typed fields and additionalProperties keys combined). + * + * @return dateFields + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATE_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getDateFields() { + return dateFields; + } + + public void setDateFields(List dateFields) { + this.dateFields = dateFields; + } + + public UsageSummaryAvailableFieldsAttributes dateOrgFields(List dateOrgFields) { + this.dateOrgFields = dateOrgFields; + return this; + } + + public UsageSummaryAvailableFieldsAttributes addDateOrgFieldsItem(String dateOrgFieldsItem) { + if (this.dateOrgFields == null) { + this.dateOrgFields = new ArrayList<>(); + } + this.dateOrgFields.add(dateOrgFieldsItem); + return this; + } + + /** + * Sorted list of every key returned inside each UsageSummaryDateOrg entry of + * usage[].orgs[] (typed fields and additionalProperties keys combined). + * + * @return dateOrgFields + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATE_ORG_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getDateOrgFields() { + return dateOrgFields; + } + + public void setDateOrgFields(List dateOrgFields) { + this.dateOrgFields = dateOrgFields; + } + + public UsageSummaryAvailableFieldsAttributes responseFields(List responseFields) { + this.responseFields = responseFields; + return this; + } + + public UsageSummaryAvailableFieldsAttributes addResponseFieldsItem(String responseFieldsItem) { + if (this.responseFields == null) { + this.responseFields = new ArrayList<>(); + } + this.responseFields.add(responseFieldsItem); + return this; + } + + /** + * Sorted list of every key returned as a direct property of UsageSummaryResponse + * (typed fields and additionalProperties keys combined). + * + * @return responseFields + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESPONSE_FIELDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getResponseFields() { + return responseFields; + } + + public void setResponseFields(List responseFields) { + this.responseFields = responseFields; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UsageSummaryAvailableFieldsAttributes + */ + @JsonAnySetter + public UsageSummaryAvailableFieldsAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this UsageSummaryAvailableFieldsAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UsageSummaryAvailableFieldsAttributes usageSummaryAvailableFieldsAttributes = + (UsageSummaryAvailableFieldsAttributes) o; + return Objects.equals(this.dateFields, usageSummaryAvailableFieldsAttributes.dateFields) + && Objects.equals(this.dateOrgFields, usageSummaryAvailableFieldsAttributes.dateOrgFields) + && Objects.equals(this.responseFields, usageSummaryAvailableFieldsAttributes.responseFields) + && Objects.equals( + this.additionalProperties, usageSummaryAvailableFieldsAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(dateFields, dateOrgFields, responseFields, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UsageSummaryAvailableFieldsAttributes {\n"); + sb.append(" dateFields: ").append(toIndentedString(dateFields)).append("\n"); + sb.append(" dateOrgFields: ").append(toIndentedString(dateOrgFields)).append("\n"); + sb.append(" responseFields: ").append(toIndentedString(responseFields)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UsageSummaryAvailableFieldsBody.java b/src/main/java/com/datadog/api/client/v2/model/UsageSummaryAvailableFieldsBody.java new file mode 100644 index 00000000000..6a8874e9233 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UsageSummaryAvailableFieldsBody.java @@ -0,0 +1,203 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.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; + +/** Available-fields data. */ +@JsonPropertyOrder({ + UsageSummaryAvailableFieldsBody.JSON_PROPERTY_ATTRIBUTES, + UsageSummaryAvailableFieldsBody.JSON_PROPERTY_ID, + UsageSummaryAvailableFieldsBody.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UsageSummaryAvailableFieldsBody { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private UsageSummaryAvailableFieldsAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private UsageSummaryAvailableFieldsType type = + UsageSummaryAvailableFieldsType.USAGE_SUMMARY_AVAILABLE_FIELDS; + + public UsageSummaryAvailableFieldsBody attributes( + UsageSummaryAvailableFieldsAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The lists of field names returned by GET /api/v1/usage/summary at each of its + * three response levels. Each list contains every key the data endpoint emits—both typed fields + * declared in the OpenAPI spec and untyped keys exposed through additionalProperties + * . + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UsageSummaryAvailableFieldsAttributes getAttributes() { + return attributes; + } + + public void setAttributes(UsageSummaryAvailableFieldsAttributes attributes) { + this.attributes = attributes; + } + + public UsageSummaryAvailableFieldsBody id(String id) { + this.id = id; + return this; + } + + /** + * The identifier for the discovery scope. Always "all". + * + * @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 UsageSummaryAvailableFieldsBody type(UsageSummaryAvailableFieldsType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Type of available-fields data. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UsageSummaryAvailableFieldsType getType() { + return type; + } + + public void setType(UsageSummaryAvailableFieldsType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UsageSummaryAvailableFieldsBody + */ + @JsonAnySetter + public UsageSummaryAvailableFieldsBody putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this UsageSummaryAvailableFieldsBody object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UsageSummaryAvailableFieldsBody usageSummaryAvailableFieldsBody = + (UsageSummaryAvailableFieldsBody) o; + return Objects.equals(this.attributes, usageSummaryAvailableFieldsBody.attributes) + && Objects.equals(this.id, usageSummaryAvailableFieldsBody.id) + && Objects.equals(this.type, usageSummaryAvailableFieldsBody.type) + && Objects.equals( + this.additionalProperties, usageSummaryAvailableFieldsBody.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UsageSummaryAvailableFieldsBody {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UsageSummaryAvailableFieldsResponse.java b/src/main/java/com/datadog/api/client/v2/model/UsageSummaryAvailableFieldsResponse.java new file mode 100644 index 00000000000..8847b7ebbb2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UsageSummaryAvailableFieldsResponse.java @@ -0,0 +1,142 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * Response listing every field name returned by GET /api/v1/usage/summary at each of + * its three response levels. Includes both typed fields and untyped additionalProperties + * keys. + */ +@JsonPropertyOrder({UsageSummaryAvailableFieldsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class UsageSummaryAvailableFieldsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private UsageSummaryAvailableFieldsBody data; + + public UsageSummaryAvailableFieldsResponse data(UsageSummaryAvailableFieldsBody data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Available-fields data. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UsageSummaryAvailableFieldsBody getData() { + return data; + } + + public void setData(UsageSummaryAvailableFieldsBody data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return UsageSummaryAvailableFieldsResponse + */ + @JsonAnySetter + public UsageSummaryAvailableFieldsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this UsageSummaryAvailableFieldsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UsageSummaryAvailableFieldsResponse usageSummaryAvailableFieldsResponse = + (UsageSummaryAvailableFieldsResponse) o; + return Objects.equals(this.data, usageSummaryAvailableFieldsResponse.data) + && Objects.equals( + this.additionalProperties, usageSummaryAvailableFieldsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UsageSummaryAvailableFieldsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/UsageSummaryAvailableFieldsType.java b/src/main/java/com/datadog/api/client/v2/model/UsageSummaryAvailableFieldsType.java new file mode 100644 index 00000000000..29ba75c4bb1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/UsageSummaryAvailableFieldsType.java @@ -0,0 +1,58 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Type of available-fields data. */ +@JsonSerialize( + using = UsageSummaryAvailableFieldsType.UsageSummaryAvailableFieldsTypeSerializer.class) +public class UsageSummaryAvailableFieldsType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("usage_summary_available_fields")); + + public static final UsageSummaryAvailableFieldsType USAGE_SUMMARY_AVAILABLE_FIELDS = + new UsageSummaryAvailableFieldsType("usage_summary_available_fields"); + + UsageSummaryAvailableFieldsType(String value) { + super(value, allowedValues); + } + + public static class UsageSummaryAvailableFieldsTypeSerializer + extends StdSerializer { + public UsageSummaryAvailableFieldsTypeSerializer(Class t) { + super(t); + } + + public UsageSummaryAvailableFieldsTypeSerializer() { + this(null); + } + + @Override + public void serialize( + UsageSummaryAvailableFieldsType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static UsageSummaryAvailableFieldsType fromValue(String value) { + return new UsageSummaryAvailableFieldsType(value); + } +} diff --git a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_RUM_data_source.freeze b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_RUM_data_source.freeze new file mode 100644 index 00000000000..bee81a6b80c --- /dev/null +++ b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_RUM_data_source.freeze @@ -0,0 +1 @@ +2026-06-02T12:32:21.161Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_rum_data_source.json b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_RUM_data_source.json similarity index 51% rename from src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_rum_data_source.json rename to src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_RUM_data_source.json index 6ebe96a5ece..ab6d36ccb20 100644 --- a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_rum_data_source.json +++ b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_RUM_data_source.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"description\":\"\",\"layout_type\":\"free\",\"notify_list\":[],\"template_variables\":[],\"title\":\"Test-Create_a_new_dashboard_with_sankey_widget_and_rum_data_source-1767367579\",\"widgets\":[{\"definition\":{\"requests\":[{\"query\":{\"data_source\":\"rum\",\"mode\":\"source\",\"query_string\":\"@type:view\"},\"request_type\":\"sankey\"}],\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"sankey\"},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0}}]}" + "json": "{\"description\":\"\",\"layout_type\":\"free\",\"notify_list\":[],\"template_variables\":[],\"title\":\"Test-Create_a_new_dashboard_with_sankey_widget_and_RUM_data_source-1780403541\",\"widgets\":[{\"definition\":{\"requests\":[{\"query\":{\"data_source\":\"rum\",\"mode\":\"source\",\"query_string\":\"@type:view\"},\"request_type\":\"sankey\"}],\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"sankey\"},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0}}]}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"id\":\"pgj-vt6-zeg\",\"title\":\"Test-Create_a_new_dashboard_with_sankey_widget_and_rum_data_source-1767367579\",\"description\":\"\",\"author_handle\":\"sophie.cao@datadoghq.com\",\"author_name\":\"Sophie Cao\",\"layout_type\":\"free\",\"url\":\"/dashboard/pgj-vt6-zeg/test-createanewdashboardwithsankeywidgetandrumdatasource-1767367579\",\"template_variables\":[],\"widgets\":[{\"definition\":{\"requests\":[{\"query\":{\"data_source\":\"rum\",\"mode\":\"source\",\"query_string\":\"@type:view\"},\"request_type\":\"sankey\"}],\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"sankey\"},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0},\"id\":1607494419972582}],\"notify_list\":[],\"created_at\":\"2026-01-02T15:26:19.817734+00:00\",\"modified_at\":\"2026-01-02T15:26:19.817734+00:00\",\"restricted_roles\":[]}", + "body": "{\"id\":\"js9-hx8-hsy\",\"title\":\"Test-Create_a_new_dashboard_with_sankey_widget_and_RUM_data_source-1780403541\",\"description\":\"\",\"author_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"author_name\":\"CI Account\",\"layout_type\":\"free\",\"url\":\"/dashboard/js9-hx8-hsy/test-createanewdashboardwithsankeywidgetandrumdatasource-1780403541\",\"template_variables\":[],\"widgets\":[{\"definition\":{\"requests\":[{\"query\":{\"data_source\":\"rum\",\"mode\":\"source\",\"query_string\":\"@type:view\"},\"request_type\":\"sankey\"}],\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"sankey\"},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0},\"id\":8566545221037666}],\"notify_list\":[],\"created_at\":\"2026-06-02T12:32:21.497655+00:00\",\"modified_at\":\"2026-06-02T12:32:21.497655+00:00\",\"restricted_roles\":[]}", "headers": { "Content-Type": [ "application/json" @@ -27,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "e50096f8-701d-2695-ccb5-e4bb8dc80a98" + "id": "8cc1a5a0-afbb-a43a-6989-49602eb6da4e" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v1/dashboard/pgj-vt6-zeg", + "path": "/api/v1/dashboard/js9-hx8-hsy", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"deleted_dashboard_id\":\"pgj-vt6-zeg\"}", + "body": "{\"deleted_dashboard_id\":\"js9-hx8-hsy\"}", "headers": { "Content-Type": [ "application/json" @@ -53,6 +53,6 @@ "timeToLive": { "unlimited": true }, - "id": "3597b2c2-f955-8709-af84-283c2af5a46b" + "id": "2c6d27b1-11d2-eb97-dad9-fa71115fcf45" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_rum_data_source.freeze b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_rum_data_source.freeze deleted file mode 100644 index 6f1ee04a8ff..00000000000 --- a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_rum_data_source.freeze +++ /dev/null @@ -1 +0,0 @@ -2026-01-02T15:26:19.626Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_an_SLO_correction_with_slo_query_returns_OK_response.freeze b/src/test/resources/cassettes/features/v1/Create_an_SLO_correction_with_slo_query_returns_OK_response.freeze new file mode 100644 index 00000000000..d4db7da28f6 --- /dev/null +++ b/src/test/resources/cassettes/features/v1/Create_an_SLO_correction_with_slo_query_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-05-27T20:45:22.423Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_an_SLO_correction_with_slo_query_returns_OK_response.json b/src/test/resources/cassettes/features/v1/Create_an_SLO_correction_with_slo_query_returns_OK_response.json new file mode 100644 index 00000000000..cf6e59eff3f --- /dev/null +++ b/src/test/resources/cassettes/features/v1/Create_an_SLO_correction_with_slo_query_returns_OK_response.json @@ -0,0 +1,57 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"category\":\"Scheduled Maintenance\",\"description\":\"Test-Create_an_SLO_correction_with_slo_query_returns_OK_response-1779914722\",\"end\":1779918322,\"slo_query\":\"env:prod service:checkout\",\"start\":1779914722,\"timezone\":\"UTC\"},\"type\":\"correction\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v1/slo/correction", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"type\":\"correction\",\"id\":\"fb3a5c0a-5a0c-11f1-8207-da7ad0902002\",\"attributes\":{\"slo_id\":null,\"start\":1779914722,\"end\":1779918322,\"description\":\"Test-Create_an_SLO_correction_with_slo_query_returns_OK_response-1779914722\",\"category\":\"Scheduled Maintenance\",\"timezone\":\"UTC\",\"created_at\":null,\"modified_at\":null,\"rrule\":null,\"duration\":null,\"slo_query\":\"env:prod service:checkout\",\"creator\":{\"data\":{\"type\":\"users\",\"id\":\"780cfef8-1736-4a4e-a826-b875b1cadcec\",\"attributes\":{\"uuid\":\"780cfef8-1736-4a4e-a826-b875b1cadcec\",\"handle\":\"blaise.vonohlen@datadoghq.com\",\"email\":\"blaise.vonohlen@datadoghq.com\",\"name\":\"Blaise von Ohlen\",\"icon\":\"https://secure.gravatar.com/avatar/c78d8282d57321884e8f77172229634f?s=48&d=retro\"}}},\"modifier\":null}}}\n", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "6b6ee136-ac79-cb1c-7489-ca3bc2bd665c" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v1/slo/correction/fb3a5c0a-5a0c-11f1-8207-da7ad0902002", + "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": "2b604246-6217-f380-2076-29a3b510cf83" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Update_an_SLO_correction_with_slo_query_returns_OK_response.freeze b/src/test/resources/cassettes/features/v1/Update_an_SLO_correction_with_slo_query_returns_OK_response.freeze new file mode 100644 index 00000000000..2772dc4740e --- /dev/null +++ b/src/test/resources/cassettes/features/v1/Update_an_SLO_correction_with_slo_query_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-06-03T15:43:01.600Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Update_an_SLO_correction_with_slo_query_returns_OK_response.json b/src/test/resources/cassettes/features/v1/Update_an_SLO_correction_with_slo_query_returns_OK_response.json new file mode 100644 index 00000000000..4a86a1f1ab4 --- /dev/null +++ b/src/test/resources/cassettes/features/v1/Update_an_SLO_correction_with_slo_query_returns_OK_response.json @@ -0,0 +1,87 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"category\":\"Other\",\"description\":\"Test Correction\",\"end\":1780504981,\"slo_query\":\"env:prod service:checkout\",\"start\":1780501381,\"timezone\":\"UTC\"},\"type\":\"correction\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v1/slo/correction", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"type\":\"correction\",\"id\":\"e74cc4de-5f62-11f1-a69d-da7ad0902002\",\"attributes\":{\"slo_id\":null,\"start\":1780501381,\"end\":1780504981,\"description\":\"Test Correction\",\"category\":\"Other\",\"timezone\":\"UTC\",\"created_at\":null,\"modified_at\":null,\"rrule\":null,\"duration\":null,\"slo_query\":\"env:prod service:checkout\",\"creator\":{\"data\":{\"type\":\"users\",\"id\":\"780cfef8-1736-4a4e-a826-b875b1cadcec\",\"attributes\":{\"uuid\":\"780cfef8-1736-4a4e-a826-b875b1cadcec\",\"handle\":\"blaise.vonohlen@datadoghq.com\",\"email\":\"blaise.vonohlen@datadoghq.com\",\"name\":\"Blaise von Ohlen\",\"icon\":\"https://secure.gravatar.com/avatar/c78d8282d57321884e8f77172229634f?s=48&d=retro\"}}},\"modifier\":null}}}\n", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "0e59d499-3924-ea2d-ab20-9aa3a6a51cf4" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"category\":\"Scheduled Maintenance\",\"description\":\"Test-Update_an_SLO_correction_with_slo_query_returns_OK_response-1780501381\",\"end\":1780504981,\"slo_query\":\"env:staging service:checkout\",\"start\":1780501381,\"timezone\":\"UTC\"},\"type\":\"correction\"}}" + }, + "headers": {}, + "method": "PATCH", + "path": "/api/v1/slo/correction/e74cc4de-5f62-11f1-a69d-da7ad0902002", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"type\":\"correction\",\"id\":\"e74cc4de-5f62-11f1-a69d-da7ad0902002\",\"attributes\":{\"slo_id\":null,\"start\":1780501381,\"end\":1780504981,\"description\":\"Test-Update_an_SLO_correction_with_slo_query_returns_OK_response-1780501381\",\"category\":\"Scheduled Maintenance\",\"timezone\":\"UTC\",\"created_at\":1780501381,\"modified_at\":1780501381,\"rrule\":null,\"duration\":null,\"slo_query\":\"env:staging service:checkout\",\"creator\":{\"data\":{\"type\":\"users\",\"id\":\"780cfef8-1736-4a4e-a826-b875b1cadcec\",\"attributes\":{\"uuid\":\"780cfef8-1736-4a4e-a826-b875b1cadcec\",\"handle\":\"blaise.vonohlen@datadoghq.com\",\"email\":\"blaise.vonohlen@datadoghq.com\",\"name\":\"Blaise von Ohlen\",\"icon\":\"https://secure.gravatar.com/avatar/c78d8282d57321884e8f77172229634f?s=48&d=retro\"}}},\"modifier\":{\"data\":{\"type\":\"users\",\"id\":\"780cfef8-1736-4a4e-a826-b875b1cadcec\",\"attributes\":{\"uuid\":\"780cfef8-1736-4a4e-a826-b875b1cadcec\",\"handle\":\"blaise.vonohlen@datadoghq.com\",\"email\":\"blaise.vonohlen@datadoghq.com\",\"name\":\"Blaise von Ohlen\",\"icon\":\"https://secure.gravatar.com/avatar/c78d8282d57321884e8f77172229634f?s=48&d=retro\"}}}}}}\n", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "2b335604-d2dd-6758-8215-f462d86db548" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v1/slo/correction/e74cc4de-5f62-11f1-a69d-da7ad0902002", + "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": "fb2a7800-ba02-4b94-9310-f03450fabec7" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Validate_API_key_returns_Forbidden_response.json b/src/test/resources/cassettes/features/v1/Validate_API_key_returns_Forbidden_response.json index 1489fb9e00e..907a2641363 100644 --- a/src/test/resources/cassettes/features/v1/Validate_API_key_returns_Forbidden_response.json +++ b/src/test/resources/cassettes/features/v1/Validate_API_key_returns_Forbidden_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "3f83caea-c405-97df-c554-ee2d9f9e4f01" + "id": "3f83caea-c405-97df-c554-ee2d9f9e4f02" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Validate_API_key_returns_OK_response.json b/src/test/resources/cassettes/features/v1/Validate_API_key_returns_OK_response.json index 45e484f0b48..d03bf9ca97e 100644 --- a/src/test/resources/cassettes/features/v1/Validate_API_key_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v1/Validate_API_key_returns_OK_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "3f83caea-c405-97df-c554-ee2d9f9e4f02" + "id": "3f83caea-c405-97df-c554-ee2d9f9e4f01" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/AWS_Integration_Create_account_config_returns_Conflict_response.json b/src/test/resources/cassettes/features/v2/AWS_Integration_Create_account_config_returns_Conflict_response.json index ff861cd3c9f..d603e22c7bf 100644 --- a/src/test/resources/cassettes/features/v2/AWS_Integration_Create_account_config_returns_Conflict_response.json +++ b/src/test/resources/cassettes/features/v2/AWS_Integration_Create_account_config_returns_Conflict_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "194b15fb-fcae-9b9a-e1a7-0daa19dc9eea" + "id": "194b15fb-fcae-9b9a-e1a7-0daa19dc9eeb" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/AWS_Integration_Delete_account_config_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/AWS_Integration_Delete_account_config_returns_Bad_Request_response.json index c82b6c27f29..a42ef29bfae 100644 --- a/src/test/resources/cassettes/features/v2/AWS_Integration_Delete_account_config_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/AWS_Integration_Delete_account_config_returns_Bad_Request_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "73fd406e-d686-10bd-50ee-83f2c499e8a9" + "id": "73fd406e-d686-10bd-50ee-83f2c499e8a8" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/AWS_Integration_Delete_account_config_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/AWS_Integration_Delete_account_config_returns_No_Content_response.json index 0d38d7d0a6a..56bdf3b041a 100644 --- a/src/test/resources/cassettes/features/v2/AWS_Integration_Delete_account_config_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/AWS_Integration_Delete_account_config_returns_No_Content_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "194b15fb-fcae-9b9a-e1a7-0daa19dc9eeb" + "id": "194b15fb-fcae-9b9a-e1a7-0daa19dc9eee" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/AWS_Integration_Delete_account_config_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/AWS_Integration_Delete_account_config_returns_Not_Found_response.json index 89c80bd879e..6c0150b2bed 100644 --- a/src/test/resources/cassettes/features/v2/AWS_Integration_Delete_account_config_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/AWS_Integration_Delete_account_config_returns_Not_Found_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "194b15fb-fcae-9b9a-e1a7-0daa19dc9ee9" + "id": "194b15fb-fcae-9b9a-e1a7-0daa19dc9eea" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/AWS_Integration_Generate_new_external_ID_returns_AWS_External_ID_object_response.json b/src/test/resources/cassettes/features/v2/AWS_Integration_Generate_new_external_ID_returns_AWS_External_ID_object_response.json index a0731b5ad4a..7bf88c684fb 100644 --- a/src/test/resources/cassettes/features/v2/AWS_Integration_Generate_new_external_ID_returns_AWS_External_ID_object_response.json +++ b/src/test/resources/cassettes/features/v2/AWS_Integration_Generate_new_external_ID_returns_AWS_External_ID_object_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "a3ebb722-60eb-fa89-589a-ff3630e3a2cd" + "id": "a3ebb722-60eb-fa89-589a-ff3630e3a2ce" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/AWS_Integration_Get_account_config_returns_AWS_Account_object_response.json b/src/test/resources/cassettes/features/v2/AWS_Integration_Get_account_config_returns_AWS_Account_object_response.json index f2248371931..9cab4fc0c82 100644 --- a/src/test/resources/cassettes/features/v2/AWS_Integration_Get_account_config_returns_AWS_Account_object_response.json +++ b/src/test/resources/cassettes/features/v2/AWS_Integration_Get_account_config_returns_AWS_Account_object_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "194b15fb-fcae-9b9a-e1a7-0daa19dc9eee" + "id": "194b15fb-fcae-9b9a-e1a7-0daa19dc9eed" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/AWS_Integration_Get_account_config_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/AWS_Integration_Get_account_config_returns_Bad_Request_response.json index 87cb96a7640..6352d5f0102 100644 --- a/src/test/resources/cassettes/features/v2/AWS_Integration_Get_account_config_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/AWS_Integration_Get_account_config_returns_Bad_Request_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "3d4d0603-9fed-1cc5-8004-086b9b6ef690" + "id": "3d4d0603-9fed-1cc5-8004-086b9b6ef691" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/AWS_Integration_Get_account_config_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/AWS_Integration_Get_account_config_returns_Not_Found_response.json index 55368f4ae1c..7e5c7b1234d 100644 --- a/src/test/resources/cassettes/features/v2/AWS_Integration_Get_account_config_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/AWS_Integration_Get_account_config_returns_Not_Found_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "9b33b83c-c8bb-714f-cf71-33ab2f3af9d4" + "id": "9b33b83c-c8bb-714f-cf71-33ab2f3af9d3" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/AWS_Integration_List_log_services_returns_AWS_Logs_Services_List_object_response.json b/src/test/resources/cassettes/features/v2/AWS_Integration_List_log_services_returns_AWS_Logs_Services_List_object_response.json index f469a5cda1f..266b281e690 100644 --- a/src/test/resources/cassettes/features/v2/AWS_Integration_List_log_services_returns_AWS_Logs_Services_List_object_response.json +++ b/src/test/resources/cassettes/features/v2/AWS_Integration_List_log_services_returns_AWS_Logs_Services_List_object_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "03c3c0d9-a62f-5ac6-398b-e22a05d14d79" + "id": "03c3c0d9-a62f-5ac6-398b-e22a05d14d7a" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/AWS_Integration_List_namespaces_returns_AWS_Namespaces_List_object_response.json b/src/test/resources/cassettes/features/v2/AWS_Integration_List_namespaces_returns_AWS_Namespaces_List_object_response.json index 2e4479a46a7..96ea2f1d661 100644 --- a/src/test/resources/cassettes/features/v2/AWS_Integration_List_namespaces_returns_AWS_Namespaces_List_object_response.json +++ b/src/test/resources/cassettes/features/v2/AWS_Integration_List_namespaces_returns_AWS_Namespaces_List_object_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "d0ec7736-ef6c-d071-3390-4a5c3a301d10" + "id": "d0ec7736-ef6c-d071-3390-4a5c3a301d0f" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/AWS_Integration_Patch_account_config_returns_AWS_Account_object_response.json b/src/test/resources/cassettes/features/v2/AWS_Integration_Patch_account_config_returns_AWS_Account_object_response.json index 520c88368e3..2f3d90089b3 100644 --- a/src/test/resources/cassettes/features/v2/AWS_Integration_Patch_account_config_returns_AWS_Account_object_response.json +++ b/src/test/resources/cassettes/features/v2/AWS_Integration_Patch_account_config_returns_AWS_Account_object_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "194b15fb-fcae-9b9a-e1a7-0daa19dc9eec" + "id": "194b15fb-fcae-9b9a-e1a7-0daa19dc9ee9" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/AWS_Integration_Patch_account_config_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/AWS_Integration_Patch_account_config_returns_Bad_Request_response.json index 8fcc5731aee..a1e750ca5ae 100644 --- a/src/test/resources/cassettes/features/v2/AWS_Integration_Patch_account_config_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/AWS_Integration_Patch_account_config_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "194b15fb-fcae-9b9a-e1a7-0daa19dc9eed" + "id": "194b15fb-fcae-9b9a-e1a7-0daa19dc9eec" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Archive_case_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Archive_case_returns_Bad_Request_response.json index e271cf945b0..fbfb65d35f4 100644 --- a/src/test/resources/cassettes/features/v2/Archive_case_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Archive_case_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145f5" + "id": "79babc38-7a70-5347-c8a6-73b0e70145fe" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Archive_case_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Archive_case_returns_OK_response.json index 3c9bf8d6267..4e20597be3b 100644 --- a/src/test/resources/cassettes/features/v2/Archive_case_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Archive_case_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145fa" + "id": "79babc38-7a70-5347-c8a6-73b0e70145ec" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Assign_case_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Assign_case_returns_Bad_Request_response.json index dbfac8750db..fa17953761f 100644 --- a/src/test/resources/cassettes/features/v2/Assign_case_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Assign_case_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145fd" + "id": "79babc38-7a70-5347-c8a6-73b0e70145fb" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Bulk_delete_datastore_items_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Bulk_delete_datastore_items_returns_Bad_Request_response.json index 25ab575ed0d..3e6caee50a0 100644 --- a/src/test/resources/cassettes/features/v2/Bulk_delete_datastore_items_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Bulk_delete_datastore_items_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d33" + "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d31" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Bulk_delete_datastore_items_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Bulk_delete_datastore_items_returns_OK_response.json index d39fee8a337..3bf5cd3a7c1 100644 --- a/src/test/resources/cassettes/features/v2/Bulk_delete_datastore_items_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Bulk_delete_datastore_items_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d2d" + "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d30" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Bulk_write_datastore_items_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Bulk_write_datastore_items_returns_Bad_Request_response.json index b22410fa4ef..834de428629 100644 --- a/src/test/resources/cassettes/features/v2/Bulk_write_datastore_items_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Bulk_write_datastore_items_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d30" + "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d34" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Bulk_write_datastore_items_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Bulk_write_datastore_items_returns_OK_response.json index 21ee8cc402d..91226dabd28 100644 --- a/src/test/resources/cassettes/features/v2/Bulk_write_datastore_items_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Bulk_write_datastore_items_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d32" + "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d2c" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Cancels_a_data_deletion_request_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Cancels_a_data_deletion_request_returns_OK_response.json index 0b99dd1bd72..cfae7af1511 100644 --- a/src/test/resources/cassettes/features/v2/Cancels_a_data_deletion_request_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Cancels_a_data_deletion_request_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "516e2b97-25f6-b08c-4d4a-1da22948b32e" + "id": "516e2b97-25f6-b08c-4d4a-1da22948b32f" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Clone_a_form_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Clone_a_form_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..3cb13361bfb --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Clone_a_form_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2026-06-10T18:49:58.475Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Clone_a_form_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Clone_a_form_returns_Not_Found_response.json new file mode 100644 index 00000000000..6ed5432b12c --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Clone_a_form_returns_Not_Found_response.json @@ -0,0 +1,32 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"name\":\"Copy of My Form\"},\"type\":\"forms\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/forms/00000000-0000-0000-0000-000000000001/clone", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"status\":\"404\",\"id\":\"32db2695-29bd-4280-b547-3737365608c3\",\"title\":\"form not found\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 404, + "reasonPhrase": "Not Found" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "606ff1b5-8062-909f-ac89-7151a2a14930" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Comment_case_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Comment_case_returns_Bad_Request_response.json index 415e80ea1fb..8c97b2392b3 100644 --- a/src/test/resources/cassettes/features/v2/Comment_case_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Comment_case_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145f2" + "id": "79babc38-7a70-5347-c8a6-73b0e70145f6" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Comment_case_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Comment_case_returns_OK_response.json index b9551e2103c..7a1d8329345 100644 --- a/src/test/resources/cassettes/features/v2/Comment_case_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Comment_case_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145eb" + "id": "79babc38-7a70-5347-c8a6-73b0e70145ed" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Configure_tags_for_multiple_metrics_returns_Accepted_response.freeze b/src/test/resources/cassettes/features/v2/Configure_tags_for_multiple_metrics_returns_Accepted_response.freeze index bdcf91b332b..7d7bf01a252 100644 --- a/src/test/resources/cassettes/features/v2/Configure_tags_for_multiple_metrics_returns_Accepted_response.freeze +++ b/src/test/resources/cassettes/features/v2/Configure_tags_for_multiple_metrics_returns_Accepted_response.freeze @@ -1 +1 @@ -2023-12-07T15:20:06.421Z \ No newline at end of file +2026-06-04T17:13:08.947Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Configure_tags_for_multiple_metrics_returns_Accepted_response.json b/src/test/resources/cassettes/features/v2/Configure_tags_for_multiple_metrics_returns_Accepted_response.json index 181e40b36b9..d07122904ce 100644 --- a/src/test/resources/cassettes/features/v2/Configure_tags_for_multiple_metrics_returns_Accepted_response.json +++ b/src/test/resources/cassettes/features/v2/Configure_tags_for_multiple_metrics_returns_Accepted_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"email\":\"Test-Configure_tags_for_multiple_metrics_returns_Accepted_response-1701962406@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}" + "json": "{\"data\":{\"attributes\":{\"email\":\"Test-Configure_tags_for_multiple_metrics_returns_Accepted_response-1780593188@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"type\":\"users\",\"id\":\"1a6aac59-9514-11ee-8d56-0adb1a638a47\",\"attributes\":{\"name\":null,\"handle\":\"test-configure_tags_for_multiple_metrics_returns_accepted_response-1701962406@datadoghq.com\",\"created_at\":\"2023-12-07T15:20:07.014747+00:00\",\"modified_at\":\"2023-12-07T15:20:07.014747+00:00\",\"email\":\"test-configure_tags_for_multiple_metrics_returns_accepted_response-1701962406@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/0a707b27174d49cd592ec7a4fc13bc4d?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\"},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"3386799c-00cc-11ea-a77b-eb0f88a49e0f\"}}}}}\n", + "body": "{\"data\":{\"type\":\"users\",\"id\":\"bbd25c81-fae3-46b3-99b3-4251859017c4\",\"attributes\":{\"uuid\":\"bbd25c81-fae3-46b3-99b3-4251859017c4\",\"name\":null,\"handle\":\"test-configure_tags_for_multiple_metrics_returns_accepted_response-1780593188@datadoghq.com\",\"created_at\":\"2026-06-04T17:13:10.281475+00:00\",\"modified_at\":\"2026-06-04T17:13:10.281475+00:00\",\"email\":\"test-configure_tags_for_multiple_metrics_returns_accepted_response-1780593188@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/f08cc2909ca7eae455a0969e3664ec09?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\",\"last_login_time\":null},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n", "headers": { "Content-Type": [ "application/json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "be6890d8-6e6c-6900-5647-f8ada98d2462" + "id": "39cbe329-55b2-03e0-30d2-cd2057616382" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"emails\":[\"test-configure_tags_for_multiple_metrics_returns_accepted_response-1701962406@datadoghq.com\"],\"tags\":[\"test\",\"testconfiguretagsformultiplemetricsreturnsacceptedresponse1701962406\"]},\"id\":\"system.load.1\",\"type\":\"metric_bulk_configure_tags\"}}" + "json": "{\"data\":{\"attributes\":{\"emails\":[\"test-configure_tags_for_multiple_metrics_returns_accepted_response-1780593188@datadoghq.com\"],\"tags\":[\"test\",\"testconfiguretagsformultiplemetricsreturnsacceptedresponse1780593188\"]},\"id\":\"system.load.1\",\"type\":\"metric_bulk_configure_tags\"}}" }, "headers": {}, "method": "POST", @@ -42,7 +42,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"type\":\"metric_bulk_configure_tags\",\"id\":\"system.load.1\",\"attributes\":{\"tags\":[\"test\",\"testconfiguretagsformultiplemetricsreturnsacceptedresponse1701962406\"],\"emails\":[\"test-configure_tags_for_multiple_metrics_returns_accepted_response-1701962406@datadoghq.com\"],\"status\":\"Accepted\",\"exclude_tags_mode\":null}}}\n", + "body": "{\"data\":{\"type\":\"metric_bulk_configure_tags\",\"id\":\"system.load.1\",\"attributes\":{\"tags\":[\"test\",\"testconfiguretagsformultiplemetricsreturnsacceptedresponse1780593188\"],\"emails\":[\"test-configure_tags_for_multiple_metrics_returns_accepted_response-1780593188@datadoghq.com\"],\"status\":\"Accepted\",\"exclude_tags_mode\":null,\"override_existing_configurations\":true,\"include_actively_queried_tags_window\":null}}}\n", "headers": { "Content-Type": [ "application/json" @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "a3c3afec-d7d4-6a74-edc4-3367f9e1cf50" + "id": "6a4b5110-a2b3-da5c-b2dd-1cc3af5f2b37" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"emails\":[\"test-configure_tags_for_multiple_metrics_returns_accepted_response-1701962406@datadoghq.com\"]},\"id\":\"system.load.1\",\"type\":\"metric_bulk_configure_tags\"}}" + "json": "{\"data\":{\"attributes\":{\"emails\":[\"test-configure_tags_for_multiple_metrics_returns_accepted_response-1780593188@datadoghq.com\"]},\"id\":\"system.load.1\",\"type\":\"metric_bulk_configure_tags\"}}" }, "headers": {}, "method": "DELETE", @@ -72,7 +72,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"type\":\"metric_bulk_configure_tags\",\"id\":\"system.load.1\",\"attributes\":{\"emails\":[\"test-configure_tags_for_multiple_metrics_returns_accepted_response-1701962406@datadoghq.com\"],\"status\":\"Accepted\"}}}\n", + "body": "{\"data\":{\"type\":\"metric_bulk_configure_tags\",\"id\":\"system.load.1\",\"attributes\":{\"emails\":[\"test-configure_tags_for_multiple_metrics_returns_accepted_response-1780593188@datadoghq.com\"],\"status\":\"Accepted\",\"override_existing_configurations\":true}}}\n", "headers": { "Content-Type": [ "application/json" @@ -87,13 +87,13 @@ "timeToLive": { "unlimited": true }, - "id": "d3b1f9af-a93d-3567-ef07-c75863430beb" + "id": "53b9c4a2-7a3c-10aa-743b-f77193fa154c" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/users/1a6aac59-9514-11ee-8d56-0adb1a638a47", + "path": "/api/v2/users/bbd25c81-fae3-46b3-99b3-4251859017c4", "keepAlive": false, "secure": true }, @@ -108,6 +108,6 @@ "timeToLive": { "unlimited": true }, - "id": "b384ce69-b26d-38f7-e502-e689aaef56f4" + "id": "9be3a5f0-f274-a6b9-32cb-ca0f46404c6c" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_AWS_CCM_config_returns_AWS_CCM_Config_object_response.json b/src/test/resources/cassettes/features/v2/Create_AWS_CCM_config_returns_AWS_CCM_Config_object_response.json index 5ba8e36023e..7e70b6729df 100644 --- a/src/test/resources/cassettes/features/v2/Create_AWS_CCM_config_returns_AWS_CCM_Config_object_response.json +++ b/src/test/resources/cassettes/features/v2/Create_AWS_CCM_config_returns_AWS_CCM_Config_object_response.json @@ -18,7 +18,7 @@ "timeToLive": { "unlimited": true }, - "id": "b2bcb392-2d71-be89-5578-460535c541b0" + "id": "b2bcb392-2d71-be89-5578-460535c541af" }, { "httpRequest": { @@ -48,7 +48,7 @@ "timeToLive": { "unlimited": true }, - "id": "58d1c8d5-bb10-59b9-aa85-8871f8479221" + "id": "58d1c8d5-bb10-59b9-aa85-8871f847921f" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_AWS_CCM_config_returns_Conflict_response.json b/src/test/resources/cassettes/features/v2/Create_AWS_CCM_config_returns_Conflict_response.json index a885ab105be..563401356dc 100644 --- a/src/test/resources/cassettes/features/v2/Create_AWS_CCM_config_returns_Conflict_response.json +++ b/src/test/resources/cassettes/features/v2/Create_AWS_CCM_config_returns_Conflict_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "58d1c8d5-bb10-59b9-aa85-8871f847921f" + "id": "58d1c8d5-bb10-59b9-aa85-8871f8479220" }, { "httpRequest": { @@ -57,6 +57,6 @@ "timeToLive": { "unlimited": true }, - "id": "58d1c8d5-bb10-59b9-aa85-8871f8479220" + "id": "58d1c8d5-bb10-59b9-aa85-8871f8479221" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_App_returns_Created_response.json b/src/test/resources/cassettes/features/v2/Create_App_returns_Created_response.json index 12d11a05f48..68b1e4de470 100644 --- a/src/test/resources/cassettes/features/v2/Create_App_returns_Created_response.json +++ b/src/test/resources/cassettes/features/v2/Create_App_returns_Created_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "c782b1f3-1b03-d50f-8fcd-12e51226c50c" + "id": "c782b1f3-1b03-d50f-8fcd-12e51226c510" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_Conflict_response.json b/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_Conflict_response.json index 223e245f710..95cb4a17509 100644 --- a/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_Conflict_response.json +++ b/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_Conflict_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae47" + "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae45" }, { "httpRequest": { @@ -57,7 +57,7 @@ "timeToLive": { "unlimited": true }, - "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae48" + "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae46" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_OK_response.json index 213894420af..fa161e3c9f3 100644 --- a/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Create_Org_Connection_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae44" + "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae43" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_Scanning_Group_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_Scanning_Group_returns_OK_response.json index c4618fa2695..b11575e55a5 100644 --- a/src/test/resources/cassettes/features/v2/Create_Scanning_Group_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Create_Scanning_Group_returns_OK_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "01611a93-5e74-0630-3c51-f707c3b51e82" + "id": "01611a93-5e74-0630-3c51-f707c3b51e7a" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_Scanning_Rule_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Create_Scanning_Rule_returns_Bad_Request_response.json index b58e59655c9..4763eedf8b2 100644 --- a/src/test/resources/cassettes/features/v2/Create_Scanning_Rule_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Create_Scanning_Rule_returns_Bad_Request_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "01611a93-5e74-0630-3c51-f707c3b51e78" + "id": "01611a93-5e74-0630-3c51-f707c3b51e7d" }, { "httpRequest": { @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238a9d" + "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa1" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_Scanning_Rule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_Scanning_Rule_returns_OK_response.json index 7cd225c46c7..8602832ff15 100644 --- a/src/test/resources/cassettes/features/v2/Create_Scanning_Rule_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Create_Scanning_Rule_returns_OK_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "01611a93-5e74-0630-3c51-f707c3b51e83" + "id": "01611a93-5e74-0630-3c51-f707c3b51e85" }, { "httpRequest": { @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa6" + "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa7" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_Scanning_Rule_with_should_save_match_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_Scanning_Rule_with_should_save_match_returns_OK_response.json index 1fec75541c7..98ad2762720 100644 --- a/src/test/resources/cassettes/features/v2/Create_Scanning_Rule_with_should_save_match_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Create_Scanning_Rule_with_should_save_match_returns_OK_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "01611a93-5e74-0630-3c51-f707c3b51e7f" + "id": "01611a93-5e74-0630-3c51-f707c3b51e83" }, { "httpRequest": { @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa3" + "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa5" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_Workflow_returns_Bad_request_response.json b/src/test/resources/cassettes/features/v2/Create_Workflow_returns_Bad_request_response.json index 18bfaac3c98..95a9b514916 100644 --- a/src/test/resources/cassettes/features/v2/Create_Workflow_returns_Bad_request_response.json +++ b/src/test/resources/cassettes/features/v2/Create_Workflow_returns_Bad_request_response.json @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "9dbbb4fe-ff77-d906-2de1-752f55e537f5" + "id": "9dbbb4fe-ff77-d906-2de1-752f55e537f6" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_RUM_based_metric_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_RUM_based_metric_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..8c183907e29 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_a_RUM_based_metric_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2026-06-02T12:32:35.224Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Create_a_RUM_based_metric_returns_Bad_Request_response.json similarity index 100% rename from src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Bad_Request_response.json rename to src/test/resources/cassettes/features/v2/Create_a_RUM_based_metric_returns_Bad_Request_response.json diff --git a/src/test/resources/cassettes/features/v2/Create_a_RUM_based_metric_returns_Conflict_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_RUM_based_metric_returns_Conflict_response.freeze new file mode 100644 index 00000000000..468c54e97a4 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_a_RUM_based_metric_returns_Conflict_response.freeze @@ -0,0 +1 @@ +2026-06-02T12:32:35.746Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Conflict_response.json b/src/test/resources/cassettes/features/v2/Create_a_RUM_based_metric_returns_Conflict_response.json similarity index 75% rename from src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Conflict_response.json rename to src/test/resources/cassettes/features/v2/Create_a_RUM_based_metric_returns_Conflict_response.json index e01c83d1e6c..99afc114390 100644 --- a/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Conflict_response.json +++ b/src/test/resources/cassettes/features/v2/Create_a_RUM_based_metric_returns_Conflict_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Create_a_rum_based_metric_returns_Conflict_response-1732807878\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}},\"id\":\"testcreatearumbasedmetricreturnsconflictresponse1732807878\",\"type\":\"rum_metrics\"}}" + "json": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Create_a_RUM_based_metric_returns_Conflict_response-1780403555\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}},\"id\":\"testcreatearumbasedmetricreturnsconflictresponse1780403555\",\"type\":\"rum_metrics\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"testcreatearumbasedmetricreturnsconflictresponse1732807878\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Create_a_rum_based_metric_returns_Conflict_response-1732807878\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}}", + "body": "{\"data\":{\"id\":\"testcreatearumbasedmetricreturnsconflictresponse1780403555\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Create_a_RUM_based_metric_returns_Conflict_response-1780403555\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "ce744ac5-145e-eb81-ed26-b24d00a1d475" + "id": "680947d4-0533-ee75-7571-a94c4d7965bf" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"count\"},\"event_type\":\"action\"},\"id\":\"testcreatearumbasedmetricreturnsconflictresponse1732807878\",\"type\":\"rum_metrics\"}}" + "json": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"count\"},\"event_type\":\"action\"},\"id\":\"testcreatearumbasedmetricreturnsconflictresponse1780403555\",\"type\":\"rum_metrics\"}}" }, "headers": {}, "method": "POST", @@ -42,7 +42,7 @@ "secure": true }, "httpResponse": { - "body": "{\"errors\":[{\"status\":\"409\",\"title\":\"Conflict\",\"detail\":\"conflict(Field 'data.id' is invalid: 'testcreatearumbasedmetricreturnsconflictresponse1732807878' cannot be used as metric name, a metric already exists with that name)\"}]}", + "body": "{\"errors\":[{\"status\":\"409\",\"title\":\"Conflict\",\"detail\":\"conflict(Field 'data.id' is invalid: 'testcreatearumbasedmetricreturnsconflictresponse1780403555' cannot be used as metric name, a metric already exists with that name)\"}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "c3a3e4c1-d20a-e3f2-2aaf-0bcc6df34957" + "id": "6bf447b1-8f41-8878-d8b5-a65734e7ee4d" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/rum/config/metrics/testcreatearumbasedmetricreturnsconflictresponse1732807878", + "path": "/api/v2/rum/config/metrics/testcreatearumbasedmetricreturnsconflictresponse1780403555", "keepAlive": false, "secure": true }, @@ -78,6 +78,6 @@ "timeToLive": { "unlimited": true }, - "id": "6e3a0d4b-b63e-9dc8-9da8-cf0af190715a" + "id": "ca8afa6d-89b7-3437-ccca-bb4e3b582c2e" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_RUM_based_metric_returns_Created_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_RUM_based_metric_returns_Created_response.freeze new file mode 100644 index 00000000000..6ddf8a62765 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_a_RUM_based_metric_returns_Created_response.freeze @@ -0,0 +1 @@ +2026-06-02T12:32:37.019Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Created_response.json b/src/test/resources/cassettes/features/v2/Create_a_RUM_based_metric_returns_Created_response.json similarity index 87% rename from src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Created_response.json rename to src/test/resources/cassettes/features/v2/Create_a_RUM_based_metric_returns_Created_response.json index 9ae8bb032f0..f59afb356a7 100644 --- a/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Created_response.json +++ b/src/test/resources/cassettes/features/v2/Create_a_RUM_based_metric_returns_Created_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"@service:web-ui\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}},\"id\":\"testcreatearumbasedmetricreturnscreatedresponse1747896106\",\"type\":\"rum_metrics\"}}" + "json": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"@service:web-ui\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}},\"id\":\"testcreatearumbasedmetricreturnscreatedresponse1780403557\",\"type\":\"rum_metrics\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"testcreatearumbasedmetricreturnscreatedresponse1747896106\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"@service:web-ui\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}}", + "body": "{\"data\":{\"id\":\"testcreatearumbasedmetricreturnscreatedresponse1780403557\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"@service:web-ui\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "5e0d2db1-5a24-b26d-e971-a05af71e7ec8" + "id": "1313cf99-dfbc-cd33-37d1-6b7b49802844" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/rum/config/metrics/testcreatearumbasedmetricreturnscreatedresponse1747896106", + "path": "/api/v2/rum/config/metrics/testcreatearumbasedmetricreturnscreatedresponse1780403557", "keepAlive": false, "secure": true }, @@ -48,6 +48,6 @@ "timeToLive": { "unlimited": true }, - "id": "4afe641a-e95c-2475-bc3a-29853567e435" + "id": "38ed077d-2916-08ff-57a5-85ac095ed920" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_Workflow_returns_Bad_request_response.json b/src/test/resources/cassettes/features/v2/Create_a_Workflow_returns_Bad_request_response.json index 4db34a7a497..c995fd8ce46 100644 --- a/src/test/resources/cassettes/features/v2/Create_a_Workflow_returns_Bad_request_response.json +++ b/src/test/resources/cassettes/features/v2/Create_a_Workflow_returns_Bad_request_response.json @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "9dbbb4fe-ff77-d906-2de1-752f55e537f6" + "id": "9dbbb4fe-ff77-d906-2de1-752f55e537f5" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_Conflict_response.json b/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_Conflict_response.json index 3af6b797aec..a36dab60468 100644 --- a/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_Conflict_response.json +++ b/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_Conflict_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "13fe9685-b072-5fe0-c841-4499a9e71c75" + "id": "13fe9685-b072-5fe0-c841-4499a9e71c73" }, { "httpRequest": { @@ -57,7 +57,7 @@ "timeToLive": { "unlimited": true }, - "id": "13fe9685-b072-5fe0-c841-4499a9e71c76" + "id": "13fe9685-b072-5fe0-c841-4499a9e71c74" }, { "httpRequest": { @@ -83,6 +83,6 @@ "timeToLive": { "unlimited": true }, - "id": "e535722a-99e3-30cf-49f7-2d093bd78b3f" + "id": "e535722a-99e3-30cf-49f7-2d093bd78b3c" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_OK_response.json index 28abb6f8e76..70277980974 100644 --- a/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Create_a_custom_framework_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "13fe9685-b072-5fe0-c841-4499a9e71c74" + "id": "13fe9685-b072-5fe0-c841-4499a9e71c75" }, { "httpRequest": { @@ -53,6 +53,6 @@ "timeToLive": { "unlimited": true }, - "id": "e535722a-99e3-30cf-49f7-2d093bd78b3e" + "id": "e535722a-99e3-30cf-49f7-2d093bd78b3d" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_dataset_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_a_dataset_returns_OK_response.json index e735e8a6ac5..deaeed87dbc 100644 --- a/src/test/resources/cassettes/features/v2/Create_a_dataset_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Create_a_dataset_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "32c558cf-4a2e-f914-f443-ab94000addca" + "id": "32c558cf-4a2e-f914-f443-ab94000addc9" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_a_form_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_form_returns_OK_response.freeze new file mode 100644 index 00000000000..094857b451b --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_a_form_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-06-04T18:34:02.931Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_form_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_a_form_returns_OK_response.json new file mode 100644 index 00000000000..c9aa226af3e --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_a_form_returns_OK_response.json @@ -0,0 +1,58 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"anonymous\":false,\"data_definition\":{},\"description\":\"A form to collect user feedback.\",\"idp_survey\":false,\"name\":\"User Feedback Form\",\"single_response\":false,\"ui_definition\":{}},\"type\":\"forms\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/forms", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"edb7d6d5-e21c-4fd0-845d-679317b5c2c9\",\"type\":\"forms\",\"attributes\":{\"active\":true,\"anonymous\":false,\"created_at\":\"2026-06-04T18:34:04.103183Z\",\"datastore_config\":{\"datastore_id\":\"7cc8dadd-3529-4d0f-b8cb-f8c11c165867\",\"primary_column_name\":\"id\",\"primary_key_generation_strategy\":\"none\"},\"description\":\"A form to collect user feedback.\",\"idp_survey\":false,\"modified_at\":\"2026-06-04T18:34:04.103183Z\",\"name\":\"User Feedback Form\",\"org_id\":321813,\"self_service\":false,\"single_response\":false,\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"version\":{\"id\":\"354653\",\"state\":\"draft\",\"version\":1,\"etag\":\"b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d\",\"definition_signature\":\"{\\\"signature\\\":\\\"{\\\\\\\"version\\\\\\\":2,\\\\\\\"algorithm\\\\\\\":\\\\\\\"ecdsa-p384\\\\\\\",\\\\\\\"pubkey\\\\\\\":\\\\\\\"XOOWpRG1rFvaLHaG9qLf+GG78llET0BKnZtokyAtLfg=\\\\\\\",\\\\\\\"timestamp\\\\\\\":1780598044,\\\\\\\"proof\\\\\\\":\\\\\\\"MGQCMHsaS9oy6ZDzhUZuJQAYiivxgo9XKx5NjTW/0wafPecXBQ3lr27bKejXr4ihAuwxsgIwPfgedZacZ4t3Qg8p0+jrXH5MBdZx9hrat8mijVibYuLUd2n+bxaY0xcghHKwbtu4\\\\\\\"}\\\",\\\"version\\\":1}\",\"data_definition\":{},\"ui_definition\":{},\"created_at\":\"2026-06-04T18:34:04.103183Z\",\"modified_at\":\"2026-06-04T18:34:04.103183Z\",\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "c7b9653a-f05b-6a5e-f658-7992c466b12a" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/forms/edb7d6d5-e21c-4fd0-845d-679317b5c2c9", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"edb7d6d5-e21c-4fd0-845d-679317b5c2c9\",\"type\":\"forms\"}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "dd1cc462-5a8e-953b-c117-9686481feb95" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_new_incident_service_returns_CREATED_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_new_incident_service_returns_CREATED_response.freeze deleted file mode 100644 index 1ed50bd7167..00000000000 --- a/src/test/resources/cassettes/features/v2/Create_a_new_incident_service_returns_CREATED_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2022-05-12T09:51:29.760Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_new_incident_service_returns_CREATED_response.json b/src/test/resources/cassettes/features/v2/Create_a_new_incident_service_returns_CREATED_response.json deleted file mode 100644 index 24c4d34865e..00000000000 --- a/src/test/resources/cassettes/features/v2/Create_a_new_incident_service_returns_CREATED_response.json +++ /dev/null @@ -1,53 +0,0 @@ -[ - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"name\":\"Test-Create_a_new_incident_service_returns_CREATED_response-1652349089\"},\"type\":\"services\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/services", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"included\":[{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"created_at\":\"2019-10-02T08:15:39.795051+00:00\",\"modified_at\":\"2020-06-15T12:33:12.884459+00:00\",\"email\":\"frog@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Active\"},\"relationships\":{\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}],\"data\":{\"type\":\"services\",\"id\":\"aa4526fd-8084-58a0-bd52-164cd7f1a51e\",\"attributes\":{\"name\":\"Test-Create_a_new_incident_service_returns_CREATED_response-1652349089\",\"created\":\"2022-05-12T09:51:30.250528+00:00\",\"modified\":\"2022-05-12T09:51:30.250528+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}", - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "6a7b5085-71de-360d-de94-1be8874989fa" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/services/aa4526fd-8084-58a0-bd52-164cd7f1a51e", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "cafd6c46-ea26-8fb6-9e86-c4d17bdf8589" - } -] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Bad_Request_response.freeze deleted file mode 100644 index 68ac266aa8c..00000000000 --- a/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Bad_Request_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-11-28T15:31:17.723Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Conflict_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Conflict_response.freeze deleted file mode 100644 index d20e2a92bc4..00000000000 --- a/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Conflict_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-11-28T15:31:18.166Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Created_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Created_response.freeze deleted file mode 100644 index 7304d8219a6..00000000000 --- a/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Created_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2025-05-22T06:41:46.880Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_tag_indexing_rule_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_tag_indexing_rule_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..19bf8de575e --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_a_tag_indexing_rule_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2026-06-04T18:25:59.130Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_tag_indexing_rule_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Create_a_tag_indexing_rule_returns_Bad_Request_response.json new file mode 100644 index 00000000000..0ce8830263d --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_a_tag_indexing_rule_returns_Bad_Request_response.json @@ -0,0 +1,32 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"metric_name_matches\":[\"dd.test.*\"],\"name\":\"test\",\"options\":{\"data\":{\"manage_preexisting_metrics\":true,\"override_previous_rules\":false},\"version\":99}},\"type\":\"tag_indexing_rules\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/metrics/tag-indexing-rules", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[\"Invalid request body: options version must be 1\"]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 400, + "reasonPhrase": "Bad Request" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "7e717e93-5f17-78b6-9a12-77fb880eeb60" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_tag_indexing_rule_returns_Created_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_tag_indexing_rule_returns_Created_response.freeze new file mode 100644 index 00000000000..d30e608dba4 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_a_tag_indexing_rule_returns_Created_response.freeze @@ -0,0 +1 @@ +2026-06-04T16:39:36.532Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_tag_indexing_rule_returns_Created_response.json b/src/test/resources/cassettes/features/v2/Create_a_tag_indexing_rule_returns_Created_response.json new file mode 100644 index 00000000000..860549974c1 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_a_tag_indexing_rule_returns_Created_response.json @@ -0,0 +1,53 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"exclude_tags_mode\":false,\"ignored_metric_name_matches\":[],\"metric_name_matches\":[\"dd.test.*\"],\"name\":\"my-indexing-rule\",\"options\":{\"data\":{\"dynamic_tags\":{\"queried_tags_window_seconds\":3600,\"related_asset_tags\":false},\"manage_preexisting_metrics\":true,\"metric_match\":{\"queried_window_seconds\":3600},\"override_previous_rules\":false},\"version\":1},\"tags\":[\"env\",\"service\"]},\"type\":\"tag_indexing_rules\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/metrics/tag-indexing-rules", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"b0a2d605-eee3-4c3b-89cf-51410b054ae7\",\"type\":\"tag_indexing_rules\",\"attributes\":{\"created_at\":\"2026-06-04T16:39:36.579331Z\",\"created_by_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"exclude_tags_mode\":false,\"ignored_metric_name_matches\":[],\"metric_name_matches\":[\"dd.test.*\"],\"modified_at\":\"2026-06-04T16:39:36.579331Z\",\"modified_by_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"my-indexing-rule\",\"options\":{\"version\":1,\"data\":{\"override_previous_rules\":false,\"manage_preexisting_metrics\":true,\"dynamic_tags\":{\"queried_tags_window_seconds\":3600},\"metric_match\":{\"queried_window_seconds\":3600}}},\"rule_order\":1,\"tags\":[\"env\",\"service\"]}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "ff724096-401a-2e75-3864-8085403aad3d" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/metrics/tag-indexing-rules/b0a2d605-eee3-4c3b-89cf-51410b054ae7", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "7576523e-5d16-c797-255e-a9d105add5cb" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_an_AWS_account_returns_AWS_Account_object_response.json b/src/test/resources/cassettes/features/v2/Create_an_AWS_account_returns_AWS_Account_object_response.json index 83646ddb287..4e7150c70a8 100644 --- a/src/test/resources/cassettes/features/v2/Create_an_AWS_account_returns_AWS_Account_object_response.json +++ b/src/test/resources/cassettes/features/v2/Create_an_AWS_account_returns_AWS_Account_object_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "bf073e02-7e0b-dc8b-b075-82932236e50a" + "id": "bf073e02-7e0b-dc8b-b075-82932236e50b" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_an_AWS_integration_returns_Conflict_response.json b/src/test/resources/cassettes/features/v2/Create_an_AWS_integration_returns_Conflict_response.json index 19dc53b7c6a..22c7d6bcded 100644 --- a/src/test/resources/cassettes/features/v2/Create_an_AWS_integration_returns_Conflict_response.json +++ b/src/test/resources/cassettes/features/v2/Create_an_AWS_integration_returns_Conflict_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "479ab602-1a6a-ff9c-cfae-4a71849b3ce4" + "id": "479ab602-1a6a-ff9c-cfae-4a71849b3ce5" }, { "httpRequest": { @@ -57,7 +57,7 @@ "timeToLive": { "unlimited": true }, - "id": "bf073e02-7e0b-dc8b-b075-82932236e50b" + "id": "bf073e02-7e0b-dc8b-b075-82932236e50a" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_an_incident_type_returns_CREATED_response.json b/src/test/resources/cassettes/features/v2/Create_an_incident_type_returns_CREATED_response.json index ae1a3ad8373..0c41cf698d6 100644 --- a/src/test/resources/cassettes/features/v2/Create_an_incident_type_returns_CREATED_response.json +++ b/src/test/resources/cassettes/features/v2/Create_an_incident_type_returns_CREATED_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "7bcfec66-5300-9891-51e5-e4d7e0833bda" + "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd1" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_and_publish_a_form_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Create_and_publish_a_form_returns_OK_response.freeze new file mode 100644 index 00000000000..0add2d175dc --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_and_publish_a_form_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-06-04T18:34:04.703Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_and_publish_a_form_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_and_publish_a_form_returns_OK_response.json new file mode 100644 index 00000000000..ee9a8f5aa73 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_and_publish_a_form_returns_OK_response.json @@ -0,0 +1,58 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"anonymous\":false,\"data_definition\":{},\"description\":\"A form to collect user feedback.\",\"idp_survey\":false,\"name\":\"User Feedback Form\",\"single_response\":false,\"ui_definition\":{}},\"type\":\"forms\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/forms/create_and_publish", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"65318f43-ac0f-4990-add8-9847eee98fd8\",\"type\":\"forms\",\"attributes\":{\"active\":true,\"anonymous\":false,\"created_at\":\"2026-06-04T18:34:05.178222Z\",\"datastore_config\":{\"datastore_id\":\"c89fc16a-53fb-4439-a007-1ebec095b1b7\",\"primary_column_name\":\"id\",\"primary_key_generation_strategy\":\"none\"},\"description\":\"A form to collect user feedback.\",\"idp_survey\":false,\"modified_at\":\"2026-06-04T18:34:05.178222Z\",\"name\":\"User Feedback Form\",\"org_id\":321813,\"publication\":{\"id\":\"357922\",\"org_id\":321813,\"form_id\":\"65318f43-ac0f-4990-add8-9847eee98fd8\",\"publish_seq\":1,\"form_version\":1,\"created_at\":\"2026-06-04T18:34:05.178222Z\",\"modified_at\":\"2026-06-04T18:34:05.178222Z\",\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"self_service\":false,\"single_response\":false,\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"version\":{\"id\":\"354654\",\"state\":\"frozen\",\"version\":1,\"etag\":\"b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d\",\"definition_signature\":\"{\\\"signature\\\":\\\"{\\\\\\\"version\\\\\\\":2,\\\\\\\"algorithm\\\\\\\":\\\\\\\"ecdsa-p384\\\\\\\",\\\\\\\"pubkey\\\\\\\":\\\\\\\"XOOWpRG1rFvaLHaG9qLf+GG78llET0BKnZtokyAtLfg=\\\\\\\",\\\\\\\"timestamp\\\\\\\":1780598045,\\\\\\\"proof\\\\\\\":\\\\\\\"MGYCMQCPPczYtNvj1RLjrQkIrQNHHVgB3nxFIjn5jgwUE0tweuTV1kZnaYYUg+gl1Eh5+tMCMQCajq1cy1MaWEbzHA0EcDC6LjyQ5ajqqngb3RMQwzP8ewvsh+uzkPD2v6AHjnW115o=\\\\\\\"}\\\",\\\"version\\\":1}\",\"data_definition\":{},\"ui_definition\":{},\"created_at\":\"2026-06-04T18:34:05.178222Z\",\"modified_at\":\"2026-06-04T18:34:05.178222Z\",\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "7e286d1b-6d68-4a13-2ce3-8d507aceb865" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/forms/65318f43-ac0f-4990-add8-9847eee98fd8", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"65318f43-ac0f-4990-add8-9847eee98fd8\",\"type\":\"forms\"}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "63619055-3e4d-34f5-f014-3ac3ec30e651" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_custom_attribute_config_for_a_case_type_returns_CREATED_response.json b/src/test/resources/cassettes/features/v2/Create_custom_attribute_config_for_a_case_type_returns_CREATED_response.json index 9fe6ad431e0..1a120b75ae8 100644 --- a/src/test/resources/cassettes/features/v2/Create_custom_attribute_config_for_a_case_type_returns_CREATED_response.json +++ b/src/test/resources/cassettes/features/v2/Create_custom_attribute_config_for_a_case_type_returns_CREATED_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "dc45fc73-0f09-c12d-941b-eaf799af6464" + "id": "dc45fc73-0f09-c12d-941b-eaf799af6463" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_incident_notification_rule_returns_Created_response.json b/src/test/resources/cassettes/features/v2/Create_incident_notification_rule_returns_Created_response.json index b794f34e580..92627d59122 100644 --- a/src/test/resources/cassettes/features/v2/Create_incident_notification_rule_returns_Created_response.json +++ b/src/test/resources/cassettes/features/v2/Create_incident_notification_rule_returns_Created_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd1" + "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd2" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_incident_notification_template_returns_Created_response.json b/src/test/resources/cassettes/features/v2/Create_incident_notification_template_returns_Created_response.json index 91af4088c4a..49aa005cb04 100644 --- a/src/test/resources/cassettes/features/v2/Create_incident_notification_template_returns_Created_response.json +++ b/src/test/resources/cassettes/features/v2/Create_incident_notification_template_returns_Created_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd2" + "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd3" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Create_or_update_a_form_version_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Create_or_update_a_form_version_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..e11ef0b046e --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_or_update_a_form_version_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2026-06-10T18:49:59.498Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_or_update_a_form_version_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Create_or_update_a_form_version_returns_Not_Found_response.json new file mode 100644 index 00000000000..f2f73cd037e --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_or_update_a_form_version_returns_Not_Found_response.json @@ -0,0 +1,32 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"data_definition\":{\"description\":\"Welcome to the Engineering Experience Survey.\",\"required\":[],\"title\":\"Developer Experience Survey\",\"type\":\"object\"},\"state\":\"frozen\",\"ui_definition\":{\"ui:order\":[],\"ui:theme\":{\"primaryColor\":\"gray\"}},\"upsert_params\":{\"etag\":\"b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d\",\"insert_only\":false,\"match_policy\":\"none\"}},\"type\":\"form_versions\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/forms/00000000-0000-0000-0000-000000000001/versions", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"status\":\"404\",\"id\":\"f24e2ab1-4ba1-48cf-a4a2-86a32cc2e702\",\"title\":\"form not found\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 404, + "reasonPhrase": "Not Found" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "90e38ae8-3b2d-0b14-0bf5-942e8a3ef8bd" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_or_update_a_form_version_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Create_or_update_a_form_version_returns_OK_response.freeze new file mode 100644 index 00000000000..825b0d0aab6 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_or_update_a_form_version_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-06-10T18:49:59.826Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_or_update_a_form_version_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_or_update_a_form_version_returns_OK_response.json new file mode 100644 index 00000000000..b118f705d0f --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_or_update_a_form_version_returns_OK_response.json @@ -0,0 +1,88 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"anonymous\":false,\"data_definition\":{},\"description\":\"A simple test form.\",\"idp_survey\":false,\"name\":\"Test-Create_or_update_a_form_version_returns_OK_response-1781117399\",\"single_response\":false,\"ui_definition\":{}},\"type\":\"forms\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/forms", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"49ccfa97-825c-46f8-872b-5368fd1b56a4\",\"type\":\"forms\",\"attributes\":{\"active\":true,\"anonymous\":false,\"created_at\":\"2026-06-10T18:50:00.188982Z\",\"datastore_config\":{\"datastore_id\":\"be7e7cf5-6a73-4d07-9654-a40997bee800\",\"primary_column_name\":\"id\",\"primary_key_generation_strategy\":\"none\"},\"description\":\"A simple test form.\",\"idp_survey\":false,\"modified_at\":\"2026-06-10T18:50:00.188982Z\",\"name\":\"Test-Create_or_update_a_form_version_returns_OK_response-1781117399\",\"org_id\":321813,\"self_service\":false,\"single_response\":false,\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"version\":{\"id\":\"376765\",\"state\":\"draft\",\"version\":1,\"etag\":\"b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d\",\"definition_signature\":\"{\\\"signature\\\":\\\"{\\\\\\\"version\\\\\\\":2,\\\\\\\"algorithm\\\\\\\":\\\\\\\"ecdsa-p384\\\\\\\",\\\\\\\"pubkey\\\\\\\":\\\\\\\"S2KAuCoip8JbyZNOT2gYbpUouidttEGvYWyvqeoMQjE=\\\\\\\",\\\\\\\"timestamp\\\\\\\":1781117400,\\\\\\\"proof\\\\\\\":\\\\\\\"MGUCMQDyae03EWzAe3gENsZt4WVLiPP8TGQg7UO7I28dcEK5w70MRYRf9x18lDXfOEDoPrgCMCHlQeXp/K5AKKmyVYwtJd9VI1SsJoOBOXbj26BhPKZBF386oH7LxK45J12htxj9hw==\\\\\\\"}\\\",\\\"version\\\":1}\",\"data_definition\":{},\"ui_definition\":{},\"created_at\":\"2026-06-10T18:50:00.188982Z\",\"modified_at\":\"2026-06-10T18:50:00.188982Z\",\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "8985f01f-f5a7-22ce-eabb-567eb10c2b05" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"data_definition\":{\"description\":\"Welcome to the Engineering Experience Survey.\",\"required\":[],\"title\":\"Developer Experience Survey\",\"type\":\"object\"},\"state\":\"frozen\",\"ui_definition\":{\"ui:order\":[],\"ui:theme\":{\"primaryColor\":\"gray\"}},\"upsert_params\":{\"etag\":\"b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d\",\"insert_only\":false,\"match_policy\":\"none\"}},\"type\":\"form_versions\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/forms/49ccfa97-825c-46f8-872b-5368fd1b56a4/versions", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"376765\",\"type\":\"form_versions\",\"attributes\":{\"created_at\":\"2026-06-10T18:50:00.188982Z\",\"data_definition\":{\"description\":\"Welcome to the Engineering Experience Survey.\",\"required\":[],\"title\":\"Developer Experience Survey\",\"type\":\"object\"},\"definition_signature\":\"{\\\"signature\\\":\\\"{\\\\\\\"version\\\\\\\":2,\\\\\\\"algorithm\\\\\\\":\\\\\\\"ecdsa-p384\\\\\\\",\\\\\\\"pubkey\\\\\\\":\\\\\\\"XOOWpRG1rFvaLHaG9qLf+GG78llET0BKnZtokyAtLfg=\\\\\\\",\\\\\\\"timestamp\\\\\\\":1781117400,\\\\\\\"proof\\\\\\\":\\\\\\\"MGQCMGbAihRvSVO+KjM9uttjprG+2ZR6D5kKoXwIS4em5mjg9StXgu/pi08NfU4WMdTD8wIwcxxGWh+MzG6awNnii2Cjl46YNhPBV39JpU03mlQsb+9cGVgqL2JYVsDaAJ0G+YzN\\\\\\\"}\\\",\\\"version\\\":1}\",\"etag\":\"30586851d6ab0b26080d3f34629e5e2cfb9f2f57457eec927b72eafefae81e48\",\"modified_at\":\"2026-06-10T18:50:00.568923Z\",\"state\":\"frozen\",\"ui_definition\":{\"ui:order\":[],\"ui:theme\":{\"primaryColor\":\"gray\"}},\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"version\":1}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "66df350f-b4de-4065-9541-cccbb363c5fc" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/forms/49ccfa97-825c-46f8-872b-5368fd1b56a4", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"49ccfa97-825c-46f8-872b-5368fd1b56a4\",\"type\":\"forms\"}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "52e01033-7767-b4b7-3e41-973ef4fb5dfb" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_role_with_a_permission_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_role_with_a_permission_returns_OK_response.json index 036e7ac60ea..509ebc27f11 100644 --- a/src/test/resources/cassettes/features/v2/Create_role_with_a_permission_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Create_role_with_a_permission_returns_OK_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "ab2c08c1-60c7-9278-3246-d650bb892172" + "id": "ab2c08c1-60c7-9278-3246-d650bb892171" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Creates_a_data_deletion_request_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Creates_a_data_deletion_request_returns_OK_response.json index c12abc0c362..8155c3aeded 100644 --- a/src/test/resources/cassettes/features/v2/Creates_a_data_deletion_request_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Creates_a_data_deletion_request_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "516e2b97-25f6-b08c-4d4a-1da22948b330" + "id": "516e2b97-25f6-b08c-4d4a-1da22948b32e" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_AWS_CCM_config_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_AWS_CCM_config_returns_No_Content_response.json index c32805bcdb2..efa9967a0e4 100644 --- a/src/test/resources/cassettes/features/v2/Delete_AWS_CCM_config_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_AWS_CCM_config_returns_No_Content_response.json @@ -18,6 +18,6 @@ "timeToLive": { "unlimited": true }, - "id": "b2bcb392-2d71-be89-5578-460535c541af" + "id": "b2bcb392-2d71-be89-5578-460535c541b0" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_App_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_App_returns_OK_response.json index 813ef8386df..26d207ed1cb 100644 --- a/src/test/resources/cassettes/features/v2/Delete_App_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_App_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "c782b1f3-1b03-d50f-8fcd-12e51226c511" + "id": "c782b1f3-1b03-d50f-8fcd-12e51226c50d" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_Org_Connection_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_Org_Connection_returns_OK_response.json index bec4c8bb7be..d0572cd8b5b 100644 --- a/src/test/resources/cassettes/features/v2/Delete_Org_Connection_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_Org_Connection_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae49" + "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae44" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_Scanning_Group_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_Scanning_Group_returns_OK_response.json index 1077273c329..608c25497f7 100644 --- a/src/test/resources/cassettes/features/v2/Delete_Scanning_Group_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_Scanning_Group_returns_OK_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "01611a93-5e74-0630-3c51-f707c3b51e7e" + "id": "01611a93-5e74-0630-3c51-f707c3b51e80" }, { "httpRequest": { @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa2" + "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa3" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_Scanning_Rule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_Scanning_Rule_returns_OK_response.json index b25f9a30e79..43987896cb3 100644 --- a/src/test/resources/cassettes/features/v2/Delete_Scanning_Rule_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_Scanning_Rule_returns_OK_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "01611a93-5e74-0630-3c51-f707c3b51e7b" + "id": "01611a93-5e74-0630-3c51-f707c3b51e7c" }, { "httpRequest": { @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238a9f" + "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa0" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_a_RUM_based_metric_returns_No_Content_response.freeze b/src/test/resources/cassettes/features/v2/Delete_a_RUM_based_metric_returns_No_Content_response.freeze new file mode 100644 index 00000000000..0b000af184d --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_a_RUM_based_metric_returns_No_Content_response.freeze @@ -0,0 +1 @@ +2026-06-02T12:32:38.038Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_rum_based_metric_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_a_RUM_based_metric_returns_No_Content_response.json similarity index 76% rename from src/test/resources/cassettes/features/v2/Delete_a_rum_based_metric_returns_No_Content_response.json rename to src/test/resources/cassettes/features/v2/Delete_a_RUM_based_metric_returns_No_Content_response.json index 4f2927054c8..7c0aba0dec6 100644 --- a/src/test/resources/cassettes/features/v2/Delete_a_rum_based_metric_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_a_RUM_based_metric_returns_No_Content_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Delete_a_rum_based_metric_returns_No_Content_response-1732807880\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}},\"id\":\"testdeletearumbasedmetricreturnsnocontentresponse1732807880\",\"type\":\"rum_metrics\"}}" + "json": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Delete_a_RUM_based_metric_returns_No_Content_response-1780403558\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}},\"id\":\"testdeletearumbasedmetricreturnsnocontentresponse1780403558\",\"type\":\"rum_metrics\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"testdeletearumbasedmetricreturnsnocontentresponse1732807880\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Delete_a_rum_based_metric_returns_No_Content_response-1732807880\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}}", + "body": "{\"data\":{\"id\":\"testdeletearumbasedmetricreturnsnocontentresponse1780403558\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Delete_a_RUM_based_metric_returns_No_Content_response-1780403558\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "b88bbfde-f035-ba1b-fc77-6825569e72e6" + "id": "7d0b9db8-5b95-edeb-b622-fe3c76d65cc1" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/rum/config/metrics/testdeletearumbasedmetricreturnsnocontentresponse1732807880", + "path": "/api/v2/rum/config/metrics/testdeletearumbasedmetricreturnsnocontentresponse1780403558", "keepAlive": false, "secure": true }, @@ -48,18 +48,18 @@ "timeToLive": { "unlimited": true }, - "id": "d52b4c53-297e-4084-c6b2-aa19f4e45e38" + "id": "0dfad56f-9f5a-eafb-0827-3bd39b9c44c9" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/rum/config/metrics/testdeletearumbasedmetricreturnsnocontentresponse1732807880", + "path": "/api/v2/rum/config/metrics/testdeletearumbasedmetricreturnsnocontentresponse1780403558", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"not_found(Metric with name 'testdeletearumbasedmetricreturnsnocontentresponse1732807880' not found)\"}]}", + "body": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"not_found(Metric with name 'testdeletearumbasedmetricreturnsnocontentresponse1780403558' not found)\"}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -74,6 +74,6 @@ "timeToLive": { "unlimited": true }, - "id": "d52b4c53-297e-4084-c6b2-aa19f4e45e39" + "id": "0dfad56f-9f5a-eafb-0827-3bd39b9c44ca" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_RUM_based_metric_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Delete_a_RUM_based_metric_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..734c26d1e6c --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_a_RUM_based_metric_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2026-06-02T12:32:39.442Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_rum_based_metric_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Delete_a_RUM_based_metric_returns_Not_Found_response.json similarity index 63% rename from src/test/resources/cassettes/features/v2/Delete_a_rum_based_metric_returns_Not_Found_response.json rename to src/test/resources/cassettes/features/v2/Delete_a_RUM_based_metric_returns_Not_Found_response.json index 17a827420ea..fced7bacecc 100644 --- a/src/test/resources/cassettes/features/v2/Delete_a_rum_based_metric_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_a_RUM_based_metric_returns_Not_Found_response.json @@ -3,12 +3,12 @@ "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/rum/config/metrics/Test-Delete_a_rum_based_metric_returns_Not_Found_response-1732807881", + "path": "/api/v2/rum/config/metrics/Test-Delete_a_RUM_based_metric_returns_Not_Found_response-1780403559", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"not_found(Metric with name 'Test-Delete_a_rum_based_metric_returns_Not_Found_response-1732807881' not found)\"}]}", + "body": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"not_found(Metric with name 'Test-Delete_a_RUM_based_metric_returns_Not_Found_response-1780403559' not found)\"}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "36b2b882-82c2-8774-699a-69cbd7103455" + "id": "46007b63-d705-fc0a-6196-b0eaa45dfe92" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_WAF_exclusion_filter_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_a_WAF_exclusion_filter_returns_OK_response.json index d14b87aa29b..e17e659929e 100644 --- a/src/test/resources/cassettes/features/v2/Delete_a_WAF_exclusion_filter_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_a_WAF_exclusion_filter_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "f87651cf-cb9d-db71-c4de-1be9e301b3ea" + "id": "f87651cf-cb9d-db71-c4de-1be9e301b3e9" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_a_custom_framework_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_a_custom_framework_returns_OK_response.json index ebf1f92f4a9..bf3d084fa30 100644 --- a/src/test/resources/cassettes/features/v2/Delete_a_custom_framework_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_a_custom_framework_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "13fe9685-b072-5fe0-c841-4499a9e71c72" + "id": "13fe9685-b072-5fe0-c841-4499a9e71c76" }, { "httpRequest": { @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "e535722a-99e3-30cf-49f7-2d093bd78b3b" + "id": "e535722a-99e3-30cf-49f7-2d093bd78b3e" }, { "httpRequest": { @@ -79,6 +79,6 @@ "timeToLive": { "unlimited": true }, - "id": "e535722a-99e3-30cf-49f7-2d093bd78b3c" + "id": "e535722a-99e3-30cf-49f7-2d093bd78b3f" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_dataset_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_a_dataset_returns_No_Content_response.json index 92c10c6b507..8e3a81ae91c 100644 --- a/src/test/resources/cassettes/features/v2/Delete_a_dataset_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_a_dataset_returns_No_Content_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "32c558cf-4a2e-f914-f443-ab94000addc9" + "id": "32c558cf-4a2e-f914-f443-ab94000addca" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_a_form_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Delete_a_form_returns_OK_response.freeze new file mode 100644 index 00000000000..602659c5aad --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_a_form_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-06-04T18:34:05.786Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_form_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_a_form_returns_OK_response.json new file mode 100644 index 00000000000..5454c88a60f --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_a_form_returns_OK_response.json @@ -0,0 +1,84 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"anonymous\":false,\"data_definition\":{},\"description\":\"A simple test form.\",\"idp_survey\":false,\"name\":\"Test-Delete_a_form_returns_OK_response-1780598045\",\"single_response\":false,\"ui_definition\":{}},\"type\":\"forms\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/forms", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"257a9d32-6ed0-429b-9745-75366363caf3\",\"type\":\"forms\",\"attributes\":{\"active\":true,\"anonymous\":false,\"created_at\":\"2026-06-04T18:34:06.128238Z\",\"datastore_config\":{\"datastore_id\":\"1e33b83f-0733-454e-9404-c032a479548e\",\"primary_column_name\":\"id\",\"primary_key_generation_strategy\":\"none\"},\"description\":\"A simple test form.\",\"idp_survey\":false,\"modified_at\":\"2026-06-04T18:34:06.128238Z\",\"name\":\"Test-Delete_a_form_returns_OK_response-1780598045\",\"org_id\":321813,\"self_service\":false,\"single_response\":false,\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"version\":{\"id\":\"354655\",\"state\":\"draft\",\"version\":1,\"etag\":\"b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d\",\"definition_signature\":\"{\\\"signature\\\":\\\"{\\\\\\\"version\\\\\\\":2,\\\\\\\"algorithm\\\\\\\":\\\\\\\"ecdsa-p384\\\\\\\",\\\\\\\"pubkey\\\\\\\":\\\\\\\"XOOWpRG1rFvaLHaG9qLf+GG78llET0BKnZtokyAtLfg=\\\\\\\",\\\\\\\"timestamp\\\\\\\":1780598046,\\\\\\\"proof\\\\\\\":\\\\\\\"MGQCMDR3p4Wc6qLinT0JK9tT2I3NBvYMx43pPcUuCOyMapne99sS2RJe0woOU68I0GbQvwIwQMw7OQruNsIuTNJxK0zthVCFnXaxLASIvl2NsyomT9s/p2cgEzOY4T+XyRl6i27c\\\\\\\"}\\\",\\\"version\\\":1}\",\"data_definition\":{},\"ui_definition\":{},\"created_at\":\"2026-06-04T18:34:06.128238Z\",\"modified_at\":\"2026-06-04T18:34:06.128238Z\",\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "ab7636c2-f5ca-c908-802f-67d1277347c4" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/forms/257a9d32-6ed0-429b-9745-75366363caf3", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"257a9d32-6ed0-429b-9745-75366363caf3\",\"type\":\"forms\"}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "a3020ceb-8abf-f343-154d-92379a034bd8" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/forms/257a9d32-6ed0-429b-9745-75366363caf3", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "a3020ceb-8abf-f343-154d-92379a034bd9" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_pipeline_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_a_pipeline_returns_OK_response.json index 91769fdcab4..f01c5129808 100644 --- a/src/test/resources/cassettes/features/v2/Delete_a_pipeline_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_a_pipeline_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "1c5790bf-1fdc-930d-ee1e-046e57b87c7f" + "id": "1c5790bf-1fdc-930d-ee1e-046e57b87c80" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_a_restriction_query_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_a_restriction_query_returns_OK_response.json index b4f342c7c6b..36063a53b6f 100644 --- a/src/test/resources/cassettes/features/v2/Delete_a_restriction_query_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_a_restriction_query_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "eb3b308b-3d56-9ef8-4096-dd7718f5185e" + "id": "eb3b308b-3d56-9ef8-4096-dd7718f51860" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_a_retention_filter_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_a_retention_filter_returns_OK_response.json index 48b483cd7a4..381d1b90a1b 100644 --- a/src/test/resources/cassettes/features/v2/Delete_a_retention_filter_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_a_retention_filter_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "b2404278-8cc9-cba4-e3eb-03a7fdff069b" + "id": "b2404278-8cc9-cba4-e3eb-03a7fdff0699" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_a_rum_based_metric_returns_No_Content_response.freeze b/src/test/resources/cassettes/features/v2/Delete_a_rum_based_metric_returns_No_Content_response.freeze deleted file mode 100644 index dcea2129655..00000000000 --- a/src/test/resources/cassettes/features/v2/Delete_a_rum_based_metric_returns_No_Content_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-11-28T15:31:20.155Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_rum_based_metric_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Delete_a_rum_based_metric_returns_Not_Found_response.freeze deleted file mode 100644 index d1e929c7bed..00000000000 --- a/src/test/resources/cassettes/features/v2/Delete_a_rum_based_metric_returns_Not_Found_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-11-28T15:31:21.433Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_tag_indexing_rule_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Delete_a_tag_indexing_rule_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..6c06bbfaa00 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_a_tag_indexing_rule_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2026-06-04T16:39:36.667Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_tag_indexing_rule_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Delete_a_tag_indexing_rule_returns_Bad_Request_response.json new file mode 100644 index 00000000000..a9e7e2cd380 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_a_tag_indexing_rule_returns_Bad_Request_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/metrics/tag-indexing-rules/not-a-valid-uuid", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[\"Invalid tag indexing rule ID format\"]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 400, + "reasonPhrase": "Bad Request" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "17f13b29-9af9-cd74-b18f-94dec960708c" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_tag_indexing_rule_returns_No_Content_response.freeze b/src/test/resources/cassettes/features/v2/Delete_a_tag_indexing_rule_returns_No_Content_response.freeze new file mode 100644 index 00000000000..2d5e68ac204 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_a_tag_indexing_rule_returns_No_Content_response.freeze @@ -0,0 +1 @@ +2026-06-04T16:39:36.727Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_tag_indexing_rule_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_a_tag_indexing_rule_returns_No_Content_response.json new file mode 100644 index 00000000000..e56edf53ab3 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_a_tag_indexing_rule_returns_No_Content_response.json @@ -0,0 +1,74 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"metric_name_matches\":[\"dd.TestDeleteatagindexingrulereturnsNoContentresponse1780591176.*\"],\"name\":\"TestDeleteatagindexingrulereturnsNoContentresponse1780591176\",\"tags\":[\"env\",\"service\"]},\"type\":\"tag_indexing_rules\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/metrics/tag-indexing-rules", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"223d99dd-9c0a-4181-82b7-53d234bf5b26\",\"type\":\"tag_indexing_rules\",\"attributes\":{\"created_at\":\"2026-06-04T16:39:36.77795Z\",\"created_by_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"exclude_tags_mode\":false,\"metric_name_matches\":[\"dd.TestDeleteatagindexingrulereturnsNoContentresponse1780591176.*\"],\"modified_at\":\"2026-06-04T16:39:36.77795Z\",\"modified_by_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"TestDeleteatagindexingrulereturnsNoContentresponse1780591176\",\"options\":{\"version\":1,\"data\":{\"override_previous_rules\":false,\"manage_preexisting_metrics\":true}},\"rule_order\":1,\"tags\":[\"env\",\"service\"]}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "f7e3de3d-3310-0f5c-3e92-0c417cff71ca" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/metrics/tag-indexing-rules/223d99dd-9c0a-4181-82b7-53d234bf5b26", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "6dfce1de-1522-2231-3750-5c4d06113d95" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/metrics/tag-indexing-rules/223d99dd-9c0a-4181-82b7-53d234bf5b26", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "6dfce1de-1522-2231-3750-5c4d06113d96" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_an_AWS_integration_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Delete_an_AWS_integration_returns_Bad_Request_response.json index a42ef29bfae..c82b6c27f29 100644 --- a/src/test/resources/cassettes/features/v2/Delete_an_AWS_integration_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_an_AWS_integration_returns_Bad_Request_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "73fd406e-d686-10bd-50ee-83f2c499e8a8" + "id": "73fd406e-d686-10bd-50ee-83f2c499e8a9" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_an_AWS_integration_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_an_AWS_integration_returns_No_Content_response.json index 0847900878e..6835906bc64 100644 --- a/src/test/resources/cassettes/features/v2/Delete_an_AWS_integration_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_an_AWS_integration_returns_No_Content_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "479ab602-1a6a-ff9c-cfae-4a71849b3ce1" + "id": "479ab602-1a6a-ff9c-cfae-4a71849b3ce6" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_an_AWS_integration_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Delete_an_AWS_integration_returns_Not_Found_response.json index 797500d67cb..55a419e4370 100644 --- a/src/test/resources/cassettes/features/v2/Delete_an_AWS_integration_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_an_AWS_integration_returns_Not_Found_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "479ab602-1a6a-ff9c-cfae-4a71849b3ce5" + "id": "479ab602-1a6a-ff9c-cfae-4a71849b3ce3" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_an_annotation_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_an_annotation_returns_No_Content_response.json index 357e0f155fb..41d1a8a374c 100644 --- a/src/test/resources/cassettes/features/v2/Delete_an_annotation_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_an_annotation_returns_No_Content_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "78d2d116-1962-0348-cab7-4b6ac6482f5b" + "id": "78d2d116-1962-0348-cab7-4b6ac6482f5d" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_an_existing_Workflow_returns_Successfully_deleted_a_workflow_response.json b/src/test/resources/cassettes/features/v2/Delete_an_existing_Workflow_returns_Successfully_deleted_a_workflow_response.json index 0d2738de1a3..a86b5756b5e 100644 --- a/src/test/resources/cassettes/features/v2/Delete_an_existing_Workflow_returns_Successfully_deleted_a_workflow_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_an_existing_Workflow_returns_Successfully_deleted_a_workflow_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "ef58c8e5-8d44-f741-5735-0d8c01ffa21e" + "id": "ef58c8e5-8d44-f741-5735-0d8c01ffa21c" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_an_existing_incident_service_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Delete_an_existing_incident_service_returns_OK_response.freeze deleted file mode 100644 index 6a8b97d928a..00000000000 --- a/src/test/resources/cassettes/features/v2/Delete_an_existing_incident_service_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2022-05-12T09:51:30.710Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_an_existing_incident_service_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_an_existing_incident_service_returns_OK_response.json deleted file mode 100644 index 8f6a43ad475..00000000000 --- a/src/test/resources/cassettes/features/v2/Delete_an_existing_incident_service_returns_OK_response.json +++ /dev/null @@ -1,74 +0,0 @@ -[ - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"name\":\"Test-Delete_an_existing_incident_service_returns_OK_response-1652349090\"},\"type\":\"services\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/services", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"included\":[{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"created_at\":\"2019-10-02T08:15:39.795051+00:00\",\"modified_at\":\"2020-06-15T12:33:12.884459+00:00\",\"email\":\"frog@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Active\"},\"relationships\":{\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}],\"data\":{\"type\":\"services\",\"id\":\"9f42d0e5-438a-5808-bb84-01ede3c065fb\",\"attributes\":{\"name\":\"Test-Delete_an_existing_incident_service_returns_OK_response-1652349090\",\"created\":\"2022-05-12T09:51:31.181927+00:00\",\"modified\":\"2022-05-12T09:51:31.181927+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}", - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "30c42657-2e05-2c9b-108a-defa18fc9211" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/services/9f42d0e5-438a-5808-bb84-01ede3c065fb", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "71fa1734-2164-8591-ae2a-a718d454cb9e" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/services/9f42d0e5-438a-5808-bb84-01ede3c065fb", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "71fa1734-2164-8591-ae2a-a718d454cb9f" - } -] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_an_incident_type_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_an_incident_type_returns_OK_response.json index 74fcc0a0c5e..4078cc22096 100644 --- a/src/test/resources/cassettes/features/v2/Delete_an_incident_type_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_an_incident_type_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd8" + "id": "7bcfec66-5300-9891-51e5-e4d7e0833bdc" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_case_comment_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Delete_case_comment_returns_Bad_Request_response.json index 355262a1b02..44b1169a9c5 100644 --- a/src/test/resources/cassettes/features/v2/Delete_case_comment_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_case_comment_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145fc" + "id": "79babc38-7a70-5347-c8a6-73b0e70145f9" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_case_comment_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_case_comment_returns_No_Content_response.json index 3c7a22d087a..3ef957166e6 100644 --- a/src/test/resources/cassettes/features/v2/Delete_case_comment_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_case_comment_returns_No_Content_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145ea" + "id": "79babc38-7a70-5347-c8a6-73b0e70145f3" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_case_comment_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Delete_case_comment_returns_Not_Found_response.json index f352512410e..1863b7af59e 100644 --- a/src/test/resources/cassettes/features/v2/Delete_case_comment_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_case_comment_returns_Not_Found_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145f3" + "id": "79babc38-7a70-5347-c8a6-73b0e70145ff" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_custom_attribute_from_case_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Delete_custom_attribute_from_case_returns_Not_Found_response.json index d85b4091fcb..1107be232c1 100644 --- a/src/test/resources/cassettes/features/v2/Delete_custom_attribute_from_case_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_custom_attribute_from_case_returns_Not_Found_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145e9" + "id": "79babc38-7a70-5347-c8a6-73b0e70145fd" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_datastore_item_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_datastore_item_returns_OK_response.json index 02c557b492b..c39abd24395 100644 --- a/src/test/resources/cassettes/features/v2/Delete_datastore_item_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_datastore_item_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d34" + "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d32" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_datastore_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_datastore_returns_OK_response.json index 0f4bd1ebaf2..a9055b3309c 100644 --- a/src/test/resources/cassettes/features/v2/Delete_datastore_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_datastore_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d2e" + "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d2f" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_incident_notification_rule_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_incident_notification_rule_returns_No_Content_response.json index edd6a6da9bf..621a6a2a79d 100644 --- a/src/test/resources/cassettes/features/v2/Delete_incident_notification_rule_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_incident_notification_rule_returns_No_Content_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd3" + "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd7" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Delete_incident_notification_template_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_incident_notification_template_returns_No_Content_response.json index 53b4917f2bb..3770b9b0a09 100644 --- a/src/test/resources/cassettes/features/v2/Delete_incident_notification_template_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_incident_notification_template_returns_No_Content_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd7" + "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd5" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Generate_a_new_external_ID_returns_AWS_External_ID_object_response.json b/src/test/resources/cassettes/features/v2/Generate_a_new_external_ID_returns_AWS_External_ID_object_response.json index c2491988476..75b451b6900 100644 --- a/src/test/resources/cassettes/features/v2/Generate_a_new_external_ID_returns_AWS_External_ID_object_response.json +++ b/src/test/resources/cassettes/features/v2/Generate_a_new_external_ID_returns_AWS_External_ID_object_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "a3ebb722-60eb-fa89-589a-ff3630e3a2cc" + "id": "a3ebb722-60eb-fa89-589a-ff3630e3a2cd" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Generate_new_external_ID_returns_AWS_External_ID_object_response.json b/src/test/resources/cassettes/features/v2/Generate_new_external_ID_returns_AWS_External_ID_object_response.json index 1e23eb77688..dbcf089d3c7 100644 --- a/src/test/resources/cassettes/features/v2/Generate_new_external_ID_returns_AWS_External_ID_object_response.json +++ b/src/test/resources/cassettes/features/v2/Generate_new_external_ID_returns_AWS_External_ID_object_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "a3ebb722-60eb-fa89-589a-ff3630e3a2ce" + "id": "a3ebb722-60eb-fa89-589a-ff3630e3a2cc" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_AWS_On_Demand_task_by_id_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Get_AWS_On_Demand_task_by_id_returns_Not_Found_response.json index ae97185c72c..8f47c5e0492 100644 --- a/src/test/resources/cassettes/features/v2/Get_AWS_On_Demand_task_by_id_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Get_AWS_On_Demand_task_by_id_returns_Not_Found_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "fa2322eb-4e11-c229-ab3c-0bd21e1ecfe9" + "id": "fa2322eb-4e11-c229-ab3c-0bd21e1ecfe8" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_AWS_on_demand_task_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Get_AWS_on_demand_task_returns_Not_Found_response.json index 8f47c5e0492..ae97185c72c 100644 --- a/src/test/resources/cassettes/features/v2/Get_AWS_on_demand_task_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Get_AWS_on_demand_task_returns_Not_Found_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "fa2322eb-4e11-c229-ab3c-0bd21e1ecfe8" + "id": "fa2322eb-4e11-c229-ab3c-0bd21e1ecfe9" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_AWS_scan_options_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_AWS_scan_options_returns_OK_response.json index bc09886e60a..60bf7212494 100644 --- a/src/test/resources/cassettes/features/v2/Get_AWS_scan_options_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_AWS_scan_options_returns_OK_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "2cb6ecfe-386c-3349-2689-26da480a6b5e" + "id": "2cb6ecfe-386c-3349-2689-26da480a6b5d" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_App_returns_Gone_response.json b/src/test/resources/cassettes/features/v2/Get_App_returns_Gone_response.json index bd34150cae6..8e6cf1b774f 100644 --- a/src/test/resources/cassettes/features/v2/Get_App_returns_Gone_response.json +++ b/src/test/resources/cassettes/features/v2/Get_App_returns_Gone_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "c782b1f3-1b03-d50f-8fcd-12e51226c515" + "id": "c782b1f3-1b03-d50f-8fcd-12e51226c517" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_App_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_App_returns_OK_response.json index 0d312e2da5f..788a64cff41 100644 --- a/src/test/resources/cassettes/features/v2/Get_App_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_App_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "c782b1f3-1b03-d50f-8fcd-12e51226c517" + "id": "c782b1f3-1b03-d50f-8fcd-12e51226c519" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_OAuth2_well_known_sites_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_OAuth2_well_known_sites_returns_OK_response.freeze new file mode 100644 index 00000000000..64ca8409fa5 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_OAuth2_well_known_sites_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-06-02T09:00:00.000Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_OAuth2_well_known_sites_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_OAuth2_well_known_sites_returns_OK_response.json new file mode 100644 index 00000000000..5e97a9310ec --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_OAuth2_well_known_sites_returns_OK_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/oauth2/.well-known/sites", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"prod\",\"type\":\"env\",\"attributes\":{\"sites\":[\"app.datadoghq.com\",\"app.datadoghq.eu\",\"us5.datadoghq.com\",\"us3.datadoghq.com\",\"ap1.datadoghq.com\"]}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "f113ff82-c070-57bf-83d0-e1a4fa8d6d0a" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_RUM_based_metric_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Get_a_RUM_based_metric_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..a572ad420c0 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_a_RUM_based_metric_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2026-06-02T12:32:39.828Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_rum_based_metric_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Get_a_RUM_based_metric_returns_Not_Found_response.json similarity index 62% rename from src/test/resources/cassettes/features/v2/Get_a_rum_based_metric_returns_Not_Found_response.json rename to src/test/resources/cassettes/features/v2/Get_a_RUM_based_metric_returns_Not_Found_response.json index 996006586ce..33343f5d952 100644 --- a/src/test/resources/cassettes/features/v2/Get_a_rum_based_metric_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Get_a_RUM_based_metric_returns_Not_Found_response.json @@ -3,12 +3,12 @@ "httpRequest": { "headers": {}, "method": "GET", - "path": "/api/v2/rum/config/metrics/Test-Get_a_rum_based_metric_returns_Not_Found_response-1732807881", + "path": "/api/v2/rum/config/metrics/Test-Get_a_RUM_based_metric_returns_Not_Found_response-1780403559", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"not_found(Metric with name 'Test-Get_a_rum_based_metric_returns_Not_Found_response-1732807881' not found)\"}]}", + "body": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"not_found(Metric with name 'Test-Get_a_RUM_based_metric_returns_Not_Found_response-1780403559' not found)\"}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "63edb03d-bda9-7aef-c842-deeff7625741" + "id": "207344c2-b049-9cb3-ed52-667d7e741f27" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_RUM_based_metric_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_a_RUM_based_metric_returns_OK_response.freeze new file mode 100644 index 00000000000..fb526bf13d7 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_a_RUM_based_metric_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-06-02T12:32:40.188Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_rum_based_metric_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_a_RUM_based_metric_returns_OK_response.json similarity index 73% rename from src/test/resources/cassettes/features/v2/Get_a_rum_based_metric_returns_OK_response.json rename to src/test/resources/cassettes/features/v2/Get_a_RUM_based_metric_returns_OK_response.json index 3dea307fca9..8ec252e1aa3 100644 --- a/src/test/resources/cassettes/features/v2/Get_a_rum_based_metric_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_a_RUM_based_metric_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Get_a_rum_based_metric_returns_OK_response-1732807882\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}},\"id\":\"testgetarumbasedmetricreturnsokresponse1732807882\",\"type\":\"rum_metrics\"}}" + "json": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Get_a_RUM_based_metric_returns_OK_response-1780403560\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}},\"id\":\"testgetarumbasedmetricreturnsokresponse1780403560\",\"type\":\"rum_metrics\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"testgetarumbasedmetricreturnsokresponse1732807882\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Get_a_rum_based_metric_returns_OK_response-1732807882\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}}", + "body": "{\"data\":{\"id\":\"testgetarumbasedmetricreturnsokresponse1780403560\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Get_a_RUM_based_metric_returns_OK_response-1780403560\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "6f12677b-56be-9b60-5972-10384c9d6baa" + "id": "518da9ae-5922-bc43-e0ca-aa35c65284a0" }, { "httpRequest": { "headers": {}, "method": "GET", - "path": "/api/v2/rum/config/metrics/testgetarumbasedmetricreturnsokresponse1732807882", + "path": "/api/v2/rum/config/metrics/testgetarumbasedmetricreturnsokresponse1780403560", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"testgetarumbasedmetricreturnsokresponse1732807882\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Get_a_rum_based_metric_returns_OK_response-1732807882\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}}", + "body": "{\"data\":{\"id\":\"testgetarumbasedmetricreturnsokresponse1780403560\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Get_a_RUM_based_metric_returns_OK_response-1780403560\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -53,13 +53,13 @@ "timeToLive": { "unlimited": true }, - "id": "9aed34dd-cf6a-9119-3af0-93b3f7987f0c" + "id": "cc6b0832-5da7-1828-219a-5493fc1ef3ea" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/rum/config/metrics/testgetarumbasedmetricreturnsokresponse1732807882", + "path": "/api/v2/rum/config/metrics/testgetarumbasedmetricreturnsokresponse1780403560", "keepAlive": false, "secure": true }, @@ -74,6 +74,6 @@ "timeToLive": { "unlimited": true }, - "id": "7b7496db-44fa-bee7-0fbb-255486b27190" + "id": "373916bd-57d0-639e-f5d0-3aed4e4a68e4" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_custom_framework_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_a_custom_framework_returns_OK_response.json index 5661edabb7b..009fff14323 100644 --- a/src/test/resources/cassettes/features/v2/Get_a_custom_framework_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_a_custom_framework_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "13fe9685-b072-5fe0-c841-4499a9e71c73" + "id": "13fe9685-b072-5fe0-c841-4499a9e71c72" }, { "httpRequest": { @@ -79,6 +79,6 @@ "timeToLive": { "unlimited": true }, - "id": "e535722a-99e3-30cf-49f7-2d093bd78b3d" + "id": "e535722a-99e3-30cf-49f7-2d093bd78b3b" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_form_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Get_a_form_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..9e0e0d98675 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_a_form_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2026-06-04T18:34:06.925Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_form_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Get_a_form_returns_Not_Found_response.json new file mode 100644 index 00000000000..e0fcc7d9ece --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_a_form_returns_Not_Found_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/forms/00000000-0000-0000-0000-000000000001", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"status\":\"404\",\"id\":\"bccf11bd-13c7-4911-9c00-58c00b6f8f52\",\"title\":\"form not found\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 404, + "reasonPhrase": "Not Found" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "fbaad038-e9e1-74cb-9fb5-595fa4e2c4fc" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_form_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_a_form_returns_OK_response.freeze new file mode 100644 index 00000000000..aea0ca127d2 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_a_form_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-06-04T18:34:07.294Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_form_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_a_form_returns_OK_response.json new file mode 100644 index 00000000000..55a66fb81d0 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_a_form_returns_OK_response.json @@ -0,0 +1,84 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"anonymous\":false,\"data_definition\":{},\"description\":\"A simple test form.\",\"idp_survey\":false,\"name\":\"Test-Get_a_form_returns_OK_response-1780598047\",\"single_response\":false,\"ui_definition\":{}},\"type\":\"forms\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/forms", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"b42493d4-fbd0-4139-b4b9-4815f414621d\",\"type\":\"forms\",\"attributes\":{\"active\":true,\"anonymous\":false,\"created_at\":\"2026-06-04T18:34:07.632566Z\",\"datastore_config\":{\"datastore_id\":\"9aace6ce-ee9d-4c81-b176-22bed53ff080\",\"primary_column_name\":\"id\",\"primary_key_generation_strategy\":\"none\"},\"description\":\"A simple test form.\",\"idp_survey\":false,\"modified_at\":\"2026-06-04T18:34:07.632566Z\",\"name\":\"Test-Get_a_form_returns_OK_response-1780598047\",\"org_id\":321813,\"self_service\":false,\"single_response\":false,\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"version\":{\"id\":\"354656\",\"state\":\"draft\",\"version\":1,\"etag\":\"b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d\",\"definition_signature\":\"{\\\"signature\\\":\\\"{\\\\\\\"version\\\\\\\":2,\\\\\\\"algorithm\\\\\\\":\\\\\\\"ecdsa-p384\\\\\\\",\\\\\\\"pubkey\\\\\\\":\\\\\\\"XOOWpRG1rFvaLHaG9qLf+GG78llET0BKnZtokyAtLfg=\\\\\\\",\\\\\\\"timestamp\\\\\\\":1780598047,\\\\\\\"proof\\\\\\\":\\\\\\\"MGUCMQCkP+Usa2zK0v4SsSDBHsE4p88u025oyaRrAnNTiTXLwGr3K0W4/MAFeeosBwZonE0CMGYsqH/GAJUKeY0ZZGl8GZp2QeY1l3byimzWXRLf36CHhuB1Pshv/7bi0WoYYCOQIg==\\\\\\\"}\\\",\\\"version\\\":1}\",\"data_definition\":{},\"ui_definition\":{},\"created_at\":\"2026-06-04T18:34:07.632566Z\",\"modified_at\":\"2026-06-04T18:34:07.632566Z\",\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "31855e93-017d-b162-bfc7-3044f874a8de" + }, + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/forms/b42493d4-fbd0-4139-b4b9-4815f414621d", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"b42493d4-fbd0-4139-b4b9-4815f414621d\",\"type\":\"forms\",\"attributes\":{\"active\":true,\"anonymous\":false,\"created_at\":\"2026-06-04T18:34:07.632566Z\",\"datastore_config\":{\"datastore_id\":\"9aace6ce-ee9d-4c81-b176-22bed53ff080\",\"primary_column_name\":\"id\",\"primary_key_generation_strategy\":\"none\"},\"description\":\"A simple test form.\",\"idp_survey\":false,\"modified_at\":\"2026-06-04T18:34:07.632566Z\",\"name\":\"Test-Get_a_form_returns_OK_response-1780598047\",\"org_id\":321813,\"self_service\":false,\"single_response\":false,\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"version\":{\"id\":\"354656\",\"state\":\"draft\",\"version\":1,\"etag\":\"b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d\",\"definition_signature\":\"{\\\"signature\\\":\\\"{\\\\\\\"version\\\\\\\":2,\\\\\\\"algorithm\\\\\\\":\\\\\\\"ecdsa-p384\\\\\\\",\\\\\\\"pubkey\\\\\\\":\\\\\\\"XOOWpRG1rFvaLHaG9qLf+GG78llET0BKnZtokyAtLfg=\\\\\\\",\\\\\\\"timestamp\\\\\\\":1780598047,\\\\\\\"proof\\\\\\\":\\\\\\\"MGUCMQCkP+Usa2zK0v4SsSDBHsE4p88u025oyaRrAnNTiTXLwGr3K0W4/MAFeeosBwZonE0CMGYsqH/GAJUKeY0ZZGl8GZp2QeY1l3byimzWXRLf36CHhuB1Pshv/7bi0WoYYCOQIg==\\\\\\\"}\\\",\\\"version\\\":1}\",\"data_definition\":{},\"ui_definition\":{},\"created_at\":\"2026-06-04T18:34:07.632566Z\",\"modified_at\":\"2026-06-04T18:34:07.632566Z\",\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "b6e46709-27bc-8da3-66b7-7dba52e57b6f" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/forms/b42493d4-fbd0-4139-b4b9-4815f414621d", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"b42493d4-fbd0-4139-b4b9-4815f414621d\",\"type\":\"forms\"}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "5f925f51-498a-16af-ec30-3fbe5e667002" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_given_APM_retention_filter_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_a_given_APM_retention_filter_returns_OK_response.json index 108cf352bd9..4c1dc3043b8 100644 --- a/src/test/resources/cassettes/features/v2/Get_a_given_APM_retention_filter_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_a_given_APM_retention_filter_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "b2404278-8cc9-cba4-e3eb-03a7fdff069e" + "id": "b2404278-8cc9-cba4-e3eb-03a7fdff069d" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_a_list_of_all_incident_services_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_a_list_of_all_incident_services_returns_OK_response.freeze deleted file mode 100644 index fe0e8ff0de3..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_a_list_of_all_incident_services_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2022-05-12T09:51:32.124Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_list_of_all_incident_services_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_a_list_of_all_incident_services_returns_OK_response.json deleted file mode 100644 index 4b532359f78..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_a_list_of_all_incident_services_returns_OK_response.json +++ /dev/null @@ -1,84 +0,0 @@ -[ - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"name\":\"Test-Get_a_list_of_all_incident_services_returns_OK_response-1652349092\"},\"type\":\"services\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/services", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"included\":[{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"created_at\":\"2019-10-02T08:15:39.795051+00:00\",\"modified_at\":\"2020-06-15T12:33:12.884459+00:00\",\"email\":\"frog@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Active\"},\"relationships\":{\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}],\"data\":{\"type\":\"services\",\"id\":\"84fc985e-fd2b-5e37-b627-eee699786658\",\"attributes\":{\"name\":\"Test-Get_a_list_of_all_incident_services_returns_OK_response-1652349092\",\"created\":\"2022-05-12T09:51:32.548997+00:00\",\"modified\":\"2022-05-12T09:51:32.548997+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}", - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "ed8ba7d6-719b-768e-d87d-541b296d0b90" - }, - { - "httpRequest": { - "headers": {}, - "method": "GET", - "path": "/api/v2/services", - "queryStringParameters": { - "filter": [ - "Test-Get_a_list_of_all_incident_services_returns_OK_response-1652349092" - ] - }, - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"meta\":{\"sort\":\"ASC\",\"pagination\":{\"total\":7805,\"size\":1,\"next_offset\":1,\"offset\":0},\"total\":7805},\"data\":[{\"type\":\"services\",\"id\":\"84fc985e-fd2b-5e37-b627-eee699786658\",\"attributes\":{\"name\":\"Test-Get_a_list_of_all_incident_services_returns_OK_response-1652349092\",\"created\":\"2022-05-12T09:51:32.548997+00:00\",\"modified\":\"2022-05-12T09:51:32.548997+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}]}", - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "45f9fcac-1e96-7ab7-6735-7c4b8955983e" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/services/84fc985e-fd2b-5e37-b627-eee699786658", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "14c469a7-0dea-e97c-df45-8f7c4a0390d1" - } -] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_rum_based_metric_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Get_a_rum_based_metric_returns_Not_Found_response.freeze deleted file mode 100644 index cc0ea2feffe..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_a_rum_based_metric_returns_Not_Found_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-11-28T15:31:21.847Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_rum_based_metric_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_a_rum_based_metric_returns_OK_response.freeze deleted file mode 100644 index 44989b3301f..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_a_rum_based_metric_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-11-28T15:31:22.200Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_specific_pipeline_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_a_specific_pipeline_returns_OK_response.json index ac29f8cf42e..43c3bdd85eb 100644 --- a/src/test/resources/cassettes/features/v2/Get_a_specific_pipeline_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_a_specific_pipeline_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "1c5790bf-1fdc-930d-ee1e-046e57b87c7e" + "id": "1c5790bf-1fdc-930d-ee1e-046e57b87c7f" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_a_tag_indexing_rule_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Get_a_tag_indexing_rule_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..5e3118fd61c --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_a_tag_indexing_rule_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2026-06-04T16:39:36.958Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_tag_indexing_rule_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Get_a_tag_indexing_rule_returns_Bad_Request_response.json new file mode 100644 index 00000000000..9e2ffb6b767 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_a_tag_indexing_rule_returns_Bad_Request_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/metrics/tag-indexing-rules/not-a-valid-uuid", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[\"Invalid tag indexing rule ID format\"]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 400, + "reasonPhrase": "Bad Request" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "c2fdc102-8a97-ce14-79d0-561bf0c81ca2" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_tag_indexing_rule_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Get_a_tag_indexing_rule_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..3411a781d28 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_a_tag_indexing_rule_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2026-06-04T16:39:37.020Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_tag_indexing_rule_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Get_a_tag_indexing_rule_returns_Not_Found_response.json new file mode 100644 index 00000000000..0fb6d7251a2 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_a_tag_indexing_rule_returns_Not_Found_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/metrics/tag-indexing-rules/00000000-0000-0000-0000-000000000000", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[\"Tag indexing rule not found\"]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 404, + "reasonPhrase": "Not Found" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "c182f006-d567-ffc2-775b-b7eabefc1d42" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_tag_indexing_rule_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_a_tag_indexing_rule_returns_OK_response.freeze new file mode 100644 index 00000000000..d312bd46263 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_a_tag_indexing_rule_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-06-04T16:39:37.099Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_tag_indexing_rule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_a_tag_indexing_rule_returns_OK_response.json new file mode 100644 index 00000000000..81988965747 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_a_tag_indexing_rule_returns_OK_response.json @@ -0,0 +1,79 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"metric_name_matches\":[\"dd.TestGetatagindexingrulereturnsOKresponse1780591177.*\"],\"name\":\"TestGetatagindexingrulereturnsOKresponse1780591177\",\"tags\":[\"env\",\"service\"]},\"type\":\"tag_indexing_rules\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/metrics/tag-indexing-rules", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"cab4c8d3-6ac8-4cb8-aa74-e68a110db375\",\"type\":\"tag_indexing_rules\",\"attributes\":{\"created_at\":\"2026-06-04T16:39:37.150692Z\",\"created_by_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"exclude_tags_mode\":false,\"metric_name_matches\":[\"dd.TestGetatagindexingrulereturnsOKresponse1780591177.*\"],\"modified_at\":\"2026-06-04T16:39:37.150692Z\",\"modified_by_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"TestGetatagindexingrulereturnsOKresponse1780591177\",\"options\":{\"version\":1,\"data\":{\"override_previous_rules\":false,\"manage_preexisting_metrics\":true}},\"rule_order\":1,\"tags\":[\"env\",\"service\"]}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "f7643fc7-bd7d-000c-ff59-ed572f12deaf" + }, + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/metrics/tag-indexing-rules/cab4c8d3-6ac8-4cb8-aa74-e68a110db375", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"cab4c8d3-6ac8-4cb8-aa74-e68a110db375\",\"type\":\"tag_indexing_rules\",\"attributes\":{\"created_at\":\"2026-06-04T16:39:37.150692Z\",\"created_by_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"exclude_tags_mode\":false,\"metric_name_matches\":[\"dd.TestGetatagindexingrulereturnsOKresponse1780591177.*\"],\"modified_at\":\"2026-06-04T16:39:37.150692Z\",\"modified_by_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"TestGetatagindexingrulereturnsOKresponse1780591177\",\"options\":{\"version\":1,\"data\":{\"override_previous_rules\":false,\"manage_preexisting_metrics\":true}},\"rule_order\":1,\"tags\":[\"env\",\"service\"]}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "f79c4666-785d-e51c-fab6-77c7f28de9d5" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/metrics/tag-indexing-rules/cab4c8d3-6ac8-4cb8-aa74-e68a110db375", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "daa22f7f-1a1b-78ed-cf4f-498f5b0e6db1" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_all_RUM_based_metrics_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_all_RUM_based_metrics_returns_OK_response.freeze new file mode 100644 index 00000000000..d1e67e6228a --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_all_RUM_based_metrics_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-06-02T12:32:41.286Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_all_RUM_based_metrics_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_all_RUM_based_metrics_returns_OK_response.json new file mode 100644 index 00000000000..b59b5f95fc6 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_all_RUM_based_metrics_returns_OK_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/rum/config/metrics", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":[{\"id\":\"tf_TestAccRumMetricAttributes_local_1748953468\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"count\"},\"event_type\":\"session\",\"group_by\":[],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"tf_TestAccRumMetricAttributes_local_1754429067\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":false,\"path\":\"@duration\"},\"event_type\":\"action\",\"group_by\":[]}},{\"id\":\"tf_TestAccRumMetricAttributes_local_1756383271\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"count\"},\"event_type\":\"action\",\"filter\":{\"query\":\"@service:web-ui\"},\"group_by\":[]}},{\"id\":\"examplegetarumbasedmetricreturnsokresponse1756438670\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Example-Get_a_rum_based_metric_returns_OK_response_1756438670\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"testtypescriptupdatearumbasedmetricreturnsnotfoundresponse1759230768\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Typescript-Update_a_rum_based_metric_returns_Not_Found_response-1759230768\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"testtypescriptdeletearumbasedmetricreturnsnocontentresponse1760329500\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Typescript-Delete_a_rum_based_metric_returns_No_Content_response-1760329500\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"exampleupdatearumbasedmetricreturnsokresponse1760974704\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":false,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"@service:rum-config\"},\"group_by\":[{\"path\":\"@browser.version\",\"tag_name\":\"browser_version\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"testjavaupdatearumbasedmetricreturnsbadrequestresponse1761017953\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Java-Update_a_rum_based_metric_returns_Bad_Request_response-1761017953\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"testing_rum_metric_francesco\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"count\"},\"event_type\":\"action\",\"group_by\":[{\"path\":\"@os\",\"tag_name\":\"os\"},{\"path\":\"@service\",\"tag_name\":\"service\"},{\"path\":\"path_only\",\"tag_name\":\"path_only\"}]}},{\"id\":\"tf_TestAccRumMetricAttributes_local_1762777350\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"count\"},\"event_type\":\"action\",\"group_by\":[]}},{\"id\":\"exampleupdatearumbasedmetricreturnsokresponse1763393904\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":false,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"@service:rum-config\"},\"group_by\":[{\"path\":\"@browser.version\",\"tag_name\":\"browser_version\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"testtypescriptdeletearumbasedmetricreturnsnocontentresponse1763440561\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Typescript-Delete_a_rum_based_metric_returns_No_Content_response-1763440561\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"examplecreatearumbasedmetricreturnscreatedresponse1763580024\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"@service:web-ui\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"tf_TestAccRumMetricAttributes_local_1764030439\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"count\"},\"event_type\":\"action\",\"group_by\":[]}},{\"id\":\"testjavaupdatearumbasedmetricreturnsokresponse1764042240\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Java-Update_a_rum_based_metric_returns_OK_response-1764042240\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"tf_TestAccRumMetricAttributes_local_1764203828\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"count\"},\"event_type\":\"action\",\"group_by\":[{\"path\":\"@os\",\"tag_name\":\"os\"},{\"path\":\"@service\",\"tag_name\":\"service\"},{\"path\":\"path_only\",\"tag_name\":\"path_only\"}]}},{\"id\":\"testtypescriptgetarumbasedmetricreturnsokresponse1765192455\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Typescript-Get_a_rum_based_metric_returns_OK_response-1765192455\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"testgogetarumbasedmetricreturnsokresponse1765586988\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Go-Get_a_rum_based_metric_returns_OK_response-1765586988\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"testtypescriptgetarumbasedmetricreturnsokresponse1765774021\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Typescript-Get_a_rum_based_metric_returns_OK_response-1765774021\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"testtypescriptupdatearumbasedmetricreturnsokresponse1765797324\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Typescript-Update_a_rum_based_metric_returns_OK_response-1765797324\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"testrustdeletearumbasedmetricreturnsnocontentresponse1766121984\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Rust-Delete_a_rum_based_metric_returns_No_Content_response-1766121984\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"tf_TestAccRumMetricAttributes_local_1766146771\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"count\"},\"event_type\":\"action\",\"group_by\":[]}},{\"id\":\"exampleupdatearumbasedmetricreturnsokresponse1767123504\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Example-Update_a_rum_based_metric_returns_OK_response_1767123504\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"testrustupdatearumbasedmetricreturnsbadrequestresponse1768281919\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Rust-Update_a_rum_based_metric_returns_Bad_Request_response-1768281919\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"testgocreatearumbasedmetricreturnscreatedresponse1768352135\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"@service:web-ui\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"exampledeletearumbasedmetricreturnsnocontentresponse1769312302\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Example-Delete_a_rum_based_metric_returns_No_Content_response_1769312302\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"testtypescriptupdatearumbasedmetricreturnsokresponse1769512735\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Typescript-Update_a_rum_based_metric_returns_OK_response-1769512735\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"examplegetarumbasedmetricreturnsokresponse1770305870\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Example-Get_a_rum_based_metric_returns_OK_response_1770305870\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"examplegetarumbasedmetricreturnsokresponse1770363470\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Example-Get_a_rum_based_metric_returns_OK_response_1770363470\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"testjavacreatearumbasedmetricreturnscreatedresponse1770834693\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"@service:web-ui\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"examplegetarumbasedmetricreturnsokresponse1770853070\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Example-Get_a_rum_based_metric_returns_OK_response_1770853070\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"testjavacreatearumbasedmetricreturnsconflictresponse1772165946\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Java-Create_a_rum_based_metric_returns_Conflict_response-1772165946\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"testrustupdatearumbasedmetricreturnsnotfoundresponse1772344054\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Rust-Update_a_rum_based_metric_returns_Not_Found_response-1772344054\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"testtypescriptcreatearumbasedmetricreturnsconflictresponse1773378034\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Typescript-Create_a_rum_based_metric_returns_Conflict_response-1773378034\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"examplecreatearumbasedmetricreturnscreatedresponse1775676024\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"@service:web-ui\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"testrustupdatearumbasedmetricreturnsbadrequestresponse1776146576\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Rust-Update_a_rum_based_metric_returns_Bad_Request_response-1776146576\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"examplegetarumbasedmetricreturnsokresponse1777837070\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Example-Get_a_rum_based_metric_returns_OK_response_1777837070\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"testtypescriptgetarumbasedmetricreturnsokresponse1778218442\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Typescript-Get_a_rum_based_metric_returns_OK_response-1778218442\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"examplecreatearumbasedmetricreturnscreatedresponse1778239224\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"@service:web-ui\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"testrubyupdatearumbasedmetricreturnsconflictresponse1778815556\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Ruby-Update_a_rum_based_metric_returns_Conflict_response-1778815556\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"testjavadeletearumbasedmetricreturnsnocontentresponse1778993479\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Java-Delete_a_rum_based_metric_returns_No_Content_response-1778993479\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"examplegetarumbasedmetricreturnsokresponse1779176270\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Example-Get_a_rum_based_metric_returns_OK_response_1779176270\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"testrubycreatearumbasedmetricreturnsconflictresponse1779334157\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Ruby-Create_a_rum_based_metric_returns_Conflict_response-1779334157\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"examplecreatearumbasedmetricreturnscreatedresponse1779434424\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"@service:web-ui\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"tf_TestAccRumMetricAttributes_local_1779629264\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"action\",\"group_by\":[]}},{\"id\":\"testrubyupdatearumbasedmetricreturnsokresponse1780025259\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Ruby-Update_a_rum_based_metric_returns_OK_response-1780025259\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}},{\"id\":\"tf_TestAccRumMetricAttributes_local_1780063691\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"count\"},\"event_type\":\"action\",\"group_by\":[]}},{\"id\":\"testcreatearumbasedmetricreturnsconflictresponse1780393737\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Create_a_RUM_based_metric_returns_Conflict_response-1780393737\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "7eaf3a01-07e0-12af-d372-902bd49e160e" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_all_custom_attributes_config_of_case_type_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_all_custom_attributes_config_of_case_type_returns_OK_response.json index 07da3e25a95..3286dbce5dc 100644 --- a/src/test/resources/cassettes/features/v2/Get_all_custom_attributes_config_of_case_type_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_all_custom_attributes_config_of_case_type_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "dc45fc73-0f09-c12d-941b-eaf799af6463" + "id": "dc45fc73-0f09-c12d-941b-eaf799af6464" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_all_rum_based_metrics_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_all_rum_based_metrics_returns_OK_response.freeze deleted file mode 100644 index ae9abee582f..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_all_rum_based_metrics_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-11-28T15:31:23.558Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_an_AWS_integration_by_config_ID_returns_AWS_Account_object_response.json b/src/test/resources/cassettes/features/v2/Get_an_AWS_integration_by_config_ID_returns_AWS_Account_object_response.json index 9933d6258ad..e045f5e18fd 100644 --- a/src/test/resources/cassettes/features/v2/Get_an_AWS_integration_by_config_ID_returns_AWS_Account_object_response.json +++ b/src/test/resources/cassettes/features/v2/Get_an_AWS_integration_by_config_ID_returns_AWS_Account_object_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "479ab602-1a6a-ff9c-cfae-4a71849b3ce6" + "id": "479ab602-1a6a-ff9c-cfae-4a71849b3ce2" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_an_AWS_integration_by_config_ID_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Get_an_AWS_integration_by_config_ID_returns_Bad_Request_response.json index 6352d5f0102..87cb96a7640 100644 --- a/src/test/resources/cassettes/features/v2/Get_an_AWS_integration_by_config_ID_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Get_an_AWS_integration_by_config_ID_returns_Bad_Request_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "3d4d0603-9fed-1cc5-8004-086b9b6ef691" + "id": "3d4d0603-9fed-1cc5-8004-086b9b6ef690" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_an_AWS_integration_by_config_ID_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Get_an_AWS_integration_by_config_ID_returns_Not_Found_response.json index 7e5c7b1234d..55368f4ae1c 100644 --- a/src/test/resources/cassettes/features/v2/Get_an_AWS_integration_by_config_ID_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Get_an_AWS_integration_by_config_ID_returns_Not_Found_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "9b33b83c-c8bb-714f-cf71-33ab2f3af9d3" + "id": "9b33b83c-c8bb-714f-cf71-33ab2f3af9d4" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_an_existing_Workflow_returns_Successfully_got_a_workflow_response.json b/src/test/resources/cassettes/features/v2/Get_an_existing_Workflow_returns_Successfully_got_a_workflow_response.json index 0ad821e051f..c859297de35 100644 --- a/src/test/resources/cassettes/features/v2/Get_an_existing_Workflow_returns_Successfully_got_a_workflow_response.json +++ b/src/test/resources/cassettes/features/v2/Get_an_existing_Workflow_returns_Successfully_got_a_workflow_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "ef58c8e5-8d44-f741-5735-0d8c01ffa21c" + "id": "ef58c8e5-8d44-f741-5735-0d8c01ffa21d" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_annotations_for_a_page_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_annotations_for_a_page_returns_OK_response.json index 809010936e2..dd3dbb8ccdc 100644 --- a/src/test/resources/cassettes/features/v2/Get_annotations_for_a_page_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_annotations_for_a_page_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "78d2d116-1962-0348-cab7-4b6ac6482f5d" + "id": "78d2d116-1962-0348-cab7-4b6ac6482f5c" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_available_fields_for_usage_summary_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Get_available_fields_for_usage_summary_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..b7c8122e839 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_available_fields_for_usage_summary_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2026-06-02T19:26:31.725Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_available_fields_for_usage_summary_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Get_available_fields_for_usage_summary_returns_Bad_Request_response.json new file mode 100644 index 00000000000..c46c96dc355 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_available_fields_for_usage_summary_returns_Bad_Request_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/usage/summary/available_fields", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"id\":null,\"links\":null,\"status\":\"400\",\"code\":null,\"title\":\"Bad Request\",\"detail\":\"API called with non-parent org keys. Data is only available at the root level org\",\"source\":null,\"meta\":null}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 400, + "reasonPhrase": "Bad Request" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "d877ef2f-4ae0-ae60-4678-48aa4f88a764" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_datastore_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_datastore_returns_OK_response.json index 4aba2dd2af0..7f112b2283d 100644 --- a/src/test/resources/cassettes/features/v2/Get_datastore_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_datastore_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d35" + "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d2e" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_details_of_an_incident_service_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_details_of_an_incident_service_returns_OK_response.freeze deleted file mode 100644 index 44bfb433190..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_details_of_an_incident_service_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2022-05-12T09:51:33.610Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_details_of_an_incident_service_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_details_of_an_incident_service_returns_OK_response.json deleted file mode 100644 index 79e3ace89bf..00000000000 --- a/src/test/resources/cassettes/features/v2/Get_details_of_an_incident_service_returns_OK_response.json +++ /dev/null @@ -1,79 +0,0 @@ -[ - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"name\":\"Test-Get_details_of_an_incident_service_returns_OK_response-1652349093\"},\"type\":\"services\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/services", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"included\":[{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"created_at\":\"2019-10-02T08:15:39.795051+00:00\",\"modified_at\":\"2020-06-15T12:33:12.884459+00:00\",\"email\":\"frog@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Active\"},\"relationships\":{\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}],\"data\":{\"type\":\"services\",\"id\":\"e7c6527e-95ff-5ab1-b151-ba4f786038c0\",\"attributes\":{\"name\":\"Test-Get_details_of_an_incident_service_returns_OK_response-1652349093\",\"created\":\"2022-05-12T09:51:34.184497+00:00\",\"modified\":\"2022-05-12T09:51:34.184497+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}", - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "1ade6c7d-7ef5-55b8-e059-bc2a931e49c2" - }, - { - "httpRequest": { - "headers": {}, - "method": "GET", - "path": "/api/v2/services/e7c6527e-95ff-5ab1-b151-ba4f786038c0", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"data\":{\"type\":\"services\",\"id\":\"e7c6527e-95ff-5ab1-b151-ba4f786038c0\",\"attributes\":{\"name\":\"Test-Get_details_of_an_incident_service_returns_OK_response-1652349093\",\"created\":\"2022-05-12T09:51:34.184497+00:00\",\"modified\":\"2022-05-12T09:51:34.184497+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}", - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "d168c5d2-290f-53cf-392b-0bf05fc0f323" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/services/e7c6527e-95ff-5ab1-b151-ba4f786038c0", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "c365d297-bbb3-5893-790e-a6eac91769af" - } -] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_incident_notification_rule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_incident_notification_rule_returns_OK_response.json index 00f0e4bc8fd..727a2d56d58 100644 --- a/src/test/resources/cassettes/features/v2/Get_incident_notification_rule_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_incident_notification_rule_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "7bcfec66-5300-9891-51e5-e4d7e0833bdc" + "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd4" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_incident_notification_template_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_incident_notification_template_returns_OK_response.json index 8af5e0e1230..41eb6547e3c 100644 --- a/src/test/resources/cassettes/features/v2/Get_incident_notification_template_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_incident_notification_template_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "7bcfec66-5300-9891-51e5-e4d7e0833bdb" + "id": "7bcfec66-5300-9891-51e5-e4d7e0833bda" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_the_details_of_a_case_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_the_details_of_a_case_returns_OK_response.json index aa8f9bb249e..0a8c9d22d82 100644 --- a/src/test/resources/cassettes/features/v2/Get_the_details_of_a_case_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_the_details_of_a_case_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145f0" + "id": "79babc38-7a70-5347-c8a6-73b0e70145f2" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_the_details_of_an_error_tracking_issue_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Get_the_details_of_an_error_tracking_issue_returns_Not_Found_response.json index e9ddbf352f7..cc6c1703e9a 100644 --- a/src/test/resources/cassettes/features/v2/Get_the_details_of_an_error_tracking_issue_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Get_the_details_of_an_error_tracking_issue_returns_Not_Found_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "16438026-1168-3bfa-3763-949697b01fea" + "id": "16438026-1168-3bfa-3763-949697b01fe9" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Get_the_details_of_an_error_tracking_issue_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_the_details_of_an_error_tracking_issue_returns_OK_response.json index 6b6dc7ffeef..c0406058bb1 100644 --- a/src/test/resources/cassettes/features/v2/Get_the_details_of_an_error_tracking_issue_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_the_details_of_an_error_tracking_issue_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "16438026-1168-3bfa-3763-949697b01fe9" + "id": "16438026-1168-3bfa-3763-949697b01fea" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Gets_a_list_of_data_deletion_requests_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Gets_a_list_of_data_deletion_requests_returns_OK_response.json index 1eccad92176..6ab71e5cb0b 100644 --- a/src/test/resources/cassettes/features/v2/Gets_a_list_of_data_deletion_requests_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Gets_a_list_of_data_deletion_requests_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "516e2b97-25f6-b08c-4d4a-1da22948b32f" + "id": "516e2b97-25f6-b08c-4d4a-1da22948b330" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Grant_role_to_a_restriction_query_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Grant_role_to_a_restriction_query_returns_OK_response.json index ceb58f79339..d88ac2ed754 100644 --- a/src/test/resources/cassettes/features/v2/Grant_role_to_a_restriction_query_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Grant_role_to_a_restriction_query_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "eb3b308b-3d56-9ef8-4096-dd7718f51862" + "id": "eb3b308b-3d56-9ef8-4096-dd7718f5185e" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/List_AWS_scan_options_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_AWS_scan_options_returns_OK_response.json index 33fc1c5e1e7..4c0f531592f 100644 --- a/src/test/resources/cassettes/features/v2/List_AWS_scan_options_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/List_AWS_scan_options_returns_OK_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "2cb6ecfe-386c-3349-2689-26da480a6b5d" + "id": "2cb6ecfe-386c-3349-2689-26da480a6b5e" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_App_Versions_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_App_Versions_returns_OK_response.json index 45cfbd41d64..29396f64fe1 100644 --- a/src/test/resources/cassettes/features/v2/List_App_Versions_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/List_App_Versions_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "c782b1f3-1b03-d50f-8fcd-12e51226c518" + "id": "c782b1f3-1b03-d50f-8fcd-12e51226c513" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/List_Scanning_Groups_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_Scanning_Groups_returns_OK_response.json index debb94ef652..27aaeccb44a 100644 --- a/src/test/resources/cassettes/features/v2/List_Scanning_Groups_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/List_Scanning_Groups_returns_OK_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "01611a93-5e74-0630-3c51-f707c3b51e79" + "id": "01611a93-5e74-0630-3c51-f707c3b51e81" }, { "httpRequest": { @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238a9e" + "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa4" }, { "httpRequest": { @@ -79,7 +79,7 @@ "timeToLive": { "unlimited": true }, - "id": "01611a93-5e74-0630-3c51-f707c3b51e7a" + "id": "01611a93-5e74-0630-3c51-f707c3b51e82" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/List_all_APM_retention_filters_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_all_APM_retention_filters_returns_OK_response.json index 0a42d776a20..2964c9bb0a0 100644 --- a/src/test/resources/cassettes/features/v2/List_all_APM_retention_filters_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/List_all_APM_retention_filters_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "b2404278-8cc9-cba4-e3eb-03a7fdff069d" + "id": "b2404278-8cc9-cba4-e3eb-03a7fdff0697" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/List_annotations_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_annotations_returns_OK_response.json index 319d097fb29..95b2021ccbe 100644 --- a/src/test/resources/cassettes/features/v2/List_annotations_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/List_annotations_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "78d2d116-1962-0348-cab7-4b6ac6482f5c" + "id": "78d2d116-1962-0348-cab7-4b6ac6482f5b" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/List_available_namespaces_returns_AWS_Namespaces_List_object_response.json b/src/test/resources/cassettes/features/v2/List_available_namespaces_returns_AWS_Namespaces_List_object_response.json index b4ab43f6993..25a1f8a4ae0 100644 --- a/src/test/resources/cassettes/features/v2/List_available_namespaces_returns_AWS_Namespaces_List_object_response.json +++ b/src/test/resources/cassettes/features/v2/List_available_namespaces_returns_AWS_Namespaces_List_object_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "d0ec7736-ef6c-d071-3390-4a5c3a301d0e" + "id": "d0ec7736-ef6c-d071-3390-4a5c3a301d10" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_datastore_items_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_datastore_items_returns_OK_response.json index 1796631327a..61061134fe6 100644 --- a/src/test/resources/cassettes/features/v2/List_datastore_items_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/List_datastore_items_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d2c" + "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d33" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/List_forms_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/List_forms_returns_OK_response.freeze new file mode 100644 index 00000000000..e1050a989d0 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/List_forms_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-06-04T18:34:08.479Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_forms_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_forms_returns_OK_response.json new file mode 100644 index 00000000000..e6b82facc4f --- /dev/null +++ b/src/test/resources/cassettes/features/v2/List_forms_returns_OK_response.json @@ -0,0 +1,84 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"anonymous\":false,\"data_definition\":{},\"description\":\"A simple test form.\",\"idp_survey\":false,\"name\":\"Test-List_forms_returns_OK_response-1780598048\",\"single_response\":false,\"ui_definition\":{}},\"type\":\"forms\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/forms", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"d71d1aef-539d-4951-b98e-ff4c0c4f97bb\",\"type\":\"forms\",\"attributes\":{\"active\":true,\"anonymous\":false,\"created_at\":\"2026-06-04T18:34:08.937305Z\",\"datastore_config\":{\"datastore_id\":\"76b9f7b4-99d8-4a55-b95c-260cac22820d\",\"primary_column_name\":\"id\",\"primary_key_generation_strategy\":\"none\"},\"description\":\"A simple test form.\",\"idp_survey\":false,\"modified_at\":\"2026-06-04T18:34:08.937305Z\",\"name\":\"Test-List_forms_returns_OK_response-1780598048\",\"org_id\":321813,\"self_service\":false,\"single_response\":false,\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"version\":{\"id\":\"354657\",\"state\":\"draft\",\"version\":1,\"etag\":\"b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d\",\"definition_signature\":\"{\\\"signature\\\":\\\"{\\\\\\\"version\\\\\\\":2,\\\\\\\"algorithm\\\\\\\":\\\\\\\"ecdsa-p384\\\\\\\",\\\\\\\"pubkey\\\\\\\":\\\\\\\"XOOWpRG1rFvaLHaG9qLf+GG78llET0BKnZtokyAtLfg=\\\\\\\",\\\\\\\"timestamp\\\\\\\":1780598048,\\\\\\\"proof\\\\\\\":\\\\\\\"MGUCMBSAXvYX++PAyywDBLlJsqgHq1ug3WLtMqKQRwx50qdAdj1UP1W58NnN9/DP70HavAIxANwA4guivHrOqlL36ETzde//0mI55MJ8Yv0ynU2p+QhqCSuJEHHgUUWjk0wYKJuZog==\\\\\\\"}\\\",\\\"version\\\":1}\",\"data_definition\":{},\"ui_definition\":{},\"created_at\":\"2026-06-04T18:34:08.937305Z\",\"modified_at\":\"2026-06-04T18:34:08.937305Z\",\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "b8c5d04b-935e-1acc-18d5-cda2d8504cef" + }, + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/forms", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":[{\"id\":\"7af864d6-8c2f-41e5-b80d-1be56ea33d23\",\"type\":\"forms\",\"attributes\":{\"active\":true,\"anonymous\":false,\"created_at\":\"2026-06-04T18:05:41.512876Z\",\"datastore_config\":{\"datastore_id\":\"543a7e0e-0f0f-4b14-8911-2f20df5f1b07\",\"primary_column_name\":\"id\",\"primary_key_generation_strategy\":\"none\"},\"description\":\"A form to collect user feedback.\",\"idp_survey\":false,\"modified_at\":\"2026-06-04T18:05:41.512876Z\",\"name\":\"User Feedback Form\",\"org_id\":321813,\"self_service\":false,\"single_response\":false,\"user_id\":1445416,\"user_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},{\"id\":\"b2953c07-9385-4de2-9cd3-af3f5d6c7d09\",\"type\":\"forms\",\"attributes\":{\"active\":true,\"anonymous\":false,\"created_at\":\"2026-06-04T18:15:44.116619Z\",\"datastore_config\":{\"datastore_id\":\"77b4b384-27d6-4619-bb55-1b2158d0080b\",\"primary_column_name\":\"id\",\"primary_key_generation_strategy\":\"none\"},\"description\":\"A form to collect user feedback.\",\"idp_survey\":false,\"modified_at\":\"2026-06-04T18:15:44.116619Z\",\"name\":\"User Feedback Form\",\"org_id\":321813,\"self_service\":false,\"single_response\":false,\"user_id\":1445416,\"user_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},{\"id\":\"d71d1aef-539d-4951-b98e-ff4c0c4f97bb\",\"type\":\"forms\",\"attributes\":{\"active\":true,\"anonymous\":false,\"created_at\":\"2026-06-04T18:34:08.937305Z\",\"datastore_config\":{\"datastore_id\":\"76b9f7b4-99d8-4a55-b95c-260cac22820d\",\"primary_column_name\":\"id\",\"primary_key_generation_strategy\":\"none\"},\"description\":\"A simple test form.\",\"idp_survey\":false,\"modified_at\":\"2026-06-04T18:34:08.937305Z\",\"name\":\"Test-List_forms_returns_OK_response-1780598048\",\"org_id\":321813,\"self_service\":false,\"single_response\":false,\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "814ac7be-8e0e-03fc-d33a-37cc6b75bd49" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/forms/d71d1aef-539d-4951-b98e-ff4c0c4f97bb", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"d71d1aef-539d-4951-b98e-ff4c0c4f97bb\",\"type\":\"forms\"}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "38d9b220-dd17-4836-c888-45bded33c544" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_log_services_returns_AWS_Logs_Services_List_object_response.json b/src/test/resources/cassettes/features/v2/List_log_services_returns_AWS_Logs_Services_List_object_response.json index 266b281e690..f469a5cda1f 100644 --- a/src/test/resources/cassettes/features/v2/List_log_services_returns_AWS_Logs_Services_List_object_response.json +++ b/src/test/resources/cassettes/features/v2/List_log_services_returns_AWS_Logs_Services_List_object_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "03c3c0d9-a62f-5ac6-398b-e22a05d14d7a" + "id": "03c3c0d9-a62f-5ac6-398b-e22a05d14d79" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_namespaces_returns_AWS_Namespaces_List_object_response.json b/src/test/resources/cassettes/features/v2/List_namespaces_returns_AWS_Namespaces_List_object_response.json index f0011c849a4..b4ab43f6993 100644 --- a/src/test/resources/cassettes/features/v2/List_namespaces_returns_AWS_Namespaces_List_object_response.json +++ b/src/test/resources/cassettes/features/v2/List_namespaces_returns_AWS_Namespaces_List_object_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "d0ec7736-ef6c-d071-3390-4a5c3a301d0f" + "id": "d0ec7736-ef6c-d071-3390-4a5c3a301d0e" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_permissions_for_a_role_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_permissions_for_a_role_returns_OK_response.json index 068dfdc41d2..3d75a2e2292 100644 --- a/src/test/resources/cassettes/features/v2/List_permissions_for_a_role_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/List_permissions_for_a_role_returns_OK_response.json @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "ab2c08c1-60c7-9278-3246-d650bb892170" + "id": "ab2c08c1-60c7-9278-3246-d650bb892173" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/List_permissions_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_permissions_returns_OK_response.json index af216062061..e881ea5c75f 100644 --- a/src/test/resources/cassettes/features/v2/List_permissions_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/List_permissions_returns_OK_response.json @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "ab2c08c1-60c7-9278-3246-d650bb892175" + "id": "ab2c08c1-60c7-9278-3246-d650bb892174" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_roles_for_a_restriction_query_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_roles_for_a_restriction_query_returns_OK_response.json index 88ddad7a3ae..b3459ffd0fc 100644 --- a/src/test/resources/cassettes/features/v2/List_roles_for_a_restriction_query_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/List_roles_for_a_restriction_query_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "eb3b308b-3d56-9ef8-4096-dd7718f51860" + "id": "eb3b308b-3d56-9ef8-4096-dd7718f51862" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/List_tag_indexing_rules_for_a_metric_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/List_tag_indexing_rules_for_a_metric_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..e625ce29343 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/List_tag_indexing_rules_for_a_metric_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2026-06-04T16:39:37.314Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_tag_indexing_rules_for_a_metric_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/List_tag_indexing_rules_for_a_metric_returns_Bad_Request_response.json new file mode 100644 index 00000000000..8bc1cf20ed9 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/List_tag_indexing_rules_for_a_metric_returns_Bad_Request_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/metrics/1invalid/tag-indexing-rules", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[\"Invalid metric name: metric name must start with a letter and only contain letters, numbers, dots, and underscores\"]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 400, + "reasonPhrase": "Bad Request" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "2432d1d7-87a5-c04b-981c-ccd99c379d5d" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_tag_indexing_rules_for_a_metric_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/List_tag_indexing_rules_for_a_metric_returns_OK_response.freeze new file mode 100644 index 00000000000..b2c344487d7 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/List_tag_indexing_rules_for_a_metric_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-06-04T16:39:37.373Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_all_rum_based_metrics_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_tag_indexing_rules_for_a_metric_returns_OK_response.json similarity index 73% rename from src/test/resources/cassettes/features/v2/Get_all_rum_based_metrics_returns_OK_response.json rename to src/test/resources/cassettes/features/v2/List_tag_indexing_rules_for_a_metric_returns_OK_response.json index 777ff4c7647..3085255533f 100644 --- a/src/test/resources/cassettes/features/v2/Get_all_rum_based_metrics_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/List_tag_indexing_rules_for_a_metric_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "headers": {}, "method": "GET", - "path": "/api/v2/rum/config/metrics", + "path": "/api/v2/metrics/TestListtagindexingrulesforametricreturnsOKresponse1780591177/tag-indexing-rules", "keepAlive": false, "secure": true }, @@ -23,6 +23,6 @@ "timeToLive": { "unlimited": true }, - "id": "7eaf3a01-07e0-12af-d372-902bd49e160e" + "id": "5ae70ca4-35d1-c60e-218a-bdef98bf0bb2" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_tag_indexing_rules_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/List_tag_indexing_rules_returns_OK_response.freeze new file mode 100644 index 00000000000..70518b04ee4 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/List_tag_indexing_rules_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-06-04T16:39:37.519Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_tag_indexing_rules_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_tag_indexing_rules_returns_OK_response.json new file mode 100644 index 00000000000..6b0e032e4ee --- /dev/null +++ b/src/test/resources/cassettes/features/v2/List_tag_indexing_rules_returns_OK_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/metrics/tag-indexing-rules", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":[],\"meta\":{\"total\":0},\"links\":{\"self\":\"https://api.datadoghq.com/api/v2/metrics/tag-indexing-rules\",\"first\":\"https://api.datadoghq.com/api/v2/metrics/tag-indexing-rules?page%5Blimit%5D=100\\u0026page%5Boffset%5D=0\"}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "9199c78f-2fbe-0bb2-6569-c17bb24023e5" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Name_App_Version_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Name_App_Version_returns_No_Content_response.json index 15fabc90492..a0c59afa324 100644 --- a/src/test/resources/cassettes/features/v2/Name_App_Version_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Name_App_Version_returns_No_Content_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "c782b1f3-1b03-d50f-8fcd-12e51226c512" + "id": "c782b1f3-1b03-d50f-8fcd-12e51226c51a" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Patch_GCP_Scan_Options_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Patch_GCP_Scan_Options_returns_Bad_Request_response.json index d4bcf1ca8ac..fee9f74e00a 100644 --- a/src/test/resources/cassettes/features/v2/Patch_GCP_Scan_Options_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Patch_GCP_Scan_Options_returns_Bad_Request_response.json @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "c2c329a8-5875-126a-1858-e7c00b5af113" + "id": "c2c329a8-5875-126a-1858-e7c00b5af114" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_GCP_Scan_Options_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Patch_GCP_Scan_Options_returns_OK_response.json index 15c0687ec0c..46d1bbda4f0 100644 --- a/src/test/resources/cassettes/features/v2/Patch_GCP_Scan_Options_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Patch_GCP_Scan_Options_returns_OK_response.json @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "b0e82961-e316-45f9-b544-8011dda3dd99" + "id": "b0e82961-e316-45f9-b544-8011dda3dd98" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Pin_a_Model_Lab_run_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Pin_a_Model_Lab_run_returns_No_Content_response.json index 9c853b6672d..3292c6ddbd0 100644 --- a/src/test/resources/cassettes/features/v2/Pin_a_Model_Lab_run_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Pin_a_Model_Lab_run_returns_No_Content_response.json @@ -39,6 +39,6 @@ "timeToLive": { "unlimited": true }, - "id": "e9b5da5a-ee96-27b2-f8a0-482fba517cce" + "id": "e9b5da5a-ee96-27b2-f8a0-482fba517ccd" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Publish_App_returns_Created_response.json b/src/test/resources/cassettes/features/v2/Publish_App_returns_Created_response.json index 007a5928092..122367ac740 100644 --- a/src/test/resources/cassettes/features/v2/Publish_App_returns_Created_response.json +++ b/src/test/resources/cassettes/features/v2/Publish_App_returns_Created_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "c782b1f3-1b03-d50f-8fcd-12e51226c50e" + "id": "c782b1f3-1b03-d50f-8fcd-12e51226c511" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Publish_a_form_version_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Publish_a_form_version_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..bb764fbf5b2 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Publish_a_form_version_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2026-06-10T18:50:01.064Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Publish_a_form_version_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Publish_a_form_version_returns_Not_Found_response.json new file mode 100644 index 00000000000..68268882121 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Publish_a_form_version_returns_Not_Found_response.json @@ -0,0 +1,32 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"version\":1},\"type\":\"form_publications\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/forms/00000000-0000-0000-0000-000000000001/publish", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"status\":\"404\",\"id\":\"890f7bea-c0e2-45f9-a06a-e3214a19be57\",\"title\":\"form not found\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 404, + "reasonPhrase": "Not Found" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "0ec1fa37-66dd-23ed-c829-eb61770f7f93" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Publish_a_form_version_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Publish_a_form_version_returns_OK_response.freeze new file mode 100644 index 00000000000..1468de2aa1d --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Publish_a_form_version_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-06-10T18:50:01.393Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Publish_a_form_version_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Publish_a_form_version_returns_OK_response.json new file mode 100644 index 00000000000..8919b3462de --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Publish_a_form_version_returns_OK_response.json @@ -0,0 +1,88 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"anonymous\":false,\"data_definition\":{},\"description\":\"A simple test form.\",\"idp_survey\":false,\"name\":\"Test-Publish_a_form_version_returns_OK_response-1781117401\",\"single_response\":false,\"ui_definition\":{}},\"type\":\"forms\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/forms", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"c73796e4-0dd3-4da4-8a9a-9297ba412b3e\",\"type\":\"forms\",\"attributes\":{\"active\":true,\"anonymous\":false,\"created_at\":\"2026-06-10T18:50:01.747408Z\",\"datastore_config\":{\"datastore_id\":\"23249c30-b740-4a4b-8c23-34fb653dfdea\",\"primary_column_name\":\"id\",\"primary_key_generation_strategy\":\"none\"},\"description\":\"A simple test form.\",\"idp_survey\":false,\"modified_at\":\"2026-06-10T18:50:01.747408Z\",\"name\":\"Test-Publish_a_form_version_returns_OK_response-1781117401\",\"org_id\":321813,\"self_service\":false,\"single_response\":false,\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"version\":{\"id\":\"376767\",\"state\":\"draft\",\"version\":1,\"etag\":\"b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d\",\"definition_signature\":\"{\\\"signature\\\":\\\"{\\\\\\\"version\\\\\\\":2,\\\\\\\"algorithm\\\\\\\":\\\\\\\"ecdsa-p384\\\\\\\",\\\\\\\"pubkey\\\\\\\":\\\\\\\"XOOWpRG1rFvaLHaG9qLf+GG78llET0BKnZtokyAtLfg=\\\\\\\",\\\\\\\"timestamp\\\\\\\":1781117401,\\\\\\\"proof\\\\\\\":\\\\\\\"MGYCMQCE98ZIPD8JYrsEi1xXxe+8SVCjLroQbr+RRxKDmhfT++nN4tdcUXYYNtpNJDundgwCMQDG5TdraksHELR6ovN9xQtacfKq3wr2rKAIejh6Ut7m+jO5dmLml90pBOQMnAFXed4=\\\\\\\"}\\\",\\\"version\\\":1}\",\"data_definition\":{},\"ui_definition\":{},\"created_at\":\"2026-06-10T18:50:01.747408Z\",\"modified_at\":\"2026-06-10T18:50:01.747408Z\",\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "061fb138-2c07-4bf1-ab8e-f70e5688e6e6" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"version\":1},\"type\":\"form_publications\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/forms/c73796e4-0dd3-4da4-8a9a-9297ba412b3e/publish", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"380020\",\"type\":\"form_publications\",\"attributes\":{\"created_at\":\"2026-06-10T18:50:02.131227Z\",\"form_id\":\"c73796e4-0dd3-4da4-8a9a-9297ba412b3e\",\"form_version\":1,\"modified_at\":\"2026-06-10T18:50:02.131227Z\",\"org_id\":321813,\"publish_seq\":1,\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "9c51a59f-4403-4990-580a-c374ff57b3be" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/forms/c73796e4-0dd3-4da4-8a9a-9297ba412b3e", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"c73796e4-0dd3-4da4-8a9a-9297ba412b3e\",\"type\":\"forms\"}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "2310d7e1-edf0-92c6-7bc6-fed246921ed2" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Reorder_Groups_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Reorder_Groups_returns_Bad_Request_response.json index e6fd8ed3e42..db4e9405d0d 100644 --- a/src/test/resources/cassettes/features/v2/Reorder_Groups_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Reorder_Groups_returns_Bad_Request_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "01611a93-5e74-0630-3c51-f707c3b51e7d" + "id": "01611a93-5e74-0630-3c51-f707c3b51e79" }, { "httpRequest": { @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa1" + "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238a9e" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Reorder_Groups_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Reorder_Groups_returns_OK_response.json index a825db5ee55..1350682e4be 100644 --- a/src/test/resources/cassettes/features/v2/Reorder_Groups_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Reorder_Groups_returns_OK_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "01611a93-5e74-0630-3c51-f707c3b51e84" + "id": "01611a93-5e74-0630-3c51-f707c3b51e7e" }, { "httpRequest": { @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa7" + "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa2" }, { "httpRequest": { @@ -79,7 +79,7 @@ "timeToLive": { "unlimited": true }, - "id": "01611a93-5e74-0630-3c51-f707c3b51e85" + "id": "01611a93-5e74-0630-3c51-f707c3b51e7f" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Reorder_tag_indexing_rules_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Reorder_tag_indexing_rules_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..b4a0a6926f6 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Reorder_tag_indexing_rules_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2026-06-04T16:39:37.579Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Reorder_tag_indexing_rules_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Reorder_tag_indexing_rules_returns_Bad_Request_response.json new file mode 100644 index 00000000000..e09fa405d22 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Reorder_tag_indexing_rules_returns_Bad_Request_response.json @@ -0,0 +1,32 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"rule_ids\":[]},\"type\":\"tag_indexing_rules\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/metrics/tag-indexing-rules/order", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[\"rule_ids must not be empty\"]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 400, + "reasonPhrase": "Bad Request" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "0785b408-3c20-f36c-47c7-c1b0bebf7b63" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Reorder_tag_indexing_rules_returns_No_Content_response.freeze b/src/test/resources/cassettes/features/v2/Reorder_tag_indexing_rules_returns_No_Content_response.freeze new file mode 100644 index 00000000000..c65dd935460 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Reorder_tag_indexing_rules_returns_No_Content_response.freeze @@ -0,0 +1 @@ +2026-06-04T16:39:37.630Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Reorder_tag_indexing_rules_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Reorder_tag_indexing_rules_returns_No_Content_response.json new file mode 100644 index 00000000000..975b5bbec3f --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Reorder_tag_indexing_rules_returns_No_Content_response.json @@ -0,0 +1,78 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"metric_name_matches\":[\"dd.TestReordertagindexingrulesreturnsNoContentresponse1780591177.*\"],\"name\":\"TestReordertagindexingrulesreturnsNoContentresponse1780591177\",\"tags\":[\"env\",\"service\"]},\"type\":\"tag_indexing_rules\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/metrics/tag-indexing-rules", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"13b0b297-7c54-4744-9333-b1aa7a2fd200\",\"type\":\"tag_indexing_rules\",\"attributes\":{\"created_at\":\"2026-06-04T16:39:37.674807Z\",\"created_by_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"exclude_tags_mode\":false,\"metric_name_matches\":[\"dd.TestReordertagindexingrulesreturnsNoContentresponse1780591177.*\"],\"modified_at\":\"2026-06-04T16:39:37.674807Z\",\"modified_by_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"TestReordertagindexingrulesreturnsNoContentresponse1780591177\",\"options\":{\"version\":1,\"data\":{\"override_previous_rules\":false,\"manage_preexisting_metrics\":true}},\"rule_order\":1,\"tags\":[\"env\",\"service\"]}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "3a31f1e4-9008-79be-ec9f-adf0e351d391" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"rule_ids\":[\"13b0b297-7c54-4744-9333-b1aa7a2fd200\"]},\"type\":\"tag_indexing_rules\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/metrics/tag-indexing-rules/order", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "03305700-9342-c446-14a1-da1a8fb0ddbe" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/metrics/tag-indexing-rules/13b0b297-7c54-4744-9333-b1aa7a2fd200", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "2687bb8c-4b26-63be-8418-05935dd03487" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Reorder_tag_indexing_rules_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Reorder_tag_indexing_rules_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..4b0e8fd280f --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Reorder_tag_indexing_rules_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2026-06-04T16:39:37.829Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Reorder_tag_indexing_rules_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Reorder_tag_indexing_rules_returns_Not_Found_response.json new file mode 100644 index 00000000000..553c4b2a7da --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Reorder_tag_indexing_rules_returns_Not_Found_response.json @@ -0,0 +1,32 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"rule_ids\":[\"00000000-0000-0000-0000-000000000001\",\"00000000-0000-0000-0000-000000000002\"]},\"type\":\"tag_indexing_rules\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/metrics/tag-indexing-rules/order", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[\"One or more tag indexing rule IDs not found\"]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 404, + "reasonPhrase": "Not Found" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "26b5e8a1-97b0-3365-8423-9e10cd2ba490" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Restore_a_rule_to_a_historical_version_returns_Conflict_response.freeze b/src/test/resources/cassettes/features/v2/Restore_a_rule_to_a_historical_version_returns_Conflict_response.freeze new file mode 100644 index 00000000000..86182034b5e --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Restore_a_rule_to_a_historical_version_returns_Conflict_response.freeze @@ -0,0 +1 @@ +2026-06-12T09:57:22.725Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Restore_a_rule_to_a_historical_version_returns_Conflict_response.json b/src/test/resources/cassettes/features/v2/Restore_a_rule_to_a_historical_version_returns_Conflict_response.json new file mode 100644 index 00000000000..6f5ff808232 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Restore_a_rule_to_a_historical_version_returns_Conflict_response.json @@ -0,0 +1,109 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"cases\":[{\"condition\":\"a > 0\",\"name\":\"\",\"notifications\":[],\"status\":\"info\"}],\"filters\":[],\"isEnabled\":true,\"message\":\"Test rule\",\"name\":\"Test-Restore_a_rule_to_a_historical_version_returns_Conflict_response-1781258242\",\"options\":{\"evaluationWindow\":900,\"keepAlive\":3600,\"maxSignalDuration\":86400},\"queries\":[{\"aggregation\":\"count\",\"distinctFields\":[],\"groupByFields\":[],\"metrics\":[],\"query\":\"@test:true\"}],\"tags\":[],\"type\":\"log_detection\"}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/security_monitoring/rules", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"name\":\"Test-Restore_a_rule_to_a_historical_version_returns_Conflict_response-1781258242\",\"createdAt\":1781258244898,\"isDefault\":false,\"isPartner\":false,\"isEnabled\":true,\"isBeta\":false,\"isDeleted\":false,\"isDeprecated\":false,\"queries\":[{\"query\":\"@test:true\",\"groupByFields\":[],\"hasOptionalGroupByFields\":false,\"distinctFields\":[],\"aggregation\":\"count\",\"name\":\"\",\"dataSource\":\"logs\"}],\"options\":{\"evaluationWindow\":900,\"detectionMethod\":\"threshold\",\"maxSignalDuration\":86400,\"keepAlive\":3600},\"cases\":[{\"name\":\"\",\"status\":\"info\",\"notifications\":[],\"condition\":\"a \\u003e 0\"}],\"message\":\"Test rule\",\"tags\":[],\"hasExtendedTitle\":false,\"type\":\"log_detection\",\"filters\":[],\"version\":1,\"id\":\"xrz-jfq-dfm\",\"blocking\":false,\"metadata\":{\"entities\":null,\"sources\":null},\"creationAuthorId\":2320499,\"creator\":{\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"updater\":{\"handle\":\"\",\"name\":\"\"}}", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "5e1f64f9-b881-fb1f-b36e-a7d8c6ff5226" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"cases\":[{\"condition\":\"a > 0\",\"name\":\"\",\"notifications\":[],\"status\":\"info\"}],\"filters\":[],\"isEnabled\":true,\"message\":\"Test rule updated\",\"name\":\"Test-Restore_a_rule_to_a_historical_version_returns_Conflict_response-1781258242-updated\",\"options\":{\"evaluationWindow\":900,\"keepAlive\":3600,\"maxSignalDuration\":86400},\"queries\":[{\"aggregation\":\"count\",\"distinctFields\":[],\"groupByFields\":[],\"metrics\":[],\"query\":\"@test:true\"}],\"tags\":[]}" + }, + "headers": {}, + "method": "PUT", + "path": "/api/v2/security_monitoring/rules/xrz-jfq-dfm", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"name\":\"Test-Restore_a_rule_to_a_historical_version_returns_Conflict_response-1781258242-updated\",\"isEnabled\":true,\"queries\":[{\"query\":\"@test:true\",\"groupByFields\":[],\"hasOptionalGroupByFields\":false,\"distinctFields\":[],\"aggregation\":\"count\",\"name\":\"\",\"dataSource\":\"logs\"}],\"options\":{\"evaluationWindow\":900,\"detectionMethod\":\"threshold\",\"maxSignalDuration\":86400,\"keepAlive\":3600},\"cases\":[{\"name\":\"\",\"status\":\"info\",\"notifications\":[],\"condition\":\"a \\u003e 0\"}],\"message\":\"Test rule updated\",\"tags\":[],\"hasExtendedTitle\":false,\"type\":\"log_detection\",\"filters\":[],\"id\":\"xrz-jfq-dfm\",\"version\":2,\"createdAt\":1781258244898,\"creationAuthorId\":2320499,\"updateAuthorId\":2320499,\"updatedAt\":1781258245104,\"isDefault\":false,\"blocking\":false,\"isBeta\":false,\"isDeleted\":false,\"isDeprecated\":false,\"metadata\":{\"entities\":null,\"sources\":null}}", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "7b42d2ba-49ea-5047-5aa0-6c271910abc2" + }, + { + "httpRequest": { + "headers": {}, + "method": "POST", + "path": "/api/v2/security_monitoring/rules/xrz-jfq-dfm/restore/2", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"error\":{\"code\":\"AlreadyExists\",\"message\":\"Cannot restore: target version is the current version.\"}}", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 409, + "reasonPhrase": "Conflict" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "010626c2-4640-fafa-bce4-9cfb8f1d1fc2" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/security_monitoring/rules/xrz-jfq-dfm", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "045e3f4e-79d5-a0ea-5d70-4cbde1ec573a" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Restore_a_rule_to_a_historical_version_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Restore_a_rule_to_a_historical_version_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..d762af22af1 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Restore_a_rule_to_a_historical_version_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2026-06-12T08:39:41.348Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Restore_a_rule_to_a_historical_version_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Restore_a_rule_to_a_historical_version_returns_Not_Found_response.json new file mode 100644 index 00000000000..82bfc830870 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Restore_a_rule_to_a_historical_version_returns_Not_Found_response.json @@ -0,0 +1,79 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"cases\":[{\"condition\":\"a > 0\",\"name\":\"\",\"notifications\":[],\"status\":\"info\"}],\"filters\":[],\"isEnabled\":true,\"message\":\"Test rule\",\"name\":\"Test-Restore_a_rule_to_a_historical_version_returns_Not_Found_response-1781253581\",\"options\":{\"evaluationWindow\":900,\"keepAlive\":3600,\"maxSignalDuration\":86400},\"queries\":[{\"aggregation\":\"count\",\"distinctFields\":[],\"groupByFields\":[],\"metrics\":[],\"query\":\"@test:true\"}],\"tags\":[],\"type\":\"log_detection\"}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/security_monitoring/rules", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"name\":\"Test-Restore_a_rule_to_a_historical_version_returns_Not_Found_response-1781253581\",\"createdAt\":1781253581645,\"isDefault\":false,\"isPartner\":false,\"isEnabled\":true,\"isBeta\":false,\"isDeleted\":false,\"isDeprecated\":false,\"queries\":[{\"query\":\"@test:true\",\"groupByFields\":[],\"hasOptionalGroupByFields\":false,\"distinctFields\":[],\"aggregation\":\"count\",\"name\":\"\",\"dataSource\":\"logs\"}],\"options\":{\"evaluationWindow\":900,\"detectionMethod\":\"threshold\",\"maxSignalDuration\":86400,\"keepAlive\":3600},\"cases\":[{\"name\":\"\",\"status\":\"info\",\"notifications\":[],\"condition\":\"a \\u003e 0\"}],\"message\":\"Test rule\",\"tags\":[],\"hasExtendedTitle\":false,\"type\":\"log_detection\",\"filters\":[],\"version\":1,\"id\":\"uig-ynq-xlh\",\"blocking\":false,\"metadata\":{\"entities\":null,\"sources\":null},\"creationAuthorId\":2320499,\"creator\":{\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"updater\":{\"handle\":\"\",\"name\":\"\"}}", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "62c12034-4d94-5e57-f479-cd8bbb48e9e6" + }, + { + "httpRequest": { + "headers": {}, + "method": "POST", + "path": "/api/v2/security_monitoring/rules/uig-ynq-xlh/restore/9999", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"error\":{\"code\":\"NotFound\",\"message\":\"Threat detection rule not found: uig-ynq-xlh, version=9999\"}}", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 404, + "reasonPhrase": "Not Found" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "97d83fdc-62c2-dad4-f515-8317b0f3b7dc" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/security_monitoring/rules/uig-ynq-xlh", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "650a5c40-b5be-c9c5-2bba-9b4c8ef82242" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Restore_a_rule_to_a_historical_version_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Restore_a_rule_to_a_historical_version_returns_OK_response.freeze new file mode 100644 index 00000000000..47bbb311c97 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Restore_a_rule_to_a_historical_version_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-06-12T09:57:25.549Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Restore_a_rule_to_a_historical_version_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Restore_a_rule_to_a_historical_version_returns_OK_response.json new file mode 100644 index 00000000000..9f38d4354f3 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Restore_a_rule_to_a_historical_version_returns_OK_response.json @@ -0,0 +1,109 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"cases\":[{\"condition\":\"a > 0\",\"name\":\"\",\"notifications\":[],\"status\":\"info\"}],\"filters\":[],\"isEnabled\":true,\"message\":\"Test rule\",\"name\":\"Test-Restore_a_rule_to_a_historical_version_returns_OK_response-1781258245\",\"options\":{\"evaluationWindow\":900,\"keepAlive\":3600,\"maxSignalDuration\":86400},\"queries\":[{\"aggregation\":\"count\",\"distinctFields\":[],\"groupByFields\":[],\"metrics\":[],\"query\":\"@test:true\"}],\"tags\":[],\"type\":\"log_detection\"}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/security_monitoring/rules", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"name\":\"Test-Restore_a_rule_to_a_historical_version_returns_OK_response-1781258245\",\"createdAt\":1781258245670,\"isDefault\":false,\"isPartner\":false,\"isEnabled\":true,\"isBeta\":false,\"isDeleted\":false,\"isDeprecated\":false,\"queries\":[{\"query\":\"@test:true\",\"groupByFields\":[],\"hasOptionalGroupByFields\":false,\"distinctFields\":[],\"aggregation\":\"count\",\"name\":\"\",\"dataSource\":\"logs\"}],\"options\":{\"evaluationWindow\":900,\"detectionMethod\":\"threshold\",\"maxSignalDuration\":86400,\"keepAlive\":3600},\"cases\":[{\"name\":\"\",\"status\":\"info\",\"notifications\":[],\"condition\":\"a \\u003e 0\"}],\"message\":\"Test rule\",\"tags\":[],\"hasExtendedTitle\":false,\"type\":\"log_detection\",\"filters\":[],\"version\":1,\"id\":\"7sm-pyl-xzv\",\"blocking\":false,\"metadata\":{\"entities\":null,\"sources\":null},\"creationAuthorId\":2320499,\"creator\":{\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"updater\":{\"handle\":\"\",\"name\":\"\"}}", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "b5ecef9b-b347-3e49-a192-ab5961e46ae4" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"cases\":[{\"condition\":\"a > 0\",\"name\":\"\",\"notifications\":[],\"status\":\"info\"}],\"filters\":[],\"isEnabled\":true,\"message\":\"Test rule updated\",\"name\":\"Test-Restore_a_rule_to_a_historical_version_returns_OK_response-1781258245-updated\",\"options\":{\"evaluationWindow\":900,\"keepAlive\":3600,\"maxSignalDuration\":86400},\"queries\":[{\"aggregation\":\"count\",\"distinctFields\":[],\"groupByFields\":[],\"metrics\":[],\"query\":\"@test:true\"}],\"tags\":[]}" + }, + "headers": {}, + "method": "PUT", + "path": "/api/v2/security_monitoring/rules/7sm-pyl-xzv", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"name\":\"Test-Restore_a_rule_to_a_historical_version_returns_OK_response-1781258245-updated\",\"isEnabled\":true,\"queries\":[{\"query\":\"@test:true\",\"groupByFields\":[],\"hasOptionalGroupByFields\":false,\"distinctFields\":[],\"aggregation\":\"count\",\"name\":\"\",\"dataSource\":\"logs\"}],\"options\":{\"evaluationWindow\":900,\"detectionMethod\":\"threshold\",\"maxSignalDuration\":86400,\"keepAlive\":3600},\"cases\":[{\"name\":\"\",\"status\":\"info\",\"notifications\":[],\"condition\":\"a \\u003e 0\"}],\"message\":\"Test rule updated\",\"tags\":[],\"hasExtendedTitle\":false,\"type\":\"log_detection\",\"filters\":[],\"id\":\"7sm-pyl-xzv\",\"version\":2,\"createdAt\":1781258245670,\"creationAuthorId\":2320499,\"updateAuthorId\":2320499,\"updatedAt\":1781258245844,\"isDefault\":false,\"blocking\":false,\"isBeta\":false,\"isDeleted\":false,\"isDeprecated\":false,\"metadata\":{\"entities\":null,\"sources\":null}}", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "674f1aa8-e037-9523-117e-6d011da7c331" + }, + { + "httpRequest": { + "headers": {}, + "method": "POST", + "path": "/api/v2/security_monitoring/rules/7sm-pyl-xzv/restore/1", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"name\":\"Test-Restore_a_rule_to_a_historical_version_returns_OK_response-1781258245\",\"createdAt\":1781258245670,\"isDefault\":false,\"isPartner\":false,\"isEnabled\":true,\"isBeta\":false,\"isDeleted\":false,\"isDeprecated\":false,\"queries\":[{\"query\":\"@test:true\",\"groupByFields\":[],\"hasOptionalGroupByFields\":false,\"distinctFields\":[],\"aggregation\":\"count\",\"name\":\"\",\"dataSource\":\"logs\"}],\"options\":{\"evaluationWindow\":900,\"detectionMethod\":\"threshold\",\"maxSignalDuration\":86400,\"keepAlive\":3600},\"cases\":[{\"name\":\"\",\"status\":\"info\",\"notifications\":[],\"condition\":\"a \\u003e 0\"}],\"message\":\"Test rule\",\"tags\":[],\"hasExtendedTitle\":false,\"type\":\"log_detection\",\"filters\":[],\"version\":3,\"id\":\"7sm-pyl-xzv\",\"updatedAt\":1781258246099,\"blocking\":false,\"metadata\":{\"entities\":null,\"sources\":null},\"creationAuthorId\":2320499,\"updateAuthorId\":2320499,\"creator\":{\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"},\"updater\":{\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "7a78527d-42fa-8d2c-9fb1-84cb65e65802" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/security_monitoring/rules/7sm-pyl-xzv", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "051bae50-44bd-690f-19dc-0cb5398d385d" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Revoke_permission_returns_Not_found_response.json b/src/test/resources/cassettes/features/v2/Revoke_permission_returns_Not_found_response.json index a6d6057cc63..26cbf404372 100644 --- a/src/test/resources/cassettes/features/v2/Revoke_permission_returns_Not_found_response.json +++ b/src/test/resources/cassettes/features/v2/Revoke_permission_returns_Not_found_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "ab2c08c1-60c7-9278-3246-d650bb89216c" + "id": "ab2c08c1-60c7-9278-3246-d650bb892175" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Revoke_permission_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Revoke_permission_returns_OK_response.json index 524aba86421..a8a7de74a9a 100644 --- a/src/test/resources/cassettes/features/v2/Revoke_permission_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Revoke_permission_returns_OK_response.json @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "ab2c08c1-60c7-9278-3246-d650bb892171" + "id": "ab2c08c1-60c7-9278-3246-d650bb892170" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Scalar_cross_product_query_with_RUM_data_source_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Scalar_cross_product_query_with_RUM_data_source_returns_OK_response.freeze new file mode 100644 index 00000000000..df0f34970c1 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Scalar_cross_product_query_with_RUM_data_source_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-06-02T12:32:24.522Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Scalar_cross_product_query_with_rum_data_source_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Scalar_cross_product_query_with_RUM_data_source_returns_OK_response.json similarity index 77% rename from src/test/resources/cassettes/features/v2/Scalar_cross_product_query_with_rum_data_source_returns_OK_response.json rename to src/test/resources/cassettes/features/v2/Scalar_cross_product_query_with_RUM_data_source_returns_OK_response.json index a7d6875452b..2b19a2f126f 100644 --- a/src/test/resources/cassettes/features/v2/Scalar_cross_product_query_with_rum_data_source_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Scalar_cross_product_query_with_RUM_data_source_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"formulas\":[{\"formula\":\"a\",\"limit\":{\"count\":10,\"order\":\"desc\"}}],\"from\":1776290799000,\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"rum\",\"indexes\":[\"*\"],\"name\":\"a\",\"search\":{\"query\":\"*\"}}],\"to\":1776294399000},\"type\":\"scalar_request\"}}" + "json": "{\"data\":{\"attributes\":{\"formulas\":[{\"formula\":\"a\",\"limit\":{\"count\":10,\"order\":\"desc\"}}],\"from\":1780399944000,\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"rum\",\"indexes\":[\"*\"],\"name\":\"a\",\"search\":{\"query\":\"*\"}}],\"to\":1780403544000},\"type\":\"scalar_request\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"0\",\"type\":\"scalar_response\",\"attributes\":{\"columns\":[{\"name\":\"a\",\"values\":[338.0],\"type\":\"number\",\"meta\":{\"unit\":null}}]}}}", + "body": "{\"data\":{\"id\":\"0\",\"type\":\"scalar_response\",\"attributes\":{\"columns\":[{\"name\":\"a\",\"values\":[340.0],\"type\":\"number\",\"meta\":{\"unit\":null}}]}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "20ccb29e-0ba1-9d51-6728-7cf6c7edd841" + "id": "3b0e53af-18f3-1fec-4f08-5e4758ea0ad9" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Scalar_cross_product_query_with_rum_data_source_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Scalar_cross_product_query_with_rum_data_source_returns_OK_response.freeze deleted file mode 100644 index b045cd705c6..00000000000 --- a/src/test/resources/cassettes/features/v2/Scalar_cross_product_query_with_rum_data_source_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2026-04-15T23:06:39.329Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Star_a_Model_Lab_project_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Star_a_Model_Lab_project_returns_No_Content_response.json index 8e334a33126..7bb4dfa2612 100644 --- a/src/test/resources/cassettes/features/v2/Star_a_Model_Lab_project_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Star_a_Model_Lab_project_returns_No_Content_response.json @@ -39,6 +39,6 @@ "timeToLive": { "unlimited": true }, - "id": "21523eed-05df-12cc-4c0e-d4fcc2b1797c" + "id": "21523eed-05df-12cc-4c0e-d4fcc2b1797d" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Test_a_notification_rule_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Test_a_notification_rule_returns_OK_response.freeze new file mode 100644 index 00000000000..dbdcb687dab --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Test_a_notification_rule_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-06-10T09:27:59.116Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Test_a_notification_rule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Test_a_notification_rule_returns_OK_response.json new file mode 100644 index 00000000000..3a09d8c457d --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Test_a_notification_rule_returns_OK_response.json @@ -0,0 +1,32 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Rule 1\",\"selectors\":{\"query\":\"env:prod\",\"rule_types\":[\"log_detection\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_signals\"},\"targets\":[\"@john.doe@email.com\"]},\"type\":\"notification_rules\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/security_monitoring/configuration/notification_rules/send_notification_preview", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"rka-loa-zwu\",\"attributes\":{\"preview_results\":[{\"rule_type\":\"log_detection\",\"notification_status\":\"DEFAULT\"}]},\"type\":\"notification_preview_response\"}}", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "27c651f9-0b29-ff02-e640-3e9bc986a0c9" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Timeseries_cross_product_query_with_RUM_data_source_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Timeseries_cross_product_query_with_RUM_data_source_returns_OK_response.freeze new file mode 100644 index 00000000000..301417e8347 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Timeseries_cross_product_query_with_RUM_data_source_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-06-02T12:32:31.838Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Timeseries_cross_product_query_with_rum_data_source_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Timeseries_cross_product_query_with_RUM_data_source_returns_OK_response.json similarity index 61% rename from src/test/resources/cassettes/features/v2/Timeseries_cross_product_query_with_rum_data_source_returns_OK_response.json rename to src/test/resources/cassettes/features/v2/Timeseries_cross_product_query_with_RUM_data_source_returns_OK_response.json index 0ede27845d1..dbffb616efa 100644 --- a/src/test/resources/cassettes/features/v2/Timeseries_cross_product_query_with_rum_data_source_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Timeseries_cross_product_query_with_RUM_data_source_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"formulas\":[{\"formula\":\"a\",\"limit\":{\"count\":10,\"order\":\"desc\"}}],\"from\":1776290803000,\"interval\":5000,\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"rum\",\"indexes\":[\"*\"],\"name\":\"a\",\"search\":{\"query\":\"*\"}}],\"to\":1776294403000},\"type\":\"timeseries_request\"}}" + "json": "{\"data\":{\"attributes\":{\"formulas\":[{\"formula\":\"a\",\"limit\":{\"count\":10,\"order\":\"desc\"}}],\"from\":1780399951000,\"interval\":5000,\"queries\":[{\"compute\":{\"aggregation\":\"count\"},\"data_source\":\"rum\",\"indexes\":[\"*\"],\"name\":\"a\",\"search\":{\"query\":\"*\"}}],\"to\":1780403551000},\"type\":\"timeseries_request\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"0\",\"type\":\"timeseries_response\",\"attributes\":{\"series\":[{\"group_tags\":[],\"query_index\":0,\"unit\":null}],\"times\":[1776290870000,1776291170000,1776291175000,1776291470000,1776291770000,1776292070000,1776292370000,1776292670000,1776292970000,1776293270000,1776293570000,1776293870000,1776294170000],\"values\":[[28,30,2,28,30,27,26,26,27,30,28,26,30]]}}}\n", + "body": "{\"data\":{\"id\":\"0\",\"type\":\"timeseries_response\",\"attributes\":{\"series\":[{\"group_tags\":[],\"query_index\":0,\"unit\":null}],\"times\":[1780399970000,1780400270000,1780400275000,1780400570000,1780400870000,1780401170000,1780401470000,1780401475000,1780401770000,1780402070000,1780402370000,1780402670000,1780402970000,1780403270000],\"values\":[[27,22,11,27,27,31,27,2,27,31,26,26,29,27]]}}}\n", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "6260e695-f877-9962-119f-ac17292e4689" + "id": "77833ee3-0fff-1a8b-be8d-06a25caaee24" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Timeseries_cross_product_query_with_rum_data_source_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Timeseries_cross_product_query_with_rum_data_source_returns_OK_response.freeze deleted file mode 100644 index 8d9c1fd4b39..00000000000 --- a/src/test/resources/cassettes/features/v2/Timeseries_cross_product_query_with_rum_data_source_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2026-04-15T23:06:43.715Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Unarchive_case_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Unarchive_case_returns_Bad_Request_response.json index 332b85099dd..eb72a6ceed2 100644 --- a/src/test/resources/cassettes/features/v2/Unarchive_case_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Unarchive_case_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145f9" + "id": "79babc38-7a70-5347-c8a6-73b0e70145eb" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Unarchive_case_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Unarchive_case_returns_OK_response.json index e2e2a133bc8..8dd6b11fdbc 100644 --- a/src/test/resources/cassettes/features/v2/Unarchive_case_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Unarchive_case_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145ef" + "id": "79babc38-7a70-5347-c8a6-73b0e70145ee" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Unassign_case_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Unassign_case_returns_Bad_Request_response.json index d51ad920076..313724f6ed7 100644 --- a/src/test/resources/cassettes/features/v2/Unassign_case_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Unassign_case_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145fb" + "id": "79babc38-7a70-5347-c8a6-73b0e70145f1" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Unassign_case_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Unassign_case_returns_OK_response.json index 88b95ace082..fee71b32cb6 100644 --- a/src/test/resources/cassettes/features/v2/Unassign_case_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Unassign_case_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145f1" + "id": "79babc38-7a70-5347-c8a6-73b0e70145f5" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Unpin_a_Model_Lab_run_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Unpin_a_Model_Lab_run_returns_No_Content_response.json index 3af8cd28dc9..f9fb078423e 100644 --- a/src/test/resources/cassettes/features/v2/Unpin_a_Model_Lab_run_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Unpin_a_Model_Lab_run_returns_No_Content_response.json @@ -18,6 +18,6 @@ "timeToLive": { "unlimited": true }, - "id": "e9b5da5a-ee96-27b2-f8a0-482fba517ccd" + "id": "e9b5da5a-ee96-27b2-f8a0-482fba517cce" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Unpublish_App_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Unpublish_App_returns_OK_response.json index 785bd78f8b8..d2ac02b7803 100644 --- a/src/test/resources/cassettes/features/v2/Unpublish_App_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Unpublish_App_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "c782b1f3-1b03-d50f-8fcd-12e51226c513" + "id": "c782b1f3-1b03-d50f-8fcd-12e51226c515" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Unstar_a_Model_Lab_project_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Unstar_a_Model_Lab_project_returns_No_Content_response.json index d4348698f27..f117d2d3276 100644 --- a/src/test/resources/cassettes/features/v2/Unstar_a_Model_Lab_project_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Unstar_a_Model_Lab_project_returns_No_Content_response.json @@ -18,6 +18,6 @@ "timeToLive": { "unlimited": true }, - "id": "21523eed-05df-12cc-4c0e-d4fcc2b1797d" + "id": "21523eed-05df-12cc-4c0e-d4fcc2b1797c" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_App_Favorite_Status_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Update_App_Favorite_Status_returns_No_Content_response.json index 31b69ffd5db..fb2106e33db 100644 --- a/src/test/resources/cassettes/features/v2/Update_App_Favorite_Status_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Update_App_Favorite_Status_returns_No_Content_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "c782b1f3-1b03-d50f-8fcd-12e51226c516" + "id": "c782b1f3-1b03-d50f-8fcd-12e51226c512" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_App_Protection_Level_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_App_Protection_Level_returns_OK_response.json index 2e968ee5068..7b6d6457334 100644 --- a/src/test/resources/cassettes/features/v2/Update_App_Protection_Level_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_App_Protection_Level_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "c782b1f3-1b03-d50f-8fcd-12e51226c510" + "id": "c782b1f3-1b03-d50f-8fcd-12e51226c514" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_App_Self_Service_Status_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Update_App_Self_Service_Status_returns_No_Content_response.json index e34cd831da4..49cb1b02a8f 100644 --- a/src/test/resources/cassettes/features/v2/Update_App_Self_Service_Status_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Update_App_Self_Service_Status_returns_No_Content_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "c782b1f3-1b03-d50f-8fcd-12e51226c51a" + "id": "c782b1f3-1b03-d50f-8fcd-12e51226c50c" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_App_Tags_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Update_App_Tags_returns_No_Content_response.json index 0d48cfd6420..94817fcb966 100644 --- a/src/test/resources/cassettes/features/v2/Update_App_Tags_returns_No_Content_response.json +++ b/src/test/resources/cassettes/features/v2/Update_App_Tags_returns_No_Content_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "c782b1f3-1b03-d50f-8fcd-12e51226c519" + "id": "c782b1f3-1b03-d50f-8fcd-12e51226c516" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_App_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_App_returns_Bad_Request_response.json index 557872184a5..332b4cfebf4 100644 --- a/src/test/resources/cassettes/features/v2/Update_App_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_App_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "c782b1f3-1b03-d50f-8fcd-12e51226c50d" + "id": "c782b1f3-1b03-d50f-8fcd-12e51226c518" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_App_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_App_returns_OK_response.json index 8754c8dd9f3..44af9ec407e 100644 --- a/src/test/resources/cassettes/features/v2/Update_App_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_App_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "c782b1f3-1b03-d50f-8fcd-12e51226c514" + "id": "c782b1f3-1b03-d50f-8fcd-12e51226c50e" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_GCP_scan_options_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_GCP_scan_options_returns_Bad_Request_response.json index e0d488678ae..bd889c4d7e5 100644 --- a/src/test/resources/cassettes/features/v2/Update_GCP_scan_options_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_GCP_scan_options_returns_Bad_Request_response.json @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "c2c329a8-5875-126a-1858-e7c00b5af114" + "id": "c2c329a8-5875-126a-1858-e7c00b5af113" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_GCP_scan_options_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_GCP_scan_options_returns_OK_response.json index 46d1bbda4f0..15c0687ec0c 100644 --- a/src/test/resources/cassettes/features/v2/Update_GCP_scan_options_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_GCP_scan_options_returns_OK_response.json @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "b0e82961-e316-45f9-b544-8011dda3dd98" + "id": "b0e82961-e316-45f9-b544-8011dda3dd99" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_Bad_Request_response.json index 30f5bc71d9c..2857139efde 100644 --- a/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae43" + "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae48" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_Not_Found_response.json index 1c923bb6635..b95ab9b79e1 100644 --- a/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_Not_Found_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae46" + "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae49" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_OK_response.json index bc6d33ad1cb..5d658b94a87 100644 --- a/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_Org_Connection_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae45" + "id": "76efebf6-d204-c8e8-5a8c-bd11c0a4ae47" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_Scanning_Group_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_Scanning_Group_returns_OK_response.json index b67f3a1d41c..fa37ebb9c8e 100644 --- a/src/test/resources/cassettes/features/v2/Update_Scanning_Group_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_Scanning_Group_returns_OK_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "01611a93-5e74-0630-3c51-f707c3b51e81" + "id": "01611a93-5e74-0630-3c51-f707c3b51e84" }, { "httpRequest": { @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa5" + "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa6" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_Scanning_Rule_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_Scanning_Rule_returns_Bad_Request_response.json index 7929a88b4e0..8c7573a6b24 100644 --- a/src/test/resources/cassettes/features/v2/Update_Scanning_Rule_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_Scanning_Rule_returns_Bad_Request_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "01611a93-5e74-0630-3c51-f707c3b51e80" + "id": "01611a93-5e74-0630-3c51-f707c3b51e78" }, { "httpRequest": { @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa4" + "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238a9d" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_Scanning_Rule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_Scanning_Rule_returns_OK_response.json index c3bd407a946..24bc436cccc 100644 --- a/src/test/resources/cassettes/features/v2/Update_Scanning_Rule_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_Scanning_Rule_returns_OK_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "01611a93-5e74-0630-3c51-f707c3b51e7c" + "id": "01611a93-5e74-0630-3c51-f707c3b51e7b" }, { "httpRequest": { @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238aa0" + "id": "e6af4a2f-dfda-8f06-6f3a-f5528b238a9f" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_a_RUM_based_metric_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Update_a_RUM_based_metric_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..f936fad0795 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_a_RUM_based_metric_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2026-06-02T12:32:41.688Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_a_RUM_based_metric_returns_Bad_Request_response.json similarity index 80% rename from src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Bad_Request_response.json rename to src/test/resources/cassettes/features/v2/Update_a_RUM_based_metric_returns_Bad_Request_response.json index cb10503208a..f8a1e9be1f1 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_RUM_based_metric_returns_Bad_Request_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Update_a_rum_based_metric_returns_Bad_Request_response-1732807883\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}},\"id\":\"testupdatearumbasedmetricreturnsbadrequestresponse1732807883\",\"type\":\"rum_metrics\"}}" + "json": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Update_a_RUM_based_metric_returns_Bad_Request_response-1780403561\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}},\"id\":\"testupdatearumbasedmetricreturnsbadrequestresponse1780403561\",\"type\":\"rum_metrics\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"testupdatearumbasedmetricreturnsbadrequestresponse1732807883\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Update_a_rum_based_metric_returns_Bad_Request_response-1732807883\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}}", + "body": "{\"data\":{\"id\":\"testupdatearumbasedmetricreturnsbadrequestresponse1780403561\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Update_a_RUM_based_metric_returns_Bad_Request_response-1780403561\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "8c430135-76ad-b228-3d93-ebf74ac92029" + "id": "1a8947e8-d949-01a7-32c8-f568cef2088b" }, { "httpRequest": { @@ -37,7 +37,7 @@ }, "headers": {}, "method": "PATCH", - "path": "/api/v2/rum/config/metrics/testupdatearumbasedmetricreturnsbadrequestresponse1732807883", + "path": "/api/v2/rum/config/metrics/testupdatearumbasedmetricreturnsbadrequestresponse1780403561", "keepAlive": false, "secure": true }, @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "d50b868d-8087-ff93-e4cb-192ea69c5e93" + "id": "54c5f295-bbe3-f6fe-8aff-5bfae6f575ba" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/rum/config/metrics/testupdatearumbasedmetricreturnsbadrequestresponse1732807883", + "path": "/api/v2/rum/config/metrics/testupdatearumbasedmetricreturnsbadrequestresponse1780403561", "keepAlive": false, "secure": true }, @@ -78,6 +78,6 @@ "timeToLive": { "unlimited": true }, - "id": "993eb991-d92b-b548-ed01-250bf67740bb" + "id": "0d360790-719f-d9b4-f2c8-a2855e7fff75" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_RUM_based_metric_returns_Conflict_response.freeze b/src/test/resources/cassettes/features/v2/Update_a_RUM_based_metric_returns_Conflict_response.freeze new file mode 100644 index 00000000000..bfc7014f2b7 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_a_RUM_based_metric_returns_Conflict_response.freeze @@ -0,0 +1 @@ +2026-06-02T12:32:42.946Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Conflict_response.json b/src/test/resources/cassettes/features/v2/Update_a_RUM_based_metric_returns_Conflict_response.json similarity index 77% rename from src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Conflict_response.json rename to src/test/resources/cassettes/features/v2/Update_a_RUM_based_metric_returns_Conflict_response.json index c996297f0cf..8225196c8cc 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Conflict_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_RUM_based_metric_returns_Conflict_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Update_a_rum_based_metric_returns_Conflict_response-1732807885\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}},\"id\":\"testupdatearumbasedmetricreturnsconflictresponse1732807885\",\"type\":\"rum_metrics\"}}" + "json": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Update_a_RUM_based_metric_returns_Conflict_response-1780403562\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}},\"id\":\"testupdatearumbasedmetricreturnsconflictresponse1780403562\",\"type\":\"rum_metrics\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"testupdatearumbasedmetricreturnsconflictresponse1732807885\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Update_a_rum_based_metric_returns_Conflict_response-1732807885\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}}", + "body": "{\"data\":{\"id\":\"testupdatearumbasedmetricreturnsconflictresponse1780403562\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Update_a_RUM_based_metric_returns_Conflict_response-1780403562\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "c9f4a4fe-2c17-6cc2-7966-fd89c6619f63" + "id": "d10621d7-9161-3875-1dc1-f825d76c7468" }, { "httpRequest": { @@ -37,7 +37,7 @@ }, "headers": {}, "method": "PATCH", - "path": "/api/v2/rum/config/metrics/testupdatearumbasedmetricreturnsconflictresponse1732807885", + "path": "/api/v2/rum/config/metrics/testupdatearumbasedmetricreturnsconflictresponse1780403562", "keepAlive": false, "secure": true }, @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "a511542a-c3bf-cffa-9a42-6349147536e7" + "id": "2f6e8b0b-fdec-3d23-d226-e6d5eb46a241" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/rum/config/metrics/testupdatearumbasedmetricreturnsconflictresponse1732807885", + "path": "/api/v2/rum/config/metrics/testupdatearumbasedmetricreturnsconflictresponse1780403562", "keepAlive": false, "secure": true }, @@ -78,6 +78,6 @@ "timeToLive": { "unlimited": true }, - "id": "8e43a8cd-2828-6ef3-eae5-6acfbef4dde7" + "id": "56e793f3-4b81-630f-73a5-6f4783878ad5" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_RUM_based_metric_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Update_a_RUM_based_metric_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..e256891d812 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_a_RUM_based_metric_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2026-06-02T12:32:44.259Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Update_a_RUM_based_metric_returns_Not_Found_response.json similarity index 83% rename from src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Not_Found_response.json rename to src/test/resources/cassettes/features/v2/Update_a_RUM_based_metric_returns_Not_Found_response.json index a332a18c241..9acf967d6ce 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_RUM_based_metric_returns_Not_Found_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Update_a_rum_based_metric_returns_Not_Found_response-1732807886\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}},\"id\":\"testupdatearumbasedmetricreturnsnotfoundresponse1732807886\",\"type\":\"rum_metrics\"}}" + "json": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Update_a_RUM_based_metric_returns_Not_Found_response-1780403564\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}},\"id\":\"testupdatearumbasedmetricreturnsnotfoundresponse1780403564\",\"type\":\"rum_metrics\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"testupdatearumbasedmetricreturnsnotfoundresponse1732807886\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Update_a_rum_based_metric_returns_Not_Found_response-1732807886\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}}", + "body": "{\"data\":{\"id\":\"testupdatearumbasedmetricreturnsnotfoundresponse1780403564\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Update_a_RUM_based_metric_returns_Not_Found_response-1780403564\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "f54d0ed6-ec0e-b128-9679-f0dbf0dfbb54" + "id": "b6d4f5f5-b2a3-060a-5eac-0354620e4892" }, { "httpRequest": { @@ -63,7 +63,7 @@ "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/rum/config/metrics/testupdatearumbasedmetricreturnsnotfoundresponse1732807886", + "path": "/api/v2/rum/config/metrics/testupdatearumbasedmetricreturnsnotfoundresponse1780403564", "keepAlive": false, "secure": true }, @@ -78,6 +78,6 @@ "timeToLive": { "unlimited": true }, - "id": "fc68d951-7ef5-8375-64d1-9d09b67ce812" + "id": "f23701b6-1517-8726-bdb6-c94cf34f4c57" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_RUM_based_metric_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_a_RUM_based_metric_returns_OK_response.freeze new file mode 100644 index 00000000000..405852dc646 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_a_RUM_based_metric_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-06-02T12:32:46.608Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_a_RUM_based_metric_returns_OK_response.json similarity index 78% rename from src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_OK_response.json rename to src/test/resources/cassettes/features/v2/Update_a_RUM_based_metric_returns_OK_response.json index e4927fccfb6..630014ecec8 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_RUM_based_metric_returns_OK_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Update_a_rum_based_metric_returns_OK_response-1732807887\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}},\"id\":\"testupdatearumbasedmetricreturnsokresponse1732807887\",\"type\":\"rum_metrics\"}}" + "json": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Update_a_RUM_based_metric_returns_OK_response-1780403566\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}},\"id\":\"testupdatearumbasedmetricreturnsokresponse1780403566\",\"type\":\"rum_metrics\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"testupdatearumbasedmetricreturnsokresponse1732807887\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Update_a_rum_based_metric_returns_OK_response-1732807887\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}}", + "body": "{\"data\":{\"id\":\"testupdatearumbasedmetricreturnsokresponse1780403566\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Update_a_RUM_based_metric_returns_OK_response-1780403566\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,22 +27,22 @@ "timeToLive": { "unlimited": true }, - "id": "6f2ec2fa-7b1a-5a8a-478f-2d224beb5cb7" + "id": "93fc30ec-0b16-7b14-7170-6d86125499b3" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"compute\":{\"include_percentiles\":false},\"filter\":{\"query\":\"@service:rum-config\"},\"group_by\":[{\"path\":\"@browser.version\",\"tag_name\":\"browser_version\"}]},\"id\":\"testupdatearumbasedmetricreturnsokresponse1732807887\",\"type\":\"rum_metrics\"}}" + "json": "{\"data\":{\"attributes\":{\"compute\":{\"include_percentiles\":false},\"filter\":{\"query\":\"@service:rum-config\"},\"group_by\":[{\"path\":\"@browser.version\",\"tag_name\":\"browser_version\"}]},\"id\":\"testupdatearumbasedmetricreturnsokresponse1780403566\",\"type\":\"rum_metrics\"}}" }, "headers": {}, "method": "PATCH", - "path": "/api/v2/rum/config/metrics/testupdatearumbasedmetricreturnsokresponse1732807887", + "path": "/api/v2/rum/config/metrics/testupdatearumbasedmetricreturnsokresponse1780403566", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"testupdatearumbasedmetricreturnsokresponse1732807887\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":false,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"@service:rum-config\"},\"group_by\":[{\"path\":\"@browser.version\",\"tag_name\":\"browser_version\"}],\"uniqueness\":{\"when\":\"match\"}}}}", + "body": "{\"data\":{\"id\":\"testupdatearumbasedmetricreturnsokresponse1780403566\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":false,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"@service:rum-config\"},\"group_by\":[{\"path\":\"@browser.version\",\"tag_name\":\"browser_version\"}],\"uniqueness\":{\"when\":\"match\"}}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "58e350ab-aeba-6504-32b2-6f88494789d2" + "id": "dcc722cb-5803-bf88-8b91-fe6100ae985d" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/rum/config/metrics/testupdatearumbasedmetricreturnsokresponse1732807887", + "path": "/api/v2/rum/config/metrics/testupdatearumbasedmetricreturnsokresponse1780403566", "keepAlive": false, "secure": true }, @@ -78,6 +78,6 @@ "timeToLive": { "unlimited": true }, - "id": "ac19a4c6-9b4e-b8a7-e0f9-e028951e52b2" + "id": "691841f8-9a94-b4f3-ca4a-571060e8f56a" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_WAF_Custom_Rule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_a_WAF_Custom_Rule_returns_OK_response.json index 7b5287a216a..6431ca9223b 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_WAF_Custom_Rule_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_WAF_Custom_Rule_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "337b2f05-cc5f-2fb5-c7be-e2e0e5bf9443" + "id": "337b2f05-cc5f-2fb5-c7be-e2e0e5bf9442" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_a_WAF_exclusion_filter_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_a_WAF_exclusion_filter_returns_Bad_Request_response.json index 402e0d483a0..370567a4e26 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_WAF_exclusion_filter_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_WAF_exclusion_filter_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "337b2f05-cc5f-2fb5-c7be-e2e0e5bf9442" + "id": "337b2f05-cc5f-2fb5-c7be-e2e0e5bf9443" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_a_WAF_exclusion_filter_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_a_WAF_exclusion_filter_returns_OK_response.json index fdf05e33c3a..2d88a0bc75b 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_WAF_exclusion_filter_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_WAF_exclusion_filter_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "f87651cf-cb9d-db71-c4de-1be9e301b3e9" + "id": "f87651cf-cb9d-db71-c4de-1be9e301b3ea" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_a_form_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Update_a_form_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..6a4eb039c7e --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_a_form_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2026-06-10T18:50:02.747Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_form_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Update_a_form_returns_Not_Found_response.json new file mode 100644 index 00000000000..efe523a5e55 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_a_form_returns_Not_Found_response.json @@ -0,0 +1,32 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"form_update\":{\"datastore_config\":{\"datastore_id\":\"5108ea24-dd83-4696-9caa-f069f73d0fad\",\"primary_column_name\":\"id\",\"primary_key_generation_strategy\":\"none\"},\"description\":\"An updated description.\",\"name\":\"Updated Form Name\"}},\"id\":\"22f6006a-2302-4926-9396-d2dfcf7b0b34\",\"type\":\"forms\"}}" + }, + "headers": {}, + "method": "PATCH", + "path": "/api/v2/forms/00000000-0000-0000-0000-000000000001", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"status\":\"404\",\"id\":\"c5564241-69a8-4a9e-af78-20c7913fbf5b\",\"title\":\"form not found\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 404, + "reasonPhrase": "Not Found" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "79f30234-a375-5021-63d3-bd822ad37817" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_form_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_a_form_returns_OK_response.freeze new file mode 100644 index 00000000000..131934de132 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_a_form_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-06-10T18:50:03.118Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_form_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_a_form_returns_OK_response.json new file mode 100644 index 00000000000..265bbade389 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_a_form_returns_OK_response.json @@ -0,0 +1,88 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"anonymous\":false,\"data_definition\":{},\"description\":\"A simple test form.\",\"idp_survey\":false,\"name\":\"Test-Update_a_form_returns_OK_response-1781117403\",\"single_response\":false,\"ui_definition\":{}},\"type\":\"forms\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/forms", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"a365c4e1-5c1f-476f-9330-091fe52a6483\",\"type\":\"forms\",\"attributes\":{\"active\":true,\"anonymous\":false,\"created_at\":\"2026-06-10T18:50:03.541399Z\",\"datastore_config\":{\"datastore_id\":\"ec62b00b-6683-4943-8bd0-28d56f5dca64\",\"primary_column_name\":\"id\",\"primary_key_generation_strategy\":\"none\"},\"description\":\"A simple test form.\",\"idp_survey\":false,\"modified_at\":\"2026-06-10T18:50:03.541399Z\",\"name\":\"Test-Update_a_form_returns_OK_response-1781117403\",\"org_id\":321813,\"self_service\":false,\"single_response\":false,\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"version\":{\"id\":\"376768\",\"state\":\"draft\",\"version\":1,\"etag\":\"b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d\",\"definition_signature\":\"{\\\"signature\\\":\\\"{\\\\\\\"version\\\\\\\":2,\\\\\\\"algorithm\\\\\\\":\\\\\\\"ecdsa-p384\\\\\\\",\\\\\\\"pubkey\\\\\\\":\\\\\\\"XOOWpRG1rFvaLHaG9qLf+GG78llET0BKnZtokyAtLfg=\\\\\\\",\\\\\\\"timestamp\\\\\\\":1781117403,\\\\\\\"proof\\\\\\\":\\\\\\\"MGUCMFvO8GziqWVPfIg06kFsX3mHcT5e/Ub8cJ/9H1oJXqCp56oL/IRLCI351BB2xHXTFAIxALOhp9M+jw87Xn+Qvl//9uiS011jgg6a8e0UftJ1NY+G/ycp/aLzZrFKaBCt6RG8sA==\\\\\\\"}\\\",\\\"version\\\":1}\",\"data_definition\":{},\"ui_definition\":{},\"created_at\":\"2026-06-10T18:50:03.541399Z\",\"modified_at\":\"2026-06-10T18:50:03.541399Z\",\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "d5b5bc9c-ba92-ab41-792c-45b342624092" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"form_update\":{\"datastore_config\":{\"datastore_id\":\"5108ea24-dd83-4696-9caa-f069f73d0fad\",\"primary_column_name\":\"id\",\"primary_key_generation_strategy\":\"none\"},\"description\":\"An updated description.\",\"name\":\"Updated Form Name\"}},\"id\":\"22f6006a-2302-4926-9396-d2dfcf7b0b34\",\"type\":\"forms\"}}" + }, + "headers": {}, + "method": "PATCH", + "path": "/api/v2/forms/a365c4e1-5c1f-476f-9330-091fe52a6483", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"a365c4e1-5c1f-476f-9330-091fe52a6483\",\"type\":\"forms\",\"attributes\":{\"active\":true,\"anonymous\":false,\"created_at\":\"2026-06-10T18:50:03.541399Z\",\"datastore_config\":{\"datastore_id\":\"5108ea24-dd83-4696-9caa-f069f73d0fad\",\"primary_column_name\":\"id\",\"primary_key_generation_strategy\":\"none\"},\"description\":\"An updated description.\",\"idp_survey\":false,\"modified_at\":\"2026-06-10T18:50:03.926234Z\",\"name\":\"Updated Form Name\",\"org_id\":321813,\"self_service\":false,\"single_response\":false,\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"version\":{\"id\":\"376768\",\"state\":\"draft\",\"version\":1,\"etag\":\"b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d\",\"definition_signature\":\"{\\\"signature\\\":\\\"{\\\\\\\"version\\\\\\\":2,\\\\\\\"algorithm\\\\\\\":\\\\\\\"ecdsa-p384\\\\\\\",\\\\\\\"pubkey\\\\\\\":\\\\\\\"XOOWpRG1rFvaLHaG9qLf+GG78llET0BKnZtokyAtLfg=\\\\\\\",\\\\\\\"timestamp\\\\\\\":1781117403,\\\\\\\"proof\\\\\\\":\\\\\\\"MGUCMFvO8GziqWVPfIg06kFsX3mHcT5e/Ub8cJ/9H1oJXqCp56oL/IRLCI351BB2xHXTFAIxALOhp9M+jw87Xn+Qvl//9uiS011jgg6a8e0UftJ1NY+G/ycp/aLzZrFKaBCt6RG8sA==\\\\\\\"}\\\",\\\"version\\\":1}\",\"data_definition\":{},\"ui_definition\":{},\"created_at\":\"2026-06-10T18:50:03.541399Z\",\"modified_at\":\"2026-06-10T18:50:03.541399Z\",\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "ec02b8ec-2dbc-0e78-89af-312ecef0585b" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/forms/a365c4e1-5c1f-476f-9330-091fe52a6483", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"a365c4e1-5c1f-476f-9330-091fe52a6483\",\"type\":\"forms\"}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "88b957ad-b1e2-504e-be18-d667b92e1031" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_pipeline_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_a_pipeline_returns_Bad_Request_response.json index 7ecba1161be..7507a4ec463 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_pipeline_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_pipeline_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "1c5790bf-1fdc-930d-ee1e-046e57b87c7d" + "id": "1c5790bf-1fdc-930d-ee1e-046e57b87c7e" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_a_pipeline_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_a_pipeline_returns_OK_response.json index 9a05ea21a67..4f746dc5abe 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_pipeline_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_pipeline_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "1c5790bf-1fdc-930d-ee1e-046e57b87c80" + "id": "1c5790bf-1fdc-930d-ee1e-046e57b87c7d" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_a_retention_filter_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_a_retention_filter_returns_Bad_Request_response.json index e93ced0b7aa..5e55ae3ff77 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_retention_filter_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_retention_filter_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "b2404278-8cc9-cba4-e3eb-03a7fdff069a" + "id": "b2404278-8cc9-cba4-e3eb-03a7fdff0698" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_a_retention_filter_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Update_a_retention_filter_returns_Not_Found_response.json index f8e2615c3f8..170166752c7 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_retention_filter_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_retention_filter_returns_Not_Found_response.json @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "ce266f9d-5f90-251e-805b-1fa5bbd62fea" + "id": "ce266f9d-5f90-251e-805b-1fa5bbd62feb" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_retention_filter_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_a_retention_filter_returns_OK_response.json index 83f232b7769..2b95dde246d 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_retention_filter_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_retention_filter_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "b2404278-8cc9-cba4-e3eb-03a7fdff0698" + "id": "b2404278-8cc9-cba4-e3eb-03a7fdff069b" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_a_retention_filters_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_a_retention_filters_returns_Bad_Request_response.json index a8ee0769782..f7ba5a0c135 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_retention_filters_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_retention_filters_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "b2404278-8cc9-cba4-e3eb-03a7fdff0699" + "id": "b2404278-8cc9-cba4-e3eb-03a7fdff069e" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_a_retention_filters_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Update_a_retention_filters_returns_Not_Found_response.json index 170166752c7..f8e2615c3f8 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_retention_filters_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_retention_filters_returns_Not_Found_response.json @@ -27,6 +27,6 @@ "timeToLive": { "unlimited": true }, - "id": "ce266f9d-5f90-251e-805b-1fa5bbd62feb" + "id": "ce266f9d-5f90-251e-805b-1fa5bbd62fea" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_retention_filters_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_a_retention_filters_returns_OK_response.json index 4f6a89b85f3..4dbd4d81382 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_retention_filters_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_retention_filters_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "b2404278-8cc9-cba4-e3eb-03a7fdff0697" + "id": "b2404278-8cc9-cba4-e3eb-03a7fdff069a" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_a_role_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_a_role_returns_Bad_Request_response.json index 2733aa2afce..32c22376aa7 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_role_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_role_returns_Bad_Request_response.json @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "ab2c08c1-60c7-9278-3246-d650bb89216f" + "id": "ab2c08c1-60c7-9278-3246-d650bb89216e" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_a_role_returns_Bad_Role_ID_response.json b/src/test/resources/cassettes/features/v2/Update_a_role_returns_Bad_Role_ID_response.json index 5eaaca04e42..4ba1e9fad41 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_role_returns_Bad_Role_ID_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_role_returns_Bad_Role_ID_response.json @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "ab2c08c1-60c7-9278-3246-d650bb89216e" + "id": "ab2c08c1-60c7-9278-3246-d650bb89216c" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_a_role_returns_Not_found_response.json b/src/test/resources/cassettes/features/v2/Update_a_role_returns_Not_found_response.json index f994b57c57d..617b5ce6939 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_role_returns_Not_found_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_role_returns_Not_found_response.json @@ -23,7 +23,7 @@ "timeToLive": { "unlimited": true }, - "id": "ab2c08c1-60c7-9278-3246-d650bb892173" + "id": "ab2c08c1-60c7-9278-3246-d650bb89216f" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_a_role_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_a_role_returns_OK_response.json index 19ad9312674..ada6cbf8cd4 100644 --- a/src/test/resources/cassettes/features/v2/Update_a_role_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_a_role_returns_OK_response.json @@ -53,7 +53,7 @@ "timeToLive": { "unlimited": true }, - "id": "ab2c08c1-60c7-9278-3246-d650bb892174" + "id": "ab2c08c1-60c7-9278-3246-d650bb892172" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Bad_Request_response.freeze deleted file mode 100644 index 72e1a51e58a..00000000000 --- a/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Bad_Request_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-11-28T15:31:23.878Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Conflict_response.freeze b/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Conflict_response.freeze deleted file mode 100644 index cfe5fc951f1..00000000000 --- a/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Conflict_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-11-28T15:31:25.162Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Not_Found_response.freeze deleted file mode 100644 index 619b48a9ebf..00000000000 --- a/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Not_Found_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-11-28T15:31:26.276Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_OK_response.freeze deleted file mode 100644 index 60f066284ba..00000000000 --- a/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2024-11-28T15:31:27.438Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_tag_indexing_rule_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Update_a_tag_indexing_rule_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..6928945c774 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_a_tag_indexing_rule_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2026-06-04T16:39:37.910Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_tag_indexing_rule_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_a_tag_indexing_rule_returns_Bad_Request_response.json new file mode 100644 index 00000000000..c52f7e16159 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_a_tag_indexing_rule_returns_Bad_Request_response.json @@ -0,0 +1,32 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"ignored_metric_name_matches\":[],\"metric_name_matches\":[\"dd.test.*\"],\"name\":\"my-indexing-rule\",\"options\":{\"data\":{\"dynamic_tags\":{\"queried_tags_window_seconds\":3600,\"related_asset_tags\":false},\"manage_preexisting_metrics\":true,\"metric_match\":{\"queried_window_seconds\":3600},\"override_previous_rules\":false},\"version\":1},\"rule_order\":2,\"tags\":[\"env\",\"service\"]},\"type\":\"tag_indexing_rules\"}}" + }, + "headers": {}, + "method": "PUT", + "path": "/api/v2/metrics/tag-indexing-rules/not-a-valid-uuid", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[\"Invalid tag indexing rule ID format\"]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 400, + "reasonPhrase": "Bad Request" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "a3301fcc-449b-1cdc-26ca-eac3619166b5" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_tag_indexing_rule_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Update_a_tag_indexing_rule_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..677ad04641c --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_a_tag_indexing_rule_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2026-06-04T16:39:37.964Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_tag_indexing_rule_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Update_a_tag_indexing_rule_returns_Not_Found_response.json new file mode 100644 index 00000000000..b578f087b6c --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_a_tag_indexing_rule_returns_Not_Found_response.json @@ -0,0 +1,32 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"ignored_metric_name_matches\":[],\"metric_name_matches\":[\"dd.test.*\"],\"name\":\"my-indexing-rule\",\"options\":{\"data\":{\"dynamic_tags\":{\"queried_tags_window_seconds\":3600,\"related_asset_tags\":false},\"manage_preexisting_metrics\":true,\"metric_match\":{\"queried_window_seconds\":3600},\"override_previous_rules\":false},\"version\":1},\"rule_order\":2,\"tags\":[\"env\",\"service\"]},\"type\":\"tag_indexing_rules\"}}" + }, + "headers": {}, + "method": "PUT", + "path": "/api/v2/metrics/tag-indexing-rules/00000000-0000-0000-0000-000000000000", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[\"Tag indexing rule not found\"]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 404, + "reasonPhrase": "Not Found" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "a23e84fa-41b0-a904-eb77-1bf4f2cf79fa" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_tag_indexing_rule_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_a_tag_indexing_rule_returns_OK_response.freeze new file mode 100644 index 00000000000..c71811ecaf2 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_a_tag_indexing_rule_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-06-04T16:39:38.031Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_tag_indexing_rule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_a_tag_indexing_rule_returns_OK_response.json new file mode 100644 index 00000000000..dbfe3edf6a6 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_a_tag_indexing_rule_returns_OK_response.json @@ -0,0 +1,83 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"metric_name_matches\":[\"dd.TestUpdateatagindexingrulereturnsOKresponse1780591178.*\"],\"name\":\"TestUpdateatagindexingrulereturnsOKresponse1780591178\",\"tags\":[\"env\",\"service\"]},\"type\":\"tag_indexing_rules\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/metrics/tag-indexing-rules", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"c9f5704f-f5b9-4afe-9dec-69edfce00c0a\",\"type\":\"tag_indexing_rules\",\"attributes\":{\"created_at\":\"2026-06-04T16:39:38.068057Z\",\"created_by_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"exclude_tags_mode\":false,\"metric_name_matches\":[\"dd.TestUpdateatagindexingrulereturnsOKresponse1780591178.*\"],\"modified_at\":\"2026-06-04T16:39:38.068057Z\",\"modified_by_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"TestUpdateatagindexingrulereturnsOKresponse1780591178\",\"options\":{\"version\":1,\"data\":{\"override_previous_rules\":false,\"manage_preexisting_metrics\":true}},\"rule_order\":1,\"tags\":[\"env\",\"service\"]}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 201, + "reasonPhrase": "Created" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "64a27b85-8206-08cb-57da-88d775db426a" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"ignored_metric_name_matches\":[],\"metric_name_matches\":[\"dd.test.*\"],\"name\":\"my-indexing-rule\",\"options\":{\"data\":{\"dynamic_tags\":{\"queried_tags_window_seconds\":3600,\"related_asset_tags\":false},\"manage_preexisting_metrics\":true,\"metric_match\":{\"queried_window_seconds\":3600},\"override_previous_rules\":false},\"version\":1},\"rule_order\":2,\"tags\":[\"env\",\"service\"]},\"type\":\"tag_indexing_rules\"}}" + }, + "headers": {}, + "method": "PUT", + "path": "/api/v2/metrics/tag-indexing-rules/c9f5704f-f5b9-4afe-9dec-69edfce00c0a", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"c9f5704f-f5b9-4afe-9dec-69edfce00c0a\",\"type\":\"tag_indexing_rules\",\"attributes\":{\"created_at\":\"2026-06-04T16:39:38.068057Z\",\"created_by_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"exclude_tags_mode\":false,\"ignored_metric_name_matches\":[],\"metric_name_matches\":[\"dd.test.*\"],\"modified_at\":\"2026-06-04T16:39:38.137079Z\",\"modified_by_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"my-indexing-rule\",\"options\":{\"version\":1,\"data\":{\"override_previous_rules\":false,\"manage_preexisting_metrics\":true,\"dynamic_tags\":{\"queried_tags_window_seconds\":3600},\"metric_match\":{\"queried_window_seconds\":3600}}},\"rule_order\":2,\"tags\":[\"env\",\"service\"]}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "18be7365-34b6-1d38-0a60-3403ff4a885f" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/metrics/tag-indexing-rules/c9f5704f-f5b9-4afe-9dec-69edfce00c0a", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "headers": {}, + "statusCode": 204, + "reasonPhrase": "No Content" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "8fc916c8-fb8e-2a73-30c2-ae8a3ec45924" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_an_AWS_integration_returns_AWS_Account_object_response.json b/src/test/resources/cassettes/features/v2/Update_an_AWS_integration_returns_AWS_Account_object_response.json index e47e6cdfe12..6f8a3b3ff88 100644 --- a/src/test/resources/cassettes/features/v2/Update_an_AWS_integration_returns_AWS_Account_object_response.json +++ b/src/test/resources/cassettes/features/v2/Update_an_AWS_integration_returns_AWS_Account_object_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "479ab602-1a6a-ff9c-cfae-4a71849b3ce3" + "id": "479ab602-1a6a-ff9c-cfae-4a71849b3ce1" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_an_AWS_integration_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_an_AWS_integration_returns_Bad_Request_response.json index 833d5ca5043..38f465a9e25 100644 --- a/src/test/resources/cassettes/features/v2/Update_an_AWS_integration_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_an_AWS_integration_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "479ab602-1a6a-ff9c-cfae-4a71849b3ce2" + "id": "479ab602-1a6a-ff9c-cfae-4a71849b3ce4" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Bad_request_response.json b/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Bad_request_response.json index 59be0a3c587..3fff6d70d3c 100644 --- a/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Bad_request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Bad_request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "ef58c8e5-8d44-f741-5735-0d8c01ffa21f" + "id": "ef58c8e5-8d44-f741-5735-0d8c01ffa21e" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Successfully_updated_a_workflow_response.json b/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Successfully_updated_a_workflow_response.json index ab514e51ba2..bc4c84bf23d 100644 --- a/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Successfully_updated_a_workflow_response.json +++ b/src/test/resources/cassettes/features/v2/Update_an_existing_Workflow_returns_Successfully_updated_a_workflow_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "ef58c8e5-8d44-f741-5735-0d8c01ffa21d" + "id": "ef58c8e5-8d44-f741-5735-0d8c01ffa21f" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_an_existing_incident_service_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_an_existing_incident_service_returns_OK_response.freeze deleted file mode 100644 index 45de6e2ecb2..00000000000 --- a/src/test/resources/cassettes/features/v2/Update_an_existing_incident_service_returns_OK_response.freeze +++ /dev/null @@ -1 +0,0 @@ -2022-05-12T09:51:35.154Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_an_existing_incident_service_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_an_existing_incident_service_returns_OK_response.json deleted file mode 100644 index 945d2ea6be7..00000000000 --- a/src/test/resources/cassettes/features/v2/Update_an_existing_incident_service_returns_OK_response.json +++ /dev/null @@ -1,83 +0,0 @@ -[ - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"name\":\"Test-Update_an_existing_incident_service_returns_OK_response-1652349095\"},\"type\":\"services\"}}" - }, - "headers": {}, - "method": "POST", - "path": "/api/v2/services", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"included\":[{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"created_at\":\"2019-10-02T08:15:39.795051+00:00\",\"modified_at\":\"2020-06-15T12:33:12.884459+00:00\",\"email\":\"frog@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Active\"},\"relationships\":{\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}],\"data\":{\"type\":\"services\",\"id\":\"f9f4467a-1e31-5513-83b8-ca6c4287a9b3\",\"attributes\":{\"name\":\"Test-Update_an_existing_incident_service_returns_OK_response-1652349095\",\"created\":\"2022-05-12T09:51:35.599056+00:00\",\"modified\":\"2022-05-12T09:51:35.599056+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}", - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "statusCode": 201, - "reasonPhrase": "Created" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "faad03e6-b471-1bfe-67df-8a23e3efda11" - }, - { - "httpRequest": { - "body": { - "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"name\":\"Test-Update_an_existing_incident_service_returns_OK_response-1652349095-updated\"},\"type\":\"services\"}}" - }, - "headers": {}, - "method": "PATCH", - "path": "/api/v2/services/f9f4467a-1e31-5513-83b8-ca6c4287a9b3", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "body": "{\"included\":[{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"attributes\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"created_at\":\"2019-10-02T08:15:39.795051+00:00\",\"modified_at\":\"2020-06-15T12:33:12.884459+00:00\",\"email\":\"frog@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro\",\"title\":null,\"verified\":true,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Active\"},\"relationships\":{\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}],\"data\":{\"type\":\"services\",\"id\":\"f9f4467a-1e31-5513-83b8-ca6c4287a9b3\",\"attributes\":{\"name\":\"Test-Update_an_existing_incident_service_returns_OK_response-1652349095-updated\",\"created\":\"2022-05-12T09:51:35.599056+00:00\",\"modified\":\"2022-05-12T09:51:36.165537+00:00\"},\"relationships\":{\"last_modified_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}},\"created_by\":{\"data\":{\"type\":\"users\",\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\"}}}}}", - "headers": { - "Content-Type": [ - "application/json" - ] - }, - "statusCode": 200, - "reasonPhrase": "OK" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "640977f8-6095-b83f-c3e5-32f232c0c344" - }, - { - "httpRequest": { - "headers": {}, - "method": "DELETE", - "path": "/api/v2/services/f9f4467a-1e31-5513-83b8-ca6c4287a9b3", - "keepAlive": false, - "secure": true - }, - "httpResponse": { - "headers": {}, - "statusCode": 204, - "reasonPhrase": "No Content" - }, - "times": { - "remainingTimes": 1 - }, - "timeToLive": { - "unlimited": true - }, - "id": "4f7c3bd9-2be3-9188-f27f-c19beb7a9df8" - } -] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_case_attributes_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_case_attributes_returns_Bad_Request_response.json index c403571c4ea..743bfbc7078 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_attributes_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_attributes_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "0a6534d0-42f2-5075-64f8-7ab28f449a8d" + "id": "0a6534d0-42f2-5075-64f8-7ab28f449a8e" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_case_attributes_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_case_attributes_returns_OK_response.json index 44f28b45360..104696c2320 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_attributes_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_attributes_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145fe" + "id": "79babc38-7a70-5347-c8a6-73b0e70145f0" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_case_custom_attribute_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_case_custom_attribute_returns_Bad_Request_response.json index c69aaf87654..876ad2e41fe 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_custom_attribute_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_custom_attribute_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "dc45fc73-0f09-c12d-941b-eaf799af646a" + "id": "dc45fc73-0f09-c12d-941b-eaf799af6469" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_case_custom_attribute_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Update_case_custom_attribute_returns_Not_Found_response.json index fe19098a6f3..3dff6385ef2 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_custom_attribute_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_custom_attribute_returns_Not_Found_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145ff" + "id": "79babc38-7a70-5347-c8a6-73b0e70145ef" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_case_custom_attribute_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_case_custom_attribute_returns_OK_response.json index c2b2cab762b..3e0850132da 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_custom_attribute_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_custom_attribute_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "dc45fc73-0f09-c12d-941b-eaf799af6469" + "id": "dc45fc73-0f09-c12d-941b-eaf799af646a" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_case_description_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_case_description_returns_Bad_Request_response.json index 431f560d206..d1c977728b3 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_description_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_description_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "0a6534d0-42f2-5075-64f8-7ab28f449a8e" + "id": "0a6534d0-42f2-5075-64f8-7ab28f449a8d" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_case_description_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_case_description_returns_OK_response.json index fef8d736355..2fa4e444f64 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_description_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_description_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145f8" + "id": "79babc38-7a70-5347-c8a6-73b0e70145fa" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_case_priority_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_case_priority_returns_Bad_Request_response.json index fc0f56bc1de..f17e853b338 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_priority_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_priority_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145f4" + "id": "79babc38-7a70-5347-c8a6-73b0e70145f7" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_case_priority_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_case_priority_returns_OK_response.json index 2231d87f113..afa627d3b82 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_priority_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_priority_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145f7" + "id": "79babc38-7a70-5347-c8a6-73b0e70145f4" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_case_status_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_case_status_returns_Bad_Request_response.json index 73fbdd658a2..1eeee86ee7e 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_status_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_status_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145ec" + "id": "79babc38-7a70-5347-c8a6-73b0e70145ea" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_case_status_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_case_status_returns_OK_response.json index e39974723b5..4d0529dbc46 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_status_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_status_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145ee" + "id": "79babc38-7a70-5347-c8a6-73b0e70145f8" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_case_title_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_case_title_returns_Bad_Request_response.json index b7f4230cf66..d554e5764da 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_title_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_title_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145ed" + "id": "79babc38-7a70-5347-c8a6-73b0e70145e9" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_case_title_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_case_title_returns_OK_response.json index 6c834d6b77d..1463cb0e2aa 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_title_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_title_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "79babc38-7a70-5347-c8a6-73b0e70145f6" + "id": "79babc38-7a70-5347-c8a6-73b0e70145fc" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_datastore_item_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_datastore_item_returns_OK_response.json index 7e38c35c46e..c8f3036be0f 100644 --- a/src/test/resources/cassettes/features/v2/Update_datastore_item_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_datastore_item_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d2f" + "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d35" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_datastore_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_datastore_returns_OK_response.json index 2163486ba0e..6ddec714013 100644 --- a/src/test/resources/cassettes/features/v2/Update_datastore_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_datastore_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d31" + "id": "6574cf7e-1c55-24e1-45d2-b92f9fa74d2d" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_incident_notification_rule_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_incident_notification_rule_returns_OK_response.json index 4b4aaa2bc5d..48d60462cbc 100644 --- a/src/test/resources/cassettes/features/v2/Update_incident_notification_rule_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_incident_notification_rule_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd4" + "id": "7bcfec66-5300-9891-51e5-e4d7e0833bdb" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_incident_notification_template_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_incident_notification_template_returns_OK_response.json index 32bf36c65c1..92e2e3d0445 100644 --- a/src/test/resources/cassettes/features/v2/Update_incident_notification_template_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_incident_notification_template_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd5" + "id": "7bcfec66-5300-9891-51e5-e4d7e0833bd8" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_the_state_of_an_issue_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_the_state_of_an_issue_returns_Bad_Request_response.json index 4a27cd1e9d6..e642f719a20 100644 --- a/src/test/resources/cassettes/features/v2/Update_the_state_of_an_issue_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_the_state_of_an_issue_returns_Bad_Request_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "a2c05b3b-bab5-013b-200d-7dc622c1b35f" + "id": "a2c05b3b-bab5-013b-200d-7dc622c1b35e" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Update_the_state_of_an_issue_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_the_state_of_an_issue_returns_OK_response.json index 6078cbf29e3..0c4d5613d6a 100644 --- a/src/test/resources/cassettes/features/v2/Update_the_state_of_an_issue_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_the_state_of_an_issue_returns_OK_response.json @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "a2c05b3b-bab5-013b-200d-7dc622c1b35e" + "id": "a2c05b3b-bab5-013b-200d-7dc622c1b35f" }, { "httpRequest": { diff --git a/src/test/resources/cassettes/features/v2/Upsert_and_publish_a_form_version_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Upsert_and_publish_a_form_version_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..a7e8da40bcf --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Upsert_and_publish_a_form_version_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2026-06-11T15:57:52.090Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Upsert_and_publish_a_form_version_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Upsert_and_publish_a_form_version_returns_Not_Found_response.json new file mode 100644 index 00000000000..56857daca02 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Upsert_and_publish_a_form_version_returns_Not_Found_response.json @@ -0,0 +1,32 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"data_definition\":{\"description\":\"Welcome to the Engineering Experience Survey.\",\"required\":[],\"title\":\"Developer Experience Survey\",\"type\":\"object\"},\"ui_definition\":{\"ui:order\":[],\"ui:theme\":{\"primaryColor\":\"gray\"}},\"upsert_params\":{\"etag\":\"b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d\"}},\"type\":\"form_versions\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/forms/00000000-0000-0000-0000-000000000001/versions/upsert_and_publish", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"status\":\"404\",\"id\":\"08399bf1-1d71-4160-bc73-e858e01fde0f\",\"title\":\"form not found\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 404, + "reasonPhrase": "Not Found" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "9dc4b759-cb16-4830-83c9-86f4a462e6b4" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Upsert_and_publish_a_form_version_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Upsert_and_publish_a_form_version_returns_OK_response.freeze new file mode 100644 index 00000000000..2bab83cd013 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Upsert_and_publish_a_form_version_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-06-11T15:57:52.936Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Upsert_and_publish_a_form_version_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Upsert_and_publish_a_form_version_returns_OK_response.json new file mode 100644 index 00000000000..a199be53b69 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Upsert_and_publish_a_form_version_returns_OK_response.json @@ -0,0 +1,88 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"anonymous\":false,\"data_definition\":{},\"description\":\"A simple test form.\",\"idp_survey\":false,\"name\":\"Test-Upsert_and_publish_a_form_version_returns_OK_response-1781193472\",\"single_response\":false,\"ui_definition\":{}},\"type\":\"forms\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/forms", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"25824ea9-3c52-4f43-8539-a2d4cd7f9a3b\",\"type\":\"forms\",\"attributes\":{\"active\":true,\"anonymous\":false,\"created_at\":\"2026-06-11T15:57:53.185492Z\",\"datastore_config\":{\"datastore_id\":\"37899277-a526-4668-966b-e26a258347a4\",\"primary_column_name\":\"id\",\"primary_key_generation_strategy\":\"none\"},\"description\":\"A simple test form.\",\"idp_survey\":false,\"modified_at\":\"2026-06-11T15:57:53.185492Z\",\"name\":\"Test-Upsert_and_publish_a_form_version_returns_OK_response-1781193472\",\"org_id\":321813,\"self_service\":false,\"single_response\":false,\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"version\":{\"id\":\"380435\",\"state\":\"draft\",\"version\":1,\"etag\":\"b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d\",\"definition_signature\":\"{\\\"signature\\\":\\\"{\\\\\\\"version\\\\\\\":2,\\\\\\\"algorithm\\\\\\\":\\\\\\\"ecdsa-p384\\\\\\\",\\\\\\\"pubkey\\\\\\\":\\\\\\\"S2KAuCoip8JbyZNOT2gYbpUouidttEGvYWyvqeoMQjE=\\\\\\\",\\\\\\\"timestamp\\\\\\\":1781193473,\\\\\\\"proof\\\\\\\":\\\\\\\"MGUCMQD5kghzucjG+znH/JVQhgs9+82KuT/veBwvMPxHafCX3toxbVfSadP16IDWljuo2SYCMFjmS1y3rcGEBUCajP/BE82sUdc9L8jxA57Jz6lvCsuDKC7BfFYVq2FjSrj19aS9Pg==\\\\\\\"}\\\",\\\"version\\\":1}\",\"data_definition\":{},\"ui_definition\":{},\"created_at\":\"2026-06-11T15:57:53.185492Z\",\"modified_at\":\"2026-06-11T15:57:53.185492Z\",\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "86e77555-bcc9-2bd0-2a91-764c0e29cd74" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"data_definition\":{\"description\":\"Welcome to the Engineering Experience Survey.\",\"required\":[],\"title\":\"Developer Experience Survey\",\"type\":\"object\"},\"ui_definition\":{\"ui:order\":[],\"ui:theme\":{\"primaryColor\":\"gray\"}},\"upsert_params\":{\"etag\":\"b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d\"}},\"type\":\"form_versions\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/forms/25824ea9-3c52-4f43-8539-a2d4cd7f9a3b/versions/upsert_and_publish", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"25824ea9-3c52-4f43-8539-a2d4cd7f9a3b\",\"type\":\"forms\",\"attributes\":{\"active\":true,\"anonymous\":false,\"created_at\":\"2026-06-11T15:57:53.185492Z\",\"datastore_config\":{\"datastore_id\":\"37899277-a526-4668-966b-e26a258347a4\",\"primary_column_name\":\"id\",\"primary_key_generation_strategy\":\"none\"},\"description\":\"A simple test form.\",\"idp_survey\":false,\"modified_at\":\"2026-06-11T15:57:53.185492Z\",\"name\":\"Test-Upsert_and_publish_a_form_version_returns_OK_response-1781193472\",\"org_id\":321813,\"publication\":{\"id\":\"383651\",\"org_id\":321813,\"form_id\":\"25824ea9-3c52-4f43-8539-a2d4cd7f9a3b\",\"publish_seq\":1,\"form_version\":1,\"created_at\":\"2026-06-11T15:57:53.39063Z\",\"modified_at\":\"2026-06-11T15:57:53.39063Z\",\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"self_service\":false,\"single_response\":false,\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"version\":{\"id\":\"380435\",\"state\":\"frozen\",\"version\":1,\"etag\":\"30586851d6ab0b26080d3f34629e5e2cfb9f2f57457eec927b72eafefae81e48\",\"definition_signature\":\"{\\\"signature\\\":\\\"{\\\\\\\"version\\\\\\\":2,\\\\\\\"algorithm\\\\\\\":\\\\\\\"ecdsa-p384\\\\\\\",\\\\\\\"pubkey\\\\\\\":\\\\\\\"XOOWpRG1rFvaLHaG9qLf+GG78llET0BKnZtokyAtLfg=\\\\\\\",\\\\\\\"timestamp\\\\\\\":1781193473,\\\\\\\"proof\\\\\\\":\\\\\\\"MGUCMQCtGifKZr+EjEtnFk2ZKxy0DThB02mQ5wMJ3vB5L7zgTpHR+6k38mxLM1CqP2YFeQgCMHL7aBH2pJzR7yrv2YvaWNnv2puOld4laoRAWzCcuHgxHVWnp7wEcrvebyDbNej+2g==\\\\\\\"}\\\",\\\"version\\\":1}\",\"data_definition\":{\"description\":\"Welcome to the Engineering Experience Survey.\",\"required\":[],\"title\":\"Developer Experience Survey\",\"type\":\"object\"},\"ui_definition\":{\"ui:order\":[],\"ui:theme\":{\"primaryColor\":\"gray\"}},\"created_at\":\"2026-06-11T15:57:53.185492Z\",\"modified_at\":\"2026-06-11T15:57:53.39063Z\",\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "5082cd47-86af-f3f1-29bb-e4851e82e328" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/forms/25824ea9-3c52-4f43-8539-a2d4cd7f9a3b", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"25824ea9-3c52-4f43-8539-a2d4cd7f9a3b\",\"type\":\"forms\"}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "2473a2fd-3185-f63b-2bba-74978586040e" + } +] \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v1/api/dashboards.feature b/src/test/resources/com/datadog/api/client/v1/api/dashboards.feature index 65c4c044abf..932dc22b0b3 100644 --- a/src/test/resources/com/datadog/api/client/v1/api/dashboards.feature +++ b/src/test/resources/com/datadog/api/client/v1/api/dashboards.feature @@ -836,6 +836,18 @@ Feature: Dashboards And the response "widgets[0].definition.workflow_id" is equal to "2e055f16-8b6a-4cdd-b452-17a34c44b160" And the response "widgets[0].definition.inputs[0]" is equal to {"name": "environment", "value": "$env.value"} + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with sankey widget and RUM data source + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/sankey_rum_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "sankey" + And the response "widgets[0].definition.requests[0].query.data_source" is equal to "rum" + And the response "widgets[0].definition.requests[0].query.query_string" is equal to "@type:view" + And the response "widgets[0].definition.requests[0].query.mode" is equal to "source" + And the response "widgets[0].definition.requests[0].request_type" is equal to "sankey" + @team:DataDog/dashboards-backend Scenario: Create a new dashboard with sankey widget and network data source Given new "CreateDashboard" request @@ -861,18 +873,6 @@ Feature: Dashboards And the response "widgets[0].definition.requests[0].query.mode" is equal to "source" And the response "widgets[0].definition.requests[0].request_type" is equal to "sankey" - @team:DataDog/dashboards-backend - Scenario: Create a new dashboard with sankey widget and rum data source - Given new "CreateDashboard" request - And body from file "dashboards_json_payload/sankey_rum_widget.json" - When the request is sent - Then the response status is 200 OK - And the response "widgets[0].definition.type" is equal to "sankey" - And the response "widgets[0].definition.requests[0].query.data_source" is equal to "rum" - And the response "widgets[0].definition.requests[0].query.query_string" is equal to "@type:view" - And the response "widgets[0].definition.requests[0].query.mode" is equal to "source" - And the response "widgets[0].definition.requests[0].request_type" is equal to "sankey" - @team:DataDog/dashboards-backend Scenario: Create a new dashboard with scatterplot widget Given new "CreateDashboard" request diff --git a/src/test/resources/com/datadog/api/client/v1/api/given.json b/src/test/resources/com/datadog/api/client/v1/api/given.json index 4415a28bc00..3c1540f6faa 100644 --- a/src/test/resources/com/datadog/api/client/v1/api/given.json +++ b/src/test/resources/com/datadog/api/client/v1/api/given.json @@ -234,6 +234,18 @@ "tag": "Service Level Objective Corrections", "operationId": "CreateSLOCorrection" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"attributes\": {\n \"slo_query\": \"env:prod service:checkout\",\n \"start\": {{ timestamp(\"now\") }},\n \"end\": {{ timestamp(\"now + 1h\") }},\n \"category\": \"Other\",\n \"timezone\": \"UTC\",\n \"description\": \"Test Correction\"\n },\n \"type\": \"correction\"\n }\n}" + } + ], + "step": "there is a valid \"correction_with_query\" in the system", + "key": "correction_with_query", + "tag": "Service Level Objective Corrections", + "operationId": "CreateSLOCorrection" + }, { "parameters": [ { diff --git a/src/test/resources/com/datadog/api/client/v1/api/hosts.feature b/src/test/resources/com/datadog/api/client/v1/api/hosts.feature index 7ed533f7b20..56257ab1844 100644 --- a/src/test/resources/com/datadog/api/client/v1/api/hosts.feature +++ b/src/test/resources/com/datadog/api/client/v1/api/hosts.feature @@ -9,20 +9,20 @@ Feature: Hosts And a valid "appKeyAuth" key in the system And an instance of "Hosts" API - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Get all hosts for your organization returns "Invalid Parameter Error" response Given new "ListHosts" request When the request is sent Then the response status is 400 Invalid Parameter Error - @integration-only @team:DataDog/core-index + @integration-only @team:DataDog/redapl-hosts Scenario: Get all hosts for your organization returns "OK" response Given new "ListHosts" request And request contains "filter" parameter with value "env:ci" When the request is sent Then the response status is 200 OK - @replay-only @team:DataDog/core-index + @replay-only @team:DataDog/redapl-hosts Scenario: Get all hosts with metadata deserializes successfully Given new "ListHosts" request And request contains "include_hosts_metadata" parameter with value true @@ -35,26 +35,26 @@ Feature: Hosts And the response "host_list[0].meta.agent_checks[0]" is equal to ["ntp","ntp","ntp:d884b5186b651429","OK","",""] And the response "host_list[0].meta.gohai" is equal to "{\"cpu\":{\"cache_size\":\"8192 KB\",\"cpu_cores\":\"1\",\"cpu_logical_processors\":\"1\",\"family\":\"6\",\"mhz\":\"2711.998\",\"model\":\"142\",\"model_name\":\"Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz\",\"stepping\":\"10\",\"vendor_id\":\"GenuineIntel\"},\"filesystem\":[{\"kb_size\":\"3966892\",\"mounted_on\":\"/dev\",\"name\":\"udev\"},{\"kb_size\":\"797396\",\"mounted_on\":\"/run\",\"name\":\"tmpfs\"},{\"kb_size\":\"64800356\",\"mounted_on\":\"/\",\"name\":\"/dev/mapper/vagrant--vg-root\"},{\"kb_size\":\"3986968\",\"mounted_on\":\"/dev/shm\",\"name\":\"tmpfs\"},{\"kb_size\":\"5120\",\"mounted_on\":\"/run/lock\",\"name\":\"tmpfs\"},{\"kb_size\":\"3986968\",\"mounted_on\":\"/sys/fs/cgroup\",\"name\":\"tmpfs\"},{\"kb_size\":\"488245288\",\"mounted_on\":\"/vagrant\",\"name\":\"/vagrant\"},{\"kb_size\":\"797392\",\"mounted_on\":\"/run/user/1000\",\"name\":\"tmpfs\"}],\"memory\":{\"swap_total\":\"1003516kB\",\"total\":\"7973940kB\"},\"network\":{\"interfaces\":[{\"ipv4\":\"10.0.2.15\",\"ipv4-network\":\"10.0.2.0/24\",\"ipv6\":\"fe80::a00:27ff:fec2:be11\",\"ipv6-network\":\"fe80::/64\",\"macaddress\":\"08:00:27:c2:be:11\",\"name\":\"eth0\"},{\"ipv4\":\"192.168.122.1\",\"ipv4-network\":\"192.168.122.0/24\",\"macaddress\":\"52:54:00:6f:1c:bf\",\"name\":\"virbr0\"}],\"ipaddress\":\"10.0.2.15\",\"ipaddressv6\":\"fe80::a00:27ff:fec2:be11\",\"macaddress\":\"08:00:27:c2:be:11\"},\"platform\":{\"GOOARCH\":\"amd64\",\"GOOS\":\"linux\",\"goV\":\"1.16.7\",\"hardware_platform\":\"x86_64\",\"hostname\":\"vagrant\",\"kernel_name\":\"Linux\",\"kernel_release\":\"4.15.0-29-generic\",\"kernel_version\":\"#31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018\",\"machine\":\"x86_64\",\"os\":\"GNU/Linux\",\"processor\":\"x86_64\",\"pythonV\":\"2.7.15rc1\"}}" - @skip-validation @team:DataDog/core-index + @skip-validation @team:DataDog/redapl-hosts Scenario: Get all hosts with metadata for your organization returns "OK" response Given new "ListHosts" request And request contains "include_hosts_metadata" parameter with value true When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Get the total number of active hosts returns "Invalid Parameter Error" response Given new "GetHostTotals" request When the request is sent Then the response status is 400 Invalid Parameter Error - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Get the total number of active hosts returns "OK" response Given new "GetHostTotals" request When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Mute a host returns "Invalid Parameter Error" response Given new "MuteHost" request And request contains "host_name" parameter from "REPLACE.ME" @@ -62,7 +62,7 @@ Feature: Hosts When the request is sent Then the response status is 400 Invalid Parameter Error - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Mute a host returns "OK" response Given new "MuteHost" request And request contains "host_name" parameter from "REPLACE.ME" @@ -70,14 +70,14 @@ Feature: Hosts When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Unmute a host returns "Invalid Parameter Error" response Given new "UnmuteHost" request And request contains "host_name" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Invalid Parameter Error - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Unmute a host returns "OK" response Given new "UnmuteHost" request And request contains "host_name" parameter from "REPLACE.ME" diff --git a/src/test/resources/com/datadog/api/client/v1/api/service_level_objective_corrections.feature b/src/test/resources/com/datadog/api/client/v1/api/service_level_objective_corrections.feature index d301d8e6764..5b89ea6df2d 100644 --- a/src/test/resources/com/datadog/api/client/v1/api/service_level_objective_corrections.feature +++ b/src/test/resources/com/datadog/api/client/v1/api/service_level_objective_corrections.feature @@ -49,6 +49,16 @@ Feature: Service Level Objective Corrections And the response "data.type" is equal to "correction" And the response "data.attributes.rrule" is equal to "FREQ=DAILY;INTERVAL=10;COUNT=5" + @team:DataDog/slo-app + Scenario: Create an SLO correction with slo_query returns "OK" response + Given new "CreateSLOCorrection" request + And body with value {"data": {"attributes": {"category": "Scheduled Maintenance", "description": "{{ unique }}", "end": {{ timestamp("now + 1h") }}, "slo_query": "env:prod service:checkout", "start": {{ timestamp("now") }}, "timezone": "UTC"}, "type": "correction"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "correction" + And the response "data.attributes.category" is equal to "Scheduled Maintenance" + And the response "data.attributes.slo_query" is equal to "env:prod service:checkout" + @generated @skip @team:DataDog/slo-app Scenario: Delete an SLO correction returns "Not found" response Given new "DeleteSLOCorrection" request @@ -114,7 +124,7 @@ Feature: Service Level Objective Corrections Scenario: Update an SLO correction returns "Not Found" response Given new "UpdateSLOCorrection" request And request contains "slo_correction_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"category": "Scheduled Maintenance", "duration": 3600, "end": 1600000000, "rrule": "FREQ=DAILY;INTERVAL=10;COUNT=5", "start": 1600000000, "timezone": "UTC"}, "type": "correction"}} + And body with value {"data": {"attributes": {"category": "Scheduled Maintenance", "duration": 3600, "end": 1600000000, "rrule": "FREQ=DAILY;INTERVAL=10;COUNT=5", "slo_query": "env:prod service:checkout", "start": 1600000000, "timezone": "UTC"}, "type": "correction"}} When the request is sent Then the response status is 404 Not Found @@ -130,3 +140,14 @@ Feature: Service Level Objective Corrections And the response "data.id" has the same value as "correction.data.id" And the response "data.attributes.slo_id" has the same value as "correction.data.attributes.slo_id" And the response "data.attributes.category" is equal to "Deployment" + + @team:DataDog/slo-app + Scenario: Update an SLO correction with slo_query returns "OK" response + Given there is a valid "correction_with_query" in the system + And new "UpdateSLOCorrection" request + And request contains "slo_correction_id" parameter from "correction_with_query.data.id" + And body with value {"data": {"attributes": {"category": "Scheduled Maintenance", "description": "{{ unique }}", "end": {{ timestamp("now + 1h") }}, "slo_query": "env:staging service:checkout", "start": {{ timestamp("now") }}, "timezone": "UTC"}, "type": "correction"}} + When the request is sent + Then the response status is 200 OK + And the response "data.id" has the same value as "correction_with_query.data.id" + And the response "data.attributes.slo_query" is equal to "env:staging service:checkout" diff --git a/src/test/resources/com/datadog/api/client/v1/api/tags.feature b/src/test/resources/com/datadog/api/client/v1/api/tags.feature index d6557ca1882..f0e8881a275 100644 --- a/src/test/resources/com/datadog/api/client/v1/api/tags.feature +++ b/src/test/resources/com/datadog/api/client/v1/api/tags.feature @@ -17,7 +17,7 @@ Feature: Tags And a valid "appKeyAuth" key in the system And an instance of "Tags" API - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Add tags to a host returns "Created" response Given new "CreateHostTags" request And request contains "host_name" parameter from "REPLACE.ME" @@ -25,7 +25,7 @@ Feature: Tags When the request is sent Then the response status is 201 Created - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Add tags to a host returns "Not Found" response Given new "CreateHostTags" request And request contains "host_name" parameter from "REPLACE.ME" @@ -33,47 +33,47 @@ Feature: Tags When the request is sent Then the response status is 404 Not Found - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Get All Host Tags returns "Not Found" response Given new "ListHostTags" request When the request is sent Then the response status is 404 Not Found - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Get All Host Tags returns "OK" response Given new "ListHostTags" request When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Get Host Tags returns "Not Found" response Given new "GetHostTags" request And request contains "host_name" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Get Host Tags returns "OK" response Given new "GetHostTags" request And request contains "host_name" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Remove host tags returns "Not Found" response Given new "DeleteHostTags" request And request contains "host_name" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Remove host tags returns "OK" response Given new "DeleteHostTags" request And request contains "host_name" parameter from "REPLACE.ME" When the request is sent Then the response status is 204 OK - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Update host tags returns "Not Found" response Given new "UpdateHostTags" request And request contains "host_name" parameter from "REPLACE.ME" @@ -81,7 +81,7 @@ Feature: Tags When the request is sent Then the response status is 404 Not Found - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Update host tags returns "OK" response Given new "UpdateHostTags" request And request contains "host_name" parameter from "REPLACE.ME" diff --git a/src/test/resources/com/datadog/api/client/v1/api/usage_metering.feature b/src/test/resources/com/datadog/api/client/v1/api/usage_metering.feature index ea9e1ca4b44..e8651834ac2 100644 --- a/src/test/resources/com/datadog/api/client/v1/api/usage_metering.feature +++ b/src/test/resources/com/datadog/api/client/v1/api/usage_metering.feature @@ -14,32 +14,32 @@ Feature: Usage Metering And a valid "appKeyAuth" key in the system And an instance of "UsageMetering" API - @team:DataDog/revenue-query + @team:DataDog/billing-hub Scenario: Get all custom metrics by hourly average returns "Bad Request" response Given new "GetUsageTopAvgMetrics" request When the request is sent Then the response status is 400 Bad Request - @team:DataDog/revenue-query + @team:DataDog/billing-hub Scenario: Get all custom metrics by hourly average returns "OK" response Given new "GetUsageTopAvgMetrics" request And request contains "day" parameter with value "{{ timeISO('now - 3d') }}" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get billable usage across your account returns "Bad Request" response Given new "GetUsageBillableSummary" request When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get billable usage across your account returns "OK" response Given new "GetUsageBillableSummary" request When the request is sent Then the response status is 200 OK - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly logs usage by retention returns "Bad Request" response Given new "GetUsageLogsByRetention" request And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" @@ -47,7 +47,7 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly logs usage by retention returns "OK" response Given new "GetUsageLogsByRetention" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -55,7 +55,7 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage attribution returns "Bad Request" response Given new "GetHourlyUsageAttribution" request And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" @@ -63,7 +63,7 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @team:DataDog/revenue-query + @team:DataDog/billing-hub Scenario: Get hourly usage attribution returns "OK" response Given new "GetHourlyUsageAttribution" request And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" @@ -71,7 +71,7 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for CI visibility returns "Bad Request" response Given new "GetUsageCIApp" request And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" @@ -79,7 +79,7 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for CI visibility returns "OK" response Given new "GetUsageCIApp" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -87,21 +87,21 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get hourly usage for CSM Pro returns "Bad Request" response Given new "GetUsageCloudSecurityPostureManagement" request And request contains "start_hr" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for CSM Pro returns "OK" response Given new "GetUsageCloudSecurityPostureManagement" request And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" When the request is sent Then the response status is 200 OK - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for Database Monitoring returns "OK" response Given new "GetUsageDBM" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -109,7 +109,7 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for Fargate returns "Bad Request" response Given new "GetUsageFargate" request And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" @@ -117,7 +117,7 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for Fargate returns "OK" response Given new "GetUsageFargate" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -125,7 +125,7 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for IoT returns "Bad Request" response Given new "GetUsageInternetOfThings" request And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" @@ -133,7 +133,7 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for IoT returns "OK" response Given new "GetUsageInternetOfThings" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -141,7 +141,7 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for Lambda returns "Bad Request" response Given new "GetUsageLambda" request And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" @@ -149,7 +149,7 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for Lambda returns "OK" response Given new "GetUsageLambda" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -157,7 +157,7 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @team:DataDog/revenue-query + @team:DataDog/billing-hub Scenario: Get hourly usage for Logs by Index returns "Bad Request" response Given new "GetUsageLogsByIndex" request And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" @@ -165,7 +165,7 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @team:DataDog/revenue-query + @team:DataDog/billing-hub Scenario: Get hourly usage for Logs by Index returns "OK" response Given new "GetUsageLogsByIndex" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -173,7 +173,7 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for Logs returns "Bad Request" response Given new "GetUsageLogs" request And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" @@ -181,7 +181,7 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for Logs returns "OK" response Given new "GetUsageLogs" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -189,7 +189,7 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for Network Flows returns "Bad Request" response Given new "GetUsageNetworkFlows" request And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" @@ -197,7 +197,7 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for Network Flows returns "OK" response Given new "GetUsageNetworkFlows" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -205,7 +205,7 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for Network Hosts returns "Bad Request" response Given new "GetUsageNetworkHosts" request And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" @@ -213,7 +213,7 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for Network Hosts returns "OK" response Given new "GetUsageNetworkHosts" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -221,7 +221,7 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for Online Archive returns "Bad Request" response Given new "GetUsageOnlineArchive" request And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" @@ -229,7 +229,7 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for Online Archive returns "OK" response Given new "GetUsageOnlineArchive" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -237,7 +237,7 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for RUM Sessions returns "Bad Request" response Given new "GetUsageRumSessions" request And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" @@ -245,7 +245,7 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for RUM Sessions returns "OK" response Given new "GetUsageRumSessions" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -253,7 +253,7 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for RUM Units returns "OK" response Given new "GetUsageRumUnits" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -261,35 +261,35 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get hourly usage for RUM sessions returns "Bad Request" response Given new "GetUsageRumSessions" request And request contains "start_hr" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get hourly usage for RUM sessions returns "OK" response Given new "GetUsageRumSessions" request And request contains "start_hr" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get hourly usage for RUM units returns "Bad Request" response Given new "GetUsageRumUnits" request And request contains "start_hr" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get hourly usage for RUM units returns "OK" response Given new "GetUsageRumUnits" request And request contains "start_hr" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for SNMP devices returns "Bad Request" response Given new "GetUsageSNMP" request And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" @@ -297,7 +297,7 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for SNMP devices returns "OK" response Given new "GetUsageSNMP" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -305,7 +305,7 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for Sensitive Data Scanner returns "OK" response Given new "GetUsageSDS" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -313,7 +313,7 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for Synthetics API Checks returns "Bad Request" response Given new "GetUsageSyntheticsAPI" request And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" @@ -321,7 +321,7 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for Synthetics API Checks returns "OK" response Given new "GetUsageSyntheticsAPI" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -329,7 +329,7 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for Synthetics Browser Checks returns "Bad Request" response Given new "GetUsageSyntheticsBrowser" request And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" @@ -337,7 +337,7 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for Synthetics Browser Checks returns "OK" response Given new "GetUsageSyntheticsBrowser" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -345,7 +345,7 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for analyzed logs returns "Bad Request" response Given new "GetUsageAnalyzedLogs" request And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" @@ -353,7 +353,7 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for analyzed logs returns "OK" response Given new "GetUsageAnalyzedLogs" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -361,14 +361,14 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get hourly usage for audit logs returns "Bad Request" response Given new "GetUsageAuditLogs" request And request contains "start_hr" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for audit logs returns "OK" response Given new "GetUsageAuditLogs" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -376,14 +376,14 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get hourly usage for cloud workload security returns "Bad Request" response Given new "GetUsageCWS" request And request contains "start_hr" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for cloud workload security returns "OK" response Given new "GetUsageCWS" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -391,7 +391,7 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for custom metrics returns "Bad Request" response Given new "GetUsageTimeseries" request And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" @@ -399,7 +399,7 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for custom metrics returns "OK" response Given new "GetUsageTimeseries" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -407,21 +407,21 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get hourly usage for database monitoring returns "Bad Request" response Given new "GetUsageDBM" request And request contains "start_hr" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get hourly usage for database monitoring returns "OK" response Given new "GetUsageDBM" request And request contains "start_hr" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for hosts and containers returns "Bad Request" response Given new "GetUsageHosts" request And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" @@ -429,7 +429,7 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for hosts and containers returns "OK" response Given new "GetUsageHosts" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -437,7 +437,7 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for incident management returns "Bad Request" response Given new "GetIncidentManagement" request And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" @@ -445,7 +445,7 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for incident management returns "OK" response Given new "GetIncidentManagement" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -453,7 +453,7 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for indexed spans returns "Bad Request" response Given new "GetUsageIndexedSpans" request And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" @@ -461,7 +461,7 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for indexed spans returns "OK" response Given new "GetUsageIndexedSpans" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -469,7 +469,7 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for ingested spans returns "Bad Request" response Given new "GetIngestedSpans" request And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" @@ -477,7 +477,7 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for ingested spans returns "OK" response Given new "GetIngestedSpans" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -485,63 +485,63 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get hourly usage for logs by index returns "Bad Request" response Given new "GetUsageLogsByIndex" request And request contains "start_hr" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get hourly usage for logs by index returns "OK" response Given new "GetUsageLogsByIndex" request And request contains "start_hr" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get hourly usage for logs returns "Bad Request" response Given new "GetUsageLogs" request And request contains "start_hr" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get hourly usage for logs returns "OK" response Given new "GetUsageLogs" request And request contains "start_hr" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get hourly usage for network hosts returns "Bad Request" response Given new "GetUsageNetworkHosts" request And request contains "start_hr" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get hourly usage for network hosts returns "OK" response Given new "GetUsageNetworkHosts" request And request contains "start_hr" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get hourly usage for online archive returns "Bad Request" response Given new "GetUsageOnlineArchive" request And request contains "start_hr" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get hourly usage for online archive returns "OK" response Given new "GetUsageOnlineArchive" request And request contains "start_hr" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for profiled hosts returns "Bad Request" response Given new "GetUsageProfiling" request And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" @@ -549,7 +549,7 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get hourly usage for profiled hosts returns "OK" response Given new "GetUsageProfiling" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -557,63 +557,63 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get hourly usage for sensitive data scanner returns "Bad Request" response Given new "GetUsageSDS" request And request contains "start_hr" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get hourly usage for sensitive data scanner returns "OK" response Given new "GetUsageSDS" request And request contains "start_hr" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get hourly usage for synthetics API checks returns "Bad Request" response Given new "GetUsageSyntheticsAPI" request And request contains "start_hr" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get hourly usage for synthetics API checks returns "OK" response Given new "GetUsageSyntheticsAPI" request And request contains "start_hr" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get hourly usage for synthetics browser checks returns "Bad Request" response Given new "GetUsageSyntheticsBrowser" request And request contains "start_hr" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get hourly usage for synthetics browser checks returns "OK" response Given new "GetUsageSyntheticsBrowser" request And request contains "start_hr" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get hourly usage for synthetics checks returns "Bad Request" response Given new "GetUsageSynthetics" request And request contains "start_hr" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get hourly usage for synthetics checks returns "OK" response Given new "GetUsageSynthetics" request And request contains "start_hr" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get mobile hourly usage for RUM Sessions returns "OK" response Given new "GetUsageRumSessions" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -622,7 +622,7 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get monthly usage attribution returns "Bad Request" response Given new "GetMonthlyUsageAttribution" request And request contains "start_month" parameter with value "{{ timeISO('now - 3d') }}" @@ -630,7 +630,7 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @team:DataDog/revenue-query + @team:DataDog/billing-hub Scenario: Get monthly usage attribution returns "OK" response Given new "GetMonthlyUsageAttribution" request And request contains "start_month" parameter with value "{{ timeISO('now - 3d') }}" @@ -638,68 +638,68 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get specified daily custom reports returns "Not Found" response Given new "GetSpecifiedDailyCustomReports" request And request contains "report_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found - @replay-only @team:DataDog/revenue-query + @replay-only @team:DataDog/billing-hub Scenario: Get specified daily custom reports returns "OK" response Given new "GetSpecifiedDailyCustomReports" request And request contains "report_id" parameter with value "2022-03-20" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get specified monthly custom reports returns "Bad Request" response Given new "GetSpecifiedMonthlyCustomReports" request And request contains "report_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get specified monthly custom reports returns "Not Found" response Given new "GetSpecifiedMonthlyCustomReports" request And request contains "report_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found - @replay-only @team:DataDog/revenue-query + @replay-only @team:DataDog/billing-hub Scenario: Get specified monthly custom reports returns "OK" response Given new "GetSpecifiedMonthlyCustomReports" request And request contains "report_id" parameter with value "2021-05-01" When the request is sent Then the response status is 200 OK - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get the list of available daily custom reports returns "OK" response Given new "GetDailyCustomReports" request When the request is sent Then the response status is 200 OK - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get the list of available monthly custom reports returns "OK" response Given new "GetMonthlyCustomReports" request When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get usage across your account returns "Bad Request" response Given new "GetUsageSummary" request And request contains "start_month" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get usage across your account returns "OK" response Given new "GetUsageSummary" request And request contains "start_month" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Paginate monthly usage attribution Given there is a valid "monthly_usage_attribution" response And new "GetMonthlyUsageAttribution" request @@ -709,14 +709,14 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: get hourly usage for network flows returns "Bad Request" response Given new "GetUsageNetworkFlows" request And request contains "start_hr" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: get hourly usage for network flows returns "OK" response Given new "GetUsageNetworkFlows" request And request contains "start_hr" parameter from "REPLACE.ME" diff --git a/src/test/resources/com/datadog/api/client/v2/api/aws_integration.feature b/src/test/resources/com/datadog/api/client/v2/api/aws_integration.feature index 5989319f4ee..dac51bb7449 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/aws_integration.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/aws_integration.feature @@ -292,3 +292,19 @@ Feature: AWS Integration And body with value {"data": {"attributes": {"account_tags": ["key:value"], "auth_config": {"role_name": "DatadogIntegrationRole"}, "aws_account_id": "123456789012", "aws_partition": "aws", "logs_config": {"lambda_forwarder": {"lambdas": ["arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder"], "log_source_config": {"tag_filters": [{"source": "s3", "tags": ["test:test"]}]}, "sources": ["s3"]}}, "metrics_config": {"automute_enabled": true, "collect_cloudwatch_alarms": true, "collect_custom_metrics": true, "enabled": true, "tag_filters": [{"namespace": "AWS/EC2", "tags": ["key:value"]}]}, "resources_config": {"cloud_security_posture_management_collection": false, "extended_collection": false}, "traces_config": {}}, "type": "account"}} When the request is sent Then the response status is 404 Not Found + + @generated @skip @team:DataDog/aws-integrations + Scenario: Validate AWS CCM config returns "AWS CCM Config validation result" response + Given operation "ValidateAWSCCMConfig" enabled + And new "ValidateAWSCCMConfig" request + And body with value {"data": {"attributes": {"account_id": "123456789012", "bucket_name": "billing", "bucket_region": "us-east-1", "report_name": "cost-and-usage-report", "report_prefix": "reports"}, "type": "ccm_config_validation"}} + When the request is sent + Then the response status is 200 AWS CCM Config validation result + + @generated @skip @team:DataDog/aws-integrations + Scenario: Validate AWS CCM config returns "Bad Request" response + Given operation "ValidateAWSCCMConfig" enabled + And new "ValidateAWSCCMConfig" request + And body with value {"data": {"attributes": {"account_id": "123456789012", "bucket_name": "billing", "bucket_region": "us-east-1", "report_name": "cost-and-usage-report", "report_prefix": "reports"}, "type": "ccm_config_validation"}} + When the request is sent + Then the response status is 400 Bad Request diff --git a/src/test/resources/com/datadog/api/client/v2/api/csm_ownership.feature b/src/test/resources/com/datadog/api/client/v2/api/csm_ownership.feature new file mode 100644 index 00000000000..58498ca1550 --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/csm_ownership.feature @@ -0,0 +1,165 @@ +@endpoint(csm-ownership) @endpoint(csm-ownership-v2) +Feature: CSM Ownership + Datadog Cloud Security Management (CSM) Ownership infers the most likely + owner for a cloud resource by combining ownership signals from across the + platform, and lets you review the inference, inspect its evidence, and + submit feedback to persist, override, or correct the inferred owner. For + more information, see [Cloud Security Management](https://docs.datadoghq.c + om/security/cloud_security_management). + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "CSMOwnership" API + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: Get an ownership inference by owner type returns "Bad Request" response + Given operation "GetOwnershipInference" enabled + And new "GetOwnershipInference" request + And request contains "resource_id" parameter from "REPLACE.ME" + And request contains "owner_type" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: Get an ownership inference by owner type returns "Not Found" response + Given operation "GetOwnershipInference" enabled + And new "GetOwnershipInference" request + And request contains "resource_id" parameter from "REPLACE.ME" + And request contains "owner_type" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: Get an ownership inference by owner type returns "OK" response + Given operation "GetOwnershipInference" enabled + And new "GetOwnershipInference" request + And request contains "resource_id" parameter from "REPLACE.ME" + And request contains "owner_type" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: Get the evidence for an ownership inference returns "Bad Request" response + Given operation "GetOwnershipEvidence" enabled + And new "GetOwnershipEvidence" request + And request contains "resource_id" parameter from "REPLACE.ME" + And request contains "owner_type" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: Get the evidence for an ownership inference returns "Not Found" response + Given operation "GetOwnershipEvidence" enabled + And new "GetOwnershipEvidence" request + And request contains "resource_id" parameter from "REPLACE.ME" + And request contains "owner_type" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: Get the evidence for an ownership inference returns "OK" response + Given operation "GetOwnershipEvidence" enabled + And new "GetOwnershipEvidence" request + And request contains "resource_id" parameter from "REPLACE.ME" + And request contains "owner_type" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: List ownership history by owner type returns "Bad Request" response + Given operation "ListOwnershipHistoryByOwnerType" enabled + And new "ListOwnershipHistoryByOwnerType" request + And request contains "resource_id" parameter from "REPLACE.ME" + And request contains "owner_type" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: List ownership history by owner type returns "OK" response + Given operation "ListOwnershipHistoryByOwnerType" enabled + And new "ListOwnershipHistoryByOwnerType" request + And request contains "resource_id" parameter from "REPLACE.ME" + And request contains "owner_type" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: List ownership inference history for a resource returns "Bad Request" response + Given operation "ListOwnershipHistory" enabled + And new "ListOwnershipHistory" request + And request contains "resource_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: List ownership inference history for a resource returns "OK" response + Given operation "ListOwnershipHistory" enabled + And new "ListOwnershipHistory" request + And request contains "resource_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: List ownership inferences for a resource returns "Bad Request" response + Given operation "ListOwnershipInferences" enabled + And new "ListOwnershipInferences" request + And request contains "resource_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: List ownership inferences for a resource returns "Not Found" response + Given operation "ListOwnershipInferences" enabled + And new "ListOwnershipInferences" request + And request contains "resource_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: List ownership inferences for a resource returns "OK" response + Given operation "ListOwnershipInferences" enabled + And new "ListOwnershipInferences" request + And request contains "resource_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: Submit feedback on an ownership inference returns "Bad Request" response + Given operation "CreateOwnershipFeedback" enabled + And new "CreateOwnershipFeedback" request + And request contains "resource_id" parameter from "REPLACE.ME" + And request contains "owner_type" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"action": "confirm", "actor_handle": "user@example.com", "actor_type": "user", "corrected_owner_handle": "team-b", "corrected_owner_type": "team", "inference_checksum": "abc123", "reason": "Confirmed by team lead."}, "type": "ownership_feedback"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: Submit feedback on an ownership inference returns "Conflict" response + Given operation "CreateOwnershipFeedback" enabled + And new "CreateOwnershipFeedback" request + And request contains "resource_id" parameter from "REPLACE.ME" + And request contains "owner_type" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"action": "confirm", "actor_handle": "user@example.com", "actor_type": "user", "corrected_owner_handle": "team-b", "corrected_owner_type": "team", "inference_checksum": "abc123", "reason": "Confirmed by team lead."}, "type": "ownership_feedback"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: Submit feedback on an ownership inference returns "Created" response + Given operation "CreateOwnershipFeedback" enabled + And new "CreateOwnershipFeedback" request + And request contains "resource_id" parameter from "REPLACE.ME" + And request contains "owner_type" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"action": "confirm", "actor_handle": "user@example.com", "actor_type": "user", "corrected_owner_handle": "team-b", "corrected_owner_type": "team", "inference_checksum": "abc123", "reason": "Confirmed by team lead."}, "type": "ownership_feedback"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: Submit feedback on an ownership inference returns "Not Found" response + Given operation "CreateOwnershipFeedback" enabled + And new "CreateOwnershipFeedback" request + And request contains "resource_id" parameter from "REPLACE.ME" + And request contains "owner_type" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"action": "confirm", "actor_handle": "user@example.com", "actor_type": "user", "corrected_owner_handle": "team-b", "corrected_owner_type": "team", "inference_checksum": "abc123", "reason": "Confirmed by team lead."}, "type": "ownership_feedback"}} + When the request is sent + Then the response status is 404 Not Found diff --git a/src/test/resources/com/datadog/api/client/v2/api/csm_settings.feature b/src/test/resources/com/datadog/api/client/v2/api/csm_settings.feature new file mode 100644 index 00000000000..c28ca491f30 --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/csm_settings.feature @@ -0,0 +1,85 @@ +@endpoint(csm-settings) @endpoint(csm-settings-v2) +Feature: CSM Settings + Datadog Cloud Security Management (CSM) Settings APIs allow you to list + and filter your cloud hosts monitored by CSM, covering both agentless and + agent-based discovery. For more information, see [Cloud Security Managemen + t](https://docs.datadoghq.com/security/cloud_security_management). + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "CSMSettings" API + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: Get agentless host facet info returns "Bad Request" response + Given operation "GetCSMAgentlessHostFacetInfo" enabled + And new "GetCSMAgentlessHostFacetInfo" request + And request contains "facet" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: Get agentless host facet info returns "OK" response + Given operation "GetCSMAgentlessHostFacetInfo" enabled + And new "GetCSMAgentlessHostFacetInfo" request + And request contains "facet" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: Get unified host facet info returns "Bad Request" response + Given operation "GetCSMUnifiedHostFacetInfo" enabled + And new "GetCSMUnifiedHostFacetInfo" request + And request contains "facet" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: Get unified host facet info returns "OK" response + Given operation "GetCSMUnifiedHostFacetInfo" enabled + And new "GetCSMUnifiedHostFacetInfo" request + And request contains "facet" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: List agentless host facets returns "OK" response + Given operation "ListCSMAgentlessHostFacets" enabled + And new "ListCSMAgentlessHostFacets" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: List agentless hosts returns "Bad Request" response + Given operation "ListCSMAgentlessHosts" enabled + And new "ListCSMAgentlessHosts" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: List agentless hosts returns "OK" response + Given operation "ListCSMAgentlessHosts" enabled + And new "ListCSMAgentlessHosts" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: List unified host facets returns "OK" response + Given operation "ListCSMUnifiedHostFacets" enabled + And new "ListCSMUnifiedHostFacets" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: List unified hosts returns "Bad Request" response + Given operation "ListCSMUnifiedHosts" enabled + And new "ListCSMUnifiedHosts" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-misconfigs + Scenario: List unified hosts returns "OK" response + Given operation "ListCSMUnifiedHosts" enabled + And new "ListCSMUnifiedHosts" request + When the request is sent + Then the response status is 200 OK diff --git a/src/test/resources/com/datadog/api/client/v2/api/customer_org.feature b/src/test/resources/com/datadog/api/client/v2/api/customer_org.feature new file mode 100644 index 00000000000..319625f6d0b --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/customer_org.feature @@ -0,0 +1,23 @@ +@endpoint(customer-org) @endpoint(customer-org-v2) +Feature: Customer Org + Programmatic management of a customer's Datadog organization. Use this API + to perform self-service organization lifecycle actions such as disabling + the authenticated org. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "CustomerOrg" API + And operation "DisableCustomerOrg" enabled + And new "DisableCustomerOrg" request + And body with value {"data": {"attributes": {"org_uuid": "abcdef01-2345-6789-abcd-ef0123456789"}, "id": "1", "type": "customer_org_disable"}} + + @generated @skip @team:DataDog/org-management + Scenario: Disable the authenticated customer organization returns "Bad Request" response + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/org-management + Scenario: Disable the authenticated customer organization returns "OK" response + When the request is sent + Then the response status is 200 OK diff --git a/src/test/resources/com/datadog/api/client/v2/api/dashboard_sharing.feature b/src/test/resources/com/datadog/api/client/v2/api/dashboard_sharing.feature new file mode 100644 index 00000000000..45257252d39 --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/dashboard_sharing.feature @@ -0,0 +1,22 @@ +@endpoint(dashboard-sharing) @endpoint(dashboard-sharing-v2) +Feature: Dashboard Sharing + Manage dashboard sharing configurations. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "DashboardSharing" API + And operation "ListSharedDashboardsByDashboardId" enabled + And new "ListSharedDashboardsByDashboardId" request + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: List shared dashboards for a dashboard returns "Dashboard Not Found" response + Given request contains "dashboard_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Dashboard Not Found + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: List shared dashboards for a dashboard returns "OK" response + Given request contains "dashboard_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK diff --git a/src/test/resources/com/datadog/api/client/v2/api/fixtures/stegadography/image.png b/src/test/resources/com/datadog/api/client/v2/api/fixtures/stegadography/image.png new file mode 100644 index 00000000000..94381b429d7 Binary files /dev/null and b/src/test/resources/com/datadog/api/client/v2/api/fixtures/stegadography/image.png differ diff --git a/src/test/resources/com/datadog/api/client/v2/api/fleet_automation.feature b/src/test/resources/com/datadog/api/client/v2/api/fleet_automation.feature index 3cc13c4aca3..3fede3c72f0 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/fleet_automation.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/fleet_automation.feature @@ -232,27 +232,6 @@ Feature: Fleet Automation When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/fleet-automation - Scenario: List all fleet clusters returns "Bad Request" response - Given operation "ListFleetClusters" enabled - And new "ListFleetClusters" request - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/fleet-automation - Scenario: List all fleet clusters returns "Not Found" response - Given operation "ListFleetClusters" enabled - And new "ListFleetClusters" request - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/fleet-automation - Scenario: List all fleet clusters returns "OK" response - Given operation "ListFleetClusters" enabled - And new "ListFleetClusters" request - When the request is sent - Then the response status is 200 OK - @generated @skip @team:DataDog/fleet-automation Scenario: List all fleet tracers returns "Bad Request" response Given operation "ListFleetTracers" enabled @@ -288,30 +267,6 @@ Feature: Fleet Automation When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/fleet-automation - Scenario: List instrumented pods for a cluster returns "Bad Request" response - Given operation "ListFleetInstrumentedPods" enabled - And new "ListFleetInstrumentedPods" request - And request contains "cluster_name" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/fleet-automation - Scenario: List instrumented pods for a cluster returns "Not Found" response - Given operation "ListFleetInstrumentedPods" enabled - And new "ListFleetInstrumentedPods" request - And request contains "cluster_name" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/fleet-automation - Scenario: List instrumented pods for a cluster returns "OK" response - Given operation "ListFleetInstrumentedPods" enabled - And new "ListFleetInstrumentedPods" request - And request contains "cluster_name" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - @generated @skip @team:DataDog/fleet-automation Scenario: List tracers for a specific agent returns "Bad Request" response Given operation "ListFleetAgentTracers" enabled diff --git a/src/test/resources/com/datadog/api/client/v2/api/forms.feature b/src/test/resources/com/datadog/api/client/v2/api/forms.feature new file mode 100644 index 00000000000..eb380d0f845 --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/forms.feature @@ -0,0 +1,246 @@ +@endpoint(forms) @endpoint(forms-v2) +Feature: Forms + The Datadog Forms API lets you create and manage forms within the App + Builder platform. You can configure form settings, manage versions, and + publish forms. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "Forms" API + + @generated @skip @team:DataDog/app-builder-backend + Scenario: Clone a form returns "Bad Request" response + Given operation "CloneForm" enabled + And new "CloneForm" request + And request contains "form_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "Copy of My Form"}, "type": "forms"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/app-builder-backend + Scenario: Clone a form returns "Not Found" response + Given operation "CloneForm" enabled + And new "CloneForm" request + And request contains "form_id" parameter with value "00000000-0000-0000-0000-000000000001" + And body with value {"data": {"attributes": {"name": "Copy of My Form"}, "type": "forms"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/app-builder-backend + Scenario: Clone a form returns "OK" response + Given operation "CloneForm" enabled + And new "CloneForm" request + And request contains "form_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"name": "Copy of My Form"}, "type": "forms"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/app-builder-backend + Scenario: Create a form returns "Bad Request" response + Given operation "CreateForm" enabled + And new "CreateForm" request + And body with value {"data": {"attributes": {"anonymous": false, "data_definition": {"description": "Welcome to the Engineering Experience Survey.", "required": [], "title": "Developer Experience Survey", "type": "object"}, "description": "A form to collect user feedback.", "idp_survey": false, "name": "User Feedback Form", "single_response": false, "ui_definition": {"ui:order": [], "ui:theme": {"primaryColor": "gray"}}}, "type": "forms"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/app-builder-backend + Scenario: Create a form returns "OK" response + Given operation "CreateForm" enabled + And new "CreateForm" request + And body with value {"data": {"attributes": {"anonymous": false, "data_definition": {}, "description": "A form to collect user feedback.", "idp_survey": false, "name": "User Feedback Form", "single_response": false, "ui_definition": {}}, "type": "forms"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/app-builder-backend + Scenario: Create and publish a form returns "Bad Request" response + Given operation "CreateAndPublishForm" enabled + And new "CreateAndPublishForm" request + And body with value {"data": {"attributes": {"anonymous": false, "data_definition": {"description": "Welcome to the Engineering Experience Survey.", "required": [], "title": "Developer Experience Survey", "type": "object"}, "description": "A form to collect user feedback.", "idp_survey": false, "name": "User Feedback Form", "single_response": false, "ui_definition": {"ui:order": [], "ui:theme": {"primaryColor": "gray"}}}, "type": "forms"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/app-builder-backend + Scenario: Create and publish a form returns "OK" response + Given operation "CreateAndPublishForm" enabled + And new "CreateAndPublishForm" request + And body with value {"data": {"attributes": {"anonymous": false, "data_definition": {}, "description": "A form to collect user feedback.", "idp_survey": false, "name": "User Feedback Form", "single_response": false, "ui_definition": {}}, "type": "forms"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/app-builder-backend + Scenario: Create or update a form version returns "Bad Request" response + Given operation "UpsertFormVersion" enabled + And new "UpsertFormVersion" request + And request contains "form_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"data_definition": {"description": "Welcome to the Engineering Experience Survey.", "required": [], "title": "Developer Experience Survey", "type": "object"}, "state": "frozen", "ui_definition": {"ui:order": [], "ui:theme": {"primaryColor": "gray"}}, "upsert_params": {"etag": "b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d", "insert_only": false, "match_policy": "none"}}, "type": "form_versions"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/app-builder-backend + Scenario: Create or update a form version returns "Not Found" response + Given operation "UpsertFormVersion" enabled + And new "UpsertFormVersion" request + And request contains "form_id" parameter with value "00000000-0000-0000-0000-000000000001" + And body with value {"data": {"attributes": {"data_definition": {"description": "Welcome to the Engineering Experience Survey.", "required": [], "title": "Developer Experience Survey", "type": "object"}, "state": "frozen", "ui_definition": {"ui:order": [], "ui:theme": {"primaryColor": "gray"}}, "upsert_params": {"etag": "b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d", "insert_only": false, "match_policy": "none"}}, "type": "form_versions"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/app-builder-backend + Scenario: Create or update a form version returns "OK" response + Given operation "UpsertFormVersion" enabled + And there is a valid "form" in the system + And new "UpsertFormVersion" request + And request contains "form_id" parameter from "form.data.id" + And body with value {"data": {"attributes": {"data_definition": {"description": "Welcome to the Engineering Experience Survey.", "required": [], "title": "Developer Experience Survey", "type": "object"}, "state": "frozen", "ui_definition": {"ui:order": [], "ui:theme": {"primaryColor": "gray"}}, "upsert_params": {"etag": "b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d", "insert_only": false, "match_policy": "none"}}, "type": "form_versions"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/app-builder-backend + Scenario: Delete a form returns "Bad Request" response + Given operation "DeleteForm" enabled + And new "DeleteForm" request + And request contains "form_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/app-builder-backend + Scenario: Delete a form returns "OK" response + Given operation "DeleteForm" enabled + And there is a valid "form" in the system + And new "DeleteForm" request + And request contains "form_id" parameter from "form.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.id" has the same value as "form.data.id" + And the response "data.type" is equal to "forms" + + @generated @skip @team:DataDog/app-builder-backend + Scenario: Get a form returns "Bad Request" response + Given operation "GetForm" enabled + And new "GetForm" request + And request contains "form_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/app-builder-backend + Scenario: Get a form returns "Not Found" response + Given operation "GetForm" enabled + And new "GetForm" request + And request contains "form_id" parameter with value "00000000-0000-0000-0000-000000000001" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/app-builder-backend + Scenario: Get a form returns "OK" response + Given operation "GetForm" enabled + And there is a valid "form" in the system + And new "GetForm" request + And request contains "form_id" parameter from "form.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.id" has the same value as "form.data.id" + And the response "data.type" is equal to "forms" + And the response "data.attributes.name" is equal to "{{ unique }}" + + @generated @skip @team:DataDog/app-builder-backend + Scenario: List forms returns "Bad Request" response + Given operation "ListForms" enabled + And new "ListForms" request + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/app-builder-backend + Scenario: List forms returns "OK" response + Given operation "ListForms" enabled + And there is a valid "form" in the system + And new "ListForms" request + When the request is sent + Then the response status is 200 OK + And the response "data" has item with field "id" with value "{{ form.data.id }}" + And the response "data" has item with field "type" with value "forms" + And the response "data" has item with field "attributes.name" with value "{{ unique }}" + + @generated @skip @team:DataDog/app-builder-backend + Scenario: Publish a form version returns "Bad Request" response + Given operation "PublishForm" enabled + And new "PublishForm" request + And request contains "form_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"version": 1}, "type": "form_publications"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/app-builder-backend + Scenario: Publish a form version returns "Not Found" response + Given operation "PublishForm" enabled + And new "PublishForm" request + And request contains "form_id" parameter with value "00000000-0000-0000-0000-000000000001" + And body with value {"data": {"attributes": {"version": 1}, "type": "form_publications"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/app-builder-backend + Scenario: Publish a form version returns "OK" response + Given operation "PublishForm" enabled + And there is a valid "form" in the system + And new "PublishForm" request + And request contains "form_id" parameter from "form.data.id" + And body with value {"data": {"attributes": {"version": 1}, "type": "form_publications"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/app-builder-backend + Scenario: Update a form returns "Bad Request" response + Given operation "UpdateForm" enabled + And new "UpdateForm" request + And request contains "form_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"form_update": {"datastore_config": {"datastore_id": "5108ea24-dd83-4696-9caa-f069f73d0fad", "primary_column_name": "id", "primary_key_generation_strategy": "none"}, "description": "An updated description.", "name": "Updated Form Name"}}, "id": "22f6006a-2302-4926-9396-d2dfcf7b0b34", "type": "forms"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/app-builder-backend + Scenario: Update a form returns "Not Found" response + Given operation "UpdateForm" enabled + And new "UpdateForm" request + And request contains "form_id" parameter with value "00000000-0000-0000-0000-000000000001" + And body with value {"data": {"attributes": {"form_update": {"datastore_config": {"datastore_id": "5108ea24-dd83-4696-9caa-f069f73d0fad", "primary_column_name": "id", "primary_key_generation_strategy": "none"}, "description": "An updated description.", "name": "Updated Form Name"}}, "id": "22f6006a-2302-4926-9396-d2dfcf7b0b34", "type": "forms"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/app-builder-backend + Scenario: Update a form returns "OK" response + Given operation "UpdateForm" enabled + And there is a valid "form" in the system + And new "UpdateForm" request + And request contains "form_id" parameter from "form.data.id" + And body with value {"data": {"attributes": {"form_update": {"datastore_config": {"datastore_id": "5108ea24-dd83-4696-9caa-f069f73d0fad", "primary_column_name": "id", "primary_key_generation_strategy": "none"}, "description": "An updated description.", "name": "Updated Form Name"}}, "id": "22f6006a-2302-4926-9396-d2dfcf7b0b34", "type": "forms"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/app-builder-backend + Scenario: Upsert and publish a form version returns "Bad Request" response + Given operation "UpsertAndPublishFormVersion" enabled + And new "UpsertAndPublishFormVersion" request + And request contains "form_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"data_definition": {"description": "Welcome to the Engineering Experience Survey.", "required": [], "title": "Developer Experience Survey", "type": "object"}, "ui_definition": {"ui:order": [], "ui:theme": {"primaryColor": "gray"}}, "upsert_params": {"etag": "b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d"}}, "type": "form_versions"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/app-builder-backend + Scenario: Upsert and publish a form version returns "Not Found" response + Given operation "UpsertAndPublishFormVersion" enabled + And new "UpsertAndPublishFormVersion" request + And request contains "form_id" parameter with value "00000000-0000-0000-0000-000000000001" + And body with value {"data": {"attributes": {"data_definition": {"description": "Welcome to the Engineering Experience Survey.", "required": [], "title": "Developer Experience Survey", "type": "object"}, "ui_definition": {"ui:order": [], "ui:theme": {"primaryColor": "gray"}}, "upsert_params": {"etag": "b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d"}}, "type": "form_versions"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/app-builder-backend + Scenario: Upsert and publish a form version returns "OK" response + Given operation "UpsertAndPublishFormVersion" enabled + And there is a valid "form" in the system + And new "UpsertAndPublishFormVersion" request + And request contains "form_id" parameter from "form.data.id" + And body with value {"data": {"attributes": {"data_definition": {"description": "Welcome to the Engineering Experience Survey.", "required": [], "title": "Developer Experience Survey", "type": "object"}, "ui_definition": {"ui:order": [], "ui:theme": {"primaryColor": "gray"}}, "upsert_params": {"etag": "b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d"}}, "type": "form_versions"}} + When the request is sent + Then the response status is 200 OK 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 097f6a07d55..f5ce3365dab 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 @@ -498,6 +498,30 @@ "tag": "Feature Flags", "operationId": "UpdateAllocationsForFeatureFlagInEnvironment" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"forms\",\n \"attributes\": {\n \"name\": \"{{ unique }}\",\n \"description\": \"A simple test form.\",\n \"anonymous\": false,\n \"single_response\": false,\n \"idp_survey\": false,\n \"data_definition\": {},\n \"ui_definition\": {}\n }\n }\n}" + } + ], + "step": "there is a valid \"form\" in the system", + "key": "form", + "tag": "Forms", + "operationId": "CreateForm" + }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"forms\",\n \"attributes\": {\n \"name\": \"{{ unique }}\",\n \"description\": \"A simple test form.\",\n \"anonymous\": false,\n \"single_response\": false,\n \"idp_survey\": false,\n \"data_definition\": {},\n \"ui_definition\": {}\n }\n }\n}" + } + ], + "step": "there is a valid \"form_published\" in the system", + "key": "form_published", + "tag": "Forms", + "operationId": "CreateAndPublishForm" + }, { "parameters": [ { @@ -650,6 +674,22 @@ "tag": "Google Chat Integration", "operationId": "CreateOrganizationHandle" }, + { + "parameters": [ + { + "name": "organization_binding_id", + "value": "\"e54cb570-c674-529c-769d-84b312288ed7\"" + }, + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"google-chat-target-audience\",\n \"attributes\": {\n \"audience_name\": \"{{ unique }}\",\n \"audience_id\": \"{{ unique }}\"\n }\n }\n}" + } + ], + "step": "there is a valid \"google_chat_target_audience\" in the system", + "key": "google_chat_target_audience", + "tag": "Google Chat Integration", + "operationId": "CreateGoogleChatTargetAudience" + }, { "parameters": [ { @@ -902,6 +942,34 @@ "tag": "Logs Restriction Queries", "operationId": "CreateRestrictionQuery" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"tag_indexing_rules\",\n \"attributes\": {\n \"name\": \"{{ unique_alnum }}\",\n \"metric_name_matches\": [\"dd.{{ unique_alnum }}.*\"],\n \"tags\": [\"env\", \"service\"]\n }\n }\n}" + } + ], + "step": "there is a valid \"tag_indexing_rule\" in the system", + "key": "tag_indexing_rule", + "tag": "Metrics", + "operationId": "CreateTagIndexingRule" + }, + { + "parameters": [ + { + "name": "metric_name", + "value": "\"{{ unique_metric_name }}\"" + }, + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"tag_indexing_rule_exemptions\",\n \"attributes\": {\n \"reason\": \"BDD test exemption\"\n }\n }\n}" + } + ], + "step": "there is a valid \"tag_indexing_rule_exemption\" in the system", + "key": "tag_indexing_rule_exemption", + "tag": "Metrics", + "operationId": "CreateTagIndexingRuleExemption" + }, { "parameters": [ { @@ -1354,6 +1422,22 @@ "tag": "Security Monitoring", "operationId": "CreateSecurityMonitoringRule" }, + { + "parameters": [ + { + "name": "rule_id", + "source": "security_rule.id" + }, + { + "name": "body", + "value": "{\n \"name\": \"{{ unique }}-updated\",\n \"queries\": [{\n \"query\": \"@test:true\",\n \"aggregation\": \"count\",\n \"groupByFields\": [],\n \"distinctFields\": [],\n \"metrics\": []\n }],\n \"filters\": [],\n \"cases\": [{\n \"name\": \"\",\n \"status\": \"info\",\n \"condition\": \"a > 0\",\n \"notifications\": []\n }],\n \"options\": {\n \"evaluationWindow\": 900,\n \"keepAlive\": 3600,\n \"maxSignalDuration\": 86400\n },\n \"message\": \"Test rule updated\",\n \"tags\": [],\n \"isEnabled\": true\n}" + } + ], + "step": "there is a valid \"security_rule_updated\" in the system", + "key": "security_rule_updated", + "tag": "Security Monitoring", + "operationId": "UpdateSecurityMonitoringRule" + }, { "step": "a valid \"configuration\" in the system", "key": "configuration", @@ -1428,18 +1512,6 @@ "tag": "Service Accounts", "operationId": "CreateServiceAccountApplicationKey" }, - { - "parameters": [ - { - "name": "body", - "value": "{\n \"data\": {\n \"attributes\": {\n \"name\": \"{{ unique }}\"\n },\n \"type\": \"services\"\n }\n}" - } - ], - "step": "there is a valid \"service\" in the system", - "key": "service", - "tag": "Incident Services", - "operationId": "CreateIncidentService" - }, { "parameters": [ { diff --git a/src/test/resources/com/datadog/api/client/v2/api/google_chat_integration.feature b/src/test/resources/com/datadog/api/client/v2/api/google_chat_integration.feature index f722a7ea208..65c1f264a6b 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/google_chat_integration.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/google_chat_integration.feature @@ -9,6 +9,38 @@ Feature: Google Chat Integration And a valid "appKeyAuth" key in the system And an instance of "GoogleChatIntegration" API + @generated @skip @team:DataDog/chat-integrations + Scenario: Create a target audience returns "Bad Request" response + Given new "CreateGoogleChatTargetAudience" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"audience_id": "fake-audience-id-1", "audience_name": "fake audience name 1"}, "type": "google-chat-target-audience"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/chat-integrations + Scenario: Create a target audience returns "CREATED" response + Given new "CreateGoogleChatTargetAudience" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"audience_id": "fake-audience-id-1", "audience_name": "fake audience name 1"}, "type": "google-chat-target-audience"}} + When the request is sent + Then the response status is 201 CREATED + + @generated @skip @team:DataDog/chat-integrations + Scenario: Create a target audience returns "Conflict" response + Given new "CreateGoogleChatTargetAudience" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"audience_id": "fake-audience-id-1", "audience_name": "fake audience name 1"}, "type": "google-chat-target-audience"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:DataDog/chat-integrations + Scenario: Create a target audience returns "Not Found" response + Given new "CreateGoogleChatTargetAudience" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"audience_id": "fake-audience-id-1", "audience_name": "fake audience name 1"}, "type": "google-chat-target-audience"}} + When the request is sent + Then the response status is 404 Not Found + @generated @skip @team:DataDog/chat-integrations Scenario: Create organization handle returns "Bad Request" response Given new "CreateOrganizationHandle" request @@ -42,6 +74,36 @@ Feature: Google Chat Integration When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/chat-integrations + Scenario: Delete a Google Chat organization binding returns "Bad Request" response + Given new "DeleteGoogleChatOrganization" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/chat-integrations + Scenario: Delete a Google Chat organization binding returns "OK" response + Given new "DeleteGoogleChatOrganization" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 OK + + @generated @skip @team:DataDog/chat-integrations + Scenario: Delete a target audience returns "Not Found" response + Given new "DeleteGoogleChatTargetAudience" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And request contains "target_audience_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/chat-integrations + Scenario: Delete a target audience returns "OK" response + Given new "DeleteGoogleChatTargetAudience" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And request contains "target_audience_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 OK + @generated @skip @team:DataDog/chat-integrations Scenario: Delete organization handle returns "Bad Request" response Given new "DeleteOrganizationHandle" request @@ -59,6 +121,56 @@ Feature: Google Chat Integration When the request is sent Then the response status is 204 OK + @generated @skip @team:DataDog/chat-integrations + Scenario: Delete the delegated user returns "Not Found" response + Given new "DeleteGoogleChatDelegatedUser" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/chat-integrations + Scenario: Delete the delegated user returns "OK" response + Given new "DeleteGoogleChatDelegatedUser" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 OK + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get a Google Chat organization binding returns "Not Found" response + Given new "GetGoogleChatOrganization" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get a Google Chat organization binding returns "OK" response + Given new "GetGoogleChatOrganization" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get a target audience returns "Not Found" response + Given new "GetGoogleChatTargetAudience" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And request contains "target_audience_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get a target audience returns "OK" response + Given new "GetGoogleChatTargetAudience" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And request contains "target_audience_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get all Google Chat organization bindings returns "OK" response + Given new "ListGoogleChatOrganizations" request + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/chat-integrations Scenario: Get all organization handles returns "Bad Request" response Given new "ListOrganizationHandles" request @@ -82,6 +194,20 @@ Feature: Google Chat Integration Then the response status is 200 OK And the response "data[0].type" is equal to "google-chat-organization-handle" + @generated @skip @team:DataDog/chat-integrations + Scenario: Get all target audiences returns "Not Found" response + Given new "ListGoogleChatTargetAudiences" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get all target audiences returns "OK" response + Given new "ListGoogleChatTargetAudiences" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/chat-integrations Scenario: Get organization handle returns "Bad Request" response Given new "GetOrganizationHandle" request @@ -136,6 +262,47 @@ Feature: Google Chat Integration And the response "data.attributes.resource_name" is equal to "spaces/AAQA-zFIks8" And the response "data.attributes.organization_binding_id" is equal to "e54cb570-c674-529c-769d-84b312288ed7" + @generated @skip @team:DataDog/chat-integrations + Scenario: Get the delegated user returns "Not Found" response + Given new "GetGoogleChatDelegatedUser" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/chat-integrations + Scenario: Get the delegated user returns "OK" response + Given new "GetGoogleChatDelegatedUser" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/chat-integrations + Scenario: Update a target audience returns "Bad Request" response + Given new "UpdateGoogleChatTargetAudience" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And request contains "target_audience_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"audience_id": "fake-audience-id-1", "audience_name": "fake audience name 1"}, "type": "google-chat-target-audience"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/chat-integrations + Scenario: Update a target audience returns "Not Found" response + Given new "UpdateGoogleChatTargetAudience" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And request contains "target_audience_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"audience_id": "fake-audience-id-1", "audience_name": "fake audience name 1"}, "type": "google-chat-target-audience"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/chat-integrations + Scenario: Update a target audience returns "OK" response + Given new "UpdateGoogleChatTargetAudience" request + And request contains "organization_binding_id" parameter from "REPLACE.ME" + And request contains "target_audience_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"audience_id": "fake-audience-id-1", "audience_name": "fake audience name 1"}, "type": "google-chat-target-audience"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/chat-integrations Scenario: Update organization handle returns "Bad Request" response Given new "UpdateOrganizationHandle" request diff --git a/src/test/resources/com/datadog/api/client/v2/api/incident_services.feature b/src/test/resources/com/datadog/api/client/v2/api/incident_services.feature deleted file mode 100644 index eb5e5716d42..00000000000 --- a/src/test/resources/com/datadog/api/client/v2/api/incident_services.feature +++ /dev/null @@ -1,146 +0,0 @@ -@endpoint(incident-services) @endpoint(incident-services-v2) -Feature: Incident Services - Create, update, delete, and retrieve services which can be associated with - incidents. See the [Incident Management - page](https://docs.datadoghq.com/service_management/incident_management/) - for more information. - - Background: - Given a valid "apiKeyAuth" key in the system - And a valid "appKeyAuth" key in the system - And an instance of "IncidentServices" API - - @generated @skip @team:Datadog/incident-app - Scenario: Create a new incident service returns "Bad Request" response - Given operation "CreateIncidentService" enabled - And new "CreateIncidentService" request - And body with value {"data": {"attributes": {"name": "an example service name"}, "type": "services"}} - When the request is sent - Then the response status is 400 Bad Request - - @team:Datadog/incident-app - Scenario: Create a new incident service returns "CREATED" response - Given operation "CreateIncidentService" enabled - And new "CreateIncidentService" request - And body with value {"data": {"type": "services", "attributes": {"name": "{{ unique }}"}}} - When the request is sent - Then the response status is 201 CREATED - And the response "data.attributes.name" is equal to "{{ unique }}" - And the response "data.type" is equal to "services" - - @generated @skip @team:Datadog/incident-app - Scenario: Create a new incident service returns "Not Found" response - Given operation "CreateIncidentService" enabled - And new "CreateIncidentService" request - And body with value {"data": {"attributes": {"name": "an example service name"}, "type": "services"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:Datadog/incident-app - Scenario: Delete an existing incident service returns "Bad Request" response - Given operation "DeleteIncidentService" enabled - And new "DeleteIncidentService" request - And request contains "service_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:Datadog/incident-app - Scenario: Delete an existing incident service returns "Not Found" response - Given operation "DeleteIncidentService" enabled - And new "DeleteIncidentService" request - And request contains "service_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @team:Datadog/incident-app - Scenario: Delete an existing incident service returns "OK" response - Given there is a valid "service" in the system - And operation "DeleteIncidentService" enabled - And new "DeleteIncidentService" request - And request contains "service_id" parameter from "service.data.id" - When the request is sent - Then the response status is 204 OK - - @generated @skip @team:Datadog/incident-app - Scenario: Get a list of all incident services returns "Bad Request" response - Given operation "ListIncidentServices" enabled - And new "ListIncidentServices" request - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:Datadog/incident-app - Scenario: Get a list of all incident services returns "Not Found" response - Given operation "ListIncidentServices" enabled - And new "ListIncidentServices" request - When the request is sent - Then the response status is 404 Not Found - - @team:Datadog/incident-app - Scenario: Get a list of all incident services returns "OK" response - Given there is a valid "service" in the system - And operation "ListIncidentServices" enabled - And new "ListIncidentServices" request - And request contains "filter" parameter from "service.data.attributes.name" - When the request is sent - Then the response status is 200 OK - And the response "data" has length 1 - And the response "data[0].attributes.name" has the same value as "service.data.attributes.name" - - @generated @skip @team:Datadog/incident-app - Scenario: Get details of an incident service returns "Bad Request" response - Given operation "GetIncidentService" enabled - And new "GetIncidentService" request - And request contains "service_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:Datadog/incident-app - Scenario: Get details of an incident service returns "Not Found" response - Given operation "GetIncidentService" enabled - And new "GetIncidentService" request - And request contains "service_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @team:Datadog/incident-app - Scenario: Get details of an incident service returns "OK" response - Given there is a valid "service" in the system - And operation "GetIncidentService" enabled - And new "GetIncidentService" request - And request contains "service_id" parameter from "service.data.id" - When the request is sent - Then the response status is 200 OK - And the response "data.id" is equal to "{{service.data.id}}" - And the response "data.type" is equal to "services" - And the response "data.attributes.name" has the same value as "service.data.attributes.name" - - @generated @skip @team:Datadog/incident-app - Scenario: Update an existing incident service returns "Bad Request" response - Given operation "UpdateIncidentService" enabled - And new "UpdateIncidentService" request - And request contains "service_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"name": "an example service name"}, "id": "00000000-0000-0000-0000-000000000000", "type": "services"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:Datadog/incident-app - Scenario: Update an existing incident service returns "Not Found" response - Given operation "UpdateIncidentService" enabled - And new "UpdateIncidentService" request - And request contains "service_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"name": "an example service name"}, "id": "00000000-0000-0000-0000-000000000000", "type": "services"}} - When the request is sent - Then the response status is 404 Not Found - - @team:Datadog/incident-app - Scenario: Update an existing incident service returns "OK" response - Given there is a valid "service" in the system - And operation "UpdateIncidentService" enabled - And new "UpdateIncidentService" request - And request contains "service_id" parameter from "service.data.id" - And body with value {"data": {"type": "services", "attributes": {"name": "{{ service.data.attributes.name }}-updated"}}} - When the request is sent - Then the response status is 200 OK - And the response "data.id" is equal to "{{service.data.id}}" - And the response "data.type" is equal to "services" - And the response "data.attributes.name" is equal to "{{ service.data.attributes.name }}-updated" diff --git a/src/test/resources/com/datadog/api/client/v2/api/llm_observability.feature b/src/test/resources/com/datadog/api/client/v2/api/llm_observability.feature index ea384fa8ed4..35e9592fa0a 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/llm_observability.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/llm_observability.feature @@ -235,7 +235,7 @@ Feature: LLM Observability Scenario: Create an LLM Observability experiment returns "Bad Request" response Given operation "CreateLLMObsExperiment" enabled And new "CreateLLMObsExperiment" request - And body with value {"data": {"attributes": {"dataset_id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d", "name": "My Experiment v1", "project_id": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751"}, "type": "experiments"}} + And body with value {"data": {"attributes": {"dataset_id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d", "name": "My Experiment v1", "parent_experiment_id": "3fd6b5e0-8910-4b1c-a7d0-5b84de329012", "project_id": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751"}, "type": "experiments"}} When the request is sent Then the response status is 400 Bad Request @@ -243,7 +243,7 @@ Feature: LLM Observability Scenario: Create an LLM Observability experiment returns "Created" response Given operation "CreateLLMObsExperiment" enabled And new "CreateLLMObsExperiment" request - And body with value {"data": {"attributes": {"dataset_id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d", "name": "My Experiment v1", "project_id": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751"}, "type": "experiments"}} + And body with value {"data": {"attributes": {"dataset_id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d", "name": "My Experiment v1", "parent_experiment_id": "3fd6b5e0-8910-4b1c-a7d0-5b84de329012", "project_id": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751"}, "type": "experiments"}} When the request is sent Then the response status is 201 Created @@ -251,7 +251,7 @@ Feature: LLM Observability Scenario: Create an LLM Observability experiment returns "OK" response Given operation "CreateLLMObsExperiment" enabled And new "CreateLLMObsExperiment" request - And body with value {"data": {"attributes": {"dataset_id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d", "name": "My Experiment v1", "project_id": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751"}, "type": "experiments"}} + And body with value {"data": {"attributes": {"dataset_id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d", "name": "My Experiment v1", "parent_experiment_id": "3fd6b5e0-8910-4b1c-a7d0-5b84de329012", "project_id": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751"}, "type": "experiments"}} When the request is sent Then the response status is 200 OK @@ -315,6 +315,57 @@ Feature: LLM Observability When the request is sent Then the response status is 422 Unprocessable Entity + @generated @skip @team:DataDog/ml-observability + Scenario: Create or update a patterns configuration returns "Bad Request" response + Given operation "UpsertLLMObsPatternsConfig" enabled + And new "UpsertLLMObsPatternsConfig" request + And body with value {"data": {"attributes": {"account_id": "1000000001", "config_id": "a7c8d9e0-1234-5678-9abc-def012345678", "evp_query": "@ml_app:support-bot", "hierarchy_depth": 2, "integration_provider": "openai", "model_name": "gpt-4o", "name": "Support chatbot topics", "num_records": 1000, "sampling_ratio": 0.1, "scope": "", "template": ""}, "type": "topic_discovery_configs"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Create or update a patterns configuration returns "Not Found" response + Given operation "UpsertLLMObsPatternsConfig" enabled + And new "UpsertLLMObsPatternsConfig" request + And body with value {"data": {"attributes": {"account_id": "1000000001", "config_id": "a7c8d9e0-1234-5678-9abc-def012345678", "evp_query": "@ml_app:support-bot", "hierarchy_depth": 2, "integration_provider": "openai", "model_name": "gpt-4o", "name": "Support chatbot topics", "num_records": 1000, "sampling_ratio": 0.1, "scope": "", "template": ""}, "type": "topic_discovery_configs"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: Create or update a patterns configuration returns "OK" response + Given operation "UpsertLLMObsPatternsConfig" enabled + And new "UpsertLLMObsPatternsConfig" request + And body with value {"data": {"attributes": {"account_id": "1000000001", "config_id": "a7c8d9e0-1234-5678-9abc-def012345678", "evp_query": "@ml_app:support-bot", "hierarchy_depth": 2, "integration_provider": "openai", "model_name": "gpt-4o", "name": "Support chatbot topics", "num_records": 1000, "sampling_ratio": 0.1, "scope": "", "template": ""}, "type": "topic_discovery_configs"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ml-observability + Scenario: Create or update annotations returns "Bad Request" response + Given operation "UpsertLLMObsAnnotations" enabled + And new "UpsertLLMObsAnnotations" request + And request contains "queue_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"annotations": [{"interaction_id": "00000000-0000-0000-0000-000000000001", "label_values": [{"label_schema_id": "abc-123", "value": "good"}, {"label_schema_id": "ef56gh78", "value": "positive"}]}]}, "type": "annotations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Create or update annotations returns "Not Found — the queue does not exist." response + Given operation "UpsertLLMObsAnnotations" enabled + And new "UpsertLLMObsAnnotations" request + And request contains "queue_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"annotations": [{"interaction_id": "00000000-0000-0000-0000-000000000001", "label_values": [{"label_schema_id": "abc-123", "value": "good"}, {"label_schema_id": "ef56gh78", "value": "positive"}]}]}, "type": "annotations"}} + When the request is sent + Then the response status is 404 Not Found — the queue does not exist. + + @generated @skip @team:DataDog/ml-observability + Scenario: Create or update annotations returns "OK — annotations created or updated. Per-item errors are listed in `errors`." response + Given operation "UpsertLLMObsAnnotations" enabled + And new "UpsertLLMObsAnnotations" request + And request contains "queue_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"annotations": [{"interaction_id": "00000000-0000-0000-0000-000000000001", "label_values": [{"label_schema_id": "abc-123", "value": "good"}, {"label_schema_id": "ef56gh78", "value": "positive"}]}]}, "type": "annotations"}} + When the request is sent + Then the response status is 200 OK — annotations created or updated. Per-item errors are listed in `errors`. + @generated @skip @team:DataDog/ml-observability Scenario: Delete LLM Observability data returns "Accepted" response Given operation "DeleteLLMObsData" enabled @@ -444,6 +495,30 @@ Feature: LLM Observability When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/ml-observability + Scenario: Delete a patterns configuration returns "Bad Request" response + Given operation "DeleteLLMObsPatternsConfig" enabled + And new "DeleteLLMObsPatternsConfig" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Delete a patterns configuration returns "No Content" response + Given operation "DeleteLLMObsPatternsConfig" enabled + And new "DeleteLLMObsPatternsConfig" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/ml-observability + Scenario: Delete a patterns configuration returns "Not Found" response + Given operation "DeleteLLMObsPatternsConfig" enabled + And new "DeleteLLMObsPatternsConfig" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + @generated @skip @team:DataDog/ml-observability Scenario: Delete an LLM Observability annotation queue returns "No Content" response Given operation "DeleteLLMObsAnnotationQueue" enabled @@ -487,6 +562,33 @@ Feature: LLM Observability When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/ml-observability + Scenario: Delete annotations returns "Bad Request" response + Given operation "DeleteLLMObsAnnotations" enabled + And new "DeleteLLMObsAnnotations" request + And request contains "queue_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"annotation_ids": ["00000000-0000-0000-0000-000000000000", "00000000-0000-0000-0000-000000000001"]}, "type": "annotations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Delete annotations returns "Not Found — the queue does not exist." response + Given operation "DeleteLLMObsAnnotations" enabled + And new "DeleteLLMObsAnnotations" request + And request contains "queue_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"annotation_ids": ["00000000-0000-0000-0000-000000000000", "00000000-0000-0000-0000-000000000001"]}, "type": "annotations"}} + When the request is sent + Then the response status is 404 Not Found — the queue does not exist. + + @generated @skip @team:DataDog/ml-observability + Scenario: Delete annotations returns "OK — annotations deleted. Errors for annotations that could not be deleted are listed in `errors`." response + Given operation "DeleteLLMObsAnnotations" enabled + And new "DeleteLLMObsAnnotations" request + And request contains "queue_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"annotation_ids": ["00000000-0000-0000-0000-000000000000", "00000000-0000-0000-0000-000000000001"]}, "type": "annotations"}} + When the request is sent + Then the response status is 200 OK — annotations deleted. Errors for annotations that could not be deleted are listed in `errors`. + @generated @skip @team:DataDog/ml-observability Scenario: Export an LLM Observability dataset returns "Bad Request" response Given operation "ExportLLMObsDataset" enabled @@ -565,6 +667,27 @@ Feature: LLM Observability When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability + Scenario: Get a patterns configuration returns "Bad Request" response + Given operation "GetLLMObsPatternsConfig" enabled + And new "GetLLMObsPatternsConfig" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Get a patterns configuration returns "Not Found" response + Given operation "GetLLMObsPatternsConfig" enabled + And new "GetLLMObsPatternsConfig" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: Get a patterns configuration returns "OK" response + Given operation "GetLLMObsPatternsConfig" enabled + And new "GetLLMObsPatternsConfig" request + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: Get annotated interactions by content IDs returns "Bad Request" response Given operation "GetLLMObsAnnotatedInteractionsByTraceIDs" enabled @@ -621,6 +744,30 @@ Feature: LLM Observability When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability + Scenario: Get patterns run status returns "Bad Request" response + Given operation "GetLLMObsPatternsRunStatus" enabled + And new "GetLLMObsPatternsRunStatus" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Get patterns run status returns "Not Found" response + Given operation "GetLLMObsPatternsRunStatus" enabled + And new "GetLLMObsPatternsRunStatus" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: Get patterns run status returns "OK" response + Given operation "GetLLMObsPatternsRunStatus" enabled + And new "GetLLMObsPatternsRunStatus" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: List LLM Observability annotation queues returns "Bad Request" response Given operation "ListLLMObsAnnotationQueues" enabled @@ -713,6 +860,54 @@ Feature: LLM Observability When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability + Scenario: List LLM Observability experiment events (v2) returns "Bad Request" response + Given operation "ListLLMObsExperimentEventsV2" enabled + And new "ListLLMObsExperimentEventsV2" request + And request contains "experiment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: List LLM Observability experiment events (v2) returns "Not Found" response + Given operation "ListLLMObsExperimentEventsV2" enabled + And new "ListLLMObsExperimentEventsV2" request + And request contains "experiment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: List LLM Observability experiment events (v2) returns "OK" response + Given operation "ListLLMObsExperimentEventsV2" enabled + And new "ListLLMObsExperimentEventsV2" request + And request contains "experiment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ml-observability + Scenario: List LLM Observability experiment spans (v1) returns "Bad Request" response + Given operation "ListLLMObsExperimentEventsV1" enabled + And new "ListLLMObsExperimentEventsV1" request + And request contains "experiment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: List LLM Observability experiment spans (v1) returns "Not Found" response + Given operation "ListLLMObsExperimentEventsV1" enabled + And new "ListLLMObsExperimentEventsV1" request + And request contains "experiment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: List LLM Observability experiment spans (v1) returns "OK" response + Given operation "ListLLMObsExperimentEventsV1" enabled + And new "ListLLMObsExperimentEventsV1" request + And request contains "experiment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: List LLM Observability experiments returns "Bad Request" response Given operation "ListLLMObsExperiments" enabled @@ -813,6 +1008,116 @@ Feature: LLM Observability When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns clustered points returns "Bad Request" response + Given operation "ListLLMObsPatternsClusteredPoints" enabled + And new "ListLLMObsPatternsClusteredPoints" request + And request contains "topic_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns clustered points returns "Not Found" response + Given operation "ListLLMObsPatternsClusteredPoints" enabled + And new "ListLLMObsPatternsClusteredPoints" request + And request contains "topic_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns clustered points returns "OK" response + Given operation "ListLLMObsPatternsClusteredPoints" enabled + And new "ListLLMObsPatternsClusteredPoints" request + And request contains "topic_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns configurations returns "Bad Request" response + Given operation "ListLLMObsPatternsConfigs" enabled + And new "ListLLMObsPatternsConfigs" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns configurations returns "OK" response + Given operation "ListLLMObsPatternsConfigs" enabled + And new "ListLLMObsPatternsConfigs" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns runs returns "Bad Request" response + Given operation "ListLLMObsPatternsRuns" enabled + And new "ListLLMObsPatternsRuns" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns runs returns "Not Found" response + Given operation "ListLLMObsPatternsRuns" enabled + And new "ListLLMObsPatternsRuns" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns runs returns "OK" response + Given operation "ListLLMObsPatternsRuns" enabled + And new "ListLLMObsPatternsRuns" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns topics returns "Bad Request" response + Given operation "ListLLMObsPatternsTopics" enabled + And new "ListLLMObsPatternsTopics" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns topics returns "Not Found" response + Given operation "ListLLMObsPatternsTopics" enabled + And new "ListLLMObsPatternsTopics" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns topics returns "OK" response + Given operation "ListLLMObsPatternsTopics" enabled + And new "ListLLMObsPatternsTopics" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns topics with clustered points returns "Bad Request" response + Given operation "ListLLMObsPatternsTopicsWithClusteredPoints" enabled + And new "ListLLMObsPatternsTopicsWithClusteredPoints" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns topics with clustered points returns "Not Found" response + Given operation "ListLLMObsPatternsTopicsWithClusteredPoints" enabled + And new "ListLLMObsPatternsTopicsWithClusteredPoints" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns topics with clustered points returns "OK" response + Given operation "ListLLMObsPatternsTopicsWithClusteredPoints" enabled + And new "ListLLMObsPatternsTopicsWithClusteredPoints" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: Lock LLM Observability dataset draft state returns "Bad Request" response Given operation "LockLLMObsDatasetDraftState" enabled @@ -973,6 +1278,30 @@ Feature: LLM Observability When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability + Scenario: Trigger a patterns run returns "Accepted" response + Given operation "TriggerLLMObsPatterns" enabled + And new "TriggerLLMObsPatterns" request + And body with value {"data": {"attributes": {"config_id": "a7c8d9e0-1234-5678-9abc-def012345678"}, "type": "topic_discovery"}} + When the request is sent + Then the response status is 202 Accepted + + @generated @skip @team:DataDog/ml-observability + Scenario: Trigger a patterns run returns "Bad Request" response + Given operation "TriggerLLMObsPatterns" enabled + And new "TriggerLLMObsPatterns" request + And body with value {"data": {"attributes": {"config_id": "a7c8d9e0-1234-5678-9abc-def012345678"}, "type": "topic_discovery"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Trigger a patterns run returns "Not Found" response + Given operation "TriggerLLMObsPatterns" enabled + And new "TriggerLLMObsPatterns" request + And body with value {"data": {"attributes": {"config_id": "a7c8d9e0-1234-5678-9abc-def012345678"}, "type": "topic_discovery"}} + When the request is sent + Then the response status is 404 Not Found + @generated @skip @team:DataDog/ml-observability Scenario: Unlock LLM Observability dataset draft state returns "Bad Request" response Given operation "UnlockLLMObsDatasetDraftState" enabled @@ -1092,7 +1421,7 @@ Feature: LLM Observability Given operation "UpdateLLMObsExperiment" enabled And new "UpdateLLMObsExperiment" request And request contains "experiment_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {}, "type": "experiments"}} + And body with value {"data": {"attributes": {"dataset_id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d", "status": "completed"}, "type": "experiments"}} When the request is sent Then the response status is 400 Bad Request @@ -1101,7 +1430,7 @@ Feature: LLM Observability Given operation "UpdateLLMObsExperiment" enabled And new "UpdateLLMObsExperiment" request And request contains "experiment_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {}, "type": "experiments"}} + And body with value {"data": {"attributes": {"dataset_id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d", "status": "completed"}, "type": "experiments"}} When the request is sent Then the response status is 404 Not Found @@ -1110,7 +1439,7 @@ Feature: LLM Observability Given operation "UpdateLLMObsExperiment" enabled And new "UpdateLLMObsExperiment" request And request contains "experiment_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {}, "type": "experiments"}} + And body with value {"data": {"attributes": {"dataset_id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d", "status": "completed"}, "type": "experiments"}} When the request is sent Then the response status is 200 OK diff --git a/src/test/resources/com/datadog/api/client/v2/api/logs_archives.feature b/src/test/resources/com/datadog/api/client/v2/api/logs_archives.feature index 4b58769df54..752be13634f 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/logs_archives.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/logs_archives.feature @@ -12,14 +12,14 @@ Feature: Logs Archives @generated @skip @team:DataDog/logs-backend @team:DataDog/logs-forwarding Scenario: Create an archive returns "Bad Request" response Given new "CreateLogsArchive" request - And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} + And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "lookup_attributes": ["trace_id", "user_id"], "name": "Nginx Archive", "partitioning_attributes": ["service", "status"], "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/logs-backend @team:DataDog/logs-forwarding Scenario: Create an archive returns "OK" response Given new "CreateLogsArchive" request - And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} + And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "lookup_attributes": ["trace_id", "user_id"], "name": "Nginx Archive", "partitioning_attributes": ["service", "status"], "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} When the request is sent Then the response status is 200 OK @@ -150,7 +150,7 @@ Feature: Logs Archives Scenario: Update an archive returns "Bad Request" response Given new "UpdateLogsArchive" request And request contains "archive_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} + And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "lookup_attributes": ["trace_id", "user_id"], "name": "Nginx Archive", "partitioning_attributes": ["service", "status"], "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} When the request is sent Then the response status is 400 Bad Request @@ -158,7 +158,7 @@ Feature: Logs Archives Scenario: Update an archive returns "Not found" response Given new "UpdateLogsArchive" request And request contains "archive_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} + And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "lookup_attributes": ["trace_id", "user_id"], "name": "Nginx Archive", "partitioning_attributes": ["service", "status"], "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} When the request is sent Then the response status is 404 Not found @@ -166,7 +166,7 @@ Feature: Logs Archives Scenario: Update an archive returns "OK" response Given new "UpdateLogsArchive" request And request contains "archive_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} + And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "lookup_attributes": ["trace_id", "user_id"], "name": "Nginx Archive", "partitioning_attributes": ["service", "status"], "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} When the request is sent Then the response status is 200 OK diff --git a/src/test/resources/com/datadog/api/client/v2/api/metrics.feature b/src/test/resources/com/datadog/api/client/v2/api/metrics.feature index 114814e21e2..0d0dac2e9d0 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/metrics.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/metrics.feature @@ -68,6 +68,40 @@ Feature: Metrics When the request is sent Then the response status is 201 Created + @generated @skip @team:DataDog/metrics-experience + Scenario: Create a tag indexing rule exemption returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And new "CreateTagIndexingRuleExemption" request + And request contains "metric_name" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"reason": "This metric has a pre-existing tag configuration."}, "type": "tag_indexing_rule_exemptions"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/metrics-experience + Scenario: Create a tag indexing rule exemption returns "Created" response + Given a valid "appKeyAuth" key in the system + And new "CreateTagIndexingRuleExemption" request + And request contains "metric_name" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"reason": "This metric has a pre-existing tag configuration."}, "type": "tag_indexing_rule_exemptions"}} + When the request is sent + Then the response status is 201 Created + + @team:DataDog/metrics-experience + Scenario: Create a tag indexing rule returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And new "CreateTagIndexingRule" request + And body with value {"data": {"type": "tag_indexing_rules", "attributes": {"name": "test", "metric_name_matches": ["dd.test.*"], "options": {"version": 99, "data": {"override_previous_rules": false, "manage_preexisting_metrics": true}}}}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/metrics-experience + Scenario: Create a tag indexing rule returns "Created" response + Given a valid "appKeyAuth" key in the system + And new "CreateTagIndexingRule" request + And body with value {"data": {"attributes": {"exclude_tags_mode": false, "ignored_metric_name_matches": [], "metric_name_matches": ["dd.test.*"], "name": "my-indexing-rule", "options": {"data": {"dynamic_tags": {"queried_tags_window_seconds": 3600, "related_asset_tags": false}, "manage_preexisting_metrics": true, "metric_match": {"queried_window_seconds": 3600}, "override_previous_rules": false}, "version": 1}, "tags": ["env", "service"]}, "type": "tag_indexing_rules"}} + When the request is sent + Then the response status is 201 Created + @replay-only @skip-validation @team:DataDog/metrics-experience Scenario: Delete a tag configuration returns "No Content" response Given there is a valid "metric" in the system @@ -86,6 +120,39 @@ Feature: Metrics When the request is sent Then the response status is 404 Not found + @generated @skip @team:DataDog/metrics-experience + Scenario: Delete a tag indexing rule exemption returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And new "DeleteTagIndexingRuleExemption" request + And request contains "metric_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/metrics-experience + Scenario: Delete a tag indexing rule exemption returns "No Content" response + Given a valid "appKeyAuth" key in the system + And new "DeleteTagIndexingRuleExemption" request + And request contains "metric_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @team:DataDog/metrics-experience + Scenario: Delete a tag indexing rule returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And new "DeleteTagIndexingRule" request + And request contains "id" parameter with value "not-a-valid-uuid" + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/metrics-experience + Scenario: Delete a tag indexing rule returns "No Content" response + Given a valid "appKeyAuth" key in the system + And there is a valid "tag_indexing_rule" in the system + And new "DeleteTagIndexingRule" request + And request contains "id" parameter from "tag_indexing_rule.data.id" + When the request is sent + Then the response status is 204 No Content + @generated @skip @team:DataDog/metrics-experience Scenario: Delete tags for multiple metrics returns "Accepted" response Given a valid "appKeyAuth" key in the system @@ -152,6 +219,55 @@ Feature: Metrics Then the response status is 200 Success And the response "data[0].type" is equal to "manage_tags" + @generated @skip @team:DataDog/metrics-experience + Scenario: Get a tag indexing rule exemption returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And new "GetTagIndexingRuleExemption" request + And request contains "metric_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/metrics-experience + Scenario: Get a tag indexing rule exemption returns "Not Found" response + Given a valid "appKeyAuth" key in the system + And new "GetTagIndexingRuleExemption" request + And request contains "metric_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/metrics-experience + Scenario: Get a tag indexing rule exemption returns "OK" response + Given a valid "appKeyAuth" key in the system + And new "GetTagIndexingRuleExemption" request + And request contains "metric_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @team:DataDog/metrics-experience + Scenario: Get a tag indexing rule returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And new "GetTagIndexingRule" request + And request contains "id" parameter with value "not-a-valid-uuid" + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/metrics-experience + Scenario: Get a tag indexing rule returns "Not Found" response + Given a valid "appKeyAuth" key in the system + And new "GetTagIndexingRule" request + And request contains "id" parameter with value "00000000-0000-0000-0000-000000000000" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/metrics-experience + Scenario: Get a tag indexing rule returns "OK" response + Given a valid "appKeyAuth" key in the system + And there is a valid "tag_indexing_rule" in the system + And new "GetTagIndexingRule" request + And request contains "id" parameter from "tag_indexing_rule.data.id" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/metrics-experience Scenario: Get tag key cardinality details returns "Bad Request" response Given a valid "appKeyAuth" key in the system @@ -249,6 +365,36 @@ Feature: Metrics Then the response status is 200 Success And the response "data.id" has the same value as "metric_tag_configuration.data.id" + @team:DataDog/metrics-experience + Scenario: List tag indexing rules for a metric returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And new "ListTagIndexingRulesForMetric" request + And request contains "metric_name" parameter with value "1invalid" + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/metrics-experience + Scenario: List tag indexing rules for a metric returns "OK" response + Given a valid "appKeyAuth" key in the system + And new "ListTagIndexingRulesForMetric" request + And request contains "metric_name" parameter with value "{{ unique_alnum }}" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/metrics-experience + Scenario: List tag indexing rules returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And new "ListTagIndexingRules" request + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/metrics-experience + Scenario: List tag indexing rules returns "OK" response + Given a valid "appKeyAuth" key in the system + And new "ListTagIndexingRules" request + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/metrics-experience Scenario: List tags by metric name returns "Bad Request" response Given a valid "appKeyAuth" key in the system @@ -326,6 +472,31 @@ Feature: Metrics And the response "data.type" is equal to "metrics" And the response "data.id" is equal to "system.cpu.user" + @team:DataDog/metrics-experience + Scenario: Reorder tag indexing rules returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And new "ReorderTagIndexingRules" request + And body with value {"data": {"attributes": {"rule_ids": []}, "type": "tag_indexing_rules"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/metrics-experience + Scenario: Reorder tag indexing rules returns "No Content" response + Given a valid "appKeyAuth" key in the system + And there is a valid "tag_indexing_rule" in the system + And new "ReorderTagIndexingRules" request + And body with value {"data": {"attributes": {"rule_ids": ["{{ tag_indexing_rule.data.id }}"]}, "type": "tag_indexing_rules"}} + When the request is sent + Then the response status is 204 No Content + + @team:DataDog/metrics-experience + Scenario: Reorder tag indexing rules returns "Not Found" response + Given a valid "appKeyAuth" key in the system + And new "ReorderTagIndexingRules" request + And body with value {"data": {"attributes": {"rule_ids": ["00000000-0000-0000-0000-000000000001", "00000000-0000-0000-0000-000000000002"]}, "type": "tag_indexing_rules"}} + When the request is sent + Then the response status is 404 Not Found + @team:Datadog/timeseries-query Scenario: Scalar cross product query returns "Bad Request" response Given a valid "appKeyAuth" key in the system @@ -344,6 +515,15 @@ Feature: Metrics And the response "data.type" is equal to "scalar_response" And the response "data.attributes.columns[0].name" is equal to "a" + @skip-validation @team:Datadog/timeseries-query + Scenario: Scalar cross product query with RUM data source returns "OK" response + Given a valid "appKeyAuth" key in the system + And new "QueryScalarData" request + And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "queries": [{"data_source": "rum", "name": "a", "compute": {"aggregation": "count"}, "search": {"query": "*"}, "indexes": ["*"]}], "to": {{ timestamp('now') }}000}, "type": "scalar_request"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "scalar_response" + @skip-validation @team:Datadog/timeseries-query Scenario: Scalar cross product query with apm_dependency_stats data source returns "OK" response Given a valid "appKeyAuth" key in the system @@ -479,15 +659,6 @@ Feature: Metrics Then the response status is 200 OK And the response "data.type" is equal to "scalar_response" - @skip-validation @team:Datadog/timeseries-query - Scenario: Scalar cross product query with rum data source returns "OK" response - Given a valid "appKeyAuth" key in the system - And new "QueryScalarData" request - And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "queries": [{"data_source": "rum", "name": "a", "compute": {"aggregation": "count"}, "search": {"query": "*"}, "indexes": ["*"]}], "to": {{ timestamp('now') }}000}, "type": "scalar_request"}} - When the request is sent - Then the response status is 200 OK - And the response "data.type" is equal to "scalar_response" - @skip-validation @team:Datadog/timeseries-query Scenario: Scalar cross product query with security_signals data source returns "OK" response Given a valid "appKeyAuth" key in the system @@ -586,6 +757,15 @@ Feature: Metrics Then the response status is 200 OK And the response "data.type" is equal to "timeseries_response" + @skip-validation @team:Datadog/timeseries-query + Scenario: Timeseries cross product query with RUM data source returns "OK" response + Given a valid "appKeyAuth" key in the system + And new "QueryTimeseriesData" request + And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "interval": 5000, "queries": [{"data_source": "rum", "name": "a", "compute": {"aggregation": "count"}, "search": {"query": "*"}, "indexes": ["*"]}], "to": {{ timestamp('now') }}000}, "type": "timeseries_request"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "timeseries_response" + @skip-validation @team:Datadog/timeseries-query Scenario: Timeseries cross product query with apm_dependency_stats data source returns "OK" response Given a valid "appKeyAuth" key in the system @@ -721,15 +901,6 @@ Feature: Metrics Then the response status is 200 OK And the response "data.type" is equal to "timeseries_response" - @skip-validation @team:Datadog/timeseries-query - Scenario: Timeseries cross product query with rum data source returns "OK" response - Given a valid "appKeyAuth" key in the system - And new "QueryTimeseriesData" request - And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "interval": 5000, "queries": [{"data_source": "rum", "name": "a", "compute": {"aggregation": "count"}, "search": {"query": "*"}, "indexes": ["*"]}], "to": {{ timestamp('now') }}000}, "type": "timeseries_request"}} - When the request is sent - Then the response status is 200 OK - And the response "data.type" is equal to "timeseries_response" - @skip-validation @team:Datadog/timeseries-query Scenario: Timeseries cross product query with security_signals data source returns "OK" response Given a valid "appKeyAuth" key in the system @@ -786,3 +957,40 @@ Feature: Metrics And body with value {"data": {"attributes": {"group_by": ["app", "datacenter"], "include_percentiles": false}, "id": "http.endpoint.request", "type": "manage_tags"}} When the request is sent Then the response status is 422 Unprocessable Entity + + @team:DataDog/metrics-experience + Scenario: Update a tag indexing rule returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And new "UpdateTagIndexingRule" request + And request contains "id" parameter with value "not-a-valid-uuid" + And body with value {"data": {"attributes": {"ignored_metric_name_matches": [], "metric_name_matches": ["dd.test.*"], "name": "my-indexing-rule", "options": {"data": {"dynamic_tags": {"queried_tags_window_seconds": 3600, "related_asset_tags": false}, "manage_preexisting_metrics": true, "metric_match": {"queried_window_seconds": 3600}, "override_previous_rules": false}, "version": 1}, "rule_order": 2, "tags": ["env", "service"]}, "type": "tag_indexing_rules"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/metrics-experience + Scenario: Update a tag indexing rule returns "Conflict" response + Given a valid "appKeyAuth" key in the system + And new "UpdateTagIndexingRule" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"ignored_metric_name_matches": [], "metric_name_matches": ["dd.test.*"], "name": "my-indexing-rule", "options": {"data": {"dynamic_tags": {"queried_tags_window_seconds": 3600, "related_asset_tags": false}, "manage_preexisting_metrics": true, "metric_match": {"queried_window_seconds": 3600}, "override_previous_rules": false}, "version": 1}, "rule_order": 2, "tags": ["env", "service"]}, "type": "tag_indexing_rules"}} + When the request is sent + Then the response status is 409 Conflict + + @team:DataDog/metrics-experience + Scenario: Update a tag indexing rule returns "Not Found" response + Given a valid "appKeyAuth" key in the system + And new "UpdateTagIndexingRule" request + And request contains "id" parameter with value "00000000-0000-0000-0000-000000000000" + And body with value {"data": {"attributes": {"ignored_metric_name_matches": [], "metric_name_matches": ["dd.test.*"], "name": "my-indexing-rule", "options": {"data": {"dynamic_tags": {"queried_tags_window_seconds": 3600, "related_asset_tags": false}, "manage_preexisting_metrics": true, "metric_match": {"queried_window_seconds": 3600}, "override_previous_rules": false}, "version": 1}, "rule_order": 2, "tags": ["env", "service"]}, "type": "tag_indexing_rules"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/metrics-experience + Scenario: Update a tag indexing rule returns "OK" response + Given a valid "appKeyAuth" key in the system + And there is a valid "tag_indexing_rule" in the system + And new "UpdateTagIndexingRule" request + And request contains "id" parameter from "tag_indexing_rule.data.id" + And body with value {"data": {"attributes": {"ignored_metric_name_matches": [], "metric_name_matches": ["dd.test.*"], "name": "my-indexing-rule", "options": {"data": {"dynamic_tags": {"queried_tags_window_seconds": 3600, "related_asset_tags": false}, "manage_preexisting_metrics": true, "metric_match": {"queried_window_seconds": 3600}, "override_previous_rules": false}, "version": 1}, "rule_order": 2, "tags": ["env", "service"]}, "type": "tag_indexing_rules"}} + When the request is sent + Then the response status is 200 OK diff --git a/src/test/resources/com/datadog/api/client/v2/api/microsoft_teams_integration.feature b/src/test/resources/com/datadog/api/client/v2/api/microsoft_teams_integration.feature index d76425d3759..ddbffd96275 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/microsoft_teams_integration.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/microsoft_teams_integration.feature @@ -146,6 +146,27 @@ Feature: Microsoft Teams Integration When the request is sent Then the response status is 204 OK + @generated @skip @team:DataDog/chat-integrations + Scenario: Delete user binding returns "Bad Request" response + Given new "DeleteMSTeamsUserBinding" request + And request contains "tenant_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/chat-integrations + Scenario: Delete user binding returns "Failed Precondition" response + Given new "DeleteMSTeamsUserBinding" request + And request contains "tenant_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 412 Failed Precondition + + @generated @skip @team:DataDog/chat-integrations + Scenario: Delete user binding returns "No Content" response + Given new "DeleteMSTeamsUserBinding" request + And request contains "tenant_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + @team:DataDog/chat-integrations Scenario: Delete workflow webhook handle returns "OK" response Given there is a valid "workflows_webhook_handle" in the system diff --git a/src/test/resources/com/datadog/api/client/v2/api/network_health_insights.feature b/src/test/resources/com/datadog/api/client/v2/api/network_health_insights.feature new file mode 100644 index 00000000000..c5036b6af54 --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/network_health_insights.feature @@ -0,0 +1,23 @@ +@endpoint(network-health-insights) @endpoint(network-health-insights-v2) +Feature: Network Health Insights + Analyze network health by surfacing actionable insights for services + experiencing connectivity issues. Insights are derived from DNS failure + data (timeouts, NXDOMAIN, SERVFAIL, general failures), TLS certificate + health (expired, expiring soon), and security group denials. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "NetworkHealthInsights" API + And operation "ListNetworkHealthInsights" enabled + And new "ListNetworkHealthInsights" request + + @generated @skip @team:DataDog/cloud-network-monitoring + Scenario: List network health insights returns "Bad Request" response + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/cloud-network-monitoring + Scenario: List network health insights returns "OK" response + When the request is sent + Then the response status is 200 OK diff --git a/src/test/resources/com/datadog/api/client/v2/api/organizations.feature b/src/test/resources/com/datadog/api/client/v2/api/organizations.feature index d50c9a305d5..a8ed63ab7e6 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/organizations.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/organizations.feature @@ -8,6 +8,20 @@ Feature: Organizations And a valid "appKeyAuth" key in the system And an instance of "Organizations" API + @generated @skip @team:DataDog/delegated-auth-login + Scenario: Get a SAML configuration returns "Not Found" response + Given new "GetSAMLConfiguration" request + And request contains "saml_config_uuid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/delegated-auth-login + Scenario: Get a SAML configuration returns "OK" response + Given new "GetSAMLConfiguration" request + And request contains "saml_config_uuid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/org-management Scenario: Get a specific Org Config value returns "Bad Request" response Given new "GetOrgConfig" request @@ -41,12 +55,71 @@ Feature: Organizations When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/delegated-auth-login + Scenario: List SAML configurations returns "OK" response + Given new "ListSAMLConfigurations" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/delegated-auth-login + Scenario: List global orgs returns "Bad Request" response + Given new "ListGlobalOrgs" request + And request contains "user_handle" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/delegated-auth-login + Scenario: List global orgs returns "OK" response + Given new "ListGlobalOrgs" request + And request contains "user_handle" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/delegated-auth-login @with-pagination + Scenario: List global orgs returns "OK" response with pagination + Given new "ListGlobalOrgs" request + And request contains "user_handle" parameter from "REPLACE.ME" + When the request with pagination is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/org-management Scenario: List your managed organizations returns "OK" response Given new "ListOrgs" request When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/delegated-auth-login + Scenario: Update a SAML configuration returns "Bad Request" response + Given new "UpdateSAMLConfiguration" request + And request contains "saml_config_uuid" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"idp_initiated": true, "jit_domains": ["example.com"]}, "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "relationships": {"default_roles": {"data": [{"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "type": "roles"}]}}, "type": "saml_configurations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/delegated-auth-login + Scenario: Update a SAML configuration returns "Not Found" response + Given new "UpdateSAMLConfiguration" request + And request contains "saml_config_uuid" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"idp_initiated": true, "jit_domains": ["example.com"]}, "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "relationships": {"default_roles": {"data": [{"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "type": "roles"}]}}, "type": "saml_configurations"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/delegated-auth-login + Scenario: Update a SAML configuration returns "OK" response + Given new "UpdateSAMLConfiguration" request + And request contains "saml_config_uuid" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"idp_initiated": true, "jit_domains": ["example.com"]}, "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "relationships": {"default_roles": {"data": [{"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "type": "roles"}]}}, "type": "saml_configurations"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/delegated-auth-login + Scenario: Update a SAML configuration returns "Unprocessable Entity" response + Given new "UpdateSAMLConfiguration" request + And request contains "saml_config_uuid" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"idp_initiated": true, "jit_domains": ["example.com"]}, "id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "relationships": {"default_roles": {"data": [{"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d", "type": "roles"}]}}, "type": "saml_configurations"}} + When the request is sent + Then the response status is 422 Unprocessable Entity + @team:DataDog/org-management Scenario: Update a specific Org Config returns "Bad Request" response Given new "UpdateOrgConfig" request @@ -71,6 +144,44 @@ Feature: Organizations When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/delegated-auth-login + Scenario: Update organization SAML preferences returns "Bad Request" response + Given operation "UpdateOrgSamlConfigurations" enabled + And new "UpdateOrgSamlConfigurations" request + And body with value {"data": {"attributes": {"default_role_uuids": ["8dd1cf3c-0c75-11ea-ad28-fb5701eabc7d"], "jit_domains": ["example.com"]}, "id": "00000000-0000-0000-0000-000000000000", "type": "saml_preferences"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/delegated-auth-login + Scenario: Update organization SAML preferences returns "No Content" response + Given operation "UpdateOrgSamlConfigurations" enabled + And new "UpdateOrgSamlConfigurations" request + And body with value {"data": {"attributes": {"default_role_uuids": ["8dd1cf3c-0c75-11ea-ad28-fb5701eabc7d"], "jit_domains": ["example.com"]}, "id": "00000000-0000-0000-0000-000000000000", "type": "saml_preferences"}} + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/delegated-auth-login + Scenario: Update organization SAML preferences returns "Not Found" response + Given operation "UpdateOrgSamlConfigurations" enabled + And new "UpdateOrgSamlConfigurations" request + And body with value {"data": {"attributes": {"default_role_uuids": ["8dd1cf3c-0c75-11ea-ad28-fb5701eabc7d"], "jit_domains": ["example.com"]}, "id": "00000000-0000-0000-0000-000000000000", "type": "saml_preferences"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/delegated-auth-login + Scenario: Update the maximum session duration returns "Bad Request" response + Given new "UpdateLoginOrgConfigsMaxSessionDuration" request + And body with value {"data": {"attributes": {"max_session_duration": 604800}, "type": "max_session_duration"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/delegated-auth-login + Scenario: Update the maximum session duration returns "No Content" response + Given new "UpdateLoginOrgConfigsMaxSessionDuration" request + And body with value {"data": {"attributes": {"max_session_duration": 604800}, "type": "max_session_duration"}} + When the request is sent + Then the response status is 204 No Content + @skip-go @skip-java @skip-python @skip-ruby @skip-rust @skip-terraform-config @skip-typescript @skip-validation @team:DataDog/delegated-auth-login Scenario: Upload IdP metadata returns "Bad Request - caused by either malformed XML or invalid SAML IdP metadata" response Given new "UploadIdPMetadata" request diff --git a/src/test/resources/com/datadog/api/client/v2/api/report_schedules.feature b/src/test/resources/com/datadog/api/client/v2/api/report_schedules.feature new file mode 100644 index 00000000000..7d2ffafbc65 --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/report_schedules.feature @@ -0,0 +1,61 @@ +@endpoint(report-schedules) @endpoint(report-schedules-v2) +Feature: Report Schedules + Create and manage scheduled reports. A scheduled report renders a + dashboard or integration dashboard on a recurring cadence and delivers it + to a set of recipients over email, Slack, or Microsoft Teams. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "ReportSchedules" API + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: Create a report schedule returns "Bad Request" response + Given operation "CreateReportSchedule" enabled + And new "CreateReportSchedule" request + And body with value {"data": {"attributes": {"delivery_format": "pdf", "description": "Weekly summary of infrastructure health.", "recipients": ["user@example.com", "slack:T01234567.C01234567.alerts", "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2"], "resource_id": "abc-def-ghi", "resource_type": "dashboard", "rrule": "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0", "tab_id": "66666666-7777-8888-9999-000000000000", "template_variables": [{"name": "env", "values": ["prod"]}], "timeframe": "calendar_month", "timezone": "America/New_York", "title": "Weekly Infrastructure Report"}, "type": "schedule"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: Create a report schedule returns "CREATED" response + Given operation "CreateReportSchedule" enabled + And new "CreateReportSchedule" request + And body with value {"data": {"attributes": {"delivery_format": "pdf", "description": "Weekly summary of infrastructure health.", "recipients": ["user@example.com", "slack:T01234567.C01234567.alerts", "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2"], "resource_id": "abc-def-ghi", "resource_type": "dashboard", "rrule": "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0", "tab_id": "66666666-7777-8888-9999-000000000000", "template_variables": [{"name": "env", "values": ["prod"]}], "timeframe": "calendar_month", "timezone": "America/New_York", "title": "Weekly Infrastructure Report"}, "type": "schedule"}} + When the request is sent + Then the response status is 201 CREATED + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: Create a report schedule returns "Not Found" response + Given operation "CreateReportSchedule" enabled + And new "CreateReportSchedule" request + And body with value {"data": {"attributes": {"delivery_format": "pdf", "description": "Weekly summary of infrastructure health.", "recipients": ["user@example.com", "slack:T01234567.C01234567.alerts", "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2"], "resource_id": "abc-def-ghi", "resource_type": "dashboard", "rrule": "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0", "tab_id": "66666666-7777-8888-9999-000000000000", "template_variables": [{"name": "env", "values": ["prod"]}], "timeframe": "calendar_month", "timezone": "America/New_York", "title": "Weekly Infrastructure Report"}, "type": "schedule"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: Update a report schedule returns "Bad Request" response + Given operation "PatchReportSchedule" enabled + And new "PatchReportSchedule" request + And request contains "schedule_uuid" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"delivery_format": "pdf", "description": "Updated weekly summary of infrastructure health.", "recipients": ["user@example.com", "slack:T01234567.C01234567.alerts", "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2"], "rrule": "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0", "tab_id": "66666666-7777-8888-9999-000000000000", "template_variables": [{"name": "env", "values": ["prod"]}], "timeframe": "calendar_month", "timezone": "America/New_York", "title": "Weekly Infrastructure Report"}, "type": "schedule"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: Update a report schedule returns "Not Found" response + Given operation "PatchReportSchedule" enabled + And new "PatchReportSchedule" request + And request contains "schedule_uuid" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"delivery_format": "pdf", "description": "Updated weekly summary of infrastructure health.", "recipients": ["user@example.com", "slack:T01234567.C01234567.alerts", "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2"], "rrule": "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0", "tab_id": "66666666-7777-8888-9999-000000000000", "template_variables": [{"name": "env", "values": ["prod"]}], "timeframe": "calendar_month", "timezone": "America/New_York", "title": "Weekly Infrastructure Report"}, "type": "schedule"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/reporting-and-sharing + Scenario: Update a report schedule returns "OK" response + Given operation "PatchReportSchedule" enabled + And new "PatchReportSchedule" request + And request contains "schedule_uuid" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"delivery_format": "pdf", "description": "Updated weekly summary of infrastructure health.", "recipients": ["user@example.com", "slack:T01234567.C01234567.alerts", "teams:11111111-1111-1111-1111-111111111111|22222222-2222-2222-2222-222222222222|19:exampleChannelId@thread.tacv2"], "rrule": "DTSTART;TZID=America/New_York:20260601T090000\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0", "tab_id": "66666666-7777-8888-9999-000000000000", "template_variables": [{"name": "env", "values": ["prod"]}], "timeframe": "calendar_month", "timezone": "America/New_York", "title": "Weekly Infrastructure Report"}, "type": "schedule"}} + When the request is sent + Then the response status is 200 OK diff --git a/src/test/resources/com/datadog/api/client/v2/api/rum_metrics.feature b/src/test/resources/com/datadog/api/client/v2/api/rum_metrics.feature index 59cff8c7c98..c87b3187ba5 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/rum_metrics.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/rum_metrics.feature @@ -1,6 +1,6 @@ @endpoint(rum-metrics) @endpoint(rum-metrics-v2) Feature: Rum Metrics - Manage configuration of [rum-based + Manage configuration of [RUM-based metrics](https://app.datadoghq.com/rum/generate-metrics) for your organization. @@ -10,14 +10,14 @@ Feature: Rum Metrics And an instance of "RumMetrics" API @team:DataDog/rum-backend - Scenario: Create a rum-based metric returns "Bad Request" response + Scenario: Create a RUM-based metric returns "Bad Request" response Given new "CreateRumMetric" request And body with value {"data": {"id": "rum.actions.invalid", "type": "rum_metrics", "attributes": {"event_type": "action", "compute": {"aggregation_type": "count"}, "uniqueness":{"when": "match"}}}} When the request is sent Then the response status is 400 Bad Request @team:DataDog/rum-backend - Scenario: Create a rum-based metric returns "Conflict" response + Scenario: Create a RUM-based metric returns "Conflict" response Given there is a valid "rum_metric" in the system And new "CreateRumMetric" request And body with value {"data": {"id": "{{ rum_metric.data.id }}", "type": "rum_metrics", "attributes": {"compute": {"aggregation_type": "count"}, "event_type": "action"}}} @@ -25,7 +25,7 @@ Feature: Rum Metrics Then the response status is 409 Conflict @team:DataDog/rum-backend - Scenario: Create a rum-based metric returns "Created" response + Scenario: Create a RUM-based metric returns "Created" response Given new "CreateRumMetric" request And body with value {"data": {"attributes": {"compute": {"aggregation_type": "distribution", "include_percentiles": true, "path": "@duration"}, "event_type": "session", "filter": {"query": "@service:web-ui"}, "group_by": [{"path": "@browser.name", "tag_name": "browser_name"}], "uniqueness": {"when": "match"}}, "id": "{{ unique_lower_alnum }}", "type": "rum_metrics"}} When the request is sent @@ -42,7 +42,7 @@ Feature: Rum Metrics And the response "data.attributes.uniqueness.when" is equal to "match" @team:DataDog/rum-backend - Scenario: Delete a rum-based metric returns "No Content" response + Scenario: Delete a RUM-based metric returns "No Content" response Given there is a valid "rum_metric" in the system And new "DeleteRumMetric" request And request contains "metric_id" parameter from "rum_metric.data.id" @@ -50,21 +50,21 @@ Feature: Rum Metrics Then the response status is 204 No Content @team:DataDog/rum-backend - Scenario: Delete a rum-based metric returns "Not Found" response + Scenario: Delete a RUM-based metric returns "Not Found" response Given new "DeleteRumMetric" request And request contains "metric_id" parameter with value "{{ unique }}" When the request is sent Then the response status is 404 Not Found @team:DataDog/rum-backend - Scenario: Get a rum-based metric returns "Not Found" response + Scenario: Get a RUM-based metric returns "Not Found" response Given new "GetRumMetric" request And request contains "metric_id" parameter with value "{{ unique }}" When the request is sent Then the response status is 404 Not Found @team:DataDog/rum-backend - Scenario: Get a rum-based metric returns "OK" response + Scenario: Get a RUM-based metric returns "OK" response Given there is a valid "rum_metric" in the system And new "GetRumMetric" request And request contains "metric_id" parameter from "rum_metric.data.id" @@ -82,13 +82,13 @@ Feature: Rum Metrics And the response "data.attributes.uniqueness.when" has the same value as "rum_metric.data.attributes.uniqueness.when" @team:DataDog/rum-backend - Scenario: Get all rum-based metrics returns "OK" response + Scenario: Get all RUM-based metrics returns "OK" response Given new "ListRumMetrics" request When the request is sent Then the response status is 200 OK @team:DataDog/rum-backend - Scenario: Update a rum-based metric returns "Bad Request" response + Scenario: Update a RUM-based metric returns "Bad Request" response Given there is a valid "rum_metric" in the system And new "UpdateRumMetric" request And request contains "metric_id" parameter from "rum_metric.data.id" @@ -97,7 +97,7 @@ Feature: Rum Metrics Then the response status is 400 Bad Request @team:DataDog/rum-backend - Scenario: Update a rum-based metric returns "Conflict" response + Scenario: Update a RUM-based metric returns "Conflict" response Given there is a valid "rum_metric" in the system And new "UpdateRumMetric" request And request contains "metric_id" parameter from "rum_metric.data.id" @@ -106,7 +106,7 @@ Feature: Rum Metrics Then the response status is 409 Conflict @team:DataDog/rum-backend - Scenario: Update a rum-based metric returns "Not Found" response + Scenario: Update a RUM-based metric returns "Not Found" response Given there is a valid "rum_metric" in the system And new "UpdateRumMetric" request And request contains "metric_id" parameter with value "8fc991bf-967e-4652-8a5b-0711a985abe3" @@ -115,7 +115,7 @@ Feature: Rum Metrics Then the response status is 404 Not Found @team:DataDog/rum-backend - Scenario: Update a rum-based metric returns "OK" response + Scenario: Update a RUM-based metric returns "OK" response Given there is a valid "rum_metric" in the system And new "UpdateRumMetric" request And request contains "metric_id" parameter from "rum_metric.data.id" diff --git a/src/test/resources/com/datadog/api/client/v2/api/rum_rate_limit.feature b/src/test/resources/com/datadog/api/client/v2/api/rum_rate_limit.feature new file mode 100644 index 00000000000..90869ed1782 --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/rum_rate_limit.feature @@ -0,0 +1,93 @@ +@endpoint(rum-rate-limit) @endpoint(rum-rate-limit-v2) +Feature: Rum Rate Limit + Manage RUM rate limit configurations for your organization's RUM + applications. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "RumRateLimit" API + + @generated @skip @team:DataDog/rum-backend + Scenario: Create or update a RUM rate limit configuration returns "Bad Request" response + Given operation "UpdateRumRateLimitConfig" enabled + And new "UpdateRumRateLimitConfig" request + And request contains "scope_type" parameter from "REPLACE.ME" + And request contains "scope_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"adaptive": {"max_retention_rate": 0.5}, "custom": {"daily_reset_time": "08:00", "daily_reset_timezone": "+09:00", "quota_reached_action": "stop", "session_limit": 1000000, "window_type": "daily"}, "mode": "custom"}, "id": "cd73a516-a481-4af5-8352-9b577465c77b", "type": "rum_rate_limit_config"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Create or update a RUM rate limit configuration returns "Not Found" response + Given operation "UpdateRumRateLimitConfig" enabled + And new "UpdateRumRateLimitConfig" request + And request contains "scope_type" parameter from "REPLACE.ME" + And request contains "scope_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"adaptive": {"max_retention_rate": 0.5}, "custom": {"daily_reset_time": "08:00", "daily_reset_timezone": "+09:00", "quota_reached_action": "stop", "session_limit": 1000000, "window_type": "daily"}, "mode": "custom"}, "id": "cd73a516-a481-4af5-8352-9b577465c77b", "type": "rum_rate_limit_config"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/rum-backend + Scenario: Create or update a RUM rate limit configuration returns "OK" response + Given operation "UpdateRumRateLimitConfig" enabled + And new "UpdateRumRateLimitConfig" request + And request contains "scope_type" parameter from "REPLACE.ME" + And request contains "scope_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"adaptive": {"max_retention_rate": 0.5}, "custom": {"daily_reset_time": "08:00", "daily_reset_timezone": "+09:00", "quota_reached_action": "stop", "session_limit": 1000000, "window_type": "daily"}, "mode": "custom"}, "id": "cd73a516-a481-4af5-8352-9b577465c77b", "type": "rum_rate_limit_config"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/rum-backend + Scenario: Delete a RUM rate limit configuration returns "Bad Request" response + Given operation "DeleteRumRateLimitConfig" enabled + And new "DeleteRumRateLimitConfig" request + And request contains "scope_type" parameter from "REPLACE.ME" + And request contains "scope_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Delete a RUM rate limit configuration returns "No Content" response + Given operation "DeleteRumRateLimitConfig" enabled + And new "DeleteRumRateLimitConfig" request + And request contains "scope_type" parameter from "REPLACE.ME" + And request contains "scope_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/rum-backend + Scenario: Delete a RUM rate limit configuration returns "Not Found" response + Given operation "DeleteRumRateLimitConfig" enabled + And new "DeleteRumRateLimitConfig" request + And request contains "scope_type" parameter from "REPLACE.ME" + And request contains "scope_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/rum-backend + Scenario: Get a RUM rate limit configuration returns "Bad Request" response + Given operation "GetRumRateLimitConfig" enabled + And new "GetRumRateLimitConfig" request + And request contains "scope_type" parameter from "REPLACE.ME" + And request contains "scope_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Get a RUM rate limit configuration returns "Not Found" response + Given operation "GetRumRateLimitConfig" enabled + And new "GetRumRateLimitConfig" request + And request contains "scope_type" parameter from "REPLACE.ME" + And request contains "scope_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/rum-backend + Scenario: Get a RUM rate limit configuration returns "OK" response + Given operation "GetRumRateLimitConfig" enabled + And new "GetRumRateLimitConfig" request + And request contains "scope_type" parameter from "REPLACE.ME" + And request contains "scope_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK diff --git a/src/test/resources/com/datadog/api/client/v2/api/rum_replay_playlists.feature b/src/test/resources/com/datadog/api/client/v2/api/rum_replay_playlists.feature index 5e5f41d54b3..2fd317e4df2 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/rum_replay_playlists.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/rum_replay_playlists.feature @@ -9,7 +9,7 @@ Feature: Rum Replay Playlists And an instance of "RumReplayPlaylists" API @generated @skip @team:DataDog/session-replay-backend - Scenario: Add rum replay session to playlist returns "Created" response + Scenario: Add RUM replay session to playlist returns "Created" response Given new "AddRumReplaySessionToPlaylist" request And request contains "ts" parameter from "REPLACE.ME" And request contains "playlist_id" parameter from "REPLACE.ME" @@ -18,7 +18,7 @@ Feature: Rum Replay Playlists Then the response status is 201 Created @generated @skip @team:DataDog/session-replay-backend - Scenario: Add rum replay session to playlist returns "OK" response + Scenario: Add RUM replay session to playlist returns "OK" response Given new "AddRumReplaySessionToPlaylist" request And request contains "ts" parameter from "REPLACE.ME" And request contains "playlist_id" parameter from "REPLACE.ME" @@ -27,7 +27,7 @@ Feature: Rum Replay Playlists Then the response status is 200 OK @generated @skip @team:DataDog/session-replay-backend - Scenario: Bulk remove rum replay playlist sessions returns "No Content" response + Scenario: Bulk remove RUM replay playlist sessions returns "No Content" response Given new "BulkRemoveRumReplayPlaylistSessions" request And request contains "playlist_id" parameter from "REPLACE.ME" And body with value {"data": [{"id": "00000000-0000-0000-0000-000000000001", "type": "rum_replay_session"}]} @@ -35,41 +35,41 @@ Feature: Rum Replay Playlists Then the response status is 204 No Content @generated @skip @team:DataDog/session-replay-backend - Scenario: Create rum replay playlist returns "Created" response + Scenario: Create RUM replay playlist returns "Created" response Given new "CreateRumReplayPlaylist" request And body with value {"data": {"attributes": {"created_by": {"handle": "john.doe@example.com", "id": "00000000-0000-0000-0000-000000000001", "uuid": "00000000-0000-0000-0000-000000000001"}, "name": "My Playlist"}, "type": "rum_replay_playlist"}} When the request is sent Then the response status is 201 Created @generated @skip @team:DataDog/session-replay-backend - Scenario: Delete rum replay playlist returns "No Content" response + Scenario: Delete RUM replay playlist returns "No Content" response Given new "DeleteRumReplayPlaylist" request And request contains "playlist_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 204 No Content @generated @skip @team:DataDog/session-replay-backend - Scenario: Get rum replay playlist returns "OK" response + Scenario: Get RUM replay playlist returns "OK" response Given new "GetRumReplayPlaylist" request And request contains "playlist_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK @generated @skip @team:DataDog/session-replay-backend - Scenario: List rum replay playlist sessions returns "OK" response + Scenario: List RUM replay playlist sessions returns "OK" response Given new "ListRumReplayPlaylistSessions" request And request contains "playlist_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK @generated @skip @team:DataDog/session-replay-backend - Scenario: List rum replay playlists returns "OK" response + Scenario: List RUM replay playlists returns "OK" response Given new "ListRumReplayPlaylists" request When the request is sent Then the response status is 200 OK @generated @skip @team:DataDog/session-replay-backend - Scenario: Remove rum replay session from playlist returns "No Content" response + Scenario: Remove RUM replay session from playlist returns "No Content" response Given new "RemoveRumReplaySessionFromPlaylist" request And request contains "playlist_id" parameter from "REPLACE.ME" And request contains "session_id" parameter from "REPLACE.ME" @@ -77,7 +77,7 @@ Feature: Rum Replay Playlists Then the response status is 204 No Content @generated @skip @team:DataDog/session-replay-backend - Scenario: Update rum replay playlist returns "OK" response + Scenario: Update RUM replay playlist returns "OK" response Given new "UpdateRumReplayPlaylist" request And request contains "playlist_id" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"created_by": {"handle": "john.doe@example.com", "id": "00000000-0000-0000-0000-000000000001", "uuid": "00000000-0000-0000-0000-000000000001"}, "name": "My Playlist"}, "type": "rum_replay_playlist"}} diff --git a/src/test/resources/com/datadog/api/client/v2/api/rum_replay_viewership.feature b/src/test/resources/com/datadog/api/client/v2/api/rum_replay_viewership.feature index 216c419e117..e339e1e5e45 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/rum_replay_viewership.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/rum_replay_viewership.feature @@ -9,7 +9,7 @@ Feature: Rum Replay Viewership And an instance of "RumReplayViewership" API @generated @skip @team:DataDog/session-replay-backend - Scenario: Create rum replay session watch returns "Created" response + Scenario: Create RUM replay session watch returns "Created" response Given new "CreateRumReplaySessionWatch" request And request contains "session_id" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"application_id": "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb", "event_id": "11111111-2222-3333-4444-555555555555", "timestamp": "2026-01-13T17:15:53.208340Z"}, "type": "rum_replay_watch"}} @@ -17,21 +17,21 @@ Feature: Rum Replay Viewership Then the response status is 201 Created @generated @skip @team:DataDog/session-replay-backend - Scenario: Delete rum replay session watch returns "No Content" response + Scenario: Delete RUM replay session watch returns "No Content" response Given new "DeleteRumReplaySessionWatch" request And request contains "session_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 204 No Content @generated @skip @team:DataDog/session-replay-backend - Scenario: List rum replay session watchers returns "OK" response + Scenario: List RUM replay session watchers returns "OK" response Given new "ListRumReplaySessionWatchers" request And request contains "session_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK @generated @skip @team:DataDog/session-replay-backend - Scenario: List rum replay viewership history sessions returns "OK" response + Scenario: List RUM replay viewership history sessions returns "OK" response Given new "ListRumReplayViewershipHistorySessions" request When the request is sent Then the response status is 200 OK diff --git a/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature b/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature index d23634826e6..d6ec475edf2 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature @@ -41,6 +41,30 @@ Feature: Security Monitoring When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/k9-investigation + Scenario: Assign or unassign security findings returns "Accepted" response + Given operation "UpdateFindingsAssignee" enabled + And new "UpdateFindingsAssignee" request + And body with value {"data": {"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0"}, "id": "00000000-0000-0000-0000-000000000001", "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}}, "type": "assignee"}} + When the request is sent + Then the response status is 202 Accepted + + @generated @skip @team:DataDog/k9-investigation + Scenario: Assign or unassign security findings returns "Bad Request" response + Given operation "UpdateFindingsAssignee" enabled + And new "UpdateFindingsAssignee" request + And body with value {"data": {"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0"}, "id": "00000000-0000-0000-0000-000000000001", "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}}, "type": "assignee"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-investigation + Scenario: Assign or unassign security findings returns "Not Found" response + Given operation "UpdateFindingsAssignee" enabled + And new "UpdateFindingsAssignee" request + And body with value {"data": {"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0"}, "id": "00000000-0000-0000-0000-000000000001", "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}}, "type": "assignee"}} + When the request is sent + Then the response status is 404 Not Found + @team:DataDog/k9-investigation Scenario: Attach security finding to a Jira issue returns "OK" response Given new "AttachJiraIssue" request @@ -87,6 +111,30 @@ Feature: Security Monitoring And the response "data.attributes.insights" has item with field "resource_id" with value "MTNjN2ZmYWMzMDIxYmU1ZDFiZDRjNWUwN2I1NzVmY2F-YTA3MzllMTUzNWM3NmEyZjdiNzEzOWM5YmViZTMzOGM=" And the response "data.attributes.jira_issue.result.issue_url" is equal to "https://datadoghq-sandbox-538.atlassian.net/browse/CSMSEC-105476" + @generated @skip @team:DataDog/k9-investigation + Scenario: Attach security findings to a ServiceNow ticket returns "Bad Request" response + Given operation "AttachServiceNowTicket" enabled + And new "AttachServiceNowTicket" request + And body with value {"data": {"attributes": {"servicenow_ticket_url": "https://example.service-now.com/now/nav/ui/classic/params/target/incident.do?sys_id=abcdef0123456789abcdef0123456789"}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-investigation + Scenario: Attach security findings to a ServiceNow ticket returns "Not Found" response + Given operation "AttachServiceNowTicket" enabled + And new "AttachServiceNowTicket" request + And body with value {"data": {"attributes": {"servicenow_ticket_url": "https://example.service-now.com/now/nav/ui/classic/params/target/incident.do?sys_id=abcdef0123456789abcdef0123456789"}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/k9-investigation + Scenario: Attach security findings to a ServiceNow ticket returns "OK" response + Given operation "AttachServiceNowTicket" enabled + And new "AttachServiceNowTicket" request + And body with value {"data": {"attributes": {"servicenow_ticket_url": "https://example.service-now.com/now/nav/ui/classic/params/target/incident.do?sys_id=abcdef0123456789abcdef0123456789"}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}} + When the request is sent + Then the response status is 200 OK + @team:DataDog/k9-investigation Scenario: Attach security findings to a case returns "Bad Request" response Given new "AttachCase" request @@ -482,6 +530,30 @@ Feature: Security Monitoring When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/k9-investigation + Scenario: Create ServiceNow tickets for security findings returns "Bad Request" response + Given operation "CreateServiceNowTickets" enabled + And new "CreateServiceNowTickets" request + And body with value {"data": [{"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0", "description": "A description of the ServiceNow ticket.", "priority": "NOT_DEFINED", "title": "A title for the ServiceNow ticket."}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}]} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-investigation + Scenario: Create ServiceNow tickets for security findings returns "Created" response + Given operation "CreateServiceNowTickets" enabled + And new "CreateServiceNowTickets" request + And body with value {"data": [{"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0", "description": "A description of the ServiceNow ticket.", "priority": "NOT_DEFINED", "title": "A title for the ServiceNow ticket."}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}]} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/k9-investigation + Scenario: Create ServiceNow tickets for security findings returns "Not Found" response + Given operation "CreateServiceNowTickets" enabled + And new "CreateServiceNowTickets" request + And body with value {"data": [{"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0", "description": "A description of the ServiceNow ticket.", "priority": "NOT_DEFINED", "title": "A title for the ServiceNow ticket."}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "servicenow_tickets"}]} + When the request is sent + Then the response status is 404 Not Found + @skip-validation @team:DataDog/k9-cloud-siem Scenario: Create a cloud_configuration rule returns "OK" response Given new "CreateSecurityMonitoringRule" request @@ -687,7 +759,7 @@ Feature: Security Monitoring @generated @skip @team:DataDog/cloud-security-posture-management Scenario: Create a new signal-based notification rule returns "Bad Request" response Given new "CreateSignalNotificationRule" request - And body with value {"data": {"attributes": {"enabled": true, "name": "Rule 1", "selectors": {"query": "(source:production_service OR env:prod)", "rule_types": ["misconfiguration", "attack_path"], "severities": ["critical"], "trigger_source": "security_findings"}, "targets": ["@john.doe@email.com"], "time_aggregation": 86400}, "type": "notification_rules"}} + And body with value {"data": {"attributes": {"enabled": true, "name": "Rule 1", "routing": {"mode": "manual"}, "selectors": {"query": "(source:production_service OR env:prod)", "rule_types": ["misconfiguration", "attack_path"], "severities": ["critical"], "trigger_source": "security_findings"}, "targets": ["@john.doe@email.com"], "time_aggregation": 86400}, "type": "notification_rules"}} When the request is sent Then the response status is 400 Bad Request @@ -701,7 +773,7 @@ Feature: Security Monitoring @generated @skip @team:DataDog/cloud-security-posture-management Scenario: Create a new vulnerability-based notification rule returns "Bad Request" response Given new "CreateVulnerabilityNotificationRule" request - And body with value {"data": {"attributes": {"enabled": true, "name": "Rule 1", "selectors": {"query": "(source:production_service OR env:prod)", "rule_types": ["misconfiguration", "attack_path"], "severities": ["critical"], "trigger_source": "security_findings"}, "targets": ["@john.doe@email.com"], "time_aggregation": 86400}, "type": "notification_rules"}} + And body with value {"data": {"attributes": {"enabled": true, "name": "Rule 1", "routing": {"mode": "manual"}, "selectors": {"query": "(source:production_service OR env:prod)", "rule_types": ["misconfiguration", "attack_path"], "severities": ["critical"], "trigger_source": "security_findings"}, "targets": ["@john.doe@email.com"], "time_aggregation": 86400}, "type": "notification_rules"}} When the request is sent Then the response status is 400 Bad Request @@ -1536,6 +1608,30 @@ Feature: Security Monitoring When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/k9-cloud-siem + Scenario: Get a single entity context returns "Bad Request" response + Given operation "GetSingleEntityContext" enabled + And new "GetSingleEntityContext" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-cloud-siem + Scenario: Get a single entity context returns "Not Found" response + Given operation "GetSingleEntityContext" enabled + And new "GetSingleEntityContext" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/k9-cloud-siem + Scenario: Get a single entity context returns "OK" response + Given operation "GetSingleEntityContext" enabled + And new "GetSingleEntityContext" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @skip-validation @team:DataDog/k9-cloud-siem Scenario: Get a suppression rule returns "Not Found" response Given new "GetSecurityMonitoringSuppression" request @@ -2398,7 +2494,7 @@ Feature: Security Monitoring Scenario: Patch a signal-based notification rule returns "The server cannot process the request because it contains invalid data." response Given new "PatchSignalNotificationRule" request And request contains "id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"enabled": true, "name": "Rule 1", "selectors": {"query": "(source:production_service OR env:prod)", "rule_types": ["misconfiguration", "attack_path"], "severities": ["critical"], "trigger_source": "security_findings"}, "targets": ["@john.doe@email.com"], "time_aggregation": 86400, "version": 1}, "id": "aaa-bbb-ccc", "type": "notification_rules"}} + And body with value {"data": {"attributes": {"enabled": true, "name": "Rule 1", "routing": {"mode": "manual"}, "selectors": {"query": "(source:production_service OR env:prod)", "rule_types": ["misconfiguration", "attack_path"], "severities": ["critical"], "trigger_source": "security_findings"}, "targets": ["@john.doe@email.com"], "time_aggregation": 86400, "version": 1}, "id": "aaa-bbb-ccc", "type": "notification_rules"}} When the request is sent Then the response status is 422 The server cannot process the request because it contains invalid data. @@ -2432,10 +2528,52 @@ Feature: Security Monitoring Scenario: Patch a vulnerability-based notification rule returns "The server cannot process the request because it contains invalid data." response Given new "PatchVulnerabilityNotificationRule" request And request contains "id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"enabled": true, "name": "Rule 1", "selectors": {"query": "(source:production_service OR env:prod)", "rule_types": ["misconfiguration", "attack_path"], "severities": ["critical"], "trigger_source": "security_findings"}, "targets": ["@john.doe@email.com"], "time_aggregation": 86400, "version": 1}, "id": "aaa-bbb-ccc", "type": "notification_rules"}} + And body with value {"data": {"attributes": {"enabled": true, "name": "Rule 1", "routing": {"mode": "manual"}, "selectors": {"query": "(source:production_service OR env:prod)", "rule_types": ["misconfiguration", "attack_path"], "severities": ["critical"], "trigger_source": "security_findings"}, "targets": ["@john.doe@email.com"], "time_aggregation": 86400, "version": 1}, "id": "aaa-bbb-ccc", "type": "notification_rules"}} When the request is sent Then the response status is 422 The server cannot process the request because it contains invalid data. + @generated @skip @team:DataDog/k9-cloud-siem + Scenario: Restore a rule to a historical version returns "Bad Request" response + Given operation "RestoreSecurityMonitoringRule" enabled + And new "RestoreSecurityMonitoringRule" request + And request contains "rule_id" parameter from "REPLACE.ME" + And request contains "version" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/k9-cloud-siem + Scenario: Restore a rule to a historical version returns "Conflict" response + Given operation "RestoreSecurityMonitoringRule" enabled + And there is a valid "security_rule" in the system + And there is a valid "security_rule_updated" in the system + And new "RestoreSecurityMonitoringRule" request + And request contains "rule_id" parameter from "security_rule.id" + And request contains "version" parameter with value 2 + When the request is sent + Then the response status is 409 Conflict + + @team:DataDog/k9-cloud-siem + Scenario: Restore a rule to a historical version returns "Not Found" response + Given operation "RestoreSecurityMonitoringRule" enabled + And there is a valid "security_rule" in the system + And new "RestoreSecurityMonitoringRule" request + And request contains "rule_id" parameter from "security_rule.id" + And request contains "version" parameter with value 9999 + When the request is sent + Then the response status is 404 Not Found + + @skip-validation @team:DataDog/k9-cloud-siem + Scenario: Restore a rule to a historical version returns "OK" response + Given operation "RestoreSecurityMonitoringRule" enabled + And there is a valid "security_rule" in the system + And there is a valid "security_rule_updated" in the system + And new "RestoreSecurityMonitoringRule" request + And request contains "rule_id" parameter from "security_rule.id" + And request contains "version" parameter with value 1 + When the request is sent + Then the response status is 200 OK + And the response "id" has the same value as "security_rule.id" + @generated @skip @team:DataDog/k9-vm-ast Scenario: Returns a list of Secrets rules returns "OK" response Given operation "GetSecretsRules" enabled @@ -2539,6 +2677,20 @@ Feature: Security Monitoring When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/k9-cloud-siem + Scenario: Test a notification rule returns "Bad Request" response + Given new "SendSecurityMonitoringNotificationPreview" request + And body with value {"data": {"attributes": {"enabled": true, "name": "Rule 1", "routing": {"mode": "manual"}, "selectors": {"query": "(source:production_service OR env:prod)", "rule_types": ["misconfiguration", "attack_path"], "severities": ["critical"], "trigger_source": "security_findings"}, "targets": ["@john.doe@email.com"], "time_aggregation": 86400}, "type": "notification_rules"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/k9-cloud-siem + Scenario: Test a notification rule returns "OK" response + Given new "SendSecurityMonitoringNotificationPreview" request + And body with value {"data": {"attributes": {"enabled": true, "name": "Rule 1", "selectors": {"query": "env:prod", "rule_types": ["log_detection"], "severities": ["critical"], "trigger_source": "security_signals"}, "targets": ["@john.doe@email.com"]}, "type": "notification_rules"}} + When the request is sent + Then the response status is 200 OK + @skip @team:DataDog/k9-cloud-siem Scenario: Test a rule returns "Bad Request" response Given new "TestSecurityMonitoringRule" request diff --git a/src/test/resources/com/datadog/api/client/v2/api/slack_integration.feature b/src/test/resources/com/datadog/api/client/v2/api/slack_integration.feature new file mode 100644 index 00000000000..0ef645a642a --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/slack_integration.feature @@ -0,0 +1,23 @@ +@endpoint(slack-integration) @endpoint(slack-integration-v2) +Feature: Slack Integration + Configure your [Datadog Slack + integration](https://docs.datadoghq.com/integrations/slack/) directly + through the Datadog API. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "SlackIntegration" API + And new "ListSlackUserBindings" request + + @generated @skip @team:DataDog/chat-integrations + Scenario: List Slack user bindings returns "Bad Request" response + Given request contains "user_uuid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/chat-integrations + Scenario: List Slack user bindings returns "OK" response + Given request contains "user_uuid" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK diff --git a/src/test/resources/com/datadog/api/client/v2/api/static_analysis.feature b/src/test/resources/com/datadog/api/client/v2/api/static_analysis.feature index 3d690035c18..5a662bc9c32 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/static_analysis.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/static_analysis.feature @@ -434,6 +434,13 @@ Feature: Static Analysis When the request is sent Then the response status is 200 Successful response + @generated @skip @team:DataDog/k9-vm-sca + Scenario: Get the list of SPDX licenses returns "OK" response + Given operation "ListSCALicenses" enabled + And new "ListSCALicenses" request + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/k9-vm-ast Scenario: List AI custom rule revisions returns "Bad Request" response Given operation "ListAiCustomRuleRevisions" enabled @@ -578,6 +585,22 @@ Feature: Static Analysis When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/k9-vm-sca + Scenario: Retrieve a dependency scan result returns "Not Found" response + Given operation "GetSCAScan" enabled + And new "GetSCAScan" request + And request contains "job_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/k9-vm-sca + Scenario: Retrieve a dependency scan result returns "OK" response + Given operation "GetSCAScan" enabled + And new "GetSCAScan" request + And request contains "job_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/k9-vm-ast Scenario: Revert Custom Rule Revision returns "Bad request" response Given operation "RevertCustomRuleRevision" enabled @@ -679,6 +702,22 @@ Feature: Static Analysis When the request is sent Then the response status is 200 Successful response + @generated @skip @team:DataDog/k9-vm-sca + Scenario: Submit libraries for vulnerability scanning returns "Accepted" response + Given operation "CreateSCAScan" enabled + And new "CreateSCAScan" request + And body with value {"data": {"attributes": {"commit_hash": "0e9fc8de83eaabecd722e1cd0ed44fb489fe15fc", "libraries": [{"exclusions": [], "is_dev": false, "is_direct": true, "package_manager": "nuget", "purl": "pkg:nuget/Newtonsoft.Json@13.0.1", "target_frameworks": []}], "resource_name": "my-org/my-repo"}, "type": "mcpscanrequest"}} + When the request is sent + Then the response status is 202 Accepted + + @generated @skip @team:DataDog/k9-vm-sca + Scenario: Submit libraries for vulnerability scanning returns "Bad Request" response + Given operation "CreateSCAScan" enabled + And new "CreateSCAScan" request + And body with value {"data": {"attributes": {"commit_hash": "0e9fc8de83eaabecd722e1cd0ed44fb489fe15fc", "libraries": [{"exclusions": [], "is_dev": false, "is_direct": true, "package_manager": "nuget", "purl": "pkg:nuget/Newtonsoft.Json@13.0.1", "target_frameworks": []}], "resource_name": "my-org/my-repo"}, "type": "mcpscanrequest"}} + When the request is sent + Then the response status is 400 Bad Request + @generated @skip @team:DataDog/k9-vm-ast Scenario: Update Custom Ruleset returns "Bad request" response Given operation "UpdateCustomRuleset" enabled diff --git a/src/test/resources/com/datadog/api/client/v2/api/stegadography.feature b/src/test/resources/com/datadog/api/client/v2/api/stegadography.feature new file mode 100644 index 00000000000..86c2d3a2a8b --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/stegadography.feature @@ -0,0 +1,26 @@ +@endpoint(stegadography) @endpoint(stegadography-v2) +Feature: Stegadography + Extract watermarks embedded in dashboard screenshots to retrieve cached + widget state. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "Stegadography" API + And new "GetStegadographyWidgets" request + + @generated @skip @team:DataDog/dataviz-backend-maintainers + Scenario: Get widgets from an image returns "Bad Request" response + When the request is sent + Then the response status is 400 Bad Request + + @integration-only @skip-terraform-config @skip-validation @team:DataDog/dataviz-backend-maintainers + Scenario: Get widgets from an image returns "OK" response + Given request contains "image" parameter with value "fixtures/stegadography/image.png" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/dataviz-backend-maintainers + Scenario: Get widgets from an image returns "Unsupported Media Type" response + When the request is sent + Then the response status is 415 Unsupported Media Type diff --git a/src/test/resources/com/datadog/api/client/v2/api/tag_policies.feature b/src/test/resources/com/datadog/api/client/v2/api/tag_policies.feature new file mode 100644 index 00000000000..b5d064c202e --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/tag_policies.feature @@ -0,0 +1,150 @@ +@endpoint(tag-policies) @endpoint(tag-policies-v2) +Feature: Tag Policies + Tag Policies define rules that govern which tag values are accepted for a + given tag key, scoped to a particular telemetry source (such as logs, + spans, or metrics). Policies can be `blocking` (data not matching the + policy is rejected) or `surfacing` (matching data is highlighted but not + blocked). Each policy reports a compliance `score` derived from how much + recent telemetry adheres to the policy. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "TagPolicies" API + + @generated @skip @team:DataDog/aaa-governance-console + Scenario: Create a tag policy returns "Bad Request" response + Given operation "CreateTagPolicy" enabled + And new "CreateTagPolicy" request + And body with value {"data": {"attributes": {"enabled": true, "negated": false, "policy_name": "Service tag must be one of api or web", "policy_type": "surfacing", "required": true, "scope": "env", "source": "logs", "tag_key": "service", "tag_value_patterns": ["api", "web"]}, "type": "tag_policy"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/aaa-governance-console + Scenario: Create a tag policy returns "Conflict" response + Given operation "CreateTagPolicy" enabled + And new "CreateTagPolicy" request + And body with value {"data": {"attributes": {"enabled": true, "negated": false, "policy_name": "Service tag must be one of api or web", "policy_type": "surfacing", "required": true, "scope": "env", "source": "logs", "tag_key": "service", "tag_value_patterns": ["api", "web"]}, "type": "tag_policy"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:DataDog/aaa-governance-console + Scenario: Create a tag policy returns "Created" response + Given operation "CreateTagPolicy" enabled + And new "CreateTagPolicy" request + And body with value {"data": {"attributes": {"enabled": true, "negated": false, "policy_name": "Service tag must be one of api or web", "policy_type": "surfacing", "required": true, "scope": "env", "source": "logs", "tag_key": "service", "tag_value_patterns": ["api", "web"]}, "type": "tag_policy"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/aaa-governance-console + Scenario: Delete a tag policy returns "Bad Request" response + Given operation "DeleteTagPolicy" enabled + And new "DeleteTagPolicy" request + And request contains "policy_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/aaa-governance-console + Scenario: Delete a tag policy returns "No Content" response + Given operation "DeleteTagPolicy" enabled + And new "DeleteTagPolicy" request + And request contains "policy_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/aaa-governance-console + Scenario: Delete a tag policy returns "Not Found" response + Given operation "DeleteTagPolicy" enabled + And new "DeleteTagPolicy" request + And request contains "policy_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/aaa-governance-console + Scenario: Get a tag policy compliance score returns "Bad Request" response + Given operation "GetTagPolicyScore" enabled + And new "GetTagPolicyScore" request + And request contains "policy_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/aaa-governance-console + Scenario: Get a tag policy compliance score returns "Not Found" response + Given operation "GetTagPolicyScore" enabled + And new "GetTagPolicyScore" request + And request contains "policy_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/aaa-governance-console + Scenario: Get a tag policy compliance score returns "OK" response + Given operation "GetTagPolicyScore" enabled + And new "GetTagPolicyScore" request + And request contains "policy_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/aaa-governance-console + Scenario: Get a tag policy returns "Bad Request" response + Given operation "GetTagPolicy" enabled + And new "GetTagPolicy" request + And request contains "policy_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/aaa-governance-console + Scenario: Get a tag policy returns "Not Found" response + Given operation "GetTagPolicy" enabled + And new "GetTagPolicy" request + And request contains "policy_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/aaa-governance-console + Scenario: Get a tag policy returns "OK" response + Given operation "GetTagPolicy" enabled + And new "GetTagPolicy" request + And request contains "policy_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/aaa-governance-console + Scenario: List tag policies returns "Bad Request" response + Given operation "ListTagPolicies" enabled + And new "ListTagPolicies" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/aaa-governance-console + Scenario: List tag policies returns "OK" response + Given operation "ListTagPolicies" enabled + And new "ListTagPolicies" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/aaa-governance-console + Scenario: Update a tag policy returns "Bad Request" response + Given operation "UpdateTagPolicy" enabled + And new "UpdateTagPolicy" request + And request contains "policy_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"policy_type": "surfacing", "tag_value_patterns": []}, "id": "123", "type": "tag_policy"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/aaa-governance-console + Scenario: Update a tag policy returns "Not Found" response + Given operation "UpdateTagPolicy" enabled + And new "UpdateTagPolicy" request + And request contains "policy_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"policy_type": "surfacing", "tag_value_patterns": []}, "id": "123", "type": "tag_policy"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/aaa-governance-console + Scenario: Update a tag policy returns "OK" response + Given operation "UpdateTagPolicy" enabled + And new "UpdateTagPolicy" request + And request contains "policy_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"policy_type": "surfacing", "tag_value_patterns": []}, "id": "123", "type": "tag_policy"}} + When the request is sent + Then the response status is 200 OK 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 07db45886a9..e947f19f57c 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 @@ -23,18 +23,6 @@ "type": "safe" } }, - "ListFleetClusters": { - "tag": "Fleet Automation", - "undo": { - "type": "safe" - } - }, - "ListFleetInstrumentedPods": { - "tag": "Fleet Automation", - "undo": { - "type": "safe" - } - }, "ListFleetDeployments": { "tag": "Fleet Automation", "undo": { @@ -2031,6 +2019,78 @@ "type": "safe" } }, + "ListOwnershipInferences": { + "tag": "CSM Ownership", + "undo": { + "type": "safe" + } + }, + "ListOwnershipHistory": { + "tag": "CSM Ownership", + "undo": { + "type": "safe" + } + }, + "GetOwnershipInference": { + "tag": "CSM Ownership", + "undo": { + "type": "safe" + } + }, + "GetOwnershipEvidence": { + "tag": "CSM Ownership", + "undo": { + "type": "safe" + } + }, + "CreateOwnershipFeedback": { + "tag": "CSM Ownership", + "undo": { + "type": "idempotent" + } + }, + "ListOwnershipHistoryByOwnerType": { + "tag": "CSM Ownership", + "undo": { + "type": "safe" + } + }, + "ListCSMAgentlessHosts": { + "tag": "CSM Settings", + "undo": { + "type": "safe" + } + }, + "GetCSMAgentlessHostFacetInfo": { + "tag": "CSM Settings", + "undo": { + "type": "safe" + } + }, + "ListCSMAgentlessHostFacets": { + "tag": "CSM Settings", + "undo": { + "type": "safe" + } + }, + "ListCSMUnifiedHosts": { + "tag": "CSM Settings", + "undo": { + "type": "safe" + } + }, + "GetCSMUnifiedHostFacetInfo": { + "tag": "CSM Settings", + "undo": { + "type": "safe" + } + }, + "ListCSMUnifiedHostFacets": { + "tag": "CSM Settings", + "undo": { + "type": "safe" + } + }, "GetCurrentUser": { "tag": "Users", "undo": { @@ -2105,6 +2165,12 @@ "type": "safe" } }, + "ListSharedDashboardsByDashboardId": { + "tag": "Dashboard Sharing", + "undo": { + "type": "safe" + } + }, "CreateDashboardSecureEmbed": { "tag": "Dashboard Secure Embed", "undo": { @@ -2609,6 +2675,93 @@ "type": "unsafe" } }, + "ListForms": { + "tag": "Forms", + "undo": { + "type": "safe" + } + }, + "CreateForm": { + "tag": "Forms", + "undo": { + "operationId": "DeleteForm", + "parameters": [ + { + "name": "form_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "CreateAndPublishForm": { + "tag": "Forms", + "undo": { + "operationId": "DeleteForm", + "parameters": [ + { + "name": "form_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteForm": { + "tag": "Forms", + "undo": { + "type": "idempotent" + } + }, + "GetForm": { + "tag": "Forms", + "undo": { + "type": "safe" + } + }, + "UpdateForm": { + "tag": "Forms", + "undo": { + "type": "idempotent" + } + }, + "CloneForm": { + "tag": "Forms", + "undo": { + "operationId": "DeleteForm", + "parameters": [ + { + "name": "form_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "PublishForm": { + "tag": "Forms", + "undo": { + "type": "idempotent" + } + }, + "UpsertFormVersion": { + "tag": "Forms", + "undo": { + "type": "idempotent" + } + }, + "UpsertAndPublishFormVersion": { + "tag": "Forms", + "undo": { + "type": "idempotent" + } + }, + "ListGlobalOrgs": { + "tag": "Organizations", + "undo": { + "type": "safe" + } + }, "GetHamrOrgConnection": { "tag": "High Availability MultiRegion", "undo": { @@ -3193,6 +3346,12 @@ "type": "safe" } }, + "ValidateAWSCCMConfig": { + "tag": "AWS Integration", + "undo": { + "type": "safe" + } + }, "ListGCPSTSAccounts": { "tag": "GCP Integration", "undo": { @@ -3236,12 +3395,42 @@ "type": "idempotent" } }, + "ListGoogleChatOrganizations": { + "tag": "Google Chat Integration", + "undo": { + "type": "safe" + } + }, "GetSpaceByDisplayName": { "tag": "Google Chat Integration", "undo": { "type": "safe" } }, + "DeleteGoogleChatOrganization": { + "tag": "Google Chat Integration", + "undo": { + "type": "idempotent" + } + }, + "GetGoogleChatOrganization": { + "tag": "Google Chat Integration", + "undo": { + "type": "safe" + } + }, + "DeleteGoogleChatDelegatedUser": { + "tag": "Google Chat Integration", + "undo": { + "type": "idempotent" + } + }, + "GetGoogleChatDelegatedUser": { + "tag": "Google Chat Integration", + "undo": { + "type": "safe" + } + }, "ListOrganizationHandles": { "tag": "Google Chat Integration", "undo": { @@ -3284,6 +3473,48 @@ "type": "idempotent" } }, + "ListGoogleChatTargetAudiences": { + "tag": "Google Chat Integration", + "undo": { + "type": "safe" + } + }, + "CreateGoogleChatTargetAudience": { + "tag": "Google Chat Integration", + "undo": { + "operationId": "DeleteGoogleChatTargetAudience", + "parameters": [ + { + "name": "organization_binding_id", + "origin": "path", + "source": "organization_binding_id" + }, + { + "name": "target_audience_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteGoogleChatTargetAudience": { + "tag": "Google Chat Integration", + "undo": { + "type": "idempotent" + } + }, + "GetGoogleChatTargetAudience": { + "tag": "Google Chat Integration", + "undo": { + "type": "safe" + } + }, + "UpdateGoogleChatTargetAudience": { + "tag": "Google Chat Integration", + "undo": { + "type": "idempotent" + } + }, "ListJiraAccounts": { "tag": "Jira Integration", "undo": { @@ -3376,6 +3607,12 @@ "type": "idempotent" } }, + "DeleteMSTeamsUserBinding": { + "tag": "Microsoft Teams Integration", + "undo": { + "type": "idempotent" + } + }, "ListWorkflowsWebhookHandles": { "tag": "Microsoft Teams Integration", "undo": { @@ -3628,6 +3865,12 @@ "type": "safe" } }, + "ListSlackUserBindings": { + "tag": "Slack Integration", + "undo": { + "type": "safe" + } + }, "DeleteStatuspageAccount": { "tag": "Statuspage Integration", "undo": { @@ -4005,6 +4248,29 @@ "type": "safe" } }, + "UpsertLLMObsAnnotations": { + "tag": "LLM Observability", + "undo": { + "operationId": "DeleteLLMObsAnnotations", + "parameters": [ + { + "name": "queue_id", + "source": "path.queue_id" + }, + { + "name": "body", + "template": "{\"data\": {\"type\": \"annotations\", \"attributes\": {\"annotation_ids\": [\"{{ data.attributes.annotations[0].id }}\"]}}}" + } + ], + "type": "unsafe" + } + }, + "DeleteLLMObsAnnotations": { + "tag": "LLM Observability", + "undo": { + "type": "idempotent" + } + }, "CreateLLMObsAnnotationQueueInteractions": { "tag": "LLM Observability", "undo": { @@ -4090,6 +4356,12 @@ "type": "idempotent" } }, + "ListLLMObsExperimentEventsV1": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, "CreateLLMObsExperimentEvents": { "tag": "LLM Observability", "undo": { @@ -4155,6 +4427,68 @@ "type": "safe" } }, + "ListLLMObsPatternsClusteredPoints": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, + "ListLLMObsPatternsConfigs": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, + "UpsertLLMObsPatternsConfig": { + "tag": "LLM Observability", + "undo": { + "type": "idempotent" + } + }, + "GetLLMObsPatternsConfig": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, + "DeleteLLMObsPatternsConfig": { + "tag": "LLM Observability", + "undo": { + "type": "idempotent" + } + }, + "ListLLMObsPatternsRuns": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, + "TriggerLLMObsPatterns": { + "tag": "LLM Observability", + "undo": { + "operationId": "TODO", + "parameters": [], + "type": "unsafe" + } + }, + "GetLLMObsPatternsRunStatus": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, + "ListLLMObsPatternsTopics": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, + "ListLLMObsPatternsTopicsWithClusteredPoints": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, "ListLLMObsDatasets": { "tag": "LLM Observability", "undo": { @@ -4270,6 +4604,12 @@ "type": "safe" } }, + "ListLLMObsExperimentEventsV2": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, "UploadLLMObsDatasetRecordsFile": { "tag": "LLM Observability", "undo": { @@ -4282,6 +4622,12 @@ "type": "safe" } }, + "UpdateLoginOrgConfigsMaxSessionDuration": { + "tag": "Organizations", + "undo": { + "type": "idempotent" + } + }, "SubmitLog": { "tag": "Logs", "undo": { @@ -4576,6 +4922,49 @@ "type": "unsafe" } }, + "ListTagIndexingRules": { + "tag": "Metrics", + "undo": { + "type": "safe" + } + }, + "CreateTagIndexingRule": { + "tag": "Metrics", + "undo": { + "operationId": "DeleteTagIndexingRule", + "parameters": [ + { + "name": "id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "ReorderTagIndexingRules": { + "tag": "Metrics", + "undo": { + "type": "idempotent" + } + }, + "DeleteTagIndexingRule": { + "tag": "Metrics", + "undo": { + "type": "idempotent" + } + }, + "GetTagIndexingRule": { + "tag": "Metrics", + "undo": { + "type": "safe" + } + }, + "UpdateTagIndexingRule": { + "tag": "Metrics", + "undo": { + "type": "idempotent" + } + }, "ListActiveMetricConfigurations": { "tag": "Metrics", "undo": { @@ -4606,6 +4995,37 @@ "type": "safe" } }, + "DeleteTagIndexingRuleExemption": { + "tag": "Metrics", + "undo": { + "type": "idempotent" + } + }, + "GetTagIndexingRuleExemption": { + "tag": "Metrics", + "undo": { + "type": "safe" + } + }, + "CreateTagIndexingRuleExemption": { + "tag": "Metrics", + "undo": { + "operationId": "DeleteTagIndexingRuleExemption", + "parameters": [ + { + "name": "metric_name", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "ListTagIndexingRulesForMetric": { + "tag": "Metrics", + "undo": { + "type": "safe" + } + }, "DeleteTagConfiguration": { "tag": "Metrics", "undo": { @@ -4926,6 +5346,12 @@ "type": "idempotent" } }, + "ListNetworkHealthInsights": { + "tag": "Network Health Insights", + "undo": { + "type": "safe" + } + }, "GetAggregatedConnections": { "tag": "Cloud Network Monitoring", "undo": { @@ -5190,6 +5616,18 @@ "type": "safe" } }, + "DisableCustomerOrg": { + "tag": "Customer Org", + "undo": { + "type": "unsafe" + } + }, + "UpdateOrgSamlConfigurations": { + "tag": "Organizations", + "undo": { + "type": "idempotent" + } + }, "ListOrgConfigs": { "tag": "Organizations", "undo": { @@ -5895,6 +6333,19 @@ "type": "idempotent" } }, + "CreateReportSchedule": { + "tag": "Report Schedules", + "undo": { + "type": "unsafe" + } + }, + "PatchReportSchedule": { + "tag": "Report Schedules", + "undo": { + "operationId": "PatchReportSchedule", + "type": "idempotent" + } + }, "DeleteRestrictionPolicy": { "tag": "Restriction Policies", "undo": { @@ -6139,6 +6590,24 @@ "type": "idempotent" } }, + "DeleteRumRateLimitConfig": { + "tag": "Rum Rate Limit", + "undo": { + "type": "idempotent" + } + }, + "GetRumRateLimitConfig": { + "tag": "Rum Rate Limit", + "undo": { + "type": "safe" + } + }, + "UpdateRumRateLimitConfig": { + "tag": "Rum Rate Limit", + "undo": { + "type": "idempotent" + } + }, "ListRUMEvents": { "tag": "RUM", "undo": { @@ -6268,12 +6737,30 @@ "type": "safe" } }, + "ListSAMLConfigurations": { + "tag": "Organizations", + "undo": { + "type": "safe" + } + }, "UploadIdPMetadata": { "tag": "Organizations", "undo": { "type": "idempotent" } }, + "GetSAMLConfiguration": { + "tag": "Organizations", + "undo": { + "type": "safe" + } + }, + "UpdateSAMLConfiguration": { + "tag": "Organizations", + "undo": { + "type": "idempotent" + } + }, "ListScorecardCampaigns": { "tag": "Scorecards", "undo": { @@ -6414,6 +6901,12 @@ "type": "safe" } }, + "UpdateFindingsAssignee": { + "tag": "Security Monitoring", + "undo": { + "type": "idempotent" + } + }, "DetachCase": { "tag": "Security Monitoring", "undo": { @@ -6470,6 +6963,25 @@ "type": "safe" } }, + "AttachServiceNowTicket": { + "tag": "Security Monitoring", + "undo": { + "type": "idempotent" + } + }, + "CreateServiceNowTickets": { + "tag": "Security Monitoring", + "undo": { + "operationId": "DetachCase", + "parameters": [ + { + "name": "body", + "template": "{\n \"data\": {\n \"type\": \"cases\",\n \"relationships\": {\n \"findings\": {\n \"data\": [\n {\n \"type\": \"findings\",\n \"id\": \"{{data[0].attributes.insights[0].resource_id}}\"\n }\n ]\n }\n }\n }\n}" + } + ], + "type": "unsafe" + } + }, "ListAssetsSBOMs": { "tag": "Security Monitoring", "undo": { @@ -6715,6 +7227,12 @@ "type": "safe" } }, + "SendSecurityMonitoringNotificationPreview": { + "tag": "Security Monitoring", + "undo": { + "type": "safe" + } + }, "ListSecurityFilters": { "tag": "Security Monitoring", "undo": { @@ -6898,6 +7416,12 @@ "type": "safe" } }, + "GetSingleEntityContext": { + "tag": "Security Monitoring", + "undo": { + "type": "safe" + } + }, "ListSecurityMonitoringRules": { "tag": "Security Monitoring", "undo": { @@ -6977,6 +7501,12 @@ "type": "idempotent" } }, + "RestoreSecurityMonitoringRule": { + "tag": "Security Monitoring", + "undo": { + "type": "idempotent" + } + }, "TestExistingSecurityMonitoringRule": { "tag": "Security Monitoring", "undo": { @@ -7294,25 +7824,6 @@ "type": "idempotent" } }, - "ListIncidentServices": { - "tag": "Incident Services", - "undo": { - "type": "safe" - } - }, - "CreateIncidentService": { - "tag": "Incident Services", - "undo": { - "operationId": "DeleteIncidentService", - "parameters": [ - { - "name": "service_id", - "source": "data.id" - } - ], - "type": "unsafe" - } - }, "ListServiceDefinitions": { "tag": "Service Definition", "undo": { @@ -7344,24 +7855,6 @@ "type": "safe" } }, - "DeleteIncidentService": { - "tag": "Incident Services", - "undo": { - "type": "idempotent" - } - }, - "GetIncidentService": { - "tag": "Incident Services", - "undo": { - "type": "safe" - } - }, - "UpdateIncidentService": { - "tag": "Incident Services", - "undo": { - "type": "idempotent" - } - }, "ListSecurityMonitoringHistsignals": { "tag": "Security Monitoring", "undo": { @@ -7482,6 +7975,24 @@ "type": "safe" } }, + "CreateSCAScan": { + "tag": "Static Analysis", + "undo": { + "type": "safe" + } + }, + "GetSCAScan": { + "tag": "Static Analysis", + "undo": { + "type": "safe" + } + }, + "ListSCALicenses": { + "tag": "Static Analysis", + "undo": { + "type": "safe" + } + }, "CreateSCAResolveVulnerableSymbols": { "tag": "Static Analysis", "undo": { @@ -7893,6 +8404,12 @@ "type": "idempotent" } }, + "GetStegadographyWidgets": { + "tag": "Stegadography", + "undo": { + "type": "safe" + } + }, "GetApiMultistepSubtests": { "tag": "Synthetics", "undo": { @@ -8138,6 +8655,49 @@ "type": "safe" } }, + "ListTagPolicies": { + "tag": "Tag Policies", + "undo": { + "type": "safe" + } + }, + "CreateTagPolicy": { + "tag": "Tag Policies", + "undo": { + "operationId": "DeleteTagPolicy", + "parameters": [ + { + "name": "policy_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteTagPolicy": { + "tag": "Tag Policies", + "undo": { + "type": "idempotent" + } + }, + "GetTagPolicy": { + "tag": "Tag Policies", + "undo": { + "type": "safe" + } + }, + "UpdateTagPolicy": { + "tag": "Tag Policies", + "undo": { + "type": "idempotent" + } + }, + "GetTagPolicyScore": { + "tag": "Tag Policies", + "undo": { + "type": "safe" + } + }, "ListTagPipelinesRulesets": { "tag": "Cloud Cost Management", "undo": { @@ -8495,6 +9055,12 @@ "type": "safe" } }, + "GetUsageSummaryAvailableFields": { + "tag": "Usage Metering", + "undo": { + "type": "safe" + } + }, "GetUsageAttributionTypes": { "tag": "Usage Metering", "undo": { diff --git a/src/test/resources/com/datadog/api/client/v2/api/usage_metering.feature b/src/test/resources/com/datadog/api/client/v2/api/usage_metering.feature index d953a11c084..ca4cfbd6706 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/usage_metering.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/usage_metering.feature @@ -14,7 +14,7 @@ Feature: Usage Metering And a valid "appKeyAuth" key in the system And an instance of "UsageMetering" API - @replay-only @team:DataDog/revenue-query + @replay-only @team:DataDog/billing-hub Scenario: Get Monthly Cost Attribution returns "Bad Request" response Given new "GetMonthlyCostAttribution" request And request contains "start_month" parameter with value "{{ timeISO('now - 5d') }}" @@ -23,7 +23,7 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @replay-only @team:DataDog/revenue-query + @replay-only @team:DataDog/billing-hub Scenario: Get Monthly Cost Attribution returns "OK" response Given new "GetMonthlyCostAttribution" request And request contains "start_month" parameter with value "{{ timeISO('now - 5d') }}" @@ -32,64 +32,87 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get active billing dimensions for cost attribution returns "Bad Request" response Given new "GetActiveBillingDimensions" request When the request is sent Then the response status is 400 Bad Request - @team:DataDog/revenue-query + @team:DataDog/billing-hub Scenario: Get active billing dimensions for cost attribution returns "OK" response Given new "GetActiveBillingDimensions" request When the request is sent Then the response status is 200 OK - @team:DataDog/revenue-query + @team:DataDog/billing-hub + Scenario: Get available fields for usage summary returns "Bad Request" response + Given new "GetUsageSummaryAvailableFields" request + When the request is sent + Then the response status is 400 Bad Request + + @skip @team:DataDog/billing-hub + Scenario: Get available fields for usage summary returns "OK" response + Given new "GetUsageSummaryAvailableFields" request + When the request is sent + Then the response status is 200 OK + And the response "data.id" is equal to "all" + And the response "data.type" is equal to "usage_summary_available_fields" + And the response "data.attributes" has field "response_fields" + And the response "data.attributes" has field "date_fields" + And the response "data.attributes" has field "date_org_fields" + + @generated @skip @team:DataDog/billing-hub + Scenario: Get available fields for usage summary returns "OK." response + Given new "GetUsageSummaryAvailableFields" request + When the request is sent + Then the response status is 200 OK. + + @team:DataDog/billing-hub Scenario: Get billing dimension mapping for usage endpoints returns "Bad Request" response Given new "GetBillingDimensionMapping" request When the request is sent Then the response status is 400 Bad Request - @skip @team:DataDog/revenue-query + @skip @team:DataDog/billing-hub Scenario: Get billing dimension mapping for usage endpoints returns "OK" response Given new "GetBillingDimensionMapping" request When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get cost across multi-org account returns "Bad Request" response Given new "GetCostByOrg" request And request contains "start_month" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request - @replay-only @team:DataDog/revenue-query + @replay-only @team:DataDog/billing-hub Scenario: Get cost across multi-org account returns "OK" response Given new "GetCostByOrg" request And request contains "start_month" parameter with value "{{ timeISO('now - 3d') }}" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get estimated cost across your account returns "Bad Request" response Given new "GetEstimatedCostByOrg" request When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get estimated cost across your account returns "OK" response Given new "GetEstimatedCostByOrg" request When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get historical cost across your account returns "Bad Request" response Given new "GetHistoricalCostByOrg" request And request contains "start_month" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request - @replay-only @team:DataDog/revenue-query + @replay-only @team:DataDog/billing-hub Scenario: Get historical cost across your account returns "OK" response Given new "GetHistoricalCostByOrg" request And request contains "start_month" parameter with value "{{ timeISO('now - 2M') }}" @@ -97,7 +120,7 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @team:DataDog/revenue-query + @team:DataDog/billing-hub Scenario: Get hourly usage by product family returns "Bad Request" response Given new "GetHourlyUsage" request And request contains "filter[timestamp][start]" parameter with value "{{ timeISO('now - 3d') }}" @@ -106,7 +129,7 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @team:DataDog/revenue-query + @team:DataDog/billing-hub Scenario: Get hourly usage by product family returns "OK" response Given new "GetHourlyUsage" request And request contains "filter[timestamp][start]" parameter with value "{{ timeISO('now - 3d') }}" @@ -116,7 +139,7 @@ Feature: Usage Metering And the response "data[0].type" is equal to "usage_timeseries" And the response "data[0].attributes.region" is equal to "us" - @team:DataDog/revenue-query + @team:DataDog/billing-hub Scenario: Get hourly usage for Application Security returns "Bad Request" response Given new "GetUsageApplicationSecurityMonitoring" request And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" @@ -124,7 +147,7 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @team:DataDog/revenue-query + @team:DataDog/billing-hub Scenario: Get hourly usage for Lambda traced invocations returns "Bad Request" response Given new "GetUsageLambdaTracedInvocations" request And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" @@ -132,7 +155,7 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @team:DataDog/revenue-query + @team:DataDog/billing-hub Scenario: Get hourly usage for Lambda traced invocations returns "OK" response Given new "GetUsageLambdaTracedInvocations" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -142,7 +165,7 @@ Feature: Usage Metering And the response "data[0].type" is equal to "usage_timeseries" And the response "data[0].attributes.product_family" is equal to "lambda-traced-invocations" - @team:DataDog/revenue-query + @team:DataDog/billing-hub Scenario: Get hourly usage for Observability Pipelines returns "Bad Request" response Given new "GetUsageObservabilityPipelines" request And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" @@ -150,14 +173,14 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get hourly usage for application security returns "Bad Request" response Given new "GetUsageApplicationSecurityMonitoring" request And request contains "start_hr" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request - @team:DataDog/revenue-query + @team:DataDog/billing-hub Scenario: Get hourly usage for application security returns "OK" response Given new "GetUsageApplicationSecurityMonitoring" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -167,14 +190,14 @@ Feature: Usage Metering And the response "data[0].type" is equal to "usage_timeseries" And the response "data[0].attributes.product_family" is equal to "app-sec" - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get hourly usage for observability pipelines returns "Bad Request" response Given new "GetUsageObservabilityPipelines" request And request contains "start_hr" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request - @team:DataDog/revenue-query + @team:DataDog/billing-hub Scenario: Get hourly usage for observability pipelines returns "OK" response Given new "GetUsageObservabilityPipelines" request And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" @@ -184,26 +207,26 @@ Feature: Usage Metering And the response "data[0].type" is equal to "usage_timeseries" And the response "data[0].attributes.product_family" is equal to "observability-pipelines" - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get projected cost across your account returns "Bad Request" response Given new "GetProjectedCost" request When the request is sent Then the response status is 400 Bad Request - @replay-only @team:DataDog/revenue-query + @replay-only @team:DataDog/billing-hub Scenario: Get projected cost across your account returns "OK" response Given new "GetProjectedCost" request And request contains "view" parameter with value "sub-org" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/revenue-query + @generated @skip @team:DataDog/billing-hub Scenario: Get usage attribution types returns "OK" response Given new "GetUsageAttributionTypes" request When the request is sent Then the response status is 200 OK - @team:DataDog/revenue-query + @team:DataDog/billing-hub Scenario: GetEstimatedCostByOrg with both start_month and start_date returns "Bad Request" response Given new "GetEstimatedCostByOrg" request And request contains "view" parameter with value "sub-org" @@ -212,7 +235,7 @@ Feature: Usage Metering When the request is sent Then the response status is 400 Bad Request - @replay-only @team:DataDog/revenue-query + @replay-only @team:DataDog/billing-hub Scenario: GetEstimatedCostByOrg with start_month returns "OK" response Given new "GetEstimatedCostByOrg" request And request contains "view" parameter with value "sub-org"