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
EXCHANGE_SUBNET_ROUTES_FIELD_NUMBER
public static final int EXCHANGE_SUBNET_ROUTES_FIELD_NUMBER
Field Value
EXPORT_CUSTOM_ROUTES_FIELD_NUMBER
public static final int EXPORT_CUSTOM_ROUTES_FIELD_NUMBER
Field Value
EXPORT_SUBNET_ROUTES_WITH_PUBLIC_IP_FIELD_NUMBER
public static final int EXPORT_SUBNET_ROUTES_WITH_PUBLIC_IP_FIELD_NUMBER
Field Value
IMPORT_CUSTOM_ROUTES_FIELD_NUMBER
public static final int IMPORT_CUSTOM_ROUTES_FIELD_NUMBER
Field Value
IMPORT_SUBNET_ROUTES_WITH_PUBLIC_IP_FIELD_NUMBER
public static final int IMPORT_SUBNET_ROUTES_WITH_PUBLIC_IP_FIELD_NUMBER
Field Value
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value
NETWORK_FIELD_NUMBER
public static final int NETWORK_FIELD_NUMBER
Field Value
PEER_MTU_FIELD_NUMBER
public static final int PEER_MTU_FIELD_NUMBER
Field Value
STATE_DETAILS_FIELD_NUMBER
public static final int STATE_DETAILS_FIELD_NUMBER
Field Value
STATE_FIELD_NUMBER
public static final int STATE_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static NetworkPeering getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static NetworkPeering.Builder newBuilder()
Returns
newBuilder(NetworkPeering prototype)
public static NetworkPeering.Builder newBuilder(NetworkPeering prototype)
Parameter
Returns
public static NetworkPeering parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static NetworkPeering parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static NetworkPeering parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static NetworkPeering parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static NetworkPeering parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static NetworkPeering parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static NetworkPeering parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static NetworkPeering parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static NetworkPeering parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static NetworkPeering parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static NetworkPeering parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static NetworkPeering parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<NetworkPeering> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
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
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()
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
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
getParserForType()
public Parser<NetworkPeering> getParserForType()
Returns
Overrides
getPeerMtu()
Maximum Transmission Unit in bytes.
optional int32 peer_mtu = 69584721;
Returns
Type | Description |
int | The peerMtu.
|
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
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
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.
|
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
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
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()
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.
|
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()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public NetworkPeering.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected NetworkPeering.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public NetworkPeering.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions