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

com.hashicorp.nomad.javasdk.NomadResponse Maven / Gradle / Ivy

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

import javax.annotation.Nullable;

/**
 * Response from the Nomad API.
 *
 * @param  type of value that was deserialized from the response body
 */
public class NomadResponse {
    private final String rawEntity;
    private final T value;

    /**
     * Creates a new NomadResponse.
     *
     * @param rawEntity    the unparsed HTTP response entity (body)
     * @param value        response value extracted from the response entity
     */
    public NomadResponse(String rawEntity, @Nullable T value) {
        this.rawEntity = rawEntity;
        this.value = value;
    }

    /**
     * @return the raw HTTP response body as a String
     */
    public String getRawEntity() {
        return rawEntity;
    }

    /**
     * @return the deserialised response value
     */
    public T getValue() {
        return value;
    }

    @Override
    public String toString() {
        return "";
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy