blob: 3f6fb9f7f4439104ac9d39f4298d6eb4078e29bf [file] [log] [blame]
/********************************************************************************
* Copyright (c) 2015-2019 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
********************************************************************************/
package org.eclipse.mdm.businessobjects.entity;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* Attribute (Entity for attribute informations)
*
* @author Sebastian Dirsch, Gigatronik Ingolstadt GmbH
*
*/
@Schema(description = "Representation of a MDM attribute")
public class MDMAttribute {
/** name of the attribute value */
private final String name;
/** value of the attribute value */
private final Object value;
/** unit of the attribute value */
private final String unit;
/** data type of the attribute value */
private final String dataType;
/**
* Constructor
*
* @param name name of the attribute value
* @param value string value of the attribute value
* @param unit unit of the attribute value
* @param dataType data type of the attribute value
*/
public MDMAttribute(String name, Object value, String unit, String dataType) {
this.name = name;
this.value = value;
this.unit = unit;
this.dataType = dataType;
}
@Schema(description = "name of the attribute")
public String getName() {
return this.name;
}
@Schema(description = "value of the attribute")
public Object getValue() {
return this.value;
}
@Schema(description = "unit of the attribute value")
public String getUnit() {
return this.unit;
}
@Schema(description = "data of the attribute", example = "FLOAT_SEQUENCE")
public String getDataType() {
return this.dataType;
}
}