Class NetworkPolicy.Builder (2.36.0)

public static final class NetworkPolicy.Builder extends GeneratedMessageV3.Builder<NetworkPolicy.Builder> implements NetworkPolicyOrBuilder

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

Protobuf type google.container.v1beta1.NetworkPolicy

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public NetworkPolicy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
NetworkPolicy.Builder
Overrides

build()

public NetworkPolicy build()
Returns
TypeDescription
NetworkPolicy

buildPartial()

public NetworkPolicy buildPartial()
Returns
TypeDescription
NetworkPolicy

clear()

public NetworkPolicy.Builder clear()
Returns
TypeDescription
NetworkPolicy.Builder
Overrides

clearEnabled()

public NetworkPolicy.Builder clearEnabled()

Whether network policy is enabled on the cluster.

bool enabled = 2;

Returns
TypeDescription
NetworkPolicy.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public NetworkPolicy.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
NetworkPolicy.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public NetworkPolicy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
NetworkPolicy.Builder
Overrides

clearProvider()

public NetworkPolicy.Builder clearProvider()

The selected network policy provider.

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

Returns
TypeDescription
NetworkPolicy.Builder

This builder for chaining.

clone()

public NetworkPolicy.Builder clone()
Returns
TypeDescription
NetworkPolicy.Builder
Overrides

getDefaultInstanceForType()

public NetworkPolicy getDefaultInstanceForType()
Returns
TypeDescription
NetworkPolicy

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getEnabled()

public boolean getEnabled()

Whether network policy is enabled on the cluster.

bool enabled = 2;

Returns
TypeDescription
boolean

The enabled.

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.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(NetworkPolicy other)

public NetworkPolicy.Builder mergeFrom(NetworkPolicy other)
Parameter
NameDescription
otherNetworkPolicy
Returns
TypeDescription
NetworkPolicy.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public NetworkPolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
NetworkPolicy.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public NetworkPolicy.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
NetworkPolicy.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final NetworkPolicy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
NetworkPolicy.Builder
Overrides

setEnabled(boolean value)

public NetworkPolicy.Builder setEnabled(boolean value)

Whether network policy is enabled on the cluster.

bool enabled = 2;

Parameter
NameDescription
valueboolean

The enabled to set.

Returns
TypeDescription
NetworkPolicy.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public NetworkPolicy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
NetworkPolicy.Builder
Overrides

setProvider(NetworkPolicy.Provider value)

public NetworkPolicy.Builder setProvider(NetworkPolicy.Provider value)

The selected network policy provider.

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

Parameter
NameDescription
valueNetworkPolicy.Provider

The provider to set.

Returns
TypeDescription
NetworkPolicy.Builder

This builder for chaining.

setProviderValue(int value)

public NetworkPolicy.Builder setProviderValue(int value)

The selected network policy provider.

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

Parameter
NameDescription
valueint

The enum numeric value on the wire for provider to set.

Returns
TypeDescription
NetworkPolicy.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public NetworkPolicy.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
NetworkPolicy.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final NetworkPolicy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
NetworkPolicy.Builder
Overrides