package com.r11.tools.model;

import com.r11.tools.model.constraints.HttpCode;
import java.io.Serializable;
import java.util.Map;
import java.util.UUID;
import javax.validation.constraints.Positive;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.redis.core.RedisHash;
import org.springframework.data.redis.core.index.Indexed;

/**
 * MockedMessage redis entity pojo
 * @author Rafał Żukowicz
 */
@Data
@ToString
@RedisHash("mockedMessage")
@NoArgsConstructor
@AllArgsConstructor
public class MockedMessage implements Serializable {
    @Id
    private String compositePrimaryKey;
    @Indexed
    private UUID clientUUID;
    @Positive
    private Integer mockedResponseId;
    private String mediaType;
    private String messageBody;
    private Map<String, String> httpHeaders;
    @HttpCode
    private Integer httpStatus;

}


