/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
/** @internal */
export const ReadWritePermissions$inboundSchema = z.object({
    read: z.boolean().default(false),
    write: z.boolean().default(false),
});
/** @internal */
export const ReadWritePermissions$outboundSchema = z.object({
    read: z.boolean().default(false),
    write: z.boolean().default(false),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ReadWritePermissions$;
(function (ReadWritePermissions$) {
    /** @deprecated use `ReadWritePermissions$inboundSchema` instead. */
    ReadWritePermissions$.inboundSchema = ReadWritePermissions$inboundSchema;
    /** @deprecated use `ReadWritePermissions$outboundSchema` instead. */
    ReadWritePermissions$.outboundSchema = ReadWritePermissions$outboundSchema;
})(ReadWritePermissions$ || (ReadWritePermissions$ = {}));
export function readWritePermissionsToJSON(readWritePermissions) {
    return JSON.stringify(ReadWritePermissions$outboundSchema.parse(readWritePermissions));
}
export function readWritePermissionsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ReadWritePermissions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ReadWritePermissions' from JSON`);
}
//# sourceMappingURL=readwritepermissions.js.map