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

com.farao_community.farao.gridcapa.task_manager.api.TaskParameterDto Maven / Gradle / Ivy

There is a newer version: 1.32.1
Show newest version
/*
 * Copyright (c) 2024, RTE (http://www.rte-france.com)
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
package com.farao_community.farao.gridcapa.task_manager.api;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * @author Vincent Bochet {@literal }
 * @author Marc Schwitzguebel {@literal }
 */

public class TaskParameterDto {
    private String id;
    private String parameterType;
    private String value;
    private String defaultValue;

    @JsonCreator
    public TaskParameterDto(
            @JsonProperty("id") String id,
            @JsonProperty("parameterType") String parameterType,
            @JsonProperty("value") String value,
            @JsonProperty("defaultValue") String defaultValue) {
        this.id = id;
        this.parameterType = parameterType;
        this.value = value;
        this.defaultValue = defaultValue;
    }

    public TaskParameterDto(ParameterDto parameterDto) {
        this.id = parameterDto.getId();
        this.parameterType = parameterDto.getParameterType();
        this.value = parameterDto.getValue();
        this.defaultValue = parameterDto.getDefaultValue();
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getParameterType() {
        return parameterType;
    }

    public void setParameterType(String parameterType) {
        this.parameterType = parameterType;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getDefaultValue() {
        return defaultValue;
    }

    public void setDefaultValue(String defaultValue) {
        this.defaultValue = defaultValue;
    }

    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy