Class Subnetwork (1.12.1)

public final class Subnetwork extends GeneratedMessageV3 implements SubnetworkOrBuilder

Represents a Subnetwork resource. A subnetwork (also known as a subnet) is a logical partition of a Virtual Private Cloud network with one primary IP range and zero or more secondary IP ranges. For more information, read Virtual Private Cloud (VPC) Network.

Protobuf type google.cloud.compute.v1.Subnetwork

Implements

SubnetworkOrBuilder

Static Fields

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

ENABLE_FLOW_LOGS_FIELD_NUMBER

public static final int ENABLE_FLOW_LOGS_FIELD_NUMBER
Field Value
TypeDescription
int

EXTERNAL_IPV6_PREFIX_FIELD_NUMBER

public static final int EXTERNAL_IPV6_PREFIX_FIELD_NUMBER
Field Value
TypeDescription
int

FINGERPRINT_FIELD_NUMBER

public static final int FINGERPRINT_FIELD_NUMBER
Field Value
TypeDescription
int

GATEWAY_ADDRESS_FIELD_NUMBER

public static final int GATEWAY_ADDRESS_FIELD_NUMBER
Field Value
TypeDescription
int

ID_FIELD_NUMBER

public static final int ID_FIELD_NUMBER
Field Value
TypeDescription
int

INTERNAL_IPV6_PREFIX_FIELD_NUMBER

public static final int INTERNAL_IPV6_PREFIX_FIELD_NUMBER
Field Value
TypeDescription
int

IPV6_ACCESS_TYPE_FIELD_NUMBER

public static final int IPV6_ACCESS_TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

IPV6_CIDR_RANGE_FIELD_NUMBER

public static final int IPV6_CIDR_RANGE_FIELD_NUMBER
Field Value
TypeDescription
int

IP_CIDR_RANGE_FIELD_NUMBER

public static final int IP_CIDR_RANGE_FIELD_NUMBER
Field Value
TypeDescription
int

KIND_FIELD_NUMBER

public static final int KIND_FIELD_NUMBER
Field Value
TypeDescription
int

LOG_CONFIG_FIELD_NUMBER

public static final int LOG_CONFIG_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

PRIVATE_IPV6_GOOGLE_ACCESS_FIELD_NUMBER

public static final int PRIVATE_IPV6_GOOGLE_ACCESS_FIELD_NUMBER
Field Value
TypeDescription
int

PRIVATE_IP_GOOGLE_ACCESS_FIELD_NUMBER

public static final int PRIVATE_IP_GOOGLE_ACCESS_FIELD_NUMBER
Field Value
TypeDescription
int

PURPOSE_FIELD_NUMBER

public static final int PURPOSE_FIELD_NUMBER
Field Value
TypeDescription
int

REGION_FIELD_NUMBER

public static final int REGION_FIELD_NUMBER
Field Value
TypeDescription
int

ROLE_FIELD_NUMBER

public static final int ROLE_FIELD_NUMBER
Field Value
TypeDescription
int

SECONDARY_IP_RANGES_FIELD_NUMBER

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

STACK_TYPE_FIELD_NUMBER

public static final int STACK_TYPE_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 Subnetwork getDefaultInstance()
Returns
TypeDescription
Subnetwork

getDescriptor()

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

newBuilder()

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

newBuilder(Subnetwork prototype)

public static Subnetwork.Builder newBuilder(Subnetwork prototype)
Parameter
NameDescription
prototypeSubnetwork
Returns
TypeDescription
Subnetwork.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

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 Subnetwork getDefaultInstanceForType()
Returns
TypeDescription
Subnetwork

getDescription()

public String getDescription()

An optional description of this resource. Provide this property when you create the resource. This field can be set only at resource creation time.

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. This field can be set only at resource creation time.

optional string description = 422937596;

Returns
TypeDescription
ByteString

The bytes for description.

getEnableFlowLogs()

public boolean getEnableFlowLogs()

Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is determined by the org policy, if there is no org policy specified, then it will default to disabled. This field isn't supported with the purpose field set to INTERNAL_HTTPS_LOAD_BALANCER.

optional bool enable_flow_logs = 151544420;

Returns
TypeDescription
boolean

The enableFlowLogs.

getExternalIpv6Prefix()

public String getExternalIpv6Prefix()

[Output Only] The external IPv6 address range that is assigned to this subnetwork.

optional string external_ipv6_prefix = 139299190;

Returns
TypeDescription
String

The externalIpv6Prefix.

getExternalIpv6PrefixBytes()

public ByteString getExternalIpv6PrefixBytes()

[Output Only] The external IPv6 address range that is assigned to this subnetwork.

optional string external_ipv6_prefix = 139299190;

Returns
TypeDescription
ByteString

The bytes for externalIpv6Prefix.

getFingerprint()

public String getFingerprint()

Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a Subnetwork. An up-to-date fingerprint must be provided in order to update the Subnetwork, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a Subnetwork.

optional string fingerprint = 234678500;

Returns
TypeDescription
String

The fingerprint.

getFingerprintBytes()

public ByteString getFingerprintBytes()

Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a Subnetwork. An up-to-date fingerprint must be provided in order to update the Subnetwork, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a Subnetwork.

optional string fingerprint = 234678500;

Returns
TypeDescription
ByteString

The bytes for fingerprint.

getGatewayAddress()

public String getGatewayAddress()

[Output Only] The gateway address for default routes to reach destination addresses outside this subnetwork.

optional string gateway_address = 459867385;

Returns
TypeDescription
String

The gatewayAddress.

getGatewayAddressBytes()

public ByteString getGatewayAddressBytes()

[Output Only] The gateway address for default routes to reach destination addresses outside this subnetwork.

optional string gateway_address = 459867385;

Returns
TypeDescription
ByteString

The bytes for gatewayAddress.

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.

getInternalIpv6Prefix()

public String getInternalIpv6Prefix()

[Output Only] The internal IPv6 address range that is assigned to this subnetwork.

optional string internal_ipv6_prefix = 506270056;

Returns
TypeDescription
String

The internalIpv6Prefix.

getInternalIpv6PrefixBytes()

public ByteString getInternalIpv6PrefixBytes()

[Output Only] The internal IPv6 address range that is assigned to this subnetwork.

optional string internal_ipv6_prefix = 506270056;

Returns
TypeDescription
ByteString

The bytes for internalIpv6Prefix.

getIpCidrRange()

public String getIpCidrRange()

The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example, 10.0.0.0/8 or 100.64.0.0/10. Ranges must be unique and non-overlapping within a network. Only IPv4 is supported. This field is set at resource creation time. The range can be any range listed in the Valid ranges list. The range can be expanded after creation using expandIpCidrRange.

optional string ip_cidr_range = 98117322;

Returns
TypeDescription
String

The ipCidrRange.

getIpCidrRangeBytes()

public ByteString getIpCidrRangeBytes()

The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example, 10.0.0.0/8 or 100.64.0.0/10. Ranges must be unique and non-overlapping within a network. Only IPv4 is supported. This field is set at resource creation time. The range can be any range listed in the Valid ranges list. The range can be expanded after creation using expandIpCidrRange.

optional string ip_cidr_range = 98117322;

Returns
TypeDescription
ByteString

The bytes for ipCidrRange.

getIpv6AccessType()

public String getIpv6AccessType()

The access type of IPv6 address this subnet holds. It's immutable and can only be specified during creation or the first time the subnet is updated into IPV4_IPV6 dual stack. Check the Ipv6AccessType enum for the list of possible values.

optional string ipv6_access_type = 504658653;

Returns
TypeDescription
String

The ipv6AccessType.

getIpv6AccessTypeBytes()

public ByteString getIpv6AccessTypeBytes()

The access type of IPv6 address this subnet holds. It's immutable and can only be specified during creation or the first time the subnet is updated into IPV4_IPV6 dual stack. Check the Ipv6AccessType enum for the list of possible values.

optional string ipv6_access_type = 504658653;

Returns
TypeDescription
ByteString

The bytes for ipv6AccessType.

getIpv6CidrRange()

public String getIpv6CidrRange()

[Output Only] This field is for internal use.

optional string ipv6_cidr_range = 273141258;

Returns
TypeDescription
String

The ipv6CidrRange.

getIpv6CidrRangeBytes()

public ByteString getIpv6CidrRangeBytes()

[Output Only] This field is for internal use.

optional string ipv6_cidr_range = 273141258;

Returns
TypeDescription
ByteString

The bytes for ipv6CidrRange.

getKind()

public String getKind()

[Output Only] Type of the resource. Always compute#subnetwork for Subnetwork resources.

optional string kind = 3292052;

Returns
TypeDescription
String

The kind.

getKindBytes()

public ByteString getKindBytes()

[Output Only] Type of the resource. Always compute#subnetwork for Subnetwork resources.

optional string kind = 3292052;

Returns
TypeDescription
ByteString

The bytes for kind.

getLogConfig()

public SubnetworkLogConfig getLogConfig()

This field denotes the VPC flow logging options for this subnetwork. If logging is enabled, logs are exported to Cloud Logging.

optional .google.cloud.compute.v1.SubnetworkLogConfig log_config = 351299741;

Returns
TypeDescription
SubnetworkLogConfig

The logConfig.

getLogConfigOrBuilder()

public SubnetworkLogConfigOrBuilder getLogConfigOrBuilder()

This field denotes the VPC flow logging options for this subnetwork. If logging is enabled, logs are exported to Cloud Logging.

optional .google.cloud.compute.v1.SubnetworkLogConfig log_config = 351299741;

Returns
TypeDescription
SubnetworkLogConfigOrBuilder

getName()

public String getName()

The name of the resource, provided by the client when initially creating the resource. 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()

The name of the resource, provided by the client when initially creating the resource. 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.

getNetwork()

public String getNetwork()

The URL of the network to which this subnetwork belongs, provided by the client when initially creating the subnetwork. This field can be set only at resource creation time.

optional string network = 232872494;

Returns
TypeDescription
String

The network.

getNetworkBytes()

public ByteString getNetworkBytes()

The URL of the network to which this subnetwork belongs, provided by the client when initially creating the subnetwork. This field can be set only at resource creation time.

optional string network = 232872494;

Returns
TypeDescription
ByteString

The bytes for network.

getParserForType()

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

getPrivateIpGoogleAccess()

public boolean getPrivateIpGoogleAccess()

Whether the VMs in this subnet can access Google services without assigned external IP addresses. This field can be both set at resource creation time and updated using setPrivateIpGoogleAccess.

optional bool private_ip_google_access = 421491790;

Returns
TypeDescription
boolean

The privateIpGoogleAccess.

getPrivateIpv6GoogleAccess()

public String getPrivateIpv6GoogleAccess()

This field is for internal use. This field can be both set at resource creation time and updated using patch. Check the PrivateIpv6GoogleAccess enum for the list of possible values.

optional string private_ipv6_google_access = 48277006;

Returns
TypeDescription
String

The privateIpv6GoogleAccess.

getPrivateIpv6GoogleAccessBytes()

public ByteString getPrivateIpv6GoogleAccessBytes()

This field is for internal use. This field can be both set at resource creation time and updated using patch. Check the PrivateIpv6GoogleAccess enum for the list of possible values.

optional string private_ipv6_google_access = 48277006;

Returns
TypeDescription
ByteString

The bytes for privateIpv6GoogleAccess.

getPurpose()

public String getPurpose()

The purpose of the resource. This field can be either PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing. If unspecified, the purpose defaults to PRIVATE_RFC_1918. The enableFlowLogs field isn't supported with the purpose field set to INTERNAL_HTTPS_LOAD_BALANCER. Check the Purpose enum for the list of possible values.

optional string purpose = 316407070;

Returns
TypeDescription
String

The purpose.

getPurposeBytes()

public ByteString getPurposeBytes()

The purpose of the resource. This field can be either PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing. If unspecified, the purpose defaults to PRIVATE_RFC_1918. The enableFlowLogs field isn't supported with the purpose field set to INTERNAL_HTTPS_LOAD_BALANCER. Check the Purpose enum for the list of possible values.

optional string purpose = 316407070;

Returns
TypeDescription
ByteString

The bytes for purpose.

getRegion()

public String getRegion()

URL of the region where the Subnetwork resides. This field can be set only at resource creation time.

optional string region = 138946292;

Returns
TypeDescription
String

The region.

getRegionBytes()

public ByteString getRegionBytes()

URL of the region where the Subnetwork resides. This field can be set only at resource creation time.

optional string region = 138946292;

Returns
TypeDescription
ByteString

The bytes for region.

getRole()

public String getRole()

The role of subnetwork. Currently, this field is only used when purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request. Check the Role enum for the list of possible values.

optional string role = 3506294;

Returns
TypeDescription
String

The role.

getRoleBytes()

public ByteString getRoleBytes()

The role of subnetwork. Currently, this field is only used when purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request. Check the Role enum for the list of possible values.

optional string role = 3506294;

Returns
TypeDescription
ByteString

The bytes for role.

getSecondaryIpRanges(int index)

public SubnetworkSecondaryRange getSecondaryIpRanges(int index)

An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. This field can be updated with a patch request.

repeated .google.cloud.compute.v1.SubnetworkSecondaryRange secondary_ip_ranges = 136658915;

Parameter
NameDescription
indexint
Returns
TypeDescription
SubnetworkSecondaryRange

getSecondaryIpRangesCount()

public int getSecondaryIpRangesCount()

An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. This field can be updated with a patch request.

repeated .google.cloud.compute.v1.SubnetworkSecondaryRange secondary_ip_ranges = 136658915;

Returns
TypeDescription
int

getSecondaryIpRangesList()

public List<SubnetworkSecondaryRange> getSecondaryIpRangesList()

An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. This field can be updated with a patch request.

repeated .google.cloud.compute.v1.SubnetworkSecondaryRange secondary_ip_ranges = 136658915;

Returns
TypeDescription
List<SubnetworkSecondaryRange>

getSecondaryIpRangesOrBuilder(int index)

public SubnetworkSecondaryRangeOrBuilder getSecondaryIpRangesOrBuilder(int index)

An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. This field can be updated with a patch request.

repeated .google.cloud.compute.v1.SubnetworkSecondaryRange secondary_ip_ranges = 136658915;

Parameter
NameDescription
indexint
Returns
TypeDescription
SubnetworkSecondaryRangeOrBuilder

getSecondaryIpRangesOrBuilderList()

public List<? extends SubnetworkSecondaryRangeOrBuilder> getSecondaryIpRangesOrBuilderList()

An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. This field can be updated with a patch request.

repeated .google.cloud.compute.v1.SubnetworkSecondaryRange secondary_ip_ranges = 136658915;

Returns
TypeDescription
List<? extends com.google.cloud.compute.v1.SubnetworkSecondaryRangeOrBuilder>
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

getStackType()

public String getStackType()

The stack type for the subnet. If set to IPV4_ONLY, new VMs in the subnet are assigned IPv4 addresses only. If set to IPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If not specified, IPV4_ONLY is used. This field can be both set at resource creation time and updated using patch. Check the StackType enum for the list of possible values.

optional string stack_type = 425908881;

Returns
TypeDescription
String

The stackType.

getStackTypeBytes()

public ByteString getStackTypeBytes()

The stack type for the subnet. If set to IPV4_ONLY, new VMs in the subnet are assigned IPv4 addresses only. If set to IPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If not specified, IPV4_ONLY is used. This field can be both set at resource creation time and updated using patch. Check the StackType enum for the list of possible values.

optional string stack_type = 425908881;

Returns
TypeDescription
ByteString

The bytes for stackType.

getState()

public String getState()

[Output Only] The state of the subnetwork, which can be one of the following values: READY: Subnetwork is created and ready to use DRAINING: only applicable to subnetworks that have the purpose set to INTERNAL_HTTPS_LOAD_BALANCER and indicates that connections to the load balancer are being drained. A subnetwork that is draining cannot be used or modified until it reaches a status of READY 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] The state of the subnetwork, which can be one of the following values: READY: Subnetwork is created and ready to use DRAINING: only applicable to subnetworks that have the purpose set to INTERNAL_HTTPS_LOAD_BALANCER and indicates that connections to the load balancer are being drained. A subnetwork that is draining cannot be used or modified until it reaches a status of READY Check the State enum for the list of possible values.

optional string state = 109757585;

Returns
TypeDescription
ByteString

The bytes for state.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

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. This field can be set only at resource creation time.

optional string description = 422937596;

Returns
TypeDescription
boolean

Whether the description field is set.

hasEnableFlowLogs()

public boolean hasEnableFlowLogs()

Whether to enable flow logging for this subnetwork. If this field is not explicitly set, it will not appear in get listings. If not set the default behavior is determined by the org policy, if there is no org policy specified, then it will default to disabled. This field isn't supported with the purpose field set to INTERNAL_HTTPS_LOAD_BALANCER.

optional bool enable_flow_logs = 151544420;

Returns
TypeDescription
boolean

Whether the enableFlowLogs field is set.

hasExternalIpv6Prefix()

public boolean hasExternalIpv6Prefix()

[Output Only] The external IPv6 address range that is assigned to this subnetwork.

optional string external_ipv6_prefix = 139299190;

Returns
TypeDescription
boolean

Whether the externalIpv6Prefix field is set.

hasFingerprint()

public boolean hasFingerprint()

Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a Subnetwork. An up-to-date fingerprint must be provided in order to update the Subnetwork, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a Subnetwork.

optional string fingerprint = 234678500;

Returns
TypeDescription
boolean

Whether the fingerprint field is set.

hasGatewayAddress()

public boolean hasGatewayAddress()

[Output Only] The gateway address for default routes to reach destination addresses outside this subnetwork.

optional string gateway_address = 459867385;

Returns
TypeDescription
boolean

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

hasInternalIpv6Prefix()

public boolean hasInternalIpv6Prefix()

[Output Only] The internal IPv6 address range that is assigned to this subnetwork.

optional string internal_ipv6_prefix = 506270056;

Returns
TypeDescription
boolean

Whether the internalIpv6Prefix field is set.

hasIpCidrRange()

public boolean hasIpCidrRange()

The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example, 10.0.0.0/8 or 100.64.0.0/10. Ranges must be unique and non-overlapping within a network. Only IPv4 is supported. This field is set at resource creation time. The range can be any range listed in the Valid ranges list. The range can be expanded after creation using expandIpCidrRange.

optional string ip_cidr_range = 98117322;

Returns
TypeDescription
boolean

Whether the ipCidrRange field is set.

hasIpv6AccessType()

public boolean hasIpv6AccessType()

The access type of IPv6 address this subnet holds. It's immutable and can only be specified during creation or the first time the subnet is updated into IPV4_IPV6 dual stack. Check the Ipv6AccessType enum for the list of possible values.

optional string ipv6_access_type = 504658653;

Returns
TypeDescription
boolean

Whether the ipv6AccessType field is set.

hasIpv6CidrRange()

public boolean hasIpv6CidrRange()

[Output Only] This field is for internal use.

optional string ipv6_cidr_range = 273141258;

Returns
TypeDescription
boolean

Whether the ipv6CidrRange field is set.

hasKind()

public boolean hasKind()

[Output Only] Type of the resource. Always compute#subnetwork for Subnetwork resources.

optional string kind = 3292052;

Returns
TypeDescription
boolean

Whether the kind field is set.

hasLogConfig()

public boolean hasLogConfig()

This field denotes the VPC flow logging options for this subnetwork. If logging is enabled, logs are exported to Cloud Logging.

optional .google.cloud.compute.v1.SubnetworkLogConfig log_config = 351299741;

Returns
TypeDescription
boolean

Whether the logConfig field is set.

hasName()

public boolean hasName()

The name of the resource, provided by the client when initially creating the resource. 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()

The URL of the network to which this subnetwork belongs, provided by the client when initially creating the subnetwork. This field can be set only at resource creation time.

optional string network = 232872494;

Returns
TypeDescription
boolean

Whether the network field is set.

hasPrivateIpGoogleAccess()

public boolean hasPrivateIpGoogleAccess()

Whether the VMs in this subnet can access Google services without assigned external IP addresses. This field can be both set at resource creation time and updated using setPrivateIpGoogleAccess.

optional bool private_ip_google_access = 421491790;

Returns
TypeDescription
boolean

Whether the privateIpGoogleAccess field is set.

hasPrivateIpv6GoogleAccess()

public boolean hasPrivateIpv6GoogleAccess()

This field is for internal use. This field can be both set at resource creation time and updated using patch. Check the PrivateIpv6GoogleAccess enum for the list of possible values.

optional string private_ipv6_google_access = 48277006;

Returns
TypeDescription
boolean

Whether the privateIpv6GoogleAccess field is set.

hasPurpose()

public boolean hasPurpose()

The purpose of the resource. This field can be either PRIVATE_RFC_1918 or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is reserved for Internal HTTP(S) Load Balancing. If unspecified, the purpose defaults to PRIVATE_RFC_1918. The enableFlowLogs field isn't supported with the purpose field set to INTERNAL_HTTPS_LOAD_BALANCER. Check the Purpose enum for the list of possible values.

optional string purpose = 316407070;

Returns
TypeDescription
boolean

Whether the purpose field is set.

hasRegion()

public boolean hasRegion()

URL of the region where the Subnetwork resides. This field can be set only at resource creation time.

optional string region = 138946292;

Returns
TypeDescription
boolean

Whether the region field is set.

hasRole()

public boolean hasRole()

The role of subnetwork. Currently, this field is only used when purpose = INTERNAL_HTTPS_LOAD_BALANCER. The value can be set to ACTIVE or BACKUP. An ACTIVE subnetwork is one that is currently being used for Internal HTTP(S) Load Balancing. A BACKUP subnetwork is one that is ready to be promoted to ACTIVE or is currently draining. This field can be updated with a patch request. Check the Role enum for the list of possible values.

optional string role = 3506294;

Returns
TypeDescription
boolean

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

hasStackType()

public boolean hasStackType()

The stack type for the subnet. If set to IPV4_ONLY, new VMs in the subnet are assigned IPv4 addresses only. If set to IPV4_IPV6, new VMs in the subnet can be assigned both IPv4 and IPv6 addresses. If not specified, IPV4_ONLY is used. This field can be both set at resource creation time and updated using patch. Check the StackType enum for the list of possible values.

optional string stack_type = 425908881;

Returns
TypeDescription
boolean

Whether the stackType field is set.

hasState()

public boolean hasState()

[Output Only] The state of the subnetwork, which can be one of the following values: READY: Subnetwork is created and ready to use DRAINING: only applicable to subnetworks that have the purpose set to INTERNAL_HTTPS_LOAD_BALANCER and indicates that connections to the load balancer are being drained. A subnetwork that is draining cannot be used or modified until it reaches a status of READY Check the State enum for the list of possible values.

optional string state = 109757585;

Returns
TypeDescription
boolean

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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