# Class CAI1Validation

java.lang.Object
com.io7m.cardant.protocol.inventory.cb.CAI1Validation

All Implemented Interfaces:
  `CAProtocolMessageValidatorType<CAIMessageType,ProtocolCAIv1Type>`

public final class CAI1Validation extends Object implements CAProtocolMessageValidatorType<CAIMessageType,ProtocolCAIv1Type>
Functions to translate between the core command set and the Inventory v1 Cedarbridge encoding command set.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CAI1Validation()`
  Functions to translate between the core command set and the Inventory v1 Cedarbridge encoding command set.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `CAIMessageType`
  `convertFromWire(ProtocolCAIv1Type message)`
  Convert a wire message to a core message.
  `ProtocolCAIv1Type`
  `convertToWire(CAIMessageType message)`
  Convert a core message to a wire message.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### CAI1Validation

    public CAI1Validation()
    Functions to translate between the core command set and the Inventory v1 Cedarbridge encoding command set.

- ## Method Details

  - ### convertToWire

    public ProtocolCAIv1Type convertToWire(CAIMessageType message) throws CAProtocolException
    Description copied from interface: `CAProtocolMessageValidatorType`
    Convert a core message to a wire message.
    Specified by:
      `convertToWire` in interface `CAProtocolMessageValidatorType<CAIMessageType,ProtocolCAIv1Type>`
    Parameters:
      `message` - The core message
    Returns:
      The wire message
    Throws:
      `CAProtocolException` - On errors

  - ### convertFromWire

    public CAIMessageType convertFromWire(ProtocolCAIv1Type message) throws CAProtocolException
    Description copied from interface: `CAProtocolMessageValidatorType`
    Convert a wire message to a core message.
    Specified by:
      `convertFromWire` in interface `CAProtocolMessageValidatorType<CAIMessageType,ProtocolCAIv1Type>`
    Parameters:
      `message` - The wire message
    Returns:
      The core message
    Throws:
      `CAProtocolException` - On errors