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

com.chavaillaz.client.jenkins.domain.common.Property Maven / Gradle / Ivy

package com.chavaillaz.client.jenkins.domain.common;

import java.util.HashMap;
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class Property {

    @JsonIgnore
    @JsonAnyGetter
    @JsonAnySetter
    private Map fields = new HashMap<>();

    @JsonProperty("_class")
    private String type;

    /**
     * Gets the value corresponding to the given property name.
     *
     * @param name The property name
     * @return The corresponding value
     */
    public Object get(String name) {
        return fields.get(name);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy