Class SubnetworkLogConfig (1.47.0)

public final class SubnetworkLogConfig extends GeneratedMessageV3 implements SubnetworkLogConfigOrBuilder

The available logging options for this subnetwork.

Protobuf type google.cloud.compute.v1.SubnetworkLogConfig

Static Fields

AGGREGATION_INTERVAL_FIELD_NUMBER

public static final int AGGREGATION_INTERVAL_FIELD_NUMBER
Field Value
TypeDescription
int

ENABLE_FIELD_NUMBER

public static final int ENABLE_FIELD_NUMBER
Field Value
TypeDescription
int

FILTER_EXPR_FIELD_NUMBER

public static final int FILTER_EXPR_FIELD_NUMBER
Field Value
TypeDescription
int

FLOW_SAMPLING_FIELD_NUMBER

public static final int FLOW_SAMPLING_FIELD_NUMBER
Field Value
TypeDescription
int

METADATA_FIELDS_FIELD_NUMBER

public static final int METADATA_FIELDS_FIELD_NUMBER
Field Value
TypeDescription
int

METADATA_FIELD_NUMBER

public static final int METADATA_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static SubnetworkLogConfig getDefaultInstance()
Returns
TypeDescription
SubnetworkLogConfig

getDescriptor()

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

newBuilder()

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

newBuilder(SubnetworkLogConfig prototype)

public static SubnetworkLogConfig.Builder newBuilder(SubnetworkLogConfig prototype)
Parameter
NameDescription
prototypeSubnetworkLogConfig
Returns
TypeDescription
SubnetworkLogConfig.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getAggregationInterval()

public String getAggregationInterval()

Can only be specified if VPC flow logging for this subnetwork is enabled. Toggles the aggregation interval for collecting flow logs. Increasing the interval time will reduce the amount of generated flow logs for long lasting connections. Default is an interval of 5 seconds per connection. Check the AggregationInterval enum for the list of possible values.

optional string aggregation_interval = 174919042;

Returns
TypeDescription
String

The aggregationInterval.

getAggregationIntervalBytes()

public ByteString getAggregationIntervalBytes()

Can only be specified if VPC flow logging for this subnetwork is enabled. Toggles the aggregation interval for collecting flow logs. Increasing the interval time will reduce the amount of generated flow logs for long lasting connections. Default is an interval of 5 seconds per connection. Check the AggregationInterval enum for the list of possible values.

optional string aggregation_interval = 174919042;

Returns
TypeDescription
ByteString

The bytes for aggregationInterval.

getDefaultInstanceForType()

public SubnetworkLogConfig getDefaultInstanceForType()
Returns
TypeDescription
SubnetworkLogConfig

getEnable()

public boolean getEnable()

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. Flow logging isn't supported if the subnet purpose field is set to REGIONAL_MANAGED_PROXY.

optional bool enable = 311764355;

Returns
TypeDescription
boolean

The enable.

getFilterExpr()

public String getFilterExpr()

Can only be specified if VPC flow logs for this subnetwork is enabled. The filter expression is used to define which VPC flow logs should be exported to Cloud Logging.

optional string filter_expr = 183374428;

Returns
TypeDescription
String

The filterExpr.

getFilterExprBytes()

public ByteString getFilterExprBytes()

Can only be specified if VPC flow logs for this subnetwork is enabled. The filter expression is used to define which VPC flow logs should be exported to Cloud Logging.

optional string filter_expr = 183374428;

Returns
TypeDescription
ByteString

The bytes for filterExpr.

getFlowSampling()

public float getFlowSampling()

Can only be specified if VPC flow logging for this subnetwork is enabled. The value of the field must be in [0, 1]. Set the sampling rate of VPC flow logs within the subnetwork where 1.0 means all collected logs are reported and 0.0 means no logs are reported. Default is 0.5 unless otherwise specified by the org policy, which means half of all collected logs are reported.

optional float flow_sampling = 530150360;

Returns
TypeDescription
float

The flowSampling.

getMetadata()

public String getMetadata()

Can only be specified if VPC flow logs for this subnetwork is enabled. Configures whether all, none or a subset of metadata fields should be added to the reported VPC flow logs. Default is EXCLUDE_ALL_METADATA. Check the Metadata enum for the list of possible values.

optional string metadata = 86866735;

Returns
TypeDescription
String

The metadata.

getMetadataBytes()

public ByteString getMetadataBytes()

Can only be specified if VPC flow logs for this subnetwork is enabled. Configures whether all, none or a subset of metadata fields should be added to the reported VPC flow logs. Default is EXCLUDE_ALL_METADATA. Check the Metadata enum for the list of possible values.

optional string metadata = 86866735;

Returns
TypeDescription
ByteString

The bytes for metadata.

getMetadataFields(int index)

public String getMetadataFields(int index)

Can only be specified if VPC flow logs for this subnetwork is enabled and "metadata" was set to CUSTOM_METADATA.

repeated string metadata_fields = 378461641;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The metadataFields at the given index.

getMetadataFieldsBytes(int index)

public ByteString getMetadataFieldsBytes(int index)

Can only be specified if VPC flow logs for this subnetwork is enabled and "metadata" was set to CUSTOM_METADATA.

repeated string metadata_fields = 378461641;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the metadataFields at the given index.

getMetadataFieldsCount()

public int getMetadataFieldsCount()

Can only be specified if VPC flow logs for this subnetwork is enabled and "metadata" was set to CUSTOM_METADATA.

repeated string metadata_fields = 378461641;

Returns
TypeDescription
int

The count of metadataFields.

getMetadataFieldsList()

public ProtocolStringList getMetadataFieldsList()

Can only be specified if VPC flow logs for this subnetwork is enabled and "metadata" was set to CUSTOM_METADATA.

repeated string metadata_fields = 378461641;

Returns
TypeDescription
ProtocolStringList

A list containing the metadataFields.

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hasAggregationInterval()

public boolean hasAggregationInterval()

Can only be specified if VPC flow logging for this subnetwork is enabled. Toggles the aggregation interval for collecting flow logs. Increasing the interval time will reduce the amount of generated flow logs for long lasting connections. Default is an interval of 5 seconds per connection. Check the AggregationInterval enum for the list of possible values.

optional string aggregation_interval = 174919042;

Returns
TypeDescription
boolean

Whether the aggregationInterval field is set.

hasEnable()

public boolean hasEnable()

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. Flow logging isn't supported if the subnet purpose field is set to REGIONAL_MANAGED_PROXY.

optional bool enable = 311764355;

Returns
TypeDescription
boolean

Whether the enable field is set.

hasFilterExpr()

public boolean hasFilterExpr()

Can only be specified if VPC flow logs for this subnetwork is enabled. The filter expression is used to define which VPC flow logs should be exported to Cloud Logging.

optional string filter_expr = 183374428;

Returns
TypeDescription
boolean

Whether the filterExpr field is set.

hasFlowSampling()

public boolean hasFlowSampling()

Can only be specified if VPC flow logging for this subnetwork is enabled. The value of the field must be in [0, 1]. Set the sampling rate of VPC flow logs within the subnetwork where 1.0 means all collected logs are reported and 0.0 means no logs are reported. Default is 0.5 unless otherwise specified by the org policy, which means half of all collected logs are reported.

optional float flow_sampling = 530150360;

Returns
TypeDescription
boolean

Whether the flowSampling field is set.

hasMetadata()

public boolean hasMetadata()

Can only be specified if VPC flow logs for this subnetwork is enabled. Configures whether all, none or a subset of metadata fields should be added to the reported VPC flow logs. Default is EXCLUDE_ALL_METADATA. Check the Metadata enum for the list of possible values.

optional string metadata = 86866735;

Returns
TypeDescription
boolean

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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