/* * 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 { RocketmqResponseHeader, RocketmqResponseHeader$inboundSchema, } from "./rocketmqresponseheader.js"; export type RocketmqTopicList = { header?: RocketmqResponseHeader | undefined; topicList?: Array | null | undefined; }; /** @internal */ export const RocketmqTopicList$inboundSchema: z.ZodType< RocketmqTopicList, z.ZodTypeDef, unknown > = z.object({ header: RocketmqResponseHeader$inboundSchema.optional(), topic_list: z.nullable(z.array(z.string())).optional(), }).transform((v) => { return remap$(v, { "topic_list": "topicList", }); }); export function rocketmqTopicListFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => RocketmqTopicList$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RocketmqTopicList' from JSON`, ); }