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

com.hashicorp.nomad.apimodel.KeyringResponse 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.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 KeyringResponse extends ApiObject {
    private Map messages;
    private Map keys;
    private int numNodes;

    @JsonProperty("Messages")
    public Map getMessages() {
        return messages;
    }

    public KeyringResponse setMessages(Map messages) {
        this.messages = messages;
        return this;
    }

    public KeyringResponse addMessages(String key, String value) {
        if (this.messages == null)
            this.messages = new java.util.HashMap<>();
        this.messages.put(key, value);
        return this;
    }

    @JsonProperty("Keys")
    public Map getKeys() {
        return keys;
    }

    public KeyringResponse setKeys(Map keys) {
        this.keys = keys;
        return this;
    }

    public KeyringResponse addKeys(String key, int value) {
        if (this.keys == null)
            this.keys = new java.util.HashMap<>();
        this.keys.put(key, value);
        return this;
    }

    @JsonProperty("NumNodes")
    public int getNumNodes() {
        return numNodes;
    }

    public KeyringResponse setNumNodes(int numNodes) {
        this.numNodes = numNodes;
        return this;
    }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy