Class V1NetworkPolicyPeer
java.lang.Object
io.kubernetes.client.openapi.models.V1NetworkPolicyPeer
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2025-02-12T21:15:49.397498Z[Etc/UTC]",
comments="Generator version: 7.6.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 TypeMethodDescriptionboolean
static V1NetworkPolicyPeer
Create an instance of V1NetworkPolicyPeer given an JSON stringGet ipBlockGet namespaceSelectorGet podSelectorint
hashCode()
namespaceSelector
(V1LabelSelector namespaceSelector) podSelector
(V1LabelSelector podSelector) void
setIpBlock
(V1IPBlock ipBlock) void
setNamespaceSelector
(V1LabelSelector namespaceSelector) void
setPodSelector
(V1LabelSelector podSelector) toJson()
Convert an instance of V1NetworkPolicyPeer to an JSON stringtoString()
static void
validateJsonElement
(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
-