Package com.google.cloud.dialogflow.v2
Class Tool.Authentication.OAuthConfig.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Tool.Authentication.OAuthConfig.Builder>
com.google.cloud.dialogflow.v2.Tool.Authentication.OAuthConfig.Builder
- All Implemented Interfaces:
Tool.Authentication.OAuthConfigOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Tool.Authentication.OAuthConfig
public static final class Tool.Authentication.OAuthConfig.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Tool.Authentication.OAuthConfig.Builder>
implements Tool.Authentication.OAuthConfigOrBuilder
Config for authentication with OAuth.Protobuf type
google.cloud.dialogflow.v2.Tool.Authentication.OAuthConfig-
Method Summary
Modifier and TypeMethodDescriptionaddAllScopes(Iterable<String> values) Optional.Optional.addScopesBytes(com.google.protobuf.ByteString value) Optional.build()clear()Required.Optional.Required.Optional.Optional.Required.Required.com.google.protobuf.ByteStringRequired.Optional.com.google.protobuf.ByteStringOptional.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorRequired.intRequired.getScopes(int index) Optional.com.google.protobuf.ByteStringgetScopesBytes(int index) Optional.intOptional.com.google.protobuf.ProtocolStringListOptional.Optional.com.google.protobuf.ByteStringOptional.Required.com.google.protobuf.ByteStringRequired.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setClientId(String value) Required.setClientIdBytes(com.google.protobuf.ByteString value) Required.setClientSecret(String value) Optional.setClientSecretBytes(com.google.protobuf.ByteString value) Optional.Required.setOauthGrantTypeValue(int value) Required.Optional.Optional.setSecretVersionForClientSecretBytes(com.google.protobuf.ByteString value) Optional.setTokenEndpoint(String value) Required.setTokenEndpointBytes(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<Tool.Authentication.OAuthConfig.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<Tool.Authentication.OAuthConfig.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<Tool.Authentication.OAuthConfig.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<Tool.Authentication.OAuthConfig.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Tool.Authentication.OAuthConfig.Builder>
-
mergeFrom
public Tool.Authentication.OAuthConfig.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<Tool.Authentication.OAuthConfig.Builder>- Throws:
IOException
-
getOauthGrantTypeValue
public int getOauthGrantTypeValue()Required. OAuth grant types.
.google.cloud.dialogflow.v2.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getOauthGrantTypeValuein interfaceTool.Authentication.OAuthConfigOrBuilder- Returns:
- The enum numeric value on the wire for oauthGrantType.
-
setOauthGrantTypeValue
Required. OAuth grant types.
.google.cloud.dialogflow.v2.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The enum numeric value on the wire for oauthGrantType to set.- Returns:
- This builder for chaining.
-
getOauthGrantType
Required. OAuth grant types.
.google.cloud.dialogflow.v2.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getOauthGrantTypein interfaceTool.Authentication.OAuthConfigOrBuilder- Returns:
- The oauthGrantType.
-
setOauthGrantType
public Tool.Authentication.OAuthConfig.Builder setOauthGrantType(Tool.Authentication.OAuthConfig.OauthGrantType value) Required. OAuth grant types.
.google.cloud.dialogflow.v2.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The oauthGrantType to set.- Returns:
- This builder for chaining.
-
clearOauthGrantType
Required. OAuth grant types.
.google.cloud.dialogflow.v2.Tool.Authentication.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
getClientId
Required. The client ID from the OAuth provider.
string client_id = 2 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getClientIdin interfaceTool.Authentication.OAuthConfigOrBuilder- Returns:
- The clientId.
-
getClientIdBytes
public com.google.protobuf.ByteString getClientIdBytes()Required. The client ID from the OAuth provider.
string client_id = 2 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getClientIdBytesin interfaceTool.Authentication.OAuthConfigOrBuilder- Returns:
- The bytes for clientId.
-
setClientId
Required. The client ID from the OAuth provider.
string client_id = 2 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The clientId to set.- Returns:
- This builder for chaining.
-
clearClientId
Required. The client ID from the OAuth provider.
string client_id = 2 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
setClientIdBytes
public Tool.Authentication.OAuthConfig.Builder setClientIdBytes(com.google.protobuf.ByteString value) Required. The client ID from the OAuth provider.
string client_id = 2 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The bytes for clientId to set.- Returns:
- This builder for chaining.
-
getClientSecret
Optional. The client secret from the OAuth provider. If the `secret_version_for_client_secret` field is set, this field will be ignored.
string client_secret = 3 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getClientSecretin interfaceTool.Authentication.OAuthConfigOrBuilder- Returns:
- The clientSecret.
-
getClientSecretBytes
public com.google.protobuf.ByteString getClientSecretBytes()Optional. The client secret from the OAuth provider. If the `secret_version_for_client_secret` field is set, this field will be ignored.
string client_secret = 3 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getClientSecretBytesin interfaceTool.Authentication.OAuthConfigOrBuilder- Returns:
- The bytes for clientSecret.
-
setClientSecret
Optional. The client secret from the OAuth provider. If the `secret_version_for_client_secret` field is set, this field will be ignored.
string client_secret = 3 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The clientSecret to set.- Returns:
- This builder for chaining.
-
clearClientSecret
Optional. The client secret from the OAuth provider. If the `secret_version_for_client_secret` field is set, this field will be ignored.
string client_secret = 3 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-
setClientSecretBytes
public Tool.Authentication.OAuthConfig.Builder setClientSecretBytes(com.google.protobuf.ByteString value) Optional. The client secret from the OAuth provider. If the `secret_version_for_client_secret` field is set, this field will be ignored.
string client_secret = 3 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The bytes for clientSecret to set.- Returns:
- This builder for chaining.
-
getSecretVersionForClientSecret
Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}`string secret_version_for_client_secret = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }- Specified by:
getSecretVersionForClientSecretin interfaceTool.Authentication.OAuthConfigOrBuilder- Returns:
- The secretVersionForClientSecret.
-
getSecretVersionForClientSecretBytes
public com.google.protobuf.ByteString getSecretVersionForClientSecretBytes()Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}`string secret_version_for_client_secret = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }- Specified by:
getSecretVersionForClientSecretBytesin interfaceTool.Authentication.OAuthConfigOrBuilder- Returns:
- The bytes for secretVersionForClientSecret.
-
setSecretVersionForClientSecret
Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}`string secret_version_for_client_secret = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }- Parameters:
value- The secretVersionForClientSecret to set.- Returns:
- This builder for chaining.
-
clearSecretVersionForClientSecret
Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}`string secret_version_for_client_secret = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }- Returns:
- This builder for chaining.
-
setSecretVersionForClientSecretBytes
public Tool.Authentication.OAuthConfig.Builder setSecretVersionForClientSecretBytes(com.google.protobuf.ByteString value) Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}`string secret_version_for_client_secret = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }- Parameters:
value- The bytes for secretVersionForClientSecret to set.- Returns:
- This builder for chaining.
-
getTokenEndpoint
Required. The token endpoint in the OAuth provider to exchange for an access token.
string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getTokenEndpointin interfaceTool.Authentication.OAuthConfigOrBuilder- Returns:
- The tokenEndpoint.
-
getTokenEndpointBytes
public com.google.protobuf.ByteString getTokenEndpointBytes()Required. The token endpoint in the OAuth provider to exchange for an access token.
string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getTokenEndpointBytesin interfaceTool.Authentication.OAuthConfigOrBuilder- Returns:
- The bytes for tokenEndpoint.
-
setTokenEndpoint
Required. The token endpoint in the OAuth provider to exchange for an access token.
string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The tokenEndpoint to set.- Returns:
- This builder for chaining.
-
clearTokenEndpoint
Required. The token endpoint in the OAuth provider to exchange for an access token.
string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
setTokenEndpointBytes
public Tool.Authentication.OAuthConfig.Builder setTokenEndpointBytes(com.google.protobuf.ByteString value) Required. The token endpoint in the OAuth provider to exchange for an access token.
string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The bytes for tokenEndpoint to set.- Returns:
- This builder for chaining.
-
getScopesList
public com.google.protobuf.ProtocolStringList getScopesList()Optional. The OAuth scopes to grant.
repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getScopesListin interfaceTool.Authentication.OAuthConfigOrBuilder- Returns:
- A list containing the scopes.
-
getScopesCount
public int getScopesCount()Optional. The OAuth scopes to grant.
repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getScopesCountin interfaceTool.Authentication.OAuthConfigOrBuilder- Returns:
- The count of scopes.
-
getScopes
Optional. The OAuth scopes to grant.
repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getScopesin interfaceTool.Authentication.OAuthConfigOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The scopes at the given index.
-
getScopesBytes
public com.google.protobuf.ByteString getScopesBytes(int index) Optional. The OAuth scopes to grant.
repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getScopesBytesin interfaceTool.Authentication.OAuthConfigOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the scopes at the given index.
-
setScopes
Optional. The OAuth scopes to grant.
repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
index- The index to set the value at.value- The scopes to set.- Returns:
- This builder for chaining.
-
addScopes
Optional. The OAuth scopes to grant.
repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The scopes to add.- Returns:
- This builder for chaining.
-
addAllScopes
Optional. The OAuth scopes to grant.
repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
values- The scopes to add.- Returns:
- This builder for chaining.
-
clearScopes
Optional. The OAuth scopes to grant.
repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-
addScopesBytes
Optional. The OAuth scopes to grant.
repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The bytes of the scopes to add.- Returns:
- This builder for chaining.
-