/* * 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 GetTenantDestinationRequest = { /** * The ID of the tenant. Required when using AdminApiKey authentication. */ tenantId: string; /** * The ID of the destination. */ destinationId: string; }; /** @internal */ export const GetTenantDestinationRequest$inboundSchema: z.ZodType< GetTenantDestinationRequest, z.ZodTypeDef, unknown > = z.object({ tenant_id: z.string(), destination_id: z.string(), }).transform((v) => { return remap$(v, { "tenant_id": "tenantId", "destination_id": "destinationId", }); }); /** @internal */ export type GetTenantDestinationRequest$Outbound = { tenant_id: string; destination_id: string; }; /** @internal */ export const GetTenantDestinationRequest$outboundSchema: z.ZodType< GetTenantDestinationRequest$Outbound, z.ZodTypeDef, GetTenantDestinationRequest > = z.object({ tenantId: z.string(), destinationId: z.string(), }).transform((v) => { return remap$(v, { tenantId: "tenant_id", destinationId: "destination_id", }); }); export function getTenantDestinationRequestToJSON( getTenantDestinationRequest: GetTenantDestinationRequest, ): string { return JSON.stringify( GetTenantDestinationRequest$outboundSchema.parse( getTenantDestinationRequest, ), ); } export function getTenantDestinationRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GetTenantDestinationRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTenantDestinationRequest' from JSON`, ); }