All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.geotab.model.entity.textmessage.StatusDataRequestContent Maven / Gradle / Ivy

package com.geotab.model.entity.textmessage;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.geotab.model.Id;
import com.geotab.model.serialization.serdes.ByteArrayDeserializer;
import com.geotab.model.serialization.serdes.ByteArraySerializer;
import com.geotab.model.serialization.serdes.ListIdConverter;
import java.util.List;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;

/**
 * The contents of a {@link TextMessage} that can be used to control the state of an IOX-OUTPUT.
 */
@Getter @Setter
public class StatusDataRequestContent extends DataToComponentContent {

  /**
   * The Ids to request data from.
   */
  @JsonSerialize(converter = ListIdConverter.class)
  private List ids;

  @JsonDeserialize(using = ByteArrayDeserializer.class)
  @JsonSerialize(using = ByteArraySerializer.class)
  private Byte[] data;

  @Builder(builderMethodName = "statusDataRequestContentBuilder")
  public StatusDataRequestContent(List ids, Byte[] data) {
    super(MessageContentType.STATUS_DATA_REQUEST, 0, 4, 0, true);
    this.ids = ids;
    this.data = data;
  }

  public StatusDataRequestContent() {
    super(MessageContentType.STATUS_DATA_REQUEST, 0, 4, 0, true);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy