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

com.spotinst.sdkjava.model.api.azure.elastiGroup.V3.Deployment.ApiGroupDeploymentRequestAzure Maven / Gradle / Ivy

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

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

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

@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonFilter("PartialUpdateEntityFilter")
public class ApiGroupDeploymentRequestAzure implements IPartialUpdateEntity {
    //region members
    @JsonIgnore
    private Set  isSet;
    private Integer      batchSizePercentage;
    private Integer      gracePeriod;
    private Integer      batchMinHealthyPercentage;
    private Integer      drainingTimeout;
    private List healthCheckTypes;
    //endregion

    //region constructor
    public ApiGroupDeploymentRequestAzure() {
        isSet = new HashSet<>();
    }
    //endregion

    //region getters & setters
    @Override
    public Set getIsSet() {
        return isSet;
    }

    public Integer getBatchSizePercentage() {
        return batchSizePercentage;
    }

    public void setBatchSizePercentage(Integer batchSizePercentage) {
        this.batchSizePercentage = batchSizePercentage;
        touch("batchSizePercentage");
    }

    public Integer getGracePeriod() {
        return gracePeriod;
    }

    public void setGracePeriod(Integer gracePeriod) {
        this.gracePeriod = gracePeriod;
        touch("gracePeriod");
    }

    public Integer getBatchMinHealthyPercentage() {
        return batchMinHealthyPercentage;
    }

    public void setBatchMinHealthyPercentage(Integer batchMinHealthyPercentage) {
        this.batchMinHealthyPercentage = batchMinHealthyPercentage;
        touch("batchMinHealthyPercentage");
    }

    public Integer getDrainingTimeout() {
        return drainingTimeout;
    }

    public void setDrainingTimeout(Integer drainingTimeout) {
        this.drainingTimeout = drainingTimeout;
        touch("drainingTimeout");
    }

    public List getHealthCheckTypes() {
        return healthCheckTypes;
    }

    public void setHealthCheckTypes(List healthCheckTypes) {
        this.healthCheckTypes = healthCheckTypes;
        touch("healthCheckTypes");
    }

    //endregion

    //region isSet boolean methods
    @JsonIgnore
    public Boolean isBatchSizePercentageSet() {
        return this.isSet.contains("batchSizePercentage");
    }
    @JsonIgnore
    public Boolean isGracePeriodSet() {
        return this.isSet.contains("gracePeriod");
    }
    @JsonIgnore
    public Boolean isBatchMinHealthyPercentageSet() {
        return this.isSet.contains("batchMinHealthyPercentage");
    }
    @JsonIgnore
    public Boolean isDrainingTimeoutSet() {
        return this.isSet.contains("drainingTimeout");
    }
    @JsonIgnore
    public Boolean isHealthCheckTypesSet() {
        return this.isSet.contains("healthCheckTypes");
    }
    //endregion

    //region private methods - touch helper
    private void touch(String fieldName) {
        this.isSet.add(fieldName);
    }
    //endregion
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy