com.geotab.model.entity.failuremode.FailureMode Maven / Gradle / Ivy
/*
*
* 2020 Copyright (C) Geotab Inc. All rights reserved.
*/
package com.geotab.model.entity.failuremode;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.geotab.model.entity.NameEntity;
import com.geotab.model.entity.source.Source;
import com.geotab.model.serialization.FailureModeDeserializer;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
/**
* The Failure Mode Identifier (FMI) used to describe engine fault codes. This is represented by the
* string "NoFailureModeId" when there is no applicable FMI.
*/
@Getter
@Setter
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@JsonDeserialize(using = FailureModeDeserializer.class)
//@JsonSerialize(using = FailureModeSerializer.class) // applied directly under ObjectMapper config
public class FailureMode extends NameEntity {
/**
* The specific FMI code number.
*/
private Double code;
/**
* The {@link Source} type for the FMI.
*/
private Source source;
@Builder(builderMethodName = "failureModeBuilder")
public FailureMode(String id, String name, Double code, Source source) {
super(id, name);
this.code = code;
this.source = source;
}
}