# AtsTypeRef Properties

- Package: [Aspire.TypeSystem](/reference/api/csharp/aspire.typesystem.md)
- Type: [AtsTypeRef](/reference/api/csharp/aspire.typesystem/atstyperef.md)
- Kind: `Properties`
- Members: `15`

Lightweight type reference with category and interface flag. Used for parameter types and return types in capabilities.

## BaseType

- Name: `BaseType`
- Modifiers: `nullable` `get; init`
- Returns: [AtsTypeRef?](/reference/api/csharp/aspire.typesystem/atstyperef.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.TypeSystem/AtsCapabilityInfo.cs)

Gets or sets the immediate base type of this type.

```csharp
public AtsTypeRef? BaseType { get; init; }
```

## Remarks

Pre-computed during type scanning so generators can traverse the type hierarchy from the shared ATS model without performing additional reflection. Currently used by Python code generation when mapping inherited members. Returns `null` for interface types or for types with no relevant base class.

## Category

- Name: `Category`
- Modifiers: `get; set`
- Returns: [AtsTypeCategory](/reference/api/csharp/aspire.typesystem/atstypecategory.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.TypeSystem/AtsCapabilityInfo.cs)

Gets or sets the type category (Primitive, Handle, Dto, Callback, Array, List, Dict, Unknown). Note: This is mutable to allow Pass 2 resolution of Unknown types to Handle.

```csharp
public AtsTypeCategory Category { get; set; }
```

## ClrType

- Name: `ClrType`
- Modifiers: `nullable` `get; init`
- Returns: `Type?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.TypeSystem/AtsCapabilityInfo.cs)

Gets or sets the CLR type reference for direct type access.

```csharp
public Type? ClrType { get; init; }
```

## ElementType

- Name: `ElementType`
- Modifiers: `nullable` `get; init`
- Returns: [AtsTypeRef?](/reference/api/csharp/aspire.typesystem/atstyperef.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.TypeSystem/AtsCapabilityInfo.cs)

Gets or sets the element type reference for Array/List types.

```csharp
public AtsTypeRef? ElementType { get; init; }
```

## ImplementedInterfaces

- Name: `ImplementedInterfaces`
- Modifiers: `get; init`
- Returns: [IReadOnlyList<AtsTypeRef>](/reference/api/csharp/aspire.typesystem/atstyperef.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.TypeSystem/AtsCapabilityInfo.cs)

Gets or sets the interfaces this type implements.

```csharp
public IReadOnlyList<AtsTypeRef> ImplementedInterfaces { get; init; }
```

## Remarks

Pre-computed during type scanning so generators can consume interface information from the shared ATS model without performing additional reflection. Currently used by Python code generation for interface inheritance and capability placement. Only meaningful for Handle category types.

## IsDistributedApplication

- Name: `IsDistributedApplication`
- Modifiers: `get`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.TypeSystem/AtsCapabilityInfo.cs#L86)

Gets whether this type is DistributedApplication.

```csharp
public bool IsDistributedApplication { get; }
```

## IsDistributedApplicationBuilder

- Name: `IsDistributedApplicationBuilder`
- Modifiers: `get`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.TypeSystem/AtsCapabilityInfo.cs#L81)

Gets whether this type is IDistributedApplicationBuilder.

```csharp
public bool IsDistributedApplicationBuilder { get; }
```

## IsInterface

- Name: `IsInterface`
- Modifiers: `get; init`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.TypeSystem/AtsCapabilityInfo.cs)

Gets or sets whether this is an interface type. Only meaningful for Handle category types.

```csharp
public bool IsInterface { get; init; }
```

## IsNullable

- Name: `IsNullable`
- Modifiers: `nullable` `get; init`
- Returns: `bool?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.TypeSystem/AtsCapabilityInfo.cs)

Gets or sets whether this type reference accepts a JSON null value at its current use site.

```csharp
public bool? IsNullable { get; init; }
```

## Remarks

Nullability is attached to the type reference as it appears in a capability or DTO property. Nested element, key, and value type nullability is only represented when those nested references were scanned from member metadata that exposes nullability information. For example, a DTO property declared as

```csharp
string?
```

produces a nullable string type reference, while the same CLR `String` type on a non-nullable property does not.

## IsReadOnly

- Name: `IsReadOnly`
- Modifiers: `get; init`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.TypeSystem/AtsCapabilityInfo.cs)

Gets or sets whether this is a readonly collection (copied, not a handle). Only meaningful for Array/Dict categories.

```csharp
public bool IsReadOnly { get; init; }
```

## IsResourceBuilder

- Name: `IsResourceBuilder`
- Modifiers: `get`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.TypeSystem/AtsCapabilityInfo.cs#L76)

Gets whether this type represents a resource builder target type. Computed from ClrType - true for types that implement the Aspire resource contract.

```csharp
public bool IsResourceBuilder { get; }
```

## KeyType

- Name: `KeyType`
- Modifiers: `nullable` `get; init`
- Returns: [AtsTypeRef?](/reference/api/csharp/aspire.typesystem/atstyperef.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.TypeSystem/AtsCapabilityInfo.cs)

Gets or sets the key type reference for Dict types.

```csharp
public AtsTypeRef? KeyType { get; init; }
```

## TypeId

- Name: `TypeId`
- Modifiers: `get; init`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.TypeSystem/AtsCapabilityInfo.cs)

Gets or sets the ATS type ID (e.g., "string", "Aspire.Hosting/RedisResource").

```csharp
public string TypeId { get; init; }
```

## UnionTypes

- Name: `UnionTypes`
- Modifiers: `nullable` `get; init`
- Returns: [IReadOnlyList<AtsTypeRef>](/reference/api/csharp/aspire.typesystem/atstyperef.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.TypeSystem/AtsCapabilityInfo.cs)

Gets or sets the member types for Union category. When Category = Union, this contains the alternative types.

```csharp
public IReadOnlyList<AtsTypeRef>? UnionTypes { get; init; }
```

## ValueType

- Name: `ValueType`
- Modifiers: `nullable` `get; init`
- Returns: [AtsTypeRef?](/reference/api/csharp/aspire.typesystem/atstyperef.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.TypeSystem/AtsCapabilityInfo.cs)

Gets or sets the value type reference for Dict types.

```csharp
public AtsTypeRef? ValueType { get; init; }
```
