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

cfdsl.cloudfront.property.ViewerCertificate Maven / Gradle / Ivy

The newest version!
package cfdsl.cloudfront.property;

import cfdsl.EmbeddedProperty;

public final class ViewerCertificate extends EmbeddedProperty {
    private ViewerCertificate(Builder b) {
        super(b);
    }

    public static ViewerCertificate useDefault() {
        return new Builder().cloudFrontDefaultCertificate(Boolean.TRUE.toString()).build();
    }

    public static ViewerCertificate forIAMCertificate(
            String iamCertificate, String sslSupportMethod) {
        return new Builder()
                .iamCertificateId(iamCertificate)
                .sslSupportMethod(sslSupportMethod)
                .build();
    }

    public static final class Builder extends EmbeddedProperty.Builder {
        public Builder cloudFrontDefaultCertificate(String certificate) {
            addProperty("CloudFrontDefaultCertificate", certificate);
            return this;
        }

        public Builder iamCertificateId(String iamCertificateId) {
            addProperty("IamCertificateId", iamCertificateId);
            return this;
        }

        public Builder sslSupportMethod(String sslSupportMethod) {
            addProperty("SslSupportMethod", sslSupportMethod);
            return this;
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy