# Google Cloud Vmware Engine V1 Client - Class Subnet (1.3.0)

1.3.0 (latest) 1.2.2 1.1.4 1.0.0 0.5.6 0.4.0 0.3.3 0.2.1 0.1.4 Reference documentation and code samples for the Google Cloud Vmware Engine V1 Client class Subnet.

Subnet in a private cloud. Either `management` subnets (such as vMotion) that
are read-only, or `userDefined`, which can also be updated.

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

## Namespace

Google \\ Cloud \\ VmwareEngine \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. The resource name of this subnet. Resource names are schemeless URIs that follow the conventions in <https://cloud.google.com/apis/design/resource_names>. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet` |
| `↳ ip_cidr_range` | `string` The IP address range of the subnet in CIDR format '10.0.0.0/24'. |
| `↳ gateway_ip` | `string` The IP address of the gateway of this subnet. Must fall within the IP prefix defined above. |
| `↳ type` | `string` Output only. The type of the subnet. For example "management" or "userDefined". |
| `↳ state` | `int` Output only. The state of the resource. |
| `↳ vlan_id` | `int` Output only. VLAN ID of the VLAN on which the subnet is configured |

### getName

Output only. The resource name of this subnet.

Resource names are schemeless URIs that follow the conventions in
<https://cloud.google.com/apis/design/resource_names>.
For example:
`projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet`

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

### setName

Output only. The resource name of this subnet.

Resource names are schemeless URIs that follow the conventions in
<https://cloud.google.com/apis/design/resource_names>.
For example:
`projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet`

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

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

### getIpCidrRange

The IP address range of the subnet in CIDR format '10.0.0.0/24'.

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

### setIpCidrRange

The IP address range of the subnet in CIDR format '10.0.0.0/24'.

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

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

### getGatewayIp

The IP address of the gateway of this subnet.

Must fall within the IP prefix defined above.

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

### setGatewayIp

The IP address of the gateway of this subnet.

Must fall within the IP prefix defined above.

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

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

### getType

Output only. The type of the subnet. For example "management" or
"userDefined".

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

### setType

Output only. The type of the subnet. For example "management" or
"userDefined".

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

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

### getState

Output only. The state of the resource.

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

### setState

Output only. The state of the resource.

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

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

### getVlanId

Output only. VLAN ID of the VLAN on which the subnet is configured

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

### setVlanId

Output only. VLAN ID of the VLAN on which the subnet is configured

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

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