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

com.cerner.beadledom.integration.api.model.HelloWorldDto Maven / Gradle / Ivy

package com.cerner.beadledom.integration.api.model;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Preconditions;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * A Hello World Dto.
 *
 * @author Nick Behrens
 */
@ApiModel(value = "HelloWorldDto")
public class HelloWorldDto {

  @ApiModelProperty(required = true, value = "name of message author")
  private String name;
  @ApiModelProperty(required = true, value = "message content")
  private String helloWorldMessage;

  private HelloWorldDto(String name, String message) {
    this.name = Preconditions.checkNotNull(name);
    this.helloWorldMessage = Preconditions.checkNotNull(message);
  }

  /**
   * Creates a new {@link HelloWorldDto} instance.
   *
   * @param name author to be associated with the message
   * @param message the message to be returned
   * @return {@link HelloWorldDto} encapsulating a name and message
   */
  @JsonCreator
  public static HelloWorldDto create(
      @JsonProperty("name") String name,
      @JsonProperty("helloWorldMessage") String message) {
    return new HelloWorldDto(name, message);
  }

  /** Returns name. */
  public String getName() {
    return name;
  }

  /** Returns hello world message. */
  public String getHelloWorldMessage() {
    return helloWorldMessage;
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy