Class CORSRule

    • Constructor Detail

      • CORSRule

        public CORSRule()
    • Method Detail

      • setId

        public void setId​(String id)
        Sets the ID of this rule. Rules must be less than 255 alphanumeric characters, and must be unique for a bucket. If you do not assign an ID, one will be generated.
      • getId

        public String getId()
        Returns the Id of this rule.
      • withId

        public CORSRule withId​(String id)
        Sets the ID of this rule and returns a reference to this object for method chaining.
        See Also:
        setId(String)
      • setAllowedMethods

        public void setAllowedMethods​(List<CORSRule.AllowedMethods> allowedMethods)
        Sets the allowed methods of the rule.
      • setAllowedOrigins

        public void setAllowedOrigins​(List<String> allowedOrigins)
        Sets the allowed origins of the rule.
      • getAllowedOrigins

        public List<String> getAllowedOrigins()
        Returns the allowed origins of this rule and returns a reference to this object for method chaining.
      • withAllowedOrigins

        public CORSRule withAllowedOrigins​(List<String> allowedOrigins)
        Sets the allowed origins of this rule and returns a reference to this object for method chaining.
        See Also:
        setAllowedOrigins(List)
      • setMaxAgeSeconds

        public void setMaxAgeSeconds​(int maxAgeSeconds)
        Sets the max age in seconds of the rule.
      • getMaxAgeSeconds

        public int getMaxAgeSeconds()
        Sets the ID of this rule and returns a reference to this object for method chaining.
        See Also:
        setId(String)
      • withMaxAgeSeconds

        public CORSRule withMaxAgeSeconds​(int maxAgeSeconds)
        Sets the max age in seconds of this rule and returns a reference to this object for method chaining.
        See Also:
        setMaxAgeSeconds(int)
      • setExposedHeaders

        public void setExposedHeaders​(List<String> exposedHeaders)
        Sets the expose headers of the rule.
      • getExposedHeaders

        public List<String> getExposedHeaders()
        Returns expose headers of this rule and returns a reference to this object for method chaining.
      • withExposedHeaders

        public CORSRule withExposedHeaders​(List<String> exposedHeaders)
        Sets the exposeHeaders of this rule and returns a reference to this object for method chaining.
        See Also:
        setExposedHeaders(List)
      • setAllowedHeaders

        public void setAllowedHeaders​(List<String> allowedHeaders)
        Sets the allowed headers for the rule.
      • getAllowedHeaders

        public List<String> getAllowedHeaders()
        Returns allowed headers of this rule.
      • withAllowedHeaders

        public CORSRule withAllowedHeaders​(List<String> allowedHeaders)
        Sets the allowed headers of this rule and returns a reference to this object for method chaining.
        See Also:
        setAllowedHeaders(List)