com.konfigthis.splitit.client.model.PlanStrategy Maven / Gradle / Ivy
/*
* splitit-web-api-v3
* Splitit's Web API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by Konfig (https://konfigthis.com).
* Do not edit the class manually.
*/
package com.konfigthis.splitit.client.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;
/**
*
*/
@JsonAdapter(PlanStrategy.Adapter.class)public enum PlanStrategy {
SECUREDPLAN("SecuredPlan"),
NONSECUREDPLAN("NonSecuredPlan"),
SECUREDPLANCAPTUREEXISTINGSECURITYAUTH("SecuredPlanCaptureExistingSecurityAuth"),
SECUREDPLAN3("SecuredPlan3"),
SINGLEPAYMENT("SinglePayment"),
EXTERNALINSTALLMENTPROVIDER("ExternalInstallmentProvider"),
SECUREDPLAN3A("SecuredPlan3A"),
SECUREDPLAN3B("SecuredPlan3B"),
SECUREDPLAN2A("SecuredPlan2A"),
SECUREDPLAN2("SecuredPlan2"),
SECUREDPLAN4("SecuredPlan4"),
SECUREDPLAN4A("SecuredPlan4A");
private String value;
PlanStrategy(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static PlanStrategy fromValue(String value) {
for (PlanStrategy b : PlanStrategy.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 PlanStrategy enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public PlanStrategy read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return PlanStrategy.fromValue(value);
}
}
}