"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.2.2-rc1
 * Contact: hello@goauthentik.io
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfUsedBy = instanceOfUsedBy;
exports.UsedByFromJSON = UsedByFromJSON;
exports.UsedByFromJSONTyped = UsedByFromJSONTyped;
exports.UsedByToJSON = UsedByToJSON;
exports.UsedByToJSONTyped = UsedByToJSONTyped;
const UsedByActionEnum_1 = require("./UsedByActionEnum");
/**
 * Check if a given object implements the UsedBy interface.
 */
function instanceOfUsedBy(value) {
    if (!('app' in value) || value['app'] === undefined)
        return false;
    if (!('modelName' in value) || value['modelName'] === undefined)
        return false;
    if (!('pk' in value) || value['pk'] === undefined)
        return false;
    if (!('name' in value) || value['name'] === undefined)
        return false;
    if (!('action' in value) || value['action'] === undefined)
        return false;
    return true;
}
function UsedByFromJSON(json) {
    return UsedByFromJSONTyped(json, false);
}
function UsedByFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'app': json['app'],
        'modelName': json['model_name'],
        'pk': json['pk'],
        'name': json['name'],
        'action': (0, UsedByActionEnum_1.UsedByActionEnumFromJSON)(json['action']),
    };
}
function UsedByToJSON(json) {
    return UsedByToJSONTyped(json, false);
}
function UsedByToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'app': value['app'],
        'model_name': value['modelName'],
        'pk': value['pk'],
        'name': value['name'],
        'action': (0, UsedByActionEnum_1.UsedByActionEnumToJSON)(value['action']),
    };
}
//# sourceMappingURL=UsedBy.js.map