Class AttributeContext.Auth.Builder

public static final class AttributeContext.Auth.Builder extends GeneratedMessageV3.Builder<AttributeContext.Auth.Builder> implements AttributeContext.AuthOrBuilder

This message defines request authentication attributes. Terminology is based on the JSON Web Token (JWT) standard, but the terms also correlate to concepts in other standards.

Protobuf type google.rpc.context.AttributeContext.Auth

Methods

addAccessLevels(String value)

public AttributeContext.Auth.Builder addAccessLevels(String value)

A list of access level resource names that allow resources to be accessed by authenticated requester. It is part of Secure GCP processing for the incoming request. An access level string has the format: "//{api_service_name}/accessPolicies/{policy_id}/accessLevels/{short_name}" Example: "//accesscontextmanager.googleapis.com/accessPolicies/MY_POLICY_ID/accessLevels/MY_LEVEL"

repeated string access_levels = 5;

Parameter
NameDescription
valueString

The accessLevels to add.

Returns
TypeDescription
AttributeContext.Auth.Builder

This builder for chaining.

addAccessLevelsBytes(ByteString value)

public AttributeContext.Auth.Builder addAccessLevelsBytes(ByteString value)

A list of access level resource names that allow resources to be accessed by authenticated requester. It is part of Secure GCP processing for the incoming request. An access level string has the format: "//{api_service_name}/accessPolicies/{policy_id}/accessLevels/{short_name}" Example: "//accesscontextmanager.googleapis.com/accessPolicies/MY_POLICY_ID/accessLevels/MY_LEVEL"

repeated string access_levels = 5;

Parameter
NameDescription
valueByteString

The bytes of the accessLevels to add.

Returns
TypeDescription
AttributeContext.Auth.Builder

This builder for chaining.

addAllAccessLevels(Iterable<String> values)

public AttributeContext.Auth.Builder addAllAccessLevels(Iterable<String> values)

A list of access level resource names that allow resources to be accessed by authenticated requester. It is part of Secure GCP processing for the incoming request. An access level string has the format: "//{api_service_name}/accessPolicies/{policy_id}/accessLevels/{short_name}" Example: "//accesscontextmanager.googleapis.com/accessPolicies/MY_POLICY_ID/accessLevels/MY_LEVEL"

repeated string access_levels = 5;

Parameter
NameDescription
valuesIterable<String>

The accessLevels to add.

Returns
TypeDescription
AttributeContext.Auth.Builder

This builder for chaining.

addAllAudiences(Iterable<String> values)

public AttributeContext.Auth.Builder addAllAudiences(Iterable<String> values)

The intended audience(s) for this authentication information. Reflects the audience (aud) claim within a JWT. The audience value(s) depends on the issuer, but typically include one or more of the following pieces of information:

repeated string audiences = 2;

Parameter
NameDescription
valuesIterable<String>

The audiences to add.

Returns
TypeDescription
AttributeContext.Auth.Builder

This builder for chaining.

addAudiences(String value)

public AttributeContext.Auth.Builder addAudiences(String value)

The intended audience(s) for this authentication information. Reflects the audience (aud) claim within a JWT. The audience value(s) depends on the issuer, but typically include one or more of the following pieces of information:

repeated string audiences = 2;

Parameter
NameDescription
valueString

The audiences to add.

Returns
TypeDescription
AttributeContext.Auth.Builder

This builder for chaining.

addAudiencesBytes(ByteString value)

public AttributeContext.Auth.Builder addAudiencesBytes(ByteString value)

The intended audience(s) for this authentication information. Reflects the audience (aud) claim within a JWT. The audience value(s) depends on the issuer, but typically include one or more of the following pieces of information:

repeated string audiences = 2;

Parameter
NameDescription
valueByteString

The bytes of the audiences to add.

Returns
TypeDescription
AttributeContext.Auth.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public AttributeContext.Auth.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
AttributeContext.Auth.Builder
Overrides

build()

public AttributeContext.Auth build()
Returns
TypeDescription
AttributeContext.Auth

buildPartial()

public AttributeContext.Auth buildPartial()
Returns
TypeDescription
AttributeContext.Auth

clear()

public AttributeContext.Auth.Builder clear()
Returns
TypeDescription
AttributeContext.Auth.Builder
Overrides

clearAccessLevels()

public AttributeContext.Auth.Builder clearAccessLevels()

A list of access level resource names that allow resources to be accessed by authenticated requester. It is part of Secure GCP processing for the incoming request. An access level string has the format: "//{api_service_name}/accessPolicies/{policy_id}/accessLevels/{short_name}" Example: "//accesscontextmanager.googleapis.com/accessPolicies/MY_POLICY_ID/accessLevels/MY_LEVEL"

repeated string access_levels = 5;

Returns
TypeDescription
AttributeContext.Auth.Builder

This builder for chaining.

clearAudiences()

public AttributeContext.Auth.Builder clearAudiences()

The intended audience(s) for this authentication information. Reflects the audience (aud) claim within a JWT. The audience value(s) depends on the issuer, but typically include one or more of the following pieces of information:

repeated string audiences = 2;

Returns
TypeDescription
AttributeContext.Auth.Builder

This builder for chaining.

clearClaims()

public AttributeContext.Auth.Builder clearClaims()

Structured claims presented with the credential. JWTs include {key: value} pairs for standard and private claims. The following is a subset of the standard required and optional claims that would typically be presented for a Google-based JWT: {'iss': 'accounts.google.com', 'sub': '113289723416554971153', 'aud': ['123456789012', 'pubsub.googleapis.com'], 'azp': '123456789012.apps.googleusercontent.com', 'email': 'jsmith@example.com', 'iat': 1353601026, 'exp': 1353604926} SAML assertions are similarly specified, but with an identity provider dependent structure.

.google.protobuf.Struct claims = 4;

Returns
TypeDescription
AttributeContext.Auth.Builder

clearField(Descriptors.FieldDescriptor field)

public AttributeContext.Auth.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
AttributeContext.Auth.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public AttributeContext.Auth.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
AttributeContext.Auth.Builder
Overrides

clearPresenter()

public AttributeContext.Auth.Builder clearPresenter()

The authorized presenter of the credential. Reflects the optional Authorized Presenter (azp) claim within a JWT or the OAuth client id. For example, a Google Cloud Platform client id looks as follows: "123456789012.apps.googleusercontent.com".

string presenter = 3;

Returns
TypeDescription
AttributeContext.Auth.Builder

This builder for chaining.

clearPrincipal()

public AttributeContext.Auth.Builder clearPrincipal()

The authenticated principal. Reflects the issuer (iss) and subject (sub) claims within a JWT. The issuer and subject should be / delimited, with / percent-encoded within the subject fragment. For Google accounts, the principal format is: "https://accounts.google.com/{id}"

string principal = 1;

Returns
TypeDescription
AttributeContext.Auth.Builder

This builder for chaining.

clone()

public AttributeContext.Auth.Builder clone()
Returns
TypeDescription
AttributeContext.Auth.Builder
Overrides

getAccessLevels(int index)

public String getAccessLevels(int index)

A list of access level resource names that allow resources to be accessed by authenticated requester. It is part of Secure GCP processing for the incoming request. An access level string has the format: "//{api_service_name}/accessPolicies/{policy_id}/accessLevels/{short_name}" Example: "//accesscontextmanager.googleapis.com/accessPolicies/MY_POLICY_ID/accessLevels/MY_LEVEL"

repeated string access_levels = 5;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The accessLevels at the given index.

getAccessLevelsBytes(int index)

public ByteString getAccessLevelsBytes(int index)

A list of access level resource names that allow resources to be accessed by authenticated requester. It is part of Secure GCP processing for the incoming request. An access level string has the format: "//{api_service_name}/accessPolicies/{policy_id}/accessLevels/{short_name}" Example: "//accesscontextmanager.googleapis.com/accessPolicies/MY_POLICY_ID/accessLevels/MY_LEVEL"

repeated string access_levels = 5;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the accessLevels at the given index.

getAccessLevelsCount()

public int getAccessLevelsCount()

A list of access level resource names that allow resources to be accessed by authenticated requester. It is part of Secure GCP processing for the incoming request. An access level string has the format: "//{api_service_name}/accessPolicies/{policy_id}/accessLevels/{short_name}" Example: "//accesscontextmanager.googleapis.com/accessPolicies/MY_POLICY_ID/accessLevels/MY_LEVEL"

repeated string access_levels = 5;

Returns
TypeDescription
int

The count of accessLevels.

getAccessLevelsList()

public ProtocolStringList getAccessLevelsList()

A list of access level resource names that allow resources to be accessed by authenticated requester. It is part of Secure GCP processing for the incoming request. An access level string has the format: "//{api_service_name}/accessPolicies/{policy_id}/accessLevels/{short_name}" Example: "//accesscontextmanager.googleapis.com/accessPolicies/MY_POLICY_ID/accessLevels/MY_LEVEL"

repeated string access_levels = 5;

Returns
TypeDescription
ProtocolStringList

A list containing the accessLevels.

getAudiences(int index)

public String getAudiences(int index)

The intended audience(s) for this authentication information. Reflects the audience (aud) claim within a JWT. The audience value(s) depends on the issuer, but typically include one or more of the following pieces of information:

repeated string audiences = 2;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The audiences at the given index.

getAudiencesBytes(int index)

public ByteString getAudiencesBytes(int index)

The intended audience(s) for this authentication information. Reflects the audience (aud) claim within a JWT. The audience value(s) depends on the issuer, but typically include one or more of the following pieces of information:

repeated string audiences = 2;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the audiences at the given index.

getAudiencesCount()

public int getAudiencesCount()

The intended audience(s) for this authentication information. Reflects the audience (aud) claim within a JWT. The audience value(s) depends on the issuer, but typically include one or more of the following pieces of information:

repeated string audiences = 2;

Returns
TypeDescription
int

The count of audiences.

getAudiencesList()

public ProtocolStringList getAudiencesList()

The intended audience(s) for this authentication information. Reflects the audience (aud) claim within a JWT. The audience value(s) depends on the issuer, but typically include one or more of the following pieces of information:

repeated string audiences = 2;

Returns
TypeDescription
ProtocolStringList

A list containing the audiences.

getClaims()

public Struct getClaims()

Structured claims presented with the credential. JWTs include {key: value} pairs for standard and private claims. The following is a subset of the standard required and optional claims that would typically be presented for a Google-based JWT: {'iss': 'accounts.google.com', 'sub': '113289723416554971153', 'aud': ['123456789012', 'pubsub.googleapis.com'], 'azp': '123456789012.apps.googleusercontent.com', 'email': 'jsmith@example.com', 'iat': 1353601026, 'exp': 1353604926} SAML assertions are similarly specified, but with an identity provider dependent structure.

.google.protobuf.Struct claims = 4;

Returns
TypeDescription
Struct

The claims.

getClaimsBuilder()

public Struct.Builder getClaimsBuilder()

Structured claims presented with the credential. JWTs include {key: value} pairs for standard and private claims. The following is a subset of the standard required and optional claims that would typically be presented for a Google-based JWT: {'iss': 'accounts.google.com', 'sub': '113289723416554971153', 'aud': ['123456789012', 'pubsub.googleapis.com'], 'azp': '123456789012.apps.googleusercontent.com', 'email': 'jsmith@example.com', 'iat': 1353601026, 'exp': 1353604926} SAML assertions are similarly specified, but with an identity provider dependent structure.

.google.protobuf.Struct claims = 4;

Returns
TypeDescription
Builder

getClaimsOrBuilder()

public StructOrBuilder getClaimsOrBuilder()

Structured claims presented with the credential. JWTs include {key: value} pairs for standard and private claims. The following is a subset of the standard required and optional claims that would typically be presented for a Google-based JWT: {'iss': 'accounts.google.com', 'sub': '113289723416554971153', 'aud': ['123456789012', 'pubsub.googleapis.com'], 'azp': '123456789012.apps.googleusercontent.com', 'email': 'jsmith@example.com', 'iat': 1353601026, 'exp': 1353604926} SAML assertions are similarly specified, but with an identity provider dependent structure.

.google.protobuf.Struct claims = 4;

Returns
TypeDescription
StructOrBuilder

getDefaultInstanceForType()

public AttributeContext.Auth getDefaultInstanceForType()
Returns
TypeDescription
AttributeContext.Auth

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getPresenter()

public String getPresenter()

The authorized presenter of the credential. Reflects the optional Authorized Presenter (azp) claim within a JWT or the OAuth client id. For example, a Google Cloud Platform client id looks as follows: "123456789012.apps.googleusercontent.com".

string presenter = 3;

Returns
TypeDescription
String

The presenter.

getPresenterBytes()

public ByteString getPresenterBytes()

The authorized presenter of the credential. Reflects the optional Authorized Presenter (azp) claim within a JWT or the OAuth client id. For example, a Google Cloud Platform client id looks as follows: "123456789012.apps.googleusercontent.com".

string presenter = 3;

Returns
TypeDescription
ByteString

The bytes for presenter.

getPrincipal()

public String getPrincipal()

The authenticated principal. Reflects the issuer (iss) and subject (sub) claims within a JWT. The issuer and subject should be / delimited, with / percent-encoded within the subject fragment. For Google accounts, the principal format is: "https://accounts.google.com/{id}"

string principal = 1;

Returns
TypeDescription
String

The principal.

getPrincipalBytes()

public ByteString getPrincipalBytes()

The authenticated principal. Reflects the issuer (iss) and subject (sub) claims within a JWT. The issuer and subject should be / delimited, with / percent-encoded within the subject fragment. For Google accounts, the principal format is: "https://accounts.google.com/{id}"

string principal = 1;

Returns
TypeDescription
ByteString

The bytes for principal.

hasClaims()

public boolean hasClaims()

Structured claims presented with the credential. JWTs include {key: value} pairs for standard and private claims. The following is a subset of the standard required and optional claims that would typically be presented for a Google-based JWT: {'iss': 'accounts.google.com', 'sub': '113289723416554971153', 'aud': ['123456789012', 'pubsub.googleapis.com'], 'azp': '123456789012.apps.googleusercontent.com', 'email': 'jsmith@example.com', 'iat': 1353601026, 'exp': 1353604926} SAML assertions are similarly specified, but with an identity provider dependent structure.

.google.protobuf.Struct claims = 4;

Returns
TypeDescription
boolean

Whether the claims field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeClaims(Struct value)

public AttributeContext.Auth.Builder mergeClaims(Struct value)

Structured claims presented with the credential. JWTs include {key: value} pairs for standard and private claims. The following is a subset of the standard required and optional claims that would typically be presented for a Google-based JWT: {'iss': 'accounts.google.com', 'sub': '113289723416554971153', 'aud': ['123456789012', 'pubsub.googleapis.com'], 'azp': '123456789012.apps.googleusercontent.com', 'email': 'jsmith@example.com', 'iat': 1353601026, 'exp': 1353604926} SAML assertions are similarly specified, but with an identity provider dependent structure.

.google.protobuf.Struct claims = 4;

Parameter
NameDescription
valueStruct
Returns
TypeDescription
AttributeContext.Auth.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public AttributeContext.Auth.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AttributeContext.Auth.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public AttributeContext.Auth.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
AttributeContext.Auth.Builder
Overrides

mergeFrom(AttributeContext.Auth other)

public AttributeContext.Auth.Builder mergeFrom(AttributeContext.Auth other)
Parameter
NameDescription
otherAttributeContext.Auth
Returns
TypeDescription
AttributeContext.Auth.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final AttributeContext.Auth.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
AttributeContext.Auth.Builder
Overrides

setAccessLevels(int index, String value)

public AttributeContext.Auth.Builder setAccessLevels(int index, String value)

A list of access level resource names that allow resources to be accessed by authenticated requester. It is part of Secure GCP processing for the incoming request. An access level string has the format: "//{api_service_name}/accessPolicies/{policy_id}/accessLevels/{short_name}" Example: "//accesscontextmanager.googleapis.com/accessPolicies/MY_POLICY_ID/accessLevels/MY_LEVEL"

repeated string access_levels = 5;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The accessLevels to set.

Returns
TypeDescription
AttributeContext.Auth.Builder

This builder for chaining.

setAudiences(int index, String value)

public AttributeContext.Auth.Builder setAudiences(int index, String value)

The intended audience(s) for this authentication information. Reflects the audience (aud) claim within a JWT. The audience value(s) depends on the issuer, but typically include one or more of the following pieces of information:

repeated string audiences = 2;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The audiences to set.

Returns
TypeDescription
AttributeContext.Auth.Builder

This builder for chaining.

setClaims(Struct value)

public AttributeContext.Auth.Builder setClaims(Struct value)

Structured claims presented with the credential. JWTs include {key: value} pairs for standard and private claims. The following is a subset of the standard required and optional claims that would typically be presented for a Google-based JWT: {'iss': 'accounts.google.com', 'sub': '113289723416554971153', 'aud': ['123456789012', 'pubsub.googleapis.com'], 'azp': '123456789012.apps.googleusercontent.com', 'email': 'jsmith@example.com', 'iat': 1353601026, 'exp': 1353604926} SAML assertions are similarly specified, but with an identity provider dependent structure.

.google.protobuf.Struct claims = 4;

Parameter
NameDescription
valueStruct
Returns
TypeDescription
AttributeContext.Auth.Builder

setClaims(Struct.Builder builderForValue)

public AttributeContext.Auth.Builder setClaims(Struct.Builder builderForValue)

Structured claims presented with the credential. JWTs include {key: value} pairs for standard and private claims. The following is a subset of the standard required and optional claims that would typically be presented for a Google-based JWT: {'iss': 'accounts.google.com', 'sub': '113289723416554971153', 'aud': ['123456789012', 'pubsub.googleapis.com'], 'azp': '123456789012.apps.googleusercontent.com', 'email': 'jsmith@example.com', 'iat': 1353601026, 'exp': 1353604926} SAML assertions are similarly specified, but with an identity provider dependent structure.

.google.protobuf.Struct claims = 4;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
AttributeContext.Auth.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public AttributeContext.Auth.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
AttributeContext.Auth.Builder
Overrides

setPresenter(String value)

public AttributeContext.Auth.Builder setPresenter(String value)

The authorized presenter of the credential. Reflects the optional Authorized Presenter (azp) claim within a JWT or the OAuth client id. For example, a Google Cloud Platform client id looks as follows: "123456789012.apps.googleusercontent.com".

string presenter = 3;

Parameter
NameDescription
valueString

The presenter to set.

Returns
TypeDescription
AttributeContext.Auth.Builder

This builder for chaining.

setPresenterBytes(ByteString value)

public AttributeContext.Auth.Builder setPresenterBytes(ByteString value)

The authorized presenter of the credential. Reflects the optional Authorized Presenter (azp) claim within a JWT or the OAuth client id. For example, a Google Cloud Platform client id looks as follows: "123456789012.apps.googleusercontent.com".

string presenter = 3;

Parameter
NameDescription
valueByteString

The bytes for presenter to set.

Returns
TypeDescription
AttributeContext.Auth.Builder

This builder for chaining.

setPrincipal(String value)

public AttributeContext.Auth.Builder setPrincipal(String value)

The authenticated principal. Reflects the issuer (iss) and subject (sub) claims within a JWT. The issuer and subject should be / delimited, with / percent-encoded within the subject fragment. For Google accounts, the principal format is: "https://accounts.google.com/{id}"

string principal = 1;

Parameter
NameDescription
valueString

The principal to set.

Returns
TypeDescription
AttributeContext.Auth.Builder

This builder for chaining.

setPrincipalBytes(ByteString value)

public AttributeContext.Auth.Builder setPrincipalBytes(ByteString value)

The authenticated principal. Reflects the issuer (iss) and subject (sub) claims within a JWT. The issuer and subject should be / delimited, with / percent-encoded within the subject fragment. For Google accounts, the principal format is: "https://accounts.google.com/{id}"

string principal = 1;

Parameter
NameDescription
valueByteString

The bytes for principal to set.

Returns
TypeDescription
AttributeContext.Auth.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public AttributeContext.Auth.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
AttributeContext.Auth.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final AttributeContext.Auth.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
AttributeContext.Auth.Builder
Overrides