Class Router (1.50.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
TypeDescription
int

BGP_PEERS_FIELD_NUMBER

public static final int BGP_PEERS_FIELD_NUMBER
Field Value
TypeDescription
int

CREATION_TIMESTAMP_FIELD_NUMBER

public static final int CREATION_TIMESTAMP_FIELD_NUMBER
Field Value
TypeDescription
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
TypeDescription
int

ENCRYPTED_INTERCONNECT_ROUTER_FIELD_NUMBER

public static final int ENCRYPTED_INTERCONNECT_ROUTER_FIELD_NUMBER
Field Value
TypeDescription
int

ID_FIELD_NUMBER

public static final int ID_FIELD_NUMBER
Field Value
TypeDescription
int

INTERFACES_FIELD_NUMBER

public static final int INTERFACES_FIELD_NUMBER
Field Value
TypeDescription
int

KIND_FIELD_NUMBER

public static final int KIND_FIELD_NUMBER
Field Value
TypeDescription
int

MD5_AUTHENTICATION_KEYS_FIELD_NUMBER

public static final int MD5_AUTHENTICATION_KEYS_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

NATS_FIELD_NUMBER

public static final int NATS_FIELD_NUMBER
Field Value
TypeDescription
int

NETWORK_FIELD_NUMBER

public static final int NETWORK_FIELD_NUMBER
Field Value
TypeDescription
int

REGION_FIELD_NUMBER

public static final int REGION_FIELD_NUMBER
Field Value
TypeDescription
int
public static final int SELF_LINK_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Router getDefaultInstance()
Returns
TypeDescription
Router

getDescriptor()

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

newBuilder()

public static Router.Builder newBuilder()
Returns
TypeDescription
Router.Builder

newBuilder(Router prototype)

public static Router.Builder newBuilder(Router prototype)
Parameter
NameDescription
prototypeRouter
Returns
TypeDescription
Router.Builder

parseDelimitedFrom(InputStream input)

public static Router parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Router
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Router parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Router
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Router parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Router
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Router parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Router
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Router parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Router
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Router parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Router
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Router parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Router
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Router parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Router
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Router parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Router
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Router parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Router
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Router parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Router
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Router parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Router
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Router> parser()
Returns
TypeDescription
Parser<Router>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getBgp()

public RouterBgp getBgp()

BGP information specific to this router.

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

Returns
TypeDescription
RouterBgp

The bgp.

getBgpOrBuilder()

public RouterBgpOrBuilder getBgpOrBuilder()

BGP information specific to this router.

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

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
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 Router getDefaultInstanceForType()
Returns
TypeDescription
Router

getDescription()

public String getDescription()

An optional description of this resource. Provide this property 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 property when you create the resource.

optional string description = 422937596;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
String

The kind.

getKindBytes()

public ByteString getKindBytes()

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

optional string kind = 3292052;

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
RouterMd5AuthenticationKey

getMd5AuthenticationKeysCount()

public int getMd5AuthenticationKeysCount()

Keys used for MD5 authentication.

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

Returns
TypeDescription
int

getMd5AuthenticationKeysList()

public List<RouterMd5AuthenticationKey> getMd5AuthenticationKeysList()

Keys used for MD5 authentication.

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

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
RouterMd5AuthenticationKeyOrBuilder

getMd5AuthenticationKeysOrBuilderList()

public List<? extends RouterMd5AuthenticationKeyOrBuilder> getMd5AuthenticationKeysOrBuilderList()

Keys used for MD5 authentication.

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

Returns
TypeDescription
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
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? 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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
RouterNat

getNatsCount()

public int getNatsCount()

A list of NAT services created in this router.

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

Returns
TypeDescription
int

getNatsList()

public List<RouterNat> getNatsList()

A list of NAT services created in this router.

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

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
String

The network.

getNetworkBytes()

public ByteString getNetworkBytes()

URI of the network to which this router belongs.

optional string network = 232872494;

Returns
TypeDescription
ByteString

The bytes for network.

getParserForType()

public Parser<Router> getParserForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for region.

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.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hasBgp()

public boolean hasBgp()

BGP information specific to this router.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the region 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.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Router.Builder newBuilderForType()
Returns
TypeDescription
Router.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Router.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Router.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Router.Builder toBuilder()
Returns
TypeDescription
Router.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException