Class StaticFilesHandler.Builder

  • All Implemented Interfaces:
    StaticFilesHandlerOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    StaticFilesHandler

    public static final class StaticFilesHandler.Builder
    extends com.google.protobuf.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
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetMapField

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<StaticFilesHandler.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<StaticFilesHandler.Builder>
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<StaticFilesHandler.Builder>
      • clear

        public StaticFilesHandler.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<StaticFilesHandler.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<StaticFilesHandler.Builder>
      • getDefaultInstanceForType

        public StaticFilesHandler getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public StaticFilesHandler build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public StaticFilesHandler buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public StaticFilesHandler.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<StaticFilesHandler.Builder>
      • setField

        public StaticFilesHandler.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                   Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<StaticFilesHandler.Builder>
      • clearField

        public StaticFilesHandler.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<StaticFilesHandler.Builder>
      • clearOneof

        public StaticFilesHandler.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<StaticFilesHandler.Builder>
      • setRepeatedField

        public StaticFilesHandler.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                           int index,
                                                           Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<StaticFilesHandler.Builder>
      • addRepeatedField

        public StaticFilesHandler.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                           Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<StaticFilesHandler.Builder>
      • mergeFrom

        public StaticFilesHandler.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<StaticFilesHandler.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<StaticFilesHandler.Builder>
      • mergeFrom

        public StaticFilesHandler.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                             throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<StaticFilesHandler.Builder>
        Throws:
        IOException
      • getPath

        public String getPath()
         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;
        Specified by:
        getPath in interface StaticFilesHandlerOrBuilder
        Returns:
        The path.
      • getPathBytes

        public com.google.protobuf.ByteString getPathBytes()
         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;
        Specified by:
        getPathBytes in interface StaticFilesHandlerOrBuilder
        Returns:
        The bytes for path.
      • setPath

        public StaticFilesHandler.Builder setPath​(String value)
         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;
        Parameters:
        value - The path to set.
        Returns:
        This builder for chaining.
      • 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:
        This builder for chaining.
      • setPathBytes

        public StaticFilesHandler.Builder setPathBytes​(com.google.protobuf.ByteString value)
         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;
        Parameters:
        value - The bytes for path to set.
        Returns:
        This builder for chaining.
      • getUploadPathRegex

        public String getUploadPathRegex()
         Regular expression that matches the file paths for all files that should be
         referenced by this handler.
         
        string upload_path_regex = 2;
        Specified by:
        getUploadPathRegex in interface StaticFilesHandlerOrBuilder
        Returns:
        The uploadPathRegex.
      • getUploadPathRegexBytes

        public com.google.protobuf.ByteString getUploadPathRegexBytes()
         Regular expression that matches the file paths for all files that should be
         referenced by this handler.
         
        string upload_path_regex = 2;
        Specified by:
        getUploadPathRegexBytes in interface StaticFilesHandlerOrBuilder
        Returns:
        The bytes for uploadPathRegex.
      • setUploadPathRegex

        public StaticFilesHandler.Builder setUploadPathRegex​(String value)
         Regular expression that matches the file paths for all files that should be
         referenced by this handler.
         
        string upload_path_regex = 2;
        Parameters:
        value - The uploadPathRegex to set.
        Returns:
        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:
        This builder for chaining.
      • setUploadPathRegexBytes

        public StaticFilesHandler.Builder setUploadPathRegexBytes​(com.google.protobuf.ByteString value)
         Regular expression that matches the file paths for all files that should be
         referenced by this handler.
         
        string upload_path_regex = 2;
        Parameters:
        value - The bytes for uploadPathRegex to set.
        Returns:
        This builder for chaining.
      • removeHttpHeaders

        public StaticFilesHandler.Builder removeHttpHeaders​(String key)
         HTTP headers to use for all responses from these URLs.
         
        map<string, string> http_headers = 3;
      • getMutableHttpHeaders

        @Deprecated
        public Map<String,​String> getMutableHttpHeaders()
        Deprecated.
        Use alternate mutation accessors instead.
      • putHttpHeaders

        public StaticFilesHandler.Builder putHttpHeaders​(String key,
                                                         String value)
         HTTP headers to use for all responses from these URLs.
         
        map<string, string> http_headers = 3;
      • getMimeType

        public String getMimeType()
         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;
        Specified by:
        getMimeType in interface StaticFilesHandlerOrBuilder
        Returns:
        The mimeType.
      • getMimeTypeBytes

        public com.google.protobuf.ByteString getMimeTypeBytes()
         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;
        Specified by:
        getMimeTypeBytes in interface StaticFilesHandlerOrBuilder
        Returns:
        The bytes for mimeType.
      • setMimeType

        public StaticFilesHandler.Builder setMimeType​(String value)
         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;
        Parameters:
        value - The mimeType to set.
        Returns:
        This builder for chaining.
      • 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:
        This builder for chaining.
      • setMimeTypeBytes

        public StaticFilesHandler.Builder setMimeTypeBytes​(com.google.protobuf.ByteString value)
         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;
        Parameters:
        value - The bytes for mimeType to set.
        Returns:
        This builder for chaining.
      • hasExpiration

        public boolean hasExpiration()
         Time a static file served by this handler should be cached
         by web proxies and browsers.
         
        .google.protobuf.Duration expiration = 5;
        Specified by:
        hasExpiration in interface StaticFilesHandlerOrBuilder
        Returns:
        Whether the expiration field is set.
      • getExpiration

        public com.google.protobuf.Duration getExpiration()
         Time a static file served by this handler should be cached
         by web proxies and browsers.
         
        .google.protobuf.Duration expiration = 5;
        Specified by:
        getExpiration in interface StaticFilesHandlerOrBuilder
        Returns:
        The expiration.
      • setExpiration

        public StaticFilesHandler.Builder setExpiration​(com.google.protobuf.Duration value)
         Time a static file served by this handler should be cached
         by web proxies and browsers.
         
        .google.protobuf.Duration expiration = 5;
      • setExpiration

        public StaticFilesHandler.Builder setExpiration​(com.google.protobuf.Duration.Builder builderForValue)
         Time a static file served by this handler should be cached
         by web proxies and browsers.
         
        .google.protobuf.Duration expiration = 5;
      • mergeExpiration

        public StaticFilesHandler.Builder mergeExpiration​(com.google.protobuf.Duration value)
         Time a static file served by this handler should be cached
         by web proxies and browsers.
         
        .google.protobuf.Duration expiration = 5;
      • 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;
      • getExpirationBuilder

        public com.google.protobuf.Duration.Builder getExpirationBuilder()
         Time a static file served by this handler should be cached
         by web proxies and browsers.
         
        .google.protobuf.Duration expiration = 5;
      • getExpirationOrBuilder

        public com.google.protobuf.DurationOrBuilder getExpirationOrBuilder()
         Time a static file served by this handler should be cached
         by web proxies and browsers.
         
        .google.protobuf.Duration expiration = 5;
        Specified by:
        getExpirationOrBuilder in interface StaticFilesHandlerOrBuilder
      • getRequireMatchingFile

        public boolean getRequireMatchingFile()
         Whether this handler should match the request if the file
         referenced by the handler does not exist.
         
        bool require_matching_file = 6;
        Specified by:
        getRequireMatchingFile in interface StaticFilesHandlerOrBuilder
        Returns:
        The requireMatchingFile.
      • setRequireMatchingFile

        public StaticFilesHandler.Builder setRequireMatchingFile​(boolean value)
         Whether this handler should match the request if the file
         referenced by the handler does not exist.
         
        bool require_matching_file = 6;
        Parameters:
        value - The requireMatchingFile to set.
        Returns:
        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:
        This builder for chaining.
      • getApplicationReadable

        public boolean getApplicationReadable()
         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;
        Specified by:
        getApplicationReadable in interface StaticFilesHandlerOrBuilder
        Returns:
        The applicationReadable.
      • setApplicationReadable

        public StaticFilesHandler.Builder setApplicationReadable​(boolean value)
         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;
        Parameters:
        value - The applicationReadable to set.
        Returns:
        This builder for chaining.
      • 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:
        This builder for chaining.
      • setUnknownFields

        public final StaticFilesHandler.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<StaticFilesHandler.Builder>
      • mergeUnknownFields

        public final StaticFilesHandler.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<StaticFilesHandler.Builder>