Class StaticFilesHandler.Builder (2.6.0)

Stay organized with collections Save and categorize content based on your preferences.
public static final class StaticFilesHandler.Builder extends GeneratedMessageV3.Builder<StaticFilesHandler.Builder> implements StaticFilesHandlerOrBuilder

Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static file handlers describe which files in the application directory are static files, and which URLs serve them.

Protobuf type google.appengine.v1.StaticFilesHandler

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public StaticFilesHandler.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
StaticFilesHandler.Builder
Overrides

build()

public StaticFilesHandler build()
Returns
TypeDescription
StaticFilesHandler

buildPartial()

public StaticFilesHandler buildPartial()
Returns
TypeDescription
StaticFilesHandler

clear()

public StaticFilesHandler.Builder clear()
Returns
TypeDescription
StaticFilesHandler.Builder
Overrides

clearApplicationReadable()

public StaticFilesHandler.Builder clearApplicationReadable()

Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas.

bool application_readable = 7;

Returns
TypeDescription
StaticFilesHandler.Builder

This builder for chaining.

clearExpiration()

public StaticFilesHandler.Builder clearExpiration()

Time a static file served by this handler should be cached by web proxies and browsers.

.google.protobuf.Duration expiration = 5;

Returns
TypeDescription
StaticFilesHandler.Builder

clearField(Descriptors.FieldDescriptor field)

public StaticFilesHandler.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
StaticFilesHandler.Builder
Overrides

clearHttpHeaders()

public StaticFilesHandler.Builder clearHttpHeaders()
Returns
TypeDescription
StaticFilesHandler.Builder

clearMimeType()

public StaticFilesHandler.Builder clearMimeType()

MIME type used to serve all files served by this handler. Defaults to file-specific MIME types, which are derived from each file's filename extension.

string mime_type = 4;

Returns
TypeDescription
StaticFilesHandler.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public StaticFilesHandler.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
StaticFilesHandler.Builder
Overrides

clearPath()

public StaticFilesHandler.Builder clearPath()

Path to the static files matched by the URL pattern, from the application root directory. The path can refer to text matched in groupings in the URL pattern.

string path = 1;

Returns
TypeDescription
StaticFilesHandler.Builder

This builder for chaining.

clearRequireMatchingFile()

public StaticFilesHandler.Builder clearRequireMatchingFile()

Whether this handler should match the request if the file referenced by the handler does not exist.

bool require_matching_file = 6;

Returns
TypeDescription
StaticFilesHandler.Builder

This builder for chaining.

clearUploadPathRegex()

public StaticFilesHandler.Builder clearUploadPathRegex()

Regular expression that matches the file paths for all files that should be referenced by this handler.

string upload_path_regex = 2;

Returns
TypeDescription
StaticFilesHandler.Builder

This builder for chaining.

clone()

public StaticFilesHandler.Builder clone()
Returns
TypeDescription
StaticFilesHandler.Builder
Overrides

containsHttpHeaders(String key)

public boolean containsHttpHeaders(String key)

HTTP headers to use for all responses from these URLs.

map<string, string> http_headers = 3;

Parameter
NameDescription
key