public class NetworkInfo extends Object implements Serializable
A network lives in a project and is isolated from other networks in the project. A project can have up to five different networks.
Modifier and Type | Class and Description |
---|---|
static class |
NetworkInfo.Builder
A builder for
NetworkInfo objects. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
<T extends NetworkConfiguration> |
getConfiguration()
Returns the network configuration.
|
Long |
getCreationTimestamp()
Returns the creation timestamp in milliseconds since epoch.
|
String |
getDescription()
Returns a textual description of the network.
|
String |
getGeneratedId()
Returns the service-generated unique identifier for the network.
|
NetworkId |
getNetworkId()
Returns the network identity.
|
int |
hashCode() |
static NetworkInfo.Builder |
newBuilder(NetworkId networkId,
NetworkConfiguration configuration)
Returns a builder for a
NetworkInfo object given the network identity and its
configuration. |
static NetworkInfo |
of(NetworkId networkId,
NetworkConfiguration configuration)
Returns a
NetworkInfo object given the network identity. |
NetworkInfo.Builder |
toBuilder()
Returns a builder for the current network.
|
String |
toString() |
public String getGeneratedId()
public Long getCreationTimestamp()
public NetworkId getNetworkId()
public String getDescription()
public <T extends NetworkConfiguration> T getConfiguration()
StandardNetworkConfiguration
for standard
networks with associated IPv4 range. Returns SubnetNetworkConfiguration
for networks
that could be divided into subnetworks, up to one per region, each with its own address range.public NetworkInfo.Builder toBuilder()
public static NetworkInfo.Builder newBuilder(NetworkId networkId, NetworkConfiguration configuration)
NetworkInfo
object given the network identity and its
configuration. Use StandardNetworkConfiguration
to create a standard network with
associated address range. Use SubnetNetworkConfiguration
to create a network that
supports subnetworks, up to one per region, each with its own address range.public static NetworkInfo of(NetworkId networkId, NetworkConfiguration configuration)
NetworkInfo
object given the network identity. Use StandardNetworkConfiguration
to create a standard network with associated address range. Use
SubnetNetworkConfiguration
to create a network that supports subnetworks, up to one per
region, each with its own address range.Copyright © 2019 Google LLC. All rights reserved.