1 package org.kuali.common.devops.aws.sysadmin.model; 2 3 import org.kuali.common.devops.model.Node; 4 import org.kuali.common.util.Assert; 5 6 public final class ServiceOverride { 7 8 private final Node service; 9 private final String configFileOverrideLocation; 10 11 public static class Builder { 12 13 private final Node service; 14 private final String configFileOverrideLocation; 15 16 public Builder(Node service, String configFileOverrideLocation) { 17 this.service = service; 18 this.configFileOverrideLocation = configFileOverrideLocation; 19 } 20 21 public ServiceOverride build() { 22 Assert.noBlanks(configFileOverrideLocation); 23 Assert.noNulls(service); 24 Assert.exists(configFileOverrideLocation); 25 return new ServiceOverride(this); 26 } 27 28 } 29 30 private ServiceOverride(Builder builder) { 31 this.service = builder.service; 32 this.configFileOverrideLocation = builder.configFileOverrideLocation; 33 } 34 35 public Node getService() { 36 return service; 37 } 38 39 public String getConfigFileOverrideLocation() { 40 return configFileOverrideLocation; 41 } 42 43 }