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
/*
* CheckNameRequest.java
* Copyright (c) 2017 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: Check Name Request. Contains attributes to define a Seoc.
* @author AbleVets
*/
@JsonDeserialize(builder = CheckNameRequest.Builder.class)
public class CheckNameRequest
{
private int seocId;
/**
* SeocKey value.
*/
private int seocKey;
/**
* Name of the Seoc. Guaranteed to be not null.
*/
@NotBlank
private String name;
/**
* Private constructor that will be called from the builder class and initialize
* all the attributes as required.
* @param builder
*/
private CheckNameRequest(Builder builder)
{
this.seocId = builder.seocId;
this.seocKey = builder.seocKey;
this.name = builder.name;
}
/**
* @return - seocId
*/
public int getSeocId()
{
return seocId;
}
/**
* @return - seocKey
*/
public int getSeocKey()
{
return seocKey;
}
/**
* @return - seocName
*/
public String getName()
{
return name;
}
/**
* Builder for CheckNameRequest. Constructor accepts a mandatory parameter
* name to build the CheckNameRequest.
* @author AbleVets
*/
@JsonPOJOBuilder(buildMethodName = "build", withPrefix = "with")
public static class Builder
{
//Optional Field
private int seocId = 0;
// Optional Field
private int seocKey = 0;
// Required Field
private String name;
/**
* Constructor
* @param name
*/
@JsonCreator
public Builder(@JsonProperty("name") String name)
{
this.name = name;
}
/**
* Description: Builder method to initialize seocId.
* @param seocId
* @return - Builder Object
*/
public Builder withSeocId(int seocId)
{
this.seocId = seocId;
return this;
}
/**
* Description: Builder method to initialize seocKey.
* @param seocKey
* @return - Builder Object
*/
public Builder withSeocKey(int seocKey)
{
this.seocKey = seocKey;
return this;
}
/**
* Description: Invokes the CheckNameRequestBuilder private constructor.
* @return - Builder Object
*/
public CheckNameRequest build()
{
return new CheckNameRequest(this);
}
}
}