Class NetworkPeering (1.64.0)

public final class NetworkPeering extends GeneratedMessageV3 implements NetworkPeeringOrBuilder

A network peering attached to a network resource. The message includes the peering name, peer network, peering state, and a flag indicating whether Google Compute Engine should automatically create routes for the peering.

Protobuf type google.cloud.compute.v1.NetworkPeering

Static Fields

AUTO_CREATE_ROUTES_FIELD_NUMBER

public static final int AUTO_CREATE_ROUTES_FIELD_NUMBER
Field Value
Type Description
int

EXCHANGE_SUBNET_ROUTES_FIELD_NUMBER

public static final int EXCHANGE_SUBNET_ROUTES_FIELD_NUMBER
Field Value
Type Description
int

EXPORT_CUSTOM_ROUTES_FIELD_NUMBER

public static final int EXPORT_CUSTOM_ROUTES_FIELD_NUMBER
Field Value
Type Description
int

EXPORT_SUBNET_ROUTES_WITH_PUBLIC_IP_FIELD_NUMBER

public static final int EXPORT_SUBNET_ROUTES_WITH_PUBLIC_IP_FIELD_NUMBER
Field Value
Type Description
int

IMPORT_CUSTOM_ROUTES_FIELD_NUMBER

public static final int IMPORT_CUSTOM_ROUTES_FIELD_NUMBER
Field Value
Type Description
int

IMPORT_SUBNET_ROUTES_WITH_PUBLIC_IP_FIELD_NUMBER

public static final int IMPORT_SUBNET_ROUTES_WITH_PUBLIC_IP_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

NETWORK_FIELD_NUMBER

public static final int NETWORK_FIELD_NUMBER
Field Value
Type Description
int

PEER_MTU_FIELD_NUMBER

public static final int PEER_MTU_FIELD_NUMBER
Field Value
Type Description
int

STACK_TYPE_FIELD_NUMBER

public static final int STACK_TYPE_FIELD_NUMBER
Field Value
Type Description
int

STATE_DETAILS_FIELD_NUMBER

public static final int STATE_DETAILS_FIELD_NUMBER
Field Value
Type Description
int

STATE_FIELD_NUMBER

public static final int STATE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static NetworkPeering getDefaultInstance()
Returns
Type Description
NetworkPeering

getDescriptor()

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

newBuilder()

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

newBuilder(NetworkPeering prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getAutoCreateRoutes()

public boolean getAutoCreateRoutes()

This field will be deprecated soon. Use the exchange_subnet_routes field instead. Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE.

optional bool auto_create_routes = 57454941;

Returns
Type Description
boolean

The autoCreateRoutes.

getDefaultInstanceForType()

public NetworkPeering getDefaultInstanceForType()
Returns
Type Description
NetworkPeering

getExchangeSubnetRoutes()

public boolean getExchangeSubnetRoutes()

Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE.

optional bool exchange_subnet_routes = 26322256;

Returns
Type Description
boolean

The exchangeSubnetRoutes.

getExportCustomRoutes()

public boolean getExportCustomRoutes()

Whether to export the custom routes to peer network. The default value is false.

optional bool export_custom_routes = 60281485;

Returns
Type Description
boolean

The exportCustomRoutes.

getExportSubnetRoutesWithPublicIp()

public boolean getExportSubnetRoutesWithPublicIp()

Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. IPv4 special-use ranges are always exported to peers and are not controlled by this field.

optional bool export_subnet_routes_with_public_ip = 97940834;

Returns
Type Description
boolean

The exportSubnetRoutesWithPublicIp.

getImportCustomRoutes()

public boolean getImportCustomRoutes()

Whether to import the custom routes from peer network. The default value is false.

optional bool import_custom_routes = 197982398;

Returns
Type Description
boolean

The importCustomRoutes.

getImportSubnetRoutesWithPublicIp()

public boolean getImportSubnetRoutesWithPublicIp()

Whether subnet routes with public IP range are imported. The default value is false. IPv4 special-use ranges are always imported from peers and are not controlled by this field.

optional bool import_subnet_routes_with_public_ip = 14419729;

Returns
Type Description
boolean

The importSubnetRoutesWithPublicIp.

getName()

public String getName()

Name of this peering. Provided by the client when the peering is created. The name must comply with RFC1035. Specifically, the name must be 1-63 characters long and match regular expression a-z?. The first character must be a lowercase letter, and all the 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 this peering. Provided by the client when the peering is created. The name must comply with RFC1035. Specifically, the name must be 1-63 characters long and match regular expression a-z?. The first character must be a lowercase letter, and all the 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.

getNetwork()

public String getNetwork()

The URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network.

optional string network = 232872494;

Returns
Type Description
String

The network.

getNetworkBytes()

public ByteString getNetworkBytes()

The URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network.

optional string network = 232872494;

Returns
Type Description
ByteString

The bytes for network.

getParserForType()

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

getPeerMtu()

public int getPeerMtu()

Maximum Transmission Unit in bytes.

optional int32 peer_mtu = 69584721;

Returns
Type Description
int

The peerMtu.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getStackType()

public String getStackType()

Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Check the StackType enum for the list of possible values.

optional string stack_type = 425908881;

Returns
Type Description
String

The stackType.

getStackTypeBytes()

public ByteString getStackTypeBytes()

Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Check the StackType enum for the list of possible values.

optional string stack_type = 425908881;

Returns
Type Description
ByteString

The bytes for stackType.

getState()

public String getState()

[Output Only] State for the peering, either ACTIVE or INACTIVE. The peering is ACTIVE when there's a matching configuration in the peer network. Check the State enum for the list of possible values.

optional string state = 109757585;

Returns
Type Description
String

The state.

getStateBytes()

public ByteString getStateBytes()

[Output Only] State for the peering, either ACTIVE or INACTIVE. The peering is ACTIVE when there's a matching configuration in the peer network. Check the State enum for the list of possible values.

optional string state = 109757585;

Returns
Type Description
ByteString

The bytes for state.

getStateDetails()

public String getStateDetails()

[Output Only] Details about the current state of the peering.

optional string state_details = 95566996;

Returns
Type Description
String

The stateDetails.

getStateDetailsBytes()

public ByteString getStateDetailsBytes()

[Output Only] Details about the current state of the peering.

optional string state_details = 95566996;

Returns
Type Description
ByteString

The bytes for stateDetails.

hasAutoCreateRoutes()

public boolean hasAutoCreateRoutes()

This field will be deprecated soon. Use the exchange_subnet_routes field instead. Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE.

optional bool auto_create_routes = 57454941;

Returns
Type Description
boolean

Whether the autoCreateRoutes field is set.

hasExchangeSubnetRoutes()

public boolean hasExchangeSubnetRoutes()

Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE.

optional bool exchange_subnet_routes = 26322256;

Returns
Type Description
boolean

Whether the exchangeSubnetRoutes field is set.

hasExportCustomRoutes()

public boolean hasExportCustomRoutes()

Whether to export the custom routes to peer network. The default value is false.

optional bool export_custom_routes = 60281485;

Returns
Type Description
boolean

Whether the exportCustomRoutes field is set.

hasExportSubnetRoutesWithPublicIp()

public boolean hasExportSubnetRoutesWithPublicIp()

Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. IPv4 special-use ranges are always exported to peers and are not controlled by this field.

optional bool export_subnet_routes_with_public_ip = 97940834;

Returns
Type Description
boolean

Whether the exportSubnetRoutesWithPublicIp field is set.

hasImportCustomRoutes()

public boolean hasImportCustomRoutes()

Whether to import the custom routes from peer network. The default value is false.

optional bool import_custom_routes = 197982398;

Returns
Type Description
boolean

Whether the importCustomRoutes field is set.

hasImportSubnetRoutesWithPublicIp()

public boolean hasImportSubnetRoutesWithPublicIp()

Whether subnet routes with public IP range are imported. The default value is false. IPv4 special-use ranges are always imported from peers and are not controlled by this field.

optional bool import_subnet_routes_with_public_ip = 14419729;

Returns
Type Description
boolean

Whether the importSubnetRoutesWithPublicIp field is set.

hasName()

public boolean hasName()

Name of this peering. Provided by the client when the peering is created. The name must comply with RFC1035. Specifically, the name must be 1-63 characters long and match regular expression a-z?. The first character must be a lowercase letter, and all the 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()

The URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network.

optional string network = 232872494;

Returns
Type Description
boolean

Whether the network field is set.

hasPeerMtu()

public boolean hasPeerMtu()

Maximum Transmission Unit in bytes.

optional int32 peer_mtu = 69584721;

Returns
Type Description
boolean

Whether the peerMtu field is set.

hasStackType()

public boolean hasStackType()

Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Check the StackType enum for the list of possible values.

optional string stack_type = 425908881;

Returns
Type Description
boolean

Whether the stackType field is set.

hasState()

public boolean hasState()

[Output Only] State for the peering, either ACTIVE or INACTIVE. The peering is ACTIVE when there's a matching configuration in the peer network. Check the State enum for the list of possible values.

optional string state = 109757585;

Returns
Type Description
boolean

Whether the state field is set.

hasStateDetails()

public boolean hasStateDetails()

[Output Only] Details about the current state of the peering.

optional string state_details = 95566996;

Returns
Type Description
boolean

Whether the stateDetails 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 NetworkPeering.Builder newBuilderForType()
Returns
Type Description
NetworkPeering.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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