"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.Folders$ = exports.Folders$outboundSchema = exports.Folders$inboundSchema = exports.IsRoot$ = exports.IsRoot$outboundSchema = exports.IsRoot$inboundSchema = exports.FoldersSchemasIsRoot2$ = exports.FoldersSchemasIsRoot2$outboundSchema = exports.FoldersSchemasIsRoot2$inboundSchema = exports.FoldersHasContent$ = exports.FoldersHasContent$outboundSchema = exports.FoldersHasContent$inboundSchema = exports.FoldersSchemas2$ = exports.FoldersSchemas2$outboundSchema = exports.FoldersSchemas2$inboundSchema = exports.FoldersHasChildren$ = exports.FoldersHasChildren$outboundSchema = exports.FoldersHasChildren$inboundSchema = exports.Folders2$ = exports.Folders2$outboundSchema = exports.Folders2$inboundSchema = exports.FoldersSchemasIsRoot2 = exports.FoldersSchemas2 = exports.Folders2 = void 0;
exports.foldersHasChildrenToJSON = foldersHasChildrenToJSON;
exports.foldersHasChildrenFromJSON = foldersHasChildrenFromJSON;
exports.foldersHasContentToJSON = foldersHasContentToJSON;
exports.foldersHasContentFromJSON = foldersHasContentFromJSON;
exports.isRootToJSON = isRootToJSON;
exports.isRootFromJSON = isRootFromJSON;
exports.foldersToJSON = foldersToJSON;
exports.foldersFromJSON = foldersFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../../lib/primitives.js");
const schemas_js_1 = require("../../../lib/schemas.js");
var Folders2;
(function (Folders2) {
    Folders2["True"] = "true";
    Folders2["False"] = "false";
})(Folders2 || (exports.Folders2 = Folders2 = {}));
var FoldersSchemas2;
(function (FoldersSchemas2) {
    FoldersSchemas2["True"] = "true";
    FoldersSchemas2["False"] = "false";
})(FoldersSchemas2 || (exports.FoldersSchemas2 = FoldersSchemas2 = {}));
var FoldersSchemasIsRoot2;
(function (FoldersSchemasIsRoot2) {
    FoldersSchemasIsRoot2["True"] = "true";
    FoldersSchemasIsRoot2["False"] = "false";
})(FoldersSchemasIsRoot2 || (exports.FoldersSchemasIsRoot2 = FoldersSchemasIsRoot2 = {}));
/** @internal */
exports.Folders2$inboundSchema = z
    .nativeEnum(Folders2);
/** @internal */
exports.Folders2$outboundSchema = exports.Folders2$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Folders2$;
(function (Folders2$) {
    /** @deprecated use `Folders2$inboundSchema` instead. */
    Folders2$.inboundSchema = exports.Folders2$inboundSchema;
    /** @deprecated use `Folders2$outboundSchema` instead. */
    Folders2$.outboundSchema = exports.Folders2$outboundSchema;
})(Folders2$ || (exports.Folders2$ = Folders2$ = {}));
/** @internal */
exports.FoldersHasChildren$inboundSchema = z.union([z.boolean(), exports.Folders2$inboundSchema]);
/** @internal */
exports.FoldersHasChildren$outboundSchema = z.union([z.boolean(), exports.Folders2$outboundSchema]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var FoldersHasChildren$;
(function (FoldersHasChildren$) {
    /** @deprecated use `FoldersHasChildren$inboundSchema` instead. */
    FoldersHasChildren$.inboundSchema = exports.FoldersHasChildren$inboundSchema;
    /** @deprecated use `FoldersHasChildren$outboundSchema` instead. */
    FoldersHasChildren$.outboundSchema = exports.FoldersHasChildren$outboundSchema;
})(FoldersHasChildren$ || (exports.FoldersHasChildren$ = FoldersHasChildren$ = {}));
function foldersHasChildrenToJSON(foldersHasChildren) {
    return JSON.stringify(exports.FoldersHasChildren$outboundSchema.parse(foldersHasChildren));
}
function foldersHasChildrenFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.FoldersHasChildren$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FoldersHasChildren' from JSON`);
}
/** @internal */
exports.FoldersSchemas2$inboundSchema = z.nativeEnum(FoldersSchemas2);
/** @internal */
exports.FoldersSchemas2$outboundSchema = exports.FoldersSchemas2$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var FoldersSchemas2$;
(function (FoldersSchemas2$) {
    /** @deprecated use `FoldersSchemas2$inboundSchema` instead. */
    FoldersSchemas2$.inboundSchema = exports.FoldersSchemas2$inboundSchema;
    /** @deprecated use `FoldersSchemas2$outboundSchema` instead. */
    FoldersSchemas2$.outboundSchema = exports.FoldersSchemas2$outboundSchema;
})(FoldersSchemas2$ || (exports.FoldersSchemas2$ = FoldersSchemas2$ = {}));
/** @internal */
exports.FoldersHasContent$inboundSchema = z.union([z.boolean(), exports.FoldersSchemas2$inboundSchema]);
/** @internal */
exports.FoldersHasContent$outboundSchema = z.union([z.boolean(), exports.FoldersSchemas2$outboundSchema]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var FoldersHasContent$;
(function (FoldersHasContent$) {
    /** @deprecated use `FoldersHasContent$inboundSchema` instead. */
    FoldersHasContent$.inboundSchema = exports.FoldersHasContent$inboundSchema;
    /** @deprecated use `FoldersHasContent$outboundSchema` instead. */
    FoldersHasContent$.outboundSchema = exports.FoldersHasContent$outboundSchema;
})(FoldersHasContent$ || (exports.FoldersHasContent$ = FoldersHasContent$ = {}));
function foldersHasContentToJSON(foldersHasContent) {
    return JSON.stringify(exports.FoldersHasContent$outboundSchema.parse(foldersHasContent));
}
function foldersHasContentFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.FoldersHasContent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FoldersHasContent' from JSON`);
}
/** @internal */
exports.FoldersSchemasIsRoot2$inboundSchema = z.nativeEnum(FoldersSchemasIsRoot2);
/** @internal */
exports.FoldersSchemasIsRoot2$outboundSchema = exports.FoldersSchemasIsRoot2$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var FoldersSchemasIsRoot2$;
(function (FoldersSchemasIsRoot2$) {
    /** @deprecated use `FoldersSchemasIsRoot2$inboundSchema` instead. */
    FoldersSchemasIsRoot2$.inboundSchema = exports.FoldersSchemasIsRoot2$inboundSchema;
    /** @deprecated use `FoldersSchemasIsRoot2$outboundSchema` instead. */
    FoldersSchemasIsRoot2$.outboundSchema = exports.FoldersSchemasIsRoot2$outboundSchema;
})(FoldersSchemasIsRoot2$ || (exports.FoldersSchemasIsRoot2$ = FoldersSchemasIsRoot2$ = {}));
/** @internal */
exports.IsRoot$inboundSchema = z
    .union([z.boolean(), exports.FoldersSchemasIsRoot2$inboundSchema]);
/** @internal */
exports.IsRoot$outboundSchema = z.union([z.boolean(), exports.FoldersSchemasIsRoot2$outboundSchema]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var IsRoot$;
(function (IsRoot$) {
    /** @deprecated use `IsRoot$inboundSchema` instead. */
    IsRoot$.inboundSchema = exports.IsRoot$inboundSchema;
    /** @deprecated use `IsRoot$outboundSchema` instead. */
    IsRoot$.outboundSchema = exports.IsRoot$outboundSchema;
})(IsRoot$ || (exports.IsRoot$ = IsRoot$ = {}));
function isRootToJSON(isRoot) {
    return JSON.stringify(exports.IsRoot$outboundSchema.parse(isRoot));
}
function isRootFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.IsRoot$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'IsRoot' from JSON`);
}
/** @internal */
exports.Folders$inboundSchema = z.object({
    all_parent_folder_ids: z.nullable(z.array(z.string())).optional(),
    created_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    description: z.nullable(z.string()).optional(),
    drive_id: z.nullable(z.string()).optional(),
    has_children: z.nullable(z.union([z.boolean(), exports.Folders2$inboundSchema]))
        .optional(),
    has_content: z.nullable(z.union([z.boolean(), exports.FoldersSchemas2$inboundSchema])).optional(),
    id: z.nullable(z.string()).optional(),
    is_root: z.nullable(z.union([z.boolean(), exports.FoldersSchemasIsRoot2$inboundSchema])).optional(),
    name: z.nullable(z.string()).optional(),
    owner_id: z.nullable(z.string()).optional(),
    parent_folder_id: z.nullable(z.string()).optional(),
    path: z.nullable(z.string()).optional(),
    remote_drive_id: z.nullable(z.string()).optional(),
    remote_id: z.nullable(z.string()).optional(),
    remote_owner_id: z.nullable(z.string()).optional(),
    remote_parent_folder_id: z.nullable(z.string()).optional(),
    size: z.nullable(z.number()).optional(),
    updated_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    url: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "all_parent_folder_ids": "allParentFolderIds",
        "created_at": "createdAt",
        "drive_id": "driveId",
        "has_children": "hasChildren",
        "has_content": "hasContent",
        "is_root": "isRoot",
        "owner_id": "ownerId",
        "parent_folder_id": "parentFolderId",
        "remote_drive_id": "remoteDriveId",
        "remote_id": "remoteId",
        "remote_owner_id": "remoteOwnerId",
        "remote_parent_folder_id": "remoteParentFolderId",
        "updated_at": "updatedAt",
    });
});
/** @internal */
exports.Folders$outboundSchema = z.object({
    allParentFolderIds: z.nullable(z.array(z.string())).optional(),
    createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
    description: z.nullable(z.string()).optional(),
    driveId: z.nullable(z.string()).optional(),
    hasChildren: z.nullable(z.union([z.boolean(), exports.Folders2$outboundSchema]))
        .optional(),
    hasContent: z.nullable(z.union([z.boolean(), exports.FoldersSchemas2$outboundSchema]))
        .optional(),
    id: z.nullable(z.string()).optional(),
    isRoot: z.nullable(z.union([z.boolean(), exports.FoldersSchemasIsRoot2$outboundSchema])).optional(),
    name: z.nullable(z.string()).optional(),
    ownerId: z.nullable(z.string()).optional(),
    parentFolderId: z.nullable(z.string()).optional(),
    path: z.nullable(z.string()).optional(),
    remoteDriveId: z.nullable(z.string()).optional(),
    remoteId: z.nullable(z.string()).optional(),
    remoteOwnerId: z.nullable(z.string()).optional(),
    remoteParentFolderId: z.nullable(z.string()).optional(),
    size: z.nullable(z.number()).optional(),
    updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
    url: z.nullable(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        allParentFolderIds: "all_parent_folder_ids",
        createdAt: "created_at",
        driveId: "drive_id",
        hasChildren: "has_children",
        hasContent: "has_content",
        isRoot: "is_root",
        ownerId: "owner_id",
        parentFolderId: "parent_folder_id",
        remoteDriveId: "remote_drive_id",
        remoteId: "remote_id",
        remoteOwnerId: "remote_owner_id",
        remoteParentFolderId: "remote_parent_folder_id",
        updatedAt: "updated_at",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Folders$;
(function (Folders$) {
    /** @deprecated use `Folders$inboundSchema` instead. */
    Folders$.inboundSchema = exports.Folders$inboundSchema;
    /** @deprecated use `Folders$outboundSchema` instead. */
    Folders$.outboundSchema = exports.Folders$outboundSchema;
})(Folders$ || (exports.Folders$ = Folders$ = {}));
function foldersToJSON(folders) {
    return JSON.stringify(exports.Folders$outboundSchema.parse(folders));
}
function foldersFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Folders$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Folders' from JSON`);
}
//# sourceMappingURL=folders.js.map