com.geotab.model.entity.diagnostic.Sid Maven / Gradle / Ivy
/*
*
* 2020 Copyright (C) Geotab Inc. All rights reserved.
*/
package com.geotab.model.entity.diagnostic;
import com.geotab.model.entity.controller.Controller;
import com.geotab.model.entity.enginetype.EngineType;
import com.geotab.model.entity.source.Source;
import com.geotab.model.entity.source.SourceJ1708;
import com.geotab.model.entity.unitofmeasure.UnitOfMeasureNone;
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;
/**
* A {@link SourceJ1708} Subsystem Identifier.
*/
@NoArgsConstructor
@Getter
@Setter
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class Sid extends Diagnostic {
@Builder(builderMethodName = "sidBuilder")
public Sid(String id, String name, Long version, Integer code, Controller controller,
Source source, EngineType engineType, FaultResetMode faultResetMode) {
super(id, name, version, code, controller, DiagnosticType.SID, engineType, faultResetMode,
Optional.ofNullable(source).orElse(SourceJ1708.getInstance()),
UnitOfMeasureNone.getInstance(), ValidLoggingPeriod.NONE, false);
}
}