com.google.appengine.v1.StaticFilesHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-appengine-v1 Show documentation
Show all versions of proto-google-appengine-v1 Show documentation
PROTO library for proto-google-appengine-v1
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/appengine/v1/app_yaml.proto
package com.google.appengine.v1;
/**
*
* 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 {@code google.appengine.v1.StaticFilesHandler}
*/
public final class StaticFilesHandler extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.appengine.v1.StaticFilesHandler)
StaticFilesHandlerOrBuilder {
private static final long serialVersionUID = 0L;
// Use StaticFilesHandler.newBuilder() to construct.
private StaticFilesHandler(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private StaticFilesHandler() {
path_ = "";
uploadPathRegex_ = "";
mimeType_ = "";
requireMatchingFile_ = false;
applicationReadable_ = false;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private StaticFilesHandler(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
path_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
uploadPathRegex_ = s;
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
httpHeaders_ = com.google.protobuf.MapField.newMapField(
HttpHeadersDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000004;
}
com.google.protobuf.MapEntry
httpHeaders__ = input.readMessage(
HttpHeadersDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
httpHeaders_.getMutableMap().put(
httpHeaders__.getKey(), httpHeaders__.getValue());
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
mimeType_ = s;
break;
}
case 42: {
com.google.protobuf.Duration.Builder subBuilder = null;
if (expiration_ != null) {
subBuilder = expiration_.toBuilder();
}
expiration_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(expiration_);
expiration_ = subBuilder.buildPartial();
}
break;
}
case 48: {
requireMatchingFile_ = input.readBool();
break;
}
case 56: {
applicationReadable_ = input.readBool();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.appengine.v1.AppYamlProto.internal_static_google_appengine_v1_StaticFilesHandler_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 3:
return internalGetHttpHeaders();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.appengine.v1.AppYamlProto.internal_static_google_appengine_v1_StaticFilesHandler_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.appengine.v1.StaticFilesHandler.class, com.google.appengine.v1.StaticFilesHandler.Builder.class);
}
private int bitField0_;
public static final int PATH_FIELD_NUMBER = 1;
private volatile java.lang.Object path_;
/**
*
* 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;
*/
public java.lang.String getPath() {
java.lang.Object ref = path_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
path_ = s;
return s;
}
}
/**
*
* 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;
*/
public com.google.protobuf.ByteString
getPathBytes() {
java.lang.Object ref = path_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
path_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int UPLOAD_PATH_REGEX_FIELD_NUMBER = 2;
private volatile java.lang.Object uploadPathRegex_;
/**
*
* Regular expression that matches the file paths for all files that should be
* referenced by this handler.
*
*
* string upload_path_regex = 2;
*/
public java.lang.String getUploadPathRegex() {
java.lang.Object ref = uploadPathRegex_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
uploadPathRegex_ = s;
return s;
}
}
/**
*
* Regular expression that matches the file paths for all files that should be
* referenced by this handler.
*
*
* string upload_path_regex = 2;
*/
public com.google.protobuf.ByteString
getUploadPathRegexBytes() {
java.lang.Object ref = uploadPathRegex_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
uploadPathRegex_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int HTTP_HEADERS_FIELD_NUMBER = 3;
private static final class HttpHeadersDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
com.google.appengine.v1.AppYamlProto.internal_static_google_appengine_v1_StaticFilesHandler_HttpHeadersEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> httpHeaders_;
private com.google.protobuf.MapField
internalGetHttpHeaders() {
if (httpHeaders_ == null) {
return com.google.protobuf.MapField.emptyMapField(
HttpHeadersDefaultEntryHolder.defaultEntry);
}
return httpHeaders_;
}
public int getHttpHeadersCount() {
return internalGetHttpHeaders().getMap().size();
}
/**
*
* HTTP headers to use for all responses from these URLs.
*
*
* map<string, string> http_headers = 3;
*/
public boolean containsHttpHeaders(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetHttpHeaders().getMap().containsKey(key);
}
/**
* Use {@link #getHttpHeadersMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getHttpHeaders() {
return getHttpHeadersMap();
}
/**
*
* HTTP headers to use for all responses from these URLs.
*
*
* map<string, string> http_headers = 3;
*/
public java.util.Map getHttpHeadersMap() {
return internalGetHttpHeaders().getMap();
}
/**
*
* HTTP headers to use for all responses from these URLs.
*
*
* map<string, string> http_headers = 3;
*/
public java.lang.String getHttpHeadersOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetHttpHeaders().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* HTTP headers to use for all responses from these URLs.
*
*
* map<string, string> http_headers = 3;
*/
public java.lang.String getHttpHeadersOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetHttpHeaders().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int MIME_TYPE_FIELD_NUMBER = 4;
private volatile java.lang.Object mimeType_;
/**
*
* 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;
*/
public java.lang.String getMimeType() {
java.lang.Object ref = mimeType_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
mimeType_ = s;
return s;
}
}
/**
*
* 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;
*/
public com.google.protobuf.ByteString
getMimeTypeBytes() {
java.lang.Object ref = mimeType_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
mimeType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int EXPIRATION_FIELD_NUMBER = 5;
private com.google.protobuf.Duration expiration_;
/**
*
* Time a static file served by this handler should be cached
* by web proxies and browsers.
*
*
* .google.protobuf.Duration expiration = 5;
*/
public boolean hasExpiration() {
return expiration_ != null;
}
/**
*
* Time a static file served by this handler should be cached
* by web proxies and browsers.
*
*
* .google.protobuf.Duration expiration = 5;
*/
public com.google.protobuf.Duration getExpiration() {
return expiration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : expiration_;
}
/**
*
* Time a static file served by this handler should be cached
* by web proxies and browsers.
*
*
* .google.protobuf.Duration expiration = 5;
*/
public com.google.protobuf.DurationOrBuilder getExpirationOrBuilder() {
return getExpiration();
}
public static final int REQUIRE_MATCHING_FILE_FIELD_NUMBER = 6;
private boolean requireMatchingFile_;
/**
*
* Whether this handler should match the request if the file
* referenced by the handler does not exist.
*
*
* bool require_matching_file = 6;
*/
public boolean getRequireMatchingFile() {
return requireMatchingFile_;
}
public static final int APPLICATION_READABLE_FIELD_NUMBER = 7;
private boolean applicationReadable_;
/**
*
* 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;
*/
public boolean getApplicationReadable() {
return applicationReadable_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getPathBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, path_);
}
if (!getUploadPathRegexBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uploadPathRegex_);
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetHttpHeaders(),
HttpHeadersDefaultEntryHolder.defaultEntry,
3);
if (!getMimeTypeBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, mimeType_);
}
if (expiration_ != null) {
output.writeMessage(5, getExpiration());
}
if (requireMatchingFile_ != false) {
output.writeBool(6, requireMatchingFile_);
}
if (applicationReadable_ != false) {
output.writeBool(7, applicationReadable_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getPathBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, path_);
}
if (!getUploadPathRegexBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uploadPathRegex_);
}
for (java.util.Map.Entry entry
: internalGetHttpHeaders().getMap().entrySet()) {
com.google.protobuf.MapEntry
httpHeaders__ = HttpHeadersDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, httpHeaders__);
}
if (!getMimeTypeBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, mimeType_);
}
if (expiration_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getExpiration());
}
if (requireMatchingFile_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(6, requireMatchingFile_);
}
if (applicationReadable_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(7, applicationReadable_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.appengine.v1.StaticFilesHandler)) {
return super.equals(obj);
}
com.google.appengine.v1.StaticFilesHandler other = (com.google.appengine.v1.StaticFilesHandler) obj;
boolean result = true;
result = result && getPath()
.equals(other.getPath());
result = result && getUploadPathRegex()
.equals(other.getUploadPathRegex());
result = result && internalGetHttpHeaders().equals(
other.internalGetHttpHeaders());
result = result && getMimeType()
.equals(other.getMimeType());
result = result && (hasExpiration() == other.hasExpiration());
if (hasExpiration()) {
result = result && getExpiration()
.equals(other.getExpiration());
}
result = result && (getRequireMatchingFile()
== other.getRequireMatchingFile());
result = result && (getApplicationReadable()
== other.getApplicationReadable());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + PATH_FIELD_NUMBER;
hash = (53 * hash) + getPath().hashCode();
hash = (37 * hash) + UPLOAD_PATH_REGEX_FIELD_NUMBER;
hash = (53 * hash) + getUploadPathRegex().hashCode();
if (!internalGetHttpHeaders().getMap().isEmpty()) {
hash = (37 * hash) + HTTP_HEADERS_FIELD_NUMBER;
hash = (53 * hash) + internalGetHttpHeaders().hashCode();
}
hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER;
hash = (53 * hash) + getMimeType().hashCode();
if (hasExpiration()) {
hash = (37 * hash) + EXPIRATION_FIELD_NUMBER;
hash = (53 * hash) + getExpiration().hashCode();
}
hash = (37 * hash) + REQUIRE_MATCHING_FILE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getRequireMatchingFile());
hash = (37 * hash) + APPLICATION_READABLE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getApplicationReadable());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.appengine.v1.StaticFilesHandler parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.appengine.v1.StaticFilesHandler parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.appengine.v1.StaticFilesHandler parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.appengine.v1.StaticFilesHandler parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.appengine.v1.StaticFilesHandler parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.appengine.v1.StaticFilesHandler parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.appengine.v1.StaticFilesHandler parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.appengine.v1.StaticFilesHandler parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.appengine.v1.StaticFilesHandler parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.appengine.v1.StaticFilesHandler parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.appengine.v1.StaticFilesHandler parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.appengine.v1.StaticFilesHandler parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.appengine.v1.StaticFilesHandler prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* 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 {@code google.appengine.v1.StaticFilesHandler}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.appengine.v1.StaticFilesHandler)
com.google.appengine.v1.StaticFilesHandlerOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.appengine.v1.AppYamlProto.internal_static_google_appengine_v1_StaticFilesHandler_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 3:
return internalGetHttpHeaders();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 3:
return internalGetMutableHttpHeaders();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.appengine.v1.AppYamlProto.internal_static_google_appengine_v1_StaticFilesHandler_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.appengine.v1.StaticFilesHandler.class, com.google.appengine.v1.StaticFilesHandler.Builder.class);
}
// Construct using com.google.appengine.v1.StaticFilesHandler.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
path_ = "";
uploadPathRegex_ = "";
internalGetMutableHttpHeaders().clear();
mimeType_ = "";
if (expirationBuilder_ == null) {
expiration_ = null;
} else {
expiration_ = null;
expirationBuilder_ = null;
}
requireMatchingFile_ = false;
applicationReadable_ = false;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.appengine.v1.AppYamlProto.internal_static_google_appengine_v1_StaticFilesHandler_descriptor;
}
public com.google.appengine.v1.StaticFilesHandler getDefaultInstanceForType() {
return com.google.appengine.v1.StaticFilesHandler.getDefaultInstance();
}
public com.google.appengine.v1.StaticFilesHandler build() {
com.google.appengine.v1.StaticFilesHandler result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.appengine.v1.StaticFilesHandler buildPartial() {
com.google.appengine.v1.StaticFilesHandler result = new com.google.appengine.v1.StaticFilesHandler(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.path_ = path_;
result.uploadPathRegex_ = uploadPathRegex_;
result.httpHeaders_ = internalGetHttpHeaders();
result.httpHeaders_.makeImmutable();
result.mimeType_ = mimeType_;
if (expirationBuilder_ == null) {
result.expiration_ = expiration_;
} else {
result.expiration_ = expirationBuilder_.build();
}
result.requireMatchingFile_ = requireMatchingFile_;
result.applicationReadable_ = applicationReadable_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.appengine.v1.StaticFilesHandler) {
return mergeFrom((com.google.appengine.v1.StaticFilesHandler)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.appengine.v1.StaticFilesHandler other) {
if (other == com.google.appengine.v1.StaticFilesHandler.getDefaultInstance()) return this;
if (!other.getPath().isEmpty()) {
path_ = other.path_;
onChanged();
}
if (!other.getUploadPathRegex().isEmpty()) {
uploadPathRegex_ = other.uploadPathRegex_;
onChanged();
}
internalGetMutableHttpHeaders().mergeFrom(
other.internalGetHttpHeaders());
if (!other.getMimeType().isEmpty()) {
mimeType_ = other.mimeType_;
onChanged();
}
if (other.hasExpiration()) {
mergeExpiration(other.getExpiration());
}
if (other.getRequireMatchingFile() != false) {
setRequireMatchingFile(other.getRequireMatchingFile());
}
if (other.getApplicationReadable() != false) {
setApplicationReadable(other.getApplicationReadable());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.appengine.v1.StaticFilesHandler parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.appengine.v1.StaticFilesHandler) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object path_ = "";
/**
*
* 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;
*/
public java.lang.String getPath() {
java.lang.Object ref = path_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
path_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* 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;
*/
public com.google.protobuf.ByteString
getPathBytes() {
java.lang.Object ref = path_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
path_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* 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;
*/
public Builder setPath(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
path_ = value;
onChanged();
return this;
}
/**
*
* 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;
*/
public Builder clearPath() {
path_ = getDefaultInstance().getPath();
onChanged();
return this;
}
/**
*
* 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;
*/
public Builder setPathBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
path_ = value;
onChanged();
return this;
}
private java.lang.Object uploadPathRegex_ = "";
/**
*
* Regular expression that matches the file paths for all files that should be
* referenced by this handler.
*
*
* string upload_path_regex = 2;
*/
public java.lang.String getUploadPathRegex() {
java.lang.Object ref = uploadPathRegex_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
uploadPathRegex_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Regular expression that matches the file paths for all files that should be
* referenced by this handler.
*
*
* string upload_path_regex = 2;
*/
public com.google.protobuf.ByteString
getUploadPathRegexBytes() {
java.lang.Object ref = uploadPathRegex_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
uploadPathRegex_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Regular expression that matches the file paths for all files that should be
* referenced by this handler.
*
*
* string upload_path_regex = 2;
*/
public Builder setUploadPathRegex(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
uploadPathRegex_ = value;
onChanged();
return this;
}
/**
*
* Regular expression that matches the file paths for all files that should be
* referenced by this handler.
*
*
* string upload_path_regex = 2;
*/
public Builder clearUploadPathRegex() {
uploadPathRegex_ = getDefaultInstance().getUploadPathRegex();
onChanged();
return this;
}
/**
*
* Regular expression that matches the file paths for all files that should be
* referenced by this handler.
*
*
* string upload_path_regex = 2;
*/
public Builder setUploadPathRegexBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
uploadPathRegex_ = value;
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> httpHeaders_;
private com.google.protobuf.MapField
internalGetHttpHeaders() {
if (httpHeaders_ == null) {
return com.google.protobuf.MapField.emptyMapField(
HttpHeadersDefaultEntryHolder.defaultEntry);
}
return httpHeaders_;
}
private com.google.protobuf.MapField
internalGetMutableHttpHeaders() {
onChanged();;
if (httpHeaders_ == null) {
httpHeaders_ = com.google.protobuf.MapField.newMapField(
HttpHeadersDefaultEntryHolder.defaultEntry);
}
if (!httpHeaders_.isMutable()) {
httpHeaders_ = httpHeaders_.copy();
}
return httpHeaders_;
}
public int getHttpHeadersCount() {
return internalGetHttpHeaders().getMap().size();
}
/**
*
* HTTP headers to use for all responses from these URLs.
*
*
* map<string, string> http_headers = 3;
*/
public boolean containsHttpHeaders(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetHttpHeaders().getMap().containsKey(key);
}
/**
* Use {@link #getHttpHeadersMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getHttpHeaders() {
return getHttpHeadersMap();
}
/**
*
* HTTP headers to use for all responses from these URLs.
*
*
* map<string, string> http_headers = 3;
*/
public java.util.Map getHttpHeadersMap() {
return internalGetHttpHeaders().getMap();
}
/**
*
* HTTP headers to use for all responses from these URLs.
*
*
* map<string, string> http_headers = 3;
*/
public java.lang.String getHttpHeadersOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetHttpHeaders().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* HTTP headers to use for all responses from these URLs.
*
*
* map<string, string> http_headers = 3;
*/
public java.lang.String getHttpHeadersOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetHttpHeaders().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearHttpHeaders() {
internalGetMutableHttpHeaders().getMutableMap()
.clear();
return this;
}
/**
*
* HTTP headers to use for all responses from these URLs.
*
*
* map<string, string> http_headers = 3;
*/
public Builder removeHttpHeaders(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableHttpHeaders().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableHttpHeaders() {
return internalGetMutableHttpHeaders().getMutableMap();
}
/**
*
* HTTP headers to use for all responses from these URLs.
*
*
* map<string, string> http_headers = 3;
*/
public Builder putHttpHeaders(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new java.lang.NullPointerException(); }
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableHttpHeaders().getMutableMap()
.put(key, value);
return this;
}
/**
*
* HTTP headers to use for all responses from these URLs.
*
*
* map<string, string> http_headers = 3;
*/
public Builder putAllHttpHeaders(
java.util.Map values) {
internalGetMutableHttpHeaders().getMutableMap()
.putAll(values);
return this;
}
private java.lang.Object mimeType_ = "";
/**
*
* 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;
*/
public java.lang.String getMimeType() {
java.lang.Object ref = mimeType_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
mimeType_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* 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;
*/
public com.google.protobuf.ByteString
getMimeTypeBytes() {
java.lang.Object ref = mimeType_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
mimeType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* 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;
*/
public Builder setMimeType(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
mimeType_ = value;
onChanged();
return this;
}
/**
*
* 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;
*/
public Builder clearMimeType() {
mimeType_ = getDefaultInstance().getMimeType();
onChanged();
return this;
}
/**
*
* 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;
*/
public Builder setMimeTypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
mimeType_ = value;
onChanged();
return this;
}
private com.google.protobuf.Duration expiration_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> expirationBuilder_;
/**
*
* Time a static file served by this handler should be cached
* by web proxies and browsers.
*
*
* .google.protobuf.Duration expiration = 5;
*/
public boolean hasExpiration() {
return expirationBuilder_ != null || expiration_ != null;
}
/**
*
* Time a static file served by this handler should be cached
* by web proxies and browsers.
*
*
* .google.protobuf.Duration expiration = 5;
*/
public com.google.protobuf.Duration getExpiration() {
if (expirationBuilder_ == null) {
return expiration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : expiration_;
} else {
return expirationBuilder_.getMessage();
}
}
/**
*
* Time a static file served by this handler should be cached
* by web proxies and browsers.
*
*
* .google.protobuf.Duration expiration = 5;
*/
public Builder setExpiration(com.google.protobuf.Duration value) {
if (expirationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
expiration_ = value;
onChanged();
} else {
expirationBuilder_.setMessage(value);
}
return this;
}
/**
*
* Time a static file served by this handler should be cached
* by web proxies and browsers.
*
*
* .google.protobuf.Duration expiration = 5;
*/
public Builder setExpiration(
com.google.protobuf.Duration.Builder builderForValue) {
if (expirationBuilder_ == null) {
expiration_ = builderForValue.build();
onChanged();
} else {
expirationBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Time a static file served by this handler should be cached
* by web proxies and browsers.
*
*
* .google.protobuf.Duration expiration = 5;
*/
public Builder mergeExpiration(com.google.protobuf.Duration value) {
if (expirationBuilder_ == null) {
if (expiration_ != null) {
expiration_ =
com.google.protobuf.Duration.newBuilder(expiration_).mergeFrom(value).buildPartial();
} else {
expiration_ = value;
}
onChanged();
} else {
expirationBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Time a static file served by this handler should be cached
* by web proxies and browsers.
*
*
* .google.protobuf.Duration expiration = 5;
*/
public Builder clearExpiration() {
if (expirationBuilder_ == null) {
expiration_ = null;
onChanged();
} else {
expiration_ = null;
expirationBuilder_ = null;
}
return this;
}
/**
*
* Time a static file served by this handler should be cached
* by web proxies and browsers.
*
*
* .google.protobuf.Duration expiration = 5;
*/
public com.google.protobuf.Duration.Builder getExpirationBuilder() {
onChanged();
return getExpirationFieldBuilder().getBuilder();
}
/**
*
* Time a static file served by this handler should be cached
* by web proxies and browsers.
*
*
* .google.protobuf.Duration expiration = 5;
*/
public com.google.protobuf.DurationOrBuilder getExpirationOrBuilder() {
if (expirationBuilder_ != null) {
return expirationBuilder_.getMessageOrBuilder();
} else {
return expiration_ == null ?
com.google.protobuf.Duration.getDefaultInstance() : expiration_;
}
}
/**
*
* Time a static file served by this handler should be cached
* by web proxies and browsers.
*
*
* .google.protobuf.Duration expiration = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
getExpirationFieldBuilder() {
if (expirationBuilder_ == null) {
expirationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
getExpiration(),
getParentForChildren(),
isClean());
expiration_ = null;
}
return expirationBuilder_;
}
private boolean requireMatchingFile_ ;
/**
*
* Whether this handler should match the request if the file
* referenced by the handler does not exist.
*
*
* bool require_matching_file = 6;
*/
public boolean getRequireMatchingFile() {
return requireMatchingFile_;
}
/**
*
* Whether this handler should match the request if the file
* referenced by the handler does not exist.
*
*
* bool require_matching_file = 6;
*/
public Builder setRequireMatchingFile(boolean value) {
requireMatchingFile_ = value;
onChanged();
return this;
}
/**
*
* Whether this handler should match the request if the file
* referenced by the handler does not exist.
*
*
* bool require_matching_file = 6;
*/
public Builder clearRequireMatchingFile() {
requireMatchingFile_ = false;
onChanged();
return this;
}
private boolean applicationReadable_ ;
/**
*
* 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;
*/
public boolean getApplicationReadable() {
return applicationReadable_;
}
/**
*
* 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;
*/
public Builder setApplicationReadable(boolean value) {
applicationReadable_ = value;
onChanged();
return this;
}
/**
*
* 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;
*/
public Builder clearApplicationReadable() {
applicationReadable_ = false;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.appengine.v1.StaticFilesHandler)
}
// @@protoc_insertion_point(class_scope:google.appengine.v1.StaticFilesHandler)
private static final com.google.appengine.v1.StaticFilesHandler DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.appengine.v1.StaticFilesHandler();
}
public static com.google.appengine.v1.StaticFilesHandler getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public StaticFilesHandler parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new StaticFilesHandler(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.appengine.v1.StaticFilesHandler getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy