diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 9481f1d6a5d..75755ab7e79 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -27465,6 +27465,155 @@ components: format: int64 type: integer type: object + FleetClusterAttributes: + description: Attributes of a Kubernetes cluster in the fleet. + properties: + agent_versions: + description: Datadog Agent versions running in the cluster. + items: + description: A Datadog Agent version string. + type: string + type: array + api_key_names: + description: API key names used by agents in the cluster. + items: + description: An API key name. + type: string + type: array + api_key_uuids: + description: API key UUIDs used by agents in the cluster. + items: + description: An API key UUID. + type: string + type: array + cloud_providers: + description: Cloud providers hosting the cluster. + items: + description: A cloud provider name. + type: string + type: array + cluster_name: + description: The name of the Kubernetes cluster. + example: "production-us-east-1" + type: string + enabled_products: + description: Datadog products enabled in the cluster. + items: + description: A Datadog product name. + type: string + type: array + envs: + description: Environments associated with the cluster. + items: + description: An environment name. + type: string + type: array + first_seen_at: + description: Timestamp when the cluster was first seen. + format: int64 + type: integer + install_method_tool: + description: The tool used to install agents in the cluster. + example: "helm" + type: string + node_count: + description: Total number of nodes in the cluster. + example: 25 + format: int64 + type: integer + node_count_by_status: + $ref: "#/components/schemas/FleetClusterNodeCountByStatus" + operating_systems: + description: Operating systems of nodes in the cluster. + items: + description: An operating system name. + type: string + type: array + otel_collector_distributions: + description: OpenTelemetry collector distributions in the cluster. + items: + description: An OpenTelemetry collector distribution name. + type: string + type: array + otel_collector_versions: + description: OpenTelemetry collector versions in the cluster. + items: + description: An OpenTelemetry collector version string. + type: string + type: array + pod_count_by_state: + $ref: "#/components/schemas/FleetClusterPodCountByState" + services: + description: Services running in the cluster. + items: + description: A service name. + type: string + type: array + teams: + description: Teams associated with the cluster. + items: + description: A team name. + type: string + type: array + type: object + FleetClusterNodeCountByStatus: + additionalProperties: + format: int64 + type: integer + description: Node counts grouped by status. + type: object + FleetClusterPodCountByState: + additionalProperties: + format: int64 + type: integer + description: Pod counts grouped by state. + type: object + FleetClustersResponse: + description: Response containing a paginated list of fleet clusters. + properties: + data: + $ref: "#/components/schemas/FleetClustersResponseData" + meta: + $ref: "#/components/schemas/FleetClustersResponseMeta" + required: + - data + type: object + FleetClustersResponseData: + description: The response data containing status and clusters array. + properties: + attributes: + $ref: "#/components/schemas/FleetClustersResponseDataAttributes" + id: + description: Status identifier. + example: "done" + type: string + type: + description: Resource type. + example: "status" + type: string + required: + - id + - type + - attributes + type: object + FleetClustersResponseDataAttributes: + description: Attributes of the fleet clusters response containing the list of clusters. + properties: + clusters: + description: Array of clusters matching the query criteria. + items: + $ref: "#/components/schemas/FleetClusterAttributes" + type: array + type: object + FleetClustersResponseMeta: + description: Metadata for the list of clusters response. + properties: + total_filtered_count: + description: Total number of clusters matching the filter criteria across all pages. + example: 12 + format: int64 + type: integer + type: object FleetConfigurationFile: description: A configuration file for an integration. properties: @@ -27814,6 +27963,93 @@ components: example: "postgres" type: string type: object + FleetInstrumentedPodGroupAttributes: + description: Attributes of a group of instrumented pods targeted for SSI injection. + properties: + applied_target: + additionalProperties: {} + description: The SSI injection target configuration applied to the pod group. + type: object + applied_target_name: + description: The name of the applied SSI injection target. + example: "my-injection-target" + type: string + injected_tags: + description: Tags injected into the pods by the Admission Controller. + items: + description: An injected tag string. + type: string + type: array + kube_ownerref_kind: + description: The kind of the Kubernetes owner reference. + example: "Deployment" + type: string + kube_ownerref_name: + description: The name of the Kubernetes owner reference (deployment, statefulset, etc.). + example: "inventory-service" + type: string + lib_injection_annotations: + description: Library injection annotations on the pod group. + items: + description: A library injection annotation string. + type: string + type: array + namespace: + description: The Kubernetes namespace of the pod group. + example: "default" + type: string + pod_count: + description: Total number of pods in the group. + example: 3 + format: int64 + type: integer + pod_names: + description: Names of the individual pods in the group. + items: + description: A Kubernetes pod name. + type: string + type: array + tags: + additionalProperties: + type: string + description: Additional tags associated with the pod group. + type: object + type: object + FleetInstrumentedPodsResponse: + description: Response containing instrumented pods for a Kubernetes cluster. + properties: + data: + $ref: "#/components/schemas/FleetInstrumentedPodsResponseData" + required: + - data + type: object + FleetInstrumentedPodsResponseData: + description: The response data containing the cluster name and instrumented pod groups. + properties: + attributes: + $ref: "#/components/schemas/FleetInstrumentedPodsResponseDataAttributes" + id: + description: The cluster name identifier. + example: "production-us-east-1" + type: string + type: + description: Resource type. + example: "cluster_name" + type: string + required: + - id + - type + - attributes + type: object + FleetInstrumentedPodsResponseDataAttributes: + description: Attributes of the instrumented pods response containing the list of pod groups. + properties: + groups: + description: Array of instrumented pod groups in the cluster. + items: + $ref: "#/components/schemas/FleetInstrumentedPodGroupAttributes" + type: array + type: object FleetIntegrationDetails: description: Detailed information about a single integration. properties: @@ -28123,6 +28359,98 @@ components: required: - data type: object + FleetTracerAttributes: + description: Attributes of a fleet tracer representing a service instance reporting telemetry. + properties: + env: + description: The environment the tracer is reporting from. + example: "production" + type: string + hostname: + description: The hostname where the tracer is running. + example: "my-hostname" + type: string + language: + description: The programming language of the traced application. + example: "java" + type: string + language_version: + description: The version of the programming language runtime. + example: "17.0.1" + type: string + remote_config_status: + description: The remote configuration status of the tracer. + example: "connected" + type: string + runtime_ids: + description: Runtime identifiers for the tracer instances. + items: + description: A runtime identifier for a tracer instance. + type: string + type: array + service: + description: The telemetry-derived service name reported by the tracer. + example: "inventory-service" + type: string + service_hostname: + description: The service hostname reported by the tracer. + example: "my-service-host" + type: string + service_version: + description: The version of the traced service. + example: "2.1.0" + type: string + tracer_version: + description: The version of the Datadog tracer library. + example: "1.32.0" + type: string + type: object + FleetTracersResponse: + description: Response containing a paginated list of fleet tracers. + properties: + data: + $ref: "#/components/schemas/FleetTracersResponseData" + meta: + $ref: "#/components/schemas/FleetTracersResponseMeta" + required: + - data + type: object + FleetTracersResponseData: + description: The response data containing status and tracers array. + properties: + attributes: + $ref: "#/components/schemas/FleetTracersResponseDataAttributes" + id: + description: Status identifier. + example: "done" + type: string + type: + description: Resource type. + example: "status" + type: string + required: + - id + - type + - attributes + type: object + FleetTracersResponseDataAttributes: + description: Attributes of the fleet tracers response containing the list of tracers. + properties: + tracers: + description: Array of tracers matching the query criteria. + items: + $ref: "#/components/schemas/FleetTracerAttributes" + type: array + type: object + FleetTracersResponseMeta: + description: Metadata for the list of tracers response. + properties: + total_filtered_count: + description: Total number of tracers matching the filter criteria across all pages. + example: 42 + format: int64 + type: integer + type: object FormTrigger: description: "Trigger a workflow from a Form." properties: @@ -78309,6 +78637,214 @@ 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/{agent_key}/tracers: + get: + description: |- + Retrieve a paginated list of tracers for a specific agent. + + This endpoint returns tracers associated with a given agent key, identified by the + agent's hostname. Use this to discover telemetry-derived service names for a particular host. + operationId: ListFleetAgentTracers + parameters: + - description: The unique identifier (agent key) for the Datadog Agent. + in: path + name: agent_key + required: true + schema: + type: string + - description: Page number for pagination (starts at 0). + in: query + name: page_number + required: false + schema: + default: 0 + format: int64 + minimum: 0 + type: integer + - description: Number of results per page (must be greater than 0 and less than or equal to 100). + in: query + name: page_size + required: false + schema: + default: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + - description: Attribute to sort by. + in: query + name: sort_attribute + required: false + schema: + type: string + - description: Sort order (true for descending, false for ascending). + in: query + name: sort_descending + required: false + schema: + default: true + type: boolean + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/FleetTracersResponse" + 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 tracers for a specific 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/clusters: + get: + description: |- + Retrieve a paginated list of Kubernetes clusters in the fleet. + + This endpoint returns clusters with metadata including node counts, agent versions, + enabled products, and associated services. Use the `page_number` and `page_size` + query parameters to paginate through results. + operationId: ListFleetClusters + parameters: + - description: Page number for pagination (starts at 0). + in: query + name: page_number + required: false + schema: + default: 0 + format: int64 + minimum: 0 + type: integer + - description: Number of results per page (must be greater than 0 and less than or equal to 100). + in: query + name: page_size + required: false + schema: + default: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + - description: Attribute to sort by. + in: query + name: sort_attribute + required: false + schema: + type: string + - description: Sort order (true for descending, false for ascending). + in: query + name: sort_descending + required: false + schema: + type: boolean + - description: Filter string for narrowing down cluster results. + example: "cluster_name:production" + in: query + name: filter + required: false + schema: + type: string + - description: Comma-separated list of tags to filter clusters. + in: query + name: tags + required: false + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/FleetClustersResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List all fleet clusters + tags: + - Fleet Automation + "x-permission": + operator: AND + permissions: + - hosts_read + x-unstable: |- + This endpoint is in Preview and may introduce breaking changes. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/unstable/fleet/clusters/{cluster_name}/instrumented_pods: + get: + description: |- + Retrieve the list of pods targeted for Single Step Instrumentation (SSI) injection + in a specific Kubernetes cluster. + + This endpoint returns pod groups organized by owner reference (deployment, statefulset, etc.) + with their injection annotations and applied targets. Use the clusters list endpoint + to discover available cluster names. + operationId: ListFleetInstrumentedPods + parameters: + - description: The name of the Kubernetes cluster. + in: path + name: cluster_name + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/FleetInstrumentedPodsResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List instrumented pods for a cluster + tags: + - Fleet Automation + "x-permission": + operator: AND + permissions: + - hosts_read + x-unstable: |- + This endpoint is in Preview and may introduce breaking changes. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/unstable/fleet/deployments: get: description: |- @@ -79101,6 +79637,86 @@ 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/tracers: + get: + description: |- + Retrieve a paginated list of all fleet tracers. + + This endpoint returns telemetry-derived service names from the SDK telemetry pipeline. + These names may differ from span-derived names in APM and are useful for querying + service library configurations. + Use the `page_number` and `page_size` query parameters to paginate through results. + operationId: ListFleetTracers + parameters: + - description: Page number for pagination (starts at 0). + in: query + name: page_number + required: false + schema: + default: 0 + format: int64 + minimum: 0 + type: integer + - description: Number of results per page (must be greater than 0 and less than or equal to 100). + in: query + name: page_size + required: false + schema: + default: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + - description: Attribute to sort by. + in: query + name: sort_attribute + required: false + schema: + type: string + - description: Sort order (true for descending, false for ascending). + in: query + name: sort_descending + required: false + schema: + default: true + type: boolean + - description: Filter string for narrowing down tracer results. + example: "hostname:my-host OR env:prod" + in: query + name: filter + required: false + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/FleetTracersResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List all fleet tracers + 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/v2/actions-datastores: get: description: Lists all datastores for the organization. diff --git a/examples/v2/fleet-automation/ListFleetAgentTracers.java b/examples/v2/fleet-automation/ListFleetAgentTracers.java new file mode 100644 index 00000000000..834a3b0113d --- /dev/null +++ b/examples/v2/fleet-automation/ListFleetAgentTracers.java @@ -0,0 +1,25 @@ +// List tracers for a specific 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.FleetTracersResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listFleetAgentTracers", true); + FleetAutomationApi apiInstance = new FleetAutomationApi(defaultClient); + + try { + FleetTracersResponse result = apiInstance.listFleetAgentTracers("agent_key"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FleetAutomationApi#listFleetAgentTracers"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/fleet-automation/ListFleetClusters.java b/examples/v2/fleet-automation/ListFleetClusters.java new file mode 100644 index 00000000000..83848117e67 --- /dev/null +++ b/examples/v2/fleet-automation/ListFleetClusters.java @@ -0,0 +1,25 @@ +// List all fleet clusters returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.FleetAutomationApi; +import com.datadog.api.client.v2.model.FleetClustersResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listFleetClusters", true); + FleetAutomationApi apiInstance = new FleetAutomationApi(defaultClient); + + try { + FleetClustersResponse result = apiInstance.listFleetClusters(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FleetAutomationApi#listFleetClusters"); + 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/ListFleetInstrumentedPods.java b/examples/v2/fleet-automation/ListFleetInstrumentedPods.java new file mode 100644 index 00000000000..0264981d8a2 --- /dev/null +++ b/examples/v2/fleet-automation/ListFleetInstrumentedPods.java @@ -0,0 +1,25 @@ +// List instrumented pods for a cluster returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.FleetAutomationApi; +import com.datadog.api.client.v2.model.FleetInstrumentedPodsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listFleetInstrumentedPods", true); + FleetAutomationApi apiInstance = new FleetAutomationApi(defaultClient); + + try { + FleetInstrumentedPodsResponse result = apiInstance.listFleetInstrumentedPods("cluster_name"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FleetAutomationApi#listFleetInstrumentedPods"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/fleet-automation/ListFleetTracers.java b/examples/v2/fleet-automation/ListFleetTracers.java new file mode 100644 index 00000000000..fb94ed56818 --- /dev/null +++ b/examples/v2/fleet-automation/ListFleetTracers.java @@ -0,0 +1,25 @@ +// List all fleet tracers 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.FleetTracersResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listFleetTracers", true); + FleetAutomationApi apiInstance = new FleetAutomationApi(defaultClient); + + try { + FleetTracersResponse result = apiInstance.listFleetTracers(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FleetAutomationApi#listFleetTracers"); + 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 e094dfbfa6e..06a633a7e75 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -759,9 +759,13 @@ public class ApiClient { put("v2.getFleetDeployment", false); put("v2.getFleetSchedule", false); put("v2.listFleetAgents", false); + put("v2.listFleetAgentTracers", false); put("v2.listFleetAgentVersions", false); + put("v2.listFleetClusters", false); put("v2.listFleetDeployments", false); + put("v2.listFleetInstrumentedPods", false); put("v2.listFleetSchedules", false); + put("v2.listFleetTracers", false); put("v2.triggerFleetSchedule", false); put("v2.updateFleetSchedule", false); put("v2.createOpenAPI", 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 474d1ad21ac..c3babafbe6b 100644 --- a/src/main/java/com/datadog/api/client/v2/api/FleetAutomationApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/FleetAutomationApi.java @@ -7,14 +7,17 @@ import com.datadog.api.client.v2.model.FleetAgentInfoResponse; import com.datadog.api.client.v2.model.FleetAgentVersionsResponse; import com.datadog.api.client.v2.model.FleetAgentsResponse; +import com.datadog.api.client.v2.model.FleetClustersResponse; import com.datadog.api.client.v2.model.FleetDeploymentConfigureCreateRequest; import com.datadog.api.client.v2.model.FleetDeploymentPackageUpgradeCreateRequest; import com.datadog.api.client.v2.model.FleetDeploymentResponse; import com.datadog.api.client.v2.model.FleetDeploymentsResponse; +import com.datadog.api.client.v2.model.FleetInstrumentedPodsResponse; import com.datadog.api.client.v2.model.FleetScheduleCreateRequest; import com.datadog.api.client.v2.model.FleetSchedulePatchRequest; import com.datadog.api.client.v2.model.FleetScheduleResponse; import com.datadog.api.client.v2.model.FleetSchedulesResponse; +import com.datadog.api.client.v2.model.FleetTracersResponse; import jakarta.ws.rs.client.Invocation; import jakarta.ws.rs.core.GenericType; import java.util.ArrayList; @@ -1696,27 +1699,509 @@ public CompletableFuture> listFleetAgentsWithHt new GenericType() {}); } + /** Manage optional parameters to listFleetAgentTracers. */ + public static class ListFleetAgentTracersOptionalParameters { + private Long pageNumber; + private Long pageSize; + private String sortAttribute; + private Boolean sortDescending; + + /** + * Set pageNumber. + * + * @param pageNumber Page number for pagination (starts at 0). (optional, default to 0) + * @return ListFleetAgentTracersOptionalParameters + */ + public ListFleetAgentTracersOptionalParameters 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 ListFleetAgentTracersOptionalParameters + */ + public ListFleetAgentTracersOptionalParameters pageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set sortAttribute. + * + * @param sortAttribute Attribute to sort by. (optional) + * @return ListFleetAgentTracersOptionalParameters + */ + public ListFleetAgentTracersOptionalParameters sortAttribute(String sortAttribute) { + this.sortAttribute = sortAttribute; + return this; + } + + /** + * Set sortDescending. + * + * @param sortDescending Sort order (true for descending, false for ascending). (optional, + * default to true) + * @return ListFleetAgentTracersOptionalParameters + */ + public ListFleetAgentTracersOptionalParameters sortDescending(Boolean sortDescending) { + this.sortDescending = sortDescending; + return this; + } + } + + /** + * List tracers for a specific agent. + * + *

See {@link #listFleetAgentTracersWithHttpInfo}. + * + * @param agentKey The unique identifier (agent key) for the Datadog Agent. (required) + * @return FleetTracersResponse + * @throws ApiException if fails to make API call + */ + public FleetTracersResponse listFleetAgentTracers(String agentKey) throws ApiException { + return listFleetAgentTracersWithHttpInfo( + agentKey, new ListFleetAgentTracersOptionalParameters()) + .getData(); + } + + /** + * List tracers for a specific agent. + * + *

See {@link #listFleetAgentTracersWithHttpInfoAsync}. + * + * @param agentKey The unique identifier (agent key) for the Datadog Agent. (required) + * @return CompletableFuture<FleetTracersResponse> + */ + public CompletableFuture listFleetAgentTracersAsync(String agentKey) { + return listFleetAgentTracersWithHttpInfoAsync( + agentKey, new ListFleetAgentTracersOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List tracers for a specific agent. + * + *

See {@link #listFleetAgentTracersWithHttpInfo}. + * + * @param agentKey The unique identifier (agent key) for the Datadog Agent. (required) + * @param parameters Optional parameters for the request. + * @return FleetTracersResponse + * @throws ApiException if fails to make API call + */ + public FleetTracersResponse listFleetAgentTracers( + String agentKey, ListFleetAgentTracersOptionalParameters parameters) throws ApiException { + return listFleetAgentTracersWithHttpInfo(agentKey, parameters).getData(); + } + + /** + * List tracers for a specific agent. + * + *

See {@link #listFleetAgentTracersWithHttpInfoAsync}. + * + * @param agentKey The unique identifier (agent key) for the Datadog Agent. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<FleetTracersResponse> + */ + public CompletableFuture listFleetAgentTracersAsync( + String agentKey, ListFleetAgentTracersOptionalParameters parameters) { + return listFleetAgentTracersWithHttpInfoAsync(agentKey, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve a paginated list of tracers for a specific agent. + * + *

This endpoint returns tracers associated with a given agent key, identified by the agent's + * hostname. Use this to discover telemetry-derived service names for a particular host. + * + * @param agentKey The unique identifier (agent key) for the Datadog Agent. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<FleetTracersResponse> + * @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 listFleetAgentTracersWithHttpInfo( + String agentKey, ListFleetAgentTracersOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listFleetAgentTracers"; + 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 listFleetAgentTracers"); + } + Long pageNumber = parameters.pageNumber; + Long pageSize = parameters.pageSize; + String sortAttribute = parameters.sortAttribute; + Boolean sortDescending = parameters.sortDescending; + // create path and map variables + String localVarPath = + "/api/unstable/fleet/agents/{agent_key}/tracers" + .replaceAll("\\{" + "agent_key" + "\\}", apiClient.escapeString(agentKey.toString())); + + 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)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.FleetAutomationApi.listFleetAgentTracers", + 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 tracers for a specific agent. + * + *

See {@link #listFleetAgentTracersWithHttpInfo}. + * + * @param agentKey The unique identifier (agent key) for the Datadog Agent. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<FleetTracersResponse>> + */ + public CompletableFuture> + listFleetAgentTracersWithHttpInfoAsync( + String agentKey, ListFleetAgentTracersOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listFleetAgentTracers"; + 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 listFleetAgentTracers")); + return result; + } + Long pageNumber = parameters.pageNumber; + Long pageSize = parameters.pageSize; + String sortAttribute = parameters.sortAttribute; + Boolean sortDescending = parameters.sortDescending; + // create path and map variables + String localVarPath = + "/api/unstable/fleet/agents/{agent_key}/tracers" + .replaceAll("\\{" + "agent_key" + "\\}", apiClient.escapeString(agentKey.toString())); + + 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)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.FleetAutomationApi.listFleetAgentTracers", + 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. + * + *

See {@link #listFleetAgentVersionsWithHttpInfo}. + * + * @return FleetAgentVersionsResponse + * @throws ApiException if fails to make API call + */ + public FleetAgentVersionsResponse listFleetAgentVersions() throws ApiException { + return listFleetAgentVersionsWithHttpInfo().getData(); + } + + /** + * List all available Agent versions. + * + *

See {@link #listFleetAgentVersionsWithHttpInfoAsync}. + * + * @return CompletableFuture<FleetAgentVersionsResponse> + */ + public CompletableFuture listFleetAgentVersionsAsync() { + return listFleetAgentVersionsWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve a list of all available Datadog Agent versions. + * + *

This endpoint returns the available Agent versions that can be deployed to your fleet. These + * versions are used when creating deployments or configuring schedules for automated Agent + * upgrades. + * + * @return ApiResponse<FleetAgentVersionsResponse> + * @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 listFleetAgentVersionsWithHttpInfo() + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listFleetAgentVersions"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/unstable/fleet/agent_versions"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.FleetAutomationApi.listFleetAgentVersions", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List all available Agent versions. + * + *

See {@link #listFleetAgentVersionsWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<FleetAgentVersionsResponse>> + */ + public CompletableFuture> + listFleetAgentVersionsWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "listFleetAgentVersions"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/unstable/fleet/agent_versions"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.FleetAutomationApi.listFleetAgentVersions", + 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 listFleetClusters. */ + public static class ListFleetClustersOptionalParameters { + private Long pageNumber; + private Long pageSize; + private String sortAttribute; + private Boolean sortDescending; + private String filter; + private String tags; + + /** + * Set pageNumber. + * + * @param pageNumber Page number for pagination (starts at 0). (optional, default to 0) + * @return ListFleetClustersOptionalParameters + */ + public ListFleetClustersOptionalParameters pageNumber(Long pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Set pageSize. + * + * @param pageSize Number of results per page (must be greater than 0 and less than or equal to + * 100). (optional, default to 10) + * @return ListFleetClustersOptionalParameters + */ + public ListFleetClustersOptionalParameters pageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set sortAttribute. + * + * @param sortAttribute Attribute to sort by. (optional) + * @return ListFleetClustersOptionalParameters + */ + public ListFleetClustersOptionalParameters sortAttribute(String sortAttribute) { + this.sortAttribute = sortAttribute; + return this; + } + + /** + * Set sortDescending. + * + * @param sortDescending Sort order (true for descending, false for ascending). (optional) + * @return ListFleetClustersOptionalParameters + */ + public ListFleetClustersOptionalParameters sortDescending(Boolean sortDescending) { + this.sortDescending = sortDescending; + return this; + } + + /** + * Set filter. + * + * @param filter Filter string for narrowing down cluster results. (optional) + * @return ListFleetClustersOptionalParameters + */ + public ListFleetClustersOptionalParameters filter(String filter) { + this.filter = filter; + return this; + } + + /** + * Set tags. + * + * @param tags Comma-separated list of tags to filter clusters. (optional) + * @return ListFleetClustersOptionalParameters + */ + public ListFleetClustersOptionalParameters tags(String tags) { + this.tags = tags; + return this; + } + } + /** - * List all available Agent versions. + * List all fleet clusters. * - *

See {@link #listFleetAgentVersionsWithHttpInfo}. + *

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

See {@link #listFleetAgentVersionsWithHttpInfoAsync}. + *

See {@link #listFleetClustersWithHttpInfoAsync}. * - * @return CompletableFuture<FleetAgentVersionsResponse> + * @return CompletableFuture<FleetClustersResponse> */ - public CompletableFuture listFleetAgentVersionsAsync() { - return listFleetAgentVersionsWithHttpInfoAsync() + public CompletableFuture listFleetClustersAsync() { + return listFleetClustersWithHttpInfoAsync(new ListFleetClustersOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -1724,13 +2209,45 @@ public CompletableFuture listFleetAgentVersionsAsync } /** - * Retrieve a list of all available Datadog Agent versions. + * List all fleet clusters. * - *

This endpoint returns the available Agent versions that can be deployed to your fleet. These - * versions are used when creating deployments or configuring schedules for automated Agent - * upgrades. + *

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

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

This endpoint returns clusters with metadata including node counts, agent versions, enabled + * products, and associated services. Use the page_number and page_size + * query parameters to paginate through results. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<FleetClustersResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -1744,26 +2261,40 @@ public CompletableFuture listFleetAgentVersionsAsync * *
429 Too many requests -
*/ - public ApiResponse listFleetAgentVersionsWithHttpInfo() - throws ApiException { + public ApiResponse listFleetClustersWithHttpInfo( + ListFleetClustersOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "listFleetAgentVersions"; + String operationId = "listFleetClusters"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; + Long pageNumber = parameters.pageNumber; + Long pageSize = parameters.pageSize; + String sortAttribute = parameters.sortAttribute; + Boolean sortDescending = parameters.sortDescending; + String filter = parameters.filter; + String tags = parameters.tags; // create path and map variables - String localVarPath = "/api/unstable/fleet/agent_versions"; + String localVarPath = "/api/unstable/fleet/clusters"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_number", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_attribute", sortAttribute)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_descending", sortDescending)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "tags", tags)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.FleetAutomationApi.listFleetAgentVersions", + "v2.FleetAutomationApi.listFleetClusters", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -1776,47 +2307,62 @@ public ApiResponse listFleetAgentVersionsWithHttpInf localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List all available Agent versions. + * List all fleet clusters. * - *

See {@link #listFleetAgentVersionsWithHttpInfo}. + *

See {@link #listFleetClustersWithHttpInfo}. * - * @return CompletableFuture<ApiResponse<FleetAgentVersionsResponse>> + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<FleetClustersResponse>> */ - public CompletableFuture> - listFleetAgentVersionsWithHttpInfoAsync() { + public CompletableFuture> listFleetClustersWithHttpInfoAsync( + ListFleetClustersOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listFleetAgentVersions"; + String operationId = "listFleetClusters"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; + Long pageNumber = parameters.pageNumber; + Long pageSize = parameters.pageSize; + String sortAttribute = parameters.sortAttribute; + Boolean sortDescending = parameters.sortDescending; + String filter = parameters.filter; + String tags = parameters.tags; // create path and map variables - String localVarPath = "/api/unstable/fleet/agent_versions"; + String localVarPath = "/api/unstable/fleet/clusters"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_number", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_attribute", sortAttribute)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_descending", sortDescending)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "tags", tags)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.FleetAutomationApi.listFleetAgentVersions", + "v2.FleetAutomationApi.listFleetClusters", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -1828,7 +2374,7 @@ public ApiResponse listFleetAgentVersionsWithHttpInf localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** Manage optional parameters to listFleetDeployments. */ @@ -1910,9 +2456,158 @@ public FleetDeploymentsResponse listFleetDeployments( * @param parameters Optional parameters for the request. * @return CompletableFuture<FleetDeploymentsResponse> */ - public CompletableFuture listFleetDeploymentsAsync( - ListFleetDeploymentsOptionalParameters parameters) { - return listFleetDeploymentsWithHttpInfoAsync(parameters) + public CompletableFuture listFleetDeploymentsAsync( + ListFleetDeploymentsOptionalParameters parameters) { + return listFleetDeploymentsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve a list of all deployments for fleet automation. Use the page_size and + * page_offset parameters to paginate results. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<FleetDeploymentsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse listFleetDeploymentsWithHttpInfo( + ListFleetDeploymentsOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listFleetDeployments"; + 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 pageSize = parameters.pageSize; + Long pageOffset = parameters.pageOffset; + // create path and map variables + String localVarPath = "/api/unstable/fleet/deployments"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_offset", pageOffset)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.FleetAutomationApi.listFleetDeployments", + 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 deployments. + * + *

See {@link #listFleetDeploymentsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<FleetDeploymentsResponse>> + */ + public CompletableFuture> + listFleetDeploymentsWithHttpInfoAsync(ListFleetDeploymentsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listFleetDeployments"; + 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 pageSize = parameters.pageSize; + Long pageOffset = parameters.pageOffset; + // create path and map variables + String localVarPath = "/api/unstable/fleet/deployments"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_offset", pageOffset)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.FleetAutomationApi.listFleetDeployments", + 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 instrumented pods for a cluster. + * + *

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

See {@link #listFleetInstrumentedPodsWithHttpInfoAsync}. + * + * @param clusterName The name of the Kubernetes cluster. (required) + * @return CompletableFuture<FleetInstrumentedPodsResponse> + */ + public CompletableFuture listFleetInstrumentedPodsAsync( + String clusterName) { + return listFleetInstrumentedPodsWithHttpInfoAsync(clusterName) .thenApply( response -> { return response.getData(); @@ -1920,11 +2615,15 @@ public CompletableFuture listFleetDeploymentsAsync( } /** - * Retrieve a list of all deployments for fleet automation. Use the page_size and - * page_offset parameters to paginate results. + * Retrieve the list of pods targeted for Single Step Instrumentation (SSI) injection in a + * specific Kubernetes cluster. * - * @param parameters Optional parameters for the request. - * @return ApiResponse<FleetDeploymentsResponse> + *

This endpoint returns pod groups organized by owner reference (deployment, statefulset, + * etc.) with their injection annotations and applied targets. Use the clusters list endpoint to + * discover available cluster names. + * + * @param clusterName The name of the Kubernetes cluster. (required) + * @return ApiResponse<FleetInstrumentedPodsResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -1934,35 +2633,40 @@ public CompletableFuture listFleetDeploymentsAsync( * * * + * * *
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse listFleetDeploymentsWithHttpInfo( - ListFleetDeploymentsOptionalParameters parameters) throws ApiException { + public ApiResponse listFleetInstrumentedPodsWithHttpInfo( + String clusterName) throws ApiException { // Check if unstable operation is enabled - String operationId = "listFleetDeployments"; + String operationId = "listFleetInstrumentedPods"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; - Long pageSize = parameters.pageSize; - Long pageOffset = parameters.pageOffset; + + // verify the required parameter 'clusterName' is set + if (clusterName == null) { + throw new ApiException( + 400, + "Missing the required parameter 'clusterName' when calling listFleetInstrumentedPods"); + } // create path and map variables - String localVarPath = "/api/unstable/fleet/deployments"; + String localVarPath = + "/api/unstable/fleet/clusters/{cluster_name}/instrumented_pods" + .replaceAll( + "\\{" + "cluster_name" + "\\}", apiClient.escapeString(clusterName.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_offset", pageOffset)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.FleetAutomationApi.listFleetDeployments", + "v2.FleetAutomationApi.listFleetInstrumentedPods", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -1975,54 +2679,65 @@ public ApiResponse listFleetDeploymentsWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List all deployments. + * List instrumented pods for a cluster. * - *

See {@link #listFleetDeploymentsWithHttpInfo}. + *

See {@link #listFleetInstrumentedPodsWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<FleetDeploymentsResponse>> + * @param clusterName The name of the Kubernetes cluster. (required) + * @return CompletableFuture<ApiResponse<FleetInstrumentedPodsResponse>> */ - public CompletableFuture> - listFleetDeploymentsWithHttpInfoAsync(ListFleetDeploymentsOptionalParameters parameters) { + public CompletableFuture> + listFleetInstrumentedPodsWithHttpInfoAsync(String clusterName) { // Check if unstable operation is enabled - String operationId = "listFleetDeployments"; + String operationId = "listFleetInstrumentedPods"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - Long pageSize = parameters.pageSize; - Long pageOffset = parameters.pageOffset; + + // verify the required parameter 'clusterName' is set + if (clusterName == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'clusterName' when calling" + + " listFleetInstrumentedPods")); + return result; + } // create path and map variables - String localVarPath = "/api/unstable/fleet/deployments"; + String localVarPath = + "/api/unstable/fleet/clusters/{cluster_name}/instrumented_pods" + .replaceAll( + "\\{" + "cluster_name" + "\\}", apiClient.escapeString(clusterName.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_offset", pageOffset)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.FleetAutomationApi.listFleetDeployments", + "v2.FleetAutomationApi.listFleetInstrumentedPods", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -2034,7 +2749,7 @@ public ApiResponse listFleetDeploymentsWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -2169,6 +2884,265 @@ public ApiResponse listFleetSchedulesWithHttpInfo() thro new GenericType() {}); } + /** Manage optional parameters to listFleetTracers. */ + public static class ListFleetTracersOptionalParameters { + private Long pageNumber; + private Long pageSize; + private String sortAttribute; + private Boolean sortDescending; + private String filter; + + /** + * Set pageNumber. + * + * @param pageNumber Page number for pagination (starts at 0). (optional, default to 0) + * @return ListFleetTracersOptionalParameters + */ + public ListFleetTracersOptionalParameters 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 ListFleetTracersOptionalParameters + */ + public ListFleetTracersOptionalParameters pageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set sortAttribute. + * + * @param sortAttribute Attribute to sort by. (optional) + * @return ListFleetTracersOptionalParameters + */ + public ListFleetTracersOptionalParameters sortAttribute(String sortAttribute) { + this.sortAttribute = sortAttribute; + return this; + } + + /** + * Set sortDescending. + * + * @param sortDescending Sort order (true for descending, false for ascending). (optional, + * default to true) + * @return ListFleetTracersOptionalParameters + */ + public ListFleetTracersOptionalParameters sortDescending(Boolean sortDescending) { + this.sortDescending = sortDescending; + return this; + } + + /** + * Set filter. + * + * @param filter Filter string for narrowing down tracer results. (optional) + * @return ListFleetTracersOptionalParameters + */ + public ListFleetTracersOptionalParameters filter(String filter) { + this.filter = filter; + return this; + } + } + + /** + * List all fleet tracers. + * + *

See {@link #listFleetTracersWithHttpInfo}. + * + * @return FleetTracersResponse + * @throws ApiException if fails to make API call + */ + public FleetTracersResponse listFleetTracers() throws ApiException { + return listFleetTracersWithHttpInfo(new ListFleetTracersOptionalParameters()).getData(); + } + + /** + * List all fleet tracers. + * + *

See {@link #listFleetTracersWithHttpInfoAsync}. + * + * @return CompletableFuture<FleetTracersResponse> + */ + public CompletableFuture listFleetTracersAsync() { + return listFleetTracersWithHttpInfoAsync(new ListFleetTracersOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all fleet tracers. + * + *

See {@link #listFleetTracersWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return FleetTracersResponse + * @throws ApiException if fails to make API call + */ + public FleetTracersResponse listFleetTracers(ListFleetTracersOptionalParameters parameters) + throws ApiException { + return listFleetTracersWithHttpInfo(parameters).getData(); + } + + /** + * List all fleet tracers. + * + *

See {@link #listFleetTracersWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<FleetTracersResponse> + */ + public CompletableFuture listFleetTracersAsync( + ListFleetTracersOptionalParameters parameters) { + return listFleetTracersWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve a paginated list of all fleet tracers. + * + *

This endpoint returns telemetry-derived service names from the SDK telemetry pipeline. These + * names may differ from span-derived names in APM and are useful for querying service library + * configurations. Use the page_number and page_size query parameters to + * paginate through results. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<FleetTracersResponse> + * @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 listFleetTracersWithHttpInfo( + ListFleetTracersOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listFleetTracers"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + Long pageNumber = parameters.pageNumber; + Long pageSize = parameters.pageSize; + String sortAttribute = parameters.sortAttribute; + Boolean sortDescending = parameters.sortDescending; + String filter = parameters.filter; + // create path and map variables + String localVarPath = "/api/unstable/fleet/tracers"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_number", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_attribute", sortAttribute)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_descending", sortDescending)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.FleetAutomationApi.listFleetTracers", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List all fleet tracers. + * + *

See {@link #listFleetTracersWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<FleetTracersResponse>> + */ + public CompletableFuture> listFleetTracersWithHttpInfoAsync( + ListFleetTracersOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listFleetTracers"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + Long pageNumber = parameters.pageNumber; + Long pageSize = parameters.pageSize; + String sortAttribute = parameters.sortAttribute; + Boolean sortDescending = parameters.sortDescending; + String filter = parameters.filter; + // create path and map variables + String localVarPath = "/api/unstable/fleet/tracers"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_number", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_attribute", sortAttribute)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort_descending", sortDescending)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter", filter)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.FleetAutomationApi.listFleetTracers", + 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() {}); + } + /** * Trigger a schedule deployment. * diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetClusterAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FleetClusterAttributes.java new file mode 100644 index 00000000000..f02a291553a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetClusterAttributes.java @@ -0,0 +1,701 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a Kubernetes cluster in the fleet. */ +@JsonPropertyOrder({ + FleetClusterAttributes.JSON_PROPERTY_AGENT_VERSIONS, + FleetClusterAttributes.JSON_PROPERTY_API_KEY_NAMES, + FleetClusterAttributes.JSON_PROPERTY_API_KEY_UUIDS, + FleetClusterAttributes.JSON_PROPERTY_CLOUD_PROVIDERS, + FleetClusterAttributes.JSON_PROPERTY_CLUSTER_NAME, + FleetClusterAttributes.JSON_PROPERTY_ENABLED_PRODUCTS, + FleetClusterAttributes.JSON_PROPERTY_ENVS, + FleetClusterAttributes.JSON_PROPERTY_FIRST_SEEN_AT, + FleetClusterAttributes.JSON_PROPERTY_INSTALL_METHOD_TOOL, + FleetClusterAttributes.JSON_PROPERTY_NODE_COUNT, + FleetClusterAttributes.JSON_PROPERTY_NODE_COUNT_BY_STATUS, + FleetClusterAttributes.JSON_PROPERTY_OPERATING_SYSTEMS, + FleetClusterAttributes.JSON_PROPERTY_OTEL_COLLECTOR_DISTRIBUTIONS, + FleetClusterAttributes.JSON_PROPERTY_OTEL_COLLECTOR_VERSIONS, + FleetClusterAttributes.JSON_PROPERTY_POD_COUNT_BY_STATE, + FleetClusterAttributes.JSON_PROPERTY_SERVICES, + FleetClusterAttributes.JSON_PROPERTY_TEAMS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FleetClusterAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AGENT_VERSIONS = "agent_versions"; + private List agentVersions = null; + + public static final String JSON_PROPERTY_API_KEY_NAMES = "api_key_names"; + private List apiKeyNames = null; + + public static final String JSON_PROPERTY_API_KEY_UUIDS = "api_key_uuids"; + private List apiKeyUuids = null; + + public static final String JSON_PROPERTY_CLOUD_PROVIDERS = "cloud_providers"; + private List cloudProviders = null; + + public static final String JSON_PROPERTY_CLUSTER_NAME = "cluster_name"; + private String clusterName; + + public static final String JSON_PROPERTY_ENABLED_PRODUCTS = "enabled_products"; + private List enabledProducts = null; + + public static final String JSON_PROPERTY_ENVS = "envs"; + private List envs = null; + + public static final String JSON_PROPERTY_FIRST_SEEN_AT = "first_seen_at"; + private Long firstSeenAt; + + public static final String JSON_PROPERTY_INSTALL_METHOD_TOOL = "install_method_tool"; + private String installMethodTool; + + public static final String JSON_PROPERTY_NODE_COUNT = "node_count"; + private Long nodeCount; + + public static final String JSON_PROPERTY_NODE_COUNT_BY_STATUS = "node_count_by_status"; + private Map nodeCountByStatus = null; + + public static final String JSON_PROPERTY_OPERATING_SYSTEMS = "operating_systems"; + private List operatingSystems = null; + + public static final String JSON_PROPERTY_OTEL_COLLECTOR_DISTRIBUTIONS = + "otel_collector_distributions"; + private List otelCollectorDistributions = null; + + public static final String JSON_PROPERTY_OTEL_COLLECTOR_VERSIONS = "otel_collector_versions"; + private List otelCollectorVersions = null; + + public static final String JSON_PROPERTY_POD_COUNT_BY_STATE = "pod_count_by_state"; + private Map podCountByState = null; + + public static final String JSON_PROPERTY_SERVICES = "services"; + private List services = null; + + public static final String JSON_PROPERTY_TEAMS = "teams"; + private List teams = null; + + public FleetClusterAttributes agentVersions(List agentVersions) { + this.agentVersions = agentVersions; + return this; + } + + public FleetClusterAttributes addAgentVersionsItem(String agentVersionsItem) { + if (this.agentVersions == null) { + this.agentVersions = new ArrayList<>(); + } + this.agentVersions.add(agentVersionsItem); + return this; + } + + /** + * Datadog Agent versions running in the cluster. + * + * @return agentVersions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGENT_VERSIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAgentVersions() { + return agentVersions; + } + + public void setAgentVersions(List agentVersions) { + this.agentVersions = agentVersions; + } + + public FleetClusterAttributes apiKeyNames(List apiKeyNames) { + this.apiKeyNames = apiKeyNames; + return this; + } + + public FleetClusterAttributes addApiKeyNamesItem(String apiKeyNamesItem) { + if (this.apiKeyNames == null) { + this.apiKeyNames = new ArrayList<>(); + } + this.apiKeyNames.add(apiKeyNamesItem); + return this; + } + + /** + * API key names used by agents in the cluster. + * + * @return apiKeyNames + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_API_KEY_NAMES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getApiKeyNames() { + return apiKeyNames; + } + + public void setApiKeyNames(List apiKeyNames) { + this.apiKeyNames = apiKeyNames; + } + + public FleetClusterAttributes apiKeyUuids(List apiKeyUuids) { + this.apiKeyUuids = apiKeyUuids; + return this; + } + + public FleetClusterAttributes addApiKeyUuidsItem(String apiKeyUuidsItem) { + if (this.apiKeyUuids == null) { + this.apiKeyUuids = new ArrayList<>(); + } + this.apiKeyUuids.add(apiKeyUuidsItem); + return this; + } + + /** + * API key UUIDs used by agents in the cluster. + * + * @return apiKeyUuids + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_API_KEY_UUIDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getApiKeyUuids() { + return apiKeyUuids; + } + + public void setApiKeyUuids(List apiKeyUuids) { + this.apiKeyUuids = apiKeyUuids; + } + + public FleetClusterAttributes cloudProviders(List cloudProviders) { + this.cloudProviders = cloudProviders; + return this; + } + + public FleetClusterAttributes addCloudProvidersItem(String cloudProvidersItem) { + if (this.cloudProviders == null) { + this.cloudProviders = new ArrayList<>(); + } + this.cloudProviders.add(cloudProvidersItem); + return this; + } + + /** + * Cloud providers hosting the cluster. + * + * @return cloudProviders + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLOUD_PROVIDERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCloudProviders() { + return cloudProviders; + } + + public void setCloudProviders(List cloudProviders) { + this.cloudProviders = cloudProviders; + } + + public FleetClusterAttributes clusterName(String clusterName) { + this.clusterName = clusterName; + return this; + } + + /** + * The name of the Kubernetes cluster. + * + * @return clusterName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLUSTER_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getClusterName() { + return clusterName; + } + + public void setClusterName(String clusterName) { + this.clusterName = clusterName; + } + + public FleetClusterAttributes enabledProducts(List enabledProducts) { + this.enabledProducts = enabledProducts; + return this; + } + + public FleetClusterAttributes addEnabledProductsItem(String enabledProductsItem) { + if (this.enabledProducts == null) { + this.enabledProducts = new ArrayList<>(); + } + this.enabledProducts.add(enabledProductsItem); + return this; + } + + /** + * Datadog products enabled in the cluster. + * + * @return enabledProducts + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED_PRODUCTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEnabledProducts() { + return enabledProducts; + } + + public void setEnabledProducts(List enabledProducts) { + this.enabledProducts = enabledProducts; + } + + public FleetClusterAttributes envs(List envs) { + this.envs = envs; + return this; + } + + public FleetClusterAttributes addEnvsItem(String envsItem) { + if (this.envs == null) { + this.envs = new ArrayList<>(); + } + this.envs.add(envsItem); + return this; + } + + /** + * Environments associated with the cluster. + * + * @return envs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENVS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEnvs() { + return envs; + } + + public void setEnvs(List envs) { + this.envs = envs; + } + + public FleetClusterAttributes firstSeenAt(Long firstSeenAt) { + this.firstSeenAt = firstSeenAt; + return this; + } + + /** + * Timestamp when the cluster was first seen. + * + * @return firstSeenAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIRST_SEEN_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getFirstSeenAt() { + return firstSeenAt; + } + + public void setFirstSeenAt(Long firstSeenAt) { + this.firstSeenAt = firstSeenAt; + } + + public FleetClusterAttributes installMethodTool(String installMethodTool) { + this.installMethodTool = installMethodTool; + return this; + } + + /** + * The tool used to install agents in the cluster. + * + * @return installMethodTool + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INSTALL_METHOD_TOOL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getInstallMethodTool() { + return installMethodTool; + } + + public void setInstallMethodTool(String installMethodTool) { + this.installMethodTool = installMethodTool; + } + + public FleetClusterAttributes nodeCount(Long nodeCount) { + this.nodeCount = nodeCount; + return this; + } + + /** + * Total number of nodes in the cluster. + * + * @return nodeCount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NODE_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getNodeCount() { + return nodeCount; + } + + public void setNodeCount(Long nodeCount) { + this.nodeCount = nodeCount; + } + + public FleetClusterAttributes nodeCountByStatus(Map nodeCountByStatus) { + this.nodeCountByStatus = nodeCountByStatus; + return this; + } + + public FleetClusterAttributes putNodeCountByStatusItem(String key, Long nodeCountByStatusItem) { + if (this.nodeCountByStatus == null) { + this.nodeCountByStatus = new HashMap<>(); + } + this.nodeCountByStatus.put(key, nodeCountByStatusItem); + return this; + } + + /** + * Node counts grouped by status. + * + * @return nodeCountByStatus + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NODE_COUNT_BY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getNodeCountByStatus() { + return nodeCountByStatus; + } + + public void setNodeCountByStatus(Map nodeCountByStatus) { + this.nodeCountByStatus = nodeCountByStatus; + } + + public FleetClusterAttributes operatingSystems(List operatingSystems) { + this.operatingSystems = operatingSystems; + return this; + } + + public FleetClusterAttributes addOperatingSystemsItem(String operatingSystemsItem) { + if (this.operatingSystems == null) { + this.operatingSystems = new ArrayList<>(); + } + this.operatingSystems.add(operatingSystemsItem); + return this; + } + + /** + * Operating systems of nodes in the cluster. + * + * @return operatingSystems + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPERATING_SYSTEMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getOperatingSystems() { + return operatingSystems; + } + + public void setOperatingSystems(List operatingSystems) { + this.operatingSystems = operatingSystems; + } + + public FleetClusterAttributes otelCollectorDistributions( + List otelCollectorDistributions) { + this.otelCollectorDistributions = otelCollectorDistributions; + return this; + } + + public FleetClusterAttributes addOtelCollectorDistributionsItem( + String otelCollectorDistributionsItem) { + if (this.otelCollectorDistributions == null) { + this.otelCollectorDistributions = new ArrayList<>(); + } + this.otelCollectorDistributions.add(otelCollectorDistributionsItem); + return this; + } + + /** + * OpenTelemetry collector distributions in the cluster. + * + * @return otelCollectorDistributions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OTEL_COLLECTOR_DISTRIBUTIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getOtelCollectorDistributions() { + return otelCollectorDistributions; + } + + public void setOtelCollectorDistributions(List otelCollectorDistributions) { + this.otelCollectorDistributions = otelCollectorDistributions; + } + + public FleetClusterAttributes otelCollectorVersions(List otelCollectorVersions) { + this.otelCollectorVersions = otelCollectorVersions; + return this; + } + + public FleetClusterAttributes addOtelCollectorVersionsItem(String otelCollectorVersionsItem) { + if (this.otelCollectorVersions == null) { + this.otelCollectorVersions = new ArrayList<>(); + } + this.otelCollectorVersions.add(otelCollectorVersionsItem); + return this; + } + + /** + * OpenTelemetry collector versions in the cluster. + * + * @return otelCollectorVersions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OTEL_COLLECTOR_VERSIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getOtelCollectorVersions() { + return otelCollectorVersions; + } + + public void setOtelCollectorVersions(List otelCollectorVersions) { + this.otelCollectorVersions = otelCollectorVersions; + } + + public FleetClusterAttributes podCountByState(Map podCountByState) { + this.podCountByState = podCountByState; + return this; + } + + public FleetClusterAttributes putPodCountByStateItem(String key, Long podCountByStateItem) { + if (this.podCountByState == null) { + this.podCountByState = new HashMap<>(); + } + this.podCountByState.put(key, podCountByStateItem); + return this; + } + + /** + * Pod counts grouped by state. + * + * @return podCountByState + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POD_COUNT_BY_STATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getPodCountByState() { + return podCountByState; + } + + public void setPodCountByState(Map podCountByState) { + this.podCountByState = podCountByState; + } + + public FleetClusterAttributes services(List services) { + this.services = services; + return this; + } + + public FleetClusterAttributes addServicesItem(String servicesItem) { + if (this.services == null) { + this.services = new ArrayList<>(); + } + this.services.add(servicesItem); + return this; + } + + /** + * Services running in the cluster. + * + * @return services + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getServices() { + return services; + } + + public void setServices(List services) { + this.services = services; + } + + public FleetClusterAttributes teams(List teams) { + this.teams = teams; + return this; + } + + public FleetClusterAttributes addTeamsItem(String teamsItem) { + if (this.teams == null) { + this.teams = new ArrayList<>(); + } + this.teams.add(teamsItem); + return this; + } + + /** + * Teams associated with the cluster. + * + * @return teams + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEAMS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTeams() { + return teams; + } + + public void setTeams(List teams) { + this.teams = teams; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FleetClusterAttributes + */ + @JsonAnySetter + public FleetClusterAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FleetClusterAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FleetClusterAttributes fleetClusterAttributes = (FleetClusterAttributes) o; + return Objects.equals(this.agentVersions, fleetClusterAttributes.agentVersions) + && Objects.equals(this.apiKeyNames, fleetClusterAttributes.apiKeyNames) + && Objects.equals(this.apiKeyUuids, fleetClusterAttributes.apiKeyUuids) + && Objects.equals(this.cloudProviders, fleetClusterAttributes.cloudProviders) + && Objects.equals(this.clusterName, fleetClusterAttributes.clusterName) + && Objects.equals(this.enabledProducts, fleetClusterAttributes.enabledProducts) + && Objects.equals(this.envs, fleetClusterAttributes.envs) + && Objects.equals(this.firstSeenAt, fleetClusterAttributes.firstSeenAt) + && Objects.equals(this.installMethodTool, fleetClusterAttributes.installMethodTool) + && Objects.equals(this.nodeCount, fleetClusterAttributes.nodeCount) + && Objects.equals(this.nodeCountByStatus, fleetClusterAttributes.nodeCountByStatus) + && Objects.equals(this.operatingSystems, fleetClusterAttributes.operatingSystems) + && Objects.equals( + this.otelCollectorDistributions, fleetClusterAttributes.otelCollectorDistributions) + && Objects.equals(this.otelCollectorVersions, fleetClusterAttributes.otelCollectorVersions) + && Objects.equals(this.podCountByState, fleetClusterAttributes.podCountByState) + && Objects.equals(this.services, fleetClusterAttributes.services) + && Objects.equals(this.teams, fleetClusterAttributes.teams) + && Objects.equals(this.additionalProperties, fleetClusterAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + agentVersions, + apiKeyNames, + apiKeyUuids, + cloudProviders, + clusterName, + enabledProducts, + envs, + firstSeenAt, + installMethodTool, + nodeCount, + nodeCountByStatus, + operatingSystems, + otelCollectorDistributions, + otelCollectorVersions, + podCountByState, + services, + teams, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FleetClusterAttributes {\n"); + sb.append(" agentVersions: ").append(toIndentedString(agentVersions)).append("\n"); + sb.append(" apiKeyNames: ").append(toIndentedString(apiKeyNames)).append("\n"); + sb.append(" apiKeyUuids: ").append(toIndentedString(apiKeyUuids)).append("\n"); + sb.append(" cloudProviders: ").append(toIndentedString(cloudProviders)).append("\n"); + sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); + sb.append(" enabledProducts: ").append(toIndentedString(enabledProducts)).append("\n"); + sb.append(" envs: ").append(toIndentedString(envs)).append("\n"); + sb.append(" firstSeenAt: ").append(toIndentedString(firstSeenAt)).append("\n"); + sb.append(" installMethodTool: ").append(toIndentedString(installMethodTool)).append("\n"); + sb.append(" nodeCount: ").append(toIndentedString(nodeCount)).append("\n"); + sb.append(" nodeCountByStatus: ").append(toIndentedString(nodeCountByStatus)).append("\n"); + sb.append(" operatingSystems: ").append(toIndentedString(operatingSystems)).append("\n"); + sb.append(" otelCollectorDistributions: ") + .append(toIndentedString(otelCollectorDistributions)) + .append("\n"); + sb.append(" otelCollectorVersions: ") + .append(toIndentedString(otelCollectorVersions)) + .append("\n"); + sb.append(" podCountByState: ").append(toIndentedString(podCountByState)).append("\n"); + sb.append(" services: ").append(toIndentedString(services)).append("\n"); + sb.append(" teams: ").append(toIndentedString(teams)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetClustersResponse.java b/src/main/java/com/datadog/api/client/v2/model/FleetClustersResponse.java new file mode 100644 index 00000000000..0d7d7929f34 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetClustersResponse.java @@ -0,0 +1,175 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing a paginated list of fleet clusters. */ +@JsonPropertyOrder({ + FleetClustersResponse.JSON_PROPERTY_DATA, + FleetClustersResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FleetClustersResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private FleetClustersResponseData data; + + public static final String JSON_PROPERTY_META = "meta"; + private FleetClustersResponseMeta meta; + + public FleetClustersResponse() {} + + @JsonCreator + public FleetClustersResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) FleetClustersResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public FleetClustersResponse data(FleetClustersResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The response data containing status and clusters array. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FleetClustersResponseData getData() { + return data; + } + + public void setData(FleetClustersResponseData data) { + this.data = data; + } + + public FleetClustersResponse meta(FleetClustersResponseMeta meta) { + this.meta = meta; + this.unparsed |= meta.unparsed; + return this; + } + + /** + * Metadata for the list of clusters response. + * + * @return meta + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FleetClustersResponseMeta getMeta() { + return meta; + } + + public void setMeta(FleetClustersResponseMeta 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 FleetClustersResponse + */ + @JsonAnySetter + public FleetClustersResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FleetClustersResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FleetClustersResponse fleetClustersResponse = (FleetClustersResponse) o; + return Objects.equals(this.data, fleetClustersResponse.data) + && Objects.equals(this.meta, fleetClustersResponse.meta) + && Objects.equals(this.additionalProperties, fleetClustersResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FleetClustersResponse {\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/FleetClustersResponseData.java b/src/main/java/com/datadog/api/client/v2/model/FleetClustersResponseData.java new file mode 100644 index 00000000000..c30b86cc1eb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetClustersResponseData.java @@ -0,0 +1,205 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +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 clusters array. */ +@JsonPropertyOrder({ + FleetClustersResponseData.JSON_PROPERTY_ATTRIBUTES, + FleetClustersResponseData.JSON_PROPERTY_ID, + FleetClustersResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FleetClustersResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private FleetClustersResponseDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public FleetClustersResponseData() {} + + @JsonCreator + public FleetClustersResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + FleetClustersResponseDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) String type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + } + + public FleetClustersResponseData attributes(FleetClustersResponseDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of the fleet clusters response containing the list of clusters. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FleetClustersResponseDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(FleetClustersResponseDataAttributes attributes) { + this.attributes = attributes; + } + + public FleetClustersResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Status 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 FleetClustersResponseData type(String type) { + this.type = type; + return this; + } + + /** + * Resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + 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 FleetClustersResponseData + */ + @JsonAnySetter + public FleetClustersResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FleetClustersResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FleetClustersResponseData fleetClustersResponseData = (FleetClustersResponseData) o; + return Objects.equals(this.attributes, fleetClustersResponseData.attributes) + && Objects.equals(this.id, fleetClustersResponseData.id) + && Objects.equals(this.type, fleetClustersResponseData.type) + && Objects.equals( + this.additionalProperties, fleetClustersResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FleetClustersResponseData {\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/FleetClustersResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FleetClustersResponseDataAttributes.java new file mode 100644 index 00000000000..2e87eccbb5a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetClustersResponseDataAttributes.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; + +/** Attributes of the fleet clusters response containing the list of clusters. */ +@JsonPropertyOrder({FleetClustersResponseDataAttributes.JSON_PROPERTY_CLUSTERS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FleetClustersResponseDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CLUSTERS = "clusters"; + private List clusters = null; + + public FleetClustersResponseDataAttributes clusters(List clusters) { + this.clusters = clusters; + for (FleetClusterAttributes item : clusters) { + this.unparsed |= item.unparsed; + } + return this; + } + + public FleetClustersResponseDataAttributes addClustersItem(FleetClusterAttributes clustersItem) { + if (this.clusters == null) { + this.clusters = new ArrayList<>(); + } + this.clusters.add(clustersItem); + this.unparsed |= clustersItem.unparsed; + return this; + } + + /** + * Array of clusters matching the query criteria. + * + * @return clusters + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CLUSTERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getClusters() { + return clusters; + } + + public void setClusters(List clusters) { + this.clusters = clusters; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FleetClustersResponseDataAttributes + */ + @JsonAnySetter + public FleetClustersResponseDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FleetClustersResponseDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FleetClustersResponseDataAttributes fleetClustersResponseDataAttributes = + (FleetClustersResponseDataAttributes) o; + return Objects.equals(this.clusters, fleetClustersResponseDataAttributes.clusters) + && Objects.equals( + this.additionalProperties, fleetClustersResponseDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(clusters, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FleetClustersResponseDataAttributes {\n"); + sb.append(" clusters: ").append(toIndentedString(clusters)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetClustersResponseMeta.java b/src/main/java/com/datadog/api/client/v2/model/FleetClustersResponseMeta.java new file mode 100644 index 00000000000..de5e2abbba6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetClustersResponseMeta.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; + +/** Metadata for the list of clusters response. */ +@JsonPropertyOrder({FleetClustersResponseMeta.JSON_PROPERTY_TOTAL_FILTERED_COUNT}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FleetClustersResponseMeta { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_TOTAL_FILTERED_COUNT = "total_filtered_count"; + private Long totalFilteredCount; + + public FleetClustersResponseMeta totalFilteredCount(Long totalFilteredCount) { + this.totalFilteredCount = totalFilteredCount; + return this; + } + + /** + * Total number of clusters 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 FleetClustersResponseMeta + */ + @JsonAnySetter + public FleetClustersResponseMeta putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FleetClustersResponseMeta object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FleetClustersResponseMeta fleetClustersResponseMeta = (FleetClustersResponseMeta) o; + return Objects.equals(this.totalFilteredCount, fleetClustersResponseMeta.totalFilteredCount) + && Objects.equals( + this.additionalProperties, fleetClustersResponseMeta.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(totalFilteredCount, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FleetClustersResponseMeta {\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/FleetInstrumentedPodGroupAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FleetInstrumentedPodGroupAttributes.java new file mode 100644 index 00000000000..d60635b7568 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetInstrumentedPodGroupAttributes.java @@ -0,0 +1,445 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a group of instrumented pods targeted for SSI injection. */ +@JsonPropertyOrder({ + FleetInstrumentedPodGroupAttributes.JSON_PROPERTY_APPLIED_TARGET, + FleetInstrumentedPodGroupAttributes.JSON_PROPERTY_APPLIED_TARGET_NAME, + FleetInstrumentedPodGroupAttributes.JSON_PROPERTY_INJECTED_TAGS, + FleetInstrumentedPodGroupAttributes.JSON_PROPERTY_KUBE_OWNERREF_KIND, + FleetInstrumentedPodGroupAttributes.JSON_PROPERTY_KUBE_OWNERREF_NAME, + FleetInstrumentedPodGroupAttributes.JSON_PROPERTY_LIB_INJECTION_ANNOTATIONS, + FleetInstrumentedPodGroupAttributes.JSON_PROPERTY_NAMESPACE, + FleetInstrumentedPodGroupAttributes.JSON_PROPERTY_POD_COUNT, + FleetInstrumentedPodGroupAttributes.JSON_PROPERTY_POD_NAMES, + FleetInstrumentedPodGroupAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FleetInstrumentedPodGroupAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_APPLIED_TARGET = "applied_target"; + private Map appliedTarget = null; + + public static final String JSON_PROPERTY_APPLIED_TARGET_NAME = "applied_target_name"; + private String appliedTargetName; + + public static final String JSON_PROPERTY_INJECTED_TAGS = "injected_tags"; + private List injectedTags = null; + + public static final String JSON_PROPERTY_KUBE_OWNERREF_KIND = "kube_ownerref_kind"; + private String kubeOwnerrefKind; + + public static final String JSON_PROPERTY_KUBE_OWNERREF_NAME = "kube_ownerref_name"; + private String kubeOwnerrefName; + + public static final String JSON_PROPERTY_LIB_INJECTION_ANNOTATIONS = "lib_injection_annotations"; + private List libInjectionAnnotations = null; + + public static final String JSON_PROPERTY_NAMESPACE = "namespace"; + private String namespace; + + public static final String JSON_PROPERTY_POD_COUNT = "pod_count"; + private Long podCount; + + public static final String JSON_PROPERTY_POD_NAMES = "pod_names"; + private List podNames = null; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private Map tags = null; + + public FleetInstrumentedPodGroupAttributes appliedTarget(Map appliedTarget) { + this.appliedTarget = appliedTarget; + return this; + } + + public FleetInstrumentedPodGroupAttributes putAppliedTargetItem( + String key, Object appliedTargetItem) { + if (this.appliedTarget == null) { + this.appliedTarget = new HashMap<>(); + } + this.appliedTarget.put(key, appliedTargetItem); + return this; + } + + /** + * The SSI injection target configuration applied to the pod group. + * + * @return appliedTarget + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPLIED_TARGET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getAppliedTarget() { + return appliedTarget; + } + + public void setAppliedTarget(Map appliedTarget) { + this.appliedTarget = appliedTarget; + } + + public FleetInstrumentedPodGroupAttributes appliedTargetName(String appliedTargetName) { + this.appliedTargetName = appliedTargetName; + return this; + } + + /** + * The name of the applied SSI injection target. + * + * @return appliedTargetName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_APPLIED_TARGET_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAppliedTargetName() { + return appliedTargetName; + } + + public void setAppliedTargetName(String appliedTargetName) { + this.appliedTargetName = appliedTargetName; + } + + public FleetInstrumentedPodGroupAttributes injectedTags(List injectedTags) { + this.injectedTags = injectedTags; + return this; + } + + public FleetInstrumentedPodGroupAttributes addInjectedTagsItem(String injectedTagsItem) { + if (this.injectedTags == null) { + this.injectedTags = new ArrayList<>(); + } + this.injectedTags.add(injectedTagsItem); + return this; + } + + /** + * Tags injected into the pods by the Admission Controller. + * + * @return injectedTags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INJECTED_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getInjectedTags() { + return injectedTags; + } + + public void setInjectedTags(List injectedTags) { + this.injectedTags = injectedTags; + } + + public FleetInstrumentedPodGroupAttributes kubeOwnerrefKind(String kubeOwnerrefKind) { + this.kubeOwnerrefKind = kubeOwnerrefKind; + return this; + } + + /** + * The kind of the Kubernetes owner reference. + * + * @return kubeOwnerrefKind + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KUBE_OWNERREF_KIND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getKubeOwnerrefKind() { + return kubeOwnerrefKind; + } + + public void setKubeOwnerrefKind(String kubeOwnerrefKind) { + this.kubeOwnerrefKind = kubeOwnerrefKind; + } + + public FleetInstrumentedPodGroupAttributes kubeOwnerrefName(String kubeOwnerrefName) { + this.kubeOwnerrefName = kubeOwnerrefName; + return this; + } + + /** + * The name of the Kubernetes owner reference (deployment, statefulset, etc.). + * + * @return kubeOwnerrefName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KUBE_OWNERREF_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getKubeOwnerrefName() { + return kubeOwnerrefName; + } + + public void setKubeOwnerrefName(String kubeOwnerrefName) { + this.kubeOwnerrefName = kubeOwnerrefName; + } + + public FleetInstrumentedPodGroupAttributes libInjectionAnnotations( + List libInjectionAnnotations) { + this.libInjectionAnnotations = libInjectionAnnotations; + return this; + } + + public FleetInstrumentedPodGroupAttributes addLibInjectionAnnotationsItem( + String libInjectionAnnotationsItem) { + if (this.libInjectionAnnotations == null) { + this.libInjectionAnnotations = new ArrayList<>(); + } + this.libInjectionAnnotations.add(libInjectionAnnotationsItem); + return this; + } + + /** + * Library injection annotations on the pod group. + * + * @return libInjectionAnnotations + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIB_INJECTION_ANNOTATIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getLibInjectionAnnotations() { + return libInjectionAnnotations; + } + + public void setLibInjectionAnnotations(List libInjectionAnnotations) { + this.libInjectionAnnotations = libInjectionAnnotations; + } + + public FleetInstrumentedPodGroupAttributes namespace(String namespace) { + this.namespace = namespace; + return this; + } + + /** + * The Kubernetes namespace of the pod group. + * + * @return namespace + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAMESPACE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNamespace() { + return namespace; + } + + public void setNamespace(String namespace) { + this.namespace = namespace; + } + + public FleetInstrumentedPodGroupAttributes podCount(Long podCount) { + this.podCount = podCount; + return this; + } + + /** + * Total number of pods in the group. + * + * @return podCount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POD_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getPodCount() { + return podCount; + } + + public void setPodCount(Long podCount) { + this.podCount = podCount; + } + + public FleetInstrumentedPodGroupAttributes podNames(List podNames) { + this.podNames = podNames; + return this; + } + + public FleetInstrumentedPodGroupAttributes addPodNamesItem(String podNamesItem) { + if (this.podNames == null) { + this.podNames = new ArrayList<>(); + } + this.podNames.add(podNamesItem); + return this; + } + + /** + * Names of the individual pods in the group. + * + * @return podNames + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POD_NAMES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getPodNames() { + return podNames; + } + + public void setPodNames(List podNames) { + this.podNames = podNames; + } + + public FleetInstrumentedPodGroupAttributes tags(Map tags) { + this.tags = tags; + return this; + } + + public FleetInstrumentedPodGroupAttributes putTagsItem(String key, String tagsItem) { + if (this.tags == null) { + this.tags = new HashMap<>(); + } + this.tags.put(key, tagsItem); + return this; + } + + /** + * Additional tags associated with the pod group. + * + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getTags() { + return tags; + } + + public void setTags(Map tags) { + this.tags = tags; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FleetInstrumentedPodGroupAttributes + */ + @JsonAnySetter + public FleetInstrumentedPodGroupAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FleetInstrumentedPodGroupAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FleetInstrumentedPodGroupAttributes fleetInstrumentedPodGroupAttributes = + (FleetInstrumentedPodGroupAttributes) o; + return Objects.equals(this.appliedTarget, fleetInstrumentedPodGroupAttributes.appliedTarget) + && Objects.equals( + this.appliedTargetName, fleetInstrumentedPodGroupAttributes.appliedTargetName) + && Objects.equals(this.injectedTags, fleetInstrumentedPodGroupAttributes.injectedTags) + && Objects.equals( + this.kubeOwnerrefKind, fleetInstrumentedPodGroupAttributes.kubeOwnerrefKind) + && Objects.equals( + this.kubeOwnerrefName, fleetInstrumentedPodGroupAttributes.kubeOwnerrefName) + && Objects.equals( + this.libInjectionAnnotations, + fleetInstrumentedPodGroupAttributes.libInjectionAnnotations) + && Objects.equals(this.namespace, fleetInstrumentedPodGroupAttributes.namespace) + && Objects.equals(this.podCount, fleetInstrumentedPodGroupAttributes.podCount) + && Objects.equals(this.podNames, fleetInstrumentedPodGroupAttributes.podNames) + && Objects.equals(this.tags, fleetInstrumentedPodGroupAttributes.tags) + && Objects.equals( + this.additionalProperties, fleetInstrumentedPodGroupAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + appliedTarget, + appliedTargetName, + injectedTags, + kubeOwnerrefKind, + kubeOwnerrefName, + libInjectionAnnotations, + namespace, + podCount, + podNames, + tags, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FleetInstrumentedPodGroupAttributes {\n"); + sb.append(" appliedTarget: ").append(toIndentedString(appliedTarget)).append("\n"); + sb.append(" appliedTargetName: ").append(toIndentedString(appliedTargetName)).append("\n"); + sb.append(" injectedTags: ").append(toIndentedString(injectedTags)).append("\n"); + sb.append(" kubeOwnerrefKind: ").append(toIndentedString(kubeOwnerrefKind)).append("\n"); + sb.append(" kubeOwnerrefName: ").append(toIndentedString(kubeOwnerrefName)).append("\n"); + sb.append(" libInjectionAnnotations: ") + .append(toIndentedString(libInjectionAnnotations)) + .append("\n"); + sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); + sb.append(" podCount: ").append(toIndentedString(podCount)).append("\n"); + sb.append(" podNames: ").append(toIndentedString(podNames)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetInstrumentedPodsResponse.java b/src/main/java/com/datadog/api/client/v2/model/FleetInstrumentedPodsResponse.java new file mode 100644 index 00000000000..1991e4bcd53 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetInstrumentedPodsResponse.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing instrumented pods for a Kubernetes cluster. */ +@JsonPropertyOrder({FleetInstrumentedPodsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FleetInstrumentedPodsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private FleetInstrumentedPodsResponseData data; + + public FleetInstrumentedPodsResponse() {} + + @JsonCreator + public FleetInstrumentedPodsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + FleetInstrumentedPodsResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public FleetInstrumentedPodsResponse data(FleetInstrumentedPodsResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The response data containing the cluster name and instrumented pod groups. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FleetInstrumentedPodsResponseData getData() { + return data; + } + + public void setData(FleetInstrumentedPodsResponseData 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 FleetInstrumentedPodsResponse + */ + @JsonAnySetter + public FleetInstrumentedPodsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FleetInstrumentedPodsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FleetInstrumentedPodsResponse fleetInstrumentedPodsResponse = (FleetInstrumentedPodsResponse) o; + return Objects.equals(this.data, fleetInstrumentedPodsResponse.data) + && Objects.equals( + this.additionalProperties, fleetInstrumentedPodsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FleetInstrumentedPodsResponse {\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/FleetInstrumentedPodsResponseData.java b/src/main/java/com/datadog/api/client/v2/model/FleetInstrumentedPodsResponseData.java new file mode 100644 index 00000000000..76d6d9300b6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetInstrumentedPodsResponseData.java @@ -0,0 +1,207 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The response data containing the cluster name and instrumented pod groups. */ +@JsonPropertyOrder({ + FleetInstrumentedPodsResponseData.JSON_PROPERTY_ATTRIBUTES, + FleetInstrumentedPodsResponseData.JSON_PROPERTY_ID, + FleetInstrumentedPodsResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FleetInstrumentedPodsResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private FleetInstrumentedPodsResponseDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public FleetInstrumentedPodsResponseData() {} + + @JsonCreator + public FleetInstrumentedPodsResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + FleetInstrumentedPodsResponseDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) String type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + } + + public FleetInstrumentedPodsResponseData attributes( + FleetInstrumentedPodsResponseDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of the instrumented pods response containing the list of pod groups. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FleetInstrumentedPodsResponseDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(FleetInstrumentedPodsResponseDataAttributes attributes) { + this.attributes = attributes; + } + + public FleetInstrumentedPodsResponseData id(String id) { + this.id = id; + return this; + } + + /** + * The cluster name 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 FleetInstrumentedPodsResponseData type(String type) { + this.type = type; + return this; + } + + /** + * Resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + 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 FleetInstrumentedPodsResponseData + */ + @JsonAnySetter + public FleetInstrumentedPodsResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FleetInstrumentedPodsResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FleetInstrumentedPodsResponseData fleetInstrumentedPodsResponseData = + (FleetInstrumentedPodsResponseData) o; + return Objects.equals(this.attributes, fleetInstrumentedPodsResponseData.attributes) + && Objects.equals(this.id, fleetInstrumentedPodsResponseData.id) + && Objects.equals(this.type, fleetInstrumentedPodsResponseData.type) + && Objects.equals( + this.additionalProperties, fleetInstrumentedPodsResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FleetInstrumentedPodsResponseData {\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/FleetInstrumentedPodsResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FleetInstrumentedPodsResponseDataAttributes.java new file mode 100644 index 00000000000..e43732f041d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetInstrumentedPodsResponseDataAttributes.java @@ -0,0 +1,155 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of the instrumented pods response containing the list of pod groups. */ +@JsonPropertyOrder({FleetInstrumentedPodsResponseDataAttributes.JSON_PROPERTY_GROUPS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FleetInstrumentedPodsResponseDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_GROUPS = "groups"; + private List groups = null; + + public FleetInstrumentedPodsResponseDataAttributes groups( + List groups) { + this.groups = groups; + for (FleetInstrumentedPodGroupAttributes item : groups) { + this.unparsed |= item.unparsed; + } + return this; + } + + public FleetInstrumentedPodsResponseDataAttributes addGroupsItem( + FleetInstrumentedPodGroupAttributes groupsItem) { + if (this.groups == null) { + this.groups = new ArrayList<>(); + } + this.groups.add(groupsItem); + this.unparsed |= groupsItem.unparsed; + return this; + } + + /** + * Array of instrumented pod groups in the cluster. + * + * @return groups + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GROUPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getGroups() { + return groups; + } + + public void setGroups(List groups) { + this.groups = groups; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FleetInstrumentedPodsResponseDataAttributes + */ + @JsonAnySetter + public FleetInstrumentedPodsResponseDataAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FleetInstrumentedPodsResponseDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FleetInstrumentedPodsResponseDataAttributes fleetInstrumentedPodsResponseDataAttributes = + (FleetInstrumentedPodsResponseDataAttributes) o; + return Objects.equals(this.groups, fleetInstrumentedPodsResponseDataAttributes.groups) + && Objects.equals( + this.additionalProperties, + fleetInstrumentedPodsResponseDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(groups, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FleetInstrumentedPodsResponseDataAttributes {\n"); + sb.append(" groups: ").append(toIndentedString(groups)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetTracerAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FleetTracerAttributes.java new file mode 100644 index 00000000000..b3151bba816 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetTracerAttributes.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; + +/** Attributes of a fleet tracer representing a service instance reporting telemetry. */ +@JsonPropertyOrder({ + FleetTracerAttributes.JSON_PROPERTY_ENV, + FleetTracerAttributes.JSON_PROPERTY_HOSTNAME, + FleetTracerAttributes.JSON_PROPERTY_LANGUAGE, + FleetTracerAttributes.JSON_PROPERTY_LANGUAGE_VERSION, + FleetTracerAttributes.JSON_PROPERTY_REMOTE_CONFIG_STATUS, + FleetTracerAttributes.JSON_PROPERTY_RUNTIME_IDS, + FleetTracerAttributes.JSON_PROPERTY_SERVICE, + FleetTracerAttributes.JSON_PROPERTY_SERVICE_HOSTNAME, + FleetTracerAttributes.JSON_PROPERTY_SERVICE_VERSION, + FleetTracerAttributes.JSON_PROPERTY_TRACER_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FleetTracerAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENV = "env"; + private String env; + + public static final String JSON_PROPERTY_HOSTNAME = "hostname"; + private String hostname; + + public static final String JSON_PROPERTY_LANGUAGE = "language"; + private String language; + + public static final String JSON_PROPERTY_LANGUAGE_VERSION = "language_version"; + private String languageVersion; + + public static final String JSON_PROPERTY_REMOTE_CONFIG_STATUS = "remote_config_status"; + private String remoteConfigStatus; + + public static final String JSON_PROPERTY_RUNTIME_IDS = "runtime_ids"; + private List runtimeIds = null; + + public static final String JSON_PROPERTY_SERVICE = "service"; + private String service; + + public static final String JSON_PROPERTY_SERVICE_HOSTNAME = "service_hostname"; + private String serviceHostname; + + public static final String JSON_PROPERTY_SERVICE_VERSION = "service_version"; + private String serviceVersion; + + public static final String JSON_PROPERTY_TRACER_VERSION = "tracer_version"; + private String tracerVersion; + + public FleetTracerAttributes env(String env) { + this.env = env; + return this; + } + + /** + * The environment the tracer is reporting from. + * + * @return env + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENV) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEnv() { + return env; + } + + public void setEnv(String env) { + this.env = env; + } + + public FleetTracerAttributes hostname(String hostname) { + this.hostname = hostname; + return this; + } + + /** + * The hostname where the tracer is running. + * + * @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 FleetTracerAttributes language(String language) { + this.language = language; + return this; + } + + /** + * The programming language of the traced application. + * + * @return language + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LANGUAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLanguage() { + return language; + } + + public void setLanguage(String language) { + this.language = language; + } + + public FleetTracerAttributes languageVersion(String languageVersion) { + this.languageVersion = languageVersion; + return this; + } + + /** + * The version of the programming language runtime. + * + * @return languageVersion + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LANGUAGE_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLanguageVersion() { + return languageVersion; + } + + public void setLanguageVersion(String languageVersion) { + this.languageVersion = languageVersion; + } + + public FleetTracerAttributes remoteConfigStatus(String remoteConfigStatus) { + this.remoteConfigStatus = remoteConfigStatus; + return this; + } + + /** + * The remote configuration status of the tracer. + * + * @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 FleetTracerAttributes runtimeIds(List runtimeIds) { + this.runtimeIds = runtimeIds; + return this; + } + + public FleetTracerAttributes addRuntimeIdsItem(String runtimeIdsItem) { + if (this.runtimeIds == null) { + this.runtimeIds = new ArrayList<>(); + } + this.runtimeIds.add(runtimeIdsItem); + return this; + } + + /** + * Runtime identifiers for the tracer instances. + * + * @return runtimeIds + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RUNTIME_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getRuntimeIds() { + return runtimeIds; + } + + public void setRuntimeIds(List runtimeIds) { + this.runtimeIds = runtimeIds; + } + + public FleetTracerAttributes service(String service) { + this.service = service; + return this; + } + + /** + * The telemetry-derived service name reported by the tracer. + * + * @return service + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getService() { + return service; + } + + public void setService(String service) { + this.service = service; + } + + public FleetTracerAttributes serviceHostname(String serviceHostname) { + this.serviceHostname = serviceHostname; + return this; + } + + /** + * The service hostname reported by the tracer. + * + * @return serviceHostname + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICE_HOSTNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getServiceHostname() { + return serviceHostname; + } + + public void setServiceHostname(String serviceHostname) { + this.serviceHostname = serviceHostname; + } + + public FleetTracerAttributes serviceVersion(String serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /** + * The version of the traced service. + * + * @return serviceVersion + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICE_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getServiceVersion() { + return serviceVersion; + } + + public void setServiceVersion(String serviceVersion) { + this.serviceVersion = serviceVersion; + } + + public FleetTracerAttributes tracerVersion(String tracerVersion) { + this.tracerVersion = tracerVersion; + return this; + } + + /** + * The version of the Datadog tracer library. + * + * @return tracerVersion + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRACER_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTracerVersion() { + return tracerVersion; + } + + public void setTracerVersion(String tracerVersion) { + this.tracerVersion = tracerVersion; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FleetTracerAttributes + */ + @JsonAnySetter + public FleetTracerAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FleetTracerAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FleetTracerAttributes fleetTracerAttributes = (FleetTracerAttributes) o; + return Objects.equals(this.env, fleetTracerAttributes.env) + && Objects.equals(this.hostname, fleetTracerAttributes.hostname) + && Objects.equals(this.language, fleetTracerAttributes.language) + && Objects.equals(this.languageVersion, fleetTracerAttributes.languageVersion) + && Objects.equals(this.remoteConfigStatus, fleetTracerAttributes.remoteConfigStatus) + && Objects.equals(this.runtimeIds, fleetTracerAttributes.runtimeIds) + && Objects.equals(this.service, fleetTracerAttributes.service) + && Objects.equals(this.serviceHostname, fleetTracerAttributes.serviceHostname) + && Objects.equals(this.serviceVersion, fleetTracerAttributes.serviceVersion) + && Objects.equals(this.tracerVersion, fleetTracerAttributes.tracerVersion) + && Objects.equals(this.additionalProperties, fleetTracerAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + env, + hostname, + language, + languageVersion, + remoteConfigStatus, + runtimeIds, + service, + serviceHostname, + serviceVersion, + tracerVersion, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FleetTracerAttributes {\n"); + sb.append(" env: ").append(toIndentedString(env)).append("\n"); + sb.append(" hostname: ").append(toIndentedString(hostname)).append("\n"); + sb.append(" language: ").append(toIndentedString(language)).append("\n"); + sb.append(" languageVersion: ").append(toIndentedString(languageVersion)).append("\n"); + sb.append(" remoteConfigStatus: ").append(toIndentedString(remoteConfigStatus)).append("\n"); + sb.append(" runtimeIds: ").append(toIndentedString(runtimeIds)).append("\n"); + sb.append(" service: ").append(toIndentedString(service)).append("\n"); + sb.append(" serviceHostname: ").append(toIndentedString(serviceHostname)).append("\n"); + sb.append(" serviceVersion: ").append(toIndentedString(serviceVersion)).append("\n"); + sb.append(" tracerVersion: ").append(toIndentedString(tracerVersion)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetTracersResponse.java b/src/main/java/com/datadog/api/client/v2/model/FleetTracersResponse.java new file mode 100644 index 00000000000..b0f49f21aef --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetTracersResponse.java @@ -0,0 +1,175 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing a paginated list of fleet tracers. */ +@JsonPropertyOrder({ + FleetTracersResponse.JSON_PROPERTY_DATA, + FleetTracersResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FleetTracersResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private FleetTracersResponseData data; + + public static final String JSON_PROPERTY_META = "meta"; + private FleetTracersResponseMeta meta; + + public FleetTracersResponse() {} + + @JsonCreator + public FleetTracersResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) FleetTracersResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public FleetTracersResponse data(FleetTracersResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The response data containing status and tracers array. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FleetTracersResponseData getData() { + return data; + } + + public void setData(FleetTracersResponseData data) { + this.data = data; + } + + public FleetTracersResponse meta(FleetTracersResponseMeta meta) { + this.meta = meta; + this.unparsed |= meta.unparsed; + return this; + } + + /** + * Metadata for the list of tracers response. + * + * @return meta + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public FleetTracersResponseMeta getMeta() { + return meta; + } + + public void setMeta(FleetTracersResponseMeta 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 FleetTracersResponse + */ + @JsonAnySetter + public FleetTracersResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FleetTracersResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FleetTracersResponse fleetTracersResponse = (FleetTracersResponse) o; + return Objects.equals(this.data, fleetTracersResponse.data) + && Objects.equals(this.meta, fleetTracersResponse.meta) + && Objects.equals(this.additionalProperties, fleetTracersResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FleetTracersResponse {\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/FleetTracersResponseData.java b/src/main/java/com/datadog/api/client/v2/model/FleetTracersResponseData.java new file mode 100644 index 00000000000..22696136468 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetTracersResponseData.java @@ -0,0 +1,204 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The response data containing status and tracers array. */ +@JsonPropertyOrder({ + FleetTracersResponseData.JSON_PROPERTY_ATTRIBUTES, + FleetTracersResponseData.JSON_PROPERTY_ID, + FleetTracersResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FleetTracersResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private FleetTracersResponseDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private String type; + + public FleetTracersResponseData() {} + + @JsonCreator + public FleetTracersResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + FleetTracersResponseDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) String type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + } + + public FleetTracersResponseData attributes(FleetTracersResponseDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of the fleet tracers response containing the list of tracers. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public FleetTracersResponseDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(FleetTracersResponseDataAttributes attributes) { + this.attributes = attributes; + } + + public FleetTracersResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Status 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 FleetTracersResponseData type(String type) { + this.type = type; + return this; + } + + /** + * Resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + 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 FleetTracersResponseData + */ + @JsonAnySetter + public FleetTracersResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FleetTracersResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FleetTracersResponseData fleetTracersResponseData = (FleetTracersResponseData) o; + return Objects.equals(this.attributes, fleetTracersResponseData.attributes) + && Objects.equals(this.id, fleetTracersResponseData.id) + && Objects.equals(this.type, fleetTracersResponseData.type) + && Objects.equals(this.additionalProperties, fleetTracersResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FleetTracersResponseData {\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/FleetTracersResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/FleetTracersResponseDataAttributes.java new file mode 100644 index 00000000000..0e6745cdbca --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetTracersResponseDataAttributes.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; + +/** Attributes of the fleet tracers response containing the list of tracers. */ +@JsonPropertyOrder({FleetTracersResponseDataAttributes.JSON_PROPERTY_TRACERS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FleetTracersResponseDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_TRACERS = "tracers"; + private List tracers = null; + + public FleetTracersResponseDataAttributes tracers(List tracers) { + this.tracers = tracers; + for (FleetTracerAttributes item : tracers) { + this.unparsed |= item.unparsed; + } + return this; + } + + public FleetTracersResponseDataAttributes addTracersItem(FleetTracerAttributes tracersItem) { + if (this.tracers == null) { + this.tracers = new ArrayList<>(); + } + this.tracers.add(tracersItem); + this.unparsed |= tracersItem.unparsed; + return this; + } + + /** + * Array of tracers matching the query criteria. + * + * @return tracers + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRACERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTracers() { + return tracers; + } + + public void setTracers(List tracers) { + this.tracers = tracers; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return FleetTracersResponseDataAttributes + */ + @JsonAnySetter + public FleetTracersResponseDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FleetTracersResponseDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FleetTracersResponseDataAttributes fleetTracersResponseDataAttributes = + (FleetTracersResponseDataAttributes) o; + return Objects.equals(this.tracers, fleetTracersResponseDataAttributes.tracers) + && Objects.equals( + this.additionalProperties, fleetTracersResponseDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(tracers, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FleetTracersResponseDataAttributes {\n"); + sb.append(" tracers: ").append(toIndentedString(tracers)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/FleetTracersResponseMeta.java b/src/main/java/com/datadog/api/client/v2/model/FleetTracersResponseMeta.java new file mode 100644 index 00000000000..005a643f9bc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/FleetTracersResponseMeta.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 tracers response. */ +@JsonPropertyOrder({FleetTracersResponseMeta.JSON_PROPERTY_TOTAL_FILTERED_COUNT}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class FleetTracersResponseMeta { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_TOTAL_FILTERED_COUNT = "total_filtered_count"; + private Long totalFilteredCount; + + public FleetTracersResponseMeta totalFilteredCount(Long totalFilteredCount) { + this.totalFilteredCount = totalFilteredCount; + return this; + } + + /** + * Total number of tracers 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 FleetTracersResponseMeta + */ + @JsonAnySetter + public FleetTracersResponseMeta putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this FleetTracersResponseMeta object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FleetTracersResponseMeta fleetTracersResponseMeta = (FleetTracersResponseMeta) o; + return Objects.equals(this.totalFilteredCount, fleetTracersResponseMeta.totalFilteredCount) + && Objects.equals(this.additionalProperties, fleetTracersResponseMeta.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(totalFilteredCount, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FleetTracersResponseMeta {\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/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 b21fe22c60f..3cc13c4aca3 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/fleet_automation.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/fleet_automation.feature @@ -232,6 +232,48 @@ Feature: Fleet Automation When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/fleet-automation + Scenario: List all fleet clusters returns "Bad Request" response + Given operation "ListFleetClusters" enabled + And new "ListFleetClusters" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/fleet-automation + Scenario: List all fleet clusters returns "Not Found" response + Given operation "ListFleetClusters" enabled + And new "ListFleetClusters" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/fleet-automation + Scenario: List all fleet clusters returns "OK" response + Given operation "ListFleetClusters" enabled + And new "ListFleetClusters" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/fleet-automation + Scenario: List all fleet tracers returns "Bad Request" response + Given operation "ListFleetTracers" enabled + And new "ListFleetTracers" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/fleet-automation + Scenario: List all fleet tracers returns "Not Found" response + Given operation "ListFleetTracers" enabled + And new "ListFleetTracers" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/fleet-automation + Scenario: List all fleet tracers returns "OK" response + Given operation "ListFleetTracers" enabled + And new "ListFleetTracers" request + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/fleet-automation Scenario: List all schedules returns "Bad Request" response Given operation "ListFleetSchedules" enabled @@ -246,6 +288,54 @@ Feature: Fleet Automation When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/fleet-automation + Scenario: List instrumented pods for a cluster returns "Bad Request" response + Given operation "ListFleetInstrumentedPods" enabled + And new "ListFleetInstrumentedPods" request + And request contains "cluster_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/fleet-automation + Scenario: List instrumented pods for a cluster returns "Not Found" response + Given operation "ListFleetInstrumentedPods" enabled + And new "ListFleetInstrumentedPods" request + And request contains "cluster_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/fleet-automation + Scenario: List instrumented pods for a cluster returns "OK" response + Given operation "ListFleetInstrumentedPods" enabled + And new "ListFleetInstrumentedPods" request + And request contains "cluster_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/fleet-automation + Scenario: List tracers for a specific agent returns "Bad Request" response + Given operation "ListFleetAgentTracers" enabled + And new "ListFleetAgentTracers" 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: List tracers for a specific agent returns "Not Found" response + Given operation "ListFleetAgentTracers" enabled + And new "ListFleetAgentTracers" 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: List tracers for a specific agent returns "OK" response + Given operation "ListFleetAgentTracers" enabled + And new "ListFleetAgentTracers" 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: Trigger a schedule deployment returns "Bad Request" response Given operation "TriggerFleetSchedule" 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 bb84d5c5e03..02b5c2d4c59 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 @@ -17,6 +17,24 @@ "type": "safe" } }, + "ListFleetAgentTracers": { + "tag": "Fleet Automation", + "undo": { + "type": "safe" + } + }, + "ListFleetClusters": { + "tag": "Fleet Automation", + "undo": { + "type": "safe" + } + }, + "ListFleetInstrumentedPods": { + "tag": "Fleet Automation", + "undo": { + "type": "safe" + } + }, "ListFleetDeployments": { "tag": "Fleet Automation", "undo": { @@ -111,6 +129,12 @@ "type": "unsafe" } }, + "ListFleetTracers": { + "tag": "Fleet Automation", + "undo": { + "type": "safe" + } + }, "ListDatastores": { "tag": "Actions Datastores", "undo": {