dev.bf2.ffm.ams.client.models.ResourceReviewRequest 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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* ResourceReviewRequest
*/
@JsonPropertyOrder({
ResourceReviewRequest.JSON_PROPERTY_ACCOUNT_USERNAME,
ResourceReviewRequest.JSON_PROPERTY_ACTION,
ResourceReviewRequest.JSON_PROPERTY_RESOURCE_TYPE
})
@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ResourceReviewRequest {
public static final String JSON_PROPERTY_ACCOUNT_USERNAME = "account_username";
private String accountUsername;
/**
* Gets or Sets action
*/
public enum ActionEnum {
GET("get"),
DELETE("delete"),
UPDATE("update");
private String value;
ActionEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static ActionEnum fromValue(String value) {
for (ActionEnum b : ActionEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_ACTION = "action";
private ActionEnum action;
/**
* Gets or Sets resourceType
*/
public enum ResourceTypeEnum {
CLUSTER("Cluster"),
SUBSCRIPTION("Subscription");
private String value;
ResourceTypeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static ResourceTypeEnum fromValue(String value) {
for (ResourceTypeEnum b : ResourceTypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_RESOURCE_TYPE = "resource_type";
private ResourceTypeEnum resourceType;
public ResourceReviewRequest() {
}
public ResourceReviewRequest accountUsername(String accountUsername) {
this.accountUsername = accountUsername;
return this;
}
/**
* Get accountUsername
* @return accountUsername
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ACCOUNT_USERNAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getAccountUsername() {
return accountUsername;
}
@JsonProperty(JSON_PROPERTY_ACCOUNT_USERNAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAccountUsername(String accountUsername) {
this.accountUsername = accountUsername;
}
public ResourceReviewRequest action(ActionEnum action) {
this.action = action;
return this;
}
/**
* Get action
* @return action
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ACTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ActionEnum getAction() {
return action;
}
@JsonProperty(JSON_PROPERTY_ACTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAction(ActionEnum action) {
this.action = action;
}
public ResourceReviewRequest resourceType(ResourceTypeEnum resourceType) {
this.resourceType = resourceType;
return this;
}
/**
* Get resourceType
* @return resourceType
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_RESOURCE_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ResourceTypeEnum getResourceType() {
return resourceType;
}
@JsonProperty(JSON_PROPERTY_RESOURCE_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setResourceType(ResourceTypeEnum resourceType) {
this.resourceType = resourceType;
}
/**
* Return true if this ResourceReviewRequest object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ResourceReviewRequest resourceReviewRequest = (ResourceReviewRequest) o;
return Objects.equals(this.accountUsername, resourceReviewRequest.accountUsername) &&
Objects.equals(this.action, resourceReviewRequest.action) &&
Objects.equals(this.resourceType, resourceReviewRequest.resourceType);
}
@Override
public int hashCode() {
return Objects.hash(accountUsername, action, resourceType);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ResourceReviewRequest {\n");
sb.append(" accountUsername: ").append(toIndentedString(accountUsername)).append("\n");
sb.append(" action: ").append(toIndentedString(action)).append("\n");
sb.append(" resourceType: ").append(toIndentedString(resourceType)).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 ");
}
}