dev.bf2.ffm.ams.client.models.QuotaCostAllOf Maven / Gradle / Ivy
/*
* Account Management Service API
* Manage user subscriptions and clusters
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package dev.bf2.ffm.ams.client.models;
import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import dev.bf2.ffm.ams.client.models.CloudAccount;
import dev.bf2.ffm.ams.client.models.RelatedResource;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* QuotaCostAllOf
*/
@JsonPropertyOrder({
QuotaCostAllOf.JSON_PROPERTY_ALLOWED,
QuotaCostAllOf.JSON_PROPERTY_CLOUD_ACCOUNTS,
QuotaCostAllOf.JSON_PROPERTY_CONSUMED,
QuotaCostAllOf.JSON_PROPERTY_ORGANIZATION_ID,
QuotaCostAllOf.JSON_PROPERTY_QUOTA_ID,
QuotaCostAllOf.JSON_PROPERTY_RELATED_RESOURCES,
QuotaCostAllOf.JSON_PROPERTY_VERSION
})
@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class QuotaCostAllOf {
public static final String JSON_PROPERTY_ALLOWED = "allowed";
private Integer allowed;
public static final String JSON_PROPERTY_CLOUD_ACCOUNTS = "cloud_accounts";
private List cloudAccounts = null;
public static final String JSON_PROPERTY_CONSUMED = "consumed";
private Integer consumed;
public static final String JSON_PROPERTY_ORGANIZATION_ID = "organization_id";
private String organizationId;
public static final String JSON_PROPERTY_QUOTA_ID = "quota_id";
private String quotaId;
public static final String JSON_PROPERTY_RELATED_RESOURCES = "related_resources";
private List relatedResources = null;
public static final String JSON_PROPERTY_VERSION = "version";
private String version;
public QuotaCostAllOf() {
}
public QuotaCostAllOf allowed(Integer allowed) {
this.allowed = allowed;
return this;
}
/**
* Get allowed
* @return allowed
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_ALLOWED)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Integer getAllowed() {
return allowed;
}
@JsonProperty(JSON_PROPERTY_ALLOWED)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setAllowed(Integer allowed) {
this.allowed = allowed;
}
public QuotaCostAllOf cloudAccounts(List cloudAccounts) {
this.cloudAccounts = cloudAccounts;
return this;
}
public QuotaCostAllOf addCloudAccountsItem(CloudAccount cloudAccountsItem) {
if (this.cloudAccounts == null) {
this.cloudAccounts = new ArrayList<>();
}
this.cloudAccounts.add(cloudAccountsItem);
return this;
}
/**
* Get cloudAccounts
* @return cloudAccounts
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_CLOUD_ACCOUNTS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getCloudAccounts() {
return cloudAccounts;
}
@JsonProperty(JSON_PROPERTY_CLOUD_ACCOUNTS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCloudAccounts(List cloudAccounts) {
this.cloudAccounts = cloudAccounts;
}
public QuotaCostAllOf consumed(Integer consumed) {
this.consumed = consumed;
return this;
}
/**
* Get consumed
* @return consumed
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_CONSUMED)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Integer getConsumed() {
return consumed;
}
@JsonProperty(JSON_PROPERTY_CONSUMED)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setConsumed(Integer consumed) {
this.consumed = consumed;
}
public QuotaCostAllOf organizationId(String organizationId) {
this.organizationId = organizationId;
return this;
}
/**
* Get organizationId
* @return organizationId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ORGANIZATION_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getOrganizationId() {
return organizationId;
}
@JsonProperty(JSON_PROPERTY_ORGANIZATION_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setOrganizationId(String organizationId) {
this.organizationId = organizationId;
}
public QuotaCostAllOf quotaId(String quotaId) {
this.quotaId = quotaId;
return this;
}
/**
* Get quotaId
* @return quotaId
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_QUOTA_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getQuotaId() {
return quotaId;
}
@JsonProperty(JSON_PROPERTY_QUOTA_ID)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setQuotaId(String quotaId) {
this.quotaId = quotaId;
}
public QuotaCostAllOf relatedResources(List relatedResources) {
this.relatedResources = relatedResources;
return this;
}
public QuotaCostAllOf addRelatedResourcesItem(RelatedResource relatedResourcesItem) {
if (this.relatedResources == null) {
this.relatedResources = new ArrayList<>();
}
this.relatedResources.add(relatedResourcesItem);
return this;
}
/**
* Get relatedResources
* @return relatedResources
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_RELATED_RESOURCES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List getRelatedResources() {
return relatedResources;
}
@JsonProperty(JSON_PROPERTY_RELATED_RESOURCES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setRelatedResources(List relatedResources) {
this.relatedResources = relatedResources;
}
public QuotaCostAllOf version(String version) {
this.version = version;
return this;
}
/**
* Get version
* @return version
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_VERSION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getVersion() {
return version;
}
@JsonProperty(JSON_PROPERTY_VERSION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setVersion(String version) {
this.version = version;
}
/**
* Return true if this QuotaCost_allOf object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
QuotaCostAllOf quotaCostAllOf = (QuotaCostAllOf) o;
return Objects.equals(this.allowed, quotaCostAllOf.allowed) &&
Objects.equals(this.cloudAccounts, quotaCostAllOf.cloudAccounts) &&
Objects.equals(this.consumed, quotaCostAllOf.consumed) &&
Objects.equals(this.organizationId, quotaCostAllOf.organizationId) &&
Objects.equals(this.quotaId, quotaCostAllOf.quotaId) &&
Objects.equals(this.relatedResources, quotaCostAllOf.relatedResources) &&
Objects.equals(this.version, quotaCostAllOf.version);
}
@Override
public int hashCode() {
return Objects.hash(allowed, cloudAccounts, consumed, organizationId, quotaId, relatedResources, version);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class QuotaCostAllOf {\n");
sb.append(" allowed: ").append(toIndentedString(allowed)).append("\n");
sb.append(" cloudAccounts: ").append(toIndentedString(cloudAccounts)).append("\n");
sb.append(" consumed: ").append(toIndentedString(consumed)).append("\n");
sb.append(" organizationId: ").append(toIndentedString(organizationId)).append("\n");
sb.append(" quotaId: ").append(toIndentedString(quotaId)).append("\n");
sb.append(" relatedResources: ").append(toIndentedString(relatedResources)).append("\n");
sb.append(" version: ").append(toIndentedString(version)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}