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 Summary
ConstructorsConstructorDescriptionCreates an instance of SourceControlSecurityTokenProperties class. -
Method Summary
Modifier and TypeMethodDescriptionGet the accessToken property: The access token.fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of SourceControlSecurityTokenProperties from the JsonReader.Get the refreshToken property: The refresh token.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) Get the tokenType property: The token type.void
validate()
Validates the instance.withAccessToken
(String accessToken) Set the accessToken property: The access token.withRefreshToken
(String refreshToken) Set the refreshToken property: The refresh token.withTokenType
(TokenType tokenType) Set the tokenType property: The token type.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
SourceControlSecurityTokenProperties
public SourceControlSecurityTokenProperties()Creates an instance of SourceControlSecurityTokenProperties class.
-
-
Method Details
-
accessToken
Get the accessToken property: The access token.- Returns:
- the accessToken value.
-
withAccessToken
Set the accessToken property: The access token.- Parameters:
accessToken
- the accessToken value to set.- Returns:
- the SourceControlSecurityTokenProperties object itself.
-
refreshToken
Get the refreshToken property: The refresh token.- Returns:
- the refreshToken value.
-
withRefreshToken
Set the refreshToken property: The refresh token.- Parameters:
refreshToken
- the refreshToken value to set.- Returns:
- the SourceControlSecurityTokenProperties object itself.
-
tokenType
Get the tokenType property: The token type. Must be either PersonalAccessToken or Oauth.- Returns:
- the tokenType value.
-
withTokenType
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
- Specified by:
toJson
in interfacecom.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.
-