diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 9bceb715496..c87f59f0b11 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -21225,6 +21225,278 @@ components: - PIPELINES_FAILED_DESCENDING - PIPELINES_DURATION_LOST_ASCENDING - PIPELINES_DURATION_LOST_DESCENDING + FleetAgentAttributes: + description: Attributes of a Datadog Agent in the list view. + properties: + agent_version: + description: The Datadog Agent version. + example: 7.50.0 + type: string + api_key_name: + description: The API key name (if available and not redacted). + example: Production API Key + type: string + api_key_uuid: + description: The API key UUID. + example: a1b2c3d4-e5f6-4321-a123-123456789abc + type: string + cloud_provider: + description: The cloud provider where the agent is running. + example: aws + type: string + cluster_name: + description: Kubernetes cluster name (if applicable). + type: string + datadog_agent_key: + description: The unique agent key identifier. + example: my-agent-hostname + type: string + enabled_products: + description: Datadog products enabled on the agent. + items: + type: string + type: array + envs: + description: Environments the agent is reporting from. + items: + type: string + type: array + first_seen_at: + description: Timestamp when the agent was first seen. + format: int64 + type: integer + hostname: + description: The hostname of the agent. + example: my-hostname + type: string + ip_addresses: + description: IP addresses of the agent. + items: + type: string + type: array + is_single_step_instrumentation_enabled: + description: Whether single-step instrumentation is enabled. + type: boolean + last_restart_at: + description: Timestamp of the last agent restart. + format: int64 + type: integer + os: + description: The operating system. + example: linux + type: string + otel_collector_version: + description: OpenTelemetry collector version (if applicable). + type: string + otel_collector_versions: + description: List of OpenTelemetry collector versions (if applicable). + items: + type: string + type: array + pod_name: + description: Kubernetes pod name (if applicable). + type: string + remote_agent_management: + description: Remote agent management status. + example: enabled + type: string + remote_config_status: + description: Remote configuration status. + example: connected + type: string + services: + description: Services running on the agent. + items: + type: string + type: array + tags: + description: Tags associated with the agent. + items: + $ref: '#/components/schemas/FleetAgentAttributesTagsItems' + type: array + team: + description: Team associated with the agent. + type: string + type: object + FleetAgentAttributesTagsItems: + properties: + key: + type: string + value: + type: string + type: object + FleetAgentInfo: + description: Represents detailed information about a specific Datadog Agent. + properties: + attributes: + $ref: '#/components/schemas/FleetAgentInfoAttributes' + id: + description: The unique agent key identifier. + example: my-agent-hostname + type: string + type: + $ref: '#/components/schemas/FleetAgentInfoResourceType' + required: + - id + - type + - attributes + type: object + FleetAgentInfoAttributes: + description: Attributes for agent information. + properties: + agent_infos: + $ref: '#/components/schemas/FleetAgentInfoDetails' + configuration_files: + $ref: '#/components/schemas/FleetConfigurationLayer' + detected_integrations: + description: List of detected integrations. + items: + $ref: '#/components/schemas/FleetDetectedIntegration' + type: array + integrations: + $ref: '#/components/schemas/FleetIntegrationsByStatus' + type: object + FleetAgentInfoDetails: + description: Detailed information about a Datadog Agent. + properties: + agent_version: + description: The Datadog Agent version. + example: 7.50.0 + type: string + api_key_name: + description: The API key name (if available and not redacted). + example: Production API Key + type: string + api_key_uuid: + description: The API key UUID. + example: a1b2c3d4-e5f6-4321-a123-123456789abc + type: string + cloud_provider: + description: The cloud provider where the agent is running. + example: aws + type: string + cluster_name: + description: Kubernetes cluster name (if applicable). + type: string + datadog_agent_key: + description: The unique agent key identifier. + example: my-agent-hostname + type: string + enabled_products: + description: Datadog products enabled on the agent. + items: + type: string + type: array + env: + description: Environments the agent is reporting from. + items: + type: string + type: array + first_seen_at: + description: Timestamp when the agent was first seen. + format: int64 + type: integer + hostname: + description: The hostname of the agent. + example: my-hostname + type: string + hostname_aliases: + description: Alternative hostname list for the agent. + items: + type: string + type: array + install_method_installer_version: + description: The version of the installer used. + example: 1.2.3 + type: string + install_method_tool: + description: The tool used to install the agent. + example: chef + type: string + ip_addresses: + description: IP addresses of the agent. + items: + type: string + type: array + is_single_step_instrumentation_enabled: + description: Whether single-step instrumentation is enabled. + type: boolean + last_restart_at: + description: Timestamp of the last agent restart. + format: int64 + type: integer + os: + description: The operating system. + example: linux + type: string + os_version: + description: The operating system version. + example: Ubuntu 20.04 + type: string + otel_collector_version: + description: OpenTelemetry collector version (if applicable). + type: string + otel_collector_versions: + description: List of OpenTelemetry collector versions (if applicable). + items: + type: string + type: array + otel_collectors: + description: OpenTelemetry collectors associated with the agent (if applicable). + items: + $ref: '#/components/schemas/FleetOtelCollector' + type: array + pod_name: + description: Kubernetes pod name (if applicable). + type: string + python_version: + description: The Python version used by the agent. + example: 3.9.5 + type: string + region: + description: Regions where the agent is running. + items: + type: string + type: array + remote_agent_management: + description: Remote agent management status. + example: enabled + type: string + remote_config_status: + description: Remote configuration status. + example: connected + type: string + services: + description: Services running on the agent. + items: + type: string + type: array + tags: + description: Tags associated with the agent. + items: + type: string + type: array + team: + description: Team associated with the agent. + type: string + type: object + FleetAgentInfoResourceType: + default: datadog_agent_key + description: The type of Agent info resource. + enum: + - datadog_agent_key + example: datadog_agent_key + type: string + x-enum-varnames: + - DATADOG_AGENT_KEY + FleetAgentInfoResponse: + description: Response containing detailed information about a specific agent. + properties: + data: + $ref: '#/components/schemas/FleetAgentInfo' + required: + - data + type: object FleetAgentVersion: description: Represents an available Datadog Agent version. properties: @@ -21267,6 +21539,77 @@ components: required: - data type: object + FleetAgentsResponse: + description: Response containing a paginated list of Datadog Agents. + properties: + data: + $ref: '#/components/schemas/FleetAgentsResponseData' + meta: + $ref: '#/components/schemas/FleetAgentsResponseMeta' + required: + - data + type: object + FleetAgentsResponseData: + description: The response data containing status and agents array. + properties: + attributes: + $ref: '#/components/schemas/FleetAgentsResponseDataAttributes' + type: object + FleetAgentsResponseDataAttributes: + properties: + agents: + description: Array of agents matching the query criteria. + items: + $ref: '#/components/schemas/FleetAgentAttributes' + type: array + type: object + FleetAgentsResponseMeta: + description: Metadata for the list of agents response. + properties: + total_filtered_count: + description: Total number of agents matching the filter criteria across + all pages. + example: 150 + format: int64 + type: integer + type: object + FleetConfigurationFile: + description: A configuration file for an integration. + properties: + file_content: + description: The raw content of the configuration file. + type: string + file_path: + description: Path to the configuration file. + example: /conf.d/postgres.d/postgres.yaml + type: string + filename: + description: Name of the configuration file. + example: postgres.yaml + type: string + type: object + FleetConfigurationLayer: + description: Configuration information organized by layers. + properties: + compiled_configuration: + description: The final compiled configuration. + type: string + env_configuration: + description: Configuration from environment variables. + type: string + file_configuration: + description: Configuration from files. + type: string + parsed_configuration: + description: Parsed configuration output. + type: string + remote_configuration: + description: Remote configuration settings. + type: string + runtime_configuration: + description: Runtime configuration. + type: string + type: object FleetDeployment: description: A deployment that defines automated configuration changes for a fleet of hosts. @@ -21590,6 +21933,93 @@ components: page: $ref: '#/components/schemas/FleetDeploymentsPage' type: object + FleetDetectedIntegration: + description: An integration detected on the agent but not necessarily configured. + properties: + escaped_name: + description: Escaped integration name. + example: postgresql + type: string + prefix: + description: Integration prefix identifier. + example: postgres + type: string + type: object + FleetIntegrationDetails: + description: Detailed information about a single integration. + properties: + data_type: + description: Type of data collected (metrics, logs). + example: metrics + type: string + error_messages: + description: Error messages if the integration has issues. + items: + type: string + type: array + init_config: + description: Initialization configuration (YAML format). + type: string + instance_config: + description: Instance-specific configuration (YAML format). + type: string + is_custom_check: + description: Whether this is a custom integration. + type: boolean + log_config: + description: Log collection configuration (YAML format). + type: string + name: + description: Name of the integration instance. + type: string + source_index: + description: Index in the configuration file. + format: int64 + type: integer + source_path: + description: Path to the configuration file. + type: string + type: + description: Integration type. + example: postgres + type: string + type: object + FleetIntegrationsByStatus: + description: Integrations organized by their status. + properties: + configuration_files: + description: Configuration files for integrations. + items: + $ref: '#/components/schemas/FleetConfigurationFile' + type: array + datadog_agent_key: + description: The unique agent key identifier. + type: string + error_integrations: + description: Integrations with errors. + items: + $ref: '#/components/schemas/FleetIntegrationDetails' + type: array + missing_integrations: + description: Detected but not configured integrations. + items: + $ref: '#/components/schemas/FleetDetectedIntegration' + type: array + warning_integrations: + description: Integrations with warnings. + items: + $ref: '#/components/schemas/FleetIntegrationDetails' + type: array + working_integrations: + description: Integrations that are working correctly. + items: + $ref: '#/components/schemas/FleetIntegrationDetails' + type: array + type: object + FleetOtelCollector: + additionalProperties: {} + description: OpenTelemetry collector information. + type: object FleetSchedule: description: A schedule that automatically creates deployments based on a recurrence rule. @@ -56356,7 +56786,7 @@ info: version: '1.0' openapi: 3.0.0 paths: - /api/unstable/fleet/agents: + /api/unstable/fleet/agent_versions: get: description: 'Retrieve a list of all available Datadog Agent versions. @@ -56399,6 +56829,142 @@ paths: x-unstable: 'This endpoint is in Preview and may introduce breaking changes. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/unstable/fleet/agents: + get: + description: 'Retrieve a paginated list of all Datadog Agents. + + This endpoint returns a paginated list of all Datadog Agents with support + for pagination, sorting, and filtering. + + Use the `page_number` and `page_size` query parameters to paginate through + results.' + operationId: ListFleetAgents + parameters: + - description: Page number for pagination (must be greater than 0). + in: query + name: page_number + required: false + schema: + format: int64 + minimum: 1 + type: integer + - description: Number of results per page (must be greater than 0 and less than + or equal to 100). + in: query + name: page_size + required: false + schema: + default: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + - description: Attribute to sort by. + in: query + name: sort_attribute + required: false + schema: + type: string + - description: Sort order (true for descending, false for ascending). + in: query + name: sort_descending + required: false + schema: + type: boolean + - description: Comma-separated list of tags to filter agents. + in: query + name: tags + required: false + schema: + type: string + - description: Filter string for narrowing down agent results. + example: hostname:my-hostname OR env:dev + in: query + name: filter + required: false + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FleetAgentsResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List all Datadog Agents + tags: + - Fleet Automation + x-permission: + operator: AND + permissions: + - hosts_read + x-unstable: 'This endpoint is in Preview and may introduce breaking changes. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/unstable/fleet/agents/{agent_key}: + get: + description: 'Retrieve detailed information about a specific Datadog Agent. + + This endpoint returns comprehensive information about an agent including: + + - Agent details and metadata + + - Configured integrations organized by status (working, warning, error, missing) + + - Detected integrations + + - Configuration files and layers' + operationId: GetFleetAgentInfo + parameters: + - description: The unique identifier (agent key) for the Datadog Agent. + in: path + name: agent_key + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/FleetAgentInfoResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get detailed information about an agent + tags: + - Fleet Automation + x-permission: + operator: AND + permissions: + - hosts_read + x-unstable: 'This endpoint is in Preview and may introduce breaking changes. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/unstable/fleet/deployments: get: description: 'Retrieve a list of all deployments for fleet automation. @@ -56492,6 +57058,77 @@ paths: type: file filter_query: env:prod type: deployment + comprehensive_configuration: + summary: Comprehensive example with multiple configuration file types + value: + data: + attributes: + config_operations: + - file_op: merge-patch + file_path: /datadog.yaml + patch: + apm_config: + apm_dd_url: https://trace.agent.datadoghq.com + enabled: true + log_level: info + logs_enabled: true + process_config: + enabled: true + - file_op: merge-patch + file_path: /security-agent.yaml + patch: + runtime_security_config: + enabled: true + fim_enabled: true + - file_op: merge-patch + file_path: /system-probe.yaml + patch: + network_config: + enabled: true + service_monitoring_config: + enabled: true + - file_op: merge-patch + file_path: /application_monitoring.yaml + patch: + enabled: true + server: + host: 0.0.0.0 + port: 8126 + - file_op: merge-patch + file_path: /conf.d/logs.d/custom-app.yaml + patch: + logs: + - path: /var/log/custom-app/*.log + service: custom-app + source: custom + type: file + - file_op: merge-patch + file_path: /conf.d/docker.d/docker-logs.yaml + patch: + logs: + - service: docker + source: docker + type: docker + - file_op: merge-patch + file_path: /conf.d/snmp.d/network-devices.yaml + patch: + init_config: + loader: core + instances: + - community_string: public + ip_address: 192.168.1.1 + - file_op: merge-patch + file_path: /conf.d/postgres.d/conf.yaml + patch: + instances: + - dbname: postgres + host: localhost + port: 5432 + username: datadog + - file_op: delete + file_path: /conf.d/deprecated-integration.yaml + filter_query: env:prod AND datacenter:us-east-1 + type: deployment delete_config_file: summary: Delete a configuration file value: diff --git a/examples/v2/fleet-automation/GetFleetAgentInfo.java b/examples/v2/fleet-automation/GetFleetAgentInfo.java new file mode 100644 index 00000000000..0dedc2b7845 --- /dev/null +++ b/examples/v2/fleet-automation/GetFleetAgentInfo.java @@ -0,0 +1,25 @@ +// Get detailed information about an agent returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.FleetAutomationApi; +import com.datadog.api.client.v2.model.FleetAgentInfoResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getFleetAgentInfo", true); + FleetAutomationApi apiInstance = new FleetAutomationApi(defaultClient); + + try { + FleetAgentInfoResponse result = apiInstance.getFleetAgentInfo("agent_key"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FleetAutomationApi#getFleetAgentInfo"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/fleet-automation/ListFleetAgents.java b/examples/v2/fleet-automation/ListFleetAgents.java new file mode 100644 index 00000000000..2ff84d700f0 --- /dev/null +++ b/examples/v2/fleet-automation/ListFleetAgents.java @@ -0,0 +1,25 @@ +// List all Datadog Agents returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.FleetAutomationApi; +import com.datadog.api.client.v2.model.FleetAgentsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listFleetAgents", true); + FleetAutomationApi apiInstance = new FleetAutomationApi(defaultClient); + + try { + FleetAgentsResponse result = apiInstance.listFleetAgents(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FleetAutomationApi#listFleetAgents"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index fb04e6a5367..4dde8644a5e 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -692,8 +692,10 @@ public class ApiClient { put("v2.createFleetDeploymentUpgrade", false); put("v2.createFleetSchedule", false); put("v2.deleteFleetSchedule", false); + put("v2.getFleetAgentInfo", false); put("v2.getFleetDeployment", false); put("v2.getFleetSchedule", false); + put("v2.listFleetAgents", false); put("v2.listFleetAgentVersions", false); put("v2.listFleetDeployments", false); put("v2.listFleetSchedules", false); diff --git a/src/main/java/com/datadog/api/client/v2/api/FleetAutomationApi.java b/src/main/java/com/datadog/api/client/v2/api/FleetAutomationApi.java index 5edd750cfb1..9ce939986a3 100644 --- a/src/main/java/com/datadog/api/client/v2/api/FleetAutomationApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/FleetAutomationApi.java @@ -4,7 +4,9 @@ import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; +import com.datadog.api.client.v2.model.FleetAgentInfoResponse; import com.datadog.api.client.v2.model.FleetAgentVersionsResponse; +import com.datadog.api.client.v2.model.FleetAgentsResponse; import com.datadog.api.client.v2.model.FleetDeploymentConfigureCreateRequest; import com.datadog.api.client.v2.model.FleetDeploymentPackageUpgradeCreateRequest; import com.datadog.api.client.v2.model.FleetDeploymentResponse; @@ -855,6 +857,163 @@ public CompletableFuture> deleteFleetScheduleWithHttpInfoAsync null); } + /** + * Get detailed information about an agent. + * + *

See {@link #getFleetAgentInfoWithHttpInfo}. + * + * @param agentKey The unique identifier (agent key) for the Datadog Agent. (required) + * @return FleetAgentInfoResponse + * @throws ApiException if fails to make API call + */ + public FleetAgentInfoResponse getFleetAgentInfo(String agentKey) throws ApiException { + return getFleetAgentInfoWithHttpInfo(agentKey).getData(); + } + + /** + * Get detailed information about an agent. + * + *

See {@link #getFleetAgentInfoWithHttpInfoAsync}. + * + * @param agentKey The unique identifier (agent key) for the Datadog Agent. (required) + * @return CompletableFuture<FleetAgentInfoResponse> + */ + public CompletableFuture getFleetAgentInfoAsync(String agentKey) { + return getFleetAgentInfoWithHttpInfoAsync(agentKey) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve detailed information about a specific Datadog Agent. This endpoint returns + * comprehensive information about an agent including: - Agent details and metadata - Configured + * integrations organized by status (working, warning, error, missing) - Detected integrations - + * Configuration files and layers + * + * @param agentKey The unique identifier (agent key) for the Datadog Agent. (required) + * @return ApiResponse<FleetAgentInfoResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getFleetAgentInfoWithHttpInfo(String agentKey) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "getFleetAgentInfo"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'agentKey' is set + if (agentKey == null) { + throw new ApiException( + 400, "Missing the required parameter 'agentKey' when calling getFleetAgentInfo"); + } + // create path and map variables + String localVarPath = + "/api/unstable/fleet/agents/{agent_key}" + .replaceAll("\\{" + "agent_key" + "\\}", apiClient.escapeString(agentKey.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.FleetAutomationApi.getFleetAgentInfo", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get detailed information about an agent. + * + *

See {@link #getFleetAgentInfoWithHttpInfo}. + * + * @param agentKey The unique identifier (agent key) for the Datadog Agent. (required) + * @return CompletableFuture<ApiResponse<FleetAgentInfoResponse>> + */ + public CompletableFuture> getFleetAgentInfoWithHttpInfoAsync( + String agentKey) { + // Check if unstable operation is enabled + String operationId = "getFleetAgentInfo"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'agentKey' is set + if (agentKey == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'agentKey' when calling getFleetAgentInfo")); + return result; + } + // create path and map variables + String localVarPath = + "/api/unstable/fleet/agents/{agent_key}" + .replaceAll("\\{" + "agent_key" + "\\}", apiClient.escapeString(agentKey.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.FleetAutomationApi.getFleetAgentInfo", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** Manage optional parameters to getFleetDeployment. */ public static class GetFleetDeploymentOptionalParameters { private Long limit; @@ -1266,6 +1425,277 @@ public CompletableFuture> getFleetScheduleWit new GenericType() {}); } + /** Manage optional parameters to listFleetAgents. */ + public static class ListFleetAgentsOptionalParameters { + private Long pageNumber; + private Long pageSize; + private String sortAttribute; + private Boolean sortDescending; + private String tags; + private String filter; + + /** + * Set pageNumber. + * + * @param pageNumber Page number for pagination (must be greater than 0). (optional) + * @return ListFleetAgentsOptionalParameters + */ + public ListFleetAgentsOptionalParameters pageNumber(Long pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Set pageSize. + * + * @param pageSize Number of results per page (must be greater than 0 and less than or equal to + * 100). (optional, default to 10) + * @return ListFleetAgentsOptionalParameters + */ + public ListFleetAgentsOptionalParameters pageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set sortAttribute. + * + * @param sortAttribute Attribute to sort by. (optional) + * @return ListFleetAgentsOptionalParameters + */ + public ListFleetAgentsOptionalParameters sortAttribute(String sortAttribute) { + this.sortAttribute = sortAttribute; + return this; + } + + /** + * Set sortDescending. + * + * @param sortDescending Sort order (true for descending, false for ascending). (optional) + * @return ListFleetAgentsOptionalParameters + */ + public ListFleetAgentsOptionalParameters sortDescending(Boolean sortDescending) { + this.sortDescending = sortDescending; + return this; + } + + /** + * Set tags. + * + * @param tags Comma-separated list of tags to filter agents. (optional) + * @return ListFleetAgentsOptionalParameters + */ + public ListFleetAgentsOptionalParameters tags(String tags) { + this.tags = tags; + return this; + } + + /** + * Set filter. + * + * @param filter Filter string for narrowing down agent results. (optional) + * @return ListFleetAgentsOptionalParameters + */ + public ListFleetAgentsOptionalParameters filter(String filter) { + this.filter = filter; + return this; + } + } + + /** + * List all Datadog Agents. + * + *

See {@link #listFleetAgentsWithHttpInfo}. + * + * @return FleetAgentsResponse + * @throws ApiException if fails to make API call + */ + public FleetAgentsResponse listFleetAgents() throws ApiException { + return listFleetAgentsWithHttpInfo(new ListFleetAgentsOptionalParameters()).getData(); + } + + /** + * List all Datadog Agents. + * + *

See {@link #listFleetAgentsWithHttpInfoAsync}. + * + * @return CompletableFuture<FleetAgentsResponse> + */ + public CompletableFuture listFleetAgentsAsync() { + return listFleetAgentsWithHttpInfoAsync(new ListFleetAgentsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all Datadog Agents. + * + *

See {@link #listFleetAgentsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return FleetAgentsResponse + * @throws ApiException if fails to make API call + */ + public FleetAgentsResponse listFleetAgents(ListFleetAgentsOptionalParameters parameters) + throws ApiException { + return listFleetAgentsWithHttpInfo(parameters).getData(); + } + + /** + * List all Datadog Agents. + * + *

See {@link #listFleetAgentsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<FleetAgentsResponse> + */ + public CompletableFuture listFleetAgentsAsync( + ListFleetAgentsOptionalParameters parameters) { + return listFleetAgentsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve a paginated list of all Datadog Agents. This endpoint returns a paginated list of all + * Datadog Agents with support for pagination, sorting, and filtering. Use the page_number + * and page_size query parameters to paginate through results. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<FleetAgentsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse listFleetAgentsWithHttpInfo( + ListFleetAgentsOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listFleetAgents"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + Long pageNumber = parameters.pageNumber; + Long pageSize = parameters.pageSize; + String sortAttribute = parameters.sortAttribute; + Boolean sortDescending = parameters.sortDescending; + String tags = parameters.tags; + String filter = parameters.filter; + // create path and map variables + String localVarPath = "/api/unstable/fleet/agents"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_number", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_attribute", sortAttribute)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_descending", sortDescending)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "tags", tags)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.FleetAutomationApi.listFleetAgents", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List all Datadog Agents. + * + *

See {@link #listFleetAgentsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<FleetAgentsResponse>> + */ + public CompletableFuture> listFleetAgentsWithHttpInfoAsync( + ListFleetAgentsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listFleetAgents"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + Long pageNumber = parameters.pageNumber; + Long pageSize = parameters.pageSize; + String sortAttribute = parameters.sortAttribute; + Boolean sortDescending = parameters.sortDescending; + String tags = parameters.tags; + String filter = parameters.filter; + // create path and map variables + String localVarPath = "/api/unstable/fleet/agents"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_number", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_attribute", sortAttribute)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_descending", sortDescending)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "tags", tags)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.FleetAutomationApi.listFleetAgents", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * List all available Agent versions. * @@ -1325,7 +1755,7 @@ public ApiResponse listFleetAgentVersionsWithHttpInf } Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/unstable/fleet/agents"; + String localVarPath = "/api/unstable/fleet/agent_versions"; Map localVarHeaderParams = new HashMap(); @@ -1370,7 +1800,7 @@ public ApiResponse listFleetAgentVersionsWithHttpInf } Object localVarPostBody = null; // create path and map variables - String localVarPath = "/api/unstable/fleet/agents"; + String localVarPath = "/api/unstable/fleet/agent_versions"; Map localVarHeaderParams = new HashMap(); diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetAgentAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FleetAgentAttributes.java new file mode 100644 index 00000000000..a03709946fe --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetAgentAttributes.java @@ -0,0 +1,793 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a Datadog Agent in the list view. */ +@JsonPropertyOrder({ + FleetAgentAttributes.JSON_PROPERTY_AGENT_VERSION, + FleetAgentAttributes.JSON_PROPERTY_API_KEY_NAME, + FleetAgentAttributes.JSON_PROPERTY_API_KEY_UUID, + FleetAgentAttributes.JSON_PROPERTY_CLOUD_PROVIDER, + FleetAgentAttributes.JSON_PROPERTY_CLUSTER_NAME, + FleetAgentAttributes.JSON_PROPERTY_DATADOG_AGENT_KEY, + FleetAgentAttributes.JSON_PROPERTY_ENABLED_PRODUCTS, + FleetAgentAttributes.JSON_PROPERTY_ENVS, + FleetAgentAttributes.JSON_PROPERTY_FIRST_SEEN_AT, + FleetAgentAttributes.JSON_PROPERTY_HOSTNAME, + FleetAgentAttributes.JSON_PROPERTY_IP_ADDRESSES, + FleetAgentAttributes.JSON_PROPERTY_IS_SINGLE_STEP_INSTRUMENTATION_ENABLED, + FleetAgentAttributes.JSON_PROPERTY_LAST_RESTART_AT, + FleetAgentAttributes.JSON_PROPERTY_OS, + FleetAgentAttributes.JSON_PROPERTY_OTEL_COLLECTOR_VERSION, + FleetAgentAttributes.JSON_PROPERTY_OTEL_COLLECTOR_VERSIONS, + FleetAgentAttributes.JSON_PROPERTY_POD_NAME, + FleetAgentAttributes.JSON_PROPERTY_REMOTE_AGENT_MANAGEMENT, + FleetAgentAttributes.JSON_PROPERTY_REMOTE_CONFIG_STATUS, + FleetAgentAttributes.JSON_PROPERTY_SERVICES, + FleetAgentAttributes.JSON_PROPERTY_TAGS, + FleetAgentAttributes.JSON_PROPERTY_TEAM +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FleetAgentAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AGENT_VERSION = "agent_version"; + private String agentVersion; + + public static final String JSON_PROPERTY_API_KEY_NAME = "api_key_name"; + private String apiKeyName; + + public static final String JSON_PROPERTY_API_KEY_UUID = "api_key_uuid"; + private String apiKeyUuid; + + public static final String JSON_PROPERTY_CLOUD_PROVIDER = "cloud_provider"; + private String cloudProvider; + + public static final String JSON_PROPERTY_CLUSTER_NAME = "cluster_name"; + private String clusterName; + + public static final String JSON_PROPERTY_DATADOG_AGENT_KEY = "datadog_agent_key"; + private String datadogAgentKey; + + public static final String JSON_PROPERTY_ENABLED_PRODUCTS = "enabled_products"; + private List enabledProducts = null; + + public static final String JSON_PROPERTY_ENVS = "envs"; + private List envs = null; + + public static final String JSON_PROPERTY_FIRST_SEEN_AT = "first_seen_at"; + private Long firstSeenAt; + + public static final String JSON_PROPERTY_HOSTNAME = "hostname"; + private String hostname; + + public static final String JSON_PROPERTY_IP_ADDRESSES = "ip_addresses"; + private List ipAddresses = null; + + public static final String JSON_PROPERTY_IS_SINGLE_STEP_INSTRUMENTATION_ENABLED = + "is_single_step_instrumentation_enabled"; + private Boolean isSingleStepInstrumentationEnabled; + + public static final String JSON_PROPERTY_LAST_RESTART_AT = "last_restart_at"; + private Long lastRestartAt; + + public static final String JSON_PROPERTY_OS = "os"; + private String os; + + public static final String JSON_PROPERTY_OTEL_COLLECTOR_VERSION = "otel_collector_version"; + private String otelCollectorVersion; + + public static final String JSON_PROPERTY_OTEL_COLLECTOR_VERSIONS = "otel_collector_versions"; + private List otelCollectorVersions = null; + + public static final String JSON_PROPERTY_POD_NAME = "pod_name"; + private String podName; + + public static final String JSON_PROPERTY_REMOTE_AGENT_MANAGEMENT = "remote_agent_management"; + private String remoteAgentManagement; + + public static final String JSON_PROPERTY_REMOTE_CONFIG_STATUS = "remote_config_status"; + private String remoteConfigStatus; + + public static final String JSON_PROPERTY_SERVICES = "services"; + private List services = null; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + public static final String JSON_PROPERTY_TEAM = "team"; + private String team; + + public FleetAgentAttributes agentVersion(String agentVersion) { + this.agentVersion = agentVersion; + return this; + } + + /** + * The Datadog Agent version. + * + * @return agentVersion + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAgentVersion() { + return agentVersion; + } + + public void setAgentVersion(String agentVersion) { + this.agentVersion = agentVersion; + } + + public FleetAgentAttributes apiKeyName(String apiKeyName) { + this.apiKeyName = apiKeyName; + return this; + } + + /** + * The API key name (if available and not redacted). + * + * @return apiKeyName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_API_KEY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getApiKeyName() { + return apiKeyName; + } + + public void setApiKeyName(String apiKeyName) { + this.apiKeyName = apiKeyName; + } + + public FleetAgentAttributes apiKeyUuid(String apiKeyUuid) { + this.apiKeyUuid = apiKeyUuid; + return this; + } + + /** + * The API key UUID. + * + * @return apiKeyUuid + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_API_KEY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getApiKeyUuid() { + return apiKeyUuid; + } + + public void setApiKeyUuid(String apiKeyUuid) { + this.apiKeyUuid = apiKeyUuid; + } + + public FleetAgentAttributes cloudProvider(String cloudProvider) { + this.cloudProvider = cloudProvider; + return this; + } + + /** + * The cloud provider where the agent is running. + * + * @return cloudProvider + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLOUD_PROVIDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCloudProvider() { + return cloudProvider; + } + + public void setCloudProvider(String cloudProvider) { + this.cloudProvider = cloudProvider; + } + + public FleetAgentAttributes clusterName(String clusterName) { + this.clusterName = clusterName; + return this; + } + + /** + * Kubernetes cluster name (if applicable). + * + * @return clusterName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLUSTER_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getClusterName() { + return clusterName; + } + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + public FleetAgentAttributes datadogAgentKey(String datadogAgentKey) { + this.datadogAgentKey = datadogAgentKey; + return this; + } + + /** + * The unique agent key identifier. + * + * @return datadogAgentKey + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATADOG_AGENT_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDatadogAgentKey() { + return datadogAgentKey; + } + + public void setDatadogAgentKey(String datadogAgentKey) { + this.datadogAgentKey = datadogAgentKey; + } + + public FleetAgentAttributes enabledProducts(List enabledProducts) { + this.enabledProducts = enabledProducts; + return this; + } + + public FleetAgentAttributes addEnabledProductsItem(String enabledProductsItem) { + if (this.enabledProducts == null) { + this.enabledProducts = new ArrayList<>(); + } + this.enabledProducts.add(enabledProductsItem); + return this; + } + + /** + * Datadog products enabled on the agent. + * + * @return enabledProducts + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED_PRODUCTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEnabledProducts() { + return enabledProducts; + } + + public void setEnabledProducts(List enabledProducts) { + this.enabledProducts = enabledProducts; + } + + public FleetAgentAttributes envs(List envs) { + this.envs = envs; + return this; + } + + public FleetAgentAttributes addEnvsItem(String envsItem) { + if (this.envs == null) { + this.envs = new ArrayList<>(); + } + this.envs.add(envsItem); + return this; + } + + /** + * Environments the agent is reporting from. + * + * @return envs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENVS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEnvs() { + return envs; + } + + public void setEnvs(List envs) { + this.envs = envs; + } + + public FleetAgentAttributes firstSeenAt(Long firstSeenAt) { + this.firstSeenAt = firstSeenAt; + return this; + } + + /** + * Timestamp when the agent was first seen. + * + * @return firstSeenAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIRST_SEEN_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getFirstSeenAt() { + return firstSeenAt; + } + + public void setFirstSeenAt(Long firstSeenAt) { + this.firstSeenAt = firstSeenAt; + } + + public FleetAgentAttributes hostname(String hostname) { + this.hostname = hostname; + return this; + } + + /** + * The hostname of the agent. + * + * @return hostname + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOSTNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getHostname() { + return hostname; + } + + public void setHostname(String hostname) { + this.hostname = hostname; + } + + public FleetAgentAttributes ipAddresses(List ipAddresses) { + this.ipAddresses = ipAddresses; + return this; + } + + public FleetAgentAttributes addIpAddressesItem(String ipAddressesItem) { + if (this.ipAddresses == null) { + this.ipAddresses = new ArrayList<>(); + } + this.ipAddresses.add(ipAddressesItem); + return this; + } + + /** + * IP addresses of the agent. + * + * @return ipAddresses + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IP_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getIpAddresses() { + return ipAddresses; + } + + public void setIpAddresses(List ipAddresses) { + this.ipAddresses = ipAddresses; + } + + public FleetAgentAttributes isSingleStepInstrumentationEnabled( + Boolean isSingleStepInstrumentationEnabled) { + this.isSingleStepInstrumentationEnabled = isSingleStepInstrumentationEnabled; + return this; + } + + /** + * Whether single-step instrumentation is enabled. + * + * @return isSingleStepInstrumentationEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_SINGLE_STEP_INSTRUMENTATION_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsSingleStepInstrumentationEnabled() { + return isSingleStepInstrumentationEnabled; + } + + public void setIsSingleStepInstrumentationEnabled(Boolean isSingleStepInstrumentationEnabled) { + this.isSingleStepInstrumentationEnabled = isSingleStepInstrumentationEnabled; + } + + public FleetAgentAttributes lastRestartAt(Long lastRestartAt) { + this.lastRestartAt = lastRestartAt; + return this; + } + + /** + * Timestamp of the last agent restart. + * + * @return lastRestartAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_RESTART_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLastRestartAt() { + return lastRestartAt; + } + + public void setLastRestartAt(Long lastRestartAt) { + this.lastRestartAt = lastRestartAt; + } + + public FleetAgentAttributes os(String os) { + this.os = os; + return this; + } + + /** + * The operating system. + * + * @return os + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOs() { + return os; + } + + public void setOs(String os) { + this.os = os; + } + + public FleetAgentAttributes otelCollectorVersion(String otelCollectorVersion) { + this.otelCollectorVersion = otelCollectorVersion; + return this; + } + + /** + * OpenTelemetry collector version (if applicable). + * + * @return otelCollectorVersion + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OTEL_COLLECTOR_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOtelCollectorVersion() { + return otelCollectorVersion; + } + + public void setOtelCollectorVersion(String otelCollectorVersion) { + this.otelCollectorVersion = otelCollectorVersion; + } + + public FleetAgentAttributes otelCollectorVersions(List otelCollectorVersions) { + this.otelCollectorVersions = otelCollectorVersions; + return this; + } + + public FleetAgentAttributes addOtelCollectorVersionsItem(String otelCollectorVersionsItem) { + if (this.otelCollectorVersions == null) { + this.otelCollectorVersions = new ArrayList<>(); + } + this.otelCollectorVersions.add(otelCollectorVersionsItem); + return this; + } + + /** + * List of OpenTelemetry collector versions (if applicable). + * + * @return otelCollectorVersions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OTEL_COLLECTOR_VERSIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getOtelCollectorVersions() { + return otelCollectorVersions; + } + + public void setOtelCollectorVersions(List otelCollectorVersions) { + this.otelCollectorVersions = otelCollectorVersions; + } + + public FleetAgentAttributes podName(String podName) { + this.podName = podName; + return this; + } + + /** + * Kubernetes pod name (if applicable). + * + * @return podName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POD_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPodName() { + return podName; + } + + public void setPodName(String podName) { + this.podName = podName; + } + + public FleetAgentAttributes remoteAgentManagement(String remoteAgentManagement) { + this.remoteAgentManagement = remoteAgentManagement; + return this; + } + + /** + * Remote agent management status. + * + * @return remoteAgentManagement + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REMOTE_AGENT_MANAGEMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRemoteAgentManagement() { + return remoteAgentManagement; + } + + public void setRemoteAgentManagement(String remoteAgentManagement) { + this.remoteAgentManagement = remoteAgentManagement; + } + + public FleetAgentAttributes remoteConfigStatus(String remoteConfigStatus) { + this.remoteConfigStatus = remoteConfigStatus; + return this; + } + + /** + * Remote configuration status. + * + * @return remoteConfigStatus + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REMOTE_CONFIG_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRemoteConfigStatus() { + return remoteConfigStatus; + } + + public void setRemoteConfigStatus(String remoteConfigStatus) { + this.remoteConfigStatus = remoteConfigStatus; + } + + public FleetAgentAttributes services(List services) { + this.services = services; + return this; + } + + public FleetAgentAttributes addServicesItem(String servicesItem) { + if (this.services == null) { + this.services = new ArrayList<>(); + } + this.services.add(servicesItem); + return this; + } + + /** + * Services running on the agent. + * + * @return services + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getServices() { + return services; + } + + public void setServices(List services) { + this.services = services; + } + + public FleetAgentAttributes tags(List tags) { + this.tags = tags; + for (FleetAgentAttributesTagsItems item : tags) { + this.unparsed |= item.unparsed; + } + return this; + } + + public FleetAgentAttributes addTagsItem(FleetAgentAttributesTagsItems tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + this.unparsed |= tagsItem.unparsed; + return this; + } + + /** + * Tags associated with the agent. + * + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + public FleetAgentAttributes team(String team) { + this.team = team; + return this; + } + + /** + * Team associated with the agent. + * + * @return team + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEAM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTeam() { + return team; + } + + public void setTeam(String team) { + this.team = team; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FleetAgentAttributes + */ + @JsonAnySetter + public FleetAgentAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FleetAgentAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FleetAgentAttributes fleetAgentAttributes = (FleetAgentAttributes) o; + return Objects.equals(this.agentVersion, fleetAgentAttributes.agentVersion) + && Objects.equals(this.apiKeyName, fleetAgentAttributes.apiKeyName) + && Objects.equals(this.apiKeyUuid, fleetAgentAttributes.apiKeyUuid) + && Objects.equals(this.cloudProvider, fleetAgentAttributes.cloudProvider) + && Objects.equals(this.clusterName, fleetAgentAttributes.clusterName) + && Objects.equals(this.datadogAgentKey, fleetAgentAttributes.datadogAgentKey) + && Objects.equals(this.enabledProducts, fleetAgentAttributes.enabledProducts) + && Objects.equals(this.envs, fleetAgentAttributes.envs) + && Objects.equals(this.firstSeenAt, fleetAgentAttributes.firstSeenAt) + && Objects.equals(this.hostname, fleetAgentAttributes.hostname) + && Objects.equals(this.ipAddresses, fleetAgentAttributes.ipAddresses) + && Objects.equals( + this.isSingleStepInstrumentationEnabled, + fleetAgentAttributes.isSingleStepInstrumentationEnabled) + && Objects.equals(this.lastRestartAt, fleetAgentAttributes.lastRestartAt) + && Objects.equals(this.os, fleetAgentAttributes.os) + && Objects.equals(this.otelCollectorVersion, fleetAgentAttributes.otelCollectorVersion) + && Objects.equals(this.otelCollectorVersions, fleetAgentAttributes.otelCollectorVersions) + && Objects.equals(this.podName, fleetAgentAttributes.podName) + && Objects.equals(this.remoteAgentManagement, fleetAgentAttributes.remoteAgentManagement) + && Objects.equals(this.remoteConfigStatus, fleetAgentAttributes.remoteConfigStatus) + && Objects.equals(this.services, fleetAgentAttributes.services) + && Objects.equals(this.tags, fleetAgentAttributes.tags) + && Objects.equals(this.team, fleetAgentAttributes.team) + && Objects.equals(this.additionalProperties, fleetAgentAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + agentVersion, + apiKeyName, + apiKeyUuid, + cloudProvider, + clusterName, + datadogAgentKey, + enabledProducts, + envs, + firstSeenAt, + hostname, + ipAddresses, + isSingleStepInstrumentationEnabled, + lastRestartAt, + os, + otelCollectorVersion, + otelCollectorVersions, + podName, + remoteAgentManagement, + remoteConfigStatus, + services, + tags, + team, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FleetAgentAttributes {\n"); + sb.append(" agentVersion: ").append(toIndentedString(agentVersion)).append("\n"); + sb.append(" apiKeyName: ").append(toIndentedString(apiKeyName)).append("\n"); + sb.append(" apiKeyUuid: ").append(toIndentedString(apiKeyUuid)).append("\n"); + sb.append(" cloudProvider: ").append(toIndentedString(cloudProvider)).append("\n"); + sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); + sb.append(" datadogAgentKey: ").append(toIndentedString(datadogAgentKey)).append("\n"); + sb.append(" enabledProducts: ").append(toIndentedString(enabledProducts)).append("\n"); + sb.append(" envs: ").append(toIndentedString(envs)).append("\n"); + sb.append(" firstSeenAt: ").append(toIndentedString(firstSeenAt)).append("\n"); + sb.append(" hostname: ").append(toIndentedString(hostname)).append("\n"); + sb.append(" ipAddresses: ").append(toIndentedString(ipAddresses)).append("\n"); + sb.append(" isSingleStepInstrumentationEnabled: ") + .append(toIndentedString(isSingleStepInstrumentationEnabled)) + .append("\n"); + sb.append(" lastRestartAt: ").append(toIndentedString(lastRestartAt)).append("\n"); + sb.append(" os: ").append(toIndentedString(os)).append("\n"); + sb.append(" otelCollectorVersion: ") + .append(toIndentedString(otelCollectorVersion)) + .append("\n"); + sb.append(" otelCollectorVersions: ") + .append(toIndentedString(otelCollectorVersions)) + .append("\n"); + sb.append(" podName: ").append(toIndentedString(podName)).append("\n"); + sb.append(" remoteAgentManagement: ") + .append(toIndentedString(remoteAgentManagement)) + .append("\n"); + sb.append(" remoteConfigStatus: ").append(toIndentedString(remoteConfigStatus)).append("\n"); + sb.append(" services: ").append(toIndentedString(services)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" team: ").append(toIndentedString(team)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetAgentAttributesTagsItems.java b/src/main/java/com/datadog/api/client/v2/model/FleetAgentAttributesTagsItems.java new file mode 100644 index 00000000000..e1f95fd2677 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetAgentAttributesTagsItems.java @@ -0,0 +1,165 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + FleetAgentAttributesTagsItems.JSON_PROPERTY_KEY, + FleetAgentAttributesTagsItems.JSON_PROPERTY_VALUE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FleetAgentAttributesTagsItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_KEY = "key"; + private String key; + + public static final String JSON_PROPERTY_VALUE = "value"; + private String value; + + public FleetAgentAttributesTagsItems key(String key) { + this.key = key; + return this; + } + + /** + * Getkey + * + * @return key + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public FleetAgentAttributesTagsItems value(String value) { + this.value = value; + return this; + } + + /** + * Getvalue + * + * @return value + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FleetAgentAttributesTagsItems + */ + @JsonAnySetter + public FleetAgentAttributesTagsItems putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FleetAgentAttributesTagsItems object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FleetAgentAttributesTagsItems fleetAgentAttributesTagsItems = (FleetAgentAttributesTagsItems) o; + return Objects.equals(this.key, fleetAgentAttributesTagsItems.key) + && Objects.equals(this.value, fleetAgentAttributesTagsItems.value) + && Objects.equals( + this.additionalProperties, fleetAgentAttributesTagsItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(key, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FleetAgentAttributesTagsItems {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetAgentInfo.java b/src/main/java/com/datadog/api/client/v2/model/FleetAgentInfo.java new file mode 100644 index 00000000000..222421f4557 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetAgentInfo.java @@ -0,0 +1,209 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Represents detailed information about a specific Datadog Agent. */ +@JsonPropertyOrder({ + FleetAgentInfo.JSON_PROPERTY_ATTRIBUTES, + FleetAgentInfo.JSON_PROPERTY_ID, + FleetAgentInfo.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FleetAgentInfo { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private FleetAgentInfoAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private FleetAgentInfoResourceType type = FleetAgentInfoResourceType.DATADOG_AGENT_KEY; + + public FleetAgentInfo() {} + + @JsonCreator + public FleetAgentInfo( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + FleetAgentInfoAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) FleetAgentInfoResourceType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public FleetAgentInfo attributes(FleetAgentInfoAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for agent information. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FleetAgentInfoAttributes getAttributes() { + return attributes; + } + + public void setAttributes(FleetAgentInfoAttributes attributes) { + this.attributes = attributes; + } + + public FleetAgentInfo id(String id) { + this.id = id; + return this; + } + + /** + * The unique agent key identifier. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public FleetAgentInfo type(FleetAgentInfoResourceType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of Agent info resource. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FleetAgentInfoResourceType getType() { + return type; + } + + public void setType(FleetAgentInfoResourceType 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 FleetAgentInfo + */ + @JsonAnySetter + public FleetAgentInfo putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FleetAgentInfo object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FleetAgentInfo fleetAgentInfo = (FleetAgentInfo) o; + return Objects.equals(this.attributes, fleetAgentInfo.attributes) + && Objects.equals(this.id, fleetAgentInfo.id) + && Objects.equals(this.type, fleetAgentInfo.type) + && Objects.equals(this.additionalProperties, fleetAgentInfo.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FleetAgentInfo {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetAgentInfoAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FleetAgentInfoAttributes.java new file mode 100644 index 00000000000..3afeb15587c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetAgentInfoAttributes.java @@ -0,0 +1,240 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes for agent information. */ +@JsonPropertyOrder({ + FleetAgentInfoAttributes.JSON_PROPERTY_AGENT_INFOS, + FleetAgentInfoAttributes.JSON_PROPERTY_CONFIGURATION_FILES, + FleetAgentInfoAttributes.JSON_PROPERTY_DETECTED_INTEGRATIONS, + FleetAgentInfoAttributes.JSON_PROPERTY_INTEGRATIONS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FleetAgentInfoAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AGENT_INFOS = "agent_infos"; + private FleetAgentInfoDetails agentInfos; + + public static final String JSON_PROPERTY_CONFIGURATION_FILES = "configuration_files"; + private FleetConfigurationLayer configurationFiles; + + public static final String JSON_PROPERTY_DETECTED_INTEGRATIONS = "detected_integrations"; + private List detectedIntegrations = null; + + public static final String JSON_PROPERTY_INTEGRATIONS = "integrations"; + private FleetIntegrationsByStatus integrations; + + public FleetAgentInfoAttributes agentInfos(FleetAgentInfoDetails agentInfos) { + this.agentInfos = agentInfos; + this.unparsed |= agentInfos.unparsed; + return this; + } + + /** + * Detailed information about a Datadog Agent. + * + * @return agentInfos + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_INFOS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FleetAgentInfoDetails getAgentInfos() { + return agentInfos; + } + + public void setAgentInfos(FleetAgentInfoDetails agentInfos) { + this.agentInfos = agentInfos; + } + + public FleetAgentInfoAttributes configurationFiles(FleetConfigurationLayer configurationFiles) { + this.configurationFiles = configurationFiles; + this.unparsed |= configurationFiles.unparsed; + return this; + } + + /** + * Configuration information organized by layers. + * + * @return configurationFiles + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIGURATION_FILES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FleetConfigurationLayer getConfigurationFiles() { + return configurationFiles; + } + + public void setConfigurationFiles(FleetConfigurationLayer configurationFiles) { + this.configurationFiles = configurationFiles; + } + + public FleetAgentInfoAttributes detectedIntegrations( + List detectedIntegrations) { + this.detectedIntegrations = detectedIntegrations; + for (FleetDetectedIntegration item : detectedIntegrations) { + this.unparsed |= item.unparsed; + } + return this; + } + + public FleetAgentInfoAttributes addDetectedIntegrationsItem( + FleetDetectedIntegration detectedIntegrationsItem) { + if (this.detectedIntegrations == null) { + this.detectedIntegrations = new ArrayList<>(); + } + this.detectedIntegrations.add(detectedIntegrationsItem); + this.unparsed |= detectedIntegrationsItem.unparsed; + return this; + } + + /** + * List of detected integrations. + * + * @return detectedIntegrations + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DETECTED_INTEGRATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getDetectedIntegrations() { + return detectedIntegrations; + } + + public void setDetectedIntegrations(List detectedIntegrations) { + this.detectedIntegrations = detectedIntegrations; + } + + public FleetAgentInfoAttributes integrations(FleetIntegrationsByStatus integrations) { + this.integrations = integrations; + this.unparsed |= integrations.unparsed; + return this; + } + + /** + * Integrations organized by their status. + * + * @return integrations + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INTEGRATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FleetIntegrationsByStatus getIntegrations() { + return integrations; + } + + public void setIntegrations(FleetIntegrationsByStatus integrations) { + this.integrations = integrations; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FleetAgentInfoAttributes + */ + @JsonAnySetter + public FleetAgentInfoAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FleetAgentInfoAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FleetAgentInfoAttributes fleetAgentInfoAttributes = (FleetAgentInfoAttributes) o; + return Objects.equals(this.agentInfos, fleetAgentInfoAttributes.agentInfos) + && Objects.equals(this.configurationFiles, fleetAgentInfoAttributes.configurationFiles) + && Objects.equals(this.detectedIntegrations, fleetAgentInfoAttributes.detectedIntegrations) + && Objects.equals(this.integrations, fleetAgentInfoAttributes.integrations) + && Objects.equals(this.additionalProperties, fleetAgentInfoAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + agentInfos, configurationFiles, detectedIntegrations, integrations, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FleetAgentInfoAttributes {\n"); + sb.append(" agentInfos: ").append(toIndentedString(agentInfos)).append("\n"); + sb.append(" configurationFiles: ").append(toIndentedString(configurationFiles)).append("\n"); + sb.append(" detectedIntegrations: ") + .append(toIndentedString(detectedIntegrations)) + .append("\n"); + sb.append(" integrations: ").append(toIndentedString(integrations)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetAgentInfoDetails.java b/src/main/java/com/datadog/api/client/v2/model/FleetAgentInfoDetails.java new file mode 100644 index 00000000000..1fbe34d5b62 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetAgentInfoDetails.java @@ -0,0 +1,1013 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Detailed information about a Datadog Agent. */ +@JsonPropertyOrder({ + FleetAgentInfoDetails.JSON_PROPERTY_AGENT_VERSION, + FleetAgentInfoDetails.JSON_PROPERTY_API_KEY_NAME, + FleetAgentInfoDetails.JSON_PROPERTY_API_KEY_UUID, + FleetAgentInfoDetails.JSON_PROPERTY_CLOUD_PROVIDER, + FleetAgentInfoDetails.JSON_PROPERTY_CLUSTER_NAME, + FleetAgentInfoDetails.JSON_PROPERTY_DATADOG_AGENT_KEY, + FleetAgentInfoDetails.JSON_PROPERTY_ENABLED_PRODUCTS, + FleetAgentInfoDetails.JSON_PROPERTY_ENV, + FleetAgentInfoDetails.JSON_PROPERTY_FIRST_SEEN_AT, + FleetAgentInfoDetails.JSON_PROPERTY_HOSTNAME, + FleetAgentInfoDetails.JSON_PROPERTY_HOSTNAME_ALIASES, + FleetAgentInfoDetails.JSON_PROPERTY_INSTALL_METHOD_INSTALLER_VERSION, + FleetAgentInfoDetails.JSON_PROPERTY_INSTALL_METHOD_TOOL, + FleetAgentInfoDetails.JSON_PROPERTY_IP_ADDRESSES, + FleetAgentInfoDetails.JSON_PROPERTY_IS_SINGLE_STEP_INSTRUMENTATION_ENABLED, + FleetAgentInfoDetails.JSON_PROPERTY_LAST_RESTART_AT, + FleetAgentInfoDetails.JSON_PROPERTY_OS, + FleetAgentInfoDetails.JSON_PROPERTY_OS_VERSION, + FleetAgentInfoDetails.JSON_PROPERTY_OTEL_COLLECTOR_VERSION, + FleetAgentInfoDetails.JSON_PROPERTY_OTEL_COLLECTOR_VERSIONS, + FleetAgentInfoDetails.JSON_PROPERTY_OTEL_COLLECTORS, + FleetAgentInfoDetails.JSON_PROPERTY_POD_NAME, + FleetAgentInfoDetails.JSON_PROPERTY_PYTHON_VERSION, + FleetAgentInfoDetails.JSON_PROPERTY_REGION, + FleetAgentInfoDetails.JSON_PROPERTY_REMOTE_AGENT_MANAGEMENT, + FleetAgentInfoDetails.JSON_PROPERTY_REMOTE_CONFIG_STATUS, + FleetAgentInfoDetails.JSON_PROPERTY_SERVICES, + FleetAgentInfoDetails.JSON_PROPERTY_TAGS, + FleetAgentInfoDetails.JSON_PROPERTY_TEAM +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FleetAgentInfoDetails { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AGENT_VERSION = "agent_version"; + private String agentVersion; + + public static final String JSON_PROPERTY_API_KEY_NAME = "api_key_name"; + private String apiKeyName; + + public static final String JSON_PROPERTY_API_KEY_UUID = "api_key_uuid"; + private String apiKeyUuid; + + public static final String JSON_PROPERTY_CLOUD_PROVIDER = "cloud_provider"; + private String cloudProvider; + + public static final String JSON_PROPERTY_CLUSTER_NAME = "cluster_name"; + private String clusterName; + + public static final String JSON_PROPERTY_DATADOG_AGENT_KEY = "datadog_agent_key"; + private String datadogAgentKey; + + public static final String JSON_PROPERTY_ENABLED_PRODUCTS = "enabled_products"; + private List enabledProducts = null; + + public static final String JSON_PROPERTY_ENV = "env"; + private List env = null; + + public static final String JSON_PROPERTY_FIRST_SEEN_AT = "first_seen_at"; + private Long firstSeenAt; + + public static final String JSON_PROPERTY_HOSTNAME = "hostname"; + private String hostname; + + public static final String JSON_PROPERTY_HOSTNAME_ALIASES = "hostname_aliases"; + private List hostnameAliases = null; + + public static final String JSON_PROPERTY_INSTALL_METHOD_INSTALLER_VERSION = + "install_method_installer_version"; + private String installMethodInstallerVersion; + + public static final String JSON_PROPERTY_INSTALL_METHOD_TOOL = "install_method_tool"; + private String installMethodTool; + + public static final String JSON_PROPERTY_IP_ADDRESSES = "ip_addresses"; + private List ipAddresses = null; + + public static final String JSON_PROPERTY_IS_SINGLE_STEP_INSTRUMENTATION_ENABLED = + "is_single_step_instrumentation_enabled"; + private Boolean isSingleStepInstrumentationEnabled; + + public static final String JSON_PROPERTY_LAST_RESTART_AT = "last_restart_at"; + private Long lastRestartAt; + + public static final String JSON_PROPERTY_OS = "os"; + private String os; + + public static final String JSON_PROPERTY_OS_VERSION = "os_version"; + private String osVersion; + + public static final String JSON_PROPERTY_OTEL_COLLECTOR_VERSION = "otel_collector_version"; + private String otelCollectorVersion; + + public static final String JSON_PROPERTY_OTEL_COLLECTOR_VERSIONS = "otel_collector_versions"; + private List otelCollectorVersions = null; + + public static final String JSON_PROPERTY_OTEL_COLLECTORS = "otel_collectors"; + private List> otelCollectors = null; + + public static final String JSON_PROPERTY_POD_NAME = "pod_name"; + private String podName; + + public static final String JSON_PROPERTY_PYTHON_VERSION = "python_version"; + private String pythonVersion; + + public static final String JSON_PROPERTY_REGION = "region"; + private List region = null; + + public static final String JSON_PROPERTY_REMOTE_AGENT_MANAGEMENT = "remote_agent_management"; + private String remoteAgentManagement; + + public static final String JSON_PROPERTY_REMOTE_CONFIG_STATUS = "remote_config_status"; + private String remoteConfigStatus; + + public static final String JSON_PROPERTY_SERVICES = "services"; + private List services = null; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + public static final String JSON_PROPERTY_TEAM = "team"; + private String team; + + public FleetAgentInfoDetails agentVersion(String agentVersion) { + this.agentVersion = agentVersion; + return this; + } + + /** + * The Datadog Agent version. + * + * @return agentVersion + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAgentVersion() { + return agentVersion; + } + + public void setAgentVersion(String agentVersion) { + this.agentVersion = agentVersion; + } + + public FleetAgentInfoDetails apiKeyName(String apiKeyName) { + this.apiKeyName = apiKeyName; + return this; + } + + /** + * The API key name (if available and not redacted). + * + * @return apiKeyName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_API_KEY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getApiKeyName() { + return apiKeyName; + } + + public void setApiKeyName(String apiKeyName) { + this.apiKeyName = apiKeyName; + } + + public FleetAgentInfoDetails apiKeyUuid(String apiKeyUuid) { + this.apiKeyUuid = apiKeyUuid; + return this; + } + + /** + * The API key UUID. + * + * @return apiKeyUuid + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_API_KEY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getApiKeyUuid() { + return apiKeyUuid; + } + + public void setApiKeyUuid(String apiKeyUuid) { + this.apiKeyUuid = apiKeyUuid; + } + + public FleetAgentInfoDetails cloudProvider(String cloudProvider) { + this.cloudProvider = cloudProvider; + return this; + } + + /** + * The cloud provider where the agent is running. + * + * @return cloudProvider + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLOUD_PROVIDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCloudProvider() { + return cloudProvider; + } + + public void setCloudProvider(String cloudProvider) { + this.cloudProvider = cloudProvider; + } + + public FleetAgentInfoDetails clusterName(String clusterName) { + this.clusterName = clusterName; + return this; + } + + /** + * Kubernetes cluster name (if applicable). + * + * @return clusterName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLUSTER_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getClusterName() { + return clusterName; + } + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + public FleetAgentInfoDetails datadogAgentKey(String datadogAgentKey) { + this.datadogAgentKey = datadogAgentKey; + return this; + } + + /** + * The unique agent key identifier. + * + * @return datadogAgentKey + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATADOG_AGENT_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDatadogAgentKey() { + return datadogAgentKey; + } + + public void setDatadogAgentKey(String datadogAgentKey) { + this.datadogAgentKey = datadogAgentKey; + } + + public FleetAgentInfoDetails enabledProducts(List enabledProducts) { + this.enabledProducts = enabledProducts; + return this; + } + + public FleetAgentInfoDetails addEnabledProductsItem(String enabledProductsItem) { + if (this.enabledProducts == null) { + this.enabledProducts = new ArrayList<>(); + } + this.enabledProducts.add(enabledProductsItem); + return this; + } + + /** + * Datadog products enabled on the agent. + * + * @return enabledProducts + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED_PRODUCTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEnabledProducts() { + return enabledProducts; + } + + public void setEnabledProducts(List enabledProducts) { + this.enabledProducts = enabledProducts; + } + + public FleetAgentInfoDetails env(List env) { + this.env = env; + return this; + } + + public FleetAgentInfoDetails addEnvItem(String envItem) { + if (this.env == null) { + this.env = new ArrayList<>(); + } + this.env.add(envItem); + return this; + } + + /** + * Environments the agent is reporting from. + * + * @return env + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENV) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEnv() { + return env; + } + + public void setEnv(List env) { + this.env = env; + } + + public FleetAgentInfoDetails firstSeenAt(Long firstSeenAt) { + this.firstSeenAt = firstSeenAt; + return this; + } + + /** + * Timestamp when the agent was first seen. + * + * @return firstSeenAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIRST_SEEN_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getFirstSeenAt() { + return firstSeenAt; + } + + public void setFirstSeenAt(Long firstSeenAt) { + this.firstSeenAt = firstSeenAt; + } + + public FleetAgentInfoDetails hostname(String hostname) { + this.hostname = hostname; + return this; + } + + /** + * The hostname of the agent. + * + * @return hostname + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOSTNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getHostname() { + return hostname; + } + + public void setHostname(String hostname) { + this.hostname = hostname; + } + + public FleetAgentInfoDetails hostnameAliases(List hostnameAliases) { + this.hostnameAliases = hostnameAliases; + return this; + } + + public FleetAgentInfoDetails addHostnameAliasesItem(String hostnameAliasesItem) { + if (this.hostnameAliases == null) { + this.hostnameAliases = new ArrayList<>(); + } + this.hostnameAliases.add(hostnameAliasesItem); + return this; + } + + /** + * Alternative hostname list for the agent. + * + * @return hostnameAliases + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HOSTNAME_ALIASES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getHostnameAliases() { + return hostnameAliases; + } + + public void setHostnameAliases(List hostnameAliases) { + this.hostnameAliases = hostnameAliases; + } + + public FleetAgentInfoDetails installMethodInstallerVersion(String installMethodInstallerVersion) { + this.installMethodInstallerVersion = installMethodInstallerVersion; + return this; + } + + /** + * The version of the installer used. + * + * @return installMethodInstallerVersion + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INSTALL_METHOD_INSTALLER_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getInstallMethodInstallerVersion() { + return installMethodInstallerVersion; + } + + public void setInstallMethodInstallerVersion(String installMethodInstallerVersion) { + this.installMethodInstallerVersion = installMethodInstallerVersion; + } + + public FleetAgentInfoDetails installMethodTool(String installMethodTool) { + this.installMethodTool = installMethodTool; + return this; + } + + /** + * The tool used to install the agent. + * + * @return installMethodTool + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INSTALL_METHOD_TOOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getInstallMethodTool() { + return installMethodTool; + } + + public void setInstallMethodTool(String installMethodTool) { + this.installMethodTool = installMethodTool; + } + + public FleetAgentInfoDetails ipAddresses(List ipAddresses) { + this.ipAddresses = ipAddresses; + return this; + } + + public FleetAgentInfoDetails addIpAddressesItem(String ipAddressesItem) { + if (this.ipAddresses == null) { + this.ipAddresses = new ArrayList<>(); + } + this.ipAddresses.add(ipAddressesItem); + return this; + } + + /** + * IP addresses of the agent. + * + * @return ipAddresses + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IP_ADDRESSES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getIpAddresses() { + return ipAddresses; + } + + public void setIpAddresses(List ipAddresses) { + this.ipAddresses = ipAddresses; + } + + public FleetAgentInfoDetails isSingleStepInstrumentationEnabled( + Boolean isSingleStepInstrumentationEnabled) { + this.isSingleStepInstrumentationEnabled = isSingleStepInstrumentationEnabled; + return this; + } + + /** + * Whether single-step instrumentation is enabled. + * + * @return isSingleStepInstrumentationEnabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_SINGLE_STEP_INSTRUMENTATION_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsSingleStepInstrumentationEnabled() { + return isSingleStepInstrumentationEnabled; + } + + public void setIsSingleStepInstrumentationEnabled(Boolean isSingleStepInstrumentationEnabled) { + this.isSingleStepInstrumentationEnabled = isSingleStepInstrumentationEnabled; + } + + public FleetAgentInfoDetails lastRestartAt(Long lastRestartAt) { + this.lastRestartAt = lastRestartAt; + return this; + } + + /** + * Timestamp of the last agent restart. + * + * @return lastRestartAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_RESTART_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getLastRestartAt() { + return lastRestartAt; + } + + public void setLastRestartAt(Long lastRestartAt) { + this.lastRestartAt = lastRestartAt; + } + + public FleetAgentInfoDetails os(String os) { + this.os = os; + return this; + } + + /** + * The operating system. + * + * @return os + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOs() { + return os; + } + + public void setOs(String os) { + this.os = os; + } + + public FleetAgentInfoDetails osVersion(String osVersion) { + this.osVersion = osVersion; + return this; + } + + /** + * The operating system version. + * + * @return osVersion + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OS_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOsVersion() { + return osVersion; + } + + public void setOsVersion(String osVersion) { + this.osVersion = osVersion; + } + + public FleetAgentInfoDetails otelCollectorVersion(String otelCollectorVersion) { + this.otelCollectorVersion = otelCollectorVersion; + return this; + } + + /** + * OpenTelemetry collector version (if applicable). + * + * @return otelCollectorVersion + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OTEL_COLLECTOR_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOtelCollectorVersion() { + return otelCollectorVersion; + } + + public void setOtelCollectorVersion(String otelCollectorVersion) { + this.otelCollectorVersion = otelCollectorVersion; + } + + public FleetAgentInfoDetails otelCollectorVersions(List otelCollectorVersions) { + this.otelCollectorVersions = otelCollectorVersions; + return this; + } + + public FleetAgentInfoDetails addOtelCollectorVersionsItem(String otelCollectorVersionsItem) { + if (this.otelCollectorVersions == null) { + this.otelCollectorVersions = new ArrayList<>(); + } + this.otelCollectorVersions.add(otelCollectorVersionsItem); + return this; + } + + /** + * List of OpenTelemetry collector versions (if applicable). + * + * @return otelCollectorVersions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OTEL_COLLECTOR_VERSIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getOtelCollectorVersions() { + return otelCollectorVersions; + } + + public void setOtelCollectorVersions(List otelCollectorVersions) { + this.otelCollectorVersions = otelCollectorVersions; + } + + public FleetAgentInfoDetails otelCollectors(List> otelCollectors) { + this.otelCollectors = otelCollectors; + return this; + } + + public FleetAgentInfoDetails addOtelCollectorsItem(Map otelCollectorsItem) { + if (this.otelCollectors == null) { + this.otelCollectors = new ArrayList<>(); + } + this.otelCollectors.add(otelCollectorsItem); + return this; + } + + /** + * OpenTelemetry collectors associated with the agent (if applicable). + * + * @return otelCollectors + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OTEL_COLLECTORS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List> getOtelCollectors() { + return otelCollectors; + } + + public void setOtelCollectors(List> otelCollectors) { + this.otelCollectors = otelCollectors; + } + + public FleetAgentInfoDetails podName(String podName) { + this.podName = podName; + return this; + } + + /** + * Kubernetes pod name (if applicable). + * + * @return podName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POD_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPodName() { + return podName; + } + + public void setPodName(String podName) { + this.podName = podName; + } + + public FleetAgentInfoDetails pythonVersion(String pythonVersion) { + this.pythonVersion = pythonVersion; + return this; + } + + /** + * The Python version used by the agent. + * + * @return pythonVersion + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PYTHON_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPythonVersion() { + return pythonVersion; + } + + public void setPythonVersion(String pythonVersion) { + this.pythonVersion = pythonVersion; + } + + public FleetAgentInfoDetails region(List region) { + this.region = region; + return this; + } + + public FleetAgentInfoDetails addRegionItem(String regionItem) { + if (this.region == null) { + this.region = new ArrayList<>(); + } + this.region.add(regionItem); + return this; + } + + /** + * Regions where the agent is running. + * + * @return region + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REGION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getRegion() { + return region; + } + + public void setRegion(List region) { + this.region = region; + } + + public FleetAgentInfoDetails remoteAgentManagement(String remoteAgentManagement) { + this.remoteAgentManagement = remoteAgentManagement; + return this; + } + + /** + * Remote agent management status. + * + * @return remoteAgentManagement + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REMOTE_AGENT_MANAGEMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRemoteAgentManagement() { + return remoteAgentManagement; + } + + public void setRemoteAgentManagement(String remoteAgentManagement) { + this.remoteAgentManagement = remoteAgentManagement; + } + + public FleetAgentInfoDetails remoteConfigStatus(String remoteConfigStatus) { + this.remoteConfigStatus = remoteConfigStatus; + return this; + } + + /** + * Remote configuration status. + * + * @return remoteConfigStatus + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REMOTE_CONFIG_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRemoteConfigStatus() { + return remoteConfigStatus; + } + + public void setRemoteConfigStatus(String remoteConfigStatus) { + this.remoteConfigStatus = remoteConfigStatus; + } + + public FleetAgentInfoDetails services(List services) { + this.services = services; + return this; + } + + public FleetAgentInfoDetails addServicesItem(String servicesItem) { + if (this.services == null) { + this.services = new ArrayList<>(); + } + this.services.add(servicesItem); + return this; + } + + /** + * Services running on the agent. + * + * @return services + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getServices() { + return services; + } + + public void setServices(List services) { + this.services = services; + } + + public FleetAgentInfoDetails tags(List tags) { + this.tags = tags; + return this; + } + + public FleetAgentInfoDetails addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Tags associated with the agent. + * + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + public FleetAgentInfoDetails team(String team) { + this.team = team; + return this; + } + + /** + * Team associated with the agent. + * + * @return team + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEAM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTeam() { + return team; + } + + public void setTeam(String team) { + this.team = team; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FleetAgentInfoDetails + */ + @JsonAnySetter + public FleetAgentInfoDetails putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FleetAgentInfoDetails object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FleetAgentInfoDetails fleetAgentInfoDetails = (FleetAgentInfoDetails) o; + return Objects.equals(this.agentVersion, fleetAgentInfoDetails.agentVersion) + && Objects.equals(this.apiKeyName, fleetAgentInfoDetails.apiKeyName) + && Objects.equals(this.apiKeyUuid, fleetAgentInfoDetails.apiKeyUuid) + && Objects.equals(this.cloudProvider, fleetAgentInfoDetails.cloudProvider) + && Objects.equals(this.clusterName, fleetAgentInfoDetails.clusterName) + && Objects.equals(this.datadogAgentKey, fleetAgentInfoDetails.datadogAgentKey) + && Objects.equals(this.enabledProducts, fleetAgentInfoDetails.enabledProducts) + && Objects.equals(this.env, fleetAgentInfoDetails.env) + && Objects.equals(this.firstSeenAt, fleetAgentInfoDetails.firstSeenAt) + && Objects.equals(this.hostname, fleetAgentInfoDetails.hostname) + && Objects.equals(this.hostnameAliases, fleetAgentInfoDetails.hostnameAliases) + && Objects.equals( + this.installMethodInstallerVersion, fleetAgentInfoDetails.installMethodInstallerVersion) + && Objects.equals(this.installMethodTool, fleetAgentInfoDetails.installMethodTool) + && Objects.equals(this.ipAddresses, fleetAgentInfoDetails.ipAddresses) + && Objects.equals( + this.isSingleStepInstrumentationEnabled, + fleetAgentInfoDetails.isSingleStepInstrumentationEnabled) + && Objects.equals(this.lastRestartAt, fleetAgentInfoDetails.lastRestartAt) + && Objects.equals(this.os, fleetAgentInfoDetails.os) + && Objects.equals(this.osVersion, fleetAgentInfoDetails.osVersion) + && Objects.equals(this.otelCollectorVersion, fleetAgentInfoDetails.otelCollectorVersion) + && Objects.equals(this.otelCollectorVersions, fleetAgentInfoDetails.otelCollectorVersions) + && Objects.equals(this.otelCollectors, fleetAgentInfoDetails.otelCollectors) + && Objects.equals(this.podName, fleetAgentInfoDetails.podName) + && Objects.equals(this.pythonVersion, fleetAgentInfoDetails.pythonVersion) + && Objects.equals(this.region, fleetAgentInfoDetails.region) + && Objects.equals(this.remoteAgentManagement, fleetAgentInfoDetails.remoteAgentManagement) + && Objects.equals(this.remoteConfigStatus, fleetAgentInfoDetails.remoteConfigStatus) + && Objects.equals(this.services, fleetAgentInfoDetails.services) + && Objects.equals(this.tags, fleetAgentInfoDetails.tags) + && Objects.equals(this.team, fleetAgentInfoDetails.team) + && Objects.equals(this.additionalProperties, fleetAgentInfoDetails.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + agentVersion, + apiKeyName, + apiKeyUuid, + cloudProvider, + clusterName, + datadogAgentKey, + enabledProducts, + env, + firstSeenAt, + hostname, + hostnameAliases, + installMethodInstallerVersion, + installMethodTool, + ipAddresses, + isSingleStepInstrumentationEnabled, + lastRestartAt, + os, + osVersion, + otelCollectorVersion, + otelCollectorVersions, + otelCollectors, + podName, + pythonVersion, + region, + remoteAgentManagement, + remoteConfigStatus, + services, + tags, + team, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FleetAgentInfoDetails {\n"); + sb.append(" agentVersion: ").append(toIndentedString(agentVersion)).append("\n"); + sb.append(" apiKeyName: ").append(toIndentedString(apiKeyName)).append("\n"); + sb.append(" apiKeyUuid: ").append(toIndentedString(apiKeyUuid)).append("\n"); + sb.append(" cloudProvider: ").append(toIndentedString(cloudProvider)).append("\n"); + sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); + sb.append(" datadogAgentKey: ").append(toIndentedString(datadogAgentKey)).append("\n"); + sb.append(" enabledProducts: ").append(toIndentedString(enabledProducts)).append("\n"); + sb.append(" env: ").append(toIndentedString(env)).append("\n"); + sb.append(" firstSeenAt: ").append(toIndentedString(firstSeenAt)).append("\n"); + sb.append(" hostname: ").append(toIndentedString(hostname)).append("\n"); + sb.append(" hostnameAliases: ").append(toIndentedString(hostnameAliases)).append("\n"); + sb.append(" installMethodInstallerVersion: ") + .append(toIndentedString(installMethodInstallerVersion)) + .append("\n"); + sb.append(" installMethodTool: ").append(toIndentedString(installMethodTool)).append("\n"); + sb.append(" ipAddresses: ").append(toIndentedString(ipAddresses)).append("\n"); + sb.append(" isSingleStepInstrumentationEnabled: ") + .append(toIndentedString(isSingleStepInstrumentationEnabled)) + .append("\n"); + sb.append(" lastRestartAt: ").append(toIndentedString(lastRestartAt)).append("\n"); + sb.append(" os: ").append(toIndentedString(os)).append("\n"); + sb.append(" osVersion: ").append(toIndentedString(osVersion)).append("\n"); + sb.append(" otelCollectorVersion: ") + .append(toIndentedString(otelCollectorVersion)) + .append("\n"); + sb.append(" otelCollectorVersions: ") + .append(toIndentedString(otelCollectorVersions)) + .append("\n"); + sb.append(" otelCollectors: ").append(toIndentedString(otelCollectors)).append("\n"); + sb.append(" podName: ").append(toIndentedString(podName)).append("\n"); + sb.append(" pythonVersion: ").append(toIndentedString(pythonVersion)).append("\n"); + sb.append(" region: ").append(toIndentedString(region)).append("\n"); + sb.append(" remoteAgentManagement: ") + .append(toIndentedString(remoteAgentManagement)) + .append("\n"); + sb.append(" remoteConfigStatus: ").append(toIndentedString(remoteConfigStatus)).append("\n"); + sb.append(" services: ").append(toIndentedString(services)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" team: ").append(toIndentedString(team)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetAgentInfoResourceType.java b/src/main/java/com/datadog/api/client/v2/model/FleetAgentInfoResourceType.java new file mode 100644 index 00000000000..451ca25c9eb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetAgentInfoResourceType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The type of Agent info resource. */ +@JsonSerialize(using = FleetAgentInfoResourceType.FleetAgentInfoResourceTypeSerializer.class) +public class FleetAgentInfoResourceType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("datadog_agent_key")); + + public static final FleetAgentInfoResourceType DATADOG_AGENT_KEY = + new FleetAgentInfoResourceType("datadog_agent_key"); + + FleetAgentInfoResourceType(String value) { + super(value, allowedValues); + } + + public static class FleetAgentInfoResourceTypeSerializer + extends StdSerializer { + public FleetAgentInfoResourceTypeSerializer(Class t) { + super(t); + } + + public FleetAgentInfoResourceTypeSerializer() { + this(null); + } + + @Override + public void serialize( + FleetAgentInfoResourceType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static FleetAgentInfoResourceType fromValue(String value) { + return new FleetAgentInfoResourceType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetAgentInfoResponse.java b/src/main/java/com/datadog/api/client/v2/model/FleetAgentInfoResponse.java new file mode 100644 index 00000000000..8a99de8d085 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetAgentInfoResponse.java @@ -0,0 +1,145 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing detailed information about a specific agent. */ +@JsonPropertyOrder({FleetAgentInfoResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FleetAgentInfoResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private FleetAgentInfo data; + + public FleetAgentInfoResponse() {} + + @JsonCreator + public FleetAgentInfoResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) FleetAgentInfo data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public FleetAgentInfoResponse data(FleetAgentInfo data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Represents detailed information about a specific Datadog Agent. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FleetAgentInfo getData() { + return data; + } + + public void setData(FleetAgentInfo data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FleetAgentInfoResponse + */ + @JsonAnySetter + public FleetAgentInfoResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FleetAgentInfoResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FleetAgentInfoResponse fleetAgentInfoResponse = (FleetAgentInfoResponse) o; + return Objects.equals(this.data, fleetAgentInfoResponse.data) + && Objects.equals(this.additionalProperties, fleetAgentInfoResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FleetAgentInfoResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetAgentsResponse.java b/src/main/java/com/datadog/api/client/v2/model/FleetAgentsResponse.java new file mode 100644 index 00000000000..7cd928021c7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetAgentsResponse.java @@ -0,0 +1,172 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing a paginated list of Datadog Agents. */ +@JsonPropertyOrder({FleetAgentsResponse.JSON_PROPERTY_DATA, FleetAgentsResponse.JSON_PROPERTY_META}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FleetAgentsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private FleetAgentsResponseData data; + + public static final String JSON_PROPERTY_META = "meta"; + private FleetAgentsResponseMeta meta; + + public FleetAgentsResponse() {} + + @JsonCreator + public FleetAgentsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) FleetAgentsResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public FleetAgentsResponse data(FleetAgentsResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The response data containing status and agents array. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FleetAgentsResponseData getData() { + return data; + } + + public void setData(FleetAgentsResponseData data) { + this.data = data; + } + + public FleetAgentsResponse meta(FleetAgentsResponseMeta meta) { + this.meta = meta; + this.unparsed |= meta.unparsed; + return this; + } + + /** + * Metadata for the list of agents response. + * + * @return meta + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FleetAgentsResponseMeta getMeta() { + return meta; + } + + public void setMeta(FleetAgentsResponseMeta meta) { + this.meta = meta; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FleetAgentsResponse + */ + @JsonAnySetter + public FleetAgentsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FleetAgentsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FleetAgentsResponse fleetAgentsResponse = (FleetAgentsResponse) o; + return Objects.equals(this.data, fleetAgentsResponse.data) + && Objects.equals(this.meta, fleetAgentsResponse.meta) + && Objects.equals(this.additionalProperties, fleetAgentsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FleetAgentsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetAgentsResponseData.java b/src/main/java/com/datadog/api/client/v2/model/FleetAgentsResponseData.java new file mode 100644 index 00000000000..d2516f00f8e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetAgentsResponseData.java @@ -0,0 +1,136 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The response data containing status and agents array. */ +@JsonPropertyOrder({FleetAgentsResponseData.JSON_PROPERTY_ATTRIBUTES}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FleetAgentsResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private FleetAgentsResponseDataAttributes attributes; + + public FleetAgentsResponseData attributes(FleetAgentsResponseDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FleetAgentsResponseDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(FleetAgentsResponseDataAttributes attributes) { + this.attributes = attributes; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FleetAgentsResponseData + */ + @JsonAnySetter + public FleetAgentsResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FleetAgentsResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FleetAgentsResponseData fleetAgentsResponseData = (FleetAgentsResponseData) o; + return Objects.equals(this.attributes, fleetAgentsResponseData.attributes) + && Objects.equals(this.additionalProperties, fleetAgentsResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FleetAgentsResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetAgentsResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FleetAgentsResponseDataAttributes.java new file mode 100644 index 00000000000..540386de30e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetAgentsResponseDataAttributes.java @@ -0,0 +1,151 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import 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; + +/** */ +@JsonPropertyOrder({FleetAgentsResponseDataAttributes.JSON_PROPERTY_AGENTS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FleetAgentsResponseDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AGENTS = "agents"; + private List agents = null; + + public FleetAgentsResponseDataAttributes agents(List agents) { + this.agents = agents; + for (FleetAgentAttributes item : agents) { + this.unparsed |= item.unparsed; + } + return this; + } + + public FleetAgentsResponseDataAttributes addAgentsItem(FleetAgentAttributes agentsItem) { + if (this.agents == null) { + this.agents = new ArrayList<>(); + } + this.agents.add(agentsItem); + this.unparsed |= agentsItem.unparsed; + return this; + } + + /** + * Array of agents matching the query criteria. + * + * @return agents + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAgents() { + return agents; + } + + public void setAgents(List agents) { + this.agents = agents; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FleetAgentsResponseDataAttributes + */ + @JsonAnySetter + public FleetAgentsResponseDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FleetAgentsResponseDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FleetAgentsResponseDataAttributes fleetAgentsResponseDataAttributes = + (FleetAgentsResponseDataAttributes) o; + return Objects.equals(this.agents, fleetAgentsResponseDataAttributes.agents) + && Objects.equals( + this.additionalProperties, fleetAgentsResponseDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(agents, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FleetAgentsResponseDataAttributes {\n"); + sb.append(" agents: ").append(toIndentedString(agents)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetAgentsResponseMeta.java b/src/main/java/com/datadog/api/client/v2/model/FleetAgentsResponseMeta.java new file mode 100644 index 00000000000..be6f779bebb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetAgentsResponseMeta.java @@ -0,0 +1,135 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +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; + +/** Metadata for the list of agents response. */ +@JsonPropertyOrder({FleetAgentsResponseMeta.JSON_PROPERTY_TOTAL_FILTERED_COUNT}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FleetAgentsResponseMeta { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_TOTAL_FILTERED_COUNT = "total_filtered_count"; + private Long totalFilteredCount; + + public FleetAgentsResponseMeta totalFilteredCount(Long totalFilteredCount) { + this.totalFilteredCount = totalFilteredCount; + return this; + } + + /** + * Total number of agents matching the filter criteria across all pages. + * + * @return totalFilteredCount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL_FILTERED_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getTotalFilteredCount() { + return totalFilteredCount; + } + + public void setTotalFilteredCount(Long totalFilteredCount) { + this.totalFilteredCount = totalFilteredCount; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FleetAgentsResponseMeta + */ + @JsonAnySetter + public FleetAgentsResponseMeta putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FleetAgentsResponseMeta object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FleetAgentsResponseMeta fleetAgentsResponseMeta = (FleetAgentsResponseMeta) o; + return Objects.equals(this.totalFilteredCount, fleetAgentsResponseMeta.totalFilteredCount) + && Objects.equals(this.additionalProperties, fleetAgentsResponseMeta.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(totalFilteredCount, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FleetAgentsResponseMeta {\n"); + sb.append(" totalFilteredCount: ").append(toIndentedString(totalFilteredCount)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetConfigurationFile.java b/src/main/java/com/datadog/api/client/v2/model/FleetConfigurationFile.java new file mode 100644 index 00000000000..3e8771368f2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetConfigurationFile.java @@ -0,0 +1,191 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A configuration file for an integration. */ +@JsonPropertyOrder({ + FleetConfigurationFile.JSON_PROPERTY_FILE_CONTENT, + FleetConfigurationFile.JSON_PROPERTY_FILE_PATH, + FleetConfigurationFile.JSON_PROPERTY_FILENAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FleetConfigurationFile { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FILE_CONTENT = "file_content"; + private String fileContent; + + public static final String JSON_PROPERTY_FILE_PATH = "file_path"; + private String filePath; + + public static final String JSON_PROPERTY_FILENAME = "filename"; + private String filename; + + public FleetConfigurationFile fileContent(String fileContent) { + this.fileContent = fileContent; + return this; + } + + /** + * The raw content of the configuration file. + * + * @return fileContent + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILE_CONTENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFileContent() { + return fileContent; + } + + public void setFileContent(String fileContent) { + this.fileContent = fileContent; + } + + public FleetConfigurationFile filePath(String filePath) { + this.filePath = filePath; + return this; + } + + /** + * Path to the configuration file. + * + * @return filePath + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILE_PATH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFilePath() { + return filePath; + } + + public void setFilePath(String filePath) { + this.filePath = filePath; + } + + public FleetConfigurationFile filename(String filename) { + this.filename = filename; + return this; + } + + /** + * Name of the configuration file. + * + * @return filename + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILENAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFilename() { + return filename; + } + + public void setFilename(String filename) { + this.filename = filename; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FleetConfigurationFile + */ + @JsonAnySetter + public FleetConfigurationFile putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FleetConfigurationFile object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FleetConfigurationFile fleetConfigurationFile = (FleetConfigurationFile) o; + return Objects.equals(this.fileContent, fleetConfigurationFile.fileContent) + && Objects.equals(this.filePath, fleetConfigurationFile.filePath) + && Objects.equals(this.filename, fleetConfigurationFile.filename) + && Objects.equals(this.additionalProperties, fleetConfigurationFile.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(fileContent, filePath, filename, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FleetConfigurationFile {\n"); + sb.append(" fileContent: ").append(toIndentedString(fileContent)).append("\n"); + sb.append(" filePath: ").append(toIndentedString(filePath)).append("\n"); + sb.append(" filename: ").append(toIndentedString(filename)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetConfigurationLayer.java b/src/main/java/com/datadog/api/client/v2/model/FleetConfigurationLayer.java new file mode 100644 index 00000000000..83479f58b82 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetConfigurationLayer.java @@ -0,0 +1,287 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Configuration information organized by layers. */ +@JsonPropertyOrder({ + FleetConfigurationLayer.JSON_PROPERTY_COMPILED_CONFIGURATION, + FleetConfigurationLayer.JSON_PROPERTY_ENV_CONFIGURATION, + FleetConfigurationLayer.JSON_PROPERTY_FILE_CONFIGURATION, + FleetConfigurationLayer.JSON_PROPERTY_PARSED_CONFIGURATION, + FleetConfigurationLayer.JSON_PROPERTY_REMOTE_CONFIGURATION, + FleetConfigurationLayer.JSON_PROPERTY_RUNTIME_CONFIGURATION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FleetConfigurationLayer { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPILED_CONFIGURATION = "compiled_configuration"; + private String compiledConfiguration; + + public static final String JSON_PROPERTY_ENV_CONFIGURATION = "env_configuration"; + private String envConfiguration; + + public static final String JSON_PROPERTY_FILE_CONFIGURATION = "file_configuration"; + private String fileConfiguration; + + public static final String JSON_PROPERTY_PARSED_CONFIGURATION = "parsed_configuration"; + private String parsedConfiguration; + + public static final String JSON_PROPERTY_REMOTE_CONFIGURATION = "remote_configuration"; + private String remoteConfiguration; + + public static final String JSON_PROPERTY_RUNTIME_CONFIGURATION = "runtime_configuration"; + private String runtimeConfiguration; + + public FleetConfigurationLayer compiledConfiguration(String compiledConfiguration) { + this.compiledConfiguration = compiledConfiguration; + return this; + } + + /** + * The final compiled configuration. + * + * @return compiledConfiguration + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPILED_CONFIGURATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCompiledConfiguration() { + return compiledConfiguration; + } + + public void setCompiledConfiguration(String compiledConfiguration) { + this.compiledConfiguration = compiledConfiguration; + } + + public FleetConfigurationLayer envConfiguration(String envConfiguration) { + this.envConfiguration = envConfiguration; + return this; + } + + /** + * Configuration from environment variables. + * + * @return envConfiguration + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENV_CONFIGURATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEnvConfiguration() { + return envConfiguration; + } + + public void setEnvConfiguration(String envConfiguration) { + this.envConfiguration = envConfiguration; + } + + public FleetConfigurationLayer fileConfiguration(String fileConfiguration) { + this.fileConfiguration = fileConfiguration; + return this; + } + + /** + * Configuration from files. + * + * @return fileConfiguration + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILE_CONFIGURATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFileConfiguration() { + return fileConfiguration; + } + + public void setFileConfiguration(String fileConfiguration) { + this.fileConfiguration = fileConfiguration; + } + + public FleetConfigurationLayer parsedConfiguration(String parsedConfiguration) { + this.parsedConfiguration = parsedConfiguration; + return this; + } + + /** + * Parsed configuration output. + * + * @return parsedConfiguration + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PARSED_CONFIGURATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getParsedConfiguration() { + return parsedConfiguration; + } + + public void setParsedConfiguration(String parsedConfiguration) { + this.parsedConfiguration = parsedConfiguration; + } + + public FleetConfigurationLayer remoteConfiguration(String remoteConfiguration) { + this.remoteConfiguration = remoteConfiguration; + return this; + } + + /** + * Remote configuration settings. + * + * @return remoteConfiguration + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REMOTE_CONFIGURATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRemoteConfiguration() { + return remoteConfiguration; + } + + public void setRemoteConfiguration(String remoteConfiguration) { + this.remoteConfiguration = remoteConfiguration; + } + + public FleetConfigurationLayer runtimeConfiguration(String runtimeConfiguration) { + this.runtimeConfiguration = runtimeConfiguration; + return this; + } + + /** + * Runtime configuration. + * + * @return runtimeConfiguration + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUNTIME_CONFIGURATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRuntimeConfiguration() { + return runtimeConfiguration; + } + + public void setRuntimeConfiguration(String runtimeConfiguration) { + this.runtimeConfiguration = runtimeConfiguration; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FleetConfigurationLayer + */ + @JsonAnySetter + public FleetConfigurationLayer putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FleetConfigurationLayer object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FleetConfigurationLayer fleetConfigurationLayer = (FleetConfigurationLayer) o; + return Objects.equals(this.compiledConfiguration, fleetConfigurationLayer.compiledConfiguration) + && Objects.equals(this.envConfiguration, fleetConfigurationLayer.envConfiguration) + && Objects.equals(this.fileConfiguration, fleetConfigurationLayer.fileConfiguration) + && Objects.equals(this.parsedConfiguration, fleetConfigurationLayer.parsedConfiguration) + && Objects.equals(this.remoteConfiguration, fleetConfigurationLayer.remoteConfiguration) + && Objects.equals(this.runtimeConfiguration, fleetConfigurationLayer.runtimeConfiguration) + && Objects.equals(this.additionalProperties, fleetConfigurationLayer.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + compiledConfiguration, + envConfiguration, + fileConfiguration, + parsedConfiguration, + remoteConfiguration, + runtimeConfiguration, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FleetConfigurationLayer {\n"); + sb.append(" compiledConfiguration: ") + .append(toIndentedString(compiledConfiguration)) + .append("\n"); + sb.append(" envConfiguration: ").append(toIndentedString(envConfiguration)).append("\n"); + sb.append(" fileConfiguration: ").append(toIndentedString(fileConfiguration)).append("\n"); + sb.append(" parsedConfiguration: ") + .append(toIndentedString(parsedConfiguration)) + .append("\n"); + sb.append(" remoteConfiguration: ") + .append(toIndentedString(remoteConfiguration)) + .append("\n"); + sb.append(" runtimeConfiguration: ") + .append(toIndentedString(runtimeConfiguration)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetDetectedIntegration.java b/src/main/java/com/datadog/api/client/v2/model/FleetDetectedIntegration.java new file mode 100644 index 00000000000..ad099771480 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetDetectedIntegration.java @@ -0,0 +1,164 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +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; + +/** An integration detected on the agent but not necessarily configured. */ +@JsonPropertyOrder({ + FleetDetectedIntegration.JSON_PROPERTY_ESCAPED_NAME, + FleetDetectedIntegration.JSON_PROPERTY_PREFIX +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FleetDetectedIntegration { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ESCAPED_NAME = "escaped_name"; + private String escapedName; + + public static final String JSON_PROPERTY_PREFIX = "prefix"; + private String prefix; + + public FleetDetectedIntegration escapedName(String escapedName) { + this.escapedName = escapedName; + return this; + } + + /** + * Escaped integration name. + * + * @return escapedName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ESCAPED_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEscapedName() { + return escapedName; + } + + public void setEscapedName(String escapedName) { + this.escapedName = escapedName; + } + + public FleetDetectedIntegration prefix(String prefix) { + this.prefix = prefix; + return this; + } + + /** + * Integration prefix identifier. + * + * @return prefix + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREFIX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPrefix() { + return prefix; + } + + public void setPrefix(String prefix) { + this.prefix = prefix; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FleetDetectedIntegration + */ + @JsonAnySetter + public FleetDetectedIntegration putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FleetDetectedIntegration object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FleetDetectedIntegration fleetDetectedIntegration = (FleetDetectedIntegration) o; + return Objects.equals(this.escapedName, fleetDetectedIntegration.escapedName) + && Objects.equals(this.prefix, fleetDetectedIntegration.prefix) + && Objects.equals(this.additionalProperties, fleetDetectedIntegration.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(escapedName, prefix, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FleetDetectedIntegration {\n"); + sb.append(" escapedName: ").append(toIndentedString(escapedName)).append("\n"); + sb.append(" prefix: ").append(toIndentedString(prefix)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetIntegrationDetails.java b/src/main/java/com/datadog/api/client/v2/model/FleetIntegrationDetails.java new file mode 100644 index 00000000000..8a8846d2780 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetIntegrationDetails.java @@ -0,0 +1,401 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Detailed information about a single integration. */ +@JsonPropertyOrder({ + FleetIntegrationDetails.JSON_PROPERTY_DATA_TYPE, + FleetIntegrationDetails.JSON_PROPERTY_ERROR_MESSAGES, + FleetIntegrationDetails.JSON_PROPERTY_INIT_CONFIG, + FleetIntegrationDetails.JSON_PROPERTY_INSTANCE_CONFIG, + FleetIntegrationDetails.JSON_PROPERTY_IS_CUSTOM_CHECK, + FleetIntegrationDetails.JSON_PROPERTY_LOG_CONFIG, + FleetIntegrationDetails.JSON_PROPERTY_NAME, + FleetIntegrationDetails.JSON_PROPERTY_SOURCE_INDEX, + FleetIntegrationDetails.JSON_PROPERTY_SOURCE_PATH, + FleetIntegrationDetails.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FleetIntegrationDetails { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA_TYPE = "data_type"; + private String dataType; + + public static final String JSON_PROPERTY_ERROR_MESSAGES = "error_messages"; + private List errorMessages = null; + + public static final String JSON_PROPERTY_INIT_CONFIG = "init_config"; + private String initConfig; + + public static final String JSON_PROPERTY_INSTANCE_CONFIG = "instance_config"; + private String instanceConfig; + + public static final String JSON_PROPERTY_IS_CUSTOM_CHECK = "is_custom_check"; + private Boolean isCustomCheck; + + public static final String JSON_PROPERTY_LOG_CONFIG = "log_config"; + private String logConfig; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SOURCE_INDEX = "source_index"; + private Long sourceIndex; + + public static final String JSON_PROPERTY_SOURCE_PATH = "source_path"; + private String sourcePath; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public FleetIntegrationDetails dataType(String dataType) { + this.dataType = dataType; + return this; + } + + /** + * Type of data collected (metrics, logs). + * + * @return dataType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDataType() { + return dataType; + } + + public void setDataType(String dataType) { + this.dataType = dataType; + } + + public FleetIntegrationDetails errorMessages(List errorMessages) { + this.errorMessages = errorMessages; + return this; + } + + public FleetIntegrationDetails addErrorMessagesItem(String errorMessagesItem) { + if (this.errorMessages == null) { + this.errorMessages = new ArrayList<>(); + } + this.errorMessages.add(errorMessagesItem); + return this; + } + + /** + * Error messages if the integration has issues. + * + * @return errorMessages + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_MESSAGES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getErrorMessages() { + return errorMessages; + } + + public void setErrorMessages(List errorMessages) { + this.errorMessages = errorMessages; + } + + public FleetIntegrationDetails initConfig(String initConfig) { + this.initConfig = initConfig; + return this; + } + + /** + * Initialization configuration (YAML format). + * + * @return initConfig + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INIT_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getInitConfig() { + return initConfig; + } + + public void setInitConfig(String initConfig) { + this.initConfig = initConfig; + } + + public FleetIntegrationDetails instanceConfig(String instanceConfig) { + this.instanceConfig = instanceConfig; + return this; + } + + /** + * Instance-specific configuration (YAML format). + * + * @return instanceConfig + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INSTANCE_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getInstanceConfig() { + return instanceConfig; + } + + public void setInstanceConfig(String instanceConfig) { + this.instanceConfig = instanceConfig; + } + + public FleetIntegrationDetails isCustomCheck(Boolean isCustomCheck) { + this.isCustomCheck = isCustomCheck; + return this; + } + + /** + * Whether this is a custom integration. + * + * @return isCustomCheck + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_CUSTOM_CHECK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getIsCustomCheck() { + return isCustomCheck; + } + + public void setIsCustomCheck(Boolean isCustomCheck) { + this.isCustomCheck = isCustomCheck; + } + + public FleetIntegrationDetails logConfig(String logConfig) { + this.logConfig = logConfig; + return this; + } + + /** + * Log collection configuration (YAML format). + * + * @return logConfig + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOG_CONFIG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLogConfig() { + return logConfig; + } + + public void setLogConfig(String logConfig) { + this.logConfig = logConfig; + } + + public FleetIntegrationDetails name(String name) { + this.name = name; + return this; + } + + /** + * Name of the integration instance. + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public FleetIntegrationDetails sourceIndex(Long sourceIndex) { + this.sourceIndex = sourceIndex; + return this; + } + + /** + * Index in the configuration file. + * + * @return sourceIndex + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_INDEX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getSourceIndex() { + return sourceIndex; + } + + public void setSourceIndex(Long sourceIndex) { + this.sourceIndex = sourceIndex; + } + + public FleetIntegrationDetails sourcePath(String sourcePath) { + this.sourcePath = sourcePath; + return this; + } + + /** + * Path to the configuration file. + * + * @return sourcePath + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE_PATH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSourcePath() { + return sourcePath; + } + + public void setSourcePath(String sourcePath) { + this.sourcePath = sourcePath; + } + + public FleetIntegrationDetails type(String type) { + this.type = type; + return this; + } + + /** + * Integration type. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FleetIntegrationDetails + */ + @JsonAnySetter + public FleetIntegrationDetails putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FleetIntegrationDetails object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FleetIntegrationDetails fleetIntegrationDetails = (FleetIntegrationDetails) o; + return Objects.equals(this.dataType, fleetIntegrationDetails.dataType) + && Objects.equals(this.errorMessages, fleetIntegrationDetails.errorMessages) + && Objects.equals(this.initConfig, fleetIntegrationDetails.initConfig) + && Objects.equals(this.instanceConfig, fleetIntegrationDetails.instanceConfig) + && Objects.equals(this.isCustomCheck, fleetIntegrationDetails.isCustomCheck) + && Objects.equals(this.logConfig, fleetIntegrationDetails.logConfig) + && Objects.equals(this.name, fleetIntegrationDetails.name) + && Objects.equals(this.sourceIndex, fleetIntegrationDetails.sourceIndex) + && Objects.equals(this.sourcePath, fleetIntegrationDetails.sourcePath) + && Objects.equals(this.type, fleetIntegrationDetails.type) + && Objects.equals(this.additionalProperties, fleetIntegrationDetails.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + dataType, + errorMessages, + initConfig, + instanceConfig, + isCustomCheck, + logConfig, + name, + sourceIndex, + sourcePath, + type, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FleetIntegrationDetails {\n"); + sb.append(" dataType: ").append(toIndentedString(dataType)).append("\n"); + sb.append(" errorMessages: ").append(toIndentedString(errorMessages)).append("\n"); + sb.append(" initConfig: ").append(toIndentedString(initConfig)).append("\n"); + sb.append(" instanceConfig: ").append(toIndentedString(instanceConfig)).append("\n"); + sb.append(" isCustomCheck: ").append(toIndentedString(isCustomCheck)).append("\n"); + sb.append(" logConfig: ").append(toIndentedString(logConfig)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" sourceIndex: ").append(toIndentedString(sourceIndex)).append("\n"); + sb.append(" sourcePath: ").append(toIndentedString(sourcePath)).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/FleetIntegrationsByStatus.java b/src/main/java/com/datadog/api/client/v2/model/FleetIntegrationsByStatus.java new file mode 100644 index 00000000000..1e44cd29539 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetIntegrationsByStatus.java @@ -0,0 +1,358 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import 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; + +/** Integrations organized by their status. */ +@JsonPropertyOrder({ + FleetIntegrationsByStatus.JSON_PROPERTY_CONFIGURATION_FILES, + FleetIntegrationsByStatus.JSON_PROPERTY_DATADOG_AGENT_KEY, + FleetIntegrationsByStatus.JSON_PROPERTY_ERROR_INTEGRATIONS, + FleetIntegrationsByStatus.JSON_PROPERTY_MISSING_INTEGRATIONS, + FleetIntegrationsByStatus.JSON_PROPERTY_WARNING_INTEGRATIONS, + FleetIntegrationsByStatus.JSON_PROPERTY_WORKING_INTEGRATIONS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FleetIntegrationsByStatus { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONFIGURATION_FILES = "configuration_files"; + private List configurationFiles = null; + + public static final String JSON_PROPERTY_DATADOG_AGENT_KEY = "datadog_agent_key"; + private String datadogAgentKey; + + public static final String JSON_PROPERTY_ERROR_INTEGRATIONS = "error_integrations"; + private List errorIntegrations = null; + + public static final String JSON_PROPERTY_MISSING_INTEGRATIONS = "missing_integrations"; + private List missingIntegrations = null; + + public static final String JSON_PROPERTY_WARNING_INTEGRATIONS = "warning_integrations"; + private List warningIntegrations = null; + + public static final String JSON_PROPERTY_WORKING_INTEGRATIONS = "working_integrations"; + private List workingIntegrations = null; + + public FleetIntegrationsByStatus configurationFiles( + List configurationFiles) { + this.configurationFiles = configurationFiles; + for (FleetConfigurationFile item : configurationFiles) { + this.unparsed |= item.unparsed; + } + return this; + } + + public FleetIntegrationsByStatus addConfigurationFilesItem( + FleetConfigurationFile configurationFilesItem) { + if (this.configurationFiles == null) { + this.configurationFiles = new ArrayList<>(); + } + this.configurationFiles.add(configurationFilesItem); + this.unparsed |= configurationFilesItem.unparsed; + return this; + } + + /** + * Configuration files for integrations. + * + * @return configurationFiles + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONFIGURATION_FILES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getConfigurationFiles() { + return configurationFiles; + } + + public void setConfigurationFiles(List configurationFiles) { + this.configurationFiles = configurationFiles; + } + + public FleetIntegrationsByStatus datadogAgentKey(String datadogAgentKey) { + this.datadogAgentKey = datadogAgentKey; + return this; + } + + /** + * The unique agent key identifier. + * + * @return datadogAgentKey + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATADOG_AGENT_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDatadogAgentKey() { + return datadogAgentKey; + } + + public void setDatadogAgentKey(String datadogAgentKey) { + this.datadogAgentKey = datadogAgentKey; + } + + public FleetIntegrationsByStatus errorIntegrations( + List errorIntegrations) { + this.errorIntegrations = errorIntegrations; + for (FleetIntegrationDetails item : errorIntegrations) { + this.unparsed |= item.unparsed; + } + return this; + } + + public FleetIntegrationsByStatus addErrorIntegrationsItem( + FleetIntegrationDetails errorIntegrationsItem) { + if (this.errorIntegrations == null) { + this.errorIntegrations = new ArrayList<>(); + } + this.errorIntegrations.add(errorIntegrationsItem); + this.unparsed |= errorIntegrationsItem.unparsed; + return this; + } + + /** + * Integrations with errors. + * + * @return errorIntegrations + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ERROR_INTEGRATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getErrorIntegrations() { + return errorIntegrations; + } + + public void setErrorIntegrations(List errorIntegrations) { + this.errorIntegrations = errorIntegrations; + } + + public FleetIntegrationsByStatus missingIntegrations( + List missingIntegrations) { + this.missingIntegrations = missingIntegrations; + for (FleetDetectedIntegration item : missingIntegrations) { + this.unparsed |= item.unparsed; + } + return this; + } + + public FleetIntegrationsByStatus addMissingIntegrationsItem( + FleetDetectedIntegration missingIntegrationsItem) { + if (this.missingIntegrations == null) { + this.missingIntegrations = new ArrayList<>(); + } + this.missingIntegrations.add(missingIntegrationsItem); + this.unparsed |= missingIntegrationsItem.unparsed; + return this; + } + + /** + * Detected but not configured integrations. + * + * @return missingIntegrations + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MISSING_INTEGRATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getMissingIntegrations() { + return missingIntegrations; + } + + public void setMissingIntegrations(List missingIntegrations) { + this.missingIntegrations = missingIntegrations; + } + + public FleetIntegrationsByStatus warningIntegrations( + List warningIntegrations) { + this.warningIntegrations = warningIntegrations; + for (FleetIntegrationDetails item : warningIntegrations) { + this.unparsed |= item.unparsed; + } + return this; + } + + public FleetIntegrationsByStatus addWarningIntegrationsItem( + FleetIntegrationDetails warningIntegrationsItem) { + if (this.warningIntegrations == null) { + this.warningIntegrations = new ArrayList<>(); + } + this.warningIntegrations.add(warningIntegrationsItem); + this.unparsed |= warningIntegrationsItem.unparsed; + return this; + } + + /** + * Integrations with warnings. + * + * @return warningIntegrations + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WARNING_INTEGRATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getWarningIntegrations() { + return warningIntegrations; + } + + public void setWarningIntegrations(List warningIntegrations) { + this.warningIntegrations = warningIntegrations; + } + + public FleetIntegrationsByStatus workingIntegrations( + List workingIntegrations) { + this.workingIntegrations = workingIntegrations; + for (FleetIntegrationDetails item : workingIntegrations) { + this.unparsed |= item.unparsed; + } + return this; + } + + public FleetIntegrationsByStatus addWorkingIntegrationsItem( + FleetIntegrationDetails workingIntegrationsItem) { + if (this.workingIntegrations == null) { + this.workingIntegrations = new ArrayList<>(); + } + this.workingIntegrations.add(workingIntegrationsItem); + this.unparsed |= workingIntegrationsItem.unparsed; + return this; + } + + /** + * Integrations that are working correctly. + * + * @return workingIntegrations + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WORKING_INTEGRATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getWorkingIntegrations() { + return workingIntegrations; + } + + public void setWorkingIntegrations(List workingIntegrations) { + this.workingIntegrations = workingIntegrations; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FleetIntegrationsByStatus + */ + @JsonAnySetter + public FleetIntegrationsByStatus putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FleetIntegrationsByStatus object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FleetIntegrationsByStatus fleetIntegrationsByStatus = (FleetIntegrationsByStatus) o; + return Objects.equals(this.configurationFiles, fleetIntegrationsByStatus.configurationFiles) + && Objects.equals(this.datadogAgentKey, fleetIntegrationsByStatus.datadogAgentKey) + && Objects.equals(this.errorIntegrations, fleetIntegrationsByStatus.errorIntegrations) + && Objects.equals(this.missingIntegrations, fleetIntegrationsByStatus.missingIntegrations) + && Objects.equals(this.warningIntegrations, fleetIntegrationsByStatus.warningIntegrations) + && Objects.equals(this.workingIntegrations, fleetIntegrationsByStatus.workingIntegrations) + && Objects.equals( + this.additionalProperties, fleetIntegrationsByStatus.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + configurationFiles, + datadogAgentKey, + errorIntegrations, + missingIntegrations, + warningIntegrations, + workingIntegrations, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FleetIntegrationsByStatus {\n"); + sb.append(" configurationFiles: ").append(toIndentedString(configurationFiles)).append("\n"); + sb.append(" datadogAgentKey: ").append(toIndentedString(datadogAgentKey)).append("\n"); + sb.append(" errorIntegrations: ").append(toIndentedString(errorIntegrations)).append("\n"); + sb.append(" missingIntegrations: ") + .append(toIndentedString(missingIntegrations)) + .append("\n"); + sb.append(" warningIntegrations: ") + .append(toIndentedString(warningIntegrations)) + .append("\n"); + sb.append(" workingIntegrations: ") + .append(toIndentedString(workingIntegrations)) + .append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/test/resources/com/datadog/api/client/v2/api/fleet_automation.feature b/src/test/resources/com/datadog/api/client/v2/api/fleet_automation.feature index 0024399c745..b21fe22c60f 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/fleet_automation.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/fleet_automation.feature @@ -152,6 +152,51 @@ Feature: Fleet Automation When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/fleet-automation + Scenario: Get detailed information about an agent returns "Bad Request" response + Given operation "GetFleetAgentInfo" enabled + And new "GetFleetAgentInfo" request + And request contains "agent_key" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/fleet-automation + Scenario: Get detailed information about an agent returns "Not Found" response + Given operation "GetFleetAgentInfo" enabled + And new "GetFleetAgentInfo" request + And request contains "agent_key" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/fleet-automation + Scenario: Get detailed information about an agent returns "OK" response + Given operation "GetFleetAgentInfo" enabled + And new "GetFleetAgentInfo" request + And request contains "agent_key" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/fleet-automation + Scenario: List all Datadog Agents returns "Bad Request" response + Given operation "ListFleetAgents" enabled + And new "ListFleetAgents" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/fleet-automation + Scenario: List all Datadog Agents returns "Not Found" response + Given operation "ListFleetAgents" enabled + And new "ListFleetAgents" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/fleet-automation + Scenario: List all Datadog Agents returns "OK" response + Given operation "ListFleetAgents" enabled + And new "ListFleetAgents" request + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/fleet-automation Scenario: List all available Agent versions returns "Bad Request" response Given operation "ListFleetAgentVersions" enabled diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index 3799e64e630..4ab137c75c6 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json @@ -5,6 +5,18 @@ "type": "safe" } }, + "ListFleetAgents": { + "tag": "Fleet Automation", + "undo": { + "type": "safe" + } + }, + "GetFleetAgentInfo": { + "tag": "Fleet Automation", + "undo": { + "type": "safe" + } + }, "ListFleetDeployments": { "tag": "Fleet Automation", "undo": {