# Google Cloud Edge Network V1 Client - Class Subnet (1.4.2)

1.4.2 (latest) 1.4.1 1.3.1 1.2.3 1.1.4 1.0.0 0.3.6 0.2.0 0.1.1 Reference documentation and code samples for the Google Cloud Edge Network V1 Client class Subnet.

Message describing Subnet object

Generated from protobuf message `google.cloud.edgenetwork.v1.Subnet`

## Namespace

Google \\ Cloud \\ EdgeNetwork \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required. The canonical resource name of the subnet. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The time when the subnet was created. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The time when the subnet was last updated. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Labels associated with this resource. |
| `↳ description` | `string` Optional. A free-text description of the resource. Max length 1024 characters. |
| `↳ network` | `string` Required. The network that this subnetwork belongs to. |
| `↳ ipv4_cidr` | `string[]` The ranges of ipv4 addresses that are owned by this subnetwork. |
| `↳ ipv6_cidr` | `string[]` The ranges of ipv6 addresses that are owned by this subnetwork. |
| `↳ vlan_id` | `int` Optional. VLAN id provided by user. If not specified we assign one automatically. |
| `↳ bonding_type` | `int` Optional. A bonding type in the subnet creation specifies whether a VLAN being created will be present on Bonded or Non-Bonded or Both port types. In addition, this flag is to be used to set the specific network configuration which clusters can then use for their workloads based on the bonding choice. |
| `↳ state` | `int` Output only. Current stage of the resource to the device by config push. |

### getName

Required. The canonical resource name of the subnet.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setName

Required. The canonical resource name of the subnet.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCreateTime

Output only. The time when the subnet was created.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The time when the subnet was created.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getUpdateTime

Output only. The time when the subnet was last updated.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. The time when the subnet was last updated.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLabels

Labels associated with this resource.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setLabels

Labels associated with this resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDescription

Optional. A free-text description of the resource. Max length 1024
characters.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setDescription

Optional. A free-text description of the resource. Max length 1024
characters.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getNetwork

Required. The network that this subnetwork belongs to.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setNetwork

Required. The network that this subnetwork belongs to.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getIpv4Cidr

The ranges of ipv4 addresses that are owned by this subnetwork.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setIpv4Cidr

The ranges of ipv4 addresses that are owned by this subnetwork.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getIpv6Cidr

The ranges of ipv6 addresses that are owned by this subnetwork.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setIpv6Cidr

The ranges of ipv6 addresses that are owned by this subnetwork.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getVlanId

Optional. VLAN id provided by user. If not specified we assign one
automatically.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setVlanId

Optional. VLAN id provided by user. If not specified we assign one
automatically.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getBondingType

Optional. A bonding type in the subnet creation specifies whether a VLAN
being created will be present on Bonded or Non-Bonded or Both port types.

In addition, this flag is to be used to set the specific network
configuration which clusters can then use for their workloads based on the
bonding choice.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [BondingType](https://docs.cloud.google.com/php/docs/reference/cloud-edgenetwork/latest/V1.Subnet.BondingType). |

### setBondingType

Optional. A bonding type in the subnet creation specifies whether a VLAN
being created will be present on Bonded or Non-Bonded or Both port types.

In addition, this flag is to be used to set the specific network
configuration which clusters can then use for their workloads based on the
bonding choice.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [BondingType](https://docs.cloud.google.com/php/docs/reference/cloud-edgenetwork/latest/V1.Subnet.BondingType). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getState

Output only. Current stage of the resource to the device by config push.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [ResourceState](https://docs.cloud.google.com/php/docs/reference/cloud-edgenetwork/latest/V1.ResourceState). |

### setState

Output only. Current stage of the resource to the device by config push.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [ResourceState](https://docs.cloud.google.com/php/docs/reference/cloud-edgenetwork/latest/V1.ResourceState). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |