/* * 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 { ElasticSearchResultsNodeInfoNodesNodeDataJVM, ElasticSearchResultsNodeInfoNodesNodeDataJVM$inboundSchema, } from "./elasticsearchresultsnodeinfonodesnodedatajvm.js"; import { ElasticSearchResultsNodeInfoNodesNodeDataModules, ElasticSearchResultsNodeInfoNodesNodeDataModules$inboundSchema, } from "./elasticsearchresultsnodeinfonodesnodedatamodules.js"; import { ElasticSearchResultsNodeInfoNodesNodeDataNodeSettings, ElasticSearchResultsNodeInfoNodesNodeDataNodeSettings$inboundSchema, } from "./elasticsearchresultsnodeinfonodesnodedatanodesettings.js"; import { ElasticSearchResultsNodeInfoNodesNodeDataOS, ElasticSearchResultsNodeInfoNodesNodeDataOS$inboundSchema, } from "./elasticsearchresultsnodeinfonodesnodedataos.js"; import { ElasticSearchResultsNodeInfoNodesNodeDataThreadPool, ElasticSearchResultsNodeInfoNodesNodeDataThreadPool$inboundSchema, } from "./elasticsearchresultsnodeinfonodesnodedatathreadpool.js"; export type ElasticSearchResultsNodeInfoNodesNodeData = { buildFlavor?: string | undefined; buildHash?: string | undefined; buildType?: string | undefined; host?: string | undefined; ingestProcessors?: Array | null | undefined; ip?: string | undefined; ipRaw?: string | undefined; jvm?: ElasticSearchResultsNodeInfoNodesNodeDataJVM | undefined; modules?: | Array | null | undefined; name?: string | undefined; os?: ElasticSearchResultsNodeInfoNodesNodeDataOS | undefined; roles?: Array | null | undefined; settings?: ElasticSearchResultsNodeInfoNodesNodeDataNodeSettings | undefined; threadPoolList?: | Array | null | undefined; totalIndexingBuffer?: number | undefined; version?: string | undefined; }; /** @internal */ export const ElasticSearchResultsNodeInfoNodesNodeData$inboundSchema: z.ZodType< ElasticSearchResultsNodeInfoNodesNodeData, z.ZodTypeDef, unknown > = z.object({ build_flavor: z.string().optional(), build_hash: z.string().optional(), build_type: z.string().optional(), host: z.string().optional(), ingest_processors: z.nullable(z.array(z.string())).optional(), ip: z.string().optional(), ip_raw: z.string().optional(), jvm: ElasticSearchResultsNodeInfoNodesNodeDataJVM$inboundSchema.optional(), modules: z.nullable( z.array(ElasticSearchResultsNodeInfoNodesNodeDataModules$inboundSchema), ).optional(), name: z.string().optional(), os: ElasticSearchResultsNodeInfoNodesNodeDataOS$inboundSchema.optional(), roles: z.nullable(z.array(z.string())).optional(), settings: ElasticSearchResultsNodeInfoNodesNodeDataNodeSettings$inboundSchema .optional(), thread_pool_list: z.nullable( z.array(ElasticSearchResultsNodeInfoNodesNodeDataThreadPool$inboundSchema), ).optional(), total_indexing_buffer: z.number().int().optional(), version: z.string().optional(), }).transform((v) => { return remap$(v, { "build_flavor": "buildFlavor", "build_hash": "buildHash", "build_type": "buildType", "ingest_processors": "ingestProcessors", "ip_raw": "ipRaw", "thread_pool_list": "threadPoolList", "total_indexing_buffer": "totalIndexingBuffer", }); }); export function elasticSearchResultsNodeInfoNodesNodeDataFromJSON( jsonString: string, ): SafeParseResult< ElasticSearchResultsNodeInfoNodesNodeData, SDKValidationError > { return safeParse( jsonString, (x) => ElasticSearchResultsNodeInfoNodesNodeData$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'ElasticSearchResultsNodeInfoNodesNodeData' from JSON`, ); }