Class NetworkPeering (1.9.1)

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
TypeDescription
int

EXCHANGE_SUBNET_ROUTES_FIELD_NUMBER

public static final int EXCHANGE_SUBNET_ROUTES_FIELD_NUMBER
Field Value
TypeDescription
int

EXPORT_CUSTOM_ROUTES_FIELD_NUMBER

public static final int EXPORT_CUSTOM_ROUTES_FIELD_NUMBER
Field Value
TypeDescription
int

EXPORT_SUBNET_ROUTES_WITH_PUBLIC_IP_FIELD_NUMBER

public static final int EXPORT_SUBNET_ROUTES_WITH_PUBLIC_IP_FIELD_NUMBER
Field Value
TypeDescription
int

IMPORT_CUSTOM_ROUTES_FIELD_NUMBER

public static final int IMPORT_CUSTOM_ROUTES_FIELD_NUMBER
Field Value
TypeDescription
int

IMPORT_SUBNET_ROUTES_WITH_PUBLIC_IP_FIELD_NUMBER

public static final int IMPORT_SUBNET_ROUTES_WITH_PUBLIC_IP_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

NETWORK_FIELD_NUMBER

public static final int NETWORK_FIELD_NUMBER
Field Value
TypeDescription
int

PEER_MTU_FIELD_NUMBER

public static final int PEER_MTU_FIELD_NUMBER
Field Value
TypeDescription
int

STATE_DETAILS_FIELD_NUMBER

public static final int STATE_DETAILS_FIELD_NUMBER
Field Value
TypeDescription
int

STATE_FIELD_NUMBER

public static final int STATE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static NetworkPeering getDefaultInstance()
Returns
TypeDescription
NetworkPeering

getDescriptor()

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

newBuilder()

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

newBuilder(NetworkPeering prototype)

public static NetworkPeering.Builder newBuilder(NetworkPeering prototype)
Parameter
NameDescription
prototypeNetworkPeering
Returns
TypeDescription
NetworkPeering.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
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
TypeDescription
boolean

The autoCreateRoutes.

getDefaultInstanceForType()

public NetworkPeering getDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for network.

getParserForType()

public Parser<NetworkPeering> getParserForType()
Returns
TypeDescription
Parser<NetworkPeering>
Overrides

getPeerMtu()

public int getPeerMtu()

Maximum Transmission Unit in bytes.

optional int32 peer_mtu = 69584721;

Returns
TypeDescription
int

The peerMtu.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

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
TypeDescription
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
TypeDescription
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
TypeDescription
String

The stateDetails.

getStateDetailsBytes()

public ByteString getStateDetailsBytes()

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

optional string state_details = 95566996;

Returns
TypeDescription
ByteString

The bytes for stateDetails.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

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

Whether the network field is set.

hasPeerMtu()

public boolean hasPeerMtu()

Maximum Transmission Unit in bytes.

optional int32 peer_mtu = 69584721;

Returns
TypeDescription
boolean

Whether the peerMtu 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
TypeDescription
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
TypeDescription
boolean

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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