Package com.google.cloud.compute.v1
Class SubnetworkLogConfig.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<SubnetworkLogConfig.Builder>
com.google.cloud.compute.v1.SubnetworkLogConfig.Builder
- All Implemented Interfaces:
SubnetworkLogConfigOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- SubnetworkLogConfig
public static final class SubnetworkLogConfig.Builder
extends com.google.protobuf.GeneratedMessage.Builder<SubnetworkLogConfig.Builder>
implements SubnetworkLogConfigOrBuilder
The available logging options for this subnetwork.Protobuf type
google.cloud.compute.v1.SubnetworkLogConfig-
Method Summary
Modifier and TypeMethodDescriptionaddAllMetadataFields(Iterable<String> values) Can only be specified if VPC flow logs for this subnetwork is enabled and "metadata" was set to CUSTOM_METADATA.addMetadataFields(String value) Can only be specified if VPC flow logs for this subnetwork is enabled and "metadata" was set to CUSTOM_METADATA.addMetadataFieldsBytes(com.google.protobuf.ByteString value) Can only be specified if VPC flow logs for this subnetwork is enabled and "metadata" was set to CUSTOM_METADATA.build()clear()Can only be specified if VPC flow logging for this subnetwork is enabled.Whether to enable flow logging for this subnetwork.Can only be specified if VPC flow logs for this subnetwork is enabled.Can only be specified if VPC flow logging for this subnetwork is enabled.Can only be specified if VPC flow logs for this subnetwork is enabled.Can only be specified if VPC flow logs for this subnetwork is enabled and "metadata" was set to CUSTOM_METADATA.Can only be specified if VPC flow logging for this subnetwork is enabled.com.google.protobuf.ByteStringCan only be specified if VPC flow logging for this subnetwork is enabled.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorbooleanWhether to enable flow logging for this subnetwork.Can only be specified if VPC flow logs for this subnetwork is enabled.com.google.protobuf.ByteStringCan only be specified if VPC flow logs for this subnetwork is enabled.floatCan only be specified if VPC flow logging for this subnetwork is enabled.Can only be specified if VPC flow logs for this subnetwork is enabled.com.google.protobuf.ByteStringCan only be specified if VPC flow logs for this subnetwork is enabled.getMetadataFields(int index) Can only be specified if VPC flow logs for this subnetwork is enabled and "metadata" was set to CUSTOM_METADATA.com.google.protobuf.ByteStringgetMetadataFieldsBytes(int index) Can only be specified if VPC flow logs for this subnetwork is enabled and "metadata" was set to CUSTOM_METADATA.intCan only be specified if VPC flow logs for this subnetwork is enabled and "metadata" was set to CUSTOM_METADATA.com.google.protobuf.ProtocolStringListCan only be specified if VPC flow logs for this subnetwork is enabled and "metadata" was set to CUSTOM_METADATA.booleanCan only be specified if VPC flow logging for this subnetwork is enabled.booleanWhether to enable flow logging for this subnetwork.booleanCan only be specified if VPC flow logs for this subnetwork is enabled.booleanCan only be specified if VPC flow logging for this subnetwork is enabled.booleanCan only be specified if VPC flow logs for this subnetwork is enabled.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(SubnetworkLogConfig other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setAggregationInterval(String value) Can only be specified if VPC flow logging for this subnetwork is enabled.setAggregationIntervalBytes(com.google.protobuf.ByteString value) Can only be specified if VPC flow logging for this subnetwork is enabled.setEnable(boolean value) Whether to enable flow logging for this subnetwork.setFilterExpr(String value) Can only be specified if VPC flow logs for this subnetwork is enabled.setFilterExprBytes(com.google.protobuf.ByteString value) Can only be specified if VPC flow logs for this subnetwork is enabled.setFlowSampling(float value) Can only be specified if VPC flow logging for this subnetwork is enabled.setMetadata(String value) Can only be specified if VPC flow logs for this subnetwork is enabled.setMetadataBytes(com.google.protobuf.ByteString value) Can only be specified if VPC flow logs for this subnetwork is enabled.setMetadataFields(int index, String value) Can only be specified if VPC flow logs for this subnetwork is enabled and "metadata" was set to CUSTOM_METADATA.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<SubnetworkLogConfig.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<SubnetworkLogConfig.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<SubnetworkLogConfig.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<SubnetworkLogConfig.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<SubnetworkLogConfig.Builder>
-
mergeFrom
public SubnetworkLogConfig.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<SubnetworkLogConfig.Builder>- Throws:
IOException
-
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;- Specified by:
hasAggregationIntervalin interfaceSubnetworkLogConfigOrBuilder- Returns:
- Whether the aggregationInterval field is set.
-
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;- Specified by:
getAggregationIntervalin interfaceSubnetworkLogConfigOrBuilder- Returns:
- The aggregationInterval.
-
getAggregationIntervalBytes
public com.google.protobuf.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;- Specified by:
getAggregationIntervalBytesin interfaceSubnetworkLogConfigOrBuilder- Returns:
- The bytes for aggregationInterval.
-
setAggregationInterval
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;- Parameters:
value- The aggregationInterval to set.- Returns:
- This builder for chaining.
-
clearAggregationInterval
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:
- This builder for chaining.
-
setAggregationIntervalBytes
public SubnetworkLogConfig.Builder setAggregationIntervalBytes(com.google.protobuf.ByteString value) 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;- Parameters:
value- The bytes for aggregationInterval to set.- Returns:
- This builder for chaining.
-
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;- Specified by:
hasEnablein interfaceSubnetworkLogConfigOrBuilder- Returns:
- Whether the enable field is set.
-
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;- Specified by:
getEnablein interfaceSubnetworkLogConfigOrBuilder- Returns:
- The enable.
-
setEnable
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;- Parameters:
value- The enable to set.- Returns:
- This builder for chaining.
-
clearEnable
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:
- This builder for chaining.
-
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;- Specified by:
hasFilterExprin interfaceSubnetworkLogConfigOrBuilder- Returns:
- Whether the filterExpr field is set.
-
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;- Specified by:
getFilterExprin interfaceSubnetworkLogConfigOrBuilder- Returns:
- The filterExpr.
-
getFilterExprBytes
public com.google.protobuf.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;- Specified by:
getFilterExprBytesin interfaceSubnetworkLogConfigOrBuilder- Returns:
- The bytes for filterExpr.
-
setFilterExpr
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;- Parameters:
value- The filterExpr to set.- Returns:
- This builder for chaining.
-
clearFilterExpr
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:
- This builder for chaining.
-
setFilterExprBytes
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;- Parameters:
value- The bytes for filterExpr to set.- Returns:
- This builder for chaining.
-
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;- Specified by:
hasFlowSamplingin interfaceSubnetworkLogConfigOrBuilder- Returns:
- Whether the flowSampling field is set.
-
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;- Specified by:
getFlowSamplingin interfaceSubnetworkLogConfigOrBuilder- Returns:
- The flowSampling.
-
setFlowSampling
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;- Parameters:
value- The flowSampling to set.- Returns:
- This builder for chaining.
-
clearFlowSampling
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:
- This builder for chaining.
-
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 isEXCLUDE_ALL_METADATA. Check the Metadata enum for the list of possible values.
optional string metadata = 86866735;- Specified by:
hasMetadatain interfaceSubnetworkLogConfigOrBuilder- Returns:
- Whether the metadata field is set.
-
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 isEXCLUDE_ALL_METADATA. Check the Metadata enum for the list of possible values.
optional string metadata = 86866735;- Specified by:
getMetadatain interfaceSubnetworkLogConfigOrBuilder- Returns:
- The metadata.
-
getMetadataBytes
public com.google.protobuf.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 isEXCLUDE_ALL_METADATA. Check the Metadata enum for the list of possible values.
optional string metadata = 86866735;- Specified by:
getMetadataBytesin interfaceSubnetworkLogConfigOrBuilder- Returns:
- The bytes for metadata.
-
setMetadata
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 isEXCLUDE_ALL_METADATA. Check the Metadata enum for the list of possible values.
optional string metadata = 86866735;- Parameters:
value- The metadata to set.- Returns:
- This builder for chaining.
-
clearMetadata
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 isEXCLUDE_ALL_METADATA. Check the Metadata enum for the list of possible values.
optional string metadata = 86866735;- Returns:
- This builder for chaining.
-
setMetadataBytes
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 isEXCLUDE_ALL_METADATA. Check the Metadata enum for the list of possible values.
optional string metadata = 86866735;- Parameters:
value- The bytes for metadata to set.- Returns:
- This builder for chaining.
-
getMetadataFieldsList
public com.google.protobuf.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;- Specified by:
getMetadataFieldsListin interfaceSubnetworkLogConfigOrBuilder- Returns:
- A list containing the metadataFields.
-
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;- Specified by:
getMetadataFieldsCountin interfaceSubnetworkLogConfigOrBuilder- Returns:
- The count of metadataFields.
-
getMetadataFields
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;- Specified by:
getMetadataFieldsin interfaceSubnetworkLogConfigOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The metadataFields at the given index.
-
getMetadataFieldsBytes
public com.google.protobuf.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;- Specified by:
getMetadataFieldsBytesin interfaceSubnetworkLogConfigOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the metadataFields at the given index.
-
setMetadataFields
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;- Parameters:
index- The index to set the value at.value- The metadataFields to set.- Returns:
- This builder for chaining.
-
addMetadataFields
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;- Parameters:
value- The metadataFields to add.- Returns:
- This builder for chaining.
-
addAllMetadataFields
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;- Parameters:
values- The metadataFields to add.- Returns:
- This builder for chaining.
-
clearMetadataFields
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:
- This builder for chaining.
-
addMetadataFieldsBytes
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;- Parameters:
value- The bytes of the metadataFields to add.- Returns:
- This builder for chaining.
-