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

com.hashicorp.nomad.apimodel.QuotaUsage Maven / Gradle / Ivy

There is a newer version: 0.11.3.0
Show newest version
package com.hashicorp.nomad.apimodel;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.hashicorp.nomad.javasdk.ApiObject;
import com.hashicorp.nomad.javasdk.NomadJson;

import java.io.IOException;
import java.math.BigInteger;
import java.util.List;
import java.util.Map;

/**
 * This is a generated JavaBean representing a request or response structure.
 *
 * @see Nomad HTTP API documentation associated with the endpoint you are using.
 */
public final class QuotaUsage extends ApiObject {
    private String name;
    private Map used;
    private BigInteger createIndex;
    private BigInteger modifyIndex;

    @JsonProperty("Name")
    public String getName() {
        return name;
    }

    public QuotaUsage setName(String name) {
        this.name = name;
        return this;
    }

    @JsonProperty("Used")
    public Map getUsed() {
        return used;
    }

    public QuotaUsage setUsed(Map used) {
        this.used = used;
        return this;
    }

    public QuotaUsage addUsed(String key, QuotaLimit value) {
        if (this.used == null)
            this.used = new java.util.HashMap<>();
        this.used.put(key, value);
        return this;
    }

    @JsonProperty("CreateIndex")
    public BigInteger getCreateIndex() {
        return createIndex;
    }

    public QuotaUsage setCreateIndex(BigInteger createIndex) {
        this.createIndex = createIndex;
        return this;
    }

    @JsonProperty("ModifyIndex")
    public BigInteger getModifyIndex() {
        return modifyIndex;
    }

    public QuotaUsage setModifyIndex(BigInteger modifyIndex) {
        this.modifyIndex = modifyIndex;
        return this;
    }

    @Override
    public String toString() {
        return NomadJson.serialize(this);
    }

    public static QuotaUsage fromJson(String json) throws IOException {
        return NomadJson.deserialize(json, QuotaUsage.class);
    }

    public static List fromJsonArray(String json) throws IOException {
        return NomadJson.deserializeList(json, QuotaUsage.class);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy