/* * 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 ActivateLicenseRequestEntity = { /** * The license key to activate. */ key: string; /** * A label for the new instance to identify it in Creem. */ instanceName: string; }; /** @internal */ export const ActivateLicenseRequestEntity$inboundSchema: z.ZodType< ActivateLicenseRequestEntity, z.ZodTypeDef, unknown > = z.object({ key: z.string(), instance_name: z.string(), }).transform((v) => { return remap$(v, { "instance_name": "instanceName", }); }); /** @internal */ export type ActivateLicenseRequestEntity$Outbound = { key: string; instance_name: string; }; /** @internal */ export const ActivateLicenseRequestEntity$outboundSchema: z.ZodType< ActivateLicenseRequestEntity$Outbound, z.ZodTypeDef, ActivateLicenseRequestEntity > = z.object({ key: z.string(), instanceName: z.string(), }).transform((v) => { return remap$(v, { instanceName: "instance_name", }); }); export function activateLicenseRequestEntityToJSON( activateLicenseRequestEntity: ActivateLicenseRequestEntity, ): string { return JSON.stringify( ActivateLicenseRequestEntity$outboundSchema.parse( activateLicenseRequestEntity, ), ); } export function activateLicenseRequestEntityFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ActivateLicenseRequestEntity$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ActivateLicenseRequestEntity' from JSON`, ); }