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

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

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

import com.spotinst.sdkjava.enums.ProcessNameEnum;
import com.spotinst.sdkjava.exception.SpotinstValidationException;

import java.util.List;

/**
 * Created by yossi.elman on 24/05/2020.
 */

public class ElastigroupRemoveSuspensionsRequest {
    //region Members
    private String                elastigroupId;
    private List processes;
    //endregion

    public String getElastigroupId() {
        return elastigroupId;
    }

    private void setElastigroupId(String elastigroupId) {
        this.elastigroupId = elastigroupId;
    }

    public List getProcesses() {
        return processes;
    }

    private void setProcesses(List processes) {
        this.processes = processes;
    }

    //region Builder
    public static class Builder {
        private ElastigroupRemoveSuspensionsRequest request;

        private Builder() {
            this.request = new ElastigroupRemoveSuspensionsRequest();
        }

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

        public Builder setElastigroupId(final String elastigroupId) {
            request.setElastigroupId(elastigroupId);
            return this;
        }

        public Builder setProcesses(final List processes) {
            request.setProcesses(processes);
            return this;
        }


        public ElastigroupRemoveSuspensionsRequest build() {
            if (request.getElastigroupId() == null) {
                throw new SpotinstValidationException(
                        "Invalid Request - elastigroupId must be set");
            }

            return request;
        }
    }
    //endregion
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy