All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.svix.models.BorderRadiusEnum Maven / Gradle / Ivy

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