com.dell.cpsd.hal.data.provider.api.ElementEndpoint Maven / Gradle / Ivy
package com.dell.cpsd.hal.data.provider.api;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
/**
* ElementEndpoint
*
*
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"uuid",
"protocol",
"address",
"type",
"endpointCredentials"
})
public class ElementEndpoint {
/**
* Endpoint's unique identifier.
* (Required)
*
*/
@JsonProperty("uuid")
@JsonPropertyDescription("")
private String uuid;
/**
* Expected all-uppercase: SSH, CIM, XMLAPI...
* (Required)
*
*/
@JsonProperty("protocol")
@JsonPropertyDescription("")
private String protocol;
/**
* Address shouldn't have protocol prefix, as there is a separate field for that. IPv4 and IPv6 accepted.
* (Required)
*
*/
@JsonProperty("address")
@JsonPropertyDescription("")
private String address;
/**
* Optional field for different end point types like: ECOM Server, SPA, SPB.
*
*/
@JsonProperty("type")
@JsonPropertyDescription("")
private String type;
@JsonProperty("endpointCredentials")
private List endpointCredentials = new ArrayList();
/**
* No args constructor for use in serialization
*
*/
public ElementEndpoint() {
}
/**
*
* @param protocol
* @param address
* @param endpointCredentials
* @param type
* @param uuid
*/
public ElementEndpoint(String uuid, String protocol, String address, String type, List endpointCredentials) {
super();
this.uuid = uuid;
this.protocol = protocol;
this.address = address;
this.type = type;
this.endpointCredentials = endpointCredentials;
}
/**
* Endpoint's unique identifier.
* (Required)
*
* @return
* The uuid
*/
@JsonProperty("uuid")
public String getUuid() {
return uuid;
}
/**
* Endpoint's unique identifier.
* (Required)
*
* @param uuid
* The uuid
*/
@JsonProperty("uuid")
public void setUuid(String uuid) {
this.uuid = uuid;
}
/**
* Expected all-uppercase: SSH, CIM, XMLAPI...
* (Required)
*
* @return
* The protocol
*/
@JsonProperty("protocol")
public String getProtocol() {
return protocol;
}
/**
* Expected all-uppercase: SSH, CIM, XMLAPI...
* (Required)
*
* @param protocol
* The protocol
*/
@JsonProperty("protocol")
public void setProtocol(String protocol) {
this.protocol = protocol;
}
/**
* Address shouldn't have protocol prefix, as there is a separate field for that. IPv4 and IPv6 accepted.
* (Required)
*
* @return
* The address
*/
@JsonProperty("address")
public String getAddress() {
return address;
}
/**
* Address shouldn't have protocol prefix, as there is a separate field for that. IPv4 and IPv6 accepted.
* (Required)
*
* @param address
* The address
*/
@JsonProperty("address")
public void setAddress(String address) {
this.address = address;
}
/**
* Optional field for different end point types like: ECOM Server, SPA, SPB.
*
* @return
* The type
*/
@JsonProperty("type")
public String getType() {
return type;
}
/**
* Optional field for different end point types like: ECOM Server, SPA, SPB.
*
* @param type
* The type
*/
@JsonProperty("type")
public void setType(String type) {
this.type = type;
}
/**
*
* @return
* The endpointCredentials
*/
@JsonProperty("endpointCredentials")
public List getEndpointCredentials() {
return endpointCredentials;
}
/**
*
* @param endpointCredentials
* The endpointCredentials
*/
@JsonProperty("endpointCredentials")
public void setEndpointCredentials(List endpointCredentials) {
this.endpointCredentials = endpointCredentials;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(uuid).append(protocol).append(address).append(type).append(endpointCredentials).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof ElementEndpoint) == false) {
return false;
}
ElementEndpoint rhs = ((ElementEndpoint) other);
return new EqualsBuilder().append(uuid, rhs.uuid).append(protocol, rhs.protocol).append(address, rhs.address).append(type, rhs.type).append(endpointCredentials, rhs.endpointCredentials).isEquals();
}
}