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

com.dominodatalab.api.model.StorageUnit Maven / Gradle / Ivy

Go to download

Domino Data Lab API Client to connect to Domino web services using Java HTTP Client.

There is a newer version: 6.0.1.0
Show newest version
/*
 * Domino Data Lab API v4
 * This API provides access to select Domino functions available in Domino's non-public API. To authenticate your requests, include your API Key (which you can find on your account page) with the header X-Domino-Api-Key. 
 *
 * The version of the OpenAPI document: 4.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.dominodatalab.api.model;

import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.StringJoiner;
import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;


import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * Unit of number being stored
 */
public enum StorageUnit {
  
  B("B"),
  
  O("o"),
  
  KB("KB"),
  
  KI_B("KiB"),
  
  MB("MB"),
  
  MI_B("MiB"),
  
  GB("GB"),
  
  GI_B("GiB"),
  
  TB("TB"),
  
  TI_B("TiB"),
  
  PB("PB"),
  
  PI_B("PiB"),
  
  EB("EB"),
  
  EI_B("EiB"),
  
  ZB("ZB"),
  
  ZI_B("ZiB"),
  
  YB("YB"),
  
  YI_B("YiB"),
  
  BIT("bit"),
  
  KBIT("Kbit"),
  
  KIBIT("Kibit"),
  
  MBIT("Mbit"),
  
  MIBIT("Mibit"),
  
  GBIT("Gbit"),
  
  GIBIT("Gibit"),
  
  TBIT("Tbit"),
  
  TIBIT("Tibit"),
  
  PBIT("Pbit"),
  
  PIBIT("Pibit"),
  
  EBIT("Ebit"),
  
  EIBIT("Eibit"),
  
  ZBIT("Zbit"),
  
  ZIBIT("Zibit"),
  
  YBIT("Ybit"),
  
  YIBIT("Yibit");

  private String value;

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

  @JsonValue
  public String getValue() {
    return value;
  }

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

  @JsonCreator
  public static StorageUnit fromValue(String value) {
    for (StorageUnit b : StorageUnit.values()) {
      if (b.value.equals(value)) {
        return b;
      }
    }
    throw new IllegalArgumentException("Unexpected value '" + value + "'");
  }

  /**
   * Convert the instance into URL query string.
   *
   * @param prefix prefix of the query string
   * @return URL query string
   */
  public String toUrlQueryString(String prefix) {
    if (prefix == null) {
      prefix = "";
    }

    return String.format("%s=%s", prefix, this.toString());
  }

}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy