/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; export type GovernmentDataPostzonRetrieveByPostcodeGlobals = { source?: string | undefined; }; export type GovernmentDataPostzonRetrieveByPostcodeRequest = { /** * The key to use to authenticate to the service. */ key?: string | undefined; /** * The Postcode to use to search with. */ postcode: string; /** * The username associated with the Royal Mail license (not required for click licenses). */ userName?: string | undefined; }; /** @internal */ export type GovernmentDataPostzonRetrieveByPostcodeRequest$Outbound = { Key?: string | undefined; Postcode: string; UserName?: string | undefined; }; /** @internal */ export const GovernmentDataPostzonRetrieveByPostcodeRequest$outboundSchema: z.ZodType< GovernmentDataPostzonRetrieveByPostcodeRequest$Outbound, z.ZodTypeDef, GovernmentDataPostzonRetrieveByPostcodeRequest > = z.object({ key: z.string().optional(), postcode: z.string(), userName: z.string().optional(), }).transform((v) => { return remap$(v, { key: "Key", postcode: "Postcode", userName: "UserName", }); }); export function governmentDataPostzonRetrieveByPostcodeRequestToJSON( governmentDataPostzonRetrieveByPostcodeRequest: GovernmentDataPostzonRetrieveByPostcodeRequest, ): string { return JSON.stringify( GovernmentDataPostzonRetrieveByPostcodeRequest$outboundSchema.parse( governmentDataPostzonRetrieveByPostcodeRequest, ), ); }