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

package com.azure.resourcemanager.machinelearning.fluent.models;

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

/** Service Token. */
@Fluent
public final class EndpointAuthTokenInner {
    /*
     * Access token for endpoint authentication.
     */
    @JsonProperty(value = "accessToken")
    private String accessToken;

    /*
     * Access token expiry time (UTC).
     */
    @JsonProperty(value = "expiryTimeUtc")
    private Long expiryTimeUtc;

    /*
     * Refresh access token after time (UTC).
     */
    @JsonProperty(value = "refreshAfterTimeUtc")
    private Long refreshAfterTimeUtc;

    /*
     * Access token type.
     */
    @JsonProperty(value = "tokenType")
    private String tokenType;

    /** Creates an instance of EndpointAuthTokenInner class. */
    public EndpointAuthTokenInner() {
    }

    /**
     * Get the accessToken property: Access token for endpoint authentication.
     *
     * @return the accessToken value.
     */
    public String accessToken() {
        return this.accessToken;
    }

    /**
     * Set the accessToken property: Access token for endpoint authentication.
     *
     * @param accessToken the accessToken value to set.
     * @return the EndpointAuthTokenInner object itself.
     */
    public EndpointAuthTokenInner withAccessToken(String accessToken) {
        this.accessToken = accessToken;
        return this;
    }

    /**
     * Get the expiryTimeUtc property: Access token expiry time (UTC).
     *
     * @return the expiryTimeUtc value.
     */
    public Long expiryTimeUtc() {
        return this.expiryTimeUtc;
    }

    /**
     * Set the expiryTimeUtc property: Access token expiry time (UTC).
     *
     * @param expiryTimeUtc the expiryTimeUtc value to set.
     * @return the EndpointAuthTokenInner object itself.
     */
    public EndpointAuthTokenInner withExpiryTimeUtc(Long expiryTimeUtc) {
        this.expiryTimeUtc = expiryTimeUtc;
        return this;
    }

    /**
     * Get the refreshAfterTimeUtc property: Refresh access token after time (UTC).
     *
     * @return the refreshAfterTimeUtc value.
     */
    public Long refreshAfterTimeUtc() {
        return this.refreshAfterTimeUtc;
    }

    /**
     * Set the refreshAfterTimeUtc property: Refresh access token after time (UTC).
     *
     * @param refreshAfterTimeUtc the refreshAfterTimeUtc value to set.
     * @return the EndpointAuthTokenInner object itself.
     */
    public EndpointAuthTokenInner withRefreshAfterTimeUtc(Long refreshAfterTimeUtc) {
        this.refreshAfterTimeUtc = refreshAfterTimeUtc;
        return this;
    }

    /**
     * Get the tokenType property: Access token type.
     *
     * @return the tokenType value.
     */
    public String tokenType() {
        return this.tokenType;
    }

    /**
     * Set the tokenType property: Access token type.
     *
     * @param tokenType the tokenType value to set.
     * @return the EndpointAuthTokenInner object itself.
     */
    public EndpointAuthTokenInner withTokenType(String tokenType) {
        this.tokenType = tokenType;
        return this;
    }

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