Class Router (1.58.0)

public final class Router extends GeneratedMessageV3 implements RouterOrBuilder

Represents a Cloud Router resource. For more information about Cloud Router, read the Cloud Router overview.

Protobuf type google.cloud.compute.v1.Router

Implements

RouterOrBuilder

Static Fields

BGP_FIELD_NUMBER

public static final int BGP_FIELD_NUMBER
Field Value
Type Description
int

BGP_PEERS_FIELD_NUMBER

public static final int BGP_PEERS_FIELD_NUMBER
Field Value
Type Description
int

CREATION_TIMESTAMP_FIELD_NUMBER

public static final int CREATION_TIMESTAMP_FIELD_NUMBER
Field Value
Type Description
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
Type Description
int

ENCRYPTED_INTERCONNECT_ROUTER_FIELD_NUMBER

public static final int ENCRYPTED_INTERCONNECT_ROUTER_FIELD_NUMBER
Field Value
Type Description
int

ID_FIELD_NUMBER

public static final int ID_FIELD_NUMBER
Field Value
Type Description
int

INTERFACES_FIELD_NUMBER

public static final int INTERFACES_FIELD_NUMBER
Field Value
Type Description
int

KIND_FIELD_NUMBER

public static final int KIND_FIELD_NUMBER
Field Value
Type Description
int

MD5_AUTHENTICATION_KEYS_FIELD_NUMBER

public static final int MD5_AUTHENTICATION_KEYS_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

NATS_FIELD_NUMBER

public static final int NATS_FIELD_NUMBER
Field Value
Type Description
int

NETWORK_FIELD_NUMBER

public static final int NETWORK_FIELD_NUMBER
Field Value
Type Description
int

REGION_FIELD_NUMBER

public static final int REGION_FIELD_NUMBER
Field Value
Type Description
int
public static final int SELF_LINK_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Router getDefaultInstance()
Returns
Type Description
Router

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static Router.Builder newBuilder()
Returns
Type Description
Router.Builder

newBuilder(Router prototype)

public static Router.Builder newBuilder(Router prototype)
Parameter
Name Description
prototype Router
Returns
Type Description
Router.Builder

parseDelimitedFrom(InputStream input)

public static Router parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Router
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Router parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Router
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Router parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Router
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Router parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Router
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Router parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Router
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Router parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Router
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Router parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Router
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Router parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Router
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Router parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Router
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Router parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Router
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Router parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Router
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Router parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Router
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Router> parser()
Returns
Type Description
Parser<Router>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getBgp()

public RouterBgp getBgp()

BGP information specific to this router.

optional .google.cloud.compute.v1.RouterBgp bgp = 97483;

Returns
Type Description
RouterBgp

The bgp.

getBgpOrBuilder()

public RouterBgpOrBuilder getBgpOrBuilder()

BGP information specific to this router.

optional .google.cloud.compute.v1.RouterBgp bgp = 97483;

Returns
Type Description
RouterBgpOrBuilder

getBgpPeers(int index)

public RouterBgpPeer getBgpPeers(int index)

BGP information that must be configured into the routing stack to establish BGP peering. This information must specify the peer ASN and either the interface name, IP address, or peer IP address. Please refer to RFC4273.

repeated .google.cloud.compute.v1.RouterBgpPeer bgp_peers = 452695773;

Parameter
Name Description
index int
Returns
Type Description
RouterBgpPeer

getBgpPeersCount()

public int getBgpPeersCount()

BGP information that must be configured into the routing stack to establish BGP peering. This information must specify the peer ASN and either the interface name, IP address, or peer IP address. Please refer to RFC4273.

repeated .google.cloud.compute.v1.RouterBgpPeer bgp_peers = 452695773;

Returns
Type Description
int

getBgpPeersList()

public List<RouterBgpPeer> getBgpPeersList()

BGP information that must be configured into the routing stack to establish BGP peering. This information must specify the peer ASN and either the interface name, IP address, or peer IP address. Please refer to RFC4273.

repeated .google.cloud.compute.v1.RouterBgpPeer bgp_peers = 452695773;

Returns
Type Description
List<RouterBgpPeer>

getBgpPeersOrBuilder(int index)

public RouterBgpPeerOrBuilder getBgpPeersOrBuilder(int index)

BGP information that must be configured into the routing stack to establish BGP peering. This information must specify the peer ASN and either the interface name, IP address, or peer IP address. Please refer to RFC4273.

repeated .google.cloud.compute.v1.RouterBgpPeer bgp_peers = 452695773;

Parameter
Name Description
index int
Returns
Type Description
RouterBgpPeerOrBuilder

getBgpPeersOrBuilderList()

public List<? extends RouterBgpPeerOrBuilder> getBgpPeersOrBuilderList()

BGP information that must be configured into the routing stack to establish BGP peering. This information must specify the peer ASN and either the interface name, IP address, or peer IP address. Please refer to RFC4273.

repeated .google.cloud.compute.v1.RouterBgpPeer bgp_peers = 452695773;

Returns
Type Description
List<? extends com.google.cloud.compute.v1.RouterBgpPeerOrBuilder>

getCreationTimestamp()

public String getCreationTimestamp()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
Type Description
String

The creationTimestamp.

getCreationTimestampBytes()

public ByteString getCreationTimestampBytes()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
Type Description
ByteString

The bytes for creationTimestamp.

getDefaultInstanceForType()

public Router getDefaultInstanceForType()
Returns
Type Description
Router

getDescription()

public String getDescription()

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

optional string description = 422937596;

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

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

optional string description = 422937596;

Returns
Type Description
ByteString

The bytes for description.

getEncryptedInterconnectRouter()

public boolean getEncryptedInterconnectRouter()

Indicates if a router is dedicated for use with encrypted VLAN attachments (interconnectAttachments).

optional bool encrypted_interconnect_router = 297996575;

Returns
Type Description
boolean

The encryptedInterconnectRouter.

getId()

public long getId()

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

optional uint64 id = 3355;

Returns
Type Description
long

The id.

getInterfaces(int index)

public RouterInterface getInterfaces(int index)

Router interfaces. To create a BGP peer that uses a router interface, the interface must have one of the following fields specified: - linkedVpnTunnel - linkedInterconnectAttachment - subnetwork You can create a router interface without any of these fields specified. However, you cannot create a BGP peer that uses that interface.

repeated .google.cloud.compute.v1.RouterInterface interfaces = 12073562;

Parameter
Name Description
index int
Returns
Type Description
RouterInterface

getInterfacesCount()

public int getInterfacesCount()

Router interfaces. To create a BGP peer that uses a router interface, the interface must have one of the following fields specified: - linkedVpnTunnel - linkedInterconnectAttachment - subnetwork You can create a router interface without any of these fields specified. However, you cannot create a BGP peer that uses that interface.

repeated .google.cloud.compute.v1.RouterInterface interfaces = 12073562;

Returns
Type Description
int

getInterfacesList()

public List<RouterInterface> getInterfacesList()

Router interfaces. To create a BGP peer that uses a router interface, the interface must have one of the following fields specified: - linkedVpnTunnel - linkedInterconnectAttachment - subnetwork You can create a router interface without any of these fields specified. However, you cannot create a BGP peer that uses that interface.

repeated .google.cloud.compute.v1.RouterInterface interfaces = 12073562;

Returns
Type Description
List<RouterInterface>

getInterfacesOrBuilder(int index)

public RouterInterfaceOrBuilder getInterfacesOrBuilder(int index)

Router interfaces. To create a BGP peer that uses a router interface, the interface must have one of the following fields specified: - linkedVpnTunnel - linkedInterconnectAttachment - subnetwork You can create a router interface without any of these fields specified. However, you cannot create a BGP peer that uses that interface.

repeated .google.cloud.compute.v1.RouterInterface interfaces = 12073562;

Parameter
Name Description
index int
Returns
Type Description
RouterInterfaceOrBuilder

getInterfacesOrBuilderList()

public List<? extends RouterInterfaceOrBuilder> getInterfacesOrBuilderList()

Router interfaces. To create a BGP peer that uses a router interface, the interface must have one of the following fields specified: - linkedVpnTunnel - linkedInterconnectAttachment - subnetwork You can create a router interface without any of these fields specified. However, you cannot create a BGP peer that uses that interface.

repeated .google.cloud.compute.v1.RouterInterface interfaces = 12073562;

Returns
Type Description
List<? extends com.google.cloud.compute.v1.RouterInterfaceOrBuilder>

getKind()

public String getKind()

[Output Only] Type of resource. Always compute#router for routers.

optional string kind = 3292052;

Returns
Type Description
String

The kind.

getKindBytes()

public ByteString getKindBytes()

[Output Only] Type of resource. Always compute#router for routers.

optional string kind = 3292052;

Returns
Type Description
ByteString

The bytes for kind.

getMd5AuthenticationKeys(int index)

public RouterMd5AuthenticationKey getMd5AuthenticationKeys(int index)

Keys used for MD5 authentication.

repeated .google.cloud.compute.v1.RouterMd5AuthenticationKey md5_authentication_keys = 71063322;

Parameter
Name Description
index int
Returns
Type Description
RouterMd5AuthenticationKey

getMd5AuthenticationKeysCount()

public int getMd5AuthenticationKeysCount()

Keys used for MD5 authentication.

repeated .google.cloud.compute.v1.RouterMd5AuthenticationKey md5_authentication_keys = 71063322;

Returns
Type Description
int

getMd5AuthenticationKeysList()

public List<RouterMd5AuthenticationKey> getMd5AuthenticationKeysList()

Keys used for MD5 authentication.

repeated .google.cloud.compute.v1.RouterMd5AuthenticationKey md5_authentication_keys = 71063322;

Returns
Type Description
List<RouterMd5AuthenticationKey>

getMd5AuthenticationKeysOrBuilder(int index)

public RouterMd5AuthenticationKeyOrBuilder getMd5AuthenticationKeysOrBuilder(int index)

Keys used for MD5 authentication.

repeated .google.cloud.compute.v1.RouterMd5AuthenticationKey md5_authentication_keys = 71063322;

Parameter
Name Description
index int
Returns
Type Description
RouterMd5AuthenticationKeyOrBuilder

getMd5AuthenticationKeysOrBuilderList()

public List<? extends RouterMd5AuthenticationKeyOrBuilder> getMd5AuthenticationKeysOrBuilderList()

Keys used for MD5 authentication.

repeated .google.cloud.compute.v1.RouterMd5AuthenticationKey md5_authentication_keys = 71063322;

Returns
Type Description
List<? extends com.google.cloud.compute.v1.RouterMd5AuthenticationKeyOrBuilder>

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? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Returns
Type Description
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? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Returns
Type Description
ByteString

The bytes for name.

getNats(int index)

public RouterNat getNats(int index)

A list of NAT services created in this router.

repeated .google.cloud.compute.v1.RouterNat nats = 3373938;

Parameter
Name Description
index int
Returns
Type Description
RouterNat

getNatsCount()

public int getNatsCount()

A list of NAT services created in this router.

repeated .google.cloud.compute.v1.RouterNat nats = 3373938;

Returns
Type Description
int

getNatsList()

public List<RouterNat> getNatsList()

A list of NAT services created in this router.

repeated .google.cloud.compute.v1.RouterNat nats = 3373938;

Returns
Type Description
List<RouterNat>

getNatsOrBuilder(int index)

public RouterNatOrBuilder getNatsOrBuilder(int index)

A list of NAT services created in this router.

repeated .google.cloud.compute.v1.RouterNat nats = 3373938;

Parameter
Name Description
index int
Returns
Type Description
RouterNatOrBuilder

getNatsOrBuilderList()

public List<? extends RouterNatOrBuilder> getNatsOrBuilderList()

A list of NAT services created in this router.

repeated .google.cloud.compute.v1.RouterNat nats = 3373938;

Returns
Type Description
List<? extends com.google.cloud.compute.v1.RouterNatOrBuilder>

getNetwork()

public String getNetwork()

URI of the network to which this router belongs.

optional string network = 232872494;

Returns
Type Description
String

The network.

getNetworkBytes()

public ByteString getNetworkBytes()

URI of the network to which this router belongs.

optional string network = 232872494;

Returns
Type Description
ByteString

The bytes for network.

getParserForType()

public Parser<Router> getParserForType()
Returns
Type Description
Parser<Router>
Overrides

getRegion()

public String getRegion()

[Output Only] URI of the region where the router resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.

optional string region = 138946292;

Returns
Type Description
String

The region.

getRegionBytes()

public ByteString getRegionBytes()

[Output Only] URI of the region where the router resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.

optional string region = 138946292;

Returns
Type Description
ByteString

The bytes for region.

public String getSelfLink()

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

optional string self_link = 456214797;

Returns
Type Description
String

The selfLink.

getSelfLinkBytes()

public ByteString getSelfLinkBytes()

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

optional string self_link = 456214797;

Returns
Type Description
ByteString

The bytes for selfLink.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasBgp()

public boolean hasBgp()

BGP information specific to this router.

optional .google.cloud.compute.v1.RouterBgp bgp = 97483;

Returns
Type Description
boolean

Whether the bgp field is set.

hasCreationTimestamp()

public boolean hasCreationTimestamp()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
Type Description
boolean

Whether the creationTimestamp field is set.

hasDescription()

public boolean hasDescription()

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

optional string description = 422937596;

Returns
Type Description
boolean

Whether the description field is set.

hasEncryptedInterconnectRouter()

public boolean hasEncryptedInterconnectRouter()

Indicates if a router is dedicated for use with encrypted VLAN attachments (interconnectAttachments).

optional bool encrypted_interconnect_router = 297996575;

Returns
Type Description
boolean

Whether the encryptedInterconnectRouter 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
Type Description
boolean

Whether the id field is set.

hasKind()

public boolean hasKind()

[Output Only] Type of resource. Always compute#router for routers.

optional string kind = 3292052;

Returns
Type Description
boolean

Whether the kind 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? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Returns
Type Description
boolean

Whether the name field is set.

hasNetwork()

public boolean hasNetwork()

URI of the network to which this router belongs.

optional string network = 232872494;

Returns
Type Description
boolean

Whether the network field is set.

hasRegion()

public boolean hasRegion()

[Output Only] URI of the region where the router resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.

optional string region = 138946292;

Returns
Type Description
boolean

Whether the region field is set.

public boolean hasSelfLink()

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

optional string self_link = 456214797;

Returns
Type Description
boolean

Whether the selfLink field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Router.Builder newBuilderForType()
Returns
Type Description
Router.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Router.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Router.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Router.Builder toBuilder()
Returns
Type Description
Router.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException