Class WorkspaceConnectionOAuth2
java.lang.Object
com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionOAuth2
- All Implemented Interfaces:
com.azure.json.JsonSerializable<WorkspaceConnectionOAuth2>
public final class WorkspaceConnectionOAuth2
extends Object
implements com.azure.json.JsonSerializable<WorkspaceConnectionOAuth2>
ClientId and ClientSecret are required. Other properties are optional
depending on each OAuth2 provider's implementation.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of WorkspaceConnectionOAuth2 class. -
Method Summary
Modifier and TypeMethodDescriptionauthUrl()Get the authUrl property: Required by Concur connection category.clientId()Get the clientId property: Client id in the format of UUID.Get the clientSecret property: The clientSecret property.Get the developerToken property: Required by GoogleAdWords connection category.static WorkspaceConnectionOAuth2fromJson(com.azure.json.JsonReader jsonReader) Reads an instance of WorkspaceConnectionOAuth2 from the JsonReader.password()Get the password property: The password property.Get the refreshToken property: Required by GoogleBigQuery, GoogleAdWords, Hubspot, QuickBooks, Square, Xero, Zoho where user needs to get RefreshToken offline.tenantId()Get the tenantId property: Required by QuickBooks and Xero connection categories.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) username()Get the username property: Concur, ServiceNow auth server AccessToken grant type is 'Password' which requires UsernamePassword.voidvalidate()Validates the instance.withAuthUrl(String authUrl) Set the authUrl property: Required by Concur connection category.withClientId(UUID clientId) Set the clientId property: Client id in the format of UUID.withClientSecret(String clientSecret) Set the clientSecret property: The clientSecret property.withDeveloperToken(String developerToken) Set the developerToken property: Required by GoogleAdWords connection category.withPassword(String password) Set the password property: The password property.withRefreshToken(String refreshToken) Set the refreshToken property: Required by GoogleBigQuery, GoogleAdWords, Hubspot, QuickBooks, Square, Xero, Zoho where user needs to get RefreshToken offline.withTenantId(String tenantId) Set the tenantId property: Required by QuickBooks and Xero connection categories.withUsername(String username) Set the username property: Concur, ServiceNow auth server AccessToken grant type is 'Password' which requires UsernamePassword.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
WorkspaceConnectionOAuth2
public WorkspaceConnectionOAuth2()Creates an instance of WorkspaceConnectionOAuth2 class.
-
-
Method Details
-
authUrl
Get the authUrl property: Required by Concur connection category.- Returns:
- the authUrl value.
-
withAuthUrl
Set the authUrl property: Required by Concur connection category.- Parameters:
authUrl- the authUrl value to set.- Returns:
- the WorkspaceConnectionOAuth2 object itself.
-
clientId
Get the clientId property: Client id in the format of UUID.- Returns:
- the clientId value.
-
withClientId
Set the clientId property: Client id in the format of UUID.- Parameters:
clientId- the clientId value to set.- Returns:
- the WorkspaceConnectionOAuth2 object itself.
-
clientSecret
Get the clientSecret property: The clientSecret property.- Returns:
- the clientSecret value.
-
withClientSecret
Set the clientSecret property: The clientSecret property.- Parameters:
clientSecret- the clientSecret value to set.- Returns:
- the WorkspaceConnectionOAuth2 object itself.
-
developerToken
Get the developerToken property: Required by GoogleAdWords connection category.- Returns:
- the developerToken value.
-
withDeveloperToken
Set the developerToken property: Required by GoogleAdWords connection category.- Parameters:
developerToken- the developerToken value to set.- Returns:
- the WorkspaceConnectionOAuth2 object itself.
-
password
Get the password property: The password property.- Returns:
- the password value.
-
withPassword
Set the password property: The password property.- Parameters:
password- the password value to set.- Returns:
- the WorkspaceConnectionOAuth2 object itself.
-
refreshToken
Get the refreshToken property: Required by GoogleBigQuery, GoogleAdWords, Hubspot, QuickBooks, Square, Xero, Zoho where user needs to get RefreshToken offline.- Returns:
- the refreshToken value.
-
withRefreshToken
Set the refreshToken property: Required by GoogleBigQuery, GoogleAdWords, Hubspot, QuickBooks, Square, Xero, Zoho where user needs to get RefreshToken offline.- Parameters:
refreshToken- the refreshToken value to set.- Returns:
- the WorkspaceConnectionOAuth2 object itself.
-
tenantId
Get the tenantId property: Required by QuickBooks and Xero connection categories.- Returns:
- the tenantId value.
-
withTenantId
Set the tenantId property: Required by QuickBooks and Xero connection categories.- Parameters:
tenantId- the tenantId value to set.- Returns:
- the WorkspaceConnectionOAuth2 object itself.
-
username
Get the username property: Concur, ServiceNow auth server AccessToken grant type is 'Password' which requires UsernamePassword.- Returns:
- the username value.
-
withUsername
Set the username property: Concur, ServiceNow auth server AccessToken grant type is 'Password' which requires UsernamePassword.- Parameters:
username- the username value to set.- Returns:
- the WorkspaceConnectionOAuth2 object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<WorkspaceConnectionOAuth2>- Throws:
IOException
-
fromJson
public static WorkspaceConnectionOAuth2 fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of WorkspaceConnectionOAuth2 from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of WorkspaceConnectionOAuth2 if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the WorkspaceConnectionOAuth2.
-