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

com.spotinst.sdkjava.model.bl.azure.elastiGroup.V3.ImageSpecAzure 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.Set;

public class ImageSpecAzure {
    //region Members
    @JsonIgnore
    private Set isSet;
    private CustomSpecAzure custom;
    private MarketplaceAzure marketplace;
    //endregion

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

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

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

    public CustomSpecAzure getCustom() {
        return custom;
    }

    public void setCustom(CustomSpecAzure custom) {
        isSet.add("custom");
        this.custom = custom;
    }

    public MarketplaceAzure getMarketplace() {
        return marketplace;
    }

    public void setMarketplace(MarketplaceAzure marketplace) {
        isSet.add("marketplace");
        this.marketplace = marketplace;
    }
    //endregion

    //region Builder class
    public static class Builder {
        private ImageSpecAzure launchSpecification;
        private Builder() {
            this.launchSpecification = new ImageSpecAzure();
        }

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

        public Builder setMarketplace(final MarketplaceAzure marketplace) {
            launchSpecification.setMarketplace(marketplace);
            return this;
        }
        public Builder setCustom(final CustomSpecAzure custom) {
            launchSpecification.setCustom(custom);
            return this;
        }

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

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

    // Is custom Set boolean method
    @JsonIgnore
    public boolean isCustomSet() {
        return isSet.contains("custom");
    }
    //endregion
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy