All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.volcengine.tos.model.bucket.PutBucketCORSInput Maven / Gradle / Ivy

There is a newer version: 2.8.3
Show newest version
package com.volcengine.tos.model.bucket;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.volcengine.tos.model.GenericInput;

import java.util.List;

public class PutBucketCORSInput extends GenericInput {
    @JsonIgnore
    private String bucket;
    @JsonProperty("CORSRules")
    private List rules;

    public String getBucket() {
        return bucket;
    }

    public PutBucketCORSInput setBucket(String bucket) {
        this.bucket = bucket;
        return this;
    }

    public List getRules() {
        return rules;
    }

    public PutBucketCORSInput setRules(List rules) {
        this.rules = rules;
        return this;
    }

    @Override
    public String toString() {
        return "PutBucketCORS{" +
                "bucket='" + bucket + '\'' +
                ", rules=" + rules +
                '}';
    }

    public static PutBucketCORSBuilder builder() {
        return new PutBucketCORSBuilder();
    }

    public static final class PutBucketCORSBuilder {
        private String bucket;
        private List rules;

        private PutBucketCORSBuilder() {
        }

        public PutBucketCORSBuilder bucket(String bucket) {
            this.bucket = bucket;
            return this;
        }

        public PutBucketCORSBuilder rules(List rules) {
            this.rules = rules;
            return this;
        }

        public PutBucketCORSInput build() {
            PutBucketCORSInput putBucketCORSInput = new PutBucketCORSInput();
            putBucketCORSInput.setBucket(bucket);
            putBucketCORSInput.setRules(rules);
            return putBucketCORSInput;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy