/* * 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"; export type AzureServiceBusCredentials = { /** * The connection string for the Azure Service Bus namespace. */ connectionString: string; }; /** @internal */ export const AzureServiceBusCredentials$inboundSchema: z.ZodType< AzureServiceBusCredentials, z.ZodTypeDef, unknown > = z.object({ connection_string: z.string(), }).transform((v) => { return remap$(v, { "connection_string": "connectionString", }); }); /** @internal */ export type AzureServiceBusCredentials$Outbound = { connection_string: string; }; /** @internal */ export const AzureServiceBusCredentials$outboundSchema: z.ZodType< AzureServiceBusCredentials$Outbound, z.ZodTypeDef, AzureServiceBusCredentials > = z.object({ connectionString: z.string(), }).transform((v) => { return remap$(v, { connectionString: "connection_string", }); }); export function azureServiceBusCredentialsToJSON( azureServiceBusCredentials: AzureServiceBusCredentials, ): string { return JSON.stringify( AzureServiceBusCredentials$outboundSchema.parse(azureServiceBusCredentials), ); } export function azureServiceBusCredentialsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AzureServiceBusCredentials$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AzureServiceBusCredentials' from JSON`, ); }