io.tiledb.cloud.rest_api.model.TokenScope Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tiledb-cloud-java Show documentation
Show all versions of tiledb-cloud-java Show documentation
The Java client for the TileDB Cloud Service
The newest version!
/*
* TileDB Storage Platform API
* TileDB Storage Platform REST API
*
* The version of the OpenAPI document: 2.2.19
*
*
* 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.tiledb.cloud.rest_api.model;
import java.io.IOException;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
/**
* An api token scope available for creation
*/
@JsonAdapter(TokenScope.Adapter.class)
public enum TokenScope {
PASSWORD_RESET("password_reset"),
CONFIRM_EMAIL("confirm_email"),
STAR("*"),
USER_READ("user:read"),
USER_READ_WRITE("user:read-write"),
USER_ADMIN("user:admin"),
ARRAY_READ("array:read"),
ARRAY_READ_WRITE("array:read-write"),
ARRAY_ADMIN("array:admin"),
ORGANIZATION_READ("organization:read"),
ORGANIZATION_READ_WRITE("organization:read-write"),
ORGANIZATION_ADMIN("organization:admin"),
GROUP_READ("group:read"),
GROUP_READ_WRITE("group:read-write"),
GROUP_ADMIN("group:admin");
private String value;
TokenScope(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static TokenScope fromValue(String value) {
for (TokenScope b : TokenScope.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final TokenScope enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public TokenScope read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return TokenScope.fromValue(value);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy