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 Details

    • WorkspaceConnectionOAuth2

      public WorkspaceConnectionOAuth2()
      Creates an instance of WorkspaceConnectionOAuth2 class.
  • Method Details

    • authUrl

      public String authUrl()
      Get the authUrl property: Required by Concur connection category.
      Returns:
      the authUrl value.
    • withAuthUrl

      public WorkspaceConnectionOAuth2 withAuthUrl(String authUrl)
      Set the authUrl property: Required by Concur connection category.
      Parameters:
      authUrl - the authUrl value to set.
      Returns:
      the WorkspaceConnectionOAuth2 object itself.
    • clientId

      public UUID clientId()
      Get the clientId property: Client id in the format of UUID.
      Returns:
      the clientId value.
    • withClientId

      public WorkspaceConnectionOAuth2 withClientId(UUID clientId)
      Set the clientId property: Client id in the format of UUID.
      Parameters:
      clientId - the clientId value to set.
      Returns:
      the WorkspaceConnectionOAuth2 object itself.
    • clientSecret

      public String clientSecret()
      Get the clientSecret property: The clientSecret property.
      Returns:
      the clientSecret value.
    • withClientSecret

      public WorkspaceConnectionOAuth2 withClientSecret(String clientSecret)
      Set the clientSecret property: The clientSecret property.
      Parameters:
      clientSecret - the clientSecret value to set.
      Returns:
      the WorkspaceConnectionOAuth2 object itself.
    • developerToken

      public String developerToken()
      Get the developerToken property: Required by GoogleAdWords connection category.
      Returns:
      the developerToken value.
    • withDeveloperToken

      public WorkspaceConnectionOAuth2 withDeveloperToken(String developerToken)
      Set the developerToken property: Required by GoogleAdWords connection category.
      Parameters:
      developerToken - the developerToken value to set.
      Returns:
      the WorkspaceConnectionOAuth2 object itself.
    • password

      public String password()
      Get the password property: The password property.
      Returns:
      the password value.
    • withPassword

      public WorkspaceConnectionOAuth2 withPassword(String password)
      Set the password property: The password property.
      Parameters:
      password - the password value to set.
      Returns:
      the WorkspaceConnectionOAuth2 object itself.
    • refreshToken

      public String 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

      public WorkspaceConnectionOAuth2 withRefreshToken(String refreshToken)
      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

      public String tenantId()
      Get the tenantId property: Required by QuickBooks and Xero connection categories.
      Returns:
      the tenantId value.
    • withTenantId

      public WorkspaceConnectionOAuth2 withTenantId(String tenantId)
      Set the tenantId property: Required by QuickBooks and Xero connection categories.
      Parameters:
      tenantId - the tenantId value to set.
      Returns:
      the WorkspaceConnectionOAuth2 object itself.
    • username

      public String username()
      Get the username property: Concur, ServiceNow auth server AccessToken grant type is 'Password' which requires UsernamePassword.
      Returns:
      the username value.
    • withUsername

      public WorkspaceConnectionOAuth2 withUsername(String username)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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.