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