/* * 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"; import { ElasticSearchResultsNodeInfoNodesNodeDataNodeSettingsNodeAttrML, ElasticSearchResultsNodeInfoNodesNodeDataNodeSettingsNodeAttrML$inboundSchema, } from "./elasticsearchresultsnodeinfonodesnodedatanodesettingsnodeattrml.js"; export type ElasticSearchResultsNodeInfoNodesNodeDataNodeSettingsNodeAttr = { ml?: | ElasticSearchResultsNodeInfoNodesNodeDataNodeSettingsNodeAttrML | undefined; xpackInstalled?: string | undefined; }; /** @internal */ export const ElasticSearchResultsNodeInfoNodesNodeDataNodeSettingsNodeAttr$inboundSchema: z.ZodType< ElasticSearchResultsNodeInfoNodesNodeDataNodeSettingsNodeAttr, z.ZodTypeDef, unknown > = z.object({ ml: ElasticSearchResultsNodeInfoNodesNodeDataNodeSettingsNodeAttrML$inboundSchema .optional(), xpack_installed: z.string().optional(), }).transform((v) => { return remap$(v, { "xpack_installed": "xpackInstalled", }); }); export function elasticSearchResultsNodeInfoNodesNodeDataNodeSettingsNodeAttrFromJSON( jsonString: string, ): SafeParseResult< ElasticSearchResultsNodeInfoNodesNodeDataNodeSettingsNodeAttr, SDKValidationError > { return safeParse( jsonString, (x) => ElasticSearchResultsNodeInfoNodesNodeDataNodeSettingsNodeAttr$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'ElasticSearchResultsNodeInfoNodesNodeDataNodeSettingsNodeAttr' from JSON`, ); }