Class UrlMap.Builder (2.17.0)

publicstaticfinalclass UrlMap.BuilderextendsGeneratedMessageV3.Builder<UrlMap.Builder>implementsUrlMapOrBuilder

URL pattern and description of how the URL should be handled. App Engine can handle URLs by executing application code or by serving static files uploaded with the version, such as images, CSS, or JavaScript.

Protobuf type google.appengine.v1.UrlMap

Implements

UrlMapOrBuilder

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicUrlMap.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
UrlMap.Builder
Overrides

build()

publicUrlMapbuild()
Returns
Type Description
UrlMap

buildPartial()

publicUrlMapbuildPartial()
Returns
Type Description
UrlMap

clear()

publicUrlMap.Builderclear()
Returns
Type Description
UrlMap.Builder
Overrides

clearApiEndpoint()

publicUrlMap.BuilderclearApiEndpoint()

Uses API Endpoints to handle requests.

.google.appengine.v1.ApiEndpointHandler api_endpoint = 4;

Returns
Type Description
UrlMap.Builder

clearAuthFailAction()

publicUrlMap.BuilderclearAuthFailAction()

Action to take when users access resources that require authentication. Defaults to redirect.

.google.appengine.v1.AuthFailAction auth_fail_action = 7;

Returns
Type Description
UrlMap.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

publicUrlMap.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
UrlMap.Builder
Overrides

clearHandlerType()

publicUrlMap.BuilderclearHandlerType()
Returns
Type Description
UrlMap.Builder

clearLogin()

publicUrlMap.BuilderclearLogin()

Level of login required to access this resource. Not supported for Node.js in the App Engine standard environment.

.google.appengine.v1.LoginRequirement login = 6;

Returns
Type Description
UrlMap.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

publicUrlMap.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
UrlMap.Builder
Overrides

clearRedirectHttpResponseCode()

publicUrlMap.BuilderclearRedirectHttpResponseCode()

30x code to use when performing redirects for the secure field. Defaults to 302.

.google.appengine.v1.UrlMap.RedirectHttpResponseCode redirect_http_response_code = 8;

Returns
Type Description
UrlMap.Builder

This builder for chaining.

clearScript()

publicUrlMap.BuilderclearScript()

Executes a script to handle the requests that match this URL pattern. Only the auto value is supported for Node.js in the App Engine standard environment, for example "script": "auto".

.google.appengine.v1.ScriptHandler script = 3;

Returns
Type Description
UrlMap.Builder

clearSecurityLevel()

publicUrlMap.BuilderclearSecurityLevel()

Security (HTTPS) enforcement for this URL.

.google.appengine.v1.SecurityLevel security_level = 5;

Returns
Type Description
UrlMap.Builder

This builder for chaining.

clearStaticFiles()

publicUrlMap.BuilderclearStaticFiles()

Returns the contents of a file, such as an image, as the response.

.google.appengine.v1.StaticFilesHandler static_files = 2;

Returns
Type Description
UrlMap.Builder

clearUrlRegex()

publicUrlMap.BuilderclearUrlRegex()

URL prefix. Uses regular expression syntax, which means regexp special characters must be escaped, but should not contain groupings. All URLs that begin with this prefix are handled by this handler, using the portion of the URL after the prefix as part of the file path.

string url_regex = 1;

Returns
Type Description
UrlMap.Builder

This builder for chaining.

clone()

publicUrlMap.Builderclone()
Returns
Type Description
UrlMap.Builder
Overrides

getApiEndpoint()

publicApiEndpointHandlergetApiEndpoint()

Uses API Endpoints to handle requests.

.google.appengine.v1.ApiEndpointHandler api_endpoint = 4;

Returns
Type Description
ApiEndpointHandler

The apiEndpoint.

getApiEndpointBuilder()

publicApiEndpointHandler.BuildergetApiEndpointBuilder()

Uses API Endpoints to handle requests.

.google.appengine.v1.ApiEndpointHandler api_endpoint = 4;

Returns
Type Description
ApiEndpointHandler.Builder

getApiEndpointOrBuilder()

publicApiEndpointHandlerOrBuildergetApiEndpointOrBuilder()

Uses API Endpoints to handle requests.

.google.appengine.v1.ApiEndpointHandler api_endpoint = 4;

Returns
Type Description
ApiEndpointHandlerOrBuilder

getAuthFailAction()

publicAuthFailActiongetAuthFailAction()

Action to take when users access resources that require authentication. Defaults to redirect.

.google.appengine.v1.AuthFailAction auth_fail_action = 7;

Returns
Type Description
AuthFailAction

The authFailAction.

getAuthFailActionValue()

publicintgetAuthFailActionValue()

Action to take when users access resources that require authentication. Defaults to redirect.

.google.appengine.v1.AuthFailAction auth_fail_action = 7;

Returns
Type Description
int

The enum numeric value on the wire for authFailAction.

getDefaultInstanceForType()

publicUrlMapgetDefaultInstanceForType()
Returns
Type Description
UrlMap

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getHandlerTypeCase()

publicUrlMap.HandlerTypeCasegetHandlerTypeCase()
Returns
Type Description
UrlMap.HandlerTypeCase

getLogin()

publicLoginRequirementgetLogin()

Level of login required to access this resource. Not supported for Node.js in the App Engine standard environment.

.google.appengine.v1.LoginRequirement login = 6;

Returns
Type Description
LoginRequirement

The login.

getLoginValue()

publicintgetLoginValue()

Level of login required to access this resource. Not supported for Node.js in the App Engine standard environment.

.google.appengine.v1.LoginRequirement login = 6;

Returns
Type Description
int

The enum numeric value on the wire for login.

getRedirectHttpResponseCode()

publicUrlMap.RedirectHttpResponseCodegetRedirectHttpResponseCode()

30x code to use when performing redirects for the secure field. Defaults to 302.

.google.appengine.v1.UrlMap.RedirectHttpResponseCode redirect_http_response_code = 8;

Returns
Type Description
UrlMap.RedirectHttpResponseCode

The redirectHttpResponseCode.

getRedirectHttpResponseCodeValue()

publicintgetRedirectHttpResponseCodeValue()

30x code to use when performing redirects for the secure field. Defaults to 302.

.google.appengine.v1.UrlMap.RedirectHttpResponseCode redirect_http_response_code = 8;

Returns
Type Description
int

The enum numeric value on the wire for redirectHttpResponseCode.

getScript()

publicScriptHandlergetScript()

Executes a script to handle the requests that match this URL pattern. Only the auto value is supported for Node.js in the App Engine standard environment, for example "script": "auto".

.google.appengine.v1.ScriptHandler script = 3;

Returns
Type Description
ScriptHandler

The script.

getScriptBuilder()

publicScriptHandler.BuildergetScriptBuilder()

Executes a script to handle the requests that match this URL pattern. Only the auto value is supported for Node.js in the App Engine standard environment, for example "script": "auto".

.google.appengine.v1.ScriptHandler script = 3;

Returns
Type Description
ScriptHandler.Builder

getScriptOrBuilder()

publicScriptHandlerOrBuildergetScriptOrBuilder()

Executes a script to handle the requests that match this URL pattern. Only the auto value is supported for Node.js in the App Engine standard environment, for example "script": "auto".

.google.appengine.v1.ScriptHandler script = 3;

Returns
Type Description
ScriptHandlerOrBuilder

getSecurityLevel()

publicSecurityLevelgetSecurityLevel()

Security (HTTPS) enforcement for this URL.

.google.appengine.v1.SecurityLevel security_level = 5;

Returns
Type Description
SecurityLevel

The securityLevel.

getSecurityLevelValue()

publicintgetSecurityLevelValue()

Security (HTTPS) enforcement for this URL.

.google.appengine.v1.SecurityLevel security_level = 5;

Returns
Type Description
int

The enum numeric value on the wire for securityLevel.

getStaticFiles()

publicStaticFilesHandlergetStaticFiles()

Returns the contents of a file, such as an image, as the response.

.google.appengine.v1.StaticFilesHandler static_files = 2;

Returns
Type Description
StaticFilesHandler

The staticFiles.

getStaticFilesBuilder()

publicStaticFilesHandler.BuildergetStaticFilesBuilder()

Returns the contents of a file, such as an image, as the response.

.google.appengine.v1.StaticFilesHandler static_files = 2;

Returns
Type Description
StaticFilesHandler.Builder

getStaticFilesOrBuilder()

publicStaticFilesHandlerOrBuildergetStaticFilesOrBuilder()

Returns the contents of a file, such as an image, as the response.

.google.appengine.v1.StaticFilesHandler static_files = 2;

Returns
Type Description
StaticFilesHandlerOrBuilder

getUrlRegex()

publicStringgetUrlRegex()

URL prefix. Uses regular expression syntax, which means regexp special characters must be escaped, but should not contain groupings. All URLs that begin with this prefix are handled by this handler, using the portion of the URL after the prefix as part of the file path.

string url_regex = 1;

Returns
Type Description
String

The urlRegex.

getUrlRegexBytes()

publicByteStringgetUrlRegexBytes()

URL prefix. Uses regular expression syntax, which means regexp special characters must be escaped, but should not contain groupings. All URLs that begin with this prefix are handled by this handler, using the portion of the URL after the prefix as part of the file path.

string url_regex = 1;

Returns
Type Description
ByteString

The bytes for urlRegex.

hasApiEndpoint()

publicbooleanhasApiEndpoint()

Uses API Endpoints to handle requests.

.google.appengine.v1.ApiEndpointHandler api_endpoint = 4;

Returns
Type Description
boolean

Whether the apiEndpoint field is set.

hasScript()

publicbooleanhasScript()

Executes a script to handle the requests that match this URL pattern. Only the auto value is supported for Node.js in the App Engine standard environment, for example "script": "auto".

.google.appengine.v1.ScriptHandler script = 3;

Returns
Type Description
boolean

Whether the script field is set.

hasStaticFiles()

publicbooleanhasStaticFiles()

Returns the contents of a file, such as an image, as the response.

.google.appengine.v1.StaticFilesHandler static_files = 2;

Returns
Type Description
boolean

Whether the staticFiles field is set.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeApiEndpoint(ApiEndpointHandler value)

publicUrlMap.BuildermergeApiEndpoint(ApiEndpointHandlervalue)

Uses API Endpoints to handle requests.

.google.appengine.v1.ApiEndpointHandler api_endpoint = 4;

Parameter
Name Description
value ApiEndpointHandler
Returns
Type Description
UrlMap.Builder

mergeFrom(UrlMap other)

publicUrlMap.BuildermergeFrom(UrlMapother)
Parameter
Name Description
other UrlMap
Returns
Type Description
UrlMap.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicUrlMap.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
UrlMap.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicUrlMap.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
UrlMap.Builder
Overrides

mergeScript(ScriptHandler value)

publicUrlMap.BuildermergeScript(ScriptHandlervalue)

Executes a script to handle the requests that match this URL pattern. Only the auto value is supported for Node.js in the App Engine standard environment, for example "script": "auto".

.google.appengine.v1.ScriptHandler script = 3;

Parameter
Name Description
value ScriptHandler
Returns
Type Description
UrlMap.Builder

mergeStaticFiles(StaticFilesHandler value)

publicUrlMap.BuildermergeStaticFiles(StaticFilesHandlervalue)

Returns the contents of a file, such as an image, as the response.

.google.appengine.v1.StaticFilesHandler static_files = 2;

Parameter
Name Description
value StaticFilesHandler
Returns
Type Description
UrlMap.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalUrlMap.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
UrlMap.Builder
Overrides

setApiEndpoint(ApiEndpointHandler value)

publicUrlMap.BuildersetApiEndpoint(ApiEndpointHandlervalue)

Uses API Endpoints to handle requests.

.google.appengine.v1.ApiEndpointHandler api_endpoint = 4;

Parameter
Name Description
value ApiEndpointHandler
Returns
Type Description
UrlMap.Builder

setApiEndpoint(ApiEndpointHandler.Builder builderForValue)

publicUrlMap.BuildersetApiEndpoint(ApiEndpointHandler.BuilderbuilderForValue)

Uses API Endpoints to handle requests.

.google.appengine.v1.ApiEndpointHandler api_endpoint = 4;

Parameter
Name Description
builderForValue ApiEndpointHandler.Builder
Returns
Type Description
UrlMap.Builder

setAuthFailAction(AuthFailAction value)

publicUrlMap.BuildersetAuthFailAction(AuthFailActionvalue)

Action to take when users access resources that require authentication. Defaults to redirect.

.google.appengine.v1.AuthFailAction auth_fail_action = 7;

Parameter
Name Description
value AuthFailAction

The authFailAction to set.

Returns
Type Description
UrlMap.Builder

This builder for chaining.

setAuthFailActionValue(int value)

publicUrlMap.BuildersetAuthFailActionValue(intvalue)

Action to take when users access resources that require authentication. Defaults to redirect.

.google.appengine.v1.AuthFailAction auth_fail_action = 7;

Parameter
Name Description
value int

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

Returns
Type Description
UrlMap.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

publicUrlMap.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
UrlMap.Builder
Overrides

setLogin(LoginRequirement value)

publicUrlMap.BuildersetLogin(LoginRequirementvalue)

Level of login required to access this resource. Not supported for Node.js in the App Engine standard environment.

.google.appengine.v1.LoginRequirement login = 6;

Parameter
Name Description
value LoginRequirement

The login to set.

Returns
Type Description
UrlMap.Builder

This builder for chaining.

setLoginValue(int value)

publicUrlMap.BuildersetLoginValue(intvalue)

Level of login required to access this resource. Not supported for Node.js in the App Engine standard environment.

.google.appengine.v1.LoginRequirement login = 6;

Parameter
Name Description
value int

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

Returns
Type Description
UrlMap.Builder

This builder for chaining.

setRedirectHttpResponseCode(UrlMap.RedirectHttpResponseCode value)

publicUrlMap.BuildersetRedirectHttpResponseCode(UrlMap.RedirectHttpResponseCodevalue)

30x code to use when performing redirects for the secure field. Defaults to 302.

.google.appengine.v1.UrlMap.RedirectHttpResponseCode redirect_http_response_code = 8;

Parameter
Name Description
value UrlMap.RedirectHttpResponseCode

The redirectHttpResponseCode to set.

Returns
Type Description
UrlMap.Builder

This builder for chaining.

setRedirectHttpResponseCodeValue(int value)

publicUrlMap.BuildersetRedirectHttpResponseCodeValue(intvalue)

30x code to use when performing redirects for the secure field. Defaults to 302.

.google.appengine.v1.UrlMap.RedirectHttpResponseCode redirect_http_response_code = 8;

Parameter
Name Description
value int

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

Returns
Type Description
UrlMap.Builder

This builder for chaining.

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

publicUrlMap.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
UrlMap.Builder
Overrides

setScript(ScriptHandler value)

publicUrlMap.BuildersetScript(ScriptHandlervalue)

Executes a script to handle the requests that match this URL pattern. Only the auto value is supported for Node.js in the App Engine standard environment, for example "script": "auto".

.google.appengine.v1.ScriptHandler script = 3;

Parameter
Name Description
value ScriptHandler
Returns
Type Description
UrlMap.Builder

setScript(ScriptHandler.Builder builderForValue)

publicUrlMap.BuildersetScript(ScriptHandler.BuilderbuilderForValue)

Executes a script to handle the requests that match this URL pattern. Only the auto value is supported for Node.js in the App Engine standard environment, for example "script": "auto".

.google.appengine.v1.ScriptHandler script = 3;

Parameter
Name Description
builderForValue ScriptHandler.Builder
Returns
Type Description
UrlMap.Builder

setSecurityLevel(SecurityLevel value)

publicUrlMap.BuildersetSecurityLevel(SecurityLevelvalue)

Security (HTTPS) enforcement for this URL.

.google.appengine.v1.SecurityLevel security_level = 5;

Parameter
Name Description
value SecurityLevel

The securityLevel to set.

Returns
Type Description
UrlMap.Builder

This builder for chaining.

setSecurityLevelValue(int value)

publicUrlMap.BuildersetSecurityLevelValue(intvalue)

Security (HTTPS) enforcement for this URL.

.google.appengine.v1.SecurityLevel security_level = 5;

Parameter
Name Description
value int

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

Returns
Type Description
UrlMap.Builder

This builder for chaining.

setStaticFiles(StaticFilesHandler value)

publicUrlMap.BuildersetStaticFiles(StaticFilesHandlervalue)

Returns the contents of a file, such as an image, as the response.

.google.appengine.v1.StaticFilesHandler static_files = 2;

Parameter
Name Description
value StaticFilesHandler
Returns
Type Description
UrlMap.Builder

setStaticFiles(StaticFilesHandler.Builder builderForValue)

publicUrlMap.BuildersetStaticFiles(StaticFilesHandler.BuilderbuilderForValue)

Returns the contents of a file, such as an image, as the response.

.google.appengine.v1.StaticFilesHandler static_files = 2;

Parameter
Name Description
builderForValue StaticFilesHandler.Builder
Returns
Type Description
UrlMap.Builder

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalUrlMap.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
UrlMap.Builder
Overrides

setUrlRegex(String value)

publicUrlMap.BuildersetUrlRegex(Stringvalue)

URL prefix. Uses regular expression syntax, which means regexp special characters must be escaped, but should not contain groupings. All URLs that begin with this prefix are handled by this handler, using the portion of the URL after the prefix as part of the file path.

string url_regex = 1;

Parameter
Name Description
value String

The urlRegex to set.

Returns
Type Description
UrlMap.Builder

This builder for chaining.

setUrlRegexBytes(ByteString value)

publicUrlMap.BuildersetUrlRegexBytes(ByteStringvalue)

URL prefix. Uses regular expression syntax, which means regexp special characters must be escaped, but should not contain groupings. All URLs that begin with this prefix are handled by this handler, using the portion of the URL after the prefix as part of the file path.

string url_regex = 1;

Parameter
Name Description
value ByteString

The bytes for urlRegex to set.

Returns
Type Description
UrlMap.Builder

This builder for chaining.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.