/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod/v3";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
/** @internal */
export const TopSearchQueriesRequest$inboundSchema = z.object({
    after: z.string().optional(),
    project_id: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        "project_id": "projectId",
    });
});
/** @internal */
export const TopSearchQueriesRequest$outboundSchema = z.object({
    after: z.string().optional(),
    projectId: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        projectId: "project_id",
    });
});
export function topSearchQueriesRequestToJSON(topSearchQueriesRequest) {
    return JSON.stringify(TopSearchQueriesRequest$outboundSchema.parse(topSearchQueriesRequest));
}
export function topSearchQueriesRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => TopSearchQueriesRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TopSearchQueriesRequest' from JSON`);
}
/** @internal */
export const Result$inboundSchema = z
    .object({
    search_query: z.string(),
    count: z.string(),
}).transform((v) => {
    return remap$(v, {
        "search_query": "searchQuery",
    });
});
/** @internal */
export const Result$outboundSchema = z.object({
    searchQuery: z.string(),
    count: z.string(),
}).transform((v) => {
    return remap$(v, {
        searchQuery: "search_query",
    });
});
export function resultToJSON(result) {
    return JSON.stringify(Result$outboundSchema.parse(result));
}
export function resultFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Result$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Result' from JSON`);
}
/** @internal */
export const Data$inboundSchema = z
    .object({
    result: z.array(z.lazy(() => Result$inboundSchema)),
    total: z.number(),
});
/** @internal */
export const Data$outboundSchema = z.object({
    result: z.array(z.lazy(() => Result$outboundSchema)),
    total: z.number(),
});
export function dataToJSON(data) {
    return JSON.stringify(Data$outboundSchema.parse(data));
}
export function dataFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Data$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Data' from JSON`);
}
/** @internal */
export const TopSearchQueriesResponseBody$inboundSchema = z.object({
    data: z.lazy(() => Data$inboundSchema),
});
/** @internal */
export const TopSearchQueriesResponseBody$outboundSchema = z.object({
    data: z.lazy(() => Data$outboundSchema),
});
export function topSearchQueriesResponseBodyToJSON(topSearchQueriesResponseBody) {
    return JSON.stringify(TopSearchQueriesResponseBody$outboundSchema.parse(topSearchQueriesResponseBody));
}
export function topSearchQueriesResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => TopSearchQueriesResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TopSearchQueriesResponseBody' from JSON`);
}
//# sourceMappingURL=topsearchqueries.js.map