org.finra.herd.sdk.model.UserNamespaceAuthorizationCreateRequest Maven / Gradle / Ivy
/*
* herd-external
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* OpenAPI spec version: 0.125.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 org.finra.herd.sdk.model;
import java.util.Objects;
import java.util.Arrays;
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;
import java.util.ArrayList;
import java.util.List;
import org.finra.herd.sdk.model.UserNamespaceAuthorizationKey;
/**
* UserNamespaceAuthorizationCreateRequest
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-07-16T17:44:47.669-04:00[America/New_York]")
public class UserNamespaceAuthorizationCreateRequest {
@JsonProperty("userNamespaceAuthorizationKey")
private UserNamespaceAuthorizationKey userNamespaceAuthorizationKey = null;
/**
* Gets or Sets namespacePermissions
*/
public enum NamespacePermissionsEnum {
READ("READ"),
WRITE("WRITE"),
EXECUTE("EXECUTE"),
GRANT("GRANT"),
WRITE_DESCRIPTIVE_CONTENT("WRITE_DESCRIPTIVE_CONTENT"),
WRITE_ATTRIBUTE("WRITE_ATTRIBUTE");
private String value;
NamespacePermissionsEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static NamespacePermissionsEnum fromValue(String text) {
for (NamespacePermissionsEnum b : NamespacePermissionsEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + text + "'");
}
}
@JsonProperty("namespacePermissions")
private List namespacePermissions = null;
public UserNamespaceAuthorizationCreateRequest userNamespaceAuthorizationKey(UserNamespaceAuthorizationKey userNamespaceAuthorizationKey) {
this.userNamespaceAuthorizationKey = userNamespaceAuthorizationKey;
return this;
}
/**
* Get userNamespaceAuthorizationKey
* @return userNamespaceAuthorizationKey
**/
@ApiModelProperty(required = true, value = "")
public UserNamespaceAuthorizationKey getUserNamespaceAuthorizationKey() {
return userNamespaceAuthorizationKey;
}
public void setUserNamespaceAuthorizationKey(UserNamespaceAuthorizationKey userNamespaceAuthorizationKey) {
this.userNamespaceAuthorizationKey = userNamespaceAuthorizationKey;
}
public UserNamespaceAuthorizationCreateRequest namespacePermissions(List namespacePermissions) {
this.namespacePermissions = namespacePermissions;
return this;
}
public UserNamespaceAuthorizationCreateRequest addNamespacePermissionsItem(NamespacePermissionsEnum namespacePermissionsItem) {
if (this.namespacePermissions == null) {
this.namespacePermissions = new ArrayList();
}
this.namespacePermissions.add(namespacePermissionsItem);
return this;
}
/**
* The list of namespace permissions
* @return namespacePermissions
**/
@ApiModelProperty(value = "The list of namespace permissions")
public List getNamespacePermissions() {
return namespacePermissions;
}
public void setNamespacePermissions(List namespacePermissions) {
this.namespacePermissions = namespacePermissions;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
UserNamespaceAuthorizationCreateRequest userNamespaceAuthorizationCreateRequest = (UserNamespaceAuthorizationCreateRequest) o;
return Objects.equals(this.userNamespaceAuthorizationKey, userNamespaceAuthorizationCreateRequest.userNamespaceAuthorizationKey) &&
Objects.equals(this.namespacePermissions, userNamespaceAuthorizationCreateRequest.namespacePermissions);
}
@Override
public int hashCode() {
return Objects.hash(userNamespaceAuthorizationKey, namespacePermissions);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class UserNamespaceAuthorizationCreateRequest {\n");
sb.append(" userNamespaceAuthorizationKey: ").append(toIndentedString(userNamespaceAuthorizationKey)).append("\n");
sb.append(" namespacePermissions: ").append(toIndentedString(namespacePermissions)).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 ");
}
}