Class Identity.Builder (0.67.0)

public static final class Identity.Builder extends GeneratedMessage.Builder<Identity.Builder> implements IdentityOrBuilder

The identity associated with a service or workload.

Protobuf type google.cloud.apphub.v1.Identity

Implements

IdentityOrBuilder

Static Methods

getDescriptor()

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

Methods

build()

public Identity build()
Returns
Type Description
Identity

buildPartial()

public Identity buildPartial()
Returns
Type Description
Identity

clear()

public Identity.Builder clear()
Returns
Type Description
Identity.Builder
Overrides

clearPrincipal()

public Identity.Builder clearPrincipal()

Output only. The principal of the identity.

Supported formats:

  • sa://my-sa@PROJECT_ID.iam.gserviceaccount.com for GCP Service Account
  • principal://POOL_ID.global.PROJECT_NUMBER.workload.id.goog/ns/NAMESPACE_ID/sa/MANAGED_IDENTITY_ID for Managed Workload Identity

string principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Identity.Builder

This builder for chaining.

getDefaultInstanceForType()

public Identity getDefaultInstanceForType()
Returns
Type Description
Identity

getDescriptorForType()

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

getPrincipal()

public String getPrincipal()

Output only. The principal of the identity.

Supported formats:

  • sa://my-sa@PROJECT_ID.iam.gserviceaccount.com for GCP Service Account
  • principal://POOL_ID.global.PROJECT_NUMBER.workload.id.goog/ns/NAMESPACE_ID/sa/MANAGED_IDENTITY_ID for Managed Workload Identity

string principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The principal.

getPrincipalBytes()

public ByteString getPrincipalBytes()

Output only. The principal of the identity.

Supported formats:

  • sa://my-sa@PROJECT_ID.iam.gserviceaccount.com for GCP Service Account
  • principal://POOL_ID.global.PROJECT_NUMBER.workload.id.goog/ns/NAMESPACE_ID/sa/MANAGED_IDENTITY_ID for Managed Workload Identity

string principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for principal.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Identity other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setPrincipal(String value)

public Identity.Builder setPrincipal(String value)

Output only. The principal of the identity.

Supported formats:

  • sa://my-sa@PROJECT_ID.iam.gserviceaccount.com for GCP Service Account
  • principal://POOL_ID.global.PROJECT_NUMBER.workload.id.goog/ns/NAMESPACE_ID/sa/MANAGED_IDENTITY_ID for Managed Workload Identity

string principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The principal to set.

Returns
Type Description
Identity.Builder

This builder for chaining.

setPrincipalBytes(ByteString value)

public Identity.Builder setPrincipalBytes(ByteString value)

Output only. The principal of the identity.

Supported formats:

  • sa://my-sa@PROJECT_ID.iam.gserviceaccount.com for GCP Service Account
  • principal://POOL_ID.global.PROJECT_NUMBER.workload.id.goog/ns/NAMESPACE_ID/sa/MANAGED_IDENTITY_ID for Managed Workload Identity

string principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for principal to set.

Returns
Type Description
Identity.Builder

This builder for chaining.