Class GenerateIdTokenRequest.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<GenerateIdTokenRequest.Builder>
com.google.cloud.iam.credentials.v1.GenerateIdTokenRequest.Builder
- All Implemented Interfaces:
GenerateIdTokenRequestOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- GenerateIdTokenRequest
public static final class GenerateIdTokenRequest.Builder
extends com.google.protobuf.GeneratedMessage.Builder<GenerateIdTokenRequest.Builder>
implements GenerateIdTokenRequestOrBuilder
Protobuf type
google.iam.credentials.v1.GenerateIdTokenRequest-
Method Summary
Modifier and TypeMethodDescriptionaddAllDelegates(Iterable<String> values) The sequence of service accounts in a delegation chain.addDelegates(String value) The sequence of service accounts in a delegation chain.addDelegatesBytes(com.google.protobuf.ByteString value) The sequence of service accounts in a delegation chain.build()clear()Required.The sequence of service accounts in a delegation chain.Include the service account email in the token.Required.Required.com.google.protobuf.ByteStringRequired.getDelegates(int index) The sequence of service accounts in a delegation chain.com.google.protobuf.ByteStringgetDelegatesBytes(int index) The sequence of service accounts in a delegation chain.intThe sequence of service accounts in a delegation chain.com.google.protobuf.ProtocolStringListThe sequence of service accounts in a delegation chain.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorbooleanInclude the service account email in the token.getName()Required.com.google.protobuf.ByteStringRequired.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(GenerateIdTokenRequest other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setAudience(String value) Required.setAudienceBytes(com.google.protobuf.ByteString value) Required.setDelegates(int index, String value) The sequence of service accounts in a delegation chain.setIncludeEmail(boolean value) Include the service account email in the token.Required.setNameBytes(com.google.protobuf.ByteString value) Required.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<GenerateIdTokenRequest.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<GenerateIdTokenRequest.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<GenerateIdTokenRequest.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<GenerateIdTokenRequest.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<GenerateIdTokenRequest.Builder>
-
mergeFrom
public GenerateIdTokenRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<GenerateIdTokenRequest.Builder>- Throws:
IOException
-
getName
Required. The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Specified by:
getNamein interfaceGenerateIdTokenRequestOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()Required. The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Specified by:
getNameBytesin interfaceGenerateIdTokenRequestOrBuilder- Returns:
- The bytes for name.
-
setName
Required. The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
Required. The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Returns:
- This builder for chaining.
-
setNameBytes
Required. The resource name of the service account for which the credentials are requested, in the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getDelegatesList
public com.google.protobuf.ProtocolStringList getDelegatesList()The sequence of service accounts in a delegation chain. Each service account must be granted the `roles/iam.serviceAccountTokenCreator` role on its next service account in the chain. The last service account in the chain must be granted the `roles/iam.serviceAccountTokenCreator` role on the service account that is specified in the `name` field of the request. The delegates must have the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.repeated string delegates = 2;- Specified by:
getDelegatesListin interfaceGenerateIdTokenRequestOrBuilder- Returns:
- A list containing the delegates.
-
getDelegatesCount
public int getDelegatesCount()The sequence of service accounts in a delegation chain. Each service account must be granted the `roles/iam.serviceAccountTokenCreator` role on its next service account in the chain. The last service account in the chain must be granted the `roles/iam.serviceAccountTokenCreator` role on the service account that is specified in the `name` field of the request. The delegates must have the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.repeated string delegates = 2;- Specified by:
getDelegatesCountin interfaceGenerateIdTokenRequestOrBuilder- Returns:
- The count of delegates.
-
getDelegates
The sequence of service accounts in a delegation chain. Each service account must be granted the `roles/iam.serviceAccountTokenCreator` role on its next service account in the chain. The last service account in the chain must be granted the `roles/iam.serviceAccountTokenCreator` role on the service account that is specified in the `name` field of the request. The delegates must have the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.repeated string delegates = 2;- Specified by:
getDelegatesin interfaceGenerateIdTokenRequestOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The delegates at the given index.
-
getDelegatesBytes
public com.google.protobuf.ByteString getDelegatesBytes(int index) The sequence of service accounts in a delegation chain. Each service account must be granted the `roles/iam.serviceAccountTokenCreator` role on its next service account in the chain. The last service account in the chain must be granted the `roles/iam.serviceAccountTokenCreator` role on the service account that is specified in the `name` field of the request. The delegates must have the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.repeated string delegates = 2;- Specified by:
getDelegatesBytesin interfaceGenerateIdTokenRequestOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the delegates at the given index.
-
setDelegates
The sequence of service accounts in a delegation chain. Each service account must be granted the `roles/iam.serviceAccountTokenCreator` role on its next service account in the chain. The last service account in the chain must be granted the `roles/iam.serviceAccountTokenCreator` role on the service account that is specified in the `name` field of the request. The delegates must have the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.repeated string delegates = 2;- Parameters:
index- The index to set the value at.value- The delegates to set.- Returns:
- This builder for chaining.
-
addDelegates
The sequence of service accounts in a delegation chain. Each service account must be granted the `roles/iam.serviceAccountTokenCreator` role on its next service account in the chain. The last service account in the chain must be granted the `roles/iam.serviceAccountTokenCreator` role on the service account that is specified in the `name` field of the request. The delegates must have the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.repeated string delegates = 2;- Parameters:
value- The delegates to add.- Returns:
- This builder for chaining.
-
addAllDelegates
The sequence of service accounts in a delegation chain. Each service account must be granted the `roles/iam.serviceAccountTokenCreator` role on its next service account in the chain. The last service account in the chain must be granted the `roles/iam.serviceAccountTokenCreator` role on the service account that is specified in the `name` field of the request. The delegates must have the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.repeated string delegates = 2;- Parameters:
values- The delegates to add.- Returns:
- This builder for chaining.
-
clearDelegates
The sequence of service accounts in a delegation chain. Each service account must be granted the `roles/iam.serviceAccountTokenCreator` role on its next service account in the chain. The last service account in the chain must be granted the `roles/iam.serviceAccountTokenCreator` role on the service account that is specified in the `name` field of the request. The delegates must have the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.repeated string delegates = 2;- Returns:
- This builder for chaining.
-
addDelegatesBytes
The sequence of service accounts in a delegation chain. Each service account must be granted the `roles/iam.serviceAccountTokenCreator` role on its next service account in the chain. The last service account in the chain must be granted the `roles/iam.serviceAccountTokenCreator` role on the service account that is specified in the `name` field of the request. The delegates must have the following format: `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard character is required; replacing it with a project ID is invalid.repeated string delegates = 2;- Parameters:
value- The bytes of the delegates to add.- Returns:
- This builder for chaining.
-
getAudience
Required. The audience for the token, such as the API or account that this token grants access to.
string audience = 3 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getAudiencein interfaceGenerateIdTokenRequestOrBuilder- Returns:
- The audience.
-
getAudienceBytes
public com.google.protobuf.ByteString getAudienceBytes()Required. The audience for the token, such as the API or account that this token grants access to.
string audience = 3 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getAudienceBytesin interfaceGenerateIdTokenRequestOrBuilder- Returns:
- The bytes for audience.
-
setAudience
Required. The audience for the token, such as the API or account that this token grants access to.
string audience = 3 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The audience to set.- Returns:
- This builder for chaining.
-
clearAudience
Required. The audience for the token, such as the API or account that this token grants access to.
string audience = 3 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
setAudienceBytes
Required. The audience for the token, such as the API or account that this token grants access to.
string audience = 3 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The bytes for audience to set.- Returns:
- This builder for chaining.
-
getIncludeEmail
public boolean getIncludeEmail()Include the service account email in the token. If set to `true`, the token will contain `email` and `email_verified` claims.
bool include_email = 4;- Specified by:
getIncludeEmailin interfaceGenerateIdTokenRequestOrBuilder- Returns:
- The includeEmail.
-
setIncludeEmail
Include the service account email in the token. If set to `true`, the token will contain `email` and `email_verified` claims.
bool include_email = 4;- Parameters:
value- The includeEmail to set.- Returns:
- This builder for chaining.
-
clearIncludeEmail
Include the service account email in the token. If set to `true`, the token will contain `email` and `email_verified` claims.
bool include_email = 4;- Returns:
- This builder for chaining.
-