Class EffectiveVpcFlowLogsConfig.Builder (1.84.0)

public static final class EffectiveVpcFlowLogsConfig.Builder extends GeneratedMessage.Builder<EffectiveVpcFlowLogsConfig.Builder> implements EffectiveVpcFlowLogsConfigOrBuilder

A configuration to generate a response for GetEffectiveVpcFlowLogsConfig request.

Protobuf type google.cloud.networkmanagement.v1.EffectiveVpcFlowLogsConfig

Static Methods

getDescriptor()

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

Methods

addAllMetadataFields(Iterable<String> values)

public EffectiveVpcFlowLogsConfig.Builder addAllMetadataFields(Iterable<String> values)

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
values Iterable<String>

The metadataFields to add.

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

addMetadataFields(String value)

public EffectiveVpcFlowLogsConfig.Builder addMetadataFields(String value)

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
value String

The metadataFields to add.

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

addMetadataFieldsBytes(ByteString value)

public EffectiveVpcFlowLogsConfig.Builder addMetadataFieldsBytes(ByteString value)

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
value ByteString

The bytes of the metadataFields to add.

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

build()

public EffectiveVpcFlowLogsConfig build()
Returns
Type Description
EffectiveVpcFlowLogsConfig

buildPartial()

public EffectiveVpcFlowLogsConfig buildPartial()
Returns
Type Description
EffectiveVpcFlowLogsConfig

clear()

public EffectiveVpcFlowLogsConfig.Builder clear()
Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder
Overrides

clearAggregationInterval()

public EffectiveVpcFlowLogsConfig.Builder clearAggregationInterval()

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
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

clearCrossProjectMetadata()

public EffectiveVpcFlowLogsConfig.Builder clearCrossProjectMetadata()

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
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

clearFilterExpr()

public EffectiveVpcFlowLogsConfig.Builder clearFilterExpr()

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

optional string filter_expr = 8;

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

clearFlowSampling()

public EffectiveVpcFlowLogsConfig.Builder clearFlowSampling()

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
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

clearInterconnectAttachment()

public EffectiveVpcFlowLogsConfig.Builder clearInterconnectAttachment()

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

string interconnect_attachment = 102;

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

clearMetadata()

public EffectiveVpcFlowLogsConfig.Builder clearMetadata()

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
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

clearMetadataFields()

public EffectiveVpcFlowLogsConfig.Builder clearMetadataFields()

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
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

clearName()

public EffectiveVpcFlowLogsConfig.Builder clearName()

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
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

clearNetwork()

public EffectiveVpcFlowLogsConfig.Builder clearNetwork()

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
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

clearScope()

public EffectiveVpcFlowLogsConfig.Builder clearScope()

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

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

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

clearState()

public EffectiveVpcFlowLogsConfig.Builder clearState()

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
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

clearSubnet()

public EffectiveVpcFlowLogsConfig.Builder clearSubnet()

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

string subnet = 101;

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

clearTargetResource()

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

clearVpnTunnel()

public EffectiveVpcFlowLogsConfig.Builder clearVpnTunnel()

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

string vpn_tunnel = 103;

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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.

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.

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.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(EffectiveVpcFlowLogsConfig other)

public EffectiveVpcFlowLogsConfig.Builder mergeFrom(EffectiveVpcFlowLogsConfig other)
Parameter
Name Description
other EffectiveVpcFlowLogsConfig
Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public EffectiveVpcFlowLogsConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public EffectiveVpcFlowLogsConfig.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder
Overrides

setAggregationInterval(VpcFlowLogsConfig.AggregationInterval value)

public EffectiveVpcFlowLogsConfig.Builder setAggregationInterval(VpcFlowLogsConfig.AggregationInterval value)

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

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

Parameter
Name Description
value VpcFlowLogsConfig.AggregationInterval

The aggregationInterval to set.

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

setAggregationIntervalValue(int value)

public EffectiveVpcFlowLogsConfig.Builder setAggregationIntervalValue(int value)

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

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

Parameter
Name Description
value int

The enum numeric value on the wire for aggregationInterval to set.

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

setCrossProjectMetadata(VpcFlowLogsConfig.CrossProjectMetadata value)

public EffectiveVpcFlowLogsConfig.Builder setCrossProjectMetadata(VpcFlowLogsConfig.CrossProjectMetadata value)

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;

Parameter
Name Description
value VpcFlowLogsConfig.CrossProjectMetadata

The crossProjectMetadata to set.

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

setCrossProjectMetadataValue(int value)

public EffectiveVpcFlowLogsConfig.Builder setCrossProjectMetadataValue(int value)

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;

Parameter
Name Description
value int

The enum numeric value on the wire for crossProjectMetadata to set.

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

setFilterExpr(String value)

public EffectiveVpcFlowLogsConfig.Builder setFilterExpr(String value)

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

optional string filter_expr = 8;

Parameter
Name Description
value String

The filterExpr to set.

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

setFilterExprBytes(ByteString value)

public EffectiveVpcFlowLogsConfig.Builder setFilterExprBytes(ByteString value)

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

optional string filter_expr = 8;

Parameter
Name Description
value ByteString

The bytes for filterExpr to set.

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

setFlowSampling(float value)

public EffectiveVpcFlowLogsConfig.Builder setFlowSampling(float value)

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;

Parameter
Name Description
value float

The flowSampling to set.

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

setInterconnectAttachment(String value)

public EffectiveVpcFlowLogsConfig.Builder setInterconnectAttachment(String value)

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

string interconnect_attachment = 102;

Parameter
Name Description
value String

The interconnectAttachment to set.

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

setInterconnectAttachmentBytes(ByteString value)

public EffectiveVpcFlowLogsConfig.Builder setInterconnectAttachmentBytes(ByteString value)

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

string interconnect_attachment = 102;

Parameter
Name Description
value ByteString

The bytes for interconnectAttachment to set.

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

setMetadata(VpcFlowLogsConfig.Metadata value)

public EffectiveVpcFlowLogsConfig.Builder setMetadata(VpcFlowLogsConfig.Metadata value)

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;

Parameter
Name Description
value VpcFlowLogsConfig.Metadata

The metadata to set.

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

setMetadataFields(int index, String value)

public EffectiveVpcFlowLogsConfig.Builder setMetadataFields(int index, String value)

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;

Parameters
Name Description
index int

The index to set the value at.

value String

The metadataFields to set.

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

setMetadataValue(int value)

public EffectiveVpcFlowLogsConfig.Builder setMetadataValue(int value)

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;

Parameter
Name Description
value int

The enum numeric value on the wire for metadata to set.

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

setName(String value)

public EffectiveVpcFlowLogsConfig.Builder setName(String value)

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;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

setNameBytes(ByteString value)

public EffectiveVpcFlowLogsConfig.Builder setNameBytes(ByteString value)

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;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

setNetwork(String value)

public EffectiveVpcFlowLogsConfig.Builder setNetwork(String value)

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

string network = 100;

Parameter
Name Description
value String

The network to set.

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

setNetworkBytes(ByteString value)

public EffectiveVpcFlowLogsConfig.Builder setNetworkBytes(ByteString value)

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

string network = 100;

Parameter
Name Description
value ByteString

The bytes for network to set.

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

setScope(EffectiveVpcFlowLogsConfig.Scope value)

public EffectiveVpcFlowLogsConfig.Builder setScope(EffectiveVpcFlowLogsConfig.Scope value)

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

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

Parameter
Name Description
value EffectiveVpcFlowLogsConfig.Scope

The scope to set.

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

setScopeValue(int value)

public EffectiveVpcFlowLogsConfig.Builder setScopeValue(int value)

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

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

Parameter
Name Description
value int

The enum numeric value on the wire for scope to set.

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

setState(VpcFlowLogsConfig.State value)

public EffectiveVpcFlowLogsConfig.Builder setState(VpcFlowLogsConfig.State value)

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;

Parameter
Name Description
value VpcFlowLogsConfig.State

The state to set.

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

setStateValue(int value)

public EffectiveVpcFlowLogsConfig.Builder setStateValue(int value)

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;

Parameter
Name Description
value int

The enum numeric value on the wire for state to set.

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

setSubnet(String value)

public EffectiveVpcFlowLogsConfig.Builder setSubnet(String value)

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

string subnet = 101;

Parameter
Name Description
value String

The subnet to set.

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

setSubnetBytes(ByteString value)

public EffectiveVpcFlowLogsConfig.Builder setSubnetBytes(ByteString value)

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

string subnet = 101;

Parameter
Name Description
value ByteString

The bytes for subnet to set.

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

setVpnTunnel(String value)

public EffectiveVpcFlowLogsConfig.Builder setVpnTunnel(String value)

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

string vpn_tunnel = 103;

Parameter
Name Description
value String

The vpnTunnel to set.

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.

setVpnTunnelBytes(ByteString value)

public EffectiveVpcFlowLogsConfig.Builder setVpnTunnelBytes(ByteString value)

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

string vpn_tunnel = 103;

Parameter
Name Description
value ByteString

The bytes for vpnTunnel to set.

Returns
Type Description
EffectiveVpcFlowLogsConfig.Builder

This builder for chaining.