Class EffectiveVpcFlowLogsConfig (1.84.0)

public final class EffectiveVpcFlowLogsConfig extends GeneratedMessage implements EffectiveVpcFlowLogsConfigOrBuilder

A configuration to generate a response for GetEffectiveVpcFlowLogsConfig request.

Protobuf type google.cloud.networkmanagement.v1.EffectiveVpcFlowLogsConfig

Static Fields

AGGREGATION_INTERVAL_FIELD_NUMBER

public static final int AGGREGATION_INTERVAL_FIELD_NUMBER
Field Value
Type Description
int

CROSS_PROJECT_METADATA_FIELD_NUMBER

public static final int CROSS_PROJECT_METADATA_FIELD_NUMBER
Field Value
Type Description
int

FILTER_EXPR_FIELD_NUMBER

public static final int FILTER_EXPR_FIELD_NUMBER
Field Value
Type Description
int

FLOW_SAMPLING_FIELD_NUMBER

public static final int FLOW_SAMPLING_FIELD_NUMBER
Field Value
Type Description
int

INTERCONNECT_ATTACHMENT_FIELD_NUMBER

public static final int INTERCONNECT_ATTACHMENT_FIELD_NUMBER
Field Value
Type Description
int

METADATA_FIELDS_FIELD_NUMBER

public static final int METADATA_FIELDS_FIELD_NUMBER
Field Value
Type Description
int

METADATA_FIELD_NUMBER

public static final int METADATA_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

NETWORK_FIELD_NUMBER

public static final int NETWORK_FIELD_NUMBER
Field Value
Type Description
int

SCOPE_FIELD_NUMBER

public static final int SCOPE_FIELD_NUMBER
Field Value
Type Description
int

STATE_FIELD_NUMBER

public static final int STATE_FIELD_NUMBER
Field Value
Type Description
int

SUBNET_FIELD_NUMBER

public static final int SUBNET_FIELD_NUMBER
Field Value
Type Description
int

VPN_TUNNEL_FIELD_NUMBER

public static final int VPN_TUNNEL_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static EffectiveVpcFlowLogsConfig getDefaultInstance()
Returns
Type Description
EffectiveVpcFlowLogsConfig

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static EffectiveVpcFlowLogsConfig.Builder newBuilder()
Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

newBuilder(EffectiveVpcFlowLogsConfig prototype)

public static EffectiveVpcFlowLogsConfig.Builder newBuilder(EffectiveVpcFlowLogsConfig prototype)
Parameter
Name Description
prototype EffectiveVpcFlowLogsConfig
Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

parseDelimitedFrom(InputStream input)

public static EffectiveVpcFlowLogsConfig parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
EffectiveVpcFlowLogsConfig
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static EffectiveVpcFlowLogsConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EffectiveVpcFlowLogsConfig
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static EffectiveVpcFlowLogsConfig parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
EffectiveVpcFlowLogsConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static EffectiveVpcFlowLogsConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EffectiveVpcFlowLogsConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static EffectiveVpcFlowLogsConfig parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
EffectiveVpcFlowLogsConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static EffectiveVpcFlowLogsConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EffectiveVpcFlowLogsConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static EffectiveVpcFlowLogsConfig parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
EffectiveVpcFlowLogsConfig
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static EffectiveVpcFlowLogsConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EffectiveVpcFlowLogsConfig
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static EffectiveVpcFlowLogsConfig parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
EffectiveVpcFlowLogsConfig
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static EffectiveVpcFlowLogsConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EffectiveVpcFlowLogsConfig
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static EffectiveVpcFlowLogsConfig parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
EffectiveVpcFlowLogsConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static EffectiveVpcFlowLogsConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EffectiveVpcFlowLogsConfig
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<EffectiveVpcFlowLogsConfig> parser()
Returns
Type Description
Parser<EffectiveVpcFlowLogsConfig>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAggregationInterval()

public VpcFlowLogsConfig.AggregationInterval getAggregationInterval()

The aggregation interval for the logs. Default value is INTERVAL_5_SEC.

optional .google.cloud.networkmanagement.v1.VpcFlowLogsConfig.AggregationInterval aggregation_interval = 4;

Returns
Type Description
VpcFlowLogsConfig.AggregationInterval

The aggregationInterval.

getAggregationIntervalValue()

public int getAggregationIntervalValue()

The aggregation interval for the logs. Default value is INTERVAL_5_SEC.

optional .google.cloud.networkmanagement.v1.VpcFlowLogsConfig.AggregationInterval aggregation_interval = 4;

Returns
Type Description
int

The enum numeric value on the wire for aggregationInterval.

getCrossProjectMetadata()

public VpcFlowLogsConfig.CrossProjectMetadata getCrossProjectMetadata()

Determines whether to include cross project annotations in the logs. This field is available only for organization configurations. If not specified in org configs will be set to CROSS_PROJECT_METADATA_ENABLED.

optional .google.cloud.networkmanagement.v1.VpcFlowLogsConfig.CrossProjectMetadata cross_project_metadata = 13;

Returns
Type Description
VpcFlowLogsConfig.CrossProjectMetadata

The crossProjectMetadata.

getCrossProjectMetadataValue()

public int getCrossProjectMetadataValue()

Determines whether to include cross project annotations in the logs. This field is available only for organization configurations. If not specified in org configs will be set to CROSS_PROJECT_METADATA_ENABLED.

optional .google.cloud.networkmanagement.v1.VpcFlowLogsConfig.CrossProjectMetadata cross_project_metadata = 13;

Returns
Type Description
int

The enum numeric value on the wire for crossProjectMetadata.

getDefaultInstanceForType()

public EffectiveVpcFlowLogsConfig getDefaultInstanceForType()
Returns
Type Description
EffectiveVpcFlowLogsConfig

getFilterExpr()

public String getFilterExpr()

Export filter used to define which VPC Flow Logs should be logged.

optional string filter_expr = 8;

Returns
Type Description
String

The filterExpr.

getFilterExprBytes()

public ByteString getFilterExprBytes()

Export filter used to define which VPC Flow Logs should be logged.

optional string filter_expr = 8;

Returns
Type Description
ByteString

The bytes for filterExpr.

getFlowSampling()

public float getFlowSampling()

The value of the field must be in (0, 1]. The sampling rate of VPC Flow Logs where 1.0 means all collected logs are reported. Setting the sampling rate to 0.0 is not allowed. If you want to disable VPC Flow Logs, use the state field instead. Default value is 1.0.

optional float flow_sampling = 5;

Returns
Type Description
float

The flowSampling.

getInterconnectAttachment()

public String getInterconnectAttachment()

Traffic will be logged from the Interconnect Attachment. Format: projects/{project_id}/regions/{region}/interconnectAttachments/{name}

string interconnect_attachment = 102;

Returns
Type Description
String

The interconnectAttachment.

getInterconnectAttachmentBytes()

public ByteString getInterconnectAttachmentBytes()

Traffic will be logged from the Interconnect Attachment. Format: projects/{project_id}/regions/{region}/interconnectAttachments/{name}

string interconnect_attachment = 102;

Returns
Type Description
ByteString

The bytes for interconnectAttachment.

getMetadata()

public VpcFlowLogsConfig.Metadata getMetadata()

Configures whether all, none or a subset of metadata fields should be added to the reported VPC flow logs. Default value is INCLUDE_ALL_METADATA.

optional .google.cloud.networkmanagement.v1.VpcFlowLogsConfig.Metadata metadata = 6;

Returns
Type Description
VpcFlowLogsConfig.Metadata

The metadata.

getMetadataFields(int index)

public String getMetadataFields(int index)

Custom metadata fields to include in the reported VPC flow logs. Can only be specified if "metadata" was set to CUSTOM_METADATA.

repeated string metadata_fields = 7;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The metadataFields at the given index.

getMetadataFieldsBytes(int index)

public ByteString getMetadataFieldsBytes(int index)

Custom metadata fields to include in the reported VPC flow logs. Can only be specified if "metadata" was set to CUSTOM_METADATA.

repeated string metadata_fields = 7;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the metadataFields at the given index.

getMetadataFieldsCount()

public int getMetadataFieldsCount()

Custom metadata fields to include in the reported VPC flow logs. Can only be specified if "metadata" was set to CUSTOM_METADATA.

repeated string metadata_fields = 7;

Returns
Type Description
int

The count of metadataFields.

getMetadataFieldsList()

public ProtocolStringList getMetadataFieldsList()

Custom metadata fields to include in the reported VPC flow logs. Can only be specified if "metadata" was set to CUSTOM_METADATA.

repeated string metadata_fields = 7;

Returns
Type Description
ProtocolStringList

A list containing the metadataFields.

getMetadataValue()

public int getMetadataValue()

Configures whether all, none or a subset of metadata fields should be added to the reported VPC flow logs. Default value is INCLUDE_ALL_METADATA.

optional .google.cloud.networkmanagement.v1.VpcFlowLogsConfig.Metadata metadata = 6;

Returns
Type Description
int

The enum numeric value on the wire for metadata.

getName()

public String getName()

Unique name of the configuration. The name can have one of the following forms:

  • For project-level configurations: projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}

  • For organization-level configurations: organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}

  • For a Compute config, the name will be the path of the subnet: projects/{project_id}/regions/{region}/subnetworks/{subnet_id}

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Unique name of the configuration. The name can have one of the following forms:

  • For project-level configurations: projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}

  • For organization-level configurations: organizations/{organization_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}

  • For a Compute config, the name will be the path of the subnet: projects/{project_id}/regions/{region}/subnetworks/{subnet_id}

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getNetwork()

public String getNetwork()

Traffic will be logged from VMs, VPN tunnels and Interconnect Attachments within the network. Format: projects/{project_id}/global/networks/{name}

string network = 100;

Returns
Type Description
String

The network.

getNetworkBytes()

public ByteString getNetworkBytes()

Traffic will be logged from VMs, VPN tunnels and Interconnect Attachments within the network. Format: projects/{project_id}/global/networks/{name}

string network = 100;

Returns
Type Description
ByteString

The bytes for network.

getParserForType()

public Parser<EffectiveVpcFlowLogsConfig> getParserForType()
Returns
Type Description
Parser<EffectiveVpcFlowLogsConfig>
Overrides

getScope()

public EffectiveVpcFlowLogsConfig.Scope getScope()

Specifies the scope of the config (e.g., SUBNET, NETWORK, ORGANIZATION..).

optional .google.cloud.networkmanagement.v1.EffectiveVpcFlowLogsConfig.Scope scope = 12;

Returns
Type Description
EffectiveVpcFlowLogsConfig.Scope

The scope.

getScopeValue()

public int getScopeValue()

Specifies the scope of the config (e.g., SUBNET, NETWORK, ORGANIZATION..).

optional .google.cloud.networkmanagement.v1.EffectiveVpcFlowLogsConfig.Scope scope = 12;

Returns
Type Description
int

The enum numeric value on the wire for scope.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getState()

public VpcFlowLogsConfig.State getState()

The state of the VPC Flow Log configuration. Default value is ENABLED. When creating a new configuration, it must be enabled. Setting state=DISABLED will pause the log generation for this config.

optional .google.cloud.networkmanagement.v1.VpcFlowLogsConfig.State state = 3;

Returns
Type Description
VpcFlowLogsConfig.State

The state.

getStateValue()

public int getStateValue()

The state of the VPC Flow Log configuration. Default value is ENABLED. When creating a new configuration, it must be enabled. Setting state=DISABLED will pause the log generation for this config.

optional .google.cloud.networkmanagement.v1.VpcFlowLogsConfig.State state = 3;

Returns
Type Description
int

The enum numeric value on the wire for state.

getSubnet()

public String getSubnet()

Traffic will be logged from VMs within the subnetwork. Format: projects/{project_id}/regions/{region}/subnetworks/{name}

string subnet = 101;

Returns
Type Description
String

The subnet.

getSubnetBytes()

public ByteString getSubnetBytes()

Traffic will be logged from VMs within the subnetwork. Format: projects/{project_id}/regions/{region}/subnetworks/{name}

string subnet = 101;

Returns
Type Description
ByteString

The bytes for subnet.

getTargetResourceCase()

public EffectiveVpcFlowLogsConfig.TargetResourceCase getTargetResourceCase()
Returns
Type Description
EffectiveVpcFlowLogsConfig.TargetResourceCase

getVpnTunnel()

public String getVpnTunnel()

Traffic will be logged from the VPN Tunnel. Format: projects/{project_id}/regions/{region}/vpnTunnels/{name}

string vpn_tunnel = 103;

Returns
Type Description
String

The vpnTunnel.

getVpnTunnelBytes()

public ByteString getVpnTunnelBytes()

Traffic will be logged from the VPN Tunnel. Format: projects/{project_id}/regions/{region}/vpnTunnels/{name}

string vpn_tunnel = 103;

Returns
Type Description
ByteString

The bytes for vpnTunnel.

hasAggregationInterval()

public boolean hasAggregationInterval()

The aggregation interval for the logs. Default value is INTERVAL_5_SEC.

optional .google.cloud.networkmanagement.v1.VpcFlowLogsConfig.AggregationInterval aggregation_interval = 4;

Returns
Type Description
boolean

Whether the aggregationInterval field is set.

hasCrossProjectMetadata()

public boolean hasCrossProjectMetadata()

Determines whether to include cross project annotations in the logs. This field is available only for organization configurations. If not specified in org configs will be set to CROSS_PROJECT_METADATA_ENABLED.

optional .google.cloud.networkmanagement.v1.VpcFlowLogsConfig.CrossProjectMetadata cross_project_metadata = 13;

Returns
Type Description
boolean

Whether the crossProjectMetadata field is set.

hasFilterExpr()

public boolean hasFilterExpr()

Export filter used to define which VPC Flow Logs should be logged.

optional string filter_expr = 8;

Returns
Type Description
boolean

Whether the filterExpr field is set.

hasFlowSampling()

public boolean hasFlowSampling()

The value of the field must be in (0, 1]. The sampling rate of VPC Flow Logs where 1.0 means all collected logs are reported. Setting the sampling rate to 0.0 is not allowed. If you want to disable VPC Flow Logs, use the state field instead. Default value is 1.0.

optional float flow_sampling = 5;

Returns
Type Description
boolean

Whether the flowSampling field is set.

hasInterconnectAttachment()

public boolean hasInterconnectAttachment()

Traffic will be logged from the Interconnect Attachment. Format: projects/{project_id}/regions/{region}/interconnectAttachments/{name}

string interconnect_attachment = 102;

Returns
Type Description
boolean

Whether the interconnectAttachment field is set.

hasMetadata()

public boolean hasMetadata()

Configures whether all, none or a subset of metadata fields should be added to the reported VPC flow logs. Default value is INCLUDE_ALL_METADATA.

optional .google.cloud.networkmanagement.v1.VpcFlowLogsConfig.Metadata metadata = 6;

Returns
Type Description
boolean

Whether the metadata field is set.

hasNetwork()

public boolean hasNetwork()

Traffic will be logged from VMs, VPN tunnels and Interconnect Attachments within the network. Format: projects/{project_id}/global/networks/{name}

string network = 100;

Returns
Type Description
boolean

Whether the network field is set.

hasScope()

public boolean hasScope()

Specifies the scope of the config (e.g., SUBNET, NETWORK, ORGANIZATION..).

optional .google.cloud.networkmanagement.v1.EffectiveVpcFlowLogsConfig.Scope scope = 12;

Returns
Type Description
boolean

Whether the scope field is set.

hasState()

public boolean hasState()

The state of the VPC Flow Log configuration. Default value is ENABLED. When creating a new configuration, it must be enabled. Setting state=DISABLED will pause the log generation for this config.

optional .google.cloud.networkmanagement.v1.VpcFlowLogsConfig.State state = 3;

Returns
Type Description
boolean

Whether the state field is set.

hasSubnet()

public boolean hasSubnet()

Traffic will be logged from VMs within the subnetwork. Format: projects/{project_id}/regions/{region}/subnetworks/{name}

string subnet = 101;

Returns
Type Description
boolean

Whether the subnet field is set.

hasVpnTunnel()

public boolean hasVpnTunnel()

Traffic will be logged from the VPN Tunnel. Format: projects/{project_id}/regions/{region}/vpnTunnels/{name}

string vpn_tunnel = 103;

Returns
Type Description
boolean

Whether the vpnTunnel field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public EffectiveVpcFlowLogsConfig.Builder newBuilderForType()
Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected EffectiveVpcFlowLogsConfig.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder
Overrides

toBuilder()

public EffectiveVpcFlowLogsConfig.Builder toBuilder()
Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException