---
title: Pool Models
slug: devicepark/sdk-documentation/pools/pool-models
description: Reference every public Java, Node.js and .NET pool type used by SDK version 1.0.1.
docTags: 
createdAt: 2026-08-10T08:03:45.197Z
---

The Pools SDK surface contains listing, creation, deletion and device-membership operations. Use this page when implementing typed wrappers, shared test utilities or generated integration code.

For executable examples, see [List Pools](docId\:fmKLq2CPwGu4aurSboUFg) and [Manage Pools](docId\:ObX8hTXvKifuvFe9uTuit).

## Type Map

| Purpose                | Java                        | Node.js                    |
| ---------------------- | --------------------------- | -------------------------- |
| Service                | `PoolsApi`                  | `PoolsApi`                 |
| List request           | `ListPoolsRequest`          | `ListPoolsRequest`         |
| Request builder        | `ListPoolsRequest.Builder`  | `ListPoolsRequestBuilder`  |
| Create request         | `CreatePoolRequest`         | `CreatePoolRequest`        |
| Create request builder | `CreatePoolRequest.Builder` | `CreatePoolRequestBuilder` |
| Filter key             | `PoolFilter`                | `PoolFilter`               |
| Filter rule            | `PoolFilterRequest`         | `PoolFilterRequest`        |
| Pool result            | `Pool`                      | `Pool`                     |
| Paginated result       | `PageDto<Pool>`             | `PageDto<Pool>`            |

## PoolsApi

Obtain the service from the client:

:::CodeblockTabs
```java
PoolsApi poolsApi = client.pools();
```

```typescript
const poolsApi = client.pools();
```

```csharp
var poolsApi = client.Pools;
```
:::

The client memoizes this service. Repeated calls return the same service instance for the client lifetime.

| Java signature                                                    | Node.js signature                                                       | .NET signature                                                                                  |
| ----------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| `PageDto<Pool> list(ListPoolsRequest request)`                    | `list(request?: ListPoolsRequest): Promise<PageDto<Pool>>`              | `ListAsync(ListPoolsRequest? request = null): Task<PageDto<Pool>>`                              |
| Not available                                                     | `listByDefaultPool(request?: ListPoolsRequest): Promise<PageDto<Pool>>` | `ListByDefaultPoolAsync(ListPoolsRequest? request = null): Task<PageDto<Pool>>`                 |
| `Pool getDefaultPool()`                                           | Not available                                                           | `GetDefaultPoolAsync(): Task<Pool>`                                                             |
| `Pool create(CreatePoolRequest request)`                          | `create(request: CreatePoolRequest): Promise<Pool>`                     | `CreateAsync(CreatePoolRequest request): Task<Pool>`                                            |
| `void delete(String poolId)`                                      | `delete(poolId: string): Promise<void>`                                 | `DeleteAsync(string poolId): Task`                                                              |
| `List<String> addDevices(String poolId, List<String> serials)`    | `addDevices(poolId: string, serials: string[]): Promise<string[]>`      | `AddDevicesAsync(string poolId, IReadOnlyList<string> serials): Task<IReadOnlyList<string>>`    |
| `List<String> removeDevices(String poolId, List<String> serials)` | `removeDevices(poolId: string, serials: string[]): Promise<string[]>`   | `RemoveDevicesAsync(string poolId, IReadOnlyList<string> serials): Task<IReadOnlyList<string>>` |

The Java implementation accepts `null` and then creates a default `ListPoolsRequest`. Prefer an explicit builder in customer code so pagination intent remains visible.

## ListPoolsRequest

### Java API

| Member         | Signature                                          | Behavior                                  |
| -------------- | -------------------------------------------------- | ----------------------------------------- |
| Constructor    | `new ListPoolsRequest()`                           | Creates empty filters and default sorting |
| Factory        | `static Builder builder()`                         | Creates a request builder                 |
| Filters getter | `List<PoolFilterRequest> getFilters()`             | Returns an unmodifiable view              |
| Filters setter | `void setFilters(List<PoolFilterRequest> filters)` | Copies the list; `null` becomes empty     |
| Sorting getter | `Sorting getSorting()`                             | Returns current sorting configuration     |
| Sorting setter | `void setSorting(Sorting sorting)`                 | Uses default `Sorting` when `null`        |

### Node.js Shape

```typescript
interface ListPoolsRequest {
  filters: PoolFilterRequest[];
  sorting: Sorting;
}
```

`ListPoolsRequestBuilder.build()` returns copied filter and sorting values so later builder changes do not mutate the built request.

## ListPoolsRequest Builder

| Method                             | Input                  | Result                         |
| ---------------------------------- | ---------------------- | ------------------------------ |
| `page(value)`                      | integer                | Sets zero-based `sorting.page` |
| `size(value)`                      | integer                | Sets `sorting.size`            |
| `sortBy(value)`                    | string                 | Sets `sorting.sortBy`          |
| `direction(value)`                 | `SortDirection`        | Sets `ASC` or `DESC`           |
| `addFilter(key, value, operation)` | Pool filter components | Appends one rule               |
| `filters(rules)`                   | Filter collection      | Replaces all rules             |
| `build()`                          | None                   | Returns `ListPoolsRequest`     |

Default sorting is:

```json
{
  "page": 0,
  "size": 20,
  "sortBy": "ID",
  "direction": "DESC"
}
```

## PoolFilter

SDK version `1.0.1` defines two pool filters:

```text
PoolFilter.NAME
PoolFilter.IS_DEFAULT
```

`NAME` accepts a pool-name string. `IS_DEFAULT` accepts a boolean. Node.js and .NET `listByDefaultPool(...)` apply `IS_DEFAULT = true` automatically. Java `getDefaultPool()` applies the same filter and returns one `Pool`, or throws `IllegalStateException` when no default pool exists. Filter operations are:

- `SearchOperation.EQUAL`
- `SearchOperation.NOT_EQUAL`
- `SearchOperation.GREATER_THAN`
- `SearchOperation.LESS_THAN`

Review the [List Pools filter section](docId\:fmKLq2CPwGu4aurSboUFg) for accepted values and operations.

## PoolFilterRequest

### Java API

| Member                  | Signature                                                                              |
| ----------------------- | -------------------------------------------------------------------------------------- |
| Constructor             | `new PoolFilterRequest()`                                                              |
| Factory                 | `static PoolFilterRequest of(PoolFilter key, Object value, SearchOperation operation)` |
| Key getter/setter       | `getKey()` / `setKey(PoolFilter key)`                                                  |
| Value getter/setter     | `getValue()` / `setValue(Object value)`                                                |
| Operation getter/setter | `getOperation()` / `setOperation(SearchOperation operation)`                           |

### Node.js Shape

```typescript
interface PoolFilterRequest {
  key: (typeof PoolFilter)[keyof typeof PoolFilter];
  value: unknown;
  operation: SearchOperationType;
}
```

## CreatePoolRequest

The request contains one required field:

```typescript
interface CreatePoolRequest {
  name: string;
}
```

```csharp
public sealed class CreatePoolRequest
{
    public string Name { get; }
}
```

The .NET builder validates `Name` during `Build()` and throws `DeviceParkConfigException` when it is blank.

Java creates it with `CreatePoolRequest.builder().name(value).build()`. Node.js uses `new CreatePoolRequestBuilder().name(value).build()`. The Node.js builder and both SDK service methods reject a blank name before sending the request.

## Pool

The result model contains the pool identity and default-pool status:

```typescript
interface Pool {
  id: string | null;
  name: string | null;
  isDefault: boolean | null;
}
```

```csharp
public sealed class Pool
{
    public string? Id { get; }
    public string? Name { get; }
    public bool? IsDefault { get; }
}
```

| Java member                                           | Node.js member         | Meaning                                   |
| ----------------------------------------------------- | ---------------------- | ----------------------------------------- |
| `new Pool(String id, String name, Boolean isDefault)` | Object returned by SDK | Creates the immutable Java value          |
| `String id()`                                         | `pool.id`              | Value passed as allocation `devicePoolId` |
| `String name()`                                       | `pool.name`            | Customer-facing pool name                 |
| `Boolean isDefault()`                                 | `pool.isDefault`       | Whether the pool is a default pool        |

Java `Pool` is immutable and also implements value-based `equals(...)`, `hashCode()` and `toString()`.

`isDefault` is nullable, read-only response metadata. `true` identifies a pool marked as default, `false` identifies a regular pool and `null` means the response did not include that information. The field does not indicate device availability and does not cause the SDK to select the pool automatically. See [Understanding  isDefault](docId\:fmKLq2CPwGu4aurSboUFg) for method behavior and examples.

`Pool` does not contain devices, availability totals or allocation state. Retrieve devices through `client.devices()` and reserve pool capacity through `client.allocations()`.

## Related Operations

- [List Pools](docId\:fmKLq2CPwGu4aurSboUFg)
- [Create, delete and change pool devices](docId\:ObX8hTXvKifuvFe9uTuit)
- [Filter devices by pool](docId\:T2lFRSsG2mhohPOA4K26-)
- [Create an allocation with  devicePoolId](docId\:sPz_N5rutGOmDKrBjbb0L)
