Class PolicyBinding.Target.Builder (1.67.0)

public static final class PolicyBinding.Target.Builder extends GeneratedMessage.Builder<PolicyBinding.Target.Builder> implements PolicyBinding.TargetOrBuilder

The full resource name of the resource to which the policy will be bound. Immutable once set.

Protobuf type google.iam.v3beta.PolicyBinding.Target

Static Methods

getDescriptor()

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

Methods

build()

public PolicyBinding.Target build()
Returns
Type Description
PolicyBinding.Target

buildPartial()

public PolicyBinding.Target buildPartial()
Returns
Type Description
PolicyBinding.Target

clear()

public PolicyBinding.Target.Builder clear()
Returns
Type Description
PolicyBinding.Target.Builder
Overrides

clearPrincipalSet()

public PolicyBinding.Target.Builder clearPrincipalSet()

Immutable. The full resource name that's 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, or organization.

Examples:

  • For bindings 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 bindings parented by a folder:
  • Folder: //cloudresourcemanager.googleapis.com/folders/FOLDER_ID
  • For bindings 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
PolicyBinding.Target.Builder

This builder for chaining.

clearResource()

public PolicyBinding.Target.Builder clearResource()

Immutable. The full resource name that's used for access policy bindings.

Examples:

  • Organization: //cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID
  • Folder: //cloudresourcemanager.googleapis.com/folders/FOLDER_ID
  • Project:
  • //cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER
  • //cloudresourcemanager.googleapis.com/projects/PROJECT_ID

string resource = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
PolicyBinding.Target.Builder

This builder for chaining.

clearTarget()

public PolicyBinding.Target.Builder clearTarget()
Returns
Type Description
PolicyBinding.Target.Builder

getDefaultInstanceForType()

public PolicyBinding.Target getDefaultInstanceForType()
Returns
Type Description
PolicyBinding.Target

getDescriptorForType()

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

getPrincipalSet()

public String getPrincipalSet()

Immutable. The full resource name that's 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, or organization.

Examples:

  • For bindings 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 bindings parented by a folder:
  • Folder: //cloudresourcemanager.googleapis.com/folders/FOLDER_ID
  • For bindings 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. The full resource name that's 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, or organization.

Examples:

  • For bindings 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 bindings parented by a folder:
  • Folder: //cloudresourcemanager.googleapis.com/folders/FOLDER_ID
  • For bindings 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.

getResource()

public String getResource()

Immutable. The full resource name that's used for access policy bindings.

Examples:

  • Organization: //cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID
  • Folder: //cloudresourcemanager.googleapis.com/folders/FOLDER_ID
  • Project:
  • //cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER
  • //cloudresourcemanager.googleapis.com/projects/PROJECT_ID

string resource = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The resource.

getResourceBytes()

public ByteString getResourceBytes()

Immutable. The full resource name that's used for access policy bindings.

Examples:

  • Organization: //cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID
  • Folder: //cloudresourcemanager.googleapis.com/folders/FOLDER_ID
  • Project:
  • //cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER
  • //cloudresourcemanager.googleapis.com/projects/PROJECT_ID

string resource = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for resource.

getTargetCase()

public PolicyBinding.Target.TargetCase getTargetCase()
Returns
Type Description
PolicyBinding.Target.TargetCase

hasPrincipalSet()

public boolean hasPrincipalSet()

Immutable. The full resource name that's 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, or organization.

Examples:

  • For bindings 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 bindings parented by a folder:
  • Folder: //cloudresourcemanager.googleapis.com/folders/FOLDER_ID
  • For bindings 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.

hasResource()

public boolean hasResource()

Immutable. The full resource name that's used for access policy bindings.

Examples:

  • Organization: //cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID
  • Folder: //cloudresourcemanager.googleapis.com/folders/FOLDER_ID
  • Project:
  • //cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER
  • //cloudresourcemanager.googleapis.com/projects/PROJECT_ID

string resource = 2 [(.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
boolean

Whether the resource field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(PolicyBinding.Target other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setPrincipalSet(String value)

public PolicyBinding.Target.Builder setPrincipalSet(String value)

Immutable. The full resource name that's 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, or organization.

Examples:

  • For bindings 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 bindings parented by a folder:
  • Folder: //cloudresourcemanager.googleapis.com/folders/FOLDER_ID
  • For bindings 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
value String

The principalSet to set.

Returns
Type Description
PolicyBinding.Target.Builder

This builder for chaining.

setPrincipalSetBytes(ByteString value)

public PolicyBinding.Target.Builder setPrincipalSetBytes(ByteString value)

Immutable. The full resource name that's 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, or organization.

Examples:

  • For bindings 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 bindings parented by a folder:
  • Folder: //cloudresourcemanager.googleapis.com/folders/FOLDER_ID
  • For bindings 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
value ByteString

The bytes for principalSet to set.

Returns
Type Description
PolicyBinding.Target.Builder

This builder for chaining.

setResource(String value)

public PolicyBinding.Target.Builder setResource(String value)

Immutable. The full resource name that's used for access policy bindings.

Examples:

  • Organization: //cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID
  • Folder: //cloudresourcemanager.googleapis.com/folders/FOLDER_ID
  • Project:
  • //cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER
  • //cloudresourcemanager.googleapis.com/projects/PROJECT_ID

string resource = 2 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The resource to set.

Returns
Type Description
PolicyBinding.Target.Builder

This builder for chaining.

setResourceBytes(ByteString value)

public PolicyBinding.Target.Builder setResourceBytes(ByteString value)

Immutable. The full resource name that's used for access policy bindings.

Examples:

  • Organization: //cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID
  • Folder: //cloudresourcemanager.googleapis.com/folders/FOLDER_ID
  • Project:
  • //cloudresourcemanager.googleapis.com/projects/PROJECT_NUMBER
  • //cloudresourcemanager.googleapis.com/projects/PROJECT_ID

string resource = 2 [(.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for resource to set.

Returns
Type Description
PolicyBinding.Target.Builder

This builder for chaining.