Class VpcFlowLogsConfig.Builder (1.52.0)

public static final class VpcFlowLogsConfig.Builder extends GeneratedMessageV3.Builder<VpcFlowLogsConfig.Builder> implements VpcFlowLogsConfigOrBuilder

A configuration to generate VPC Flow Logs.

Protobuf type google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig

Static Methods

getDescriptor()

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

Methods

addAllMetadataFields(Iterable<String> values)

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

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The metadataFields to add.

Returns
Type Description
VpcFlowLogsConfig.Builder

This builder for chaining.

addMetadataFields(String value)

public VpcFlowLogsConfig.Builder addMetadataFields(String value)

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The metadataFields to add.

Returns
Type Description
VpcFlowLogsConfig.Builder

This builder for chaining.

addMetadataFieldsBytes(ByteString value)

public VpcFlowLogsConfig.Builder addMetadataFieldsBytes(ByteString value)

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the metadataFields to add.

Returns
Type Description
VpcFlowLogsConfig.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public VpcFlowLogsConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
VpcFlowLogsConfig.Builder
Overrides

build()

public VpcFlowLogsConfig build()
Returns
Type Description
VpcFlowLogsConfig

buildPartial()

public VpcFlowLogsConfig buildPartial()
Returns
Type Description
VpcFlowLogsConfig

clear()

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

clearAggregationInterval()

public VpcFlowLogsConfig.Builder clearAggregationInterval()

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

optional .google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval aggregation_interval = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
VpcFlowLogsConfig.Builder

This builder for chaining.

clearCreateTime()

public VpcFlowLogsConfig.Builder clearCreateTime()

Output only. The time the config was created.

.google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
VpcFlowLogsConfig.Builder

clearDescription()

public VpcFlowLogsConfig.Builder clearDescription()

Optional. The user-supplied description of the VPC Flow Logs configuration. Maximum of 512 characters.

optional string description = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
VpcFlowLogsConfig.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public VpcFlowLogsConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
VpcFlowLogsConfig.Builder
Overrides

clearFilterExpr()

public VpcFlowLogsConfig.Builder clearFilterExpr()

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

optional string filter_expr = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
VpcFlowLogsConfig.Builder

This builder for chaining.

clearFlowSampling()

public VpcFlowLogsConfig.Builder clearFlowSampling()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
VpcFlowLogsConfig.Builder

This builder for chaining.

clearInterconnectAttachment()

public VpcFlowLogsConfig.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
VpcFlowLogsConfig.Builder

This builder for chaining.

clearLabels()

public VpcFlowLogsConfig.Builder clearLabels()
Returns
Type Description
VpcFlowLogsConfig.Builder

clearMetadata()

public VpcFlowLogsConfig.Builder clearMetadata()

Optional. 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.v1beta1.VpcFlowLogsConfig.Metadata metadata = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
VpcFlowLogsConfig.Builder

This builder for chaining.

clearMetadataFields()

public VpcFlowLogsConfig.Builder clearMetadataFields()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
VpcFlowLogsConfig.Builder

This builder for chaining.

clearName()

public VpcFlowLogsConfig.Builder clearName()

Identifier. Unique name of the configuration using the form: projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
VpcFlowLogsConfig.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public VpcFlowLogsConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
VpcFlowLogsConfig.Builder
Overrides

clearState()

public VpcFlowLogsConfig.Builder clearState()

Optional. The state of the VPC Flow Log configuration. Default value is ENABLED. When creating a new configuration, it must be enabled.

optional .google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State state = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
VpcFlowLogsConfig.Builder

This builder for chaining.

clearTargetResource()

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

clearUpdateTime()

public VpcFlowLogsConfig.Builder clearUpdateTime()

Output only. The time the config was updated.

.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
VpcFlowLogsConfig.Builder

clearVpnTunnel()

public VpcFlowLogsConfig.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
VpcFlowLogsConfig.Builder

This builder for chaining.

clone()

public VpcFlowLogsConfig.Builder clone()
Returns
Type Description
VpcFlowLogsConfig.Builder
Overrides

containsLabels(String key)

public boolean containsLabels(String key)

Optional. Resource labels to represent user-provided metadata.

map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

getAggregationInterval()

public VpcFlowLogsConfig.AggregationInterval getAggregationInterval()

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

optional .google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval aggregation_interval = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
VpcFlowLogsConfig.AggregationInterval

The aggregationInterval.

getAggregationIntervalValue()

public int getAggregationIntervalValue()

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

optional .google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval aggregation_interval = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for aggregationInterval.

getCreateTime()

public Timestamp getCreateTime()

Output only. The time the config was created.

.google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. The time the config was created.

.google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The time the config was created.

.google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public VpcFlowLogsConfig getDefaultInstanceForType()
Returns
Type Description
VpcFlowLogsConfig

getDescription()

public String getDescription()

Optional. The user-supplied description of the VPC Flow Logs configuration. Maximum of 512 characters.

optional string description = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. The user-supplied description of the VPC Flow Logs configuration. Maximum of 512 characters.

optional string description = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

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

getFilterExpr()

public String getFilterExpr()

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

optional string filter_expr = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The filterExpr.

getFilterExprBytes()

public ByteString getFilterExprBytes()

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

optional string filter_expr = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for filterExpr.

getFlowSampling()

public float getFlowSampling()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

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.

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Optional. Resource labels to represent user-provided metadata.

map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Optional. Resource labels to represent user-provided metadata.

map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Optional. Resource labels to represent user-provided metadata.

map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Optional. Resource labels to represent user-provided metadata.

map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
String

getMetadata()

public VpcFlowLogsConfig.Metadata getMetadata()

Optional. 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.v1beta1.VpcFlowLogsConfig.Metadata metadata = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
VpcFlowLogsConfig.Metadata

The metadata.

getMetadataFields(int index)

public String getMetadataFields(int index)

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

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)

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

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()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of metadataFields.

getMetadataFieldsList()

public ProtocolStringList getMetadataFieldsList()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the metadataFields.

getMetadataValue()

public int getMetadataValue()

Optional. 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.v1beta1.VpcFlowLogsConfig.Metadata metadata = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for metadata.

getMutableLabels() (deprecated)

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getName()

public String getName()

Identifier. Unique name of the configuration using the form: projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. Unique name of the configuration using the form: projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

getState()

public VpcFlowLogsConfig.State getState()

Optional. The state of the VPC Flow Log configuration. Default value is ENABLED. When creating a new configuration, it must be enabled.

optional .google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State state = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
VpcFlowLogsConfig.State

The state.

getStateValue()

public int getStateValue()

Optional. The state of the VPC Flow Log configuration. Default value is ENABLED. When creating a new configuration, it must be enabled.

optional .google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State state = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for state.

getTargetResourceCase()

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

getUpdateTime()

public Timestamp getUpdateTime()

Output only. The time the config was updated.

.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Output only. The time the config was updated.

.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The time the config was updated.

.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

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()

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

optional .google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval aggregation_interval = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the aggregationInterval field is set.

hasCreateTime()

public boolean hasCreateTime()

Output only. The time the config was created.

.google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasDescription()

public boolean hasDescription()

Optional. The user-supplied description of the VPC Flow Logs configuration. Maximum of 512 characters.

optional string description = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the description field is set.

hasFilterExpr()

public boolean hasFilterExpr()

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

optional string filter_expr = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the filterExpr field is set.

hasFlowSampling()

public boolean hasFlowSampling()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

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()

Optional. 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.v1beta1.VpcFlowLogsConfig.Metadata metadata = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the metadata field is set.

hasState()

public boolean hasState()

Optional. The state of the VPC Flow Log configuration. Default value is ENABLED. When creating a new configuration, it must be enabled.

optional .google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State state = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the state field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. The time the config was updated.

.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime 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 GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCreateTime(Timestamp value)

public VpcFlowLogsConfig.Builder mergeCreateTime(Timestamp value)

Output only. The time the config was created.

.google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
VpcFlowLogsConfig.Builder

mergeFrom(VpcFlowLogsConfig other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final VpcFlowLogsConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
VpcFlowLogsConfig.Builder
Overrides

mergeUpdateTime(Timestamp value)

public VpcFlowLogsConfig.Builder mergeUpdateTime(Timestamp value)

Output only. The time the config was updated.

.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
VpcFlowLogsConfig.Builder

putAllLabels(Map<String,String> values)

public VpcFlowLogsConfig.Builder putAllLabels(Map<String,String> values)

Optional. Resource labels to represent user-provided metadata.

map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Map<String,String>
Returns
Type Description
VpcFlowLogsConfig.Builder

putLabels(String key, String value)

public VpcFlowLogsConfig.Builder putLabels(String key, String value)

Optional. Resource labels to represent user-provided metadata.

map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
value String
Returns
Type Description
VpcFlowLogsConfig.Builder

removeLabels(String key)

public VpcFlowLogsConfig.Builder removeLabels(String key)

Optional. Resource labels to represent user-provided metadata.

map<string, string> labels = 11 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
VpcFlowLogsConfig.Builder

setAggregationInterval(VpcFlowLogsConfig.AggregationInterval value)

public VpcFlowLogsConfig.Builder setAggregationInterval(VpcFlowLogsConfig.AggregationInterval value)

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

optional .google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval aggregation_interval = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value VpcFlowLogsConfig.AggregationInterval

The aggregationInterval to set.

Returns
Type Description
VpcFlowLogsConfig.Builder

This builder for chaining.

setAggregationIntervalValue(int value)

public VpcFlowLogsConfig.Builder setAggregationIntervalValue(int value)

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

optional .google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval aggregation_interval = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

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

Returns
Type Description
VpcFlowLogsConfig.Builder

This builder for chaining.

setCreateTime(Timestamp value)

public VpcFlowLogsConfig.Builder setCreateTime(Timestamp value)

Output only. The time the config was created.

.google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
VpcFlowLogsConfig.Builder

setCreateTime(Timestamp.Builder builderForValue)

public VpcFlowLogsConfig.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. The time the config was created.

.google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
VpcFlowLogsConfig.Builder

setDescription(String value)

public VpcFlowLogsConfig.Builder setDescription(String value)

Optional. The user-supplied description of the VPC Flow Logs configuration. Maximum of 512 characters.

optional string description = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The description to set.

Returns
Type Description
VpcFlowLogsConfig.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public VpcFlowLogsConfig.Builder setDescriptionBytes(ByteString value)

Optional. The user-supplied description of the VPC Flow Logs configuration. Maximum of 512 characters.

optional string description = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
VpcFlowLogsConfig.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public VpcFlowLogsConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
VpcFlowLogsConfig.Builder
Overrides

setFilterExpr(String value)

public VpcFlowLogsConfig.Builder setFilterExpr(String value)

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

optional string filter_expr = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The filterExpr to set.

Returns
Type Description
VpcFlowLogsConfig.Builder

This builder for chaining.

setFilterExprBytes(ByteString value)

public VpcFlowLogsConfig.Builder setFilterExprBytes(ByteString value)

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

optional string filter_expr = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for filterExpr to set.

Returns
Type Description
VpcFlowLogsConfig.Builder

This builder for chaining.

setFlowSampling(float value)

public VpcFlowLogsConfig.Builder setFlowSampling(float value)

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value float

The flowSampling to set.

Returns
Type Description
VpcFlowLogsConfig.Builder

This builder for chaining.

setInterconnectAttachment(String value)

public VpcFlowLogsConfig.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
VpcFlowLogsConfig.Builder

This builder for chaining.

setInterconnectAttachmentBytes(ByteString value)

public VpcFlowLogsConfig.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
VpcFlowLogsConfig.Builder

This builder for chaining.

setMetadata(VpcFlowLogsConfig.Metadata value)

public VpcFlowLogsConfig.Builder setMetadata(VpcFlowLogsConfig.Metadata value)

Optional. 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.v1beta1.VpcFlowLogsConfig.Metadata metadata = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value VpcFlowLogsConfig.Metadata

The metadata to set.

Returns
Type Description
VpcFlowLogsConfig.Builder

This builder for chaining.

setMetadataFields(int index, String value)

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

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The metadataFields to set.

Returns
Type Description
VpcFlowLogsConfig.Builder

This builder for chaining.

setMetadataValue(int value)

public VpcFlowLogsConfig.Builder setMetadataValue(int value)

Optional. 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.v1beta1.VpcFlowLogsConfig.Metadata metadata = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

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

Returns
Type Description
VpcFlowLogsConfig.Builder

This builder for chaining.

setName(String value)

public VpcFlowLogsConfig.Builder setName(String value)

Identifier. Unique name of the configuration using the form: projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
VpcFlowLogsConfig.Builder

This builder for chaining.

setNameBytes(ByteString value)

public VpcFlowLogsConfig.Builder setNameBytes(ByteString value)

Identifier. Unique name of the configuration using the form: projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
VpcFlowLogsConfig.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public VpcFlowLogsConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
VpcFlowLogsConfig.Builder
Overrides

setState(VpcFlowLogsConfig.State value)

public VpcFlowLogsConfig.Builder setState(VpcFlowLogsConfig.State value)

Optional. The state of the VPC Flow Log configuration. Default value is ENABLED. When creating a new configuration, it must be enabled.

optional .google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State state = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value VpcFlowLogsConfig.State

The state to set.

Returns
Type Description
VpcFlowLogsConfig.Builder

This builder for chaining.

setStateValue(int value)

public VpcFlowLogsConfig.Builder setStateValue(int value)

Optional. The state of the VPC Flow Log configuration. Default value is ENABLED. When creating a new configuration, it must be enabled.

optional .google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State state = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

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

Returns
Type Description
VpcFlowLogsConfig.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final VpcFlowLogsConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
VpcFlowLogsConfig.Builder
Overrides

setUpdateTime(Timestamp value)

public VpcFlowLogsConfig.Builder setUpdateTime(Timestamp value)

Output only. The time the config was updated.

.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
VpcFlowLogsConfig.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public VpcFlowLogsConfig.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. The time the config was updated.

.google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
VpcFlowLogsConfig.Builder

setVpnTunnel(String value)

public VpcFlowLogsConfig.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
VpcFlowLogsConfig.Builder

This builder for chaining.

setVpnTunnelBytes(ByteString value)

public VpcFlowLogsConfig.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
VpcFlowLogsConfig.Builder

This builder for chaining.