Class ClusterAutoscaling.Builder (2.4.0)

public static final class ClusterAutoscaling.Builder extends GeneratedMessageV3.Builder<ClusterAutoscaling.Builder> implements ClusterAutoscalingOrBuilder

ClusterAutoscaling contains global, per-cluster information required by Cluster Autoscaler to automatically adjust the size of the cluster and create/delete node pools based on the current needs.

Protobuf type google.container.v1.ClusterAutoscaling

Static Methods

getDescriptor()

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

Methods

addAllAutoprovisioningLocations(Iterable<String> values)

public ClusterAutoscaling.Builder addAllAutoprovisioningLocations(Iterable<String> values)

The list of Google Compute Engine zones in which the NodePool's nodes can be created by NAP.

repeated string autoprovisioning_locations = 5;

Parameter
NameDescription
valuesIterable<String>

The autoprovisioningLocations to add.

Returns
TypeDescription
ClusterAutoscaling.Builder

This builder for chaining.

addAllResourceLimits(Iterable<? extends ResourceLimit> values)

public ClusterAutoscaling.Builder addAllResourceLimits(Iterable<? extends ResourceLimit> values)

Contains global constraints regarding minimum and maximum amount of resources in the cluster.

repeated .google.container.v1.ResourceLimit resource_limits = 2;

Parameter
NameDescription
valuesIterable<? extends com.google.container.v1.ResourceLimit>
Returns
TypeDescription
ClusterAutoscaling.Builder

addAutoprovisioningLocations(String value)

public ClusterAutoscaling.Builder addAutoprovisioningLocations(String value)

The list of Google Compute Engine zones in which the NodePool's nodes can be created by NAP.

repeated string autoprovisioning_locations = 5;

Parameter
NameDescription
valueString

The autoprovisioningLocations to add.

Returns
TypeDescription
ClusterAutoscaling.Builder

This builder for chaining.

addAutoprovisioningLocationsBytes(ByteString value)

public ClusterAutoscaling.Builder addAutoprovisioningLocationsBytes(ByteString value)

The list of Google Compute Engine zones in which the NodePool's nodes can be created by NAP.

repeated string autoprovisioning_locations = 5;

Parameter
NameDescription
valueByteString

The bytes of the autoprovisioningLocations to add.

Returns
TypeDescription
ClusterAutoscaling.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addResourceLimits(ResourceLimit value)

public ClusterAutoscaling.Builder addResourceLimits(ResourceLimit value)

Contains global constraints regarding minimum and maximum amount of resources in the cluster.

repeated .google.container.v1.ResourceLimit resource_limits = 2;

Parameter
NameDescription
valueResourceLimit
Returns
TypeDescription
ClusterAutoscaling.Builder

addResourceLimits(ResourceLimit.Builder builderForValue)

public ClusterAutoscaling.Builder addResourceLimits(ResourceLimit.Builder builderForValue)

Contains global constraints regarding minimum and maximum amount of resources in the cluster.

repeated .google.container.v1.ResourceLimit resource_limits = 2;

Parameter
NameDescription
builderForValueResourceLimit.Builder
Returns
TypeDescription
ClusterAutoscaling.Builder

addResourceLimits(int index, ResourceLimit value)

public ClusterAutoscaling.Builder addResourceLimits(int index, ResourceLimit value)

Contains global constraints regarding minimum and maximum amount of resources in the cluster.

repeated .google.container.v1.ResourceLimit resource_limits = 2;

Parameters
NameDescription
indexint
valueResourceLimit
Returns
TypeDescription
ClusterAutoscaling.Builder

addResourceLimits(int index, ResourceLimit.Builder builderForValue)

public ClusterAutoscaling.Builder addResourceLimits(int index, ResourceLimit.Builder builderForValue)

Contains global constraints regarding minimum and maximum amount of resources in the cluster.

repeated .google.container.v1.ResourceLimit resource_limits = 2;

Parameters
NameDescription
indexint
builderForValueResourceLimit.Builder
Returns
TypeDescription
ClusterAutoscaling.Builder

addResourceLimitsBuilder()

public ResourceLimit.Builder addResourceLimitsBuilder()

Contains global constraints regarding minimum and maximum amount of resources in the cluster.

repeated .google.container.v1.ResourceLimit resource_limits = 2;

Returns
TypeDescription
ResourceLimit.Builder

addResourceLimitsBuilder(int index)

public ResourceLimit.Builder addResourceLimitsBuilder(int index)

Contains global constraints regarding minimum and maximum amount of resources in the cluster.

repeated .google.container.v1.ResourceLimit resource_limits = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
ResourceLimit.Builder

build()

public ClusterAutoscaling build()
Returns
TypeDescription
ClusterAutoscaling

buildPartial()

public ClusterAutoscaling buildPartial()
Returns
TypeDescription
ClusterAutoscaling

clear()

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

clearAutoprovisioningLocations()

public ClusterAutoscaling.Builder clearAutoprovisioningLocations()

The list of Google Compute Engine zones in which the NodePool's nodes can be created by NAP.

repeated string autoprovisioning_locations = 5;

Returns
TypeDescription
ClusterAutoscaling.Builder

This builder for chaining.

clearAutoprovisioningNodePoolDefaults()

public ClusterAutoscaling.Builder clearAutoprovisioningNodePoolDefaults()

AutoprovisioningNodePoolDefaults contains defaults for a node pool created by NAP.

.google.container.v1.AutoprovisioningNodePoolDefaults autoprovisioning_node_pool_defaults = 4;

Returns
TypeDescription
ClusterAutoscaling.Builder

clearAutoscalingProfile()

public ClusterAutoscaling.Builder clearAutoscalingProfile()

Defines autoscaling behaviour.

.google.container.v1.ClusterAutoscaling.AutoscalingProfile autoscaling_profile = 3;

Returns
TypeDescription
ClusterAutoscaling.Builder

This builder for chaining.

clearEnableNodeAutoprovisioning()

public ClusterAutoscaling.Builder clearEnableNodeAutoprovisioning()

Enables automatic node pool creation and deletion.

bool enable_node_autoprovisioning = 1;

Returns
TypeDescription
ClusterAutoscaling.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearResourceLimits()

public ClusterAutoscaling.Builder clearResourceLimits()

Contains global constraints regarding minimum and maximum amount of resources in the cluster.

repeated .google.container.v1.ResourceLimit resource_limits = 2;

Returns
TypeDescription
ClusterAutoscaling.Builder

clone()

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

getAutoprovisioningLocations(int index)

public String getAutoprovisioningLocations(int index)

The list of Google Compute Engine zones in which the NodePool's nodes can be created by NAP.

repeated string autoprovisioning_locations = 5;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The autoprovisioningLocations at the given index.

getAutoprovisioningLocationsBytes(int index)

public ByteString getAutoprovisioningLocationsBytes(int index)

The list of Google Compute Engine zones in which the NodePool's nodes can be created by NAP.

repeated string autoprovisioning_locations = 5;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the autoprovisioningLocations at the given index.

getAutoprovisioningLocationsCount()

public int getAutoprovisioningLocationsCount()

The list of Google Compute Engine zones in which the NodePool's nodes can be created by NAP.

repeated string autoprovisioning_locations = 5;

Returns
TypeDescription
int

The count of autoprovisioningLocations.

getAutoprovisioningLocationsList()

public ProtocolStringList getAutoprovisioningLocationsList()

The list of Google Compute Engine zones in which the NodePool's nodes can be created by NAP.

repeated string autoprovisioning_locations = 5;

Returns
TypeDescription
ProtocolStringList

A list containing the autoprovisioningLocations.

getAutoprovisioningNodePoolDefaults()

public AutoprovisioningNodePoolDefaults getAutoprovisioningNodePoolDefaults()

AutoprovisioningNodePoolDefaults contains defaults for a node pool created by NAP.

.google.container.v1.AutoprovisioningNodePoolDefaults autoprovisioning_node_pool_defaults = 4;

Returns
TypeDescription
AutoprovisioningNodePoolDefaults

The autoprovisioningNodePoolDefaults.

getAutoprovisioningNodePoolDefaultsBuilder()

public AutoprovisioningNodePoolDefaults.Builder getAutoprovisioningNodePoolDefaultsBuilder()

AutoprovisioningNodePoolDefaults contains defaults for a node pool created by NAP.

.google.container.v1.AutoprovisioningNodePoolDefaults autoprovisioning_node_pool_defaults = 4;

Returns
TypeDescription
AutoprovisioningNodePoolDefaults.Builder

getAutoprovisioningNodePoolDefaultsOrBuilder()

public AutoprovisioningNodePoolDefaultsOrBuilder getAutoprovisioningNodePoolDefaultsOrBuilder()

AutoprovisioningNodePoolDefaults contains defaults for a node pool created by NAP.

.google.container.v1.AutoprovisioningNodePoolDefaults autoprovisioning_node_pool_defaults = 4;

Returns
TypeDescription
AutoprovisioningNodePoolDefaultsOrBuilder

getAutoscalingProfile()

public ClusterAutoscaling.AutoscalingProfile getAutoscalingProfile()

Defines autoscaling behaviour.

.google.container.v1.ClusterAutoscaling.AutoscalingProfile autoscaling_profile = 3;

Returns
TypeDescription
ClusterAutoscaling.AutoscalingProfile

The autoscalingProfile.

getAutoscalingProfileValue()

public int getAutoscalingProfileValue()

Defines autoscaling behaviour.

.google.container.v1.ClusterAutoscaling.AutoscalingProfile autoscaling_profile = 3;

Returns
TypeDescription
int

The enum numeric value on the wire for autoscalingProfile.

getDefaultInstanceForType()

public ClusterAutoscaling getDefaultInstanceForType()
Returns
TypeDescription
ClusterAutoscaling

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getEnableNodeAutoprovisioning()

public boolean getEnableNodeAutoprovisioning()

Enables automatic node pool creation and deletion.

bool enable_node_autoprovisioning = 1;

Returns
TypeDescription
boolean

The enableNodeAutoprovisioning.

getResourceLimits(int index)

public ResourceLimit getResourceLimits(int index)

Contains global constraints regarding minimum and maximum amount of resources in the cluster.

repeated .google.container.v1.ResourceLimit resource_limits = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
ResourceLimit

getResourceLimitsBuilder(int index)

public ResourceLimit.Builder getResourceLimitsBuilder(int index)

Contains global constraints regarding minimum and maximum amount of resources in the cluster.

repeated .google.container.v1.ResourceLimit resource_limits = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
ResourceLimit.Builder

getResourceLimitsBuilderList()

public List<ResourceLimit.Builder> getResourceLimitsBuilderList()

Contains global constraints regarding minimum and maximum amount of resources in the cluster.

repeated .google.container.v1.ResourceLimit resource_limits = 2;

Returns
TypeDescription
List<Builder>

getResourceLimitsCount()

public int getResourceLimitsCount()

Contains global constraints regarding minimum and maximum amount of resources in the cluster.

repeated .google.container.v1.ResourceLimit resource_limits = 2;

Returns
TypeDescription
int

getResourceLimitsList()

public List<ResourceLimit> getResourceLimitsList()

Contains global constraints regarding minimum and maximum amount of resources in the cluster.

repeated .google.container.v1.ResourceLimit resource_limits = 2;

Returns
TypeDescription
List<ResourceLimit>

getResourceLimitsOrBuilder(int index)

public ResourceLimitOrBuilder getResourceLimitsOrBuilder(int index)

Contains global constraints regarding minimum and maximum amount of resources in the cluster.

repeated .google.container.v1.ResourceLimit resource_limits = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
ResourceLimitOrBuilder

getResourceLimitsOrBuilderList()

public List<? extends ResourceLimitOrBuilder> getResourceLimitsOrBuilderList()

Contains global constraints regarding minimum and maximum amount of resources in the cluster.

repeated .google.container.v1.ResourceLimit resource_limits = 2;

Returns
TypeDescription
List<? extends com.google.container.v1.ResourceLimitOrBuilder>

hasAutoprovisioningNodePoolDefaults()

public boolean hasAutoprovisioningNodePoolDefaults()

AutoprovisioningNodePoolDefaults contains defaults for a node pool created by NAP.

.google.container.v1.AutoprovisioningNodePoolDefaults autoprovisioning_node_pool_defaults = 4;

Returns
TypeDescription
boolean

Whether the autoprovisioningNodePoolDefaults field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeAutoprovisioningNodePoolDefaults(AutoprovisioningNodePoolDefaults value)

public ClusterAutoscaling.Builder mergeAutoprovisioningNodePoolDefaults(AutoprovisioningNodePoolDefaults value)

AutoprovisioningNodePoolDefaults contains defaults for a node pool created by NAP.

.google.container.v1.AutoprovisioningNodePoolDefaults autoprovisioning_node_pool_defaults = 4;

Parameter
NameDescription
valueAutoprovisioningNodePoolDefaults
Returns
TypeDescription
ClusterAutoscaling.Builder

mergeFrom(ClusterAutoscaling other)

public ClusterAutoscaling.Builder mergeFrom(ClusterAutoscaling other)
Parameter
NameDescription
otherClusterAutoscaling
Returns
TypeDescription
ClusterAutoscaling.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeResourceLimits(int index)

public ClusterAutoscaling.Builder removeResourceLimits(int index)

Contains global constraints regarding minimum and maximum amount of resources in the cluster.

repeated .google.container.v1.ResourceLimit resource_limits = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
ClusterAutoscaling.Builder

setAutoprovisioningLocations(int index, String value)

public ClusterAutoscaling.Builder setAutoprovisioningLocations(int index, String value)

The list of Google Compute Engine zones in which the NodePool's nodes can be created by NAP.

repeated string autoprovisioning_locations = 5;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The autoprovisioningLocations to set.

Returns
TypeDescription
ClusterAutoscaling.Builder

This builder for chaining.

setAutoprovisioningNodePoolDefaults(AutoprovisioningNodePoolDefaults value)

public ClusterAutoscaling.Builder setAutoprovisioningNodePoolDefaults(AutoprovisioningNodePoolDefaults value)

AutoprovisioningNodePoolDefaults contains defaults for a node pool created by NAP.

.google.container.v1.AutoprovisioningNodePoolDefaults autoprovisioning_node_pool_defaults = 4;

Parameter
NameDescription
valueAutoprovisioningNodePoolDefaults
Returns
TypeDescription
ClusterAutoscaling.Builder

setAutoprovisioningNodePoolDefaults(AutoprovisioningNodePoolDefaults.Builder builderForValue)

public ClusterAutoscaling.Builder setAutoprovisioningNodePoolDefaults(AutoprovisioningNodePoolDefaults.Builder builderForValue)

AutoprovisioningNodePoolDefaults contains defaults for a node pool created by NAP.

.google.container.v1.AutoprovisioningNodePoolDefaults autoprovisioning_node_pool_defaults = 4;

Parameter
NameDescription
builderForValueAutoprovisioningNodePoolDefaults.Builder
Returns
TypeDescription
ClusterAutoscaling.Builder

setAutoscalingProfile(ClusterAutoscaling.AutoscalingProfile value)

public ClusterAutoscaling.Builder setAutoscalingProfile(ClusterAutoscaling.AutoscalingProfile value)

Defines autoscaling behaviour.

.google.container.v1.ClusterAutoscaling.AutoscalingProfile autoscaling_profile = 3;

Parameter
NameDescription
valueClusterAutoscaling.AutoscalingProfile

The autoscalingProfile to set.

Returns
TypeDescription
ClusterAutoscaling.Builder

This builder for chaining.

setAutoscalingProfileValue(int value)

public ClusterAutoscaling.Builder setAutoscalingProfileValue(int value)

Defines autoscaling behaviour.

.google.container.v1.ClusterAutoscaling.AutoscalingProfile autoscaling_profile = 3;

Parameter
NameDescription
valueint

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

Returns
TypeDescription
ClusterAutoscaling.Builder

This builder for chaining.

setEnableNodeAutoprovisioning(boolean value)

public ClusterAutoscaling.Builder setEnableNodeAutoprovisioning(boolean value)

Enables automatic node pool creation and deletion.

bool enable_node_autoprovisioning = 1;

Parameter
NameDescription
valueboolean

The enableNodeAutoprovisioning to set.

Returns
TypeDescription
ClusterAutoscaling.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setResourceLimits(int index, ResourceLimit value)

public ClusterAutoscaling.Builder setResourceLimits(int index, ResourceLimit value)

Contains global constraints regarding minimum and maximum amount of resources in the cluster.

repeated .google.container.v1.ResourceLimit resource_limits = 2;

Parameters
NameDescription
indexint
valueResourceLimit
Returns
TypeDescription
ClusterAutoscaling.Builder

setResourceLimits(int index, ResourceLimit.Builder builderForValue)

public ClusterAutoscaling.Builder setResourceLimits(int index, ResourceLimit.Builder builderForValue)

Contains global constraints regarding minimum and maximum amount of resources in the cluster.

repeated .google.container.v1.ResourceLimit resource_limits = 2;

Parameters
NameDescription
indexint
builderForValueResourceLimit.Builder
Returns
TypeDescription
ClusterAutoscaling.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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