Class DnsThreatDetector.Builder (0.85.0)

public static final class DnsThreatDetector.Builder extends GeneratedMessageV3.Builder<DnsThreatDetector.Builder> implements DnsThreatDetectorOrBuilder

A DNS threat detector sends DNS query logs to a provider that then analyzes the logs to identify threat events in the DNS queries. By default, all VPC networks in your projects are included. You can exclude specific networks by supplying excluded_networks.

Protobuf type google.cloud.networksecurity.v1beta1.DnsThreatDetector

Static Methods

getDescriptor()

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

Methods

addAllExcludedNetworks(Iterable<String> values)

public DnsThreatDetector.Builder addAllExcludedNetworks(Iterable<String> values)

Optional. A list of network resource names which aren't monitored by this DnsThreatDetector.

Example: projects/PROJECT_ID/global/networks/NETWORK_NAME.

repeated string excluded_networks = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
values Iterable<String>

The excludedNetworks to add.

Returns
Type Description
DnsThreatDetector.Builder

This builder for chaining.

addExcludedNetworks(String value)

public DnsThreatDetector.Builder addExcludedNetworks(String value)

Optional. A list of network resource names which aren't monitored by this DnsThreatDetector.

Example: projects/PROJECT_ID/global/networks/NETWORK_NAME.

repeated string excluded_networks = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The excludedNetworks to add.

Returns
Type Description
DnsThreatDetector.Builder

This builder for chaining.

addExcludedNetworksBytes(ByteString value)

public DnsThreatDetector.Builder addExcludedNetworksBytes(ByteString value)

Optional. A list of network resource names which aren't monitored by this DnsThreatDetector.

Example: projects/PROJECT_ID/global/networks/NETWORK_NAME.

repeated string excluded_networks = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes of the excludedNetworks to add.

Returns
Type Description
DnsThreatDetector.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public DnsThreatDetector build()
Returns
Type Description
DnsThreatDetector

buildPartial()

public DnsThreatDetector buildPartial()
Returns
Type Description
DnsThreatDetector

clear()

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

clearCreateTime()

public DnsThreatDetector.Builder clearCreateTime()

Output only. Create time stamp.

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

Returns
Type Description
DnsThreatDetector.Builder

clearExcludedNetworks()

public DnsThreatDetector.Builder clearExcludedNetworks()

Optional. A list of network resource names which aren't monitored by this DnsThreatDetector.

Example: projects/PROJECT_ID/global/networks/NETWORK_NAME.

repeated string excluded_networks = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
DnsThreatDetector.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearLabels()

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

clearName()

public DnsThreatDetector.Builder clearName()

Immutable. Identifier. Name of the DnsThreatDetector resource.

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

Returns
Type Description
DnsThreatDetector.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearProvider()

public DnsThreatDetector.Builder clearProvider()

Required. The provider used for DNS threat analysis.

.google.cloud.networksecurity.v1beta1.DnsThreatDetector.Provider provider = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
DnsThreatDetector.Builder

This builder for chaining.

clearUpdateTime()

public DnsThreatDetector.Builder clearUpdateTime()

Output only. Update time stamp.

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

Returns
Type Description
DnsThreatDetector.Builder

clone()

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

containsLabels(String key)

public boolean containsLabels(String key)

Optional. Any labels associated with the DnsThreatDetector, listed as key value pairs.

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

Parameter
Name Description
key String
Returns
Type Description
boolean

getCreateTime()

public Timestamp getCreateTime()

Output only. Create time stamp.

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

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. Create time stamp.

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

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Create time stamp.

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

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public DnsThreatDetector getDefaultInstanceForType()
Returns
Type Description
DnsThreatDetector

getDescriptorForType()

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

getExcludedNetworks(int index)

public String getExcludedNetworks(int index)

Optional. A list of network resource names which aren't monitored by this DnsThreatDetector.

Example: projects/PROJECT_ID/global/networks/NETWORK_NAME.

repeated string excluded_networks = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The excludedNetworks at the given index.

getExcludedNetworksBytes(int index)

public ByteString getExcludedNetworksBytes(int index)

Optional. A list of network resource names which aren't monitored by this DnsThreatDetector.

Example: projects/PROJECT_ID/global/networks/NETWORK_NAME.

repeated string excluded_networks = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the excludedNetworks at the given index.

getExcludedNetworksCount()

public int getExcludedNetworksCount()

Optional. A list of network resource names which aren't monitored by this DnsThreatDetector.

Example: projects/PROJECT_ID/global/networks/NETWORK_NAME.

repeated string excluded_networks = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
int

The count of excludedNetworks.

getExcludedNetworksList()

public ProtocolStringList getExcludedNetworksList()

Optional. A list of network resource names which aren't monitored by this DnsThreatDetector.

Example: projects/PROJECT_ID/global/networks/NETWORK_NAME.

repeated string excluded_networks = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ProtocolStringList

A list containing the excludedNetworks.

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Optional. Any labels associated with the DnsThreatDetector, listed as key value pairs.

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

Returns
Type Description
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Optional. Any labels associated with the DnsThreatDetector, listed as key value pairs.

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

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Optional. Any labels associated with the DnsThreatDetector, listed as key value pairs.

map<string, string> labels = 4 [(.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. Any labels associated with the DnsThreatDetector, listed as key value pairs.

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

Parameter
Name Description
key String
Returns
Type Description
String

getMutableLabels() (deprecated)

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getName()

public String getName()

Immutable. Identifier. Name of the DnsThreatDetector resource.

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

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Immutable. Identifier. Name of the DnsThreatDetector resource.

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

Returns
Type Description
ByteString

The bytes for name.

getProvider()

public DnsThreatDetector.Provider getProvider()

Required. The provider used for DNS threat analysis.

.google.cloud.networksecurity.v1beta1.DnsThreatDetector.Provider provider = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
DnsThreatDetector.Provider

The provider.

getProviderValue()

public int getProviderValue()

Required. The provider used for DNS threat analysis.

.google.cloud.networksecurity.v1beta1.DnsThreatDetector.Provider provider = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for provider.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. Update time stamp.

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

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Output only. Update time stamp.

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

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. Update time stamp.

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

Returns
Type Description
TimestampOrBuilder

hasCreateTime()

public boolean hasCreateTime()

Output only. Create time stamp.

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

Returns
Type Description
boolean

Whether the createTime field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. Update time stamp.

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

Returns
Type Description
boolean

Whether the updateTime 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 DnsThreatDetector.Builder mergeCreateTime(Timestamp value)

Output only. Create time stamp.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
DnsThreatDetector.Builder

mergeFrom(DnsThreatDetector other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeUpdateTime(Timestamp value)

public DnsThreatDetector.Builder mergeUpdateTime(Timestamp value)

Output only. Update time stamp.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
DnsThreatDetector.Builder

putAllLabels(Map<String,String> values)

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

Optional. Any labels associated with the DnsThreatDetector, listed as key value pairs.

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

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

putLabels(String key, String value)

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

Optional. Any labels associated with the DnsThreatDetector, listed as key value pairs.

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

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

removeLabels(String key)

public DnsThreatDetector.Builder removeLabels(String key)

Optional. Any labels associated with the DnsThreatDetector, listed as key value pairs.

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

Parameter
Name Description
key String
Returns
Type Description
DnsThreatDetector.Builder

setCreateTime(Timestamp value)

public DnsThreatDetector.Builder setCreateTime(Timestamp value)

Output only. Create time stamp.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
DnsThreatDetector.Builder

setCreateTime(Timestamp.Builder builderForValue)

public DnsThreatDetector.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. Create time stamp.

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

Parameter
Name Description
builderForValue Builder
Returns
Type Description
DnsThreatDetector.Builder

setExcludedNetworks(int index, String value)

public DnsThreatDetector.Builder setExcludedNetworks(int index, String value)

Optional. A list of network resource names which aren't monitored by this DnsThreatDetector.

Example: projects/PROJECT_ID/global/networks/NETWORK_NAME.

repeated string excluded_networks = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameters
Name Description
index int

The index to set the value at.

value String

The excludedNetworks to set.

Returns
Type Description
DnsThreatDetector.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public DnsThreatDetector.Builder setName(String value)

Immutable. Identifier. Name of the DnsThreatDetector resource.

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
DnsThreatDetector.Builder

This builder for chaining.

setNameBytes(ByteString value)

public DnsThreatDetector.Builder setNameBytes(ByteString value)

Immutable. Identifier. Name of the DnsThreatDetector resource.

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
DnsThreatDetector.Builder

This builder for chaining.

setProvider(DnsThreatDetector.Provider value)

public DnsThreatDetector.Builder setProvider(DnsThreatDetector.Provider value)

Required. The provider used for DNS threat analysis.

.google.cloud.networksecurity.v1beta1.DnsThreatDetector.Provider provider = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value DnsThreatDetector.Provider

The provider to set.

Returns
Type Description
DnsThreatDetector.Builder

This builder for chaining.

setProviderValue(int value)

public DnsThreatDetector.Builder setProviderValue(int value)

Required. The provider used for DNS threat analysis.

.google.cloud.networksecurity.v1beta1.DnsThreatDetector.Provider provider = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

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

Returns
Type Description
DnsThreatDetector.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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

setUpdateTime(Timestamp value)

public DnsThreatDetector.Builder setUpdateTime(Timestamp value)

Output only. Update time stamp.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
DnsThreatDetector.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public DnsThreatDetector.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. Update time stamp.

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

Parameter
Name Description
builderForValue Builder
Returns
Type Description
DnsThreatDetector.Builder