/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod/v3";
import { safeParse } from "../../lib/schemas.js";
import { SemanticThreadAggregationSelection$inboundSchema, SemanticThreadAggregationSelection$outboundSchema, } from "./semanticthreadaggregationselection.js";
import { SemanticThreadSimpleFieldSelection$inboundSchema, SemanticThreadSimpleFieldSelection$outboundSchema, } from "./semanticthreadsimplefieldselection.js";
import { SemanticThreadTimeBasedGroupBySelection$inboundSchema, SemanticThreadTimeBasedGroupBySelection$outboundSchema, } from "./semanticthreadtimebasedgroupbyselection.js";
/** @internal */
export const SemanticThreadSelection$inboundSchema = z.union([
    SemanticThreadAggregationSelection$inboundSchema,
    SemanticThreadTimeBasedGroupBySelection$inboundSchema,
    SemanticThreadSimpleFieldSelection$inboundSchema,
]);
/** @internal */
export const SemanticThreadSelection$outboundSchema = z.union([
    SemanticThreadAggregationSelection$outboundSchema,
    SemanticThreadTimeBasedGroupBySelection$outboundSchema,
    SemanticThreadSimpleFieldSelection$outboundSchema,
]);
export function semanticThreadSelectionToJSON(semanticThreadSelection) {
    return JSON.stringify(SemanticThreadSelection$outboundSchema.parse(semanticThreadSelection));
}
export function semanticThreadSelectionFromJSON(jsonString) {
    return safeParse(jsonString, (x) => SemanticThreadSelection$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SemanticThreadSelection' from JSON`);
}
//# sourceMappingURL=semanticthreadselection.js.map