/* * 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"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ElasticSearchResultsNodeInfoClusterCombinedInfoFilesystem = { available?: string | undefined; availableInBytes?: number | undefined; free?: string | undefined; freeInBytes?: number | undefined; total?: string | undefined; totalInBytes?: number | undefined; }; /** @internal */ export const ElasticSearchResultsNodeInfoClusterCombinedInfoFilesystem$inboundSchema: z.ZodType< ElasticSearchResultsNodeInfoClusterCombinedInfoFilesystem, z.ZodTypeDef, unknown > = z.object({ available: z.string().optional(), available_in_bytes: z.number().int().optional(), free: z.string().optional(), free_in_bytes: z.number().int().optional(), total: z.string().optional(), total_in_bytes: z.number().int().optional(), }).transform((v) => { return remap$(v, { "available_in_bytes": "availableInBytes", "free_in_bytes": "freeInBytes", "total_in_bytes": "totalInBytes", }); }); export function elasticSearchResultsNodeInfoClusterCombinedInfoFilesystemFromJSON( jsonString: string, ): SafeParseResult< ElasticSearchResultsNodeInfoClusterCombinedInfoFilesystem, SDKValidationError > { return safeParse( jsonString, (x) => ElasticSearchResultsNodeInfoClusterCombinedInfoFilesystem$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'ElasticSearchResultsNodeInfoClusterCombinedInfoFilesystem' from JSON`, ); }