/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 8ac6d82b05c8
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import * as openEnums from "../../types/enums.js";
import { VespaSearchIndexInfoResponse$inboundSchema, } from "./vespasearchindexinforesponse.js";
export const SearchIndexResponseStatus = {
    Online: "online",
    Offline: "offline",
};
/** @internal */
export const SearchIndexResponseStatus$inboundSchema = openEnums.inboundSchema(SearchIndexResponseStatus);
/** @internal */
export const SearchIndexResponseIndex$inboundSchema = VespaSearchIndexInfoResponse$inboundSchema;
export function searchIndexResponseIndexFromJSON(jsonString) {
    return safeParse(jsonString, (x) => SearchIndexResponseIndex$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchIndexResponseIndex' from JSON`);
}
/** @internal */
export const SearchIndexResponse$inboundSchema = z.object({
    id: z.string(),
    name: z.string(),
    creator_id: z.string(),
    document_count: z.int(),
    status: SearchIndexResponseStatus$inboundSchema,
    created_at: z.iso.datetime({ offset: true }).transform(v => new Date(v)),
    modified_at: z.iso.datetime({ offset: true }).transform(v => new Date(v)),
    index: VespaSearchIndexInfoResponse$inboundSchema,
}).transform((v) => {
    return remap$(v, {
        "creator_id": "creatorId",
        "document_count": "documentCount",
        "created_at": "createdAt",
        "modified_at": "modifiedAt",
    });
});
export function searchIndexResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => SearchIndexResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchIndexResponse' from JSON`);
}
//# sourceMappingURL=searchindexresponse.js.map