Class GenerateIdTokenRequest.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.Builder<GenerateIdTokenRequest.Builder> implements GenerateIdTokenRequestOrBuilder
Protobuf typegoogle.iam.credentials.v1.GenerateIdTokenRequest
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GenerateIdTokenRequest.Builder
addAllDelegates(Iterable<String> values)
The sequence of service accounts in a delegation chain.GenerateIdTokenRequest.Builder
addDelegates(String value)
The sequence of service accounts in a delegation chain.GenerateIdTokenRequest.Builder
addDelegatesBytes(com.google.protobuf.ByteString value)
The sequence of service accounts in a delegation chain.GenerateIdTokenRequest.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
GenerateIdTokenRequest
build()
GenerateIdTokenRequest
buildPartial()
GenerateIdTokenRequest.Builder
clear()
GenerateIdTokenRequest.Builder
clearAudience()
Required.GenerateIdTokenRequest.Builder
clearDelegates()
The sequence of service accounts in a delegation chain.GenerateIdTokenRequest.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
GenerateIdTokenRequest.Builder
clearIncludeEmail()
Include the service account email in the token.GenerateIdTokenRequest.Builder
clearName()
Required.GenerateIdTokenRequest.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
GenerateIdTokenRequest.Builder
clone()
String
getAudience()
Required.com.google.protobuf.ByteString
getAudienceBytes()
Required.GenerateIdTokenRequest
getDefaultInstanceForType()
String
getDelegates(int index)
The sequence of service accounts in a delegation chain.com.google.protobuf.ByteString
getDelegatesBytes(int index)
The sequence of service accounts in a delegation chain.int
getDelegatesCount()
The sequence of service accounts in a delegation chain.com.google.protobuf.ProtocolStringList
getDelegatesList()
The sequence of service accounts in a delegation chain.static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
boolean
getIncludeEmail()
Include the service account email in the token.String
getName()
Required.com.google.protobuf.ByteString
getNameBytes()
Required.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
GenerateIdTokenRequest.Builder
mergeFrom(GenerateIdTokenRequest other)
GenerateIdTokenRequest.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
GenerateIdTokenRequest.Builder
mergeFrom(com.google.protobuf.Message other)
GenerateIdTokenRequest.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
GenerateIdTokenRequest.Builder
setAudience(String value)
Required.GenerateIdTokenRequest.Builder
setAudienceBytes(com.google.protobuf.ByteString value)
Required.GenerateIdTokenRequest.Builder
setDelegates(int index, String value)
The sequence of service accounts in a delegation chain.GenerateIdTokenRequest.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
GenerateIdTokenRequest.Builder
setIncludeEmail(boolean value)
Include the service account email in the token.GenerateIdTokenRequest.Builder
setName(String value)
Required.GenerateIdTokenRequest.Builder
setNameBytes(com.google.protobuf.ByteString value)
Required.GenerateIdTokenRequest.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
GenerateIdTokenRequest.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<GenerateIdTokenRequest.Builder>
-
clear
public GenerateIdTokenRequest.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<GenerateIdTokenRequest.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<GenerateIdTokenRequest.Builder>
-
getDefaultInstanceForType
public GenerateIdTokenRequest getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public GenerateIdTokenRequest build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public GenerateIdTokenRequest buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public GenerateIdTokenRequest.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<GenerateIdTokenRequest.Builder>
-
setField
public GenerateIdTokenRequest.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<GenerateIdTokenRequest.Builder>
-
clearField
public GenerateIdTokenRequest.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<GenerateIdTokenRequest.Builder>
-
clearOneof
public GenerateIdTokenRequest.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<GenerateIdTokenRequest.Builder>
-
setRepeatedField
public GenerateIdTokenRequest.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<GenerateIdTokenRequest.Builder>
-
addRepeatedField
public GenerateIdTokenRequest.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<GenerateIdTokenRequest.Builder>
-
mergeFrom
public GenerateIdTokenRequest.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<GenerateIdTokenRequest.Builder>
-
mergeFrom
public GenerateIdTokenRequest.Builder mergeFrom(GenerateIdTokenRequest other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<GenerateIdTokenRequest.Builder>
-
mergeFrom
public GenerateIdTokenRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<GenerateIdTokenRequest.Builder>
- Throws:
IOException
-
getName
public String 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:
getName
in 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:
getNameBytes
in interfaceGenerateIdTokenRequestOrBuilder
- Returns:
- The bytes for name.
-
setName
public GenerateIdTokenRequest.Builder setName(String value)
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
public GenerateIdTokenRequest.Builder 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
public GenerateIdTokenRequest.Builder setNameBytes(com.google.protobuf.ByteString value)
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:
getDelegatesList
in 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:
getDelegatesCount
in interfaceGenerateIdTokenRequestOrBuilder
- Returns:
- The count of delegates.
-
getDelegates
public String getDelegates(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:
getDelegates
in 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:
getDelegatesBytes
in interfaceGenerateIdTokenRequestOrBuilder
- Parameters:
index
- The index of the value to return.- Returns:
- The bytes of the delegates at the given index.
-
setDelegates
public GenerateIdTokenRequest.Builder setDelegates(int index, String value)
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
public GenerateIdTokenRequest.Builder addDelegates(String value)
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
public GenerateIdTokenRequest.Builder addAllDelegates(Iterable<String> values)
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
public GenerateIdTokenRequest.Builder 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
public GenerateIdTokenRequest.Builder addDelegatesBytes(com.google.protobuf.ByteString value)
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
public String 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:
getAudience
in 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:
getAudienceBytes
in interfaceGenerateIdTokenRequestOrBuilder
- Returns:
- The bytes for audience.
-
setAudience
public GenerateIdTokenRequest.Builder setAudience(String value)
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
public GenerateIdTokenRequest.Builder 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
public GenerateIdTokenRequest.Builder setAudienceBytes(com.google.protobuf.ByteString value)
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:
getIncludeEmail
in interfaceGenerateIdTokenRequestOrBuilder
- Returns:
- The includeEmail.
-
setIncludeEmail
public GenerateIdTokenRequest.Builder setIncludeEmail(boolean value)
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
public GenerateIdTokenRequest.Builder 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.
-
setUnknownFields
public final GenerateIdTokenRequest.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<GenerateIdTokenRequest.Builder>
-
mergeUnknownFields
public final GenerateIdTokenRequest.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<GenerateIdTokenRequest.Builder>
-
-