"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * Montelo
 * Documentation for the Montelo API.
 *
 * The version of the OpenAPI document: 1.0
 *
 *
 * 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.SubscriptionDtoToJSON = exports.SubscriptionDtoFromJSONTyped = exports.SubscriptionDtoFromJSON = exports.instanceOfSubscriptionDto = void 0;
const runtime_1 = require("../runtime");
/**
 * Check if a given object implements the SubscriptionDto interface.
 */
function instanceOfSubscriptionDto(value) {
    let isInstance = true;
    isInstance = isInstance && "id" in value;
    isInstance = isInstance && "stripeCustomerId" in value;
    isInstance = isInstance && "plan" in value;
    isInstance = isInstance && "createdAt" in value;
    isInstance = isInstance && "updatedAt" in value;
    return isInstance;
}
exports.instanceOfSubscriptionDto = instanceOfSubscriptionDto;
function SubscriptionDtoFromJSON(json) {
    return SubscriptionDtoFromJSONTyped(json, false);
}
exports.SubscriptionDtoFromJSON = SubscriptionDtoFromJSON;
function SubscriptionDtoFromJSONTyped(json, ignoreDiscriminator) {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        'id': json['id'],
        'userId': !(0, runtime_1.exists)(json, 'userId') ? undefined : json['userId'],
        'orgId': !(0, runtime_1.exists)(json, 'orgId') ? undefined : json['orgId'],
        'stripeCustomerId': json['stripeCustomerId'],
        'plan': json['plan'],
        'stripeSubscriptionId': !(0, runtime_1.exists)(json, 'stripeSubscriptionId') ? undefined : json['stripeSubscriptionId'],
        'details': !(0, runtime_1.exists)(json, 'details') ? undefined : json['details'],
        'createdAt': json['createdAt'],
        'updatedAt': json['updatedAt'],
    };
}
exports.SubscriptionDtoFromJSONTyped = SubscriptionDtoFromJSONTyped;
function SubscriptionDtoToJSON(value) {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        'id': value.id,
        'userId': value.userId,
        'orgId': value.orgId,
        'stripeCustomerId': value.stripeCustomerId,
        'plan': value.plan,
        'stripeSubscriptionId': value.stripeSubscriptionId,
        'details': value.details,
        'createdAt': value.createdAt,
        'updatedAt': value.updatedAt,
    };
}
exports.SubscriptionDtoToJSON = SubscriptionDtoToJSON;
