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

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

/*
 *
 * 2020 Copyright (C) Geotab Inc. All rights reserved.
 */

package com.geotab.model.entity.textmessage;

import static com.google.common.collect.Lists.newArrayList;

import com.geotab.model.enumeration.MessageContentType;
import java.util.List;
import java.util.Optional;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

/**
 * Text message content including a list of predetermined responses. Derived from {@link
 * TextContent}.
 */
@NoArgsConstructor
@Getter
@Setter
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class CannedResponseContent extends TextContent {

  /**
   * The address of the stop.
   */
  private List cannedResponseOptions;

  @Builder(builderMethodName = "cannedResponseContentBuilder")
  public CannedResponseContent(String message, Boolean urgent,
      List cannedResponseOptions) {
    super(MessageContentType.CANNED_RESPONSE, message, urgent);
    this.cannedResponseOptions = Optional.ofNullable(cannedResponseOptions).orElse(newArrayList());
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy