Class UrlFilter.Builder (0.94.0)

public static final class UrlFilter.Builder extends 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

Implements

UrlFilterOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllUrls(Iterable<String> values)

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

Parameter
Name Description
values Iterable<String>

The urls to add.

Returns
Type Description
UrlFilter.Builder

This builder for chaining.

addUrls(String value)

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

Parameter
Name Description
value String

The urls to add.

Returns
Type Description
UrlFilter.Builder

This builder for chaining.

addUrlsBytes(ByteString value)

public UrlFilter.Builder addUrlsBytes(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];

Parameter
Name Description
value ByteString

The bytes of the urls to add.

Returns
Type Description
UrlFilter.Builder

This builder for chaining.

build()

public UrlFilter build()
Returns
Type Description
UrlFilter

buildPartial()

public UrlFilter buildPartial()
Returns
Type Description
UrlFilter

clear()

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

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
Type Description
UrlFilter.Builder

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
Type Description
UrlFilter.Builder

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
Type Description
UrlFilter.Builder

This builder for chaining.

getDefaultInstanceForType()

public UrlFilter getDefaultInstanceForType()
Returns
Type Description
UrlFilter

getDescriptorForType()

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

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

Returns
Type Description
UrlFilter.UrlFilteringAction

The filteringAction.

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

Returns
Type Description
int

The enum numeric value on the wire for filteringAction.

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

Returns
Type Description
int

The priority.

getUrls(int index)

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

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The urls at the given index.

getUrlsBytes(int index)

public 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];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the urls at the given index.

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

Returns
Type Description
int

The count of urls.

getUrlsList()

public 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];

Returns
Type Description
ProtocolStringList

A list containing the urls.

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

Returns
Type Description
boolean

Whether the priority field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(UrlFilter other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setFilteringAction(UrlFilter.UrlFilteringAction value)

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

Parameter
Name Description
value UrlFilter.UrlFilteringAction

The filteringAction to set.

Returns
Type Description
UrlFilter.Builder

This builder for chaining.

setFilteringActionValue(int value)

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

Parameter
Name Description
value int

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

Returns
Type Description
UrlFilter.Builder

This builder for chaining.

setPriority(int value)

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

Parameter
Name Description
value int

The priority to set.

Returns
Type Description
UrlFilter.Builder

This builder for chaining.

setUrls(int index, String value)

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
Name Description
index int

The index to set the value at.

value String

The urls to set.

Returns
Type Description
UrlFilter.Builder

This builder for chaining.