public class Network extends NetworkInfo
Network
object with the most recent information use reload(com.google.cloud.compute.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 |
|---|---|
Compute |
compute()
Returns the network's
Compute object used to issue requests. |
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.
|
int |
hashCode() |
Network |
reload(Compute.NetworkOption... options)
Fetches current network' latest information.
|
Network.Builder |
toBuilder()
Returns a builder for the current network.
|
builder, configuration, creationTimestamp, description, generatedId, networkId, 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.configuration() returns a SubnetNetworkConfiguration) with automatic creation
of subnetworks disabled (i.e. SubnetNetworkConfiguration.autoCreateSubnetworks()
returns false).ComputeException - upon failurepublic Compute compute()
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 © 2016 Google. All rights reserved.