io.fabric8.kubernetes.api.model.ContainerPort Maven / Gradle / Ivy
package io.fabric8.kubernetes.api.model;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Generated;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
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;
/**
*
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@Generated("org.jsonschema2pojo")
@JsonPropertyOrder({
"containerPort",
"hostIP",
"hostPort",
"name",
"protocol"
})
public class ContainerPort {
/**
* number of port to expose on the pod's IP address
*
*/
@JsonProperty("containerPort")
private Integer containerPort;
/**
* host IP to bind the port to
*
*/
@JsonProperty("hostIP")
private String hostIP;
/**
* number of port to expose on the host; most containers do not need this
*
*/
@JsonProperty("hostPort")
private Integer hostPort;
/**
* name for the port that can be referred to by services; must be a DNS_LABEL and unique without the pod
*
*/
@JsonProperty("name")
private String name;
/**
* protocol for port; must be UDP or TCP; TCP if unspecified
*
*/
@JsonProperty("protocol")
private String protocol;
@JsonIgnore
private Map additionalProperties = new HashMap();
/**
* No args constructor for use in serialization
*
*/
public ContainerPort() {
}
/**
*
* @param protocol
* @param name
* @param hostIP
* @param hostPort
* @param containerPort
*/
public ContainerPort(Integer containerPort, String hostIP, Integer hostPort, String name, String protocol) {
this.containerPort = containerPort;
this.hostIP = hostIP;
this.hostPort = hostPort;
this.name = name;
this.protocol = protocol;
}
/**
* number of port to expose on the pod's IP address
*
* @return
* The containerPort
*/
@JsonProperty("containerPort")
public Integer getContainerPort() {
return containerPort;
}
/**
* number of port to expose on the pod's IP address
*
* @param containerPort
* The containerPort
*/
@JsonProperty("containerPort")
public void setContainerPort(Integer containerPort) {
this.containerPort = containerPort;
}
/**
* host IP to bind the port to
*
* @return
* The hostIP
*/
@JsonProperty("hostIP")
public String getHostIP() {
return hostIP;
}
/**
* host IP to bind the port to
*
* @param hostIP
* The hostIP
*/
@JsonProperty("hostIP")
public void setHostIP(String hostIP) {
this.hostIP = hostIP;
}
/**
* number of port to expose on the host; most containers do not need this
*
* @return
* The hostPort
*/
@JsonProperty("hostPort")
public Integer getHostPort() {
return hostPort;
}
/**
* number of port to expose on the host; most containers do not need this
*
* @param hostPort
* The hostPort
*/
@JsonProperty("hostPort")
public void setHostPort(Integer hostPort) {
this.hostPort = hostPort;
}
/**
* name for the port that can be referred to by services; must be a DNS_LABEL and unique without the pod
*
* @return
* The name
*/
@JsonProperty("name")
public String getName() {
return name;
}
/**
* name for the port that can be referred to by services; must be a DNS_LABEL and unique without the pod
*
* @param name
* The name
*/
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
/**
* protocol for port; must be UDP or TCP; TCP if unspecified
*
* @return
* The protocol
*/
@JsonProperty("protocol")
public String getProtocol() {
return protocol;
}
/**
* protocol for port; must be UDP or TCP; TCP if unspecified
*
* @param protocol
* The protocol
*/
@JsonProperty("protocol")
public void setProtocol(String protocol) {
this.protocol = protocol;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
@JsonAnyGetter
public Map getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(containerPort).append(hostIP).append(hostPort).append(name).append(protocol).append(additionalProperties).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof ContainerPort) == false) {
return false;
}
ContainerPort rhs = ((ContainerPort) other);
return new EqualsBuilder().append(containerPort, rhs.containerPort).append(hostIP, rhs.hostIP).append(hostPort, rhs.hostPort).append(name, rhs.name).append(protocol, rhs.protocol).append(additionalProperties, rhs.additionalProperties).isEquals();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy