com.svix.models.BorderRadiusEnum Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of svix Show documentation
Show all versions of svix Show documentation
Svix webhooks API client and webhook verification library
The newest version!
/*
* Svix API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.1.1
*
*
* 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.svix.models;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import java.io.IOException;
import com.google.gson.TypeAdapter;
import com.google.gson.JsonElement;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
/**
* Gets or Sets BorderRadiusEnum
*/
@JsonAdapter(BorderRadiusEnum.Adapter.class)
public enum BorderRadiusEnum {
NONE("none"),
LG("lg"),
MD("md"),
SM("sm"),
FULL("full");
private String value;
BorderRadiusEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static BorderRadiusEnum fromValue(String value) {
for (BorderRadiusEnum b : BorderRadiusEnum.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 BorderRadiusEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public BorderRadiusEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return BorderRadiusEnum.fromValue(value);
}
}
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
String value = jsonElement.getAsString();
BorderRadiusEnum.fromValue(value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy