com.spotinst.sdkjava.model.bl.ocean.aks.ImportClusterStrategyConfiguration Maven / Gradle / Ivy
package com.spotinst.sdkjava.model.bl.ocean.aks;
import com.fasterxml.jackson.annotation.JsonIgnore;
import java.util.HashSet;
import java.util.Set;
public class ImportClusterStrategyConfiguration {
@JsonIgnore
private Set isSet;
private Boolean fallbackToOd;
private Integer spotPercentage;
private ImportClusterStrategyConfiguration() {
isSet = new HashSet<>();
}
public Set getIsSet() {
return isSet;
}
public void setIsSet(Set isSet) {
this.isSet = isSet;
}
public Boolean getFallbackToOd() {
return fallbackToOd;
}
public void setFallbackToOd(Boolean fallbackToOd) {
isSet.add("fallbackToOd");
this.fallbackToOd = fallbackToOd;
}
public Integer getSpotPercentage() {
return spotPercentage;
}
public void setSpotPercentage(Integer spotPercentage) {
isSet.add("spotPercentage");
this.spotPercentage = spotPercentage;
}
public static class Builder {
private ImportClusterStrategyConfiguration strategy;
private Builder() {
this.strategy = new ImportClusterStrategyConfiguration();
}
public static Builder get() {
return new Builder();
}
public Builder setFallbackToOnDemand(final Boolean fallbackToOnDemand) {
strategy.setFallbackToOd(fallbackToOnDemand);
return this;
}
public Builder setSpotPercentage(final Integer spotPercentage) {
strategy.setSpotPercentage(spotPercentage);
return this;
}
public ImportClusterStrategyConfiguration build() {
return strategy;
}
}
@JsonIgnore
public boolean isFallbackToOdSet() {
return isSet.contains("fallbackToOd");
}
@JsonIgnore
public boolean isSpotPercentageSet() {
return isSet.contains("spotPercentage");
}
}