/* * 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 { ElasticSearchResultsNodeInfoNodesNodeDataNodeSettingsNode, ElasticSearchResultsNodeInfoNodesNodeDataNodeSettingsNode$inboundSchema, } from "./elasticsearchresultsnodeinfonodesnodedatanodesettingsnode.js"; export type ElasticSearchResultsNodeInfoNodesNodeDataNodeSettings = { clusterName?: string | undefined; node?: ElasticSearchResultsNodeInfoNodesNodeDataNodeSettingsNode | undefined; }; /** @internal */ export const ElasticSearchResultsNodeInfoNodesNodeDataNodeSettings$inboundSchema: z.ZodType< ElasticSearchResultsNodeInfoNodesNodeDataNodeSettings, z.ZodTypeDef, unknown > = z.object({ cluster_name: z.string().optional(), node: ElasticSearchResultsNodeInfoNodesNodeDataNodeSettingsNode$inboundSchema .optional(), }).transform((v) => { return remap$(v, { "cluster_name": "clusterName", }); }); export function elasticSearchResultsNodeInfoNodesNodeDataNodeSettingsFromJSON( jsonString: string, ): SafeParseResult< ElasticSearchResultsNodeInfoNodesNodeDataNodeSettings, SDKValidationError > { return safeParse( jsonString, (x) => ElasticSearchResultsNodeInfoNodesNodeDataNodeSettings$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'ElasticSearchResultsNodeInfoNodesNodeDataNodeSettings' from JSON`, ); }