Class V1NetworkPolicyPeer
java.lang.Object
io.kubernetes.client.openapi.models.V1NetworkPolicyPeer
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2025-05-20T20:47:13.890592Z[Etc/UTC]",
comments="Generator version: 7.13.0")
public class V1NetworkPolicyPeer
extends Object
NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic V1NetworkPolicyPeerCreate an instance of V1NetworkPolicyPeer given an JSON stringGet ipBlockGet namespaceSelectorGet podSelectorinthashCode()namespaceSelector(V1LabelSelector namespaceSelector) podSelector(V1LabelSelector podSelector) voidsetIpBlock(V1IPBlock ipBlock) voidsetNamespaceSelector(V1LabelSelector namespaceSelector) voidsetPodSelector(V1LabelSelector podSelector) toJson()Convert an instance of V1NetworkPolicyPeer to an JSON stringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_IP_BLOCK
- See Also:
-
SERIALIZED_NAME_NAMESPACE_SELECTOR
- See Also:
-
SERIALIZED_NAME_POD_SELECTOR
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
V1NetworkPolicyPeer
public V1NetworkPolicyPeer()
-
-
Method Details
-
ipBlock
-
getIpBlock
Get ipBlock- Returns:
- ipBlock
-
setIpBlock
-
namespaceSelector
-
getNamespaceSelector
Get namespaceSelector- Returns:
- namespaceSelector
-
setNamespaceSelector
-
podSelector
-
getPodSelector
Get podSelector- Returns:
- podSelector
-
setPodSelector
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
Validates the JSON Element and throws an exception if issues found- Parameters:
jsonElement- JSON Element- Throws:
IOException- if the JSON Element is invalid with respect to V1NetworkPolicyPeer
-
fromJson
Create an instance of V1NetworkPolicyPeer given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of V1NetworkPolicyPeer
- Throws:
IOException- if the JSON string is invalid with respect to V1NetworkPolicyPeer
-
toJson
Convert an instance of V1NetworkPolicyPeer to an JSON string- Returns:
- JSON string
-