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

com.spotinst.sdkjava.model.bl.azure.elastiGroup.V3.ElastigroupScalingConfigurationAzure Maven / Gradle / Ivy

There is a newer version: 1.0.121
Show newest version
package com.spotinst.sdkjava.model.bl.azure.elastiGroup.V3;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.spotinst.sdkjava.client.rest.IPartialUpdateEntity;

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

@JsonIgnoreProperties(ignoreUnknown = true)
public class ElastigroupScalingConfigurationAzure implements IPartialUpdateEntity {
    //region Members
    // Partial Update support
    @JsonIgnore
    private Set isSet;
    private List up;
    private List down;
    //endregion

    //region Constructor

    private ElastigroupScalingConfigurationAzure() {
        isSet = new HashSet<>();
    }
    //endregion

    //region Getters & Setters


    public Set getIsSet() {
        return isSet;
    }

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

    //region Up
    public List getUp() {
        return up;
    }

    public void setUp(List up) {
        isSet.add("up");
        this.up = up;
    }

    //endregion

    //region Down
    public List getDown() {
        return down;
    }

    public void setDown(List down) {
        isSet.add("down");
        this.down = down;
    }
    //endregion

    //region Builder class
    public static class Builder {
        private ElastigroupScalingConfigurationAzure elastigroupScalingConfiguration;

        private Builder() {
            this.elastigroupScalingConfiguration = new ElastigroupScalingConfigurationAzure();
        }

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

        public Builder setDown(final List downScalingPolicies) {
            elastigroupScalingConfiguration.setDown(downScalingPolicies);
            return this;
        }

        public Builder setUp(final List upScalingPolicies) {
            elastigroupScalingConfiguration.setUp(upScalingPolicies);
            return this;
        }

        public ElastigroupScalingConfigurationAzure build() {
            // TODO : Validations
            return elastigroupScalingConfiguration;
        }
    }
    //endregion
    //region isSet methods
    // Is up Set boolean method
    @JsonIgnore
    public boolean isUpSet() {
        return isSet.contains("up");
    }

    // Is down Set boolean method
    @JsonIgnore
    public boolean isDownSet() {
        return isSet.contains("down");
    }

    //endregion
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy