Class NetworkPolicy (2.4.0)

public final class NetworkPolicy extends GeneratedMessageV3 implements NetworkPolicyOrBuilder

Configuration options for the NetworkPolicy feature. https://kubernetes.io/docs/concepts/services-networking/networkpolicies/

Protobuf type google.container.v1beta1.NetworkPolicy

Static Fields

ENABLED_FIELD_NUMBER

public static final int ENABLED_FIELD_NUMBER
Field Value
TypeDescription
int

PROVIDER_FIELD_NUMBER

public static final int PROVIDER_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static NetworkPolicy getDefaultInstance()
Returns
TypeDescription
NetworkPolicy

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static NetworkPolicy.Builder newBuilder()
Returns
TypeDescription
NetworkPolicy.Builder

newBuilder(NetworkPolicy prototype)

public static NetworkPolicy.Builder newBuilder(NetworkPolicy prototype)
Parameter
NameDescription
prototypeNetworkPolicy
Returns
TypeDescription
NetworkPolicy.Builder

parseDelimitedFrom(InputStream input)

public static NetworkPolicy parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
NetworkPolicy
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static NetworkPolicy parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
NetworkPolicy
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static NetworkPolicy parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
NetworkPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static NetworkPolicy parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
NetworkPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static NetworkPolicy parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
NetworkPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static NetworkPolicy parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
NetworkPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static NetworkPolicy parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
NetworkPolicy
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static NetworkPolicy parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
NetworkPolicy
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static NetworkPolicy parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
NetworkPolicy
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static NetworkPolicy parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
NetworkPolicy
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static NetworkPolicy parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
NetworkPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static NetworkPolicy parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
NetworkPolicy
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<NetworkPolicy> parser()
Returns
TypeDescription
Parser<NetworkPolicy>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public NetworkPolicy getDefaultInstanceForType()
Returns
TypeDescription
NetworkPolicy

getEnabled()

public boolean getEnabled()

Whether network policy is enabled on the cluster.

bool enabled = 2;

Returns
TypeDescription
boolean

The enabled.

getParserForType()

public Parser<NetworkPolicy> getParserForType()
Returns
TypeDescription
Parser<NetworkPolicy>
Overrides

getProvider()

public NetworkPolicy.Provider getProvider()

The selected network policy provider.

.google.container.v1beta1.NetworkPolicy.Provider provider = 1;

Returns
TypeDescription
NetworkPolicy.Provider

The provider.

getProviderValue()

public int getProviderValue()

The selected network policy provider.

.google.container.v1beta1.NetworkPolicy.Provider provider = 1;

Returns
TypeDescription
int

The enum numeric value on the wire for provider.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public NetworkPolicy.Builder newBuilderForType()
Returns
TypeDescription
NetworkPolicy.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected NetworkPolicy.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
NetworkPolicy.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public NetworkPolicy.Builder toBuilder()
Returns
TypeDescription
NetworkPolicy.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException