# Interface NetworkPeeringOrBuilder (0.87.0)

0.87.0 (latest) 0.85.0 0.82.0 0.81.0 0.79.0 0.77.0 0.76.0 0.74.0 0.72.0 0.70.0 0.69.0 0.68.0 0.67.0 0.66.0 0.64.0 0.62.0 0.61.0 0.58.0 0.57.0 0.56.0 0.54.0 0.53.0 0.52.0 0.51.0 0.50.0 0.49.0 0.48.0 0.47.0 0.46.0 0.45.0 0.43.0 0.42.0 0.41.0 0.40.0 0.39.0 0.38.0 0.37.0 0.36.0 0.35.0 0.34.0 0.33.0 0.31.0 0.30.0 0.29.0 0.28.0 0.27.0 0.26.0 0.25.0 0.24.0 0.23.0 0.22.0 0.21.0 0.18.0 0.17.0 0.16.0 0.15.0 0.14.0 0.13.0 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.3.0 0.2.0 0.1.0

    public interface NetworkPeeringOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getCreateTime()

    public abstract Timestamp getCreateTime()

Output only. Creation time of this resource.

`.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The createTime. |

### getCreateTimeOrBuilder()

    public abstract TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Creation time of this resource.

`.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### getDescription()

    public abstract String getDescription()

Optional. User-provided description for this network peering.

`string description = 21 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The description. |

### getDescriptionBytes()

    public abstract ByteString getDescriptionBytes()

Optional. User-provided description for this network peering.

`string description = 21 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for description. |

### getExchangeSubnetRoutes()

    public abstract boolean getExchangeSubnetRoutes()

Optional. True if full mesh connectivity is created and managed
automatically between peered networks; false otherwise. Currently this
field is always true because Google Compute Engine automatically creates
and manages subnetwork routes between two VPC networks when peering state
is 'ACTIVE'.

`optional bool exchange_subnet_routes = 10 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The exchangeSubnetRoutes. |

### getExportCustomRoutes()

    public abstract boolean getExportCustomRoutes()

Optional. True if custom routes are exported to the peered network;
false otherwise. The default value is true.

`optional bool export_custom_routes = 8 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The exportCustomRoutes. |

### getExportCustomRoutesWithPublicIp()

    public abstract boolean getExportCustomRoutesWithPublicIp()

Optional. True if all subnet routes with a public IP address range are
exported; false otherwise. The default value is true. IPv4 special-use
ranges (<https://en.wikipedia.org/wiki/IPv4#Special_addresses>) are always
exported to peers and are not controlled by this field.

`
optional bool export_custom_routes_with_public_ip = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The exportCustomRoutesWithPublicIp. |

### getImportCustomRoutes()

    public abstract boolean getImportCustomRoutes()

Optional. True if custom routes are imported from the peered network;
false otherwise. The default value is true.

`optional bool import_custom_routes = 9 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The importCustomRoutes. |

### getImportCustomRoutesWithPublicIp()

    public abstract boolean getImportCustomRoutesWithPublicIp()

Optional. True if all subnet routes with public IP address range are
imported; false otherwise. The default value is true. IPv4 special-use
ranges (<https://en.wikipedia.org/wiki/IPv4#Special_addresses>) are always
imported to peers and are not controlled by this field.

`
optional bool import_custom_routes_with_public_ip = 12 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The importCustomRoutesWithPublicIp. |

### getName()

    public abstract String getName()

Output only. The resource name of the network peering. NetworkPeering is a
global resource and location can only be global. Resource names are
scheme-less URIs that follow the conventions in
<https://cloud.google.com/apis/design/resource_names>.
For example:
`projects/my-project/locations/global/networkPeerings/my-peering`

`string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The name. |

### getNameBytes()

    public abstract ByteString getNameBytes()

Output only. The resource name of the network peering. NetworkPeering is a
global resource and location can only be global. Resource names are
scheme-less URIs that follow the conventions in
<https://cloud.google.com/apis/design/resource_names>.
For example:
`projects/my-project/locations/global/networkPeerings/my-peering`

`string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for name. |

### getPeerMtu()

    public abstract int getPeerMtu()

Optional. Maximum transmission unit (MTU) in bytes.
The default value is `1500`. If a value of `0` is provided for this field,
VMware Engine uses the default value instead.

`int32 peer_mtu = 14 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The peerMtu. |

### getPeerNetwork()

    public abstract String getPeerNetwork()

Required. The relative resource name of the network to peer with
a standard VMware Engine network. The provided network can be a
consumer VPC network or another standard VMware Engine network. If the
`peer_network_type` is VMWARE_ENGINE_NETWORK, specify the name in the form:
`projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`.
Otherwise specify the name in the form:
`projects/{project}/global/networks/{network_id}`, where
`{project}` can either be a project number or a project ID.

`string peer_network = 5 [(.google.api.field_behavior) = REQUIRED];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The peerNetwork. |

### getPeerNetworkBytes()

    public abstract ByteString getPeerNetworkBytes()

Required. The relative resource name of the network to peer with
a standard VMware Engine network. The provided network can be a
consumer VPC network or another standard VMware Engine network. If the
`peer_network_type` is VMWARE_ENGINE_NETWORK, specify the name in the form:
`projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`.
Otherwise specify the name in the form:
`projects/{project}/global/networks/{network_id}`, where
`{project}` can either be a project number or a project ID.

`string peer_network = 5 [(.google.api.field_behavior) = REQUIRED];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for peerNetwork. |

### getPeerNetworkType()

    public abstract NetworkPeering.PeerNetworkType getPeerNetworkType()

Required. The type of the network to peer with the VMware Engine network.

`
.google.cloud.vmwareengine.v1.NetworkPeering.PeerNetworkType peer_network_type = 16 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-vmwareengine/latest/com.google.cloud.vmwareengine.v1.NetworkPeering.PeerNetworkType` | The peerNetworkType. |

### getPeerNetworkTypeValue()

    public abstract int getPeerNetworkTypeValue()

Required. The type of the network to peer with the VMware Engine network.

`
.google.cloud.vmwareengine.v1.NetworkPeering.PeerNetworkType peer_network_type = 16 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for peerNetworkType. |

### getState()

    public abstract NetworkPeering.State getState()

Output only. State of the network peering. This field
has a value of 'ACTIVE' when there's a matching configuration in the peer
network. New values may be added to this enum when appropriate.

`
.google.cloud.vmwareengine.v1.NetworkPeering.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-vmwareengine/latest/com.google.cloud.vmwareengine.v1.NetworkPeering.State` | The state. |

### getStateDetails()

    public abstract String getStateDetails()

Output only. Output Only. Details about the current state of the network
peering.

`string state_details = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The stateDetails. |

### getStateDetailsBytes()

    public abstract ByteString getStateDetailsBytes()

Output only. Output Only. Details about the current state of the network
peering.

`string state_details = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for stateDetails. |

### getStateValue()

    public abstract int getStateValue()

Output only. State of the network peering. This field
has a value of 'ACTIVE' when there's a matching configuration in the peer
network. New values may be added to this enum when appropriate.

`
.google.cloud.vmwareengine.v1.NetworkPeering.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for state. |

### getUid()

    public abstract String getUid()

Output only. System-generated unique identifier for the resource.

`string uid = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The uid. |

### getUidBytes()

    public abstract ByteString getUidBytes()

Output only. System-generated unique identifier for the resource.

`string uid = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for uid. |

### getUpdateTime()

    public abstract Timestamp getUpdateTime()

Output only. Last update time of this resource.

`.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The updateTime. |

### getUpdateTimeOrBuilder()

    public abstract TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. Last update time of this resource.

`.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### getVmwareEngineNetwork()

    public abstract String getVmwareEngineNetwork()

Required. The relative resource name of the VMware Engine network.
Specify the name in the following form:
`projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
where `{project}` can either be a project number or a project ID.

`
string vmware_engine_network = 20 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The vmwareEngineNetwork. |

### getVmwareEngineNetworkBytes()

    public abstract ByteString getVmwareEngineNetworkBytes()

Required. The relative resource name of the VMware Engine network.
Specify the name in the following form:
`projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`
where `{project}` can either be a project number or a project ID.

`
string vmware_engine_network = 20 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for vmwareEngineNetwork. |

### hasCreateTime()

    public abstract boolean hasCreateTime()

Output only. Creation time of this resource.

`.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the createTime field is set. |

### hasExchangeSubnetRoutes()

    public abstract boolean hasExchangeSubnetRoutes()

Optional. True if full mesh connectivity is created and managed
automatically between peered networks; false otherwise. Currently this
field is always true because Google Compute Engine automatically creates
and manages subnetwork routes between two VPC networks when peering state
is 'ACTIVE'.

`optional bool exchange_subnet_routes = 10 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the exchangeSubnetRoutes field is set. |

### hasExportCustomRoutes()

    public abstract boolean hasExportCustomRoutes()

Optional. True if custom routes are exported to the peered network;
false otherwise. The default value is true.

`optional bool export_custom_routes = 8 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the exportCustomRoutes field is set. |

### hasExportCustomRoutesWithPublicIp()

    public abstract boolean hasExportCustomRoutesWithPublicIp()

Optional. True if all subnet routes with a public IP address range are
exported; false otherwise. The default value is true. IPv4 special-use
ranges (<https://en.wikipedia.org/wiki/IPv4#Special_addresses>) are always
exported to peers and are not controlled by this field.

`
optional bool export_custom_routes_with_public_ip = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the exportCustomRoutesWithPublicIp field is set. |

### hasImportCustomRoutes()

    public abstract boolean hasImportCustomRoutes()

Optional. True if custom routes are imported from the peered network;
false otherwise. The default value is true.

`optional bool import_custom_routes = 9 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the importCustomRoutes field is set. |

### hasImportCustomRoutesWithPublicIp()

    public abstract boolean hasImportCustomRoutesWithPublicIp()

Optional. True if all subnet routes with public IP address range are
imported; false otherwise. The default value is true. IPv4 special-use
ranges (<https://en.wikipedia.org/wiki/IPv4#Special_addresses>) are always
imported to peers and are not controlled by this field.

`
optional bool import_custom_routes_with_public_ip = 12 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the importCustomRoutesWithPublicIp field is set. |

### hasUpdateTime()

    public abstract boolean hasUpdateTime()

Output only. Last update time of this resource.

`.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the updateTime field is set. |