io.fabric8.kubernetes.api.model.ServiceSpec Maven / Gradle / Ivy
package io.fabric8.kubernetes.api.model;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Generated;
import javax.validation.Valid;
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({
"createExternalLoadBalancer",
"portalIP",
"ports",
"publicIPs",
"selector",
"sessionAffinity"
})
public class ServiceSpec {
/**
* set up a cloud-provider-specific load balancer on an external IP
*
*/
@JsonProperty("createExternalLoadBalancer")
private Boolean createExternalLoadBalancer;
/**
*
*
*/
@JsonProperty("portalIP")
private java.lang.String portalIP;
/**
* ports exposed by the service
*
*/
@JsonProperty("ports")
@Valid
private List ports = new ArrayList();
/**
* externally visible IPs (e.g. load balancers) that should be proxied to this service
*
*/
@JsonProperty("publicIPs")
@Valid
private List publicIPs = new ArrayList();
/**
* label keys and values that must match in order to receive traffic for this service; if empty
*
*/
@JsonProperty("selector")
@Valid
private Map selector;
/**
* enable client IP based session affinity; must be ClientIP or None; defaults to None
*
*/
@JsonProperty("sessionAffinity")
private java.lang.String sessionAffinity;
@JsonIgnore
private Map additionalProperties = new HashMap();
/**
* No args constructor for use in serialization
*
*/
public ServiceSpec() {
}
/**
*
* @param selector
* @param publicIPs
* @param ports
* @param portalIP
* @param sessionAffinity
* @param createExternalLoadBalancer
*/
public ServiceSpec(Boolean createExternalLoadBalancer, java.lang.String portalIP, List ports, List publicIPs, Map selector, java.lang.String sessionAffinity) {
this.createExternalLoadBalancer = createExternalLoadBalancer;
this.portalIP = portalIP;
this.ports = ports;
this.publicIPs = publicIPs;
this.selector = selector;
this.sessionAffinity = sessionAffinity;
}
/**
* set up a cloud-provider-specific load balancer on an external IP
*
* @return
* The createExternalLoadBalancer
*/
@JsonProperty("createExternalLoadBalancer")
public Boolean getCreateExternalLoadBalancer() {
return createExternalLoadBalancer;
}
/**
* set up a cloud-provider-specific load balancer on an external IP
*
* @param createExternalLoadBalancer
* The createExternalLoadBalancer
*/
@JsonProperty("createExternalLoadBalancer")
public void setCreateExternalLoadBalancer(Boolean createExternalLoadBalancer) {
this.createExternalLoadBalancer = createExternalLoadBalancer;
}
/**
*
*
* @return
* The portalIP
*/
@JsonProperty("portalIP")
public java.lang.String getPortalIP() {
return portalIP;
}
/**
*
*
* @param portalIP
* The portalIP
*/
@JsonProperty("portalIP")
public void setPortalIP(java.lang.String portalIP) {
this.portalIP = portalIP;
}
/**
* ports exposed by the service
*
* @return
* The ports
*/
@JsonProperty("ports")
public List getPorts() {
return ports;
}
/**
* ports exposed by the service
*
* @param ports
* The ports
*/
@JsonProperty("ports")
public void setPorts(List ports) {
this.ports = ports;
}
/**
* externally visible IPs (e.g. load balancers) that should be proxied to this service
*
* @return
* The publicIPs
*/
@JsonProperty("publicIPs")
public List getPublicIPs() {
return publicIPs;
}
/**
* externally visible IPs (e.g. load balancers) that should be proxied to this service
*
* @param publicIPs
* The publicIPs
*/
@JsonProperty("publicIPs")
public void setPublicIPs(List publicIPs) {
this.publicIPs = publicIPs;
}
/**
* label keys and values that must match in order to receive traffic for this service; if empty
*
* @return
* The selector
*/
@JsonProperty("selector")
public Map getSelector() {
return selector;
}
/**
* label keys and values that must match in order to receive traffic for this service; if empty
*
* @param selector
* The selector
*/
@JsonProperty("selector")
public void setSelector(Map selector) {
this.selector = selector;
}
/**
* enable client IP based session affinity; must be ClientIP or None; defaults to None
*
* @return
* The sessionAffinity
*/
@JsonProperty("sessionAffinity")
public java.lang.String getSessionAffinity() {
return sessionAffinity;
}
/**
* enable client IP based session affinity; must be ClientIP or None; defaults to None
*
* @param sessionAffinity
* The sessionAffinity
*/
@JsonProperty("sessionAffinity")
public void setSessionAffinity(java.lang.String sessionAffinity) {
this.sessionAffinity = sessionAffinity;
}
@Override
public java.lang.String toString() {
return ToStringBuilder.reflectionToString(this);
}
@JsonAnyGetter
public Map getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
public void setAdditionalProperty(java.lang.String name, Object value) {
this.additionalProperties.put(name, value);
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(createExternalLoadBalancer).append(portalIP).append(ports).append(publicIPs).append(selector).append(sessionAffinity).append(additionalProperties).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof ServiceSpec) == false) {
return false;
}
ServiceSpec rhs = ((ServiceSpec) other);
return new EqualsBuilder().append(createExternalLoadBalancer, rhs.createExternalLoadBalancer).append(portalIP, rhs.portalIP).append(ports, rhs.ports).append(publicIPs, rhs.publicIPs).append(selector, rhs.selector).append(sessionAffinity, rhs.sessionAffinity).append(additionalProperties, rhs.additionalProperties).isEquals();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy