"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2025.10.0-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.instanceOfPolicyBinding = instanceOfPolicyBinding;
exports.PolicyBindingFromJSON = PolicyBindingFromJSON;
exports.PolicyBindingFromJSONTyped = PolicyBindingFromJSONTyped;
exports.PolicyBindingToJSON = PolicyBindingToJSON;
exports.PolicyBindingToJSONTyped = PolicyBindingToJSONTyped;
const Policy_1 = require("./Policy");
const Group_1 = require("./Group");
const User_1 = require("./User");
/**
 * Check if a given object implements the PolicyBinding interface.
 */
function instanceOfPolicyBinding(value) {
    if (!('pk' in value) || value['pk'] === undefined)
        return false;
    if (!('policyObj' in value) || value['policyObj'] === undefined)
        return false;
    if (!('groupObj' in value) || value['groupObj'] === undefined)
        return false;
    if (!('userObj' in value) || value['userObj'] === undefined)
        return false;
    if (!('target' in value) || value['target'] === undefined)
        return false;
    if (!('order' in value) || value['order'] === undefined)
        return false;
    return true;
}
function PolicyBindingFromJSON(json) {
    return PolicyBindingFromJSONTyped(json, false);
}
function PolicyBindingFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'pk': json['pk'],
        'policy': json['policy'] == null ? undefined : json['policy'],
        'group': json['group'] == null ? undefined : json['group'],
        'user': json['user'] == null ? undefined : json['user'],
        'policyObj': (0, Policy_1.PolicyFromJSON)(json['policy_obj']),
        'groupObj': (0, Group_1.GroupFromJSON)(json['group_obj']),
        'userObj': (0, User_1.UserFromJSON)(json['user_obj']),
        'target': json['target'],
        'negate': json['negate'] == null ? undefined : json['negate'],
        'enabled': json['enabled'] == null ? undefined : json['enabled'],
        'order': json['order'],
        'timeout': json['timeout'] == null ? undefined : json['timeout'],
        'failureResult': json['failure_result'] == null ? undefined : json['failure_result'],
    };
}
function PolicyBindingToJSON(json) {
    return PolicyBindingToJSONTyped(json, false);
}
function PolicyBindingToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'policy': value['policy'],
        'group': value['group'],
        'user': value['user'],
        'target': value['target'],
        'negate': value['negate'],
        'enabled': value['enabled'],
        'order': value['order'],
        'timeout': value['timeout'],
        'failure_result': value['failureResult'],
    };
}
//# sourceMappingURL=PolicyBinding.js.map