001package org.kuali.common.devops.jenkins.archive.model;
002
003import org.kuali.common.core.build.ValidatingBuilder;
004import org.kuali.common.core.validate.annotation.IdiotProofImmutable;
005
006@IdiotProofImmutable
007public final class ArchiveBuildsRequest {
008
009        private final JenkinsMaster master;
010
011        private ArchiveBuildsRequest(Builder builder) {
012                this.master = builder.master;
013        }
014
015        public static Builder builder() {
016                return new Builder();
017        }
018
019        public static class Builder extends ValidatingBuilder<ArchiveBuildsRequest> {
020
021                private JenkinsMaster master;
022
023                public Builder withMaster(JenkinsMaster master) {
024                        this.master = master;
025                        return this;
026                }
027
028                @Override
029                public ArchiveBuildsRequest build() {
030                        return validate(new ArchiveBuildsRequest(this));
031                }
032        }
033
034        public JenkinsMaster getMaster() {
035                return master;
036        }
037
038}