com.geotab.model.entity.diagnostic.SuspectParameter Maven / Gradle / Ivy
/*
*
* 2020 Copyright (C) Geotab Inc. All rights reserved.
*/
package com.geotab.model.entity.diagnostic;
import com.geotab.model.entity.controller.NoController;
import com.geotab.model.entity.enginetype.EngineType;
import com.geotab.model.entity.parametergroup.ParameterGroup;
import com.geotab.model.entity.source.Source;
import com.geotab.model.entity.source.SourceJ1708;
import com.geotab.model.entity.unitofmeasure.UnitOfMeasure;
import com.geotab.model.enumeration.DiagnosticType;
import com.geotab.model.enumeration.FaultResetMode;
import com.geotab.model.enumeration.ValidLoggingPeriod;
import java.util.Optional;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
/**
* Suspect parameter diagnostic.
*/
@NoArgsConstructor
@Getter
@Setter
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class SuspectParameter extends DataDiagnostic {
/**
* The parameter group.
*/
private ParameterGroup parameterGroup;
@Builder(builderMethodName = "suspectParameterBuilder")
public SuspectParameter(String id, String name, Long version, Integer code,
EngineType engineType, FaultResetMode faultResetMode,
Source source, UnitOfMeasure unitOfMeasure,
ValidLoggingPeriod validLoggingPeriod, Boolean isLogGuaranteedOnEstimateError,
Double conversion, Integer dataLength, Double offset,
ParameterGroup parameterGroup) {
super(id, name, version, code, NoController.getInstance(), DiagnosticType.SUSPECT_PARAMETER,
engineType, faultResetMode, Optional.ofNullable(source).orElse(SourceJ1708.getInstance()),
unitOfMeasure, validLoggingPeriod, isLogGuaranteedOnEstimateError, conversion, dataLength,
offset);
this.parameterGroup = parameterGroup;
}
}