/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 2499aa4adece */ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { MachinesJoinTokenSummary, MachinesJoinTokenSummary$inboundSchema, } from "./machinesjointokensummary.js"; export type RotateMachinesJoinTokenResponse = { joinToken: string; controlPlaneUrl: string; clusterId: string; token: MachinesJoinTokenSummary; /** * Deploy CLI install script URL, or null when no ready CLI package exists. */ cliInstallScriptUrl: string | null; /** * CLI command name to use in join instructions. */ cliCommandName: string | null; }; /** @internal */ export const RotateMachinesJoinTokenResponse$inboundSchema: z.ZodType< RotateMachinesJoinTokenResponse, unknown > = z.object({ joinToken: z.string(), controlPlaneUrl: z.string(), clusterId: z.string(), token: MachinesJoinTokenSummary$inboundSchema, cliInstallScriptUrl: z.nullable(z.string()), cliCommandName: z.nullable(z.string()), }); export function rotateMachinesJoinTokenResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => RotateMachinesJoinTokenResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RotateMachinesJoinTokenResponse' from JSON`, ); }