Class SetNetworkPolicyRequest.Builder (2.32.0)

public static final class SetNetworkPolicyRequest.Builder extends GeneratedMessageV3.Builder<SetNetworkPolicyRequest.Builder> implements SetNetworkPolicyRequestOrBuilder

SetNetworkPolicyRequest enables/disables network policy for a cluster.

Protobuf type google.container.v1.SetNetworkPolicyRequest

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public SetNetworkPolicyRequest build()
Returns
TypeDescription
SetNetworkPolicyRequest

buildPartial()

public SetNetworkPolicyRequest buildPartial()
Returns
TypeDescription
SetNetworkPolicyRequest

clear()

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

clearClusterId() (deprecated)

public SetNetworkPolicyRequest.Builder clearClusterId()

Deprecated. google.container.v1.SetNetworkPolicyRequest.cluster_id is deprecated. See google/container/v1/cluster_service.proto;l=4190

Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.

string cluster_id = 3 [deprecated = true];

Returns
TypeDescription
SetNetworkPolicyRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public SetNetworkPolicyRequest.Builder clearName()

The name (project, location, cluster name) of the cluster to set networking policy. Specified in the format projects/*/locations/*/clusters/*.

string name = 6;

Returns
TypeDescription
SetNetworkPolicyRequest.Builder

This builder for chaining.

clearNetworkPolicy()

public SetNetworkPolicyRequest.Builder clearNetworkPolicy()

Required. Configuration options for the NetworkPolicy feature.

.google.container.v1.NetworkPolicy network_policy = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
SetNetworkPolicyRequest.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearProjectId() (deprecated)

public SetNetworkPolicyRequest.Builder clearProjectId()

Deprecated. google.container.v1.SetNetworkPolicyRequest.project_id is deprecated. See google/container/v1/cluster_service.proto;l=4180

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

string project_id = 1 [deprecated = true];

Returns
TypeDescription
SetNetworkPolicyRequest.Builder

This builder for chaining.

clearZone() (deprecated)

public SetNetworkPolicyRequest.Builder clearZone()

Deprecated. google.container.v1.SetNetworkPolicyRequest.zone is deprecated. See google/container/v1/cluster_service.proto;l=4186

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

string zone = 2 [deprecated = true];

Returns
TypeDescription
SetNetworkPolicyRequest.Builder

This builder for chaining.

clone()

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

getClusterId() (deprecated)

public String getClusterId()

Deprecated. google.container.v1.SetNetworkPolicyRequest.cluster_id is deprecated. See google/container/v1/cluster_service.proto;l=4190

Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.

string cluster_id = 3 [deprecated = true];

Returns
TypeDescription
String

The clusterId.

getClusterIdBytes() (deprecated)

public ByteString getClusterIdBytes()

Deprecated. google.container.v1.SetNetworkPolicyRequest.cluster_id is deprecated. See google/container/v1/cluster_service.proto;l=4190

Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.

string cluster_id = 3 [deprecated = true];

Returns
TypeDescription
ByteString

The bytes for clusterId.

getDefaultInstanceForType()

public SetNetworkPolicyRequest getDefaultInstanceForType()
Returns
TypeDescription
SetNetworkPolicyRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getName()

public String getName()

The name (project, location, cluster name) of the cluster to set networking policy. Specified in the format projects/*/locations/*/clusters/*.

string name = 6;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

The name (project, location, cluster name) of the cluster to set networking policy. Specified in the format projects/*/locations/*/clusters/*.

string name = 6;

Returns
TypeDescription
ByteString

The bytes for name.

getNetworkPolicy()

public NetworkPolicy getNetworkPolicy()

Required. Configuration options for the NetworkPolicy feature.

.google.container.v1.NetworkPolicy network_policy = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
NetworkPolicy

The networkPolicy.

getNetworkPolicyBuilder()

public NetworkPolicy.Builder getNetworkPolicyBuilder()

Required. Configuration options for the NetworkPolicy feature.

.google.container.v1.NetworkPolicy network_policy = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
NetworkPolicy.Builder

getNetworkPolicyOrBuilder()

public NetworkPolicyOrBuilder getNetworkPolicyOrBuilder()

Required. Configuration options for the NetworkPolicy feature.

.google.container.v1.NetworkPolicy network_policy = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
NetworkPolicyOrBuilder

getProjectId() (deprecated)

public String getProjectId()

Deprecated. google.container.v1.SetNetworkPolicyRequest.project_id is deprecated. See google/container/v1/cluster_service.proto;l=4180

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

string project_id = 1 [deprecated = true];

Returns
TypeDescription
String

The projectId.

getProjectIdBytes() (deprecated)

public ByteString getProjectIdBytes()

Deprecated. google.container.v1.SetNetworkPolicyRequest.project_id is deprecated. See google/container/v1/cluster_service.proto;l=4180

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

string project_id = 1 [deprecated = true];

Returns
TypeDescription
ByteString

The bytes for projectId.

getZone() (deprecated)

public String getZone()

Deprecated. google.container.v1.SetNetworkPolicyRequest.zone is deprecated. See google/container/v1/cluster_service.proto;l=4186

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

string zone = 2 [deprecated = true];

Returns
TypeDescription
String

The zone.

getZoneBytes() (deprecated)

public ByteString getZoneBytes()

Deprecated. google.container.v1.SetNetworkPolicyRequest.zone is deprecated. See google/container/v1/cluster_service.proto;l=4186

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

string zone = 2 [deprecated = true];

Returns
TypeDescription
ByteString

The bytes for zone.

hasNetworkPolicy()

public boolean hasNetworkPolicy()

Required. Configuration options for the NetworkPolicy feature.

.google.container.v1.NetworkPolicy network_policy = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
boolean

Whether the networkPolicy field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(SetNetworkPolicyRequest other)

public SetNetworkPolicyRequest.Builder mergeFrom(SetNetworkPolicyRequest other)
Parameter
NameDescription
otherSetNetworkPolicyRequest
Returns
TypeDescription
SetNetworkPolicyRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeNetworkPolicy(NetworkPolicy value)

public SetNetworkPolicyRequest.Builder mergeNetworkPolicy(NetworkPolicy value)

Required. Configuration options for the NetworkPolicy feature.

.google.container.v1.NetworkPolicy network_policy = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueNetworkPolicy
Returns
TypeDescription
SetNetworkPolicyRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setClusterId(String value) (deprecated)

public SetNetworkPolicyRequest.Builder setClusterId(String value)

Deprecated. google.container.v1.SetNetworkPolicyRequest.cluster_id is deprecated. See google/container/v1/cluster_service.proto;l=4190

Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.

string cluster_id = 3 [deprecated = true];

Parameter
NameDescription
valueString

The clusterId to set.

Returns
TypeDescription
SetNetworkPolicyRequest.Builder

This builder for chaining.

setClusterIdBytes(ByteString value) (deprecated)

public SetNetworkPolicyRequest.Builder setClusterIdBytes(ByteString value)

Deprecated. google.container.v1.SetNetworkPolicyRequest.cluster_id is deprecated. See google/container/v1/cluster_service.proto;l=4190

Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field.

string cluster_id = 3 [deprecated = true];

Parameter
NameDescription
valueByteString

The bytes for clusterId to set.

Returns
TypeDescription
SetNetworkPolicyRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public SetNetworkPolicyRequest.Builder setName(String value)

The name (project, location, cluster name) of the cluster to set networking policy. Specified in the format projects/*/locations/*/clusters/*.

string name = 6;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
SetNetworkPolicyRequest.Builder

This builder for chaining.

setNameBytes(ByteString value)

public SetNetworkPolicyRequest.Builder setNameBytes(ByteString value)

The name (project, location, cluster name) of the cluster to set networking policy. Specified in the format projects/*/locations/*/clusters/*.

string name = 6;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
SetNetworkPolicyRequest.Builder

This builder for chaining.

setNetworkPolicy(NetworkPolicy value)

public SetNetworkPolicyRequest.Builder setNetworkPolicy(NetworkPolicy value)

Required. Configuration options for the NetworkPolicy feature.

.google.container.v1.NetworkPolicy network_policy = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueNetworkPolicy
Returns
TypeDescription
SetNetworkPolicyRequest.Builder

setNetworkPolicy(NetworkPolicy.Builder builderForValue)

public SetNetworkPolicyRequest.Builder setNetworkPolicy(NetworkPolicy.Builder builderForValue)

Required. Configuration options for the NetworkPolicy feature.

.google.container.v1.NetworkPolicy network_policy = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
builderForValueNetworkPolicy.Builder
Returns
TypeDescription
SetNetworkPolicyRequest.Builder

setProjectId(String value) (deprecated)

public SetNetworkPolicyRequest.Builder setProjectId(String value)

Deprecated. google.container.v1.SetNetworkPolicyRequest.project_id is deprecated. See google/container/v1/cluster_service.proto;l=4180

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

string project_id = 1 [deprecated = true];

Parameter
NameDescription
valueString

The projectId to set.

Returns
TypeDescription
SetNetworkPolicyRequest.Builder

This builder for chaining.

setProjectIdBytes(ByteString value) (deprecated)

public SetNetworkPolicyRequest.Builder setProjectIdBytes(ByteString value)

Deprecated. google.container.v1.SetNetworkPolicyRequest.project_id is deprecated. See google/container/v1/cluster_service.proto;l=4180

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field.

string project_id = 1 [deprecated = true];

Parameter
NameDescription
valueByteString

The bytes for projectId to set.

Returns
TypeDescription
SetNetworkPolicyRequest.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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

setZone(String value) (deprecated)

public SetNetworkPolicyRequest.Builder setZone(String value)

Deprecated. google.container.v1.SetNetworkPolicyRequest.zone is deprecated. See google/container/v1/cluster_service.proto;l=4186

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

string zone = 2 [deprecated = true];

Parameter
NameDescription
valueString

The zone to set.

Returns
TypeDescription
SetNetworkPolicyRequest.Builder

This builder for chaining.

setZoneBytes(ByteString value) (deprecated)

public SetNetworkPolicyRequest.Builder setZoneBytes(ByteString value)

Deprecated. google.container.v1.SetNetworkPolicyRequest.zone is deprecated. See google/container/v1/cluster_service.proto;l=4186

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field.

string zone = 2 [deprecated = true];

Parameter
NameDescription
valueByteString

The bytes for zone to set.

Returns
TypeDescription
SetNetworkPolicyRequest.Builder

This builder for chaining.