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

com.spotinst.sdkjava.model.bl.admin.organization.PolicyMapping Maven / Gradle / Ivy

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

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;

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

@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class PolicyMapping {
    @JsonIgnore
    private Set  isSet;
    private String       policyId;
    private List accountIds;

    public PolicyMapping() {
        isSet = new HashSet<>();
    }

    public Set getIsSet() {
        return isSet;
    }

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

    public String getPolicyId() {
        return policyId;
    }

    public void setPolicyId(String policyId) {
        isSet.add("policyId");
        this.policyId = policyId;
    }

    public List getAccountIds() {
        return accountIds;
    }

    public void setAccountIds(List accountIds) {
        isSet.add("accountIds");
        this.accountIds = accountIds;
    }

    public static class Builder {
        private PolicyMapping policy;

        private Builder() {
            this.policy = new PolicyMapping();
        }

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

        public Builder setPolicyId(final String policyId) {
            policy.setPolicyId(policyId);
            return this;
        }

        public Builder setAccountIds(final List accountIds) {
            policy.setAccountIds(accountIds);
            return this;
        }
        public PolicyMapping build() {
            return policy;
        }
    }

    @JsonIgnore
    public boolean isPolicyIdSet() {
        return isSet.contains("policyId");
    }

    @JsonIgnore
    public boolean isAccountIdsSet() {
        return isSet.contains("accountIds");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy