Class PolicyBinding.Target.Builder (1.56.2) 
  
  
  
   
  
    
  
  
    
    
    
    
  Version 1.56.2keyboard_arrow_down  
  
 
    
    
    
    
      
  
  
  
    
public   static   final   class  PolicyBinding . Target . Builder   extends   GeneratedMessageV3 . Builder<PolicyBinding . Target . Builder >  implements   PolicyBinding . TargetOrBuilder  
   Target is the full resource name of the resource to which the policy will
 be bound. Immutable once set.
 Protobuf type google.iam.v3.PolicyBinding.Target
    Inherited Members 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder() 
    
    
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int) 
    
    
    
      com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int) 
    
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString) 
    
    
      com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int) 
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int) 
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder) 
    
    
    
    
    
    
    
    
    
    
    
    
   
  Static Methods
   
  getDescriptor() 
  
    
public   static   final   Descriptors . Descriptor   getDescriptor ()  
  
  Methods
   
  addRepeatedField(Descriptors.FieldDescriptor field, Object value) 
  
    
public   PolicyBinding . Target . Builder   addRepeatedField ( Descriptors . FieldDescriptor   field ,   Object   value )  
  
  
  Overrides 
  
  build() 
  
    
public   PolicyBinding . Target   build ()  
  
  buildPartial() 
  
    
public   PolicyBinding . Target   buildPartial ()  
  
  clear() 
  
    
public   PolicyBinding . Target . Builder   clear ()  
  
  Overrides 
  
  clearField(Descriptors.FieldDescriptor field) 
  
    
public   PolicyBinding . Target . Builder   clearField ( Descriptors . FieldDescriptor   field )  
  
  
  Overrides 
  
  clearOneof(Descriptors.OneofDescriptor oneof) 
  
    
public   PolicyBinding . Target . Builder   clearOneof ( Descriptors . OneofDescriptor   oneof )  
  
  
  Overrides 
  
  clearPrincipalSet() 
  
    
public   PolicyBinding . Target . Builder   clearPrincipalSet ()  
   Immutable. Full Resource Name used for principal access boundary policy
 bindings. The principal set must be directly parented by the policy
 binding's parent or same as the parent if the target is a
 project/folder/organization.
 Examples:
For binding's parented by an organization:
Organization:
//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID 
Workforce Identity:
//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID 
Workspace Identity:
//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID 
 
 
For binding's parented by a folder:
Folder:
//cloudresourcemanager.googleapis.com/folders/FOLDER_ID 
 
 
For binding's parented by a project:
Project:
//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER//cloudresourcemanager.googleapis.com/projects/PROJECT_ID 
 
Workload Identity Pool:
//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID 
 
 
 
 string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE];
clearTarget() 
  
    
public   PolicyBinding . Target . Builder   clearTarget ()  
  
  clone() 
  
    
public   PolicyBinding . Target . Builder   clone ()  
  
  Overrides 
  
  getDefaultInstanceForType() 
  
    
public   PolicyBinding . Target   getDefaultInstanceForType ()  
  
  getDescriptorForType() 
  
    
public   Descriptors . Descriptor   getDescriptorForType ()  
  
  Overrides 
  
  getPrincipalSet() 
  
    
public   String   getPrincipalSet ()  
   Immutable. Full Resource Name used for principal access boundary policy
 bindings. The principal set must be directly parented by the policy
 binding's parent or same as the parent if the target is a
 project/folder/organization.
 Examples:
For binding's parented by an organization:
Organization:
//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID 
Workforce Identity:
//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID 
Workspace Identity:
//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID 
 
 
For binding's parented by a folder:
Folder:
//cloudresourcemanager.googleapis.com/folders/FOLDER_ID 
 
 
For binding's parented by a project:
Project:
//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER//cloudresourcemanager.googleapis.com/projects/PROJECT_ID 
 
Workload Identity Pool:
//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID 
 
 
 
 string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE];
    
      
        Returns  
      
        Type Description  
      
        String The principalSet.
 
     
  
  getPrincipalSetBytes() 
  
    
public   ByteString   getPrincipalSetBytes ()  
   Immutable. Full Resource Name used for principal access boundary policy
 bindings. The principal set must be directly parented by the policy
 binding's parent or same as the parent if the target is a
 project/folder/organization.
 Examples:
For binding's parented by an organization:
Organization:
//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID 
Workforce Identity:
//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID 
Workspace Identity:
//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID 
 
 
For binding's parented by a folder:
Folder:
//cloudresourcemanager.googleapis.com/folders/FOLDER_ID 
 
 
For binding's parented by a project:
Project:
//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER//cloudresourcemanager.googleapis.com/projects/PROJECT_ID 
 
Workload Identity Pool:
//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID 
 
 
 
 string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE];
    
      
        Returns  
      
        Type Description  
      
        ByteString The bytes for principalSet.
 
     
  
  getTargetCase() 
  
    
public   PolicyBinding . Target . TargetCase   getTargetCase ()  
  
  hasPrincipalSet() 
  
    
public   boolean   hasPrincipalSet ()  
   Immutable. Full Resource Name used for principal access boundary policy
 bindings. The principal set must be directly parented by the policy
 binding's parent or same as the parent if the target is a
 project/folder/organization.
 Examples:
For binding's parented by an organization:
Organization:
//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID 
Workforce Identity:
//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID 
Workspace Identity:
//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID 
 
 
For binding's parented by a folder:
Folder:
//cloudresourcemanager.googleapis.com/folders/FOLDER_ID 
 
 
For binding's parented by a project:
Project:
//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER//cloudresourcemanager.googleapis.com/projects/PROJECT_ID 
 
Workload Identity Pool:
//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID 
 
 
 
 string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE];
    
      
        Returns  
      
        Type Description  
      
        boolean Whether the principalSet field is set.
 
     
  
  internalGetFieldAccessorTable() 
  
    
protected   GeneratedMessageV3 . FieldAccessorTable   internalGetFieldAccessorTable ()  
  
  Overrides 
  
  isInitialized() 
  
    
public   final   boolean   isInitialized ()  
  
  Overrides 
  
  mergeFrom(PolicyBinding.Target other) 
  
    
public   PolicyBinding . Target . Builder   mergeFrom ( PolicyBinding . Target   other )  
  
  
  
    
public   PolicyBinding . Target . Builder   mergeFrom ( CodedInputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  Overrides 
  
  
  mergeFrom(Message other) 
  
    
public   PolicyBinding . Target . Builder   mergeFrom ( Message   other )  
  
    
      
        Parameter  
      
        Name Description  
      
        otherMessage  
     
  
  
  Overrides 
  
  mergeUnknownFields(UnknownFieldSet unknownFields) 
  
    
public   final   PolicyBinding . Target . Builder   mergeUnknownFields ( UnknownFieldSet   unknownFields )  
  
  
  Overrides 
  
  setField(Descriptors.FieldDescriptor field, Object value) 
  
    
public   PolicyBinding . Target . Builder   setField ( Descriptors . FieldDescriptor   field ,   Object   value )  
  
  
  Overrides 
  
  setPrincipalSet(String value) 
  
    
public   PolicyBinding . Target . Builder   setPrincipalSet ( String   value )  
   Immutable. Full Resource Name used for principal access boundary policy
 bindings. The principal set must be directly parented by the policy
 binding's parent or same as the parent if the target is a
 project/folder/organization.
 Examples:
For binding's parented by an organization:
Organization:
//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID 
Workforce Identity:
//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID 
Workspace Identity:
//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID 
 
 
For binding's parented by a folder:
Folder:
//cloudresourcemanager.googleapis.com/folders/FOLDER_ID 
 
 
For binding's parented by a project:
Project:
//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER//cloudresourcemanager.googleapis.com/projects/PROJECT_ID 
 
Workload Identity Pool:
//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID 
 
 
 
 string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE];
    
      
        Parameter  
      
        Name Description  
      
        valueString The principalSet to set.
 
     
  
  
  setPrincipalSetBytes(ByteString value) 
  
    
public   PolicyBinding . Target . Builder   setPrincipalSetBytes ( ByteString   value )  
   Immutable. Full Resource Name used for principal access boundary policy
 bindings. The principal set must be directly parented by the policy
 binding's parent or same as the parent if the target is a
 project/folder/organization.
 Examples:
For binding's parented by an organization:
Organization:
//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID 
Workforce Identity:
//iam.googleapis.com/locations/global/workforcePools/WORKFORCE_POOL_ID 
Workspace Identity:
//iam.googleapis.com/locations/global/workspace/WORKSPACE_ID 
 
 
For binding's parented by a folder:
Folder:
//cloudresourcemanager.googleapis.com/folders/FOLDER_ID 
 
 
For binding's parented by a project:
Project:
//cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER//cloudresourcemanager.googleapis.com/projects/PROJECT_ID 
 
Workload Identity Pool:
//iam.googleapis.com/projects/PROJECT_NUMBER/locations/LOCATION/workloadIdentityPools/WORKLOAD_POOL_ID 
 
 
 
 string principal_set = 1 [(.google.api.field_behavior) = IMMUTABLE];
    
      
        Parameter  
      
        Name Description  
      
        valueByteString The bytes for principalSet to set.
 
     
  
  
  setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value) 
  
    
public   PolicyBinding . Target . Builder   setRepeatedField ( Descriptors . FieldDescriptor   field ,   int   index ,   Object   value )  
  
  
  Overrides 
  
  setUnknownFields(UnknownFieldSet unknownFields) 
  
    
public   final   PolicyBinding . Target . Builder   setUnknownFields ( UnknownFieldSet   unknownFields )  
  
  
  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-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."],[],[]]