org.projectodd.openwhisk.model.ActionLimits Maven / Gradle / Ivy
/*
* OpenWhisk REST API
* API for OpenWhisk
*
* OpenAPI spec version: 0.1.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package org.projectodd.openwhisk.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Limits on a specific action
*/
@ApiModel(description = "Limits on a specific action")
public class ActionLimits {
@JsonProperty("timeout")
private Integer timeout = 30000;
@JsonProperty("memory")
private Integer memory = 256;
public ActionLimits timeout(Integer timeout) {
this.timeout = timeout;
return this;
}
/**
* Get timeout
* @return timeout
**/
@ApiModelProperty(value = "")
public Integer getTimeout() {
return timeout;
}
public void setTimeout(Integer timeout) {
this.timeout = timeout;
}
public ActionLimits memory(Integer memory) {
this.memory = memory;
return this;
}
/**
* Get memory
* @return memory
**/
@ApiModelProperty(value = "")
public Integer getMemory() {
return memory;
}
public void setMemory(Integer memory) {
this.memory = memory;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ActionLimits actionLimits = (ActionLimits) o;
return Objects.equals(this.timeout, actionLimits.timeout) &&
Objects.equals(this.memory, actionLimits.memory);
}
@Override
public int hashCode() {
return Objects.hash(timeout, memory);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ActionLimits {\n");
sb.append(" timeout: ").append(toIndentedString(timeout)).append("\n");
sb.append(" memory: ").append(toIndentedString(memory)).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(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}