## ipam.gdc.goog/v1

Contains API Schema definitions for the IP Address Management(IPAM) API group.

### CIDREntry

Represents a CIDR entry with IP version identified.

*Appears in:*
- [NetworkStatus](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/ipam/v1/ipam-v1#networkstatus)

| Field | Description |
|---|---|
| `version` *IPFamily* | The IP address version of the entry. |
| `cidr` *string* | The CIDR of the entry. |

### NetworkSpec

Contains the information to set up network features for the `Subnet`.

*Appears in:*
- [SubnetSpec](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/ipam/v1/ipam-v1#subnetspec)

| Field | Description |
|---|---|
| `enableGateway` *boolean* | Specifies whether a gateway IP address must be assigned for the subnet. |
| `enableVLANID` *boolean* | Specifies whether a VLAN ID must be assigned for the subnet. |
| `staticVLANID` *integer* | The dedicated VLAN ID. If this field is defined, the `VLANID` field must be `true`. |

### NetworkStatus

Contains the allocation result for the network configurations.

*Appears in:*
- [SubnetStatus](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/ipam/v1/ipam-v1#subnetstatus)

| Field | Description |
|---|---|
| `vlanID` *integer* | The VLAN ID acquired for the subnet. |
| `gateways` *[CIDREntry](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/ipam/v1/ipam-v1#cidrentry) array* | The gateway IP addresses acquired for the Subnet. If the Subnet is single-stack, there must be only one IPv4/IPv6 IP address in the list. If the subnet is dual-stack, there must be one IPv4 address and one IPv6 IP addresse in the list. |

### Subnet

Represents the request and allocation information of a zonal `Subnet`.

*Appears in:*
- [SubnetList](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/ipam/v1/ipam-v1#subnetlist)

| Field | Description |
|---|---|
| `apiVersion` *string* | `ipam.gdc.goog/v1` |
| `kind` *string* | `Subnet` |
| `metadata` *[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#objectmeta-v1-meta)* | Refer to Kubernetes API documentation for fields of `metadata`. |
| `spec` *[SubnetSpec](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/ipam/v1/ipam-v1#subnetspec)* |   |
| `status` *[SubnetStatus](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/ipam/v1/ipam-v1#subnetstatus)* |   |

### SubnetAllocation

Contains a single IP version(IPv4/IPv6)'s CIDR allocation result of a `Subnet`.

*Appears in:*
- [SubnetStatus](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/ipam/v1/ipam-v1#subnetstatus)

| Field | Description |
|---|---|
| `cidr` *string* | The CIDR allocated to the Subnet. |
| `availableCIDRs` *string array* | The CIDRs left after excluding those consumed by the Subnet's children. |

### SubnetList

Represents a collection of `Subnet` resources.

| Field | Description |
|---|---|
| `apiVersion` *string* | `ipam.gdc.goog/v1` |
| `kind` *string* | `SubnetList` |
| `metadata` *[ListMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#listmeta-v1-meta)* | Refer to Kubernetes API documentation for fields of `metadata`. |
| `items` *[Subnet](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/ipam/v1/ipam-v1#subnet) array* |   |

### SubnetReference

Contains the information used to reference a single `Subnet`.

*Appears in:*
- [SubnetSpec](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/ipam/v1/ipam-v1#subnetspec)
- [SubnetStatus](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/ipam/v1/ipam-v1#subnetstatus)

| Field | Description |
|---|---|
| `name` *string* |   |
| `namespace` *string* | The namespace of the referenced Subnet. If it's used in a spec, the namespace can be left empty, which means the referenced Subnet is in the same namespace as the object referencing it. |

### SubnetRequest

Contains the IP addresses claiming information for a single IP address version (IPv4/IPv6).

*Appears in:*
- [SubnetSpec](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/ipam/v1/ipam-v1#subnetspec)

| Field | Description |
|---|---|
| `cidr` *string* | The CIDR to allocate. This field must be specified when acquiring a dedicated CIDR. |
| `prefixLength` *integer* | The prefix length of the CIDR wanted. This field can be specified when there is no specific requirements on the CIDR to be allocated. If both CIDR and prefix are left empty, the request acquires a /32(IPv4) or /128(IPv6) random CIDR by default. |

### SubnetSpec

Defines the specification of a `Subnet`.

*Appears in:*
- [Subnet](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/ipam/v1/ipam-v1#subnet)

| Field | Description |
|---|---|
| `type` *SubnetType* | The type of the Subnet in the context of the IPAM tree architecture. |
| `ipv4Request` *[SubnetRequest](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/ipam/v1/ipam-v1#subnetrequest)* | The request details for acquiring the IPv4 CIDR. |
| `ipv6Request` *[SubnetRequest](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/ipam/v1/ipam-v1#subnetrequest)* | The request details for acquiring the IPv6 CIDR. |
| `parentReference` *[SubnetReference](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/ipam/v1/ipam-v1#subnetreference)* | The reference to the parent of this Subnet. This Subnet will get IP allocated from the parent if specified. The parent name must be provided if there is a parent. Namespace of the parent can only be omitted when the parent is in the same namespace as this Subnet. |
| `networkSpec` *[NetworkSpec](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/ipam/v1/ipam-v1#networkspec)* | The specification needed for setting up network configurations. If the `Subnet` doesn't have network implications, this field should be empty. |

### SubnetStatus

Defines the status of the `Subnet`.

*Appears in:*
- [Subnet](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/ipam/v1/ipam-v1#subnet)

| Field | Description |
|---|---|
| `conditions` *[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#condition-v1-meta) array* | The observations of the overall state of the resource. Known condition types: Ready. |
| `ipv4Allocation` *[SubnetAllocation](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/ipam/v1/ipam-v1#subnetallocation)* | The allocation information for the IPv4 IP addresses. |
| `ipv6Allocation` *[SubnetAllocation](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/ipam/v1/ipam-v1#subnetallocation)* | The allocation information for the IPv6 IP addresses. |
| `childrenRefs` *[SubnetReference](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/ipam/v1/ipam-v1#subnetreference) array* | The references to the children which are allocated from this subnet. This field doesn't apply to `Leaf` type subnets. |
| `networkStatus` *[NetworkStatus](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/ipam/v1/ipam-v1#networkstatus)* | The allocated result of network configurations. |