Package kubevirt.io
Class V1PodAffinityTerm
- java.lang.Object
-
- kubevirt.io.V1PodAffinityTerm
-
@Generated(value="io.swagger.codegen.languages.JavaClientCodegen", date="2019-11-10T14:44:51.030+02:00") public class V1PodAffinityTerm extends java.lang.Object
Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key <topologyKey> matches that of any node on which a pod of the set of pods is running
-
-
Field Summary
Fields Modifier and Type Field Description private V1LabelSelector
labelSelector
private java.util.List<java.lang.String>
namespaces
private java.lang.String
topologyKey
-
Constructor Summary
Constructors Constructor Description V1PodAffinityTerm()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description V1PodAffinityTerm
addNamespacesItem(java.lang.String namespacesItem)
boolean
equals(java.lang.Object o)
V1LabelSelector
getLabelSelector()
A label query over a set of resources, in this case pods.java.util.List<java.lang.String>
getNamespaces()
namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"java.lang.String
getTopologyKey()
This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running.int
hashCode()
V1PodAffinityTerm
labelSelector(V1LabelSelector labelSelector)
V1PodAffinityTerm
namespaces(java.util.List<java.lang.String> namespaces)
void
setLabelSelector(V1LabelSelector labelSelector)
void
setNamespaces(java.util.List<java.lang.String> namespaces)
void
setTopologyKey(java.lang.String topologyKey)
private java.lang.String
toIndentedString(java.lang.Object o)
Convert the given object to string with each line indented by 4 spaces (except the first line).V1PodAffinityTerm
topologyKey(java.lang.String topologyKey)
java.lang.String
toString()
-
-
-
Field Detail
-
labelSelector
private V1LabelSelector labelSelector
-
namespaces
private java.util.List<java.lang.String> namespaces
-
topologyKey
private java.lang.String topologyKey
-
-
Method Detail
-
labelSelector
public V1PodAffinityTerm labelSelector(V1LabelSelector labelSelector)
-
getLabelSelector
public V1LabelSelector getLabelSelector()
A label query over a set of resources, in this case pods.- Returns:
- labelSelector
-
setLabelSelector
public void setLabelSelector(V1LabelSelector labelSelector)
-
namespaces
public V1PodAffinityTerm namespaces(java.util.List<java.lang.String> namespaces)
-
addNamespacesItem
public V1PodAffinityTerm addNamespacesItem(java.lang.String namespacesItem)
-
getNamespaces
public java.util.List<java.lang.String> getNamespaces()
namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"- Returns:
- namespaces
-
setNamespaces
public void setNamespaces(java.util.List<java.lang.String> namespaces)
-
topologyKey
public V1PodAffinityTerm topologyKey(java.lang.String topologyKey)
-
getTopologyKey
public java.lang.String getTopologyKey()
This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.- Returns:
- topologyKey
-
setTopologyKey
public void setTopologyKey(java.lang.String topologyKey)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toIndentedString
private java.lang.String toIndentedString(java.lang.Object o)
Convert the given object to string with each line indented by 4 spaces (except the first line).
-
-