"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.instanceOfLifecycleIteration = instanceOfLifecycleIteration;
exports.LifecycleIterationFromJSON = LifecycleIterationFromJSON;
exports.LifecycleIterationFromJSONTyped = LifecycleIterationFromJSONTyped;
exports.LifecycleIterationToJSON = LifecycleIterationToJSON;
exports.LifecycleIterationToJSONTyped = LifecycleIterationToJSONTyped;
const ReviewerUser_1 = require("./ReviewerUser");
const ReviewerGroup_1 = require("./ReviewerGroup");
const ContentTypeEnum_1 = require("./ContentTypeEnum");
const Review_1 = require("./Review");
const LifecycleIterationStateEnum_1 = require("./LifecycleIterationStateEnum");
/**
 * Check if a given object implements the LifecycleIteration interface.
 */
function instanceOfLifecycleIteration(value) {
    if (!('id' in value) || value['id'] === undefined)
        return false;
    if (!('contentType' in value) || value['contentType'] === undefined)
        return false;
    if (!('objectId' in value) || value['objectId'] === undefined)
        return false;
    if (!('objectVerbose' in value) || value['objectVerbose'] === undefined)
        return false;
    if (!('objectAdminUrl' in value) || value['objectAdminUrl'] === undefined)
        return false;
    if (!('state' in value) || value['state'] === undefined)
        return false;
    if (!('openedOn' in value) || value['openedOn'] === undefined)
        return false;
    if (!('gracePeriodEnd' in value) || value['gracePeriodEnd'] === undefined)
        return false;
    if (!('nextReviewDate' in value) || value['nextReviewDate'] === undefined)
        return false;
    if (!('reviews' in value) || value['reviews'] === undefined)
        return false;
    if (!('userCanReview' in value) || value['userCanReview'] === undefined)
        return false;
    if (!('reviewerGroups' in value) || value['reviewerGroups'] === undefined)
        return false;
    if (!('minReviewers' in value) || value['minReviewers'] === undefined)
        return false;
    if (!('reviewers' in value) || value['reviewers'] === undefined)
        return false;
    return true;
}
function LifecycleIterationFromJSON(json) {
    return LifecycleIterationFromJSONTyped(json, false);
}
function LifecycleIterationFromJSONTyped(json, ignoreDiscriminator) {
    if (json == null) {
        return json;
    }
    return {
        'id': json['id'],
        'contentType': (0, ContentTypeEnum_1.ContentTypeEnumFromJSON)(json['content_type']),
        'objectId': json['object_id'],
        'objectVerbose': json['object_verbose'],
        'objectAdminUrl': json['object_admin_url'],
        'state': (0, LifecycleIterationStateEnum_1.LifecycleIterationStateEnumFromJSON)(json['state']),
        'openedOn': (new Date(json['opened_on'])),
        'gracePeriodEnd': (new Date(json['grace_period_end'])),
        'nextReviewDate': (new Date(json['next_review_date'])),
        'reviews': (json['reviews'].map(Review_1.ReviewFromJSON)),
        'userCanReview': json['user_can_review'],
        'reviewerGroups': (json['reviewer_groups'].map(ReviewerGroup_1.ReviewerGroupFromJSON)),
        'minReviewers': json['min_reviewers'],
        'reviewers': (json['reviewers'].map(ReviewerUser_1.ReviewerUserFromJSON)),
    };
}
function LifecycleIterationToJSON(json) {
    return LifecycleIterationToJSONTyped(json, false);
}
function LifecycleIterationToJSONTyped(value, ignoreDiscriminator = false) {
    if (value == null) {
        return value;
    }
    return {
        'content_type': (0, ContentTypeEnum_1.ContentTypeEnumToJSON)(value['contentType']),
    };
}
//# sourceMappingURL=LifecycleIteration.js.map