Class SourceControlSecurityTokenProperties

java.lang.Object
com.azure.resourcemanager.automation.models.SourceControlSecurityTokenProperties
All Implemented Interfaces:
com.azure.json.JsonSerializable<SourceControlSecurityTokenProperties>

public final class SourceControlSecurityTokenProperties extends Object implements com.azure.json.JsonSerializable<SourceControlSecurityTokenProperties>
The SourceControlSecurityTokenProperties model.
  • Constructor Details

    • SourceControlSecurityTokenProperties

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

    • accessToken

      public String accessToken()
      Get the accessToken property: The access token.
      Returns:
      the accessToken value.
    • withAccessToken

      public SourceControlSecurityTokenProperties withAccessToken(String accessToken)
      Set the accessToken property: The access token.
      Parameters:
      accessToken - the accessToken value to set.
      Returns:
      the SourceControlSecurityTokenProperties object itself.
    • refreshToken

      public String refreshToken()
      Get the refreshToken property: The refresh token.
      Returns:
      the refreshToken value.
    • withRefreshToken

      public SourceControlSecurityTokenProperties withRefreshToken(String refreshToken)
      Set the refreshToken property: The refresh token.
      Parameters:
      refreshToken - the refreshToken value to set.
      Returns:
      the SourceControlSecurityTokenProperties object itself.
    • tokenType

      public TokenType tokenType()
      Get the tokenType property: The token type. Must be either PersonalAccessToken or Oauth.
      Returns:
      the tokenType value.
    • withTokenType

      public SourceControlSecurityTokenProperties withTokenType(TokenType tokenType)
      Set the tokenType property: The token type. Must be either PersonalAccessToken or Oauth.
      Parameters:
      tokenType - the tokenType value to set.
      Returns:
      the SourceControlSecurityTokenProperties 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<SourceControlSecurityTokenProperties>
      Throws:
      IOException
    • fromJson

      public static SourceControlSecurityTokenProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of SourceControlSecurityTokenProperties from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of SourceControlSecurityTokenProperties 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 SourceControlSecurityTokenProperties.