/* tslint:disable */
/* eslint-disable */
/**
 * Synapse REST API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: v1
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
import { mapValues } from '../runtime';
import { OIDCClaimsRequestDetailsFromJSON, OIDCClaimsRequestDetailsToJSON, } from './OIDCClaimsRequestDetails';
/**
 * @export
 */
export const AccessTokenRecordScopesEnum = {
    openid: 'openid',
    email: 'email',
    profile: 'profile',
    ga4gh_passport_v1: 'ga4gh_passport_v1',
    view: 'view',
    download: 'download',
    modify: 'modify',
    authorize: 'authorize',
    offline_access: 'offline_access'
};
/**
 * @export
 */
export const AccessTokenRecordStateEnum = {
    ACTIVE: 'ACTIVE',
    EXPIRED: 'EXPIRED'
};
/**
 * Check if a given object implements the AccessTokenRecord interface.
 */
export function instanceOfAccessTokenRecord(value) {
    return true;
}
export function AccessTokenRecordFromJSON(json) {
    return AccessTokenRecordFromJSONTyped(json, false);
}
export function AccessTokenRecordFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'id': json['id'] == null ? undefined : json['id'],
        'userId': json['userId'] == null ? undefined : json['userId'],
        'scopes': json['scopes'] == null ? undefined : json['scopes'],
        'userInfoClaims': json['userInfoClaims'] == null ? undefined : (mapValues(json['userInfoClaims'], OIDCClaimsRequestDetailsFromJSON)),
        'name': json['name'] == null ? undefined : json['name'],
        'createdOn': json['createdOn'] == null ? undefined : json['createdOn'],
        'lastUsed': json['lastUsed'] == null ? undefined : json['lastUsed'],
        'state': json['state'] == null ? undefined : json['state'],
    };
}
export function AccessTokenRecordToJSON(json) {
    return AccessTokenRecordToJSONTyped(json, false);
}
export function AccessTokenRecordToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'id': value['id'],
        'userId': value['userId'],
        'scopes': value['scopes'],
        'userInfoClaims': value['userInfoClaims'] == null ? undefined : (mapValues(value['userInfoClaims'], OIDCClaimsRequestDetailsToJSON)),
        'name': value['name'],
        'createdOn': value['createdOn'],
        'lastUsed': value['lastUsed'],
        'state': value['state'],
    };
}
//# sourceMappingURL=AccessTokenRecord.js.map