Class SubnetworkLogConfig

  • All Implemented Interfaces:
    SubnetworkLogConfigOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class SubnetworkLogConfig
    extends com.google.protobuf.GeneratedMessageV3
    implements SubnetworkLogConfigOrBuilder
     The available logging options for this subnetwork.
     
    Protobuf type google.cloud.compute.v1.SubnetworkLogConfig
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  SubnetworkLogConfig.AggregationInterval
      Can only be specified if VPC flow logging for this subnetwork is enabled.
      static class  SubnetworkLogConfig.Builder
      The available logging options for this subnetwork.
      static class  SubnetworkLogConfig.Metadata
      Can only be specified if VPC flow logs for this subnetwork is enabled.
      • Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3

        com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,​BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,​BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • Field Detail

      • AGGREGATION_INTERVAL_FIELD_NUMBER

        public static final int AGGREGATION_INTERVAL_FIELD_NUMBER
        See Also:
        Constant Field Values
      • FILTER_EXPR_FIELD_NUMBER

        public static final int FILTER_EXPR_FIELD_NUMBER
        See Also:
        Constant Field Values
      • FLOW_SAMPLING_FIELD_NUMBER

        public static final int FLOW_SAMPLING_FIELD_NUMBER
        See Also:
        Constant Field Values
      • METADATA_FIELDS_FIELD_NUMBER

        public static final int METADATA_FIELDS_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • 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:
        hasAggregationInterval in interface SubnetworkLogConfigOrBuilder
        Returns:
        Whether the aggregationInterval field is set.
      • 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;
        Specified by:
        getAggregationInterval in interface SubnetworkLogConfigOrBuilder
        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:
        getAggregationIntervalBytes in interface SubnetworkLogConfigOrBuilder
        Returns:
        The bytes for aggregationInterval.
      • 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:
        hasEnable in interface SubnetworkLogConfigOrBuilder
        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:
        getEnable in interface SubnetworkLogConfigOrBuilder
        Returns:
        The enable.
      • 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:
        hasFilterExpr in interface SubnetworkLogConfigOrBuilder
        Returns:
        Whether the filterExpr field is set.
      • 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;
        Specified by:
        getFilterExpr in interface SubnetworkLogConfigOrBuilder
        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:
        getFilterExprBytes in interface SubnetworkLogConfigOrBuilder
        Returns:
        The bytes for filterExpr.
      • 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:
        hasFlowSampling in interface SubnetworkLogConfigOrBuilder
        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:
        getFlowSampling in interface SubnetworkLogConfigOrBuilder
        Returns:
        The flowSampling.
      • 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;
        Specified by:
        hasMetadata in interface SubnetworkLogConfigOrBuilder
        Returns:
        Whether the metadata field is set.
      • 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;
        Specified by:
        getMetadata in interface SubnetworkLogConfigOrBuilder
        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 is EXCLUDE_ALL_METADATA.
         Check the Metadata enum for the list of possible values.
         
        optional string metadata = 86866735;
        Specified by:
        getMetadataBytes in interface SubnetworkLogConfigOrBuilder
        Returns:
        The bytes for metadata.
      • 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:
        getMetadataFieldsList in interface SubnetworkLogConfigOrBuilder
        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:
        getMetadataFieldsCount in interface SubnetworkLogConfigOrBuilder
        Returns:
        The count of metadataFields.
      • getMetadataFields

        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;
        Specified by:
        getMetadataFields in interface SubnetworkLogConfigOrBuilder
        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:
        getMetadataFieldsBytes in interface SubnetworkLogConfigOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the metadataFields at the given index.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static SubnetworkLogConfig parseFrom​(ByteBuffer data)
                                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SubnetworkLogConfig parseFrom​(ByteBuffer data,
                                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SubnetworkLogConfig parseFrom​(com.google.protobuf.ByteString data)
                                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SubnetworkLogConfig parseFrom​(com.google.protobuf.ByteString data,
                                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SubnetworkLogConfig parseFrom​(byte[] data)
                                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SubnetworkLogConfig parseFrom​(byte[] data,
                                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                             throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static SubnetworkLogConfig parseFrom​(com.google.protobuf.CodedInputStream input,
                                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                             throws IOException
        Throws:
        IOException
      • newBuilderForType

        public SubnetworkLogConfig.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public SubnetworkLogConfig.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected SubnetworkLogConfig.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<SubnetworkLogConfig> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public SubnetworkLogConfig getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder