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

org.kuali.common.aws.s3.model.SSEResult Maven / Gradle / Ivy

package org.kuali.common.aws.s3.model;

import org.kuali.common.core.build.ValidatingBuilder;
import org.kuali.common.core.validate.annotation.IdiotProofImmutable;

@IdiotProofImmutable
public final class SSEResult {

	private final String algorithm;
	private final String customerAlgorithm;
	private final String customerKeyMd5;

	private SSEResult(Builder builder) {
		this.algorithm = builder.algorithm;
		this.customerAlgorithm = builder.customerAlgorithm;
		this.customerKeyMd5 = builder.customerKeyMd5;
	}

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

	public static class Builder extends ValidatingBuilder {

		private String algorithm;
		private String customerAlgorithm;
		private String customerKeyMd5;

		public Builder withAlgorithm(String algorithm) {
			this.algorithm = algorithm;
			return this;
		}

		public Builder withCustomerAlgorithm(String customerAlgorithm) {
			this.customerAlgorithm = customerAlgorithm;
			return this;
		}

		public Builder withCustomerKeyMd5(String customerKeyMd5) {
			this.customerKeyMd5 = customerKeyMd5;
			return this;
		}

		@Override
		public SSEResult build() {
			return validate(new SSEResult(this));
		}
	}

	public String getAlgorithm() {
		return algorithm;
	}

	public String getCustomerAlgorithm() {
		return customerAlgorithm;
	}

	public String getCustomerKeyMd5() {
		return customerKeyMd5;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy