Summary Table
Categories |
Total Count |
PII |
0 |
URL |
0 |
DNS |
0 |
EKL |
0 |
IP |
0 |
PORT |
0 |
VsID |
0 |
CF |
0 |
AI |
0 |
VPD |
0 |
PL |
0 |
Other |
0 |
File Content
/*
* SeocActivateRequest.java
* Copyright (c) 2019 Veterans Affairs.
*/
package gov.va.oneconsult.seoc.api.json;
import org.hibernate.validator.constraints.NotBlank;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
/**
* Description: Seoc Activate Request. Contains attributes to activate a Seoc.
* @author AbleVets
*/
@JsonDeserialize(builder = SeocActivateRequest.Builder.class)
public class SeocActivateRequest
{
/**
* Id of the Seoc.
*/
private int seocId;
/**
* effectiveDate for when the Seoc will become active. Guaranteed to be not null.
*/
@NotBlank
private String effectiveDate;
/**
* Private constructor that will be called from the builder class and initialize
* all the attributes as required.
* @param builder
*/
private SeocActivateRequest(Builder builder)
{
this.seocId = builder.seocId;
this.effectiveDate = builder.effectiveDate;
}
/**
* @return - seocId
*/
public int getSeocId()
{
return seocId;
}
/**
* @return - effectiveDate
*/
public String getEffectiveDate()
{
return effectiveDate;
}
/**
* Builder for SeocActivateRequest. Constructor accepts a mandatory parameter
* name to build the SeocActivateRequest.
* @author AbleVets
*/
@JsonPOJOBuilder(buildMethodName = "build", withPrefix = "with")
public static class Builder
{
// Optional Field
private int seocId = 0;
// Required Field
private String effectiveDate;
/**
* Description: Invoke private constructor to create Builder instance
*
* @return Builder
*/
@JsonCreator
public static Builder create()
{
return new Builder();
}
/**
* Description: Invoke private constructor to create Builder instance
*
* @param seocId
* @param effectiveDate
* @return Builder
*/
@JsonCreator
public static Builder create(@JsonProperty("seocId") int seocId, @JsonProperty("effectiveDate") String effectiveDate)
{
return new Builder(seocId, effectiveDate);
}
/**
* Constructor
*/
@JsonCreator
public Builder()
{
}
/**
* Constructor
*
* @param seocId
* @param effectiveDate
*/
@JsonCreator
public Builder(@JsonProperty("seocId") int seocId, @JsonProperty("effectiveDate") String effectiveDate)
{
this.seocId = seocId;
this.effectiveDate = effectiveDate;
}
public Builder withSeocId(int seocId)
{
this.seocId = seocId;
return this;
}
public Builder withEffectiveDate(String effectiveDate)
{
this.effectiveDate = effectiveDate;
return this;
}
/**
* Description: Invokes the SeocActivateRequestBuilder private constructor.
* @return - Builder Object
*/
public SeocActivateRequest build()
{
return new SeocActivateRequest(this);
}
}
}