Class ProtectedEndpoint.Builder (3.96.0)

public static final class ProtectedEndpoint.Builder extends GeneratedMessage.Builder<ProtectedEndpoint.Builder> implements ProtectedEndpointOrBuilder

Configuration for an API endpoint to protect with reCAPTCHA.

Protobuf type google.cloud.recaptchaenterprise.v1.ProtectedEndpoint

Static Methods

getDescriptor()

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

Methods

build()

public ProtectedEndpoint build()
Returns
Type Description
ProtectedEndpoint

buildPartial()

public ProtectedEndpoint buildPartial()
Returns
Type Description
ProtectedEndpoint

clear()

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

clearAction()

public ProtectedEndpoint.Builder clearAction()

Required. Action name to be used for token generation for this endpoint. The action name can only contain alphanumeric characters, slashes, and underscores.

string action = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ProtectedEndpoint.Builder

This builder for chaining.

clearPath()

public ProtectedEndpoint.Builder clearPath()

Required. URI path of the API endpoint to protect. Must start with '/'. Supports glob characters '' to match a single path segment and '' to match multiple path segments. Standalone root catch-alls ('/*' and '/*') are invalid because it can negatively impact performance to trigger reCAPTCHA on every single request to your backend.

Matching is evaluated against the URL path only (domain, scheme, and query parameters are ignored).

Examples:

  • /login matches /login, https://example.com/login, and /login?query=1, but not /login/step1.
  • /products/* matches /products/123, but not /products/123/456.
  • /content/** matches /content/articles/2024/01/01.

string path = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ProtectedEndpoint.Builder

This builder for chaining.

getAction()

public String getAction()

Required. Action name to be used for token generation for this endpoint. The action name can only contain alphanumeric characters, slashes, and underscores.

string action = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The action.

getActionBytes()

public ByteString getActionBytes()

Required. Action name to be used for token generation for this endpoint. The action name can only contain alphanumeric characters, slashes, and underscores.

string action = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for action.

getDefaultInstanceForType()

public ProtectedEndpoint getDefaultInstanceForType()
Returns
Type Description
ProtectedEndpoint

getDescriptorForType()

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

getPath()

public String getPath()

Required. URI path of the API endpoint to protect. Must start with '/'. Supports glob characters '' to match a single path segment and '' to match multiple path segments. Standalone root catch-alls ('/*' and '/*') are invalid because it can negatively impact performance to trigger reCAPTCHA on every single request to your backend.

Matching is evaluated against the URL path only (domain, scheme, and query parameters are ignored).

Examples:

  • /login matches /login, https://example.com/login, and /login?query=1, but not /login/step1.
  • /products/* matches /products/123, but not /products/123/456.
  • /content/** matches /content/articles/2024/01/01.

string path = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The path.

getPathBytes()

public ByteString getPathBytes()

Required. URI path of the API endpoint to protect. Must start with '/'. Supports glob characters '' to match a single path segment and '' to match multiple path segments. Standalone root catch-alls ('/*' and '/*') are invalid because it can negatively impact performance to trigger reCAPTCHA on every single request to your backend.

Matching is evaluated against the URL path only (domain, scheme, and query parameters are ignored).

Examples:

  • /login matches /login, https://example.com/login, and /login?query=1, but not /login/step1.
  • /products/* matches /products/123, but not /products/123/456.
  • /content/** matches /content/articles/2024/01/01.

string path = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for path.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(ProtectedEndpoint other)

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

setAction(String value)

public ProtectedEndpoint.Builder setAction(String value)

Required. Action name to be used for token generation for this endpoint. The action name can only contain alphanumeric characters, slashes, and underscores.

string action = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The action to set.

Returns
Type Description
ProtectedEndpoint.Builder

This builder for chaining.

setActionBytes(ByteString value)

public ProtectedEndpoint.Builder setActionBytes(ByteString value)

Required. Action name to be used for token generation for this endpoint. The action name can only contain alphanumeric characters, slashes, and underscores.

string action = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for action to set.

Returns
Type Description
ProtectedEndpoint.Builder

This builder for chaining.

setPath(String value)

public ProtectedEndpoint.Builder setPath(String value)

Required. URI path of the API endpoint to protect. Must start with '/'. Supports glob characters '' to match a single path segment and '' to match multiple path segments. Standalone root catch-alls ('/*' and '/*') are invalid because it can negatively impact performance to trigger reCAPTCHA on every single request to your backend.

Matching is evaluated against the URL path only (domain, scheme, and query parameters are ignored).

Examples:

  • /login matches /login, https://example.com/login, and /login?query=1, but not /login/step1.
  • /products/* matches /products/123, but not /products/123/456.
  • /content/** matches /content/articles/2024/01/01.

string path = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The path to set.

Returns
Type Description
ProtectedEndpoint.Builder

This builder for chaining.

setPathBytes(ByteString value)

public ProtectedEndpoint.Builder setPathBytes(ByteString value)

Required. URI path of the API endpoint to protect. Must start with '/'. Supports glob characters '' to match a single path segment and '' to match multiple path segments. Standalone root catch-alls ('/*' and '/*') are invalid because it can negatively impact performance to trigger reCAPTCHA on every single request to your backend.

Matching is evaluated against the URL path only (domain, scheme, and query parameters are ignored).

Examples:

  • /login matches /login, https://example.com/login, and /login?query=1, but not /login/step1.
  • /products/* matches /products/123, but not /products/123/456.
  • /content/** matches /content/articles/2024/01/01.

string path = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for path to set.

Returns
Type Description
ProtectedEndpoint.Builder

This builder for chaining.