/* * 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 GmailData = { label?: string | null | undefined; }; /** @internal */ export const GmailData$inboundSchema: z.ZodType< GmailData, z.ZodTypeDef, unknown > = z.object({ label: z.nullable(z.string()).optional(), }); /** @internal */ export type GmailData$Outbound = { label?: string | null | undefined; }; /** @internal */ export const GmailData$outboundSchema: z.ZodType< GmailData$Outbound, z.ZodTypeDef, GmailData > = z.object({ label: z.nullable(z.string()).optional(), }); export function gmailDataToJSON(gmailData: GmailData): string { return JSON.stringify(GmailData$outboundSchema.parse(gmailData)); } export function gmailDataFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GmailData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GmailData' from JSON`, ); }