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

com.spotinst.sdkjava.model.ElastigroupComputeConfiguration Maven / Gradle / Ivy

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

import com.fasterxml.jackson.annotation.JsonIgnore;

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

/**
 * Created by aharontwizer on 8/24/15.
 */
public class ElastigroupComputeConfiguration {
    //region Members
    // Partial Update support
    @JsonIgnore
    private Set isSet;
    private String product;
    private ElastigroupLaunchSpecification launchSpecification;
    private ElastigroupInstanceTypes instanceTypes;
    private List availabilityZones;
    private List elasticIps;
    private List ebsVolumePool;
    private List preferredAvailabilityZones;
    //endregion

    //region Constructor

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

    //region Getters & Setters

    public Set getIsSet() {
        return isSet;
    }

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

    public List getAvailabilityZones() {
        return availabilityZones;
    }

    public void setAvailabilityZones(List availabilityZones) {
        isSet.add("availabilityZones");
        this.availabilityZones = availabilityZones;
    }

    public String getProduct() {
        return product;
    }

    public void setProduct(String product) {
        isSet.add("product");
        this.product = product;
    }

    public ElastigroupLaunchSpecification getLaunchSpecification() {
        return launchSpecification;
    }

    public void setLaunchSpecification(ElastigroupLaunchSpecification launchSpecification) {
        isSet.add("launchSpecification");
        this.launchSpecification = launchSpecification;
    }

    public ElastigroupInstanceTypes getInstanceTypes() {
        return instanceTypes;
    }

    public void setInstanceTypes(ElastigroupInstanceTypes instanceTypes) {
        isSet.add("instanceTypes");
        this.instanceTypes = instanceTypes;
    }

    public List getElasticIps() {
        return elasticIps;
    }

    public void setElasticIps(List elasticIps) {
        isSet.add("elasticIps");
        this.elasticIps = elasticIps;
    }

    public List getEbsVolumePool() {
        return ebsVolumePool;
    }

    public void setEbsVolumePool(List ebsVolumePool) {
        isSet.add("ebsVolumePool");
        this.ebsVolumePool = ebsVolumePool;
    }

    public List getPreferredAvailabilityZones() {
        return preferredAvailabilityZones;
    }

    public void setPreferredAvailabilityZones(List preferredAvailabilityZones) {
        isSet.add("preferredAvailabilityZones");
        this.preferredAvailabilityZones = preferredAvailabilityZones;
    }

    //endregion
    //region Builder class
    public static class Builder {
        private ElastigroupComputeConfiguration compute;

        private Builder() {
            this.compute = new ElastigroupComputeConfiguration();
        }

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

        public Builder setProduct(final String product) {
            compute.setProduct(product);
            return this;
        }

        public Builder setAvailabilityZones(final List availabilityZones) {
            compute.setAvailabilityZones(availabilityZones);
            return this;
        }

        public Builder setEbsVolumePools(final List volumePoolList) {
            compute.setEbsVolumePool(volumePoolList);
            return this;
        }

        public Builder setElasticIps(final List elasticIps) {
            compute.setElasticIps(elasticIps);
            return this;
        }

        public Builder setInstanceTypes(final ElastigroupInstanceTypes instanceTypes) {
            compute.setInstanceTypes(instanceTypes);
            return this;
        }

        public Builder setLaunchSpecification(final ElastigroupLaunchSpecification launchSpecification) {
            compute.setLaunchSpecification(launchSpecification);
            return this;
        }

        public Builder setPreferredAvailabilityZones(final List preferredAvailabilityZones) {
            compute.setPreferredAvailabilityZones(preferredAvailabilityZones);
            return this;
        }

        public ElastigroupComputeConfiguration build() {
            // TODO : Validations
            return compute;
        }
    }
    //endregion

    //region isSet methods
    // Is product Set boolean method
    @JsonIgnore
    public boolean isProductSet() {
        return isSet.contains("product");
    }

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


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


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


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

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

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


    //endregion

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy