"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.instanceOfDeviceUserBinding = instanceOfDeviceUserBinding;
exports.DeviceUserBindingFromJSON = DeviceUserBindingFromJSON;
exports.DeviceUserBindingFromJSONTyped = DeviceUserBindingFromJSONTyped;
exports.DeviceUserBindingToJSON = DeviceUserBindingToJSON;
exports.DeviceUserBindingToJSONTyped = DeviceUserBindingToJSONTyped;
const PartialUser_1 = require("./PartialUser");
const Policy_1 = require("./Policy");
const Connector_1 = require("./Connector");
const PartialGroup_1 = require("./PartialGroup");
/**
 * Check if a given object implements the DeviceUserBinding interface.
 */
function instanceOfDeviceUserBinding(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;
    if (!('connector' in value) || value['connector'] === undefined)
        return false;
    if (!('connectorObj' in value) || value['connectorObj'] === undefined)
        return false;
    return true;
}
function DeviceUserBindingFromJSON(json) {
    return DeviceUserBindingFromJSONTyped(json, false);
}
function DeviceUserBindingFromJSONTyped(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, PartialGroup_1.PartialGroupFromJSON)(json['group_obj']),
        'userObj': (0, PartialUser_1.PartialUserFromJSON)(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'],
        'isPrimary': json['is_primary'] == null ? undefined : json['is_primary'],
        'connector': json['connector'],
        'connectorObj': (0, Connector_1.ConnectorFromJSON)(json['connector_obj']),
    };
}
function DeviceUserBindingToJSON(json) {
    return DeviceUserBindingToJSONTyped(json, false);
}
function DeviceUserBindingToJSONTyped(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'],
        'is_primary': value['isPrimary'],
    };
}
//# sourceMappingURL=DeviceUserBinding.js.map