Class Network.Builder (1.31.0)

public static final class Network.Builder extends GeneratedMessageV3.Builder<Network.Builder> implements NetworkOrBuilder

Represents a VPC Network resource. Networks connect resources to each other and to the internet. For more information, read Virtual Private Cloud (VPC) Network.

Protobuf type google.cloud.compute.v1.Network

Implements

NetworkOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllPeerings(Iterable<? extends NetworkPeering> values)

public Network.Builder addAllPeerings(Iterable<? extends NetworkPeering> values)

[Output Only] A list of network peerings for the resource.

repeated .google.cloud.compute.v1.NetworkPeering peerings = 69883187;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.compute.v1.NetworkPeering>
Returns
TypeDescription
Network.Builder

addAllSubnetworks(Iterable<String> values)

public Network.Builder addAllSubnetworks(Iterable<String> values)

[Output Only] Server-defined fully-qualified URLs for all subnetworks in this VPC network.

repeated string subnetworks = 415853125;

Parameter
NameDescription
valuesIterable<String>

The subnetworks to add.

Returns
TypeDescription
Network.Builder

This builder for chaining.

addPeerings(NetworkPeering value)

public Network.Builder addPeerings(NetworkPeering value)

[Output Only] A list of network peerings for the resource.

repeated .google.cloud.compute.v1.NetworkPeering peerings = 69883187;

Parameter
NameDescription
valueNetworkPeering
Returns
TypeDescription
Network.Builder

addPeerings(NetworkPeering.Builder builderForValue)

public Network.Builder addPeerings(NetworkPeering.Builder builderForValue)

[Output Only] A list of network peerings for the resource.

repeated .google.cloud.compute.v1.NetworkPeering peerings = 69883187;

Parameter
NameDescription
builderForValueNetworkPeering.Builder
Returns
TypeDescription
Network.Builder

addPeerings(int index, NetworkPeering value)

public Network.Builder addPeerings(int index, NetworkPeering value)

[Output Only] A list of network peerings for the resource.

repeated .google.cloud.compute.v1.NetworkPeering peerings = 69883187;

Parameters
NameDescription
indexint
valueNetworkPeering
Returns
TypeDescription
Network.Builder

addPeerings(int index, NetworkPeering.Builder builderForValue)

public Network.Builder addPeerings(int index, NetworkPeering.Builder builderForValue)

[Output Only] A list of network peerings for the resource.

repeated .google.cloud.compute.v1.NetworkPeering peerings = 69883187;

Parameters
NameDescription
indexint
builderForValueNetworkPeering.Builder
Returns
TypeDescription
Network.Builder

addPeeringsBuilder()

public NetworkPeering.Builder addPeeringsBuilder()

[Output Only] A list of network peerings for the resource.

repeated .google.cloud.compute.v1.NetworkPeering peerings = 69883187;

Returns
TypeDescription
NetworkPeering.Builder

addPeeringsBuilder(int index)

public NetworkPeering.Builder addPeeringsBuilder(int index)

[Output Only] A list of network peerings for the resource.

repeated .google.cloud.compute.v1.NetworkPeering peerings = 69883187;

Parameter
NameDescription
indexint
Returns
TypeDescription
NetworkPeering.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Network.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Network.Builder
Overrides

addSubnetworks(String value)

public Network.Builder addSubnetworks(String value)

[Output Only] Server-defined fully-qualified URLs for all subnetworks in this VPC network.

repeated string subnetworks = 415853125;

Parameter
NameDescription
valueString

The subnetworks to add.

Returns
TypeDescription
Network.Builder

This builder for chaining.

addSubnetworksBytes(ByteString value)

public Network.Builder addSubnetworksBytes(ByteString value)

[Output Only] Server-defined fully-qualified URLs for all subnetworks in this VPC network.

repeated string subnetworks = 415853125;

Parameter
NameDescription
valueByteString

The bytes of the subnetworks to add.

Returns
TypeDescription
Network.Builder

This builder for chaining.

build()

public Network build()
Returns
TypeDescription
Network

buildPartial()

public Network buildPartial()
Returns
TypeDescription
Network

clear()

public Network.Builder clear()
Returns
TypeDescription
Network.Builder
Overrides

clearAutoCreateSubnetworks()

public Network.Builder clearAutoCreateSubnetworks()

Must be set to create a VPC network. If not set, a legacy network is created. When set to true, the VPC network is created in auto mode. When set to false, the VPC network is created in custom mode. An auto mode VPC network starts with one subnet per region. Each subnet has a predetermined range as described in Auto mode VPC network IP ranges. For custom mode VPC networks, you can add subnets using the subnetworks insert method.

optional bool auto_create_subnetworks = 256156690;

Returns
TypeDescription
Network.Builder

This builder for chaining.

clearCreationTimestamp()

public Network.Builder clearCreationTimestamp()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
Network.Builder

This builder for chaining.

clearDescription()

public Network.Builder clearDescription()

An optional description of this resource. Provide this field when you create the resource.

optional string description = 422937596;

Returns
TypeDescription
Network.Builder

This builder for chaining.

clearEnableUlaInternalIpv6()

public Network.Builder clearEnableUlaInternalIpv6()

Enable ULA internal ipv6 on this network. Enabling this feature will assign a /48 from google defined ULA prefix fd20::/20. .

optional bool enable_ula_internal_ipv6 = 423757720;

Returns
TypeDescription
Network.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Network.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Network.Builder
Overrides

clearFirewallPolicy()

public Network.Builder clearFirewallPolicy()

[Output Only] URL of the firewall policy the network is associated with.

optional string firewall_policy = 498173265;

Returns
TypeDescription
Network.Builder

This builder for chaining.

clearGatewayIPv4()

public Network.Builder clearGatewayIPv4()

[Output Only] The gateway address for default routing out of the network, selected by Google Cloud.

optional string gateway_i_pv4 = 178678877;

Returns
TypeDescription
Network.Builder

This builder for chaining.

clearIPv4Range()

public Network.Builder clearIPv4Range()

Deprecated in favor of subnet mode networks. The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16. Provided by the client when the network is created.

optional string I_pv4_range = 59234358;

Returns
TypeDescription
Network.Builder

This builder for chaining.

clearId()

public Network.Builder clearId()

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Returns
TypeDescription
Network.Builder

This builder for chaining.

clearInternalIpv6Range()

public Network.Builder clearInternalIpv6Range()

When enabling ula internal ipv6, caller optionally can specify the /48 range they want from the google defined ULA prefix fd20::/20. The input must be a valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will fail if the speficied /48 is already in used by another resource. If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. .

optional string internal_ipv6_range = 277456807;

Returns
TypeDescription
Network.Builder

This builder for chaining.

clearKind()

public Network.Builder clearKind()

[Output Only] Type of the resource. Always compute#network for networks.

optional string kind = 3292052;

Returns
TypeDescription
Network.Builder

This builder for chaining.

clearMtu()

public Network.Builder clearMtu()

Maximum Transmission Unit in bytes. The minimum value for this field is 1300 and the maximum value is 8896. The suggested value is 1500, which is the default MTU used on the Internet, or 8896 if you want to use Jumbo frames. If unspecified, the value defaults to 1460.

optional int32 mtu = 108462;

Returns
TypeDescription
Network.Builder

This builder for chaining.

clearName()

public Network.Builder clearName()

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.

optional string name = 3373707;

Returns
TypeDescription
Network.Builder

This builder for chaining.

clearNetworkFirewallPolicyEnforcementOrder()

public Network.Builder clearNetworkFirewallPolicyEnforcementOrder()

The network firewall policy enforcement order. Can be either AFTER_CLASSIC_FIREWALL or BEFORE_CLASSIC_FIREWALL. Defaults to AFTER_CLASSIC_FIREWALL if the field is not specified. Check the NetworkFirewallPolicyEnforcementOrder enum for the list of possible values.

optional string network_firewall_policy_enforcement_order = 6504784;

Returns
TypeDescription
Network.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Network.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Network.Builder
Overrides

clearPeerings()

public Network.Builder clearPeerings()

[Output Only] A list of network peerings for the resource.

repeated .google.cloud.compute.v1.NetworkPeering peerings = 69883187;

Returns
TypeDescription
Network.Builder

clearRoutingConfig()

public Network.Builder clearRoutingConfig()

The network-level routing configuration for this network. Used by Cloud Router to determine what type of network-wide routing behavior to enforce.

optional .google.cloud.compute.v1.NetworkRoutingConfig routing_config = 523556059;

Returns
TypeDescription
Network.Builder
public Network.Builder clearSelfLink()

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Returns
TypeDescription
Network.Builder

This builder for chaining.

clearSelfLinkWithId()

public Network.Builder clearSelfLinkWithId()

[Output Only] Server-defined URL for this resource with the resource id.

optional string self_link_with_id = 44520962;

Returns
TypeDescription
Network.Builder

This builder for chaining.

clearSubnetworks()

public Network.Builder clearSubnetworks()

[Output Only] Server-defined fully-qualified URLs for all subnetworks in this VPC network.

repeated string subnetworks = 415853125;

Returns
TypeDescription
Network.Builder

This builder for chaining.

clone()

public Network.Builder clone()
Returns
TypeDescription
Network.Builder
Overrides

getAutoCreateSubnetworks()

public boolean getAutoCreateSubnetworks()

Must be set to create a VPC network. If not set, a legacy network is created. When set to true, the VPC network is created in auto mode. When set to false, the VPC network is created in custom mode. An auto mode VPC network starts with one subnet per region. Each subnet has a predetermined range as described in Auto mode VPC network IP ranges. For custom mode VPC networks, you can add subnets using the subnetworks insert method.

optional bool auto_create_subnetworks = 256156690;

Returns
TypeDescription
boolean

The autoCreateSubnetworks.

getCreationTimestamp()

public String getCreationTimestamp()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
String

The creationTimestamp.

getCreationTimestampBytes()

public ByteString getCreationTimestampBytes()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
ByteString

The bytes for creationTimestamp.

getDefaultInstanceForType()

public Network getDefaultInstanceForType()
Returns
TypeDescription
Network

getDescription()

public String getDescription()

An optional description of this resource. Provide this field when you create the resource.

optional string description = 422937596;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

An optional description of this resource. Provide this field when you create the resource.

optional string description = 422937596;

Returns
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getEnableUlaInternalIpv6()

public boolean getEnableUlaInternalIpv6()

Enable ULA internal ipv6 on this network. Enabling this feature will assign a /48 from google defined ULA prefix fd20::/20. .

optional bool enable_ula_internal_ipv6 = 423757720;

Returns
TypeDescription
boolean

The enableUlaInternalIpv6.

getFirewallPolicy()

public String getFirewallPolicy()

[Output Only] URL of the firewall policy the network is associated with.

optional string firewall_policy = 498173265;

Returns
TypeDescription
String

The firewallPolicy.

getFirewallPolicyBytes()

public ByteString getFirewallPolicyBytes()

[Output Only] URL of the firewall policy the network is associated with.

optional string firewall_policy = 498173265;

Returns
TypeDescription
ByteString

The bytes for firewallPolicy.

getGatewayIPv4()

public String getGatewayIPv4()

[Output Only] The gateway address for default routing out of the network, selected by Google Cloud.

optional string gateway_i_pv4 = 178678877;

Returns
TypeDescription
String

The gatewayIPv4.

getGatewayIPv4Bytes()

public ByteString getGatewayIPv4Bytes()

[Output Only] The gateway address for default routing out of the network, selected by Google Cloud.

optional string gateway_i_pv4 = 178678877;

Returns
TypeDescription
ByteString

The bytes for gatewayIPv4.

getIPv4Range()

public String getIPv4Range()

Deprecated in favor of subnet mode networks. The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16. Provided by the client when the network is created.

optional string I_pv4_range = 59234358;

Returns
TypeDescription
String

The iPv4Range.

getIPv4RangeBytes()

public ByteString getIPv4RangeBytes()

Deprecated in favor of subnet mode networks. The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16. Provided by the client when the network is created.

optional string I_pv4_range = 59234358;

Returns
TypeDescription
ByteString

The bytes for iPv4Range.

getId()

public long getId()

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Returns
TypeDescription
long

The id.

getInternalIpv6Range()

public String getInternalIpv6Range()

When enabling ula internal ipv6, caller optionally can specify the /48 range they want from the google defined ULA prefix fd20::/20. The input must be a valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will fail if the speficied /48 is already in used by another resource. If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. .

optional string internal_ipv6_range = 277456807;

Returns
TypeDescription
String

The internalIpv6Range.

getInternalIpv6RangeBytes()

public ByteString getInternalIpv6RangeBytes()

When enabling ula internal ipv6, caller optionally can specify the /48 range they want from the google defined ULA prefix fd20::/20. The input must be a valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will fail if the speficied /48 is already in used by another resource. If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. .

optional string internal_ipv6_range = 277456807;

Returns
TypeDescription
ByteString

The bytes for internalIpv6Range.

getKind()

public String getKind()

[Output Only] Type of the resource. Always compute#network for networks.

optional string kind = 3292052;

Returns
TypeDescription
String

The kind.

getKindBytes()

public ByteString getKindBytes()

[Output Only] Type of the resource. Always compute#network for networks.

optional string kind = 3292052;

Returns
TypeDescription
ByteString

The bytes for kind.

getMtu()

public int getMtu()

Maximum Transmission Unit in bytes. The minimum value for this field is 1300 and the maximum value is 8896. The suggested value is 1500, which is the default MTU used on the Internet, or 8896 if you want to use Jumbo frames. If unspecified, the value defaults to 1460.

optional int32 mtu = 108462;

Returns
TypeDescription
int

The mtu.

getName()

public String getName()

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.

optional string name = 3373707;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.

optional string name = 3373707;

Returns
TypeDescription
ByteString

The bytes for name.

getNetworkFirewallPolicyEnforcementOrder()

public String getNetworkFirewallPolicyEnforcementOrder()

The network firewall policy enforcement order. Can be either AFTER_CLASSIC_FIREWALL or BEFORE_CLASSIC_FIREWALL. Defaults to AFTER_CLASSIC_FIREWALL if the field is not specified. Check the NetworkFirewallPolicyEnforcementOrder enum for the list of possible values.

optional string network_firewall_policy_enforcement_order = 6504784;

Returns
TypeDescription
String

The networkFirewallPolicyEnforcementOrder.

getNetworkFirewallPolicyEnforcementOrderBytes()

public ByteString getNetworkFirewallPolicyEnforcementOrderBytes()

The network firewall policy enforcement order. Can be either AFTER_CLASSIC_FIREWALL or BEFORE_CLASSIC_FIREWALL. Defaults to AFTER_CLASSIC_FIREWALL if the field is not specified. Check the NetworkFirewallPolicyEnforcementOrder enum for the list of possible values.

optional string network_firewall_policy_enforcement_order = 6504784;

Returns
TypeDescription
ByteString

The bytes for networkFirewallPolicyEnforcementOrder.

getPeerings(int index)

public NetworkPeering getPeerings(int index)

[Output Only] A list of network peerings for the resource.

repeated .google.cloud.compute.v1.NetworkPeering peerings = 69883187;

Parameter
NameDescription
indexint
Returns
TypeDescription
NetworkPeering

getPeeringsBuilder(int index)

public NetworkPeering.Builder getPeeringsBuilder(int index)

[Output Only] A list of network peerings for the resource.

repeated .google.cloud.compute.v1.NetworkPeering peerings = 69883187;

Parameter
NameDescription
indexint
Returns
TypeDescription
NetworkPeering.Builder

getPeeringsBuilderList()

public List<NetworkPeering.Builder> getPeeringsBuilderList()

[Output Only] A list of network peerings for the resource.

repeated .google.cloud.compute.v1.NetworkPeering peerings = 69883187;

Returns
TypeDescription
List<Builder>

getPeeringsCount()

public int getPeeringsCount()

[Output Only] A list of network peerings for the resource.

repeated .google.cloud.compute.v1.NetworkPeering peerings = 69883187;

Returns
TypeDescription
int

getPeeringsList()

public List<NetworkPeering> getPeeringsList()

[Output Only] A list of network peerings for the resource.

repeated .google.cloud.compute.v1.NetworkPeering peerings = 69883187;

Returns
TypeDescription
List<NetworkPeering>

getPeeringsOrBuilder(int index)

public NetworkPeeringOrBuilder getPeeringsOrBuilder(int index)

[Output Only] A list of network peerings for the resource.

repeated .google.cloud.compute.v1.NetworkPeering peerings = 69883187;

Parameter
NameDescription
indexint
Returns
TypeDescription
NetworkPeeringOrBuilder

getPeeringsOrBuilderList()

public List<? extends NetworkPeeringOrBuilder> getPeeringsOrBuilderList()

[Output Only] A list of network peerings for the resource.

repeated .google.cloud.compute.v1.NetworkPeering peerings = 69883187;

Returns
TypeDescription
List<? extends com.google.cloud.compute.v1.NetworkPeeringOrBuilder>

getRoutingConfig()

public NetworkRoutingConfig getRoutingConfig()

The network-level routing configuration for this network. Used by Cloud Router to determine what type of network-wide routing behavior to enforce.

optional .google.cloud.compute.v1.NetworkRoutingConfig routing_config = 523556059;

Returns
TypeDescription
NetworkRoutingConfig

The routingConfig.

getRoutingConfigBuilder()

public NetworkRoutingConfig.Builder getRoutingConfigBuilder()

The network-level routing configuration for this network. Used by Cloud Router to determine what type of network-wide routing behavior to enforce.

optional .google.cloud.compute.v1.NetworkRoutingConfig routing_config = 523556059;

Returns
TypeDescription
NetworkRoutingConfig.Builder

getRoutingConfigOrBuilder()

public NetworkRoutingConfigOrBuilder getRoutingConfigOrBuilder()

The network-level routing configuration for this network. Used by Cloud Router to determine what type of network-wide routing behavior to enforce.

optional .google.cloud.compute.v1.NetworkRoutingConfig routing_config = 523556059;

Returns
TypeDescription
NetworkRoutingConfigOrBuilder
public String getSelfLink()

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Returns
TypeDescription
String

The selfLink.

getSelfLinkBytes()

public ByteString getSelfLinkBytes()

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Returns
TypeDescription
ByteString

The bytes for selfLink.

getSelfLinkWithId()

public String getSelfLinkWithId()

[Output Only] Server-defined URL for this resource with the resource id.

optional string self_link_with_id = 44520962;

Returns
TypeDescription
String

The selfLinkWithId.

getSelfLinkWithIdBytes()

public ByteString getSelfLinkWithIdBytes()

[Output Only] Server-defined URL for this resource with the resource id.

optional string self_link_with_id = 44520962;

Returns
TypeDescription
ByteString

The bytes for selfLinkWithId.

getSubnetworks(int index)

public String getSubnetworks(int index)

[Output Only] Server-defined fully-qualified URLs for all subnetworks in this VPC network.

repeated string subnetworks = 415853125;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The subnetworks at the given index.

getSubnetworksBytes(int index)

public ByteString getSubnetworksBytes(int index)

[Output Only] Server-defined fully-qualified URLs for all subnetworks in this VPC network.

repeated string subnetworks = 415853125;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the subnetworks at the given index.

getSubnetworksCount()

public int getSubnetworksCount()

[Output Only] Server-defined fully-qualified URLs for all subnetworks in this VPC network.

repeated string subnetworks = 415853125;

Returns
TypeDescription
int

The count of subnetworks.

getSubnetworksList()

public ProtocolStringList getSubnetworksList()

[Output Only] Server-defined fully-qualified URLs for all subnetworks in this VPC network.

repeated string subnetworks = 415853125;

Returns
TypeDescription
ProtocolStringList

A list containing the subnetworks.

hasAutoCreateSubnetworks()

public boolean hasAutoCreateSubnetworks()

Must be set to create a VPC network. If not set, a legacy network is created. When set to true, the VPC network is created in auto mode. When set to false, the VPC network is created in custom mode. An auto mode VPC network starts with one subnet per region. Each subnet has a predetermined range as described in Auto mode VPC network IP ranges. For custom mode VPC networks, you can add subnets using the subnetworks insert method.

optional bool auto_create_subnetworks = 256156690;

Returns
TypeDescription
boolean

Whether the autoCreateSubnetworks field is set.

hasCreationTimestamp()

public boolean hasCreationTimestamp()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
boolean

Whether the creationTimestamp field is set.

hasDescription()

public boolean hasDescription()

An optional description of this resource. Provide this field when you create the resource.

optional string description = 422937596;

Returns
TypeDescription
boolean

Whether the description field is set.

hasEnableUlaInternalIpv6()

public boolean hasEnableUlaInternalIpv6()

Enable ULA internal ipv6 on this network. Enabling this feature will assign a /48 from google defined ULA prefix fd20::/20. .

optional bool enable_ula_internal_ipv6 = 423757720;

Returns
TypeDescription
boolean

Whether the enableUlaInternalIpv6 field is set.

hasFirewallPolicy()

public boolean hasFirewallPolicy()

[Output Only] URL of the firewall policy the network is associated with.

optional string firewall_policy = 498173265;

Returns
TypeDescription
boolean

Whether the firewallPolicy field is set.

hasGatewayIPv4()

public boolean hasGatewayIPv4()

[Output Only] The gateway address for default routing out of the network, selected by Google Cloud.

optional string gateway_i_pv4 = 178678877;

Returns
TypeDescription
boolean

Whether the gatewayIPv4 field is set.

hasIPv4Range()

public boolean hasIPv4Range()

Deprecated in favor of subnet mode networks. The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16. Provided by the client when the network is created.

optional string I_pv4_range = 59234358;

Returns
TypeDescription
boolean

Whether the iPv4Range field is set.

hasId()

public boolean hasId()

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Returns
TypeDescription
boolean

Whether the id field is set.

hasInternalIpv6Range()

public boolean hasInternalIpv6Range()

When enabling ula internal ipv6, caller optionally can specify the /48 range they want from the google defined ULA prefix fd20::/20. The input must be a valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will fail if the speficied /48 is already in used by another resource. If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. .

optional string internal_ipv6_range = 277456807;

Returns
TypeDescription
boolean

Whether the internalIpv6Range field is set.

hasKind()

public boolean hasKind()

[Output Only] Type of the resource. Always compute#network for networks.

optional string kind = 3292052;

Returns
TypeDescription
boolean

Whether the kind field is set.

hasMtu()

public boolean hasMtu()

Maximum Transmission Unit in bytes. The minimum value for this field is 1300 and the maximum value is 8896. The suggested value is 1500, which is the default MTU used on the Internet, or 8896 if you want to use Jumbo frames. If unspecified, the value defaults to 1460.

optional int32 mtu = 108462;

Returns
TypeDescription
boolean

Whether the mtu field is set.

hasName()

public boolean hasName()

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.

optional string name = 3373707;

Returns
TypeDescription
boolean

Whether the name field is set.

hasNetworkFirewallPolicyEnforcementOrder()

public boolean hasNetworkFirewallPolicyEnforcementOrder()

The network firewall policy enforcement order. Can be either AFTER_CLASSIC_FIREWALL or BEFORE_CLASSIC_FIREWALL. Defaults to AFTER_CLASSIC_FIREWALL if the field is not specified. Check the NetworkFirewallPolicyEnforcementOrder enum for the list of possible values.

optional string network_firewall_policy_enforcement_order = 6504784;

Returns
TypeDescription
boolean

Whether the networkFirewallPolicyEnforcementOrder field is set.

hasRoutingConfig()

public boolean hasRoutingConfig()

The network-level routing configuration for this network. Used by Cloud Router to determine what type of network-wide routing behavior to enforce.

optional .google.cloud.compute.v1.NetworkRoutingConfig routing_config = 523556059;

Returns
TypeDescription
boolean

Whether the routingConfig field is set.

public boolean hasSelfLink()

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Returns
TypeDescription
boolean

Whether the selfLink field is set.

hasSelfLinkWithId()

public boolean hasSelfLinkWithId()

[Output Only] Server-defined URL for this resource with the resource id.

optional string self_link_with_id = 44520962;

Returns
TypeDescription
boolean

Whether the selfLinkWithId field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Network other)

public Network.Builder mergeFrom(Network other)
Parameter
NameDescription
otherNetwork
Returns
TypeDescription
Network.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Network.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Network.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Network.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Network.Builder
Overrides

mergeRoutingConfig(NetworkRoutingConfig value)

public Network.Builder mergeRoutingConfig(NetworkRoutingConfig value)

The network-level routing configuration for this network. Used by Cloud Router to determine what type of network-wide routing behavior to enforce.

optional .google.cloud.compute.v1.NetworkRoutingConfig routing_config = 523556059;

Parameter
NameDescription
valueNetworkRoutingConfig
Returns
TypeDescription
Network.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Network.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Network.Builder
Overrides

removePeerings(int index)

public Network.Builder removePeerings(int index)

[Output Only] A list of network peerings for the resource.

repeated .google.cloud.compute.v1.NetworkPeering peerings = 69883187;

Parameter
NameDescription
indexint
Returns
TypeDescription
Network.Builder

setAutoCreateSubnetworks(boolean value)

public Network.Builder setAutoCreateSubnetworks(boolean value)

Must be set to create a VPC network. If not set, a legacy network is created. When set to true, the VPC network is created in auto mode. When set to false, the VPC network is created in custom mode. An auto mode VPC network starts with one subnet per region. Each subnet has a predetermined range as described in Auto mode VPC network IP ranges. For custom mode VPC networks, you can add subnets using the subnetworks insert method.

optional bool auto_create_subnetworks = 256156690;

Parameter
NameDescription
valueboolean

The autoCreateSubnetworks to set.

Returns
TypeDescription
Network.Builder

This builder for chaining.

setCreationTimestamp(String value)

public Network.Builder setCreationTimestamp(String value)

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Parameter
NameDescription
valueString

The creationTimestamp to set.

Returns
TypeDescription
Network.Builder

This builder for chaining.

setCreationTimestampBytes(ByteString value)

public Network.Builder setCreationTimestampBytes(ByteString value)

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Parameter
NameDescription
valueByteString

The bytes for creationTimestamp to set.

Returns
TypeDescription
Network.Builder

This builder for chaining.

setDescription(String value)

public Network.Builder setDescription(String value)

An optional description of this resource. Provide this field when you create the resource.

optional string description = 422937596;

Parameter
NameDescription
valueString

The description to set.

Returns
TypeDescription
Network.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Network.Builder setDescriptionBytes(ByteString value)

An optional description of this resource. Provide this field when you create the resource.

optional string description = 422937596;

Parameter
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
Network.Builder

This builder for chaining.

setEnableUlaInternalIpv6(boolean value)

public Network.Builder setEnableUlaInternalIpv6(boolean value)

Enable ULA internal ipv6 on this network. Enabling this feature will assign a /48 from google defined ULA prefix fd20::/20. .

optional bool enable_ula_internal_ipv6 = 423757720;

Parameter
NameDescription
valueboolean

The enableUlaInternalIpv6 to set.

Returns
TypeDescription
Network.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Network.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Network.Builder
Overrides

setFirewallPolicy(String value)

public Network.Builder setFirewallPolicy(String value)

[Output Only] URL of the firewall policy the network is associated with.

optional string firewall_policy = 498173265;

Parameter
NameDescription
valueString

The firewallPolicy to set.

Returns
TypeDescription
Network.Builder

This builder for chaining.

setFirewallPolicyBytes(ByteString value)

public Network.Builder setFirewallPolicyBytes(ByteString value)

[Output Only] URL of the firewall policy the network is associated with.

optional string firewall_policy = 498173265;

Parameter
NameDescription
valueByteString

The bytes for firewallPolicy to set.

Returns
TypeDescription
Network.Builder

This builder for chaining.

setGatewayIPv4(String value)

public Network.Builder setGatewayIPv4(String value)

[Output Only] The gateway address for default routing out of the network, selected by Google Cloud.

optional string gateway_i_pv4 = 178678877;

Parameter
NameDescription
valueString

The gatewayIPv4 to set.

Returns
TypeDescription
Network.Builder

This builder for chaining.

setGatewayIPv4Bytes(ByteString value)

public Network.Builder setGatewayIPv4Bytes(ByteString value)

[Output Only] The gateway address for default routing out of the network, selected by Google Cloud.

optional string gateway_i_pv4 = 178678877;

Parameter
NameDescription
valueByteString

The bytes for gatewayIPv4 to set.

Returns
TypeDescription
Network.Builder

This builder for chaining.

setIPv4Range(String value)

public Network.Builder setIPv4Range(String value)

Deprecated in favor of subnet mode networks. The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16. Provided by the client when the network is created.

optional string I_pv4_range = 59234358;

Parameter
NameDescription
valueString

The iPv4Range to set.

Returns
TypeDescription
Network.Builder

This builder for chaining.

setIPv4RangeBytes(ByteString value)

public Network.Builder setIPv4RangeBytes(ByteString value)

Deprecated in favor of subnet mode networks. The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16. Provided by the client when the network is created.

optional string I_pv4_range = 59234358;

Parameter
NameDescription
valueByteString

The bytes for iPv4Range to set.

Returns
TypeDescription
Network.Builder

This builder for chaining.

setId(long value)

public Network.Builder setId(long value)

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Parameter
NameDescription
valuelong

The id to set.

Returns
TypeDescription
Network.Builder

This builder for chaining.

setInternalIpv6Range(String value)

public Network.Builder setInternalIpv6Range(String value)

When enabling ula internal ipv6, caller optionally can specify the /48 range they want from the google defined ULA prefix fd20::/20. The input must be a valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will fail if the speficied /48 is already in used by another resource. If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. .

optional string internal_ipv6_range = 277456807;

Parameter
NameDescription
valueString

The internalIpv6Range to set.

Returns
TypeDescription
Network.Builder

This builder for chaining.

setInternalIpv6RangeBytes(ByteString value)

public Network.Builder setInternalIpv6RangeBytes(ByteString value)

When enabling ula internal ipv6, caller optionally can specify the /48 range they want from the google defined ULA prefix fd20::/20. The input must be a valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will fail if the speficied /48 is already in used by another resource. If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. .

optional string internal_ipv6_range = 277456807;

Parameter
NameDescription
valueByteString

The bytes for internalIpv6Range to set.

Returns
TypeDescription
Network.Builder

This builder for chaining.

setKind(String value)

public Network.Builder setKind(String value)

[Output Only] Type of the resource. Always compute#network for networks.

optional string kind = 3292052;

Parameter
NameDescription
valueString

The kind to set.

Returns
TypeDescription
Network.Builder

This builder for chaining.

setKindBytes(ByteString value)

public Network.Builder setKindBytes(ByteString value)

[Output Only] Type of the resource. Always compute#network for networks.

optional string kind = 3292052;

Parameter
NameDescription
valueByteString

The bytes for kind to set.

Returns
TypeDescription
Network.Builder

This builder for chaining.

setMtu(int value)

public Network.Builder setMtu(int value)

Maximum Transmission Unit in bytes. The minimum value for this field is 1300 and the maximum value is 8896. The suggested value is 1500, which is the default MTU used on the Internet, or 8896 if you want to use Jumbo frames. If unspecified, the value defaults to 1460.

optional int32 mtu = 108462;

Parameter
NameDescription
valueint

The mtu to set.

Returns
TypeDescription
Network.Builder

This builder for chaining.

setName(String value)

public Network.Builder setName(String value)

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.

optional string name = 3373707;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Network.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Network.Builder setNameBytes(ByteString value)

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.

optional string name = 3373707;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Network.Builder

This builder for chaining.

setNetworkFirewallPolicyEnforcementOrder(String value)

public Network.Builder setNetworkFirewallPolicyEnforcementOrder(String value)

The network firewall policy enforcement order. Can be either AFTER_CLASSIC_FIREWALL or BEFORE_CLASSIC_FIREWALL. Defaults to AFTER_CLASSIC_FIREWALL if the field is not specified. Check the NetworkFirewallPolicyEnforcementOrder enum for the list of possible values.

optional string network_firewall_policy_enforcement_order = 6504784;

Parameter
NameDescription
valueString

The networkFirewallPolicyEnforcementOrder to set.

Returns
TypeDescription
Network.Builder

This builder for chaining.

setNetworkFirewallPolicyEnforcementOrderBytes(ByteString value)

public Network.Builder setNetworkFirewallPolicyEnforcementOrderBytes(ByteString value)

The network firewall policy enforcement order. Can be either AFTER_CLASSIC_FIREWALL or BEFORE_CLASSIC_FIREWALL. Defaults to AFTER_CLASSIC_FIREWALL if the field is not specified. Check the NetworkFirewallPolicyEnforcementOrder enum for the list of possible values.

optional string network_firewall_policy_enforcement_order = 6504784;

Parameter
NameDescription
valueByteString

The bytes for networkFirewallPolicyEnforcementOrder to set.

Returns
TypeDescription
Network.Builder

This builder for chaining.

setPeerings(int index, NetworkPeering value)

public Network.Builder setPeerings(int index, NetworkPeering value)

[Output Only] A list of network peerings for the resource.

repeated .google.cloud.compute.v1.NetworkPeering peerings = 69883187;

Parameters
NameDescription
indexint
valueNetworkPeering
Returns
TypeDescription
Network.Builder

setPeerings(int index, NetworkPeering.Builder builderForValue)

public Network.Builder setPeerings(int index, NetworkPeering.Builder builderForValue)

[Output Only] A list of network peerings for the resource.

repeated .google.cloud.compute.v1.NetworkPeering peerings = 69883187;

Parameters
NameDescription
indexint
builderForValueNetworkPeering.Builder
Returns
TypeDescription
Network.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Network.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Network.Builder
Overrides

setRoutingConfig(NetworkRoutingConfig value)

public Network.Builder setRoutingConfig(NetworkRoutingConfig value)

The network-level routing configuration for this network. Used by Cloud Router to determine what type of network-wide routing behavior to enforce.

optional .google.cloud.compute.v1.NetworkRoutingConfig routing_config = 523556059;

Parameter
NameDescription
valueNetworkRoutingConfig
Returns
TypeDescription
Network.Builder

setRoutingConfig(NetworkRoutingConfig.Builder builderForValue)

public Network.Builder setRoutingConfig(NetworkRoutingConfig.Builder builderForValue)

The network-level routing configuration for this network. Used by Cloud Router to determine what type of network-wide routing behavior to enforce.

optional .google.cloud.compute.v1.NetworkRoutingConfig routing_config = 523556059;

Parameter
NameDescription
builderForValueNetworkRoutingConfig.Builder
Returns
TypeDescription
Network.Builder
public Network.Builder setSelfLink(String value)

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Parameter
NameDescription
valueString

The selfLink to set.

Returns
TypeDescription
Network.Builder

This builder for chaining.

setSelfLinkBytes(ByteString value)

public Network.Builder setSelfLinkBytes(ByteString value)

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Parameter
NameDescription
valueByteString

The bytes for selfLink to set.

Returns
TypeDescription
Network.Builder

This builder for chaining.

setSelfLinkWithId(String value)

public Network.Builder setSelfLinkWithId(String value)

[Output Only] Server-defined URL for this resource with the resource id.

optional string self_link_with_id = 44520962;

Parameter
NameDescription
valueString

The selfLinkWithId to set.

Returns
TypeDescription
Network.Builder

This builder for chaining.

setSelfLinkWithIdBytes(ByteString value)

public Network.Builder setSelfLinkWithIdBytes(ByteString value)

[Output Only] Server-defined URL for this resource with the resource id.

optional string self_link_with_id = 44520962;

Parameter
NameDescription
valueByteString

The bytes for selfLinkWithId to set.

Returns
TypeDescription
Network.Builder

This builder for chaining.

setSubnetworks(int index, String value)

public Network.Builder setSubnetworks(int index, String value)

[Output Only] Server-defined fully-qualified URLs for all subnetworks in this VPC network.

repeated string subnetworks = 415853125;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The subnetworks to set.

Returns
TypeDescription
Network.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Network.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Network.Builder
Overrides