Class DnsThreatDetector.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<DnsThreatDetector.Builder>
com.google.cloud.networksecurity.v1beta1.DnsThreatDetector.Builder
All Implemented Interfaces:
DnsThreatDetectorOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
DnsThreatDetector

public static final class DnsThreatDetector.Builder extends com.google.protobuf.GeneratedMessage.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
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<DnsThreatDetector.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<DnsThreatDetector.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<DnsThreatDetector.Builder>
    • clear

      public DnsThreatDetector.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<DnsThreatDetector.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<DnsThreatDetector.Builder>
    • getDefaultInstanceForType

      public DnsThreatDetector getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public DnsThreatDetector build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public DnsThreatDetector buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public DnsThreatDetector.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<DnsThreatDetector.Builder>
    • mergeFrom

      public DnsThreatDetector.Builder mergeFrom(DnsThreatDetector other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<DnsThreatDetector.Builder>
    • mergeFrom

      public DnsThreatDetector.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<DnsThreatDetector.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       Immutable. Identifier. Name of the DnsThreatDetector resource.
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getName in interface DnsThreatDetectorOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Immutable. Identifier. Name of the DnsThreatDetector resource.
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getNameBytes in interface DnsThreatDetectorOrBuilder
      Returns:
      The bytes for name.
    • setName

      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];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • setNameBytes

      public DnsThreatDetector.Builder setNameBytes(com.google.protobuf.ByteString value)
       Immutable. Identifier. Name of the DnsThreatDetector resource.
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = IMMUTABLE];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • hasCreateTime

      public boolean hasCreateTime()
       Output only. Create time stamp.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasCreateTime in interface DnsThreatDetectorOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.Timestamp getCreateTime()
       Output only. Create time stamp.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTime in interface DnsThreatDetectorOrBuilder
      Returns:
      The createTime.
    • setCreateTime

      public DnsThreatDetector.Builder setCreateTime(com.google.protobuf.Timestamp value)
       Output only. Create time stamp.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setCreateTime

      public DnsThreatDetector.Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. Create time stamp.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeCreateTime

      public DnsThreatDetector.Builder mergeCreateTime(com.google.protobuf.Timestamp value)
       Output only. Create time stamp.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearCreateTime

      public DnsThreatDetector.Builder clearCreateTime()
       Output only. Create time stamp.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeBuilder

      public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
       Output only. Create time stamp.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
       Output only. Create time stamp.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTimeOrBuilder in interface DnsThreatDetectorOrBuilder
    • hasUpdateTime

      public boolean hasUpdateTime()
       Output only. Update time stamp.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasUpdateTime in interface DnsThreatDetectorOrBuilder
      Returns:
      Whether the updateTime field is set.
    • getUpdateTime

      public com.google.protobuf.Timestamp getUpdateTime()
       Output only. Update time stamp.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTime in interface DnsThreatDetectorOrBuilder
      Returns:
      The updateTime.
    • setUpdateTime

      public DnsThreatDetector.Builder setUpdateTime(com.google.protobuf.Timestamp value)
       Output only. Update time stamp.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setUpdateTime

      public DnsThreatDetector.Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. Update time stamp.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeUpdateTime

      public DnsThreatDetector.Builder mergeUpdateTime(com.google.protobuf.Timestamp value)
       Output only. Update time stamp.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearUpdateTime

      public DnsThreatDetector.Builder clearUpdateTime()
       Output only. Update time stamp.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getUpdateTimeBuilder

      public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder()
       Output only. Update time stamp.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getUpdateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
       Output only. Update time stamp.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTimeOrBuilder in interface DnsThreatDetectorOrBuilder
    • getLabelsCount

      public int getLabelsCount()
      Description copied from interface: DnsThreatDetectorOrBuilder
       Optional. Any labels associated with the DnsThreatDetector, listed as key
       value pairs.
       
      map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsCount in interface DnsThreatDetectorOrBuilder
    • containsLabels

      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];
      Specified by:
      containsLabels in interface DnsThreatDetectorOrBuilder
    • getLabels

      @Deprecated public Map<String,String> getLabels()
      Deprecated.
      Use getLabelsMap() instead.
      Specified by:
      getLabels in interface DnsThreatDetectorOrBuilder
    • 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];
      Specified by:
      getLabelsMap in interface DnsThreatDetectorOrBuilder
    • getLabelsOrDefault

      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];
      Specified by:
      getLabelsOrDefault in interface DnsThreatDetectorOrBuilder
    • getLabelsOrThrow

      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];
      Specified by:
      getLabelsOrThrow in interface DnsThreatDetectorOrBuilder
    • clearLabels

      public DnsThreatDetector.Builder clearLabels()
    • removeLabels

      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];
    • getMutableLabels

      @Deprecated public Map<String,String> getMutableLabels()
      Deprecated.
      Use alternate mutation accessors instead.
    • putLabels

      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];
    • putAllLabels

      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];
    • getExcludedNetworksList

      public com.google.protobuf.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) = { ... }
      Specified by:
      getExcludedNetworksList in interface DnsThreatDetectorOrBuilder
      Returns:
      A list containing the excludedNetworks.
    • 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) = { ... }
      Specified by:
      getExcludedNetworksCount in interface DnsThreatDetectorOrBuilder
      Returns:
      The count of excludedNetworks.
    • getExcludedNetworks

      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) = { ... }
      Specified by:
      getExcludedNetworks in interface DnsThreatDetectorOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The excludedNetworks at the given index.
    • getExcludedNetworksBytes

      public com.google.protobuf.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) = { ... }
      Specified by:
      getExcludedNetworksBytes in interface DnsThreatDetectorOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the excludedNetworks at the given index.
    • setExcludedNetworks

      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:
      index - The index to set the value at.
      value - The excludedNetworks to set.
      Returns:
      This builder for chaining.
    • addExcludedNetworks

      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) = { ... }
      Parameters:
      value - The excludedNetworks to add.
      Returns:
      This builder for chaining.
    • addAllExcludedNetworks

      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) = { ... }
      Parameters:
      values - The excludedNetworks to add.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • addExcludedNetworksBytes

      public DnsThreatDetector.Builder addExcludedNetworksBytes(com.google.protobuf.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) = { ... }
      Parameters:
      value - The bytes of the excludedNetworks to add.
      Returns:
      This builder for chaining.
    • 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];
      Specified by:
      getProviderValue in interface DnsThreatDetectorOrBuilder
      Returns:
      The enum numeric value on the wire for provider.
    • setProviderValue

      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];
      Parameters:
      value - The enum numeric value on the wire for provider to set.
      Returns:
      This builder for chaining.
    • 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];
      Specified by:
      getProvider in interface DnsThreatDetectorOrBuilder
      Returns:
      The provider.
    • setProvider

       Required. The provider used for DNS threat analysis.
       
      .google.cloud.networksecurity.v1beta1.DnsThreatDetector.Provider provider = 6 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The provider to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.