41 lines
1.1 KiB
Plaintext
41 lines
1.1 KiB
Plaintext
/**
|
|
* Auto-generated from apibuilder.io service spec.
|
|
* apidoc-version : {{service.apidoc.version}}
|
|
* organisation : {{service.organization.key}}
|
|
* service-version : {{service.version}}
|
|
*
|
|
* Documentation at:
|
|
* <a href="https://app.apibuilder.io/{{service.organization.key}}/{{service.name}}/{{service.version}}">https://app.apibuilder.io/{{service.organization.key}}/{{service.name}}/{{service.version}}</a>
|
|
*
|
|
**/
|
|
package {{package}};
|
|
|
|
public enum {{name}} {
|
|
|
|
{{#values}}
|
|
{{#description}}/** {{.}} **/{{/description}}
|
|
{{name}}("{{value}}"){{#last}}; {{/last}}{{^last}}, {{/last}}
|
|
|
|
{{/values}}
|
|
|
|
|
|
private final String value;
|
|
|
|
{{name}}(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
public String getValue() {
|
|
return this.value;
|
|
}
|
|
|
|
public static {{name}} forValue(String value) {
|
|
for({{name}} {{paramName}} : {{name}}.values()) {
|
|
if({{paramName}}.value.equals(value)) {
|
|
return {{paramName}};
|
|
}
|
|
}
|
|
throw new IllegalArgumentException("{{name}} '" + value + "' does not exist!");
|
|
}
|
|
|
|
} |