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

com.influxdb.client.domain.XYGeom Maven / Gradle / Ivy

/*
 * InfluxDB OSS API Service
 * The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. 
 *
 * OpenAPI spec version: 2.0.0
 * 
 *
 * 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.influxdb.client.domain;

import java.util.Objects;
import java.util.Arrays;
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;

/**
 * Gets or Sets XYGeom
 */
@JsonAdapter(XYGeom.Adapter.class)
public enum XYGeom {
  
  LINE("line"),
  
  STEP("step"),
  
  STACKED("stacked"),
  
  BAR("bar"),
  
  MONOTONEX("monotoneX");

  private String value;

  XYGeom(String value) {
    this.value = value;
  }

  public String getValue() {
    return value;
  }

  @Override
  public String toString() {
    return String.valueOf(value);
  }

  public static XYGeom fromValue(String text) {
    for (XYGeom b : XYGeom.values()) {
      if (String.valueOf(b.value).equals(text)) {
        return b;
      }
    }
    return null;
  }

  public static class Adapter extends TypeAdapter {
    @Override
    public void write(final JsonWriter jsonWriter, final XYGeom enumeration) throws IOException {
      jsonWriter.value(enumeration.getValue());
    }

    @Override
    public XYGeom read(final JsonReader jsonReader) throws IOException {
      String value = jsonReader.nextString();
      return XYGeom.fromValue(String.valueOf(value));
    }
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy