public static final class AutoscalingPolicy.Builder extends GeneratedMessageV3.Builder<AutoscalingPolicy.Builder> implements AutoscalingPolicyOrBuilder
Describes an autoscaling policy for Dataproc cluster autoscaler.Protobuf type
google.cloud.dataproc.v1.AutoscalingPolicy
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
mergeDelimitedFrom, mergeDelimitedFrom
mergeFrom
public static final Descriptors.Descriptor getDescriptor()
protected MapField internalGetMapField(int number)
internalGetMapField
in class GeneratedMessageV3.Builder<AutoscalingPolicy.Builder>
protected MapField internalGetMutableMapField(int number)
internalGetMutableMapField
in class GeneratedMessageV3.Builder<AutoscalingPolicy.Builder>
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3.Builder<AutoscalingPolicy.Builder>
public AutoscalingPolicy.Builder clear()
clear
in interface Message.Builder
clear
in interface MessageLite.Builder
clear
in class GeneratedMessageV3.Builder<AutoscalingPolicy.Builder>
public Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface Message.Builder
getDescriptorForType
in interface MessageOrBuilder
getDescriptorForType
in class GeneratedMessageV3.Builder<AutoscalingPolicy.Builder>
public AutoscalingPolicy getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
public AutoscalingPolicy build()
build
in interface Message.Builder
build
in interface MessageLite.Builder
public AutoscalingPolicy buildPartial()
buildPartial
in interface Message.Builder
buildPartial
in interface MessageLite.Builder
public AutoscalingPolicy.Builder clone()
clone
in interface Message.Builder
clone
in interface MessageLite.Builder
clone
in class GeneratedMessageV3.Builder<AutoscalingPolicy.Builder>
public AutoscalingPolicy.Builder setField(Descriptors.FieldDescriptor field, Object value)
setField
in interface Message.Builder
setField
in class GeneratedMessageV3.Builder<AutoscalingPolicy.Builder>
public AutoscalingPolicy.Builder clearField(Descriptors.FieldDescriptor field)
clearField
in interface Message.Builder
clearField
in class GeneratedMessageV3.Builder<AutoscalingPolicy.Builder>
public AutoscalingPolicy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
clearOneof
in interface Message.Builder
clearOneof
in class GeneratedMessageV3.Builder<AutoscalingPolicy.Builder>
public AutoscalingPolicy.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField
in interface Message.Builder
setRepeatedField
in class GeneratedMessageV3.Builder<AutoscalingPolicy.Builder>
public AutoscalingPolicy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
addRepeatedField
in interface Message.Builder
addRepeatedField
in class GeneratedMessageV3.Builder<AutoscalingPolicy.Builder>
public AutoscalingPolicy.Builder mergeFrom(Message other)
mergeFrom
in interface Message.Builder
mergeFrom
in class AbstractMessage.Builder<AutoscalingPolicy.Builder>
public AutoscalingPolicy.Builder mergeFrom(AutoscalingPolicy other)
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3.Builder<AutoscalingPolicy.Builder>
public AutoscalingPolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom
in interface Message.Builder
mergeFrom
in interface MessageLite.Builder
mergeFrom
in class AbstractMessage.Builder<AutoscalingPolicy.Builder>
IOException
public AutoscalingPolicy.AlgorithmCase getAlgorithmCase()
getAlgorithmCase
in interface AutoscalingPolicyOrBuilder
public AutoscalingPolicy.Builder clearAlgorithm()
public String getId()
Required. The policy id. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 and 50 characters.
string id = 1;
getId
in interface AutoscalingPolicyOrBuilder
public ByteString getIdBytes()
Required. The policy id. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 and 50 characters.
string id = 1;
getIdBytes
in interface AutoscalingPolicyOrBuilder
public AutoscalingPolicy.Builder setId(String value)
Required. The policy id. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 and 50 characters.
string id = 1;
value
- The id to set.public AutoscalingPolicy.Builder clearId()
Required. The policy id. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 and 50 characters.
string id = 1;
public AutoscalingPolicy.Builder setIdBytes(ByteString value)
Required. The policy id. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 and 50 characters.
string id = 1;
value
- The bytes for id to set.public String getName()
Output only. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names. * For `projects.regions.autoscalingPolicies`, the resource name of the policy has the following format: `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` * For `projects.locations.autoscalingPolicies`, the resource name of the policy has the following format: `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getName
in interface AutoscalingPolicyOrBuilder
public ByteString getNameBytes()
Output only. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names. * For `projects.regions.autoscalingPolicies`, the resource name of the policy has the following format: `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` * For `projects.locations.autoscalingPolicies`, the resource name of the policy has the following format: `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getNameBytes
in interface AutoscalingPolicyOrBuilder
public AutoscalingPolicy.Builder setName(String value)
Output only. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names. * For `projects.regions.autoscalingPolicies`, the resource name of the policy has the following format: `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` * For `projects.locations.autoscalingPolicies`, the resource name of the policy has the following format: `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
value
- The name to set.public AutoscalingPolicy.Builder clearName()
Output only. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names. * For `projects.regions.autoscalingPolicies`, the resource name of the policy has the following format: `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` * For `projects.locations.autoscalingPolicies`, the resource name of the policy has the following format: `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
public AutoscalingPolicy.Builder setNameBytes(ByteString value)
Output only. The "resource name" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names. * For `projects.regions.autoscalingPolicies`, the resource name of the policy has the following format: `projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}` * For `projects.locations.autoscalingPolicies`, the resource name of the policy has the following format: `projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}`
string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
value
- The bytes for name to set.public boolean hasBasicAlgorithm()
.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm basic_algorithm = 3 [(.google.api.field_behavior) = REQUIRED];
hasBasicAlgorithm
in interface AutoscalingPolicyOrBuilder
public BasicAutoscalingAlgorithm getBasicAlgorithm()
.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm basic_algorithm = 3 [(.google.api.field_behavior) = REQUIRED];
getBasicAlgorithm
in interface AutoscalingPolicyOrBuilder
public AutoscalingPolicy.Builder setBasicAlgorithm(BasicAutoscalingAlgorithm value)
.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm basic_algorithm = 3 [(.google.api.field_behavior) = REQUIRED];
public AutoscalingPolicy.Builder setBasicAlgorithm(BasicAutoscalingAlgorithm.Builder builderForValue)
.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm basic_algorithm = 3 [(.google.api.field_behavior) = REQUIRED];
public AutoscalingPolicy.Builder mergeBasicAlgorithm(BasicAutoscalingAlgorithm value)
.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm basic_algorithm = 3 [(.google.api.field_behavior) = REQUIRED];
public AutoscalingPolicy.Builder clearBasicAlgorithm()
.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm basic_algorithm = 3 [(.google.api.field_behavior) = REQUIRED];
public BasicAutoscalingAlgorithm.Builder getBasicAlgorithmBuilder()
.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm basic_algorithm = 3 [(.google.api.field_behavior) = REQUIRED];
public BasicAutoscalingAlgorithmOrBuilder getBasicAlgorithmOrBuilder()
.google.cloud.dataproc.v1.BasicAutoscalingAlgorithm basic_algorithm = 3 [(.google.api.field_behavior) = REQUIRED];
getBasicAlgorithmOrBuilder
in interface AutoscalingPolicyOrBuilder
public boolean hasWorkerConfig()
Required. Describes how the autoscaler will operate for primary workers.
.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED];
hasWorkerConfig
in interface AutoscalingPolicyOrBuilder
public InstanceGroupAutoscalingPolicyConfig getWorkerConfig()
Required. Describes how the autoscaler will operate for primary workers.
.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED];
getWorkerConfig
in interface AutoscalingPolicyOrBuilder
public AutoscalingPolicy.Builder setWorkerConfig(InstanceGroupAutoscalingPolicyConfig value)
Required. Describes how the autoscaler will operate for primary workers.
.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED];
public AutoscalingPolicy.Builder setWorkerConfig(InstanceGroupAutoscalingPolicyConfig.Builder builderForValue)
Required. Describes how the autoscaler will operate for primary workers.
.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED];
public AutoscalingPolicy.Builder mergeWorkerConfig(InstanceGroupAutoscalingPolicyConfig value)
Required. Describes how the autoscaler will operate for primary workers.
.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED];
public AutoscalingPolicy.Builder clearWorkerConfig()
Required. Describes how the autoscaler will operate for primary workers.
.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED];
public InstanceGroupAutoscalingPolicyConfig.Builder getWorkerConfigBuilder()
Required. Describes how the autoscaler will operate for primary workers.
.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED];
public InstanceGroupAutoscalingPolicyConfigOrBuilder getWorkerConfigOrBuilder()
Required. Describes how the autoscaler will operate for primary workers.
.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig worker_config = 4 [(.google.api.field_behavior) = REQUIRED];
getWorkerConfigOrBuilder
in interface AutoscalingPolicyOrBuilder
public boolean hasSecondaryWorkerConfig()
Optional. Describes how the autoscaler will operate for secondary workers.
.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL];
hasSecondaryWorkerConfig
in interface AutoscalingPolicyOrBuilder
public InstanceGroupAutoscalingPolicyConfig getSecondaryWorkerConfig()
Optional. Describes how the autoscaler will operate for secondary workers.
.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL];
getSecondaryWorkerConfig
in interface AutoscalingPolicyOrBuilder
public AutoscalingPolicy.Builder setSecondaryWorkerConfig(InstanceGroupAutoscalingPolicyConfig value)
Optional. Describes how the autoscaler will operate for secondary workers.
.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL];
public AutoscalingPolicy.Builder setSecondaryWorkerConfig(InstanceGroupAutoscalingPolicyConfig.Builder builderForValue)
Optional. Describes how the autoscaler will operate for secondary workers.
.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL];
public AutoscalingPolicy.Builder mergeSecondaryWorkerConfig(InstanceGroupAutoscalingPolicyConfig value)
Optional. Describes how the autoscaler will operate for secondary workers.
.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL];
public AutoscalingPolicy.Builder clearSecondaryWorkerConfig()
Optional. Describes how the autoscaler will operate for secondary workers.
.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL];
public InstanceGroupAutoscalingPolicyConfig.Builder getSecondaryWorkerConfigBuilder()
Optional. Describes how the autoscaler will operate for secondary workers.
.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL];
public InstanceGroupAutoscalingPolicyConfigOrBuilder getSecondaryWorkerConfigOrBuilder()
Optional. Describes how the autoscaler will operate for secondary workers.
.google.cloud.dataproc.v1.InstanceGroupAutoscalingPolicyConfig secondary_worker_config = 5 [(.google.api.field_behavior) = OPTIONAL];
getSecondaryWorkerConfigOrBuilder
in interface AutoscalingPolicyOrBuilder
public int getLabelsCount()
AutoscalingPolicyOrBuilder
Optional. The labels to associate with this autoscaling policy. Label **keys** must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). Label **values** may be empty, but, if present, must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with an autoscaling policy.
map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
getLabelsCount
in interface AutoscalingPolicyOrBuilder
public boolean containsLabels(String key)
Optional. The labels to associate with this autoscaling policy. Label **keys** must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). Label **values** may be empty, but, if present, must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with an autoscaling policy.
map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
containsLabels
in interface AutoscalingPolicyOrBuilder
@Deprecated public Map<String,String> getLabels()
getLabelsMap()
instead.getLabels
in interface AutoscalingPolicyOrBuilder
public Map<String,String> getLabelsMap()
Optional. The labels to associate with this autoscaling policy. Label **keys** must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). Label **values** may be empty, but, if present, must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with an autoscaling policy.
map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
getLabelsMap
in interface AutoscalingPolicyOrBuilder
public String getLabelsOrDefault(String key, String defaultValue)
Optional. The labels to associate with this autoscaling policy. Label **keys** must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). Label **values** may be empty, but, if present, must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with an autoscaling policy.
map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
getLabelsOrDefault
in interface AutoscalingPolicyOrBuilder
public String getLabelsOrThrow(String key)
Optional. The labels to associate with this autoscaling policy. Label **keys** must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). Label **values** may be empty, but, if present, must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with an autoscaling policy.
map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
getLabelsOrThrow
in interface AutoscalingPolicyOrBuilder
public AutoscalingPolicy.Builder clearLabels()
public AutoscalingPolicy.Builder removeLabels(String key)
Optional. The labels to associate with this autoscaling policy. Label **keys** must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). Label **values** may be empty, but, if present, must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with an autoscaling policy.
map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
@Deprecated public Map<String,String> getMutableLabels()
public AutoscalingPolicy.Builder putLabels(String key, String value)
Optional. The labels to associate with this autoscaling policy. Label **keys** must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). Label **values** may be empty, but, if present, must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with an autoscaling policy.
map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
public AutoscalingPolicy.Builder putAllLabels(Map<String,String> values)
Optional. The labels to associate with this autoscaling policy. Label **keys** must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). Label **values** may be empty, but, if present, must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with an autoscaling policy.
map<string, string> labels = 6 [(.google.api.field_behavior) = OPTIONAL];
public final AutoscalingPolicy.Builder setUnknownFields(UnknownFieldSet unknownFields)
setUnknownFields
in interface Message.Builder
setUnknownFields
in class GeneratedMessageV3.Builder<AutoscalingPolicy.Builder>
public final AutoscalingPolicy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
mergeUnknownFields
in interface Message.Builder
mergeUnknownFields
in class GeneratedMessageV3.Builder<AutoscalingPolicy.Builder>
Copyright © 2022 Google LLC. All rights reserved.