diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 91955c670c9..ff4bd1b9d24 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -83218,6 +83218,296 @@ components: description: A session identifier used for logging and tracing the assumed role session. type: string type: object + ObservabilityPipelineAzureDataExplorerDestination: + description: |- + The `azure_data_explorer` destination sends log events to an Azure Data Explorer table. + + **Supported pipeline types:** logs + properties: + auth: + $ref: "#/components/schemas/ObservabilityPipelineAzureDataExplorerDestinationAuth" + batch: + $ref: "#/components/schemas/ObservabilityPipelineAzureDataExplorerDestinationBatch" + buffer: + $ref: "#/components/schemas/ObservabilityPipelineBufferOptions" + compression: + $ref: "#/components/schemas/ObservabilityPipelineAzureStorageDestinationCompressionGzip" + database: + description: The name of the Azure Data Explorer database to ingest into. Supports template syntax. + example: logs_db + type: string + id: + description: The unique identifier for this component. + example: azure-data-explorer-destination + type: string + ingestion_endpoint_key: + description: |- + Name of the environment variable or secret that holds the Azure Data Explorer ingestion endpoint URL. + Defaults to `DESTINATION_AZURE_DATA_EXPLORER_INGESTION_ENDPOINT` (prefixed with `DD_OP_` at runtime). + example: AZURE_DATA_EXPLORER_INGESTION_ENDPOINT + type: string + inputs: + description: A list of component IDs whose output is used as the `input` for this component. + example: ["filter-processor"] + items: + description: The ID of a component whose output is used as input for this destination. + type: string + type: array + mapping_reference: + description: The name of a pre-created ingestion mapping on the table used to map incoming events to columns. Supports template syntax. + example: application_logs_mapping + nullable: true + type: string + table: + description: The name of the Azure Data Explorer table to ingest into. Supports template syntax. + example: application_logs + type: string + token_scope: + description: |- + The OAuth scope requested when acquiring an access token for Azure Data Explorer. + Defaults to `https://kusto.kusto.windows.net/.default`. + example: https://kusto.kusto.windows.net/.default + type: string + type: + $ref: "#/components/schemas/ObservabilityPipelineAzureDataExplorerDestinationType" + required: + - id + - type + - inputs + - database + - table + - auth + type: object + x-pipeline-types: [logs] + ObservabilityPipelineAzureDataExplorerDestinationAuth: + description: Authentication configuration for Azure Data Explorer. The `azure_credential_kind` field selects the credential type. + oneOf: + - $ref: "#/components/schemas/ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli" + - $ref: "#/components/schemas/ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret" + - $ref: "#/components/schemas/ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate" + - $ref: "#/components/schemas/ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity" + - $ref: "#/components/schemas/ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion" + - $ref: "#/components/schemas/ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity" + ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli: + description: Authenticate using the Azure CLI credentials available in the environment. + properties: + azure_credential_kind: + $ref: "#/components/schemas/ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCliKind" + required: + - azure_credential_kind + type: object + ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCliKind: + default: azure_cli + description: The Azure credential kind. The value should always be `azure_cli`. + enum: + - azure_cli + example: azure_cli + type: string + x-enum-varnames: + - AZURE_CLI + ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate: + description: Authenticate using a Microsoft Entra application client certificate. + properties: + azure_client_id: + description: The Microsoft Entra application (client) ID. + example: 22222222-2222-2222-2222-222222222222 + type: string + azure_credential_kind: + $ref: "#/components/schemas/ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificateKind" + azure_tenant_id: + description: The Microsoft Entra tenant ID. + example: 11111111-1111-1111-1111-111111111111 + type: string + certificate_password_key: + description: Name of the environment variable or secret that holds the password for the client certificate. + example: AZURE_CERTIFICATE_PASSWORD + nullable: true + type: string + certificate_path: + description: Path to the `.pfx` client certificate file on the Worker. + example: /etc/certs/client.pfx + type: string + required: + - azure_credential_kind + - azure_tenant_id + - azure_client_id + - certificate_path + type: object + ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificateKind: + default: client_certificate_credential + description: The Azure credential kind. The value should always be `client_certificate_credential`. + enum: + - client_certificate_credential + example: client_certificate_credential + type: string + x-enum-varnames: + - CLIENT_CERTIFICATE_CREDENTIAL + ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret: + description: Authenticate using a Microsoft Entra application client secret. + properties: + azure_client_id: + description: The Microsoft Entra application (client) ID. + example: 22222222-2222-2222-2222-222222222222 + type: string + azure_client_secret_key: + description: Name of the environment variable or secret that holds the Microsoft Entra application client secret. + example: AZURE_CLIENT_SECRET + type: string + azure_credential_kind: + $ref: "#/components/schemas/ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecretKind" + azure_tenant_id: + description: The Microsoft Entra tenant ID. + example: 11111111-1111-1111-1111-111111111111 + type: string + required: + - azure_credential_kind + - azure_tenant_id + - azure_client_id + - azure_client_secret_key + type: object + ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecretKind: + default: client_secret_credential + description: The Azure credential kind. The value should always be `client_secret_credential`. + enum: + - client_secret_credential + example: client_secret_credential + type: string + x-enum-varnames: + - CLIENT_SECRET_CREDENTIAL + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity: + description: Authenticate using an Azure managed identity. + properties: + azure_credential_kind: + $ref: "#/components/schemas/ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityKind" + user_assigned_managed_identity_id: + description: The ID of the user-assigned managed identity. If omitted, the system-assigned managed identity is used. + example: 00000000-0000-0000-0000-000000000000 + nullable: true + type: string + user_assigned_managed_identity_id_type: + $ref: "#/components/schemas/ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdType" + required: + - azure_credential_kind + type: object + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion: + description: Authenticate using a managed identity as a client assertion for a Microsoft Entra application. + properties: + azure_credential_kind: + $ref: "#/components/schemas/ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertionKind" + client_assertion_client_id: + description: The client ID of the Microsoft Entra application that trusts the managed identity. + example: 22222222-2222-2222-2222-222222222222 + type: string + client_assertion_tenant_id: + description: The tenant ID of the Microsoft Entra application that trusts the managed identity. + example: 11111111-1111-1111-1111-111111111111 + type: string + user_assigned_managed_identity_id: + description: The ID of the user-assigned managed identity. If omitted, the system-assigned managed identity is used. + example: 00000000-0000-0000-0000-000000000000 + nullable: true + type: string + user_assigned_managed_identity_id_type: + $ref: "#/components/schemas/ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdType" + required: + - azure_credential_kind + - client_assertion_client_id + - client_assertion_tenant_id + type: object + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertionKind: + default: managed_identity_client_assertion + description: The Azure credential kind. The value should always be `managed_identity_client_assertion`. + enum: + - managed_identity_client_assertion + example: managed_identity_client_assertion + type: string + x-enum-varnames: + - MANAGED_IDENTITY_CLIENT_ASSERTION + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityKind: + default: managed_identity + description: The Azure credential kind. The value should always be `managed_identity`. + enum: + - managed_identity + example: managed_identity + type: string + x-enum-varnames: + - MANAGED_IDENTITY + ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity: + description: Authenticate using Azure Workload Identity (for example, on Kubernetes). + properties: + azure_credential_kind: + $ref: "#/components/schemas/ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentityKind" + client_id: + description: The client ID of the Microsoft Entra application. If omitted, it is read from the environment. + example: 22222222-2222-2222-2222-222222222222 + nullable: true + type: string + tenant_id: + description: The Microsoft Entra tenant ID. If omitted, it is read from the environment. + example: 11111111-1111-1111-1111-111111111111 + nullable: true + type: string + token_file_path: + description: Path to the federated token file. If omitted, it is read from the environment. + example: /var/run/secrets/azure/tokens/azure-identity-token + nullable: true + type: string + required: + - azure_credential_kind + type: object + ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentityKind: + default: workload_identity + description: The Azure credential kind. The value should always be `workload_identity`. + enum: + - workload_identity + example: workload_identity + type: string + x-enum-varnames: + - WORKLOAD_IDENTITY + ObservabilityPipelineAzureDataExplorerDestinationBatch: + description: Event batching settings for Azure Data Explorer ingestion. + properties: + max_bytes: + description: Maximum batch size in bytes. + example: 2000000 + format: int64 + maximum: 4000000 + minimum: 1 + type: integer + max_events: + description: Maximum number of events per batch before it is flushed. + example: 1000 + format: int64 + minimum: 1 + type: integer + timeout_secs: + description: Maximum number of seconds to wait before flushing a partial batch. + example: 1 + format: int64 + minimum: 1 + type: integer + type: object + ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdType: + description: The type of the user-assigned managed identity ID. + enum: + - client_id + - object_id + - resource_id + example: client_id + type: string + x-enum-varnames: + - CLIENT_ID + - OBJECT_ID + - RESOURCE_ID + ObservabilityPipelineAzureDataExplorerDestinationType: + default: azure_data_explorer + description: The destination type. The value should always be `azure_data_explorer`. + enum: + - azure_data_explorer + example: azure_data_explorer + type: string + x-enum-varnames: + - AZURE_DATA_EXPLORER ObservabilityPipelineAzureStorageDestinationCompression: description: |- Compression configuration for archived logs. When omitted, logs are compressed with gzip @@ -83630,6 +83920,7 @@ components: - $ref: "#/components/schemas/ObservabilityPipelineAmazonS3GenericDestination" - $ref: "#/components/schemas/ObservabilityPipelineAmazonSecurityLakeDestination" - $ref: "#/components/schemas/AzureStorageDestination" + - $ref: "#/components/schemas/ObservabilityPipelineAzureDataExplorerDestination" - $ref: "#/components/schemas/ObservabilityPipelineClickhouseDestination" - $ref: "#/components/schemas/ObservabilityPipelineCloudPremDestination" - $ref: "#/components/schemas/ObservabilityPipelineCrowdStrikeNextGenSiemDestination" diff --git a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestination.java b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestination.java new file mode 100644 index 00000000000..0c5ac90e752 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestination.java @@ -0,0 +1,534 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import 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 azure_data_explorer destination sends log events to an Azure Data Explorer + * table. + * + *

Supported pipeline types: logs + */ +@JsonPropertyOrder({ + ObservabilityPipelineAzureDataExplorerDestination.JSON_PROPERTY_AUTH, + ObservabilityPipelineAzureDataExplorerDestination.JSON_PROPERTY_BATCH, + ObservabilityPipelineAzureDataExplorerDestination.JSON_PROPERTY_BUFFER, + ObservabilityPipelineAzureDataExplorerDestination.JSON_PROPERTY_COMPRESSION, + ObservabilityPipelineAzureDataExplorerDestination.JSON_PROPERTY_DATABASE, + ObservabilityPipelineAzureDataExplorerDestination.JSON_PROPERTY_ID, + ObservabilityPipelineAzureDataExplorerDestination.JSON_PROPERTY_INGESTION_ENDPOINT_KEY, + ObservabilityPipelineAzureDataExplorerDestination.JSON_PROPERTY_INPUTS, + ObservabilityPipelineAzureDataExplorerDestination.JSON_PROPERTY_MAPPING_REFERENCE, + ObservabilityPipelineAzureDataExplorerDestination.JSON_PROPERTY_TABLE, + ObservabilityPipelineAzureDataExplorerDestination.JSON_PROPERTY_TOKEN_SCOPE, + ObservabilityPipelineAzureDataExplorerDestination.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ObservabilityPipelineAzureDataExplorerDestination { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTH = "auth"; + private ObservabilityPipelineAzureDataExplorerDestinationAuth auth; + + public static final String JSON_PROPERTY_BATCH = "batch"; + private ObservabilityPipelineAzureDataExplorerDestinationBatch batch; + + public static final String JSON_PROPERTY_BUFFER = "buffer"; + private ObservabilityPipelineBufferOptions buffer; + + public static final String JSON_PROPERTY_COMPRESSION = "compression"; + private ObservabilityPipelineAzureStorageDestinationCompressionGzip compression; + + public static final String JSON_PROPERTY_DATABASE = "database"; + private String database; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_INGESTION_ENDPOINT_KEY = "ingestion_endpoint_key"; + private String ingestionEndpointKey; + + public static final String JSON_PROPERTY_INPUTS = "inputs"; + private List inputs = new ArrayList<>(); + + public static final String JSON_PROPERTY_MAPPING_REFERENCE = "mapping_reference"; + private JsonNullable mappingReference = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TABLE = "table"; + private String table; + + public static final String JSON_PROPERTY_TOKEN_SCOPE = "token_scope"; + private String tokenScope; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ObservabilityPipelineAzureDataExplorerDestinationType type = + ObservabilityPipelineAzureDataExplorerDestinationType.AZURE_DATA_EXPLORER; + + public ObservabilityPipelineAzureDataExplorerDestination() {} + + @JsonCreator + public ObservabilityPipelineAzureDataExplorerDestination( + @JsonProperty(required = true, value = JSON_PROPERTY_AUTH) + ObservabilityPipelineAzureDataExplorerDestinationAuth auth, + @JsonProperty(required = true, value = JSON_PROPERTY_DATABASE) String database, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_INPUTS) List inputs, + @JsonProperty(required = true, value = JSON_PROPERTY_TABLE) String table, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + ObservabilityPipelineAzureDataExplorerDestinationType type) { + this.auth = auth; + this.unparsed |= auth.unparsed; + this.database = database; + this.id = id; + this.inputs = inputs; + this.table = table; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ObservabilityPipelineAzureDataExplorerDestination auth( + ObservabilityPipelineAzureDataExplorerDestinationAuth auth) { + this.auth = auth; + this.unparsed |= auth.unparsed; + return this; + } + + /** + * Authentication configuration for Azure Data Explorer. The azure_credential_kind + * field selects the credential type. + * + * @return auth + */ + @JsonProperty(JSON_PROPERTY_AUTH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ObservabilityPipelineAzureDataExplorerDestinationAuth getAuth() { + return auth; + } + + public void setAuth(ObservabilityPipelineAzureDataExplorerDestinationAuth auth) { + this.auth = auth; + if (auth != null) { + this.unparsed |= auth.unparsed; + } + } + + public ObservabilityPipelineAzureDataExplorerDestination batch( + ObservabilityPipelineAzureDataExplorerDestinationBatch batch) { + this.batch = batch; + this.unparsed |= batch.unparsed; + return this; + } + + /** + * Event batching settings for Azure Data Explorer ingestion. + * + * @return batch + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BATCH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ObservabilityPipelineAzureDataExplorerDestinationBatch getBatch() { + return batch; + } + + public void setBatch(ObservabilityPipelineAzureDataExplorerDestinationBatch batch) { + this.batch = batch; + if (batch != null) { + this.unparsed |= batch.unparsed; + } + } + + public ObservabilityPipelineAzureDataExplorerDestination buffer( + ObservabilityPipelineBufferOptions buffer) { + this.buffer = buffer; + this.unparsed |= buffer.unparsed; + return this; + } + + /** + * Configuration for buffer settings on destination components. + * + * @return buffer + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BUFFER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ObservabilityPipelineBufferOptions getBuffer() { + return buffer; + } + + public void setBuffer(ObservabilityPipelineBufferOptions buffer) { + this.buffer = buffer; + if (buffer != null) { + this.unparsed |= buffer.unparsed; + } + } + + public ObservabilityPipelineAzureDataExplorerDestination compression( + ObservabilityPipelineAzureStorageDestinationCompressionGzip compression) { + this.compression = compression; + this.unparsed |= compression.unparsed; + return this; + } + + /** + * Gzip compression. + * + * @return compression + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPRESSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ObservabilityPipelineAzureStorageDestinationCompressionGzip getCompression() { + return compression; + } + + public void setCompression( + ObservabilityPipelineAzureStorageDestinationCompressionGzip compression) { + this.compression = compression; + if (compression != null) { + this.unparsed |= compression.unparsed; + } + } + + public ObservabilityPipelineAzureDataExplorerDestination database(String database) { + this.database = database; + return this; + } + + /** + * The name of the Azure Data Explorer database to ingest into. Supports template syntax. + * + * @return database + */ + @JsonProperty(JSON_PROPERTY_DATABASE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDatabase() { + return database; + } + + public void setDatabase(String database) { + this.database = database; + } + + public ObservabilityPipelineAzureDataExplorerDestination id(String id) { + this.id = id; + return this; + } + + /** + * The unique identifier for this component. + * + * @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 ObservabilityPipelineAzureDataExplorerDestination ingestionEndpointKey( + String ingestionEndpointKey) { + this.ingestionEndpointKey = ingestionEndpointKey; + return this; + } + + /** + * Name of the environment variable or secret that holds the Azure Data Explorer ingestion + * endpoint URL. Defaults to DESTINATION_AZURE_DATA_EXPLORER_INGESTION_ENDPOINT + * (prefixed with DD_OP_ at runtime). + * + * @return ingestionEndpointKey + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INGESTION_ENDPOINT_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIngestionEndpointKey() { + return ingestionEndpointKey; + } + + public void setIngestionEndpointKey(String ingestionEndpointKey) { + this.ingestionEndpointKey = ingestionEndpointKey; + } + + public ObservabilityPipelineAzureDataExplorerDestination inputs(List inputs) { + this.inputs = inputs; + return this; + } + + public ObservabilityPipelineAzureDataExplorerDestination addInputsItem(String inputsItem) { + this.inputs.add(inputsItem); + return this; + } + + /** + * A list of component IDs whose output is used as the input for this component. + * + * @return inputs + */ + @JsonProperty(JSON_PROPERTY_INPUTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getInputs() { + return inputs; + } + + public void setInputs(List inputs) { + this.inputs = inputs; + } + + public ObservabilityPipelineAzureDataExplorerDestination mappingReference( + String mappingReference) { + this.mappingReference = JsonNullable.of(mappingReference); + return this; + } + + /** + * The name of a pre-created ingestion mapping on the table used to map incoming events to + * columns. Supports template syntax. + * + * @return mappingReference + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getMappingReference() { + return mappingReference.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_MAPPING_REFERENCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getMappingReference_JsonNullable() { + return mappingReference; + } + + @JsonProperty(JSON_PROPERTY_MAPPING_REFERENCE) + public void setMappingReference_JsonNullable(JsonNullable mappingReference) { + this.mappingReference = mappingReference; + } + + public void setMappingReference(String mappingReference) { + this.mappingReference = JsonNullable.of(mappingReference); + } + + public ObservabilityPipelineAzureDataExplorerDestination table(String table) { + this.table = table; + return this; + } + + /** + * The name of the Azure Data Explorer table to ingest into. Supports template syntax. + * + * @return table + */ + @JsonProperty(JSON_PROPERTY_TABLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getTable() { + return table; + } + + public void setTable(String table) { + this.table = table; + } + + public ObservabilityPipelineAzureDataExplorerDestination tokenScope(String tokenScope) { + this.tokenScope = tokenScope; + return this; + } + + /** + * The OAuth scope requested when acquiring an access token for Azure Data Explorer. Defaults to + * https://kusto.kusto.windows.net/.default. + * + * @return tokenScope + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOKEN_SCOPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTokenScope() { + return tokenScope; + } + + public void setTokenScope(String tokenScope) { + this.tokenScope = tokenScope; + } + + public ObservabilityPipelineAzureDataExplorerDestination type( + ObservabilityPipelineAzureDataExplorerDestinationType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The destination type. The value should always be azure_data_explorer. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ObservabilityPipelineAzureDataExplorerDestinationType getType() { + return type; + } + + public void setType(ObservabilityPipelineAzureDataExplorerDestinationType 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 ObservabilityPipelineAzureDataExplorerDestination + */ + @JsonAnySetter + public ObservabilityPipelineAzureDataExplorerDestination putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ObservabilityPipelineAzureDataExplorerDestination object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ObservabilityPipelineAzureDataExplorerDestination + observabilityPipelineAzureDataExplorerDestination = + (ObservabilityPipelineAzureDataExplorerDestination) o; + return Objects.equals(this.auth, observabilityPipelineAzureDataExplorerDestination.auth) + && Objects.equals(this.batch, observabilityPipelineAzureDataExplorerDestination.batch) + && Objects.equals(this.buffer, observabilityPipelineAzureDataExplorerDestination.buffer) + && Objects.equals( + this.compression, observabilityPipelineAzureDataExplorerDestination.compression) + && Objects.equals(this.database, observabilityPipelineAzureDataExplorerDestination.database) + && Objects.equals(this.id, observabilityPipelineAzureDataExplorerDestination.id) + && Objects.equals( + this.ingestionEndpointKey, + observabilityPipelineAzureDataExplorerDestination.ingestionEndpointKey) + && Objects.equals(this.inputs, observabilityPipelineAzureDataExplorerDestination.inputs) + && Objects.equals( + this.mappingReference, + observabilityPipelineAzureDataExplorerDestination.mappingReference) + && Objects.equals(this.table, observabilityPipelineAzureDataExplorerDestination.table) + && Objects.equals( + this.tokenScope, observabilityPipelineAzureDataExplorerDestination.tokenScope) + && Objects.equals(this.type, observabilityPipelineAzureDataExplorerDestination.type) + && Objects.equals( + this.additionalProperties, + observabilityPipelineAzureDataExplorerDestination.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + auth, + batch, + buffer, + compression, + database, + id, + ingestionEndpointKey, + inputs, + mappingReference, + table, + tokenScope, + type, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ObservabilityPipelineAzureDataExplorerDestination {\n"); + sb.append(" auth: ").append(toIndentedString(auth)).append("\n"); + sb.append(" batch: ").append(toIndentedString(batch)).append("\n"); + sb.append(" buffer: ").append(toIndentedString(buffer)).append("\n"); + sb.append(" compression: ").append(toIndentedString(compression)).append("\n"); + sb.append(" database: ").append(toIndentedString(database)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" ingestionEndpointKey: ") + .append(toIndentedString(ingestionEndpointKey)) + .append("\n"); + sb.append(" inputs: ").append(toIndentedString(inputs)).append("\n"); + sb.append(" mappingReference: ").append(toIndentedString(mappingReference)).append("\n"); + sb.append(" table: ").append(toIndentedString(table)).append("\n"); + sb.append(" tokenScope: ").append(toIndentedString(tokenScope)).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/ObservabilityPipelineAzureDataExplorerDestinationAuth.java b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuth.java new file mode 100644 index 00000000000..bac719bbcf4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuth.java @@ -0,0 +1,815 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This 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 = + ObservabilityPipelineAzureDataExplorerDestinationAuth + .ObservabilityPipelineAzureDataExplorerDestinationAuthDeserializer.class) +@JsonSerialize( + using = + ObservabilityPipelineAzureDataExplorerDestinationAuth + .ObservabilityPipelineAzureDataExplorerDestinationAuthSerializer.class) +public class ObservabilityPipelineAzureDataExplorerDestinationAuth extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(ObservabilityPipelineAzureDataExplorerDestinationAuth.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class ObservabilityPipelineAzureDataExplorerDestinationAuthSerializer + extends StdSerializer { + public ObservabilityPipelineAzureDataExplorerDestinationAuthSerializer( + Class t) { + super(t); + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuthSerializer() { + this(null); + } + + @Override + public void serialize( + ObservabilityPipelineAzureDataExplorerDestinationAuth value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class ObservabilityPipelineAzureDataExplorerDestinationAuthDeserializer + extends StdDeserializer { + public ObservabilityPipelineAzureDataExplorerDestinationAuthDeserializer() { + this(ObservabilityPipelineAzureDataExplorerDestinationAuth.class); + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuthDeserializer(Class vc) { + super(vc); + } + + @Override + public ObservabilityPipelineAzureDataExplorerDestinationAuth 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 ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli.class.equals( + Integer.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli.class.equals( + Long.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli.class.equals( + Float.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli.class.equals( + Double.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli.class.equals( + Boolean.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli.class.equals( + String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli.class.equals( + Integer.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli.class + .equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli.class.equals( + Float.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli.class + .equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli.class.equals( + Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli.class.equals( + String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema" + + " 'ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli'", + e); + } + + // deserialize ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret.class.equals( + Integer.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret.class.equals( + Long.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret.class.equals( + Float.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret.class.equals( + Double.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret.class.equals( + Boolean.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret.class.equals( + String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret.class.equals( + Integer.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret.class + .equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret.class.equals( + Float.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret.class + .equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret.class.equals( + Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret.class.equals( + String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs( + ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema" + + " 'ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret'", + e); + } + + // deserialize ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate.class.equals( + Integer.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate.class.equals( + Long.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate.class.equals( + Float.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate.class.equals( + Double.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate.class.equals( + Boolean.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate.class.equals( + String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate.class + .equals(Integer.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate + .class + .equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate.class + .equals(Float.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate + .class + .equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate.class + .equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate.class + .equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs( + ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate) tmp) + .unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema" + + " 'ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate'", + e); + } + + // deserialize ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity.class.equals( + Integer.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity.class.equals( + Long.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity.class.equals( + Float.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity.class.equals( + Double.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity.class.equals( + Boolean.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity.class.equals( + String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity.class.equals( + Integer.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity + .class + .equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity.class.equals( + Float.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity + .class + .equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity.class.equals( + Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity.class.equals( + String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs( + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity) tmp) + .unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema" + + " 'ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity'", + e); + } + + // deserialize + // ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + .class + .equals(Integer.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + .class + .equals(Long.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + .class + .equals(Float.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + .class + .equals(Double.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + .class + .equals(Boolean.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + .class + .equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + .class + .equals(Integer.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + .class + .equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + .class + .equals(Float.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + .class + .equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + .class + .equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + .class + .equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs( + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + .class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion) + tmp) + .unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema" + + " 'ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion'", + e); + } + + // deserialize ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity.class.equals( + Integer.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity.class.equals( + Long.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity.class.equals( + Float.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity.class.equals( + Double.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity.class.equals( + Boolean.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity.class.equals( + String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity.class + .equals(Integer.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity + .class + .equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity.class + .equals(Float.class) + || ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity + .class + .equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity.class.equals( + Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity.class.equals( + String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs( + ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity) tmp) + .unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema" + + " 'ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema" + + " 'ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity'", + e); + } + + ObservabilityPipelineAzureDataExplorerDestinationAuth ret = + new ObservabilityPipelineAzureDataExplorerDestinationAuth(); + 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 ObservabilityPipelineAzureDataExplorerDestinationAuth getNullValue( + DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "ObservabilityPipelineAzureDataExplorerDestinationAuth cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public ObservabilityPipelineAzureDataExplorerDestinationAuth() { + super("oneOf", Boolean.FALSE); + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuth( + ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuth( + ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuth( + ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuth( + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuth( + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuth( + ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put( + "ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli", + new GenericType() {}); + schemas.put( + "ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret", + new GenericType() {}); + schemas.put( + "ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate", + new GenericType< + ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate>() {}); + schemas.put( + "ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity", + new GenericType() {}); + schemas.put( + "ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion", + new GenericType< + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion>() {}); + schemas.put( + "ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity", + new GenericType< + ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity>() {}); + JSON.registerDescendants( + ObservabilityPipelineAzureDataExplorerDestinationAuth.class, + Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return ObservabilityPipelineAzureDataExplorerDestinationAuth.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli, + * ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret, + * ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate, + * ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity, + * ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion, + * ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity + * + *

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( + ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli.class, + instance, + new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret.class, + instance, + new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate.class, + instance, + new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity.class, + instance, + new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion.class, + instance, + new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf( + ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity.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" + + " ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli," + + " ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret," + + " ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate," + + " ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity," + + " ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion," + + " ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity"); + } + + /** + * Get the actual instance, which can be the following: + * ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli, + * ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret, + * ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate, + * ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity, + * ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion, + * ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity + * + * @return The actual instance (ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli, + * ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret, + * ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate, + * ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity, + * ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion, + * ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli`. If + * the actual instance is not `ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli` + * @throws ClassCastException if the instance is not + * `ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli` + */ + public ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli + getObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli() throws ClassCastException { + return (ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli) + super.getActualInstance(); + } + + /** + * Get the actual instance of `ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret`. + * If the actual instance is not + * `ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret`, the ClassCastException + * will be thrown. + * + * @return The actual instance of + * `ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret` + * @throws ClassCastException if the instance is not + * `ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret` + */ + public ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret + getObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret() + throws ClassCastException { + return (ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret) + super.getActualInstance(); + } + + /** + * Get the actual instance of + * `ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate`. If the actual + * instance is not `ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate`, the + * ClassCastException will be thrown. + * + * @return The actual instance of + * `ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate` + * @throws ClassCastException if the instance is not + * `ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate` + */ + public ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate + getObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate() + throws ClassCastException { + return (ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate) + super.getActualInstance(); + } + + /** + * Get the actual instance of + * `ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity`. If the actual instance + * is not `ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity`, the + * ClassCastException will be thrown. + * + * @return The actual instance of + * `ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity` + * @throws ClassCastException if the instance is not + * `ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity` + */ + public ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity + getObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity() + throws ClassCastException { + return (ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity) + super.getActualInstance(); + } + + /** + * Get the actual instance of + * `ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion`. If the + * actual instance is not + * `ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion`, the + * ClassCastException will be thrown. + * + * @return The actual instance of + * `ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion` + * @throws ClassCastException if the instance is not + * `ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion` + */ + public ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + getObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion() + throws ClassCastException { + return (ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion) + super.getActualInstance(); + } + + /** + * Get the actual instance of + * `ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity`. If the actual instance + * is not `ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity`, the + * ClassCastException will be thrown. + * + * @return The actual instance of + * `ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity` + * @throws ClassCastException if the instance is not + * `ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity` + */ + public ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity + getObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity() + throws ClassCastException { + return (ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity) + super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli.java b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli.java new file mode 100644 index 00000000000..fd486298d2a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli.java @@ -0,0 +1,167 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Authenticate using the Azure CLI credentials available in the environment. */ +@JsonPropertyOrder({ + ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli.JSON_PROPERTY_AZURE_CREDENTIAL_KIND +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AZURE_CREDENTIAL_KIND = "azure_credential_kind"; + private ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCliKind azureCredentialKind = + ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCliKind.AZURE_CLI; + + public ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli() {} + + @JsonCreator + public ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli( + @JsonProperty(required = true, value = JSON_PROPERTY_AZURE_CREDENTIAL_KIND) + ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCliKind azureCredentialKind) { + this.azureCredentialKind = azureCredentialKind; + this.unparsed |= !azureCredentialKind.isValid(); + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli azureCredentialKind( + ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCliKind azureCredentialKind) { + this.azureCredentialKind = azureCredentialKind; + this.unparsed |= !azureCredentialKind.isValid(); + return this; + } + + /** + * The Azure credential kind. The value should always be azure_cli. + * + * @return azureCredentialKind + */ + @JsonProperty(JSON_PROPERTY_AZURE_CREDENTIAL_KIND) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCliKind + getAzureCredentialKind() { + return azureCredentialKind; + } + + public void setAzureCredentialKind( + ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCliKind azureCredentialKind) { + if (!azureCredentialKind.isValid()) { + this.unparsed = true; + } + this.azureCredentialKind = azureCredentialKind; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli + */ + @JsonAnySetter + public ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli + observabilityPipelineAzureDataExplorerDestinationAuthAzureCli = + (ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli) o; + return Objects.equals( + this.azureCredentialKind, + observabilityPipelineAzureDataExplorerDestinationAuthAzureCli.azureCredentialKind) + && Objects.equals( + this.additionalProperties, + observabilityPipelineAzureDataExplorerDestinationAuthAzureCli.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(azureCredentialKind, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCli {\n"); + sb.append(" azureCredentialKind: ") + .append(toIndentedString(azureCredentialKind)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCliKind.java b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCliKind.java new file mode 100644 index 00000000000..8d78cbacbf1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCliKind.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 Azure credential kind. The value should always be azure_cli. */ +@JsonSerialize( + using = + ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCliKind + .ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCliKindSerializer.class) +public class ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCliKind + extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("azure_cli")); + + public static final ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCliKind AZURE_CLI = + new ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCliKind("azure_cli"); + + ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCliKind(String value) { + super(value, allowedValues); + } + + public static class ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCliKindSerializer + extends StdSerializer { + public ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCliKindSerializer( + Class t) { + super(t); + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCliKindSerializer() { + this(null); + } + + @Override + public void serialize( + ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCliKind value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCliKind fromValue( + String value) { + return new ObservabilityPipelineAzureDataExplorerDestinationAuthAzureCliKind(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate.java b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate.java new file mode 100644 index 00000000000..a6779799a57 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate.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; +import org.openapitools.jackson.nullable.JsonNullable; + +/** Authenticate using a Microsoft Entra application client certificate. */ +@JsonPropertyOrder({ + ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate + .JSON_PROPERTY_AZURE_CLIENT_ID, + ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate + .JSON_PROPERTY_AZURE_CREDENTIAL_KIND, + ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate + .JSON_PROPERTY_AZURE_TENANT_ID, + ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate + .JSON_PROPERTY_CERTIFICATE_PASSWORD_KEY, + ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate + .JSON_PROPERTY_CERTIFICATE_PATH +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AZURE_CLIENT_ID = "azure_client_id"; + private String azureClientId; + + public static final String JSON_PROPERTY_AZURE_CREDENTIAL_KIND = "azure_credential_kind"; + private ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificateKind + azureCredentialKind = + ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificateKind + .CLIENT_CERTIFICATE_CREDENTIAL; + + public static final String JSON_PROPERTY_AZURE_TENANT_ID = "azure_tenant_id"; + private String azureTenantId; + + public static final String JSON_PROPERTY_CERTIFICATE_PASSWORD_KEY = "certificate_password_key"; + private JsonNullable certificatePasswordKey = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_CERTIFICATE_PATH = "certificate_path"; + private String certificatePath; + + public ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate() {} + + @JsonCreator + public ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate( + @JsonProperty(required = true, value = JSON_PROPERTY_AZURE_CLIENT_ID) String azureClientId, + @JsonProperty(required = true, value = JSON_PROPERTY_AZURE_CREDENTIAL_KIND) + ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificateKind + azureCredentialKind, + @JsonProperty(required = true, value = JSON_PROPERTY_AZURE_TENANT_ID) String azureTenantId, + @JsonProperty(required = true, value = JSON_PROPERTY_CERTIFICATE_PATH) + String certificatePath) { + this.azureClientId = azureClientId; + this.azureCredentialKind = azureCredentialKind; + this.unparsed |= !azureCredentialKind.isValid(); + this.azureTenantId = azureTenantId; + this.certificatePath = certificatePath; + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate azureClientId( + String azureClientId) { + this.azureClientId = azureClientId; + return this; + } + + /** + * The Microsoft Entra application (client) ID. + * + * @return azureClientId + */ + @JsonProperty(JSON_PROPERTY_AZURE_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAzureClientId() { + return azureClientId; + } + + public void setAzureClientId(String azureClientId) { + this.azureClientId = azureClientId; + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate azureCredentialKind( + ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificateKind + azureCredentialKind) { + this.azureCredentialKind = azureCredentialKind; + this.unparsed |= !azureCredentialKind.isValid(); + return this; + } + + /** + * The Azure credential kind. The value should always be client_certificate_credential + * . + * + * @return azureCredentialKind + */ + @JsonProperty(JSON_PROPERTY_AZURE_CREDENTIAL_KIND) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificateKind + getAzureCredentialKind() { + return azureCredentialKind; + } + + public void setAzureCredentialKind( + ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificateKind + azureCredentialKind) { + if (!azureCredentialKind.isValid()) { + this.unparsed = true; + } + this.azureCredentialKind = azureCredentialKind; + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate azureTenantId( + String azureTenantId) { + this.azureTenantId = azureTenantId; + return this; + } + + /** + * The Microsoft Entra tenant ID. + * + * @return azureTenantId + */ + @JsonProperty(JSON_PROPERTY_AZURE_TENANT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAzureTenantId() { + return azureTenantId; + } + + public void setAzureTenantId(String azureTenantId) { + this.azureTenantId = azureTenantId; + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate + certificatePasswordKey(String certificatePasswordKey) { + this.certificatePasswordKey = JsonNullable.of(certificatePasswordKey); + return this; + } + + /** + * Name of the environment variable or secret that holds the password for the client certificate. + * + * @return certificatePasswordKey + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getCertificatePasswordKey() { + return certificatePasswordKey.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CERTIFICATE_PASSWORD_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getCertificatePasswordKey_JsonNullable() { + return certificatePasswordKey; + } + + @JsonProperty(JSON_PROPERTY_CERTIFICATE_PASSWORD_KEY) + public void setCertificatePasswordKey_JsonNullable(JsonNullable certificatePasswordKey) { + this.certificatePasswordKey = certificatePasswordKey; + } + + public void setCertificatePasswordKey(String certificatePasswordKey) { + this.certificatePasswordKey = JsonNullable.of(certificatePasswordKey); + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate certificatePath( + String certificatePath) { + this.certificatePath = certificatePath; + return this; + } + + /** + * Path to the .pfx client certificate file on the Worker. + * + * @return certificatePath + */ + @JsonProperty(JSON_PROPERTY_CERTIFICATE_PATH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCertificatePath() { + return certificatePath; + } + + public void setCertificatePath(String certificatePath) { + this.certificatePath = certificatePath; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate + */ + @JsonAnySetter + public ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate + putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate + * object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate + observabilityPipelineAzureDataExplorerDestinationAuthClientCertificate = + (ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate) o; + return Objects.equals( + this.azureClientId, + observabilityPipelineAzureDataExplorerDestinationAuthClientCertificate.azureClientId) + && Objects.equals( + this.azureCredentialKind, + observabilityPipelineAzureDataExplorerDestinationAuthClientCertificate + .azureCredentialKind) + && Objects.equals( + this.azureTenantId, + observabilityPipelineAzureDataExplorerDestinationAuthClientCertificate.azureTenantId) + && Objects.equals( + this.certificatePasswordKey, + observabilityPipelineAzureDataExplorerDestinationAuthClientCertificate + .certificatePasswordKey) + && Objects.equals( + this.certificatePath, + observabilityPipelineAzureDataExplorerDestinationAuthClientCertificate.certificatePath) + && Objects.equals( + this.additionalProperties, + observabilityPipelineAzureDataExplorerDestinationAuthClientCertificate + .additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + azureClientId, + azureCredentialKind, + azureTenantId, + certificatePasswordKey, + certificatePath, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificate {\n"); + sb.append(" azureClientId: ").append(toIndentedString(azureClientId)).append("\n"); + sb.append(" azureCredentialKind: ") + .append(toIndentedString(azureCredentialKind)) + .append("\n"); + sb.append(" azureTenantId: ").append(toIndentedString(azureTenantId)).append("\n"); + sb.append(" certificatePasswordKey: ") + .append(toIndentedString(certificatePasswordKey)) + .append("\n"); + sb.append(" certificatePath: ").append(toIndentedString(certificatePath)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificateKind.java b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificateKind.java new file mode 100644 index 00000000000..80bd9772169 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificateKind.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 Azure credential kind. The value should always be client_certificate_credential. + */ +@JsonSerialize( + using = + ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificateKind + .ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificateKindSerializer + .class) +public class ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificateKind + extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("client_certificate_credential")); + + public static final ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificateKind + CLIENT_CERTIFICATE_CREDENTIAL = + new ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificateKind( + "client_certificate_credential"); + + ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificateKind(String value) { + super(value, allowedValues); + } + + public static + class ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificateKindSerializer + extends StdSerializer< + ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificateKind> { + public ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificateKindSerializer( + Class t) { + super(t); + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificateKindSerializer() { + this(null); + } + + @Override + public void serialize( + ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificateKind value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificateKind + fromValue(String value) { + return new ObservabilityPipelineAzureDataExplorerDestinationAuthClientCertificateKind(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret.java b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret.java new file mode 100644 index 00000000000..80e9f3c770e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret.java @@ -0,0 +1,273 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Authenticate using a Microsoft Entra application client secret. */ +@JsonPropertyOrder({ + ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret.JSON_PROPERTY_AZURE_CLIENT_ID, + ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret + .JSON_PROPERTY_AZURE_CLIENT_SECRET_KEY, + ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret + .JSON_PROPERTY_AZURE_CREDENTIAL_KIND, + ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret.JSON_PROPERTY_AZURE_TENANT_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AZURE_CLIENT_ID = "azure_client_id"; + private String azureClientId; + + public static final String JSON_PROPERTY_AZURE_CLIENT_SECRET_KEY = "azure_client_secret_key"; + private String azureClientSecretKey; + + public static final String JSON_PROPERTY_AZURE_CREDENTIAL_KIND = "azure_credential_kind"; + private ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecretKind + azureCredentialKind = + ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecretKind + .CLIENT_SECRET_CREDENTIAL; + + public static final String JSON_PROPERTY_AZURE_TENANT_ID = "azure_tenant_id"; + private String azureTenantId; + + public ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret() {} + + @JsonCreator + public ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret( + @JsonProperty(required = true, value = JSON_PROPERTY_AZURE_CLIENT_ID) String azureClientId, + @JsonProperty(required = true, value = JSON_PROPERTY_AZURE_CLIENT_SECRET_KEY) + String azureClientSecretKey, + @JsonProperty(required = true, value = JSON_PROPERTY_AZURE_CREDENTIAL_KIND) + ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecretKind azureCredentialKind, + @JsonProperty(required = true, value = JSON_PROPERTY_AZURE_TENANT_ID) String azureTenantId) { + this.azureClientId = azureClientId; + this.azureClientSecretKey = azureClientSecretKey; + this.azureCredentialKind = azureCredentialKind; + this.unparsed |= !azureCredentialKind.isValid(); + this.azureTenantId = azureTenantId; + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret azureClientId( + String azureClientId) { + this.azureClientId = azureClientId; + return this; + } + + /** + * The Microsoft Entra application (client) ID. + * + * @return azureClientId + */ + @JsonProperty(JSON_PROPERTY_AZURE_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAzureClientId() { + return azureClientId; + } + + public void setAzureClientId(String azureClientId) { + this.azureClientId = azureClientId; + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret azureClientSecretKey( + String azureClientSecretKey) { + this.azureClientSecretKey = azureClientSecretKey; + return this; + } + + /** + * Name of the environment variable or secret that holds the Microsoft Entra application client + * secret. + * + * @return azureClientSecretKey + */ + @JsonProperty(JSON_PROPERTY_AZURE_CLIENT_SECRET_KEY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAzureClientSecretKey() { + return azureClientSecretKey; + } + + public void setAzureClientSecretKey(String azureClientSecretKey) { + this.azureClientSecretKey = azureClientSecretKey; + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret azureCredentialKind( + ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecretKind azureCredentialKind) { + this.azureCredentialKind = azureCredentialKind; + this.unparsed |= !azureCredentialKind.isValid(); + return this; + } + + /** + * The Azure credential kind. The value should always be client_secret_credential. + * + * @return azureCredentialKind + */ + @JsonProperty(JSON_PROPERTY_AZURE_CREDENTIAL_KIND) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecretKind + getAzureCredentialKind() { + return azureCredentialKind; + } + + public void setAzureCredentialKind( + ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecretKind azureCredentialKind) { + if (!azureCredentialKind.isValid()) { + this.unparsed = true; + } + this.azureCredentialKind = azureCredentialKind; + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret azureTenantId( + String azureTenantId) { + this.azureTenantId = azureTenantId; + return this; + } + + /** + * The Microsoft Entra tenant ID. + * + * @return azureTenantId + */ + @JsonProperty(JSON_PROPERTY_AZURE_TENANT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAzureTenantId() { + return azureTenantId; + } + + public void setAzureTenantId(String azureTenantId) { + this.azureTenantId = azureTenantId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret + */ + @JsonAnySetter + public ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret + observabilityPipelineAzureDataExplorerDestinationAuthClientSecret = + (ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret) o; + return Objects.equals( + this.azureClientId, + observabilityPipelineAzureDataExplorerDestinationAuthClientSecret.azureClientId) + && Objects.equals( + this.azureClientSecretKey, + observabilityPipelineAzureDataExplorerDestinationAuthClientSecret.azureClientSecretKey) + && Objects.equals( + this.azureCredentialKind, + observabilityPipelineAzureDataExplorerDestinationAuthClientSecret.azureCredentialKind) + && Objects.equals( + this.azureTenantId, + observabilityPipelineAzureDataExplorerDestinationAuthClientSecret.azureTenantId) + && Objects.equals( + this.additionalProperties, + observabilityPipelineAzureDataExplorerDestinationAuthClientSecret.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + azureClientId, + azureClientSecretKey, + azureCredentialKind, + azureTenantId, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecret {\n"); + sb.append(" azureClientId: ").append(toIndentedString(azureClientId)).append("\n"); + sb.append(" azureClientSecretKey: ") + .append(toIndentedString(azureClientSecretKey)) + .append("\n"); + sb.append(" azureCredentialKind: ") + .append(toIndentedString(azureCredentialKind)) + .append("\n"); + sb.append(" azureTenantId: ").append(toIndentedString(azureTenantId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecretKind.java b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecretKind.java new file mode 100644 index 00000000000..fce0708a9bc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecretKind.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 Azure credential kind. The value should always be client_secret_credential. */ +@JsonSerialize( + using = + ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecretKind + .ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecretKindSerializer.class) +public class ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecretKind + extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("client_secret_credential")); + + public static final ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecretKind + CLIENT_SECRET_CREDENTIAL = + new ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecretKind( + "client_secret_credential"); + + ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecretKind(String value) { + super(value, allowedValues); + } + + public static + class ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecretKindSerializer + extends StdSerializer { + public ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecretKindSerializer( + Class t) { + super(t); + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecretKindSerializer() { + this(null); + } + + @Override + public void serialize( + ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecretKind value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecretKind fromValue( + String value) { + return new ObservabilityPipelineAzureDataExplorerDestinationAuthClientSecretKind(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity.java b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity.java new file mode 100644 index 00000000000..b7ab312942c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity.java @@ -0,0 +1,271 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +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; + +/** Authenticate using an Azure managed identity. */ +@JsonPropertyOrder({ + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity + .JSON_PROPERTY_AZURE_CREDENTIAL_KIND, + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity + .JSON_PROPERTY_USER_ASSIGNED_MANAGED_IDENTITY_ID, + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity + .JSON_PROPERTY_USER_ASSIGNED_MANAGED_IDENTITY_ID_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AZURE_CREDENTIAL_KIND = "azure_credential_kind"; + private ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityKind + azureCredentialKind = + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityKind.MANAGED_IDENTITY; + + public static final String JSON_PROPERTY_USER_ASSIGNED_MANAGED_IDENTITY_ID = + "user_assigned_managed_identity_id"; + private JsonNullable userAssignedManagedIdentityId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_USER_ASSIGNED_MANAGED_IDENTITY_ID_TYPE = + "user_assigned_managed_identity_id_type"; + private ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdType + userAssignedManagedIdentityIdType; + + public ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity() {} + + @JsonCreator + public ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity( + @JsonProperty(required = true, value = JSON_PROPERTY_AZURE_CREDENTIAL_KIND) + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityKind + azureCredentialKind) { + this.azureCredentialKind = azureCredentialKind; + this.unparsed |= !azureCredentialKind.isValid(); + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity azureCredentialKind( + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityKind + azureCredentialKind) { + this.azureCredentialKind = azureCredentialKind; + this.unparsed |= !azureCredentialKind.isValid(); + return this; + } + + /** + * The Azure credential kind. The value should always be managed_identity. + * + * @return azureCredentialKind + */ + @JsonProperty(JSON_PROPERTY_AZURE_CREDENTIAL_KIND) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityKind + getAzureCredentialKind() { + return azureCredentialKind; + } + + public void setAzureCredentialKind( + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityKind + azureCredentialKind) { + if (!azureCredentialKind.isValid()) { + this.unparsed = true; + } + this.azureCredentialKind = azureCredentialKind; + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity + userAssignedManagedIdentityId(String userAssignedManagedIdentityId) { + this.userAssignedManagedIdentityId = JsonNullable.of(userAssignedManagedIdentityId); + return this; + } + + /** + * The ID of the user-assigned managed identity. If omitted, the system-assigned managed identity + * is used. + * + * @return userAssignedManagedIdentityId + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getUserAssignedManagedIdentityId() { + return userAssignedManagedIdentityId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_USER_ASSIGNED_MANAGED_IDENTITY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getUserAssignedManagedIdentityId_JsonNullable() { + return userAssignedManagedIdentityId; + } + + @JsonProperty(JSON_PROPERTY_USER_ASSIGNED_MANAGED_IDENTITY_ID) + public void setUserAssignedManagedIdentityId_JsonNullable( + JsonNullable userAssignedManagedIdentityId) { + this.userAssignedManagedIdentityId = userAssignedManagedIdentityId; + } + + public void setUserAssignedManagedIdentityId(String userAssignedManagedIdentityId) { + this.userAssignedManagedIdentityId = JsonNullable.of(userAssignedManagedIdentityId); + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity + userAssignedManagedIdentityIdType( + ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdType + userAssignedManagedIdentityIdType) { + this.userAssignedManagedIdentityIdType = userAssignedManagedIdentityIdType; + this.unparsed |= !userAssignedManagedIdentityIdType.isValid(); + return this; + } + + /** + * The type of the user-assigned managed identity ID. + * + * @return userAssignedManagedIdentityIdType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_ASSIGNED_MANAGED_IDENTITY_ID_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdType + getUserAssignedManagedIdentityIdType() { + return userAssignedManagedIdentityIdType; + } + + public void setUserAssignedManagedIdentityIdType( + ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdType + userAssignedManagedIdentityIdType) { + if (!userAssignedManagedIdentityIdType.isValid()) { + this.unparsed = true; + } + this.userAssignedManagedIdentityIdType = userAssignedManagedIdentityIdType; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity + */ + @JsonAnySetter + public ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity object + * is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity + observabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity = + (ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity) o; + return Objects.equals( + this.azureCredentialKind, + observabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity + .azureCredentialKind) + && Objects.equals( + this.userAssignedManagedIdentityId, + observabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity + .userAssignedManagedIdentityId) + && Objects.equals( + this.userAssignedManagedIdentityIdType, + observabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity + .userAssignedManagedIdentityIdType) + && Objects.equals( + this.additionalProperties, + observabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity + .additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + azureCredentialKind, + userAssignedManagedIdentityId, + userAssignedManagedIdentityIdType, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentity {\n"); + sb.append(" azureCredentialKind: ") + .append(toIndentedString(azureCredentialKind)) + .append("\n"); + sb.append(" userAssignedManagedIdentityId: ") + .append(toIndentedString(userAssignedManagedIdentityId)) + .append("\n"); + sb.append(" userAssignedManagedIdentityIdType: ") + .append(toIndentedString(userAssignedManagedIdentityIdType)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion.java b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion.java new file mode 100644 index 00000000000..2f027a3269c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion.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.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +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; + +/** + * Authenticate using a managed identity as a client assertion for a Microsoft Entra application. + */ +@JsonPropertyOrder({ + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + .JSON_PROPERTY_AZURE_CREDENTIAL_KIND, + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + .JSON_PROPERTY_CLIENT_ASSERTION_CLIENT_ID, + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + .JSON_PROPERTY_CLIENT_ASSERTION_TENANT_ID, + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + .JSON_PROPERTY_USER_ASSIGNED_MANAGED_IDENTITY_ID, + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + .JSON_PROPERTY_USER_ASSIGNED_MANAGED_IDENTITY_ID_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AZURE_CREDENTIAL_KIND = "azure_credential_kind"; + private ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertionKind + azureCredentialKind = + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertionKind + .MANAGED_IDENTITY_CLIENT_ASSERTION; + + public static final String JSON_PROPERTY_CLIENT_ASSERTION_CLIENT_ID = + "client_assertion_client_id"; + private String clientAssertionClientId; + + public static final String JSON_PROPERTY_CLIENT_ASSERTION_TENANT_ID = + "client_assertion_tenant_id"; + private String clientAssertionTenantId; + + public static final String JSON_PROPERTY_USER_ASSIGNED_MANAGED_IDENTITY_ID = + "user_assigned_managed_identity_id"; + private JsonNullable userAssignedManagedIdentityId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_USER_ASSIGNED_MANAGED_IDENTITY_ID_TYPE = + "user_assigned_managed_identity_id_type"; + private ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdType + userAssignedManagedIdentityIdType; + + public ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion() {} + + @JsonCreator + public ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion( + @JsonProperty(required = true, value = JSON_PROPERTY_AZURE_CREDENTIAL_KIND) + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertionKind + azureCredentialKind, + @JsonProperty(required = true, value = JSON_PROPERTY_CLIENT_ASSERTION_CLIENT_ID) + String clientAssertionClientId, + @JsonProperty(required = true, value = JSON_PROPERTY_CLIENT_ASSERTION_TENANT_ID) + String clientAssertionTenantId) { + this.azureCredentialKind = azureCredentialKind; + this.unparsed |= !azureCredentialKind.isValid(); + this.clientAssertionClientId = clientAssertionClientId; + this.clientAssertionTenantId = clientAssertionTenantId; + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + azureCredentialKind( + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertionKind + azureCredentialKind) { + this.azureCredentialKind = azureCredentialKind; + this.unparsed |= !azureCredentialKind.isValid(); + return this; + } + + /** + * The Azure credential kind. The value should always be managed_identity_client_assertion + * . + * + * @return azureCredentialKind + */ + @JsonProperty(JSON_PROPERTY_AZURE_CREDENTIAL_KIND) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertionKind + getAzureCredentialKind() { + return azureCredentialKind; + } + + public void setAzureCredentialKind( + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertionKind + azureCredentialKind) { + if (!azureCredentialKind.isValid()) { + this.unparsed = true; + } + this.azureCredentialKind = azureCredentialKind; + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + clientAssertionClientId(String clientAssertionClientId) { + this.clientAssertionClientId = clientAssertionClientId; + return this; + } + + /** + * The client ID of the Microsoft Entra application that trusts the managed identity. + * + * @return clientAssertionClientId + */ + @JsonProperty(JSON_PROPERTY_CLIENT_ASSERTION_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getClientAssertionClientId() { + return clientAssertionClientId; + } + + public void setClientAssertionClientId(String clientAssertionClientId) { + this.clientAssertionClientId = clientAssertionClientId; + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + clientAssertionTenantId(String clientAssertionTenantId) { + this.clientAssertionTenantId = clientAssertionTenantId; + return this; + } + + /** + * The tenant ID of the Microsoft Entra application that trusts the managed identity. + * + * @return clientAssertionTenantId + */ + @JsonProperty(JSON_PROPERTY_CLIENT_ASSERTION_TENANT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getClientAssertionTenantId() { + return clientAssertionTenantId; + } + + public void setClientAssertionTenantId(String clientAssertionTenantId) { + this.clientAssertionTenantId = clientAssertionTenantId; + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + userAssignedManagedIdentityId(String userAssignedManagedIdentityId) { + this.userAssignedManagedIdentityId = JsonNullable.of(userAssignedManagedIdentityId); + return this; + } + + /** + * The ID of the user-assigned managed identity. If omitted, the system-assigned managed identity + * is used. + * + * @return userAssignedManagedIdentityId + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getUserAssignedManagedIdentityId() { + return userAssignedManagedIdentityId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_USER_ASSIGNED_MANAGED_IDENTITY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getUserAssignedManagedIdentityId_JsonNullable() { + return userAssignedManagedIdentityId; + } + + @JsonProperty(JSON_PROPERTY_USER_ASSIGNED_MANAGED_IDENTITY_ID) + public void setUserAssignedManagedIdentityId_JsonNullable( + JsonNullable userAssignedManagedIdentityId) { + this.userAssignedManagedIdentityId = userAssignedManagedIdentityId; + } + + public void setUserAssignedManagedIdentityId(String userAssignedManagedIdentityId) { + this.userAssignedManagedIdentityId = JsonNullable.of(userAssignedManagedIdentityId); + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + userAssignedManagedIdentityIdType( + ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdType + userAssignedManagedIdentityIdType) { + this.userAssignedManagedIdentityIdType = userAssignedManagedIdentityIdType; + this.unparsed |= !userAssignedManagedIdentityIdType.isValid(); + return this; + } + + /** + * The type of the user-assigned managed identity ID. + * + * @return userAssignedManagedIdentityIdType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_ASSIGNED_MANAGED_IDENTITY_ID_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdType + getUserAssignedManagedIdentityIdType() { + return userAssignedManagedIdentityIdType; + } + + public void setUserAssignedManagedIdentityIdType( + ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdType + userAssignedManagedIdentityIdType) { + if (!userAssignedManagedIdentityIdType.isValid()) { + this.unparsed = true; + } + this.userAssignedManagedIdentityIdType = userAssignedManagedIdentityIdType; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + */ + @JsonAnySetter + public ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this + * ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion object is + * equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + observabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion = + (ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion) o; + return Objects.equals( + this.azureCredentialKind, + observabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + .azureCredentialKind) + && Objects.equals( + this.clientAssertionClientId, + observabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + .clientAssertionClientId) + && Objects.equals( + this.clientAssertionTenantId, + observabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + .clientAssertionTenantId) + && Objects.equals( + this.userAssignedManagedIdentityId, + observabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + .userAssignedManagedIdentityId) + && Objects.equals( + this.userAssignedManagedIdentityIdType, + observabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + .userAssignedManagedIdentityIdType) + && Objects.equals( + this.additionalProperties, + observabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion + .additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + azureCredentialKind, + clientAssertionClientId, + clientAssertionTenantId, + userAssignedManagedIdentityId, + userAssignedManagedIdentityIdType, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append( + "class ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertion" + + " {\n"); + sb.append(" azureCredentialKind: ") + .append(toIndentedString(azureCredentialKind)) + .append("\n"); + sb.append(" clientAssertionClientId: ") + .append(toIndentedString(clientAssertionClientId)) + .append("\n"); + sb.append(" clientAssertionTenantId: ") + .append(toIndentedString(clientAssertionTenantId)) + .append("\n"); + sb.append(" userAssignedManagedIdentityId: ") + .append(toIndentedString(userAssignedManagedIdentityId)) + .append("\n"); + sb.append(" userAssignedManagedIdentityIdType: ") + .append(toIndentedString(userAssignedManagedIdentityIdType)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertionKind.java b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertionKind.java new file mode 100644 index 00000000000..4054cc15eb9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertionKind.java @@ -0,0 +1,82 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This 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 Azure credential kind. The value should always be managed_identity_client_assertion + * . + */ +@JsonSerialize( + using = + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertionKind + .ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertionKindSerializer + .class) +public class ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertionKind + extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("managed_identity_client_assertion")); + + public static final + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertionKind + MANAGED_IDENTITY_CLIENT_ASSERTION = + new ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertionKind( + "managed_identity_client_assertion"); + + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertionKind( + String value) { + super(value, allowedValues); + } + + public static + class ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertionKindSerializer + extends StdSerializer< + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertionKind> { + public + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertionKindSerializer( + Class< + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertionKind> + t) { + super(t); + } + + public + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertionKindSerializer() { + this(null); + } + + @Override + public void serialize( + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertionKind + value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertionKind fromValue( + String value) { + return new ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityClientAssertionKind( + value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityKind.java b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityKind.java new file mode 100644 index 00000000000..02cd6cf3124 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityKind.java @@ -0,0 +1,70 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This 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 Azure credential kind. The value should always be managed_identity. */ +@JsonSerialize( + using = + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityKind + .ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityKindSerializer + .class) +public class ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityKind + extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("managed_identity")); + + public static final ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityKind + MANAGED_IDENTITY = + new ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityKind( + "managed_identity"); + + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityKind(String value) { + super(value, allowedValues); + } + + public static + class ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityKindSerializer + extends StdSerializer< + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityKind> { + public ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityKindSerializer( + Class t) { + super(t); + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityKindSerializer() { + this(null); + } + + @Override + public void serialize( + ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityKind value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityKind fromValue( + String value) { + return new ObservabilityPipelineAzureDataExplorerDestinationAuthManagedIdentityKind(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity.java b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity.java new file mode 100644 index 00000000000..13559841f7e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity.java @@ -0,0 +1,298 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +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; + +/** Authenticate using Azure Workload Identity (for example, on Kubernetes). */ +@JsonPropertyOrder({ + ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity + .JSON_PROPERTY_AZURE_CREDENTIAL_KIND, + ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity.JSON_PROPERTY_CLIENT_ID, + ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity.JSON_PROPERTY_TENANT_ID, + ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity + .JSON_PROPERTY_TOKEN_FILE_PATH +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AZURE_CREDENTIAL_KIND = "azure_credential_kind"; + private ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentityKind + azureCredentialKind = + ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentityKind + .WORKLOAD_IDENTITY; + + public static final String JSON_PROPERTY_CLIENT_ID = "client_id"; + private JsonNullable clientId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TENANT_ID = "tenant_id"; + private JsonNullable tenantId = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_TOKEN_FILE_PATH = "token_file_path"; + private JsonNullable tokenFilePath = JsonNullable.undefined(); + + public ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity() {} + + @JsonCreator + public ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity( + @JsonProperty(required = true, value = JSON_PROPERTY_AZURE_CREDENTIAL_KIND) + ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentityKind + azureCredentialKind) { + this.azureCredentialKind = azureCredentialKind; + this.unparsed |= !azureCredentialKind.isValid(); + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity azureCredentialKind( + ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentityKind + azureCredentialKind) { + this.azureCredentialKind = azureCredentialKind; + this.unparsed |= !azureCredentialKind.isValid(); + return this; + } + + /** + * The Azure credential kind. The value should always be workload_identity. + * + * @return azureCredentialKind + */ + @JsonProperty(JSON_PROPERTY_AZURE_CREDENTIAL_KIND) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentityKind + getAzureCredentialKind() { + return azureCredentialKind; + } + + public void setAzureCredentialKind( + ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentityKind + azureCredentialKind) { + if (!azureCredentialKind.isValid()) { + this.unparsed = true; + } + this.azureCredentialKind = azureCredentialKind; + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity clientId( + String clientId) { + this.clientId = JsonNullable.of(clientId); + return this; + } + + /** + * The client ID of the Microsoft Entra application. If omitted, it is read from the environment. + * + * @return clientId + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getClientId() { + return clientId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getClientId_JsonNullable() { + return clientId; + } + + @JsonProperty(JSON_PROPERTY_CLIENT_ID) + public void setClientId_JsonNullable(JsonNullable clientId) { + this.clientId = clientId; + } + + public void setClientId(String clientId) { + this.clientId = JsonNullable.of(clientId); + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity tenantId( + String tenantId) { + this.tenantId = JsonNullable.of(tenantId); + return this; + } + + /** + * The Microsoft Entra tenant ID. If omitted, it is read from the environment. + * + * @return tenantId + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getTenantId() { + return tenantId.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TENANT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getTenantId_JsonNullable() { + return tenantId; + } + + @JsonProperty(JSON_PROPERTY_TENANT_ID) + public void setTenantId_JsonNullable(JsonNullable tenantId) { + this.tenantId = tenantId; + } + + public void setTenantId(String tenantId) { + this.tenantId = JsonNullable.of(tenantId); + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity tokenFilePath( + String tokenFilePath) { + this.tokenFilePath = JsonNullable.of(tokenFilePath); + return this; + } + + /** + * Path to the federated token file. If omitted, it is read from the environment. + * + * @return tokenFilePath + */ + @jakarta.annotation.Nullable + @JsonIgnore + public String getTokenFilePath() { + return tokenFilePath.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_TOKEN_FILE_PATH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable getTokenFilePath_JsonNullable() { + return tokenFilePath; + } + + @JsonProperty(JSON_PROPERTY_TOKEN_FILE_PATH) + public void setTokenFilePath_JsonNullable(JsonNullable tokenFilePath) { + this.tokenFilePath = tokenFilePath; + } + + public void setTokenFilePath(String tokenFilePath) { + this.tokenFilePath = JsonNullable.of(tokenFilePath); + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity + */ + @JsonAnySetter + public ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity + putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity + * object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity + observabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity = + (ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity) o; + return Objects.equals( + this.azureCredentialKind, + observabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity + .azureCredentialKind) + && Objects.equals( + this.clientId, + observabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity.clientId) + && Objects.equals( + this.tenantId, + observabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity.tenantId) + && Objects.equals( + this.tokenFilePath, + observabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity.tokenFilePath) + && Objects.equals( + this.additionalProperties, + observabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity + .additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + azureCredentialKind, clientId, tenantId, tokenFilePath, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentity {\n"); + sb.append(" azureCredentialKind: ") + .append(toIndentedString(azureCredentialKind)) + .append("\n"); + sb.append(" clientId: ").append(toIndentedString(clientId)).append("\n"); + sb.append(" tenantId: ").append(toIndentedString(tenantId)).append("\n"); + sb.append(" tokenFilePath: ").append(toIndentedString(tokenFilePath)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentityKind.java b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentityKind.java new file mode 100644 index 00000000000..f22cd1e7d70 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentityKind.java @@ -0,0 +1,70 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This 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 Azure credential kind. The value should always be workload_identity. */ +@JsonSerialize( + using = + ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentityKind + .ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentityKindSerializer + .class) +public class ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentityKind + extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("workload_identity")); + + public static final ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentityKind + WORKLOAD_IDENTITY = + new ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentityKind( + "workload_identity"); + + ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentityKind(String value) { + super(value, allowedValues); + } + + public static + class ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentityKindSerializer + extends StdSerializer< + ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentityKind> { + public ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentityKindSerializer( + Class t) { + super(t); + } + + public ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentityKindSerializer() { + this(null); + } + + @Override + public void serialize( + ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentityKind value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentityKind fromValue( + String value) { + return new ObservabilityPipelineAzureDataExplorerDestinationAuthWorkloadIdentityKind(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationBatch.java b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationBatch.java new file mode 100644 index 00000000000..aa850d358df --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationBatch.java @@ -0,0 +1,202 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +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; + +/** Event batching settings for Azure Data Explorer ingestion. */ +@JsonPropertyOrder({ + ObservabilityPipelineAzureDataExplorerDestinationBatch.JSON_PROPERTY_MAX_BYTES, + ObservabilityPipelineAzureDataExplorerDestinationBatch.JSON_PROPERTY_MAX_EVENTS, + ObservabilityPipelineAzureDataExplorerDestinationBatch.JSON_PROPERTY_TIMEOUT_SECS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ObservabilityPipelineAzureDataExplorerDestinationBatch { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_MAX_BYTES = "max_bytes"; + private Long maxBytes; + + public static final String JSON_PROPERTY_MAX_EVENTS = "max_events"; + private Long maxEvents; + + public static final String JSON_PROPERTY_TIMEOUT_SECS = "timeout_secs"; + private Long timeoutSecs; + + public ObservabilityPipelineAzureDataExplorerDestinationBatch maxBytes(Long maxBytes) { + this.maxBytes = maxBytes; + return this; + } + + /** + * Maximum batch size in bytes. minimum: 1 maximum: 4000000 + * + * @return maxBytes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAX_BYTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getMaxBytes() { + return maxBytes; + } + + public void setMaxBytes(Long maxBytes) { + this.maxBytes = maxBytes; + } + + public ObservabilityPipelineAzureDataExplorerDestinationBatch maxEvents(Long maxEvents) { + this.maxEvents = maxEvents; + return this; + } + + /** + * Maximum number of events per batch before it is flushed. minimum: 1 + * + * @return maxEvents + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAX_EVENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getMaxEvents() { + return maxEvents; + } + + public void setMaxEvents(Long maxEvents) { + this.maxEvents = maxEvents; + } + + public ObservabilityPipelineAzureDataExplorerDestinationBatch timeoutSecs(Long timeoutSecs) { + this.timeoutSecs = timeoutSecs; + return this; + } + + /** + * Maximum number of seconds to wait before flushing a partial batch. minimum: 1 + * + * @return timeoutSecs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMEOUT_SECS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getTimeoutSecs() { + return timeoutSecs; + } + + public void setTimeoutSecs(Long timeoutSecs) { + this.timeoutSecs = timeoutSecs; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ObservabilityPipelineAzureDataExplorerDestinationBatch + */ + @JsonAnySetter + public ObservabilityPipelineAzureDataExplorerDestinationBatch putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this ObservabilityPipelineAzureDataExplorerDestinationBatch object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ObservabilityPipelineAzureDataExplorerDestinationBatch + observabilityPipelineAzureDataExplorerDestinationBatch = + (ObservabilityPipelineAzureDataExplorerDestinationBatch) o; + return Objects.equals( + this.maxBytes, observabilityPipelineAzureDataExplorerDestinationBatch.maxBytes) + && Objects.equals( + this.maxEvents, observabilityPipelineAzureDataExplorerDestinationBatch.maxEvents) + && Objects.equals( + this.timeoutSecs, observabilityPipelineAzureDataExplorerDestinationBatch.timeoutSecs) + && Objects.equals( + this.additionalProperties, + observabilityPipelineAzureDataExplorerDestinationBatch.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(maxBytes, maxEvents, timeoutSecs, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ObservabilityPipelineAzureDataExplorerDestinationBatch {\n"); + sb.append(" maxBytes: ").append(toIndentedString(maxBytes)).append("\n"); + sb.append(" maxEvents: ").append(toIndentedString(maxEvents)).append("\n"); + sb.append(" timeoutSecs: ").append(toIndentedString(timeoutSecs)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdType.java b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdType.java new file mode 100644 index 00000000000..1a04a959049 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdType.java @@ -0,0 +1,74 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This 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 user-assigned managed identity ID. */ +@JsonSerialize( + using = + ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdType + .ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdTypeSerializer.class) +public class ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdType + extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("client_id", "object_id", "resource_id")); + + public static final ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdType + CLIENT_ID = + new ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdType("client_id"); + public static final ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdType + OBJECT_ID = + new ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdType("object_id"); + public static final ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdType + RESOURCE_ID = + new ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdType("resource_id"); + + ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdType(String value) { + super(value, allowedValues); + } + + public static + class ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdTypeSerializer + extends StdSerializer< + ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdType> { + public ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdTypeSerializer( + Class t) { + super(t); + } + + public ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdTypeSerializer() { + this(null); + } + + @Override + public void serialize( + ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdType fromValue( + String value) { + return new ObservabilityPipelineAzureDataExplorerDestinationManagedIdentityIdType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationType.java b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationType.java new file mode 100644 index 00000000000..1ec2aad57ea --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineAzureDataExplorerDestinationType.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 destination type. The value should always be azure_data_explorer. */ +@JsonSerialize( + using = + ObservabilityPipelineAzureDataExplorerDestinationType + .ObservabilityPipelineAzureDataExplorerDestinationTypeSerializer.class) +public class ObservabilityPipelineAzureDataExplorerDestinationType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("azure_data_explorer")); + + public static final ObservabilityPipelineAzureDataExplorerDestinationType AZURE_DATA_EXPLORER = + new ObservabilityPipelineAzureDataExplorerDestinationType("azure_data_explorer"); + + ObservabilityPipelineAzureDataExplorerDestinationType(String value) { + super(value, allowedValues); + } + + public static class ObservabilityPipelineAzureDataExplorerDestinationTypeSerializer + extends StdSerializer { + public ObservabilityPipelineAzureDataExplorerDestinationTypeSerializer( + Class t) { + super(t); + } + + public ObservabilityPipelineAzureDataExplorerDestinationTypeSerializer() { + this(null); + } + + @Override + public void serialize( + ObservabilityPipelineAzureDataExplorerDestinationType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ObservabilityPipelineAzureDataExplorerDestinationType fromValue(String value) { + return new ObservabilityPipelineAzureDataExplorerDestinationType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineConfigDestinationItem.java b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineConfigDestinationItem.java index e7994f424b4..63d18851409 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineConfigDestinationItem.java +++ b/src/main/java/com/datadog/api/client/v2/model/ObservabilityPipelineConfigDestinationItem.java @@ -451,6 +451,60 @@ public ObservabilityPipelineConfigDestinationItem deserialize( log.log(Level.FINER, "Input data does not match schema 'AzureStorageDestination'", e); } + // deserialize ObservabilityPipelineAzureDataExplorerDestination + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (ObservabilityPipelineAzureDataExplorerDestination.class.equals(Integer.class) + || ObservabilityPipelineAzureDataExplorerDestination.class.equals(Long.class) + || ObservabilityPipelineAzureDataExplorerDestination.class.equals(Float.class) + || ObservabilityPipelineAzureDataExplorerDestination.class.equals(Double.class) + || ObservabilityPipelineAzureDataExplorerDestination.class.equals(Boolean.class) + || ObservabilityPipelineAzureDataExplorerDestination.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((ObservabilityPipelineAzureDataExplorerDestination.class.equals(Integer.class) + || ObservabilityPipelineAzureDataExplorerDestination.class.equals( + Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((ObservabilityPipelineAzureDataExplorerDestination.class.equals(Float.class) + || ObservabilityPipelineAzureDataExplorerDestination.class.equals( + Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (ObservabilityPipelineAzureDataExplorerDestination.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (ObservabilityPipelineAzureDataExplorerDestination.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = + tree.traverse(jp.getCodec()) + .readValueAs(ObservabilityPipelineAzureDataExplorerDestination.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((ObservabilityPipelineAzureDataExplorerDestination) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log( + Level.FINER, + "Input data matches schema 'ObservabilityPipelineAzureDataExplorerDestination'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log( + Level.FINER, + "Input data does not match schema 'ObservabilityPipelineAzureDataExplorerDestination'", + e); + } + // deserialize ObservabilityPipelineClickhouseDestination try { boolean attemptParsing = true; @@ -1665,6 +1719,12 @@ public ObservabilityPipelineConfigDestinationItem(AzureStorageDestination o) { setActualInstance(o); } + public ObservabilityPipelineConfigDestinationItem( + ObservabilityPipelineAzureDataExplorerDestination o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public ObservabilityPipelineConfigDestinationItem(ObservabilityPipelineClickhouseDestination o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -1804,6 +1864,9 @@ public ObservabilityPipelineConfigDestinationItem( "ObservabilityPipelineAmazonSecurityLakeDestination", new GenericType() {}); schemas.put("AzureStorageDestination", new GenericType() {}); + schemas.put( + "ObservabilityPipelineAzureDataExplorerDestination", + new GenericType() {}); schemas.put( "ObservabilityPipelineClickhouseDestination", new GenericType() {}); @@ -1883,7 +1946,8 @@ public Map getSchemas() { * ObservabilityPipelineHttpClientDestination, ObservabilityPipelineAmazonOpenSearchDestination, * ObservabilityPipelineAmazonS3Destination, ObservabilityPipelineAmazonS3GenericDestination, * ObservabilityPipelineAmazonSecurityLakeDestination, AzureStorageDestination, - * ObservabilityPipelineClickhouseDestination, ObservabilityPipelineCloudPremDestination, + * ObservabilityPipelineAzureDataExplorerDestination, ObservabilityPipelineClickhouseDestination, + * ObservabilityPipelineCloudPremDestination, * ObservabilityPipelineCrowdStrikeNextGenSiemDestination, * ObservabilityPipelineDatadogLogsDestination, ObservabilityPipelineGoogleChronicleDestination, * ObservabilityPipelineGoogleCloudStorageDestination, @@ -1941,6 +2005,13 @@ public void setActualInstance(Object instance) { super.setActualInstance(instance); return; } + if (JSON.isInstanceOf( + ObservabilityPipelineAzureDataExplorerDestination.class, + instance, + new HashSet>())) { + super.setActualInstance(instance); + return; + } if (JSON.isInstanceOf( ObservabilityPipelineClickhouseDestination.class, instance, new HashSet>())) { super.setActualInstance(instance); @@ -2074,6 +2145,7 @@ public void setActualInstance(Object instance) { + " ObservabilityPipelineAmazonS3Destination," + " ObservabilityPipelineAmazonS3GenericDestination," + " ObservabilityPipelineAmazonSecurityLakeDestination, AzureStorageDestination," + + " ObservabilityPipelineAzureDataExplorerDestination," + " ObservabilityPipelineClickhouseDestination," + " ObservabilityPipelineCloudPremDestination," + " ObservabilityPipelineCrowdStrikeNextGenSiemDestination," @@ -2102,7 +2174,8 @@ public void setActualInstance(Object instance) { * ObservabilityPipelineAmazonOpenSearchDestination, ObservabilityPipelineAmazonS3Destination, * ObservabilityPipelineAmazonS3GenericDestination, * ObservabilityPipelineAmazonSecurityLakeDestination, AzureStorageDestination, - * ObservabilityPipelineClickhouseDestination, ObservabilityPipelineCloudPremDestination, + * ObservabilityPipelineAzureDataExplorerDestination, ObservabilityPipelineClickhouseDestination, + * ObservabilityPipelineCloudPremDestination, * ObservabilityPipelineCrowdStrikeNextGenSiemDestination, * ObservabilityPipelineDatadogLogsDestination, ObservabilityPipelineGoogleChronicleDestination, * ObservabilityPipelineGoogleCloudStorageDestination, @@ -2122,6 +2195,7 @@ public void setActualInstance(Object instance) { * ObservabilityPipelineAmazonOpenSearchDestination, ObservabilityPipelineAmazonS3Destination, * ObservabilityPipelineAmazonS3GenericDestination, * ObservabilityPipelineAmazonSecurityLakeDestination, AzureStorageDestination, + * ObservabilityPipelineAzureDataExplorerDestination, * ObservabilityPipelineClickhouseDestination, ObservabilityPipelineCloudPremDestination, * ObservabilityPipelineCrowdStrikeNextGenSiemDestination, * ObservabilityPipelineDatadogLogsDestination, @@ -2235,6 +2309,20 @@ public AzureStorageDestination getAzureStorageDestination() throws ClassCastExce return (AzureStorageDestination) super.getActualInstance(); } + /** + * Get the actual instance of `ObservabilityPipelineAzureDataExplorerDestination`. If the actual + * instance is not `ObservabilityPipelineAzureDataExplorerDestination`, the ClassCastException + * will be thrown. + * + * @return The actual instance of `ObservabilityPipelineAzureDataExplorerDestination` + * @throws ClassCastException if the instance is not + * `ObservabilityPipelineAzureDataExplorerDestination` + */ + public ObservabilityPipelineAzureDataExplorerDestination + getObservabilityPipelineAzureDataExplorerDestination() throws ClassCastException { + return (ObservabilityPipelineAzureDataExplorerDestination) super.getActualInstance(); + } + /** * Get the actual instance of `ObservabilityPipelineClickhouseDestination`. If the actual instance * is not `ObservabilityPipelineClickhouseDestination`, the ClassCastException will be thrown.