![JAR search and dependency download from the Maven repository](/logo.png)
com.lob.model.EngineHtml Maven / Gradle / Ivy
Show all versions of lob-java Show documentation
/*
* Lob
* The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. Looking for our [previous documentation](https://lob.github.io/legacy-docs/)?
*
* The version of the OpenAPI document: 1.3.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.lob.model;
import java.util.Objects;
import java.util.Arrays;
import io.swagger.annotations.ApiModel;
import com.google.gson.annotations.SerializedName;
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;
/**
* The engine used to combine HTML template with merge variables. * `legacy` - Lob's original engine * `handlebars`
*/
@JsonAdapter(EngineHtml.Adapter.class)
public enum EngineHtml {
LEGACY("legacy"),
HANDLEBARS("handlebars");
private String value;
EngineHtml(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static EngineHtml fromValue(String value) {
for (EngineHtml b : EngineHtml.values()) {
if (b.value.equals(value)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final EngineHtml enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public EngineHtml read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return EngineHtml.fromValue(value);
}
}
}