public class Network extends NetworkInfo
Network
object with the most recent information use reload(com.google.cloud.compute.deprecated.Compute.NetworkOption...). Network adds a layer of
service-related functionality over NetworkInfo.| Modifier and Type | Class and Description |
|---|---|
static class |
Network.Builder
A builder for
Network objects. |
| Modifier and Type | Method and Description |
|---|---|
Operation |
createSubnetwork(SubnetworkId subnetworkId,
String ipRange,
Compute.OperationOption... options)
Creates a subnetwork for this network given its identity and the range of IPv4 addresses in
CIDR format.
|
Operation |
delete(Compute.OperationOption... options)
Deletes this network.
|
boolean |
equals(Object obj) |
boolean |
exists()
Checks if this network exists.
|
Compute |
getCompute()
Returns the network's
Compute object used to issue requests. |
int |
hashCode() |
Network |
reload(Compute.NetworkOption... options)
Fetches current network' latest information.
|
Network.Builder |
toBuilder()
Returns a builder for the current network.
|
getConfiguration, getCreationTimestamp, getDescription, getGeneratedId, getNetworkId, newBuilder, of, toStringpublic boolean exists()
true if this network exists, false otherwiseComputeException - upon failurepublic Network reload(Compute.NetworkOption... options)
null if the network does not
exist.options - network optionsNetwork object with latest information or null if not foundComputeException - upon failurepublic Operation delete(Compute.OperationOption... options)
null if the
network was not foundComputeException - upon failurepublic Operation createSubnetwork(SubnetworkId subnetworkId, String ipRange, Compute.OperationOption... options)
NetworkInfo.getConfiguration() returns a SubnetNetworkConfiguration) with automatic
creation of subnetworks disabled (i.e. SubnetNetworkConfiguration.autoCreateSubnetworks() returns false).ComputeException - upon failurepublic Compute getCompute()
Compute object used to issue requests.public Network.Builder toBuilder()
NetworkInfotoBuilder in class NetworkInfopublic final boolean equals(Object obj)
equals in class NetworkInfopublic final int hashCode()
hashCode in class NetworkInfoCopyright © 2019 Google LLC. All rights reserved.