dev.bf2.ffm.ams.client.models.ClusterAuthorizationResponse 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.ExcessResource;
import dev.bf2.ffm.ams.client.models.ObjectReference;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* ClusterAuthorizationResponse
*/
@JsonPropertyOrder({
ClusterAuthorizationResponse.JSON_PROPERTY_ALLOWED,
ClusterAuthorizationResponse.JSON_PROPERTY_EXCESS_RESOURCES,
ClusterAuthorizationResponse.JSON_PROPERTY_ORGANIZATION_ID,
ClusterAuthorizationResponse.JSON_PROPERTY_SUBSCRIPTION
})
@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ClusterAuthorizationResponse {
public static final String JSON_PROPERTY_ALLOWED = "allowed";
private Boolean allowed;
public static final String JSON_PROPERTY_EXCESS_RESOURCES = "excess_resources";
private List excessResources = new ArrayList<>();
public static final String JSON_PROPERTY_ORGANIZATION_ID = "organization_id";
private String organizationId;
public static final String JSON_PROPERTY_SUBSCRIPTION = "subscription";
private ObjectReference subscription;
public ClusterAuthorizationResponse() {
}
public ClusterAuthorizationResponse allowed(Boolean 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 Boolean getAllowed() {
return allowed;
}
@JsonProperty(JSON_PROPERTY_ALLOWED)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setAllowed(Boolean allowed) {
this.allowed = allowed;
}
public ClusterAuthorizationResponse excessResources(List excessResources) {
this.excessResources = excessResources;
return this;
}
public ClusterAuthorizationResponse addExcessResourcesItem(ExcessResource excessResourcesItem) {
this.excessResources.add(excessResourcesItem);
return this;
}
/**
* Get excessResources
* @return excessResources
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_EXCESS_RESOURCES)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public List getExcessResources() {
return excessResources;
}
@JsonProperty(JSON_PROPERTY_EXCESS_RESOURCES)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setExcessResources(List excessResources) {
this.excessResources = excessResources;
}
public ClusterAuthorizationResponse 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 ClusterAuthorizationResponse subscription(ObjectReference subscription) {
this.subscription = subscription;
return this;
}
/**
* Get subscription
* @return subscription
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_SUBSCRIPTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ObjectReference getSubscription() {
return subscription;
}
@JsonProperty(JSON_PROPERTY_SUBSCRIPTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSubscription(ObjectReference subscription) {
this.subscription = subscription;
}
/**
* Return true if this ClusterAuthorizationResponse object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ClusterAuthorizationResponse clusterAuthorizationResponse = (ClusterAuthorizationResponse) o;
return Objects.equals(this.allowed, clusterAuthorizationResponse.allowed) &&
Objects.equals(this.excessResources, clusterAuthorizationResponse.excessResources) &&
Objects.equals(this.organizationId, clusterAuthorizationResponse.organizationId) &&
Objects.equals(this.subscription, clusterAuthorizationResponse.subscription);
}
@Override
public int hashCode() {
return Objects.hash(allowed, excessResources, organizationId, subscription);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ClusterAuthorizationResponse {\n");
sb.append(" allowed: ").append(toIndentedString(allowed)).append("\n");
sb.append(" excessResources: ").append(toIndentedString(excessResources)).append("\n");
sb.append(" organizationId: ").append(toIndentedString(organizationId)).append("\n");
sb.append(" subscription: ").append(toIndentedString(subscription)).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 ");
}
}