/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type AzureServiceBusConfig = { /** * The name of the Azure Service Bus queue or topic to publish messages to. */ name: string; }; /** @internal */ export const AzureServiceBusConfig$inboundSchema: z.ZodType< AzureServiceBusConfig, z.ZodTypeDef, unknown > = z.object({ name: z.string(), }); /** @internal */ export type AzureServiceBusConfig$Outbound = { name: string; }; /** @internal */ export const AzureServiceBusConfig$outboundSchema: z.ZodType< AzureServiceBusConfig$Outbound, z.ZodTypeDef, AzureServiceBusConfig > = z.object({ name: z.string(), }); export function azureServiceBusConfigToJSON( azureServiceBusConfig: AzureServiceBusConfig, ): string { return JSON.stringify( AzureServiceBusConfig$outboundSchema.parse(azureServiceBusConfig), ); } export function azureServiceBusConfigFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AzureServiceBusConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AzureServiceBusConfig' from JSON`, ); }