"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2026.2.0-rc5
 * 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.instanceOfLifecycleRule = instanceOfLifecycleRule;
exports.LifecycleRuleFromJSON = LifecycleRuleFromJSON;
exports.LifecycleRuleFromJSONTyped = LifecycleRuleFromJSONTyped;
exports.LifecycleRuleToJSON = LifecycleRuleToJSON;
exports.LifecycleRuleToJSONTyped = LifecycleRuleToJSONTyped;
const ReviewerUser_1 = require("./ReviewerUser");
const ReviewerGroup_1 = require("./ReviewerGroup");
const ContentTypeEnum_1 = require("./ContentTypeEnum");
/**
 * Check if a given object implements the LifecycleRule interface.
 */
function instanceOfLifecycleRule(value) {
    if (!('id' in value) || value['id'] === undefined)
        return false;
    if (!('name' in value) || value['name'] === undefined)
        return false;
    if (!('contentType' in value) || value['contentType'] === undefined)
        return false;
    if (!('reviewerGroupsObj' in value) || value['reviewerGroupsObj'] === undefined)
        return false;
    if (!('reviewers' in value) || value['reviewers'] === undefined)
        return false;
    if (!('reviewersObj' in value) || value['reviewersObj'] === undefined)
        return false;
    if (!('targetVerbose' in value) || value['targetVerbose'] === undefined)
        return false;
    return true;
}
function LifecycleRuleFromJSON(json) {
    return LifecycleRuleFromJSONTyped(json, false);
}
function LifecycleRuleFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'id': json['id'],
        'name': json['name'],
        'contentType': (0, ContentTypeEnum_1.ContentTypeEnumFromJSON)(json['content_type']),
        'objectId': json['object_id'] == null ? undefined : json['object_id'],
        'interval': json['interval'] == null ? undefined : json['interval'],
        'gracePeriod': json['grace_period'] == null ? undefined : json['grace_period'],
        'reviewerGroups': json['reviewer_groups'] == null ? undefined : json['reviewer_groups'],
        'reviewerGroupsObj': (json['reviewer_groups_obj'].map(ReviewerGroup_1.ReviewerGroupFromJSON)),
        'minReviewers': json['min_reviewers'] == null ? undefined : json['min_reviewers'],
        'minReviewersIsPerGroup': json['min_reviewers_is_per_group'] == null ? undefined : json['min_reviewers_is_per_group'],
        'reviewers': json['reviewers'],
        'reviewersObj': (json['reviewers_obj'].map(ReviewerUser_1.ReviewerUserFromJSON)),
        'notificationTransports': json['notification_transports'] == null ? undefined : json['notification_transports'],
        'targetVerbose': json['target_verbose'],
    };
}
function LifecycleRuleToJSON(json) {
    return LifecycleRuleToJSONTyped(json, false);
}
function LifecycleRuleToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'name': value['name'],
        'content_type': (0, ContentTypeEnum_1.ContentTypeEnumToJSON)(value['contentType']),
        'object_id': value['objectId'],
        'interval': value['interval'],
        'grace_period': value['gracePeriod'],
        'reviewer_groups': value['reviewerGroups'],
        'min_reviewers': value['minReviewers'],
        'min_reviewers_is_per_group': value['minReviewersIsPerGroup'],
        'reviewers': value['reviewers'],
        'notification_transports': value['notificationTransports'],
    };
}
//# sourceMappingURL=LifecycleRule.js.map