Class UrlFilter.Builder

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

public static final class UrlFilter.Builder extends com.google.protobuf.GeneratedMessage.Builder<UrlFilter.Builder> implements UrlFilterOrBuilder
 A URL filter defines an action to take for some URL match.
 
Protobuf type google.cloud.networksecurity.v1.UrlFilter
  • Method Details

    • getDescriptor

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

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

      public UrlFilter.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<UrlFilter.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<UrlFilter.Builder>
    • getDefaultInstanceForType

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

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

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

      public UrlFilter.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<UrlFilter.Builder>
    • mergeFrom

      public UrlFilter.Builder mergeFrom(UrlFilter other)
    • isInitialized

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

      public UrlFilter.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<UrlFilter.Builder>
      Throws:
      IOException
    • getFilteringActionValue

      public int getFilteringActionValue()
       Required. The action taken when this filter is applied.
       
      .google.cloud.networksecurity.v1.UrlFilter.UrlFilteringAction filtering_action = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getFilteringActionValue in interface UrlFilterOrBuilder
      Returns:
      The enum numeric value on the wire for filteringAction.
    • setFilteringActionValue

      public UrlFilter.Builder setFilteringActionValue(int value)
       Required. The action taken when this filter is applied.
       
      .google.cloud.networksecurity.v1.UrlFilter.UrlFilteringAction filtering_action = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The enum numeric value on the wire for filteringAction to set.
      Returns:
      This builder for chaining.
    • getFilteringAction

      public UrlFilter.UrlFilteringAction getFilteringAction()
       Required. The action taken when this filter is applied.
       
      .google.cloud.networksecurity.v1.UrlFilter.UrlFilteringAction filtering_action = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getFilteringAction in interface UrlFilterOrBuilder
      Returns:
      The filteringAction.
    • setFilteringAction

      public UrlFilter.Builder setFilteringAction(UrlFilter.UrlFilteringAction value)
       Required. The action taken when this filter is applied.
       
      .google.cloud.networksecurity.v1.UrlFilter.UrlFilteringAction filtering_action = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The filteringAction to set.
      Returns:
      This builder for chaining.
    • clearFilteringAction

      public UrlFilter.Builder clearFilteringAction()
       Required. The action taken when this filter is applied.
       
      .google.cloud.networksecurity.v1.UrlFilter.UrlFilteringAction filtering_action = 1 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • getUrlsList

      public com.google.protobuf.ProtocolStringList getUrlsList()
       Required. The list of strings that a URL must match with for this filter to
       be applied.
       
      repeated string urls = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getUrlsList in interface UrlFilterOrBuilder
      Returns:
      A list containing the urls.
    • getUrlsCount

      public int getUrlsCount()
       Required. The list of strings that a URL must match with for this filter to
       be applied.
       
      repeated string urls = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getUrlsCount in interface UrlFilterOrBuilder
      Returns:
      The count of urls.
    • getUrls

      public String getUrls(int index)
       Required. The list of strings that a URL must match with for this filter to
       be applied.
       
      repeated string urls = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getUrls in interface UrlFilterOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The urls at the given index.
    • getUrlsBytes

      public com.google.protobuf.ByteString getUrlsBytes(int index)
       Required. The list of strings that a URL must match with for this filter to
       be applied.
       
      repeated string urls = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getUrlsBytes in interface UrlFilterOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the urls at the given index.
    • setUrls

      public UrlFilter.Builder setUrls(int index, String value)
       Required. The list of strings that a URL must match with for this filter to
       be applied.
       
      repeated string urls = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      index - The index to set the value at.
      value - The urls to set.
      Returns:
      This builder for chaining.
    • addUrls

      public UrlFilter.Builder addUrls(String value)
       Required. The list of strings that a URL must match with for this filter to
       be applied.
       
      repeated string urls = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The urls to add.
      Returns:
      This builder for chaining.
    • addAllUrls

      public UrlFilter.Builder addAllUrls(Iterable<String> values)
       Required. The list of strings that a URL must match with for this filter to
       be applied.
       
      repeated string urls = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      values - The urls to add.
      Returns:
      This builder for chaining.
    • clearUrls

      public UrlFilter.Builder clearUrls()
       Required. The list of strings that a URL must match with for this filter to
       be applied.
       
      repeated string urls = 2 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • addUrlsBytes

      public UrlFilter.Builder addUrlsBytes(com.google.protobuf.ByteString value)
       Required. The list of strings that a URL must match with for this filter to
       be applied.
       
      repeated string urls = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes of the urls to add.
      Returns:
      This builder for chaining.
    • hasPriority

      public boolean hasPriority()
       Required. The priority of this filter within the URL Filtering Profile.
       Lower integers indicate higher priorities. The priority of a filter must be
       unique within a URL Filtering Profile.
       
      optional int32 priority = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasPriority in interface UrlFilterOrBuilder
      Returns:
      Whether the priority field is set.
    • getPriority

      public int getPriority()
       Required. The priority of this filter within the URL Filtering Profile.
       Lower integers indicate higher priorities. The priority of a filter must be
       unique within a URL Filtering Profile.
       
      optional int32 priority = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getPriority in interface UrlFilterOrBuilder
      Returns:
      The priority.
    • setPriority

      public UrlFilter.Builder setPriority(int value)
       Required. The priority of this filter within the URL Filtering Profile.
       Lower integers indicate higher priorities. The priority of a filter must be
       unique within a URL Filtering Profile.
       
      optional int32 priority = 3 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The priority to set.
      Returns:
      This builder for chaining.
    • clearPriority

      public UrlFilter.Builder clearPriority()
       Required. The priority of this filter within the URL Filtering Profile.
       Lower integers indicate higher priorities. The priority of a filter must be
       unique within a URL Filtering Profile.
       
      optional int32 priority = 3 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.