// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.automation.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The SourceControlSecurityTokenProperties model. */
@Fluent
public final class SourceControlSecurityTokenProperties {
    /*
     * The access token.
     */
    @JsonProperty(value = "accessToken")
    private String accessToken;

    /*
     * The refresh token.
     */
    @JsonProperty(value = "refreshToken")
    private String refreshToken;

    /*
     * The token type. Must be either PersonalAccessToken or Oauth.
     */
    @JsonProperty(value = "tokenType")
    private TokenType tokenType;

    /**
     * Get the accessToken property: The access token.
     *
     * @return the accessToken value.
     */
    public String accessToken() {
        return this.accessToken;
    }

    /**
     * Set the accessToken property: The access token.
     *
     * @param accessToken the accessToken value to set.
     * @return the SourceControlSecurityTokenProperties object itself.
     */
    public SourceControlSecurityTokenProperties withAccessToken(String accessToken) {
        this.accessToken = accessToken;
        return this;
    }

    /**
     * Get the refreshToken property: The refresh token.
     *
     * @return the refreshToken value.
     */
    public String refreshToken() {
        return this.refreshToken;
    }

    /**
     * Set the refreshToken property: The refresh token.
     *
     * @param refreshToken the refreshToken value to set.
     * @return the SourceControlSecurityTokenProperties object itself.
     */
    public SourceControlSecurityTokenProperties withRefreshToken(String refreshToken) {
        this.refreshToken = refreshToken;
        return this;
    }

    /**
     * Get the tokenType property: The token type. Must be either PersonalAccessToken or Oauth.
     *
     * @return the tokenType value.
     */
    public TokenType tokenType() {
        return this.tokenType;
    }

    /**
     * Set the tokenType property: The token type. Must be either PersonalAccessToken or Oauth.
     *
     * @param tokenType the tokenType value to set.
     * @return the SourceControlSecurityTokenProperties object itself.
     */
    public SourceControlSecurityTokenProperties withTokenType(TokenType tokenType) {
        this.tokenType = tokenType;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
    }
}
