Class ClusterSelector.Builder (3.0.3) 
  
  
  
   
  
    
  
  
    
    
    
    
  Version 3.0.3keyboard_arrow_down  
  
 
    
    
    
    
      
  
  
  
    
public   static   final   class  ClusterSelector . Builder   extends   GeneratedMessageV3 . Builder<ClusterSelector . Builder >  implements   ClusterSelectorOrBuilder  
   A selector that chooses target cluster for jobs based on metadata.
 Protobuf type google.cloud.dataproc.v1.ClusterSelector
Static Methods
   
  getDescriptor() 
  
    
public   static   final   Descriptors . Descriptor   getDescriptor ()  
  Returns 
  
  Methods
   
  addRepeatedField(Descriptors.FieldDescriptor field, Object value) 
  
    
public   ClusterSelector . Builder   addRepeatedField ( Descriptors . FieldDescriptor   field ,   Object   value )  
  Parameters 
  
  Returns 
  
  Overrides 
  
  build() 
  
    
public   ClusterSelector   build ()  
  Returns 
  
  buildPartial() 
  
    
public   ClusterSelector   buildPartial ()  
  Returns 
  
  clear() 
  
    
public   ClusterSelector . Builder   clear ()  
  Returns 
  
  Overrides 
  
  clearClusterLabels() 
  
    
public   ClusterSelector . Builder   clearClusterLabels ()  
  Returns 
  
  clearField(Descriptors.FieldDescriptor field) 
  
    
public   ClusterSelector . Builder   clearField ( Descriptors . FieldDescriptor   field )  
  Parameter 
  
  Returns 
  
  Overrides 
  
  clearOneof(Descriptors.OneofDescriptor oneof) 
  
    
public   ClusterSelector . Builder   clearOneof ( Descriptors . OneofDescriptor   oneof )  
  Parameter 
  
  Returns 
  
  Overrides 
  
  clearZone() 
  
    
public   ClusterSelector . Builder   clearZone ()  
   Optional. The zone where workflow process executes. This parameter does not
 affect the selection of the cluster.
 If unspecified, the zone of the first cluster matching the selector
 is used.
 string zone = 1 [(.google.api.field_behavior) = OPTIONAL];
Returns 
  
  clone() 
  
    
public   ClusterSelector . Builder   clone ()  
  Returns 
  
  Overrides 
  
  containsClusterLabels(String key) 
  
    
public   boolean   containsClusterLabels ( String   key )  
   Required. The cluster labels. Cluster must have all labels
 to match.
 map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED];
 
Parameter 
  
  Returns 
  
  getClusterLabels() 
  
    
public   Map<String , String >  getClusterLabels ()  
  
  Returns 
  
  getClusterLabelsCount() 
  
    
public   int   getClusterLabelsCount ()  
   Required. The cluster labels. Cluster must have all labels
 to match.
 map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED];
 
Returns 
  
  getClusterLabelsMap() 
  
    
public   Map<String , String >  getClusterLabelsMap ()  
   Required. The cluster labels. Cluster must have all labels
 to match.
 map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED];
 
Returns 
  
  getClusterLabelsOrDefault(String key, String defaultValue) 
  
    
public   String   getClusterLabelsOrDefault ( String   key ,   String   defaultValue )  
   Required. The cluster labels. Cluster must have all labels
 to match.
 map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED];
 
Parameters 
  
  Returns 
  
  getClusterLabelsOrThrow(String key) 
  
    
public   String   getClusterLabelsOrThrow ( String   key )  
   Required. The cluster labels. Cluster must have all labels
 to match.
 map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED];
 
Parameter 
  
  Returns 
  
  getDefaultInstanceForType() 
  
    
public   ClusterSelector   getDefaultInstanceForType ()  
  Returns 
  
  getDescriptorForType() 
  
    
public   Descriptors . Descriptor   getDescriptorForType ()  
  Returns 
  
  Overrides 
  
  getMutableClusterLabels() 
  
    
public   Map<String , String >  getMutableClusterLabels ()  
  Use alternate mutation accessors instead.
Returns 
  
  getZone() 
  
   Optional. The zone where workflow process executes. This parameter does not
 affect the selection of the cluster.
 If unspecified, the zone of the first cluster matching the selector
 is used.
 string zone = 1 [(.google.api.field_behavior) = OPTIONAL];
Returns 
  
    
      
        Type Description  
      
        String The zone.
 
     
  
  getZoneBytes() 
  
    
public   ByteString   getZoneBytes ()  
   Optional. The zone where workflow process executes. This parameter does not
 affect the selection of the cluster.
 If unspecified, the zone of the first cluster matching the selector
 is used.
 string zone = 1 [(.google.api.field_behavior) = OPTIONAL];
Returns 
  
  internalGetFieldAccessorTable() 
  
    
protected   GeneratedMessageV3 . FieldAccessorTable   internalGetFieldAccessorTable ()  
  Returns 
  
  Overrides 
  
  internalGetMapField(int number) 
  
    
protected   MapField   internalGetMapField ( int   number )  
  Parameter 
  
    
      
        Name Description  
      
        number int  
     
  
  Returns 
  
  Overrides 
  
  internalGetMutableMapField(int number) 
  
    
protected   MapField   internalGetMutableMapField ( int   number )  
  Parameter 
  
    
      
        Name Description  
      
        number int  
     
  
  Returns 
  
  Overrides 
  
  isInitialized() 
  
    
public   final   boolean   isInitialized ()  
  Returns 
  
  Overrides 
  
  mergeFrom(ClusterSelector other) 
  
    
public   ClusterSelector . Builder   mergeFrom ( ClusterSelector   other )  
  Parameter 
  
  Returns 
  
  
    
public   ClusterSelector . Builder   mergeFrom ( CodedInputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  Parameters 
  
  Returns 
  
  Overrides 
  
  Exceptions 
  
  mergeFrom(Message other) 
  
    
public   ClusterSelector . Builder   mergeFrom ( Message   other )  
  Parameter 
  
  Returns 
  
  Overrides 
  
  mergeUnknownFields(UnknownFieldSet unknownFields) 
  
    
public   final   ClusterSelector . Builder   mergeUnknownFields ( UnknownFieldSet   unknownFields )  
  Parameter 
  
  Returns 
  
  Overrides 
  
  putAllClusterLabels(Map<String,String> values) 
  
    
public   ClusterSelector . Builder   putAllClusterLabels ( Map<String , String >  values )  
   Required. The cluster labels. Cluster must have all labels
 to match.
 map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED];
 
Parameter 
  
  Returns 
  
  putClusterLabels(String key, String value) 
  
    
public   ClusterSelector . Builder   putClusterLabels ( String   key ,   String   value )  
   Required. The cluster labels. Cluster must have all labels
 to match.
 map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED];
 
Parameters 
  
  Returns 
  
  removeClusterLabels(String key) 
  
    
public   ClusterSelector . Builder   removeClusterLabels ( String   key )  
   Required. The cluster labels. Cluster must have all labels
 to match.
 map<string, string> cluster_labels = 2 [(.google.api.field_behavior) = REQUIRED];
 
Parameter 
  
  Returns 
  
  setField(Descriptors.FieldDescriptor field, Object value) 
  
    
public   ClusterSelector . Builder   setField ( Descriptors . FieldDescriptor   field ,   Object   value )  
  Parameters 
  
  Returns 
  
  Overrides 
  
  setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value) 
  
    
public   ClusterSelector . Builder   setRepeatedField ( Descriptors . FieldDescriptor   field ,   int   index ,   Object   value )  
  Parameters 
  
  Returns 
  
  Overrides 
  
  setUnknownFields(UnknownFieldSet unknownFields) 
  
    
public   final   ClusterSelector . Builder   setUnknownFields ( UnknownFieldSet   unknownFields )  
  Parameter 
  
  Returns 
  
  Overrides 
  
  setZone(String value) 
  
    
public   ClusterSelector . Builder   setZone ( String   value )  
   Optional. The zone where workflow process executes. This parameter does not
 affect the selection of the cluster.
 If unspecified, the zone of the first cluster matching the selector
 is used.
 string zone = 1 [(.google.api.field_behavior) = OPTIONAL];
Parameter 
  
    
      
        Name Description  
      
        value String The zone to set.
 
     
  
  Returns 
  
  setZoneBytes(ByteString value) 
  
    
public   ClusterSelector . Builder   setZoneBytes ( ByteString   value )  
   Optional. The zone where workflow process executes. This parameter does not
 affect the selection of the cluster.
 If unspecified, the zone of the first cluster matching the selector
 is used.
 string zone = 1 [(.google.api.field_behavior) = OPTIONAL];
Parameter 
  
    
      
        Name Description  
      
        value ByteString The bytes for zone to set.
 
     
  
  Returns 
  
 
     
    
  
  
  
     
  
    
    
      
       
    
    
  
  
 
  Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
  Last updated 2025-10-28 UTC.
 
 
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-28 UTC."],[],[]]