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