/* * 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 OpcUaUserTokenPolicy = { issuedTokenType?: string | undefined; issuerEndpointUrl?: string | undefined; policyId?: string | undefined; securityPolicyUri?: string | undefined; tokenType?: number | undefined; }; /** @internal */ export const OpcUaUserTokenPolicy$inboundSchema: z.ZodType< OpcUaUserTokenPolicy, z.ZodTypeDef, unknown > = z.object({ issued_token_type: z.string().optional(), issuer_endpoint_url: z.string().optional(), policy_id: z.string().optional(), security_policy_uri: z.string().optional(), token_type: z.number().int().optional(), }).transform((v) => { return remap$(v, { "issued_token_type": "issuedTokenType", "issuer_endpoint_url": "issuerEndpointUrl", "policy_id": "policyId", "security_policy_uri": "securityPolicyUri", "token_type": "tokenType", }); }); export function opcUaUserTokenPolicyFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => OpcUaUserTokenPolicy$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpcUaUserTokenPolicy' from JSON`, ); }