Class ServiceScaling.Builder (0.83.0)

public static final class ServiceScaling.Builder extends GeneratedMessage.Builder<ServiceScaling.Builder> implements ServiceScalingOrBuilder

Scaling settings applied at the service level rather than at the revision level.

Protobuf type google.cloud.run.v2.ServiceScaling

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

build()

public ServiceScaling build()
Returns
Type Description
ServiceScaling

buildPartial()

public ServiceScaling buildPartial()
Returns
Type Description
ServiceScaling

clear()

public ServiceScaling.Builder clear()
Returns
Type Description
ServiceScaling.Builder
Overrides

clearManualInstanceCount()

public ServiceScaling.Builder clearManualInstanceCount()

Optional. total instance count for the service in manual scaling mode. This number of instances is divided among all revisions with specified traffic based on the percent of traffic they are receiving.

optional int32 manual_instance_count = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ServiceScaling.Builder

This builder for chaining.

clearMaxInstanceCount()

public ServiceScaling.Builder clearMaxInstanceCount()

Optional. total max instances for the service. This number of instances is divided among all revisions with specified traffic based on the percent of traffic they are receiving.

int32 max_instance_count = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ServiceScaling.Builder

This builder for chaining.

clearMinInstanceCount()

public ServiceScaling.Builder clearMinInstanceCount()

Optional. total min instances for the service. This number of instances is divided among all revisions with specified traffic based on the percent of traffic they are receiving.

int32 min_instance_count = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ServiceScaling.Builder

This builder for chaining.

clearScalingMode()

public ServiceScaling.Builder clearScalingMode()

Optional. The scaling mode for the service.

.google.cloud.run.v2.ServiceScaling.ScalingMode scaling_mode = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ServiceScaling.Builder

This builder for chaining.

getDefaultInstanceForType()

public ServiceScaling getDefaultInstanceForType()
Returns
Type Description
ServiceScaling

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getManualInstanceCount()

public int getManualInstanceCount()

Optional. total instance count for the service in manual scaling mode. This number of instances is divided among all revisions with specified traffic based on the percent of traffic they are receiving.

optional int32 manual_instance_count = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The manualInstanceCount.

getMaxInstanceCount()

public int getMaxInstanceCount()

Optional. total max instances for the service. This number of instances is divided among all revisions with specified traffic based on the percent of traffic they are receiving.

int32 max_instance_count = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The maxInstanceCount.

getMinInstanceCount()

public int getMinInstanceCount()

Optional. total min instances for the service. This number of instances is divided among all revisions with specified traffic based on the percent of traffic they are receiving.

int32 min_instance_count = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The minInstanceCount.

getScalingMode()

public ServiceScaling.ScalingMode getScalingMode()

Optional. The scaling mode for the service.

.google.cloud.run.v2.ServiceScaling.ScalingMode scaling_mode = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ServiceScaling.ScalingMode

The scalingMode.

getScalingModeValue()

public int getScalingModeValue()

Optional. The scaling mode for the service.

.google.cloud.run.v2.ServiceScaling.ScalingMode scaling_mode = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for scalingMode.

hasManualInstanceCount()

public boolean hasManualInstanceCount()

Optional. total instance count for the service in manual scaling mode. This number of instances is divided among all revisions with specified traffic based on the percent of traffic they are receiving.

optional int32 manual_instance_count = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the manualInstanceCount field is set.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ServiceScaling other)

public ServiceScaling.Builder mergeFrom(ServiceScaling other)
Parameter
Name Description
other ServiceScaling
Returns
Type Description
ServiceScaling.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ServiceScaling.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ServiceScaling.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public ServiceScaling.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
ServiceScaling.Builder
Overrides

setManualInstanceCount(int value)

public ServiceScaling.Builder setManualInstanceCount(int value)

Optional. total instance count for the service in manual scaling mode. This number of instances is divided among all revisions with specified traffic based on the percent of traffic they are receiving.

optional int32 manual_instance_count = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The manualInstanceCount to set.

Returns
Type Description
ServiceScaling.Builder

This builder for chaining.

setMaxInstanceCount(int value)

public ServiceScaling.Builder setMaxInstanceCount(int value)

Optional. total max instances for the service. This number of instances is divided among all revisions with specified traffic based on the percent of traffic they are receiving.

int32 max_instance_count = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The maxInstanceCount to set.

Returns
Type Description
ServiceScaling.Builder

This builder for chaining.

setMinInstanceCount(int value)

public ServiceScaling.Builder setMinInstanceCount(int value)

Optional. total min instances for the service. This number of instances is divided among all revisions with specified traffic based on the percent of traffic they are receiving.

int32 min_instance_count = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The minInstanceCount to set.

Returns
Type Description
ServiceScaling.Builder

This builder for chaining.

setScalingMode(ServiceScaling.ScalingMode value)

public ServiceScaling.Builder setScalingMode(ServiceScaling.ScalingMode value)

Optional. The scaling mode for the service.

.google.cloud.run.v2.ServiceScaling.ScalingMode scaling_mode = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ServiceScaling.ScalingMode

The scalingMode to set.

Returns
Type Description
ServiceScaling.Builder

This builder for chaining.

setScalingModeValue(int value)

public ServiceScaling.Builder setScalingModeValue(int value)

Optional. The scaling mode for the service.

.google.cloud.run.v2.ServiceScaling.ScalingMode scaling_mode = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

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

Returns
Type Description
ServiceScaling.Builder

This builder for chaining.