/* * 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 RdpSecurityProtocol = { credssp?: boolean | undefined; credsspEarlyAuth?: boolean | undefined; error?: boolean | undefined; errorBadFlags?: boolean | undefined; errorHybridRequired?: boolean | undefined; errorSslCertMissing?: boolean | undefined; errorSslForbidden?: boolean | undefined; errorSslRequired?: boolean | undefined; errorSslUserAuthRequired?: boolean | undefined; errorUnknown?: boolean | undefined; rawValue?: number | undefined; rdstls?: boolean | undefined; standardRdp?: boolean | undefined; tls?: boolean | undefined; }; /** @internal */ export const RdpSecurityProtocol$inboundSchema: z.ZodType< RdpSecurityProtocol, z.ZodTypeDef, unknown > = z.object({ credssp: z.boolean().optional(), credssp_early_auth: z.boolean().optional(), error: z.boolean().optional(), error_bad_flags: z.boolean().optional(), error_hybrid_required: z.boolean().optional(), error_ssl_cert_missing: z.boolean().optional(), error_ssl_forbidden: z.boolean().optional(), error_ssl_required: z.boolean().optional(), error_ssl_user_auth_required: z.boolean().optional(), error_unknown: z.boolean().optional(), raw_value: z.number().int().optional(), rdstls: z.boolean().optional(), standard_rdp: z.boolean().optional(), tls: z.boolean().optional(), }).transform((v) => { return remap$(v, { "credssp_early_auth": "credsspEarlyAuth", "error_bad_flags": "errorBadFlags", "error_hybrid_required": "errorHybridRequired", "error_ssl_cert_missing": "errorSslCertMissing", "error_ssl_forbidden": "errorSslForbidden", "error_ssl_required": "errorSslRequired", "error_ssl_user_auth_required": "errorSslUserAuthRequired", "error_unknown": "errorUnknown", "raw_value": "rawValue", "standard_rdp": "standardRdp", }); }); export function rdpSecurityProtocolFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => RdpSecurityProtocol$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RdpSecurityProtocol' from JSON`, ); }