"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.WeeklySearchUsersResponseBody$outboundSchema = exports.WeeklySearchUsersResponseBody$inboundSchema = exports.WeeklySearchUsersData$outboundSchema = exports.WeeklySearchUsersData$inboundSchema = exports.WeeklySearchUsersResult$outboundSchema = exports.WeeklySearchUsersResult$inboundSchema = exports.WeeklySearchUsersRequest$outboundSchema = exports.WeeklySearchUsersRequest$inboundSchema = void 0;
exports.weeklySearchUsersRequestToJSON = weeklySearchUsersRequestToJSON;
exports.weeklySearchUsersRequestFromJSON = weeklySearchUsersRequestFromJSON;
exports.weeklySearchUsersResultToJSON = weeklySearchUsersResultToJSON;
exports.weeklySearchUsersResultFromJSON = weeklySearchUsersResultFromJSON;
exports.weeklySearchUsersDataToJSON = weeklySearchUsersDataToJSON;
exports.weeklySearchUsersDataFromJSON = weeklySearchUsersDataFromJSON;
exports.weeklySearchUsersResponseBodyToJSON = weeklySearchUsersResponseBodyToJSON;
exports.weeklySearchUsersResponseBodyFromJSON = weeklySearchUsersResponseBodyFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
/** @internal */
exports.WeeklySearchUsersRequest$inboundSchema = z.object({
    after: z.string().optional(),
    project_id: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "project_id": "projectId",
    });
});
/** @internal */
exports.WeeklySearchUsersRequest$outboundSchema = z.object({
    after: z.string().optional(),
    projectId: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        projectId: "project_id",
    });
});
function weeklySearchUsersRequestToJSON(weeklySearchUsersRequest) {
    return JSON.stringify(exports.WeeklySearchUsersRequest$outboundSchema.parse(weeklySearchUsersRequest));
}
function weeklySearchUsersRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.WeeklySearchUsersRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WeeklySearchUsersRequest' from JSON`);
}
/** @internal */
exports.WeeklySearchUsersResult$inboundSchema = z.object({
    week: z.string(),
    unique_users: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "unique_users": "uniqueUsers",
    });
});
/** @internal */
exports.WeeklySearchUsersResult$outboundSchema = z.object({
    week: z.string(),
    uniqueUsers: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        uniqueUsers: "unique_users",
    });
});
function weeklySearchUsersResultToJSON(weeklySearchUsersResult) {
    return JSON.stringify(exports.WeeklySearchUsersResult$outboundSchema.parse(weeklySearchUsersResult));
}
function weeklySearchUsersResultFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.WeeklySearchUsersResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WeeklySearchUsersResult' from JSON`);
}
/** @internal */
exports.WeeklySearchUsersData$inboundSchema = z.object({
    result: z.array(z.lazy(() => exports.WeeklySearchUsersResult$inboundSchema)),
    total: z.number(),
});
/** @internal */
exports.WeeklySearchUsersData$outboundSchema = z.object({
    result: z.array(z.lazy(() => exports.WeeklySearchUsersResult$outboundSchema)),
    total: z.number(),
});
function weeklySearchUsersDataToJSON(weeklySearchUsersData) {
    return JSON.stringify(exports.WeeklySearchUsersData$outboundSchema.parse(weeklySearchUsersData));
}
function weeklySearchUsersDataFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.WeeklySearchUsersData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WeeklySearchUsersData' from JSON`);
}
/** @internal */
exports.WeeklySearchUsersResponseBody$inboundSchema = z.object({
    data: z.lazy(() => exports.WeeklySearchUsersData$inboundSchema),
});
/** @internal */
exports.WeeklySearchUsersResponseBody$outboundSchema = z.object({
    data: z.lazy(() => exports.WeeklySearchUsersData$outboundSchema),
});
function weeklySearchUsersResponseBodyToJSON(weeklySearchUsersResponseBody) {
    return JSON.stringify(exports.WeeklySearchUsersResponseBody$outboundSchema.parse(weeklySearchUsersResponseBody));
}
function weeklySearchUsersResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.WeeklySearchUsersResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WeeklySearchUsersResponseBody' from JSON`);
}
//# sourceMappingURL=weeklysearchusers.js.map