io.lakefs.clients.api.model.Policy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api-client Show documentation
Show all versions of api-client Show documentation
lakeFS OpenAPI Java client legacy SDK
/*
* lakeFS API
* lakeFS HTTP API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package io.lakefs.clients.api.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.lakefs.clients.api.model.Statement;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
* Policy
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Policy {
public static final String SERIALIZED_NAME_ID = "id";
@SerializedName(SERIALIZED_NAME_ID)
private String id;
public static final String SERIALIZED_NAME_CREATION_DATE = "creation_date";
@SerializedName(SERIALIZED_NAME_CREATION_DATE)
private Long creationDate;
public static final String SERIALIZED_NAME_STATEMENT = "statement";
@SerializedName(SERIALIZED_NAME_STATEMENT)
private List statement = new ArrayList();
public Policy id(String id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Policy creationDate(Long creationDate) {
this.creationDate = creationDate;
return this;
}
/**
* Unix Epoch in seconds
* @return creationDate
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Unix Epoch in seconds")
public Long getCreationDate() {
return creationDate;
}
public void setCreationDate(Long creationDate) {
this.creationDate = creationDate;
}
public Policy statement(List statement) {
this.statement = statement;
return this;
}
public Policy addStatementItem(Statement statementItem) {
this.statement.add(statementItem);
return this;
}
/**
* Get statement
* @return statement
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "")
public List getStatement() {
return statement;
}
public void setStatement(List statement) {
this.statement = statement;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Policy policy = (Policy) o;
return Objects.equals(this.id, policy.id) &&
Objects.equals(this.creationDate, policy.creationDate) &&
Objects.equals(this.statement, policy.statement);
}
@Override
public int hashCode() {
return Objects.hash(id, creationDate, statement);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Policy {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" creationDate: ").append(toIndentedString(creationDate)).append("\n");
sb.append(" statement: ").append(toIndentedString(statement)).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 ");
}
}