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

com.spotinst.sdkjava.model.bl.azure.elastiGroup.V3.ElastigroupLaunchSpecificationAzure 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 java.util.HashSet;
import java.util.List;
import java.util.Set;

public class ElastigroupLaunchSpecificationAzure {
    //region Members
    @JsonIgnore
    private Set              isSet;
    private ImageSpecAzure           image;
    private LoadBalancersConfigAzure loadBalancersConfig;
    private List           tags;
    private NetworkAzure             network;
    private LoginAzure               login;
    private String                   customData;
    //todo add managedServiceIdentities, shutdownScript ,extensions,dataDisks
    //endregion

    //region Constructor
    private ElastigroupLaunchSpecificationAzure() {
        isSet = new HashSet<>();
    }
    //endregion

    //region Getters & Setters
    public Set getIsSet() {
        return isSet;
    }

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

    public NetworkAzure getNetwork() {
        return network;
    }

    public void setNetwork(NetworkAzure network) {
        isSet.add("network");
        this.network = network;
    }

    public String getCustomData() {
        return customData;
    }

    public void setCustomData(String customData) {
        isSet.add("customData");
        this.customData = customData;
    }

    public List getTags() {
        return tags;
    }

    public void setTags(List tags) {
        isSet.add("tags");
        this.tags = tags;
    }

    public LoginAzure getLogin() {
        return login;
    }

    public void setLogin(LoginAzure login) {
        isSet.add("login");
        this.login = login;
    }

    public LoadBalancersConfigAzure getLoadBalancersConfig() {
        return loadBalancersConfig;
    }

    public void setLoadBalancersConfig(LoadBalancersConfigAzure loadBalancersConfig) {
        isSet.add("loadBalancersConfig");
        this.loadBalancersConfig = loadBalancersConfig;
    }

    public ImageSpecAzure getImage() {
        return image;
    }

    public void setImage(ImageSpecAzure image) {
        isSet.add("image");
        this.image = image;
    }
    //endregion

    //region Builder class
    public static class Builder {
        private ElastigroupLaunchSpecificationAzure launchSpecification;

        private Builder() {
            this.launchSpecification = new ElastigroupLaunchSpecificationAzure();
        }

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

        public Builder setCustomData(final String customData) {
            launchSpecification.setCustomData(customData);
            return this;
        }

        public Builder setNetwork(final NetworkAzure network) {
            launchSpecification.setNetwork(network);
            return this;
        }

        public Builder setTags(final List tags) {
            launchSpecification.setTags(tags);
            return this;
        }

        public Builder setLogin(final LoginAzure login) {
            launchSpecification.setLogin(login);
            return this;
        }

        public Builder setLoadBalancersConfig(final LoadBalancersConfigAzure loadBalancersConfig) {
            launchSpecification.setLoadBalancersConfig(loadBalancersConfig);
            return this;
        }

        public Builder setImage(final ImageSpecAzure image) {
            launchSpecification.setImage(image);
            return this;
        }

        public ElastigroupLaunchSpecificationAzure build() {
            // TODO : Validations
            return launchSpecification;
        }
    }
    //endregion

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

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

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

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

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

    // Is loadBalancers Set boolean method
    @JsonIgnore
    public boolean isLoadBalancersConfigSet() {
        return isSet.contains("loadBalancersConfig");
    }
    //endregion
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy