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

com.spotinst.sdkjava.model.bl.ocean.kubernetes.DetachInstances Maven / Gradle / Ivy

There is a newer version: 1.0.121
Show newest version
package com.spotinst.sdkjava.model.bl.ocean.kubernetes;

import com.fasterxml.jackson.annotation.JsonIgnore;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class DetachInstances {
    @JsonIgnore
    private Set                            isSet;
    private List               instancesToDetach;
    private Boolean		          shouldTerminateInstances;
    private Boolean          shouldDecrementTargetCapacity;

    private DetachInstances() {
        isSet = new HashSet<>();
    }

    public Set getIsSet() {
        return isSet;
    }

    public void setIsSet(Set isSet) {
        this.isSet = isSet;
    }

    public List getInstancesToDetach() {
        return instancesToDetach;
    }

    public void setInstancesToDetach(List instancesToDetach) {
        isSet.add("instancesToDetach");
        this.instancesToDetach = instancesToDetach;
    }

    public Boolean getShouldTerminateInstances() {
        return shouldTerminateInstances;
    }

    public void setShouldTerminateInstances(Boolean shouldTerminateInstances) {
        isSet.add("shouldTerminateInstances");
        this.shouldTerminateInstances = shouldTerminateInstances;
    }

    public Boolean getShouldDecrementTargetCapacity() {
        return shouldDecrementTargetCapacity;
    }

    public void setShouldDecrementTargetCapacity(Boolean shouldDecrementTargetCapacity) {
        isSet.add("shouldDecrementTargetCapacity");
        this.shouldDecrementTargetCapacity = shouldDecrementTargetCapacity;
    }

    public static class Builder {
        private DetachInstances detachInstances;

        private Builder() {
            this.detachInstances = new DetachInstances();
        }

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

        public Builder setInstancesToDetach(final List instancesToDetach) {
            detachInstances.setInstancesToDetach(instancesToDetach);
            return this;
        }

        public Builder setShouldTerminateInstances(final Boolean shouldTerminateInstances) {
            detachInstances.setShouldTerminateInstances(shouldTerminateInstances);
            return this;
        }

        public Builder setShouldDecrementTargetCapacity(final Boolean shouldDecrementTargetCapacity) {
            detachInstances.setShouldDecrementTargetCapacity(shouldDecrementTargetCapacity);
            return this;
        }

        public DetachInstances build() {
            // Validations
            return detachInstances;
        }
    }

    @JsonIgnore
    public boolean isInstancesToDetachSet() {
        return isSet.contains("instancesToDetach");
    }

    @JsonIgnore
    public boolean isShouldTerminateInstancesSet() {
        return isSet.contains("shouldTerminateInstances");
    }

    @JsonIgnore
    public boolean isShouldDecrementTargetCapacitySet() {
        return isSet.contains("shouldDecrementTargetCapacity");
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy