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

com.hashicorp.nomad.apimodel.TaskArtifact 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 TaskArtifact extends ApiObject {
    private String getterSource;
    private Map getterOptions;
    private String getterMode;
    private String relativeDest;

    @JsonProperty("GetterSource")
    public String getGetterSource() {
        return getterSource;
    }

    public TaskArtifact setGetterSource(String getterSource) {
        this.getterSource = getterSource;
        return this;
    }

    @JsonProperty("GetterOptions")
    public Map getGetterOptions() {
        return getterOptions;
    }

    public TaskArtifact setGetterOptions(Map getterOptions) {
        this.getterOptions = getterOptions;
        return this;
    }

    public TaskArtifact addGetterOptions(String key, String value) {
        if (this.getterOptions == null)
            this.getterOptions = new java.util.HashMap<>();
        this.getterOptions.put(key, value);
        return this;
    }

    @JsonProperty("GetterMode")
    public String getGetterMode() {
        return getterMode;
    }

    public TaskArtifact setGetterMode(String getterMode) {
        this.getterMode = getterMode;
        return this;
    }

    @JsonProperty("RelativeDest")
    public String getRelativeDest() {
        return relativeDest;
    }

    public TaskArtifact setRelativeDest(String relativeDest) {
        this.relativeDest = relativeDest;
        return this;
    }

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy