Class LocationPolicyLocation.Builder (1.11.0) 
  
      
     
  
  
  
   
  
    
  
  
    
    
    
  Version 1.11.0keyboard_arrow_down  
  
 
    
    
    
    
      
  
  
  
    
public   static   final   class  LocationPolicyLocation . Builder   extends   GeneratedMessageV3 . Builder<LocationPolicyLocation . Builder >  implements   LocationPolicyLocationOrBuilder  
   
   Protobuf type google.cloud.compute.v1.LocationPolicyLocation
 
  
  
  
  Static Methods
   
   
  getDescriptor() 
  
    
public   static   final   Descriptors . Descriptor   getDescriptor ()  
   
  Returns 
  
  Methods
   
   
  addRepeatedField(Descriptors.FieldDescriptor field, Object value) 
  
    
public   LocationPolicyLocation . Builder   addRepeatedField ( Descriptors . FieldDescriptor   field ,   Object   value )  
   
  Parameters 
  
  Returns 
  
  Overrides 
  
   
  build() 
  
    
public   LocationPolicyLocation   build ()  
   
  Returns 
  
   
  buildPartial() 
  
    
public   LocationPolicyLocation   buildPartial ()  
   
  Returns 
  
   
  clear() 
  
    
public   LocationPolicyLocation . Builder   clear ()  
   
  Returns 
  
  Overrides 
  
   
  clearField(Descriptors.FieldDescriptor field) 
  
    
public   LocationPolicyLocation . Builder   clearField ( Descriptors . FieldDescriptor   field )  
   
  Parameter 
  
  Returns 
  
  Overrides 
  
   
  clearOneof(Descriptors.OneofDescriptor oneof) 
  
    
public   LocationPolicyLocation . Builder   clearOneof ( Descriptors . OneofDescriptor   oneof )  
   
  Parameter 
  
  Returns 
  
  Overrides 
  
   
  clearPreference() 
  
    
public   LocationPolicyLocation . Builder   clearPreference ()  
   
   Preference for a given location.
 Check the Preference enum for the list of possible values.
 optional string preference = 150781147;
 
  Returns 
  
   
  clone() 
  
    
public   LocationPolicyLocation . Builder   clone ()  
   
  Returns 
  
  Overrides 
  
   
  getDefaultInstanceForType() 
  
    
public   LocationPolicyLocation   getDefaultInstanceForType ()  
   
  Returns 
  
   
  getDescriptorForType() 
  
    
public   Descriptors . Descriptor   getDescriptorForType ()  
   
  Returns 
  
  Overrides 
  
   
  getPreference() 
  
    
public   String   getPreference ()  
   
   Preference for a given location.
 Check the Preference enum for the list of possible values.
 optional string preference = 150781147;
 
  Returns 
  
    
      
        Type  
        Description  
       
      
        String  
        The preference.
 
       
     
  
   
  getPreferenceBytes() 
  
    
public   ByteString   getPreferenceBytes ()  
   
   Preference for a given location.
 Check the Preference enum for the list of possible values.
 optional string preference = 150781147;
 
  Returns 
  
    
      
        Type  
        Description  
       
      
        ByteString  
        The bytes for preference.
 
       
     
  
   
  hasPreference() 
  
    
public   boolean   hasPreference ()  
   
   Preference for a given location.
 Check the Preference enum for the list of possible values.
 optional string preference = 150781147;
 
  Returns 
  
    
      
        Type  
        Description  
       
      
        boolean  
        Whether the preference field is set.
 
       
     
  
   
  internalGetFieldAccessorTable() 
  
    
protected   GeneratedMessageV3 . FieldAccessorTable   internalGetFieldAccessorTable ()  
   
  Returns 
  
  Overrides 
  
   
  isInitialized() 
  
    
public   final   boolean   isInitialized ()  
   
  Returns 
  
  Overrides 
  
   
  mergeFrom(LocationPolicyLocation other) 
  
    
public   LocationPolicyLocation . Builder   mergeFrom ( LocationPolicyLocation   other )  
   
  Parameter 
  
  Returns 
  
   
  
  
    
public   LocationPolicyLocation . Builder   mergeFrom ( CodedInputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
   
  Parameters 
  
  Returns 
  
  Overrides 
  
  Exceptions 
  
   
  mergeFrom(Message other) 
  
    
public   LocationPolicyLocation . Builder   mergeFrom ( Message   other )  
   
  Parameter 
  
  Returns 
  
  Overrides 
  
   
  mergeUnknownFields(UnknownFieldSet unknownFields) 
  
    
public   final   LocationPolicyLocation . Builder   mergeUnknownFields ( UnknownFieldSet   unknownFields )  
   
  Parameter 
  
  Returns 
  
  Overrides 
  
   
  setField(Descriptors.FieldDescriptor field, Object value) 
  
    
public   LocationPolicyLocation . Builder   setField ( Descriptors . FieldDescriptor   field ,   Object   value )  
   
  Parameters 
  
  Returns 
  
  Overrides 
  
   
  setPreference(String value) 
  
    
public   LocationPolicyLocation . Builder   setPreference ( String   value )  
   
   Preference for a given location.
 Check the Preference enum for the list of possible values.
 optional string preference = 150781147;
 
  Parameter 
  
    
      
        Name  
        Description  
       
      
        value  
        String The preference to set.
 
       
     
  
  Returns 
  
   
  setPreferenceBytes(ByteString value) 
  
    
public   LocationPolicyLocation . Builder   setPreferenceBytes ( ByteString   value )  
   
   Preference for a given location.
 Check the Preference enum for the list of possible values.
 optional string preference = 150781147;
 
  Parameter 
  
    
      
        Name  
        Description  
       
      
        value  
        ByteString The bytes for preference to set.
 
       
     
  
  Returns 
  
   
  setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value) 
  
    
public   LocationPolicyLocation . Builder   setRepeatedField ( Descriptors . FieldDescriptor   field ,   int   index ,   Object   value )  
   
  Parameters 
  
  Returns 
  
  Overrides 
  
   
  setUnknownFields(UnknownFieldSet unknownFields) 
  
    
public   final   LocationPolicyLocation . Builder   setUnknownFields ( UnknownFieldSet   unknownFields )  
   
  Parameter 
  
  Returns 
  
  Overrides 
  
 
     
    
  
  
  
     
  
 
  
    
    
      
       
    
    
  
  
 
  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-30 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-30 UTC."],[],[]]