/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 6216ff98d944 */ import * as z from "zod/v4"; 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"; /** * A workspace role that may be assigned to a service account. */ export type AssignableServiceAccountRole = { uuid: string; name: string; description: string; isCustomRole: boolean; }; /** @internal */ export const AssignableServiceAccountRole$inboundSchema: z.ZodType< AssignableServiceAccountRole, unknown > = z.object({ uuid: z.string(), name: z.string(), description: z.string(), is_custom_role: z.boolean(), }).transform((v) => { return remap$(v, { "is_custom_role": "isCustomRole", }); }); export function assignableServiceAccountRoleFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AssignableServiceAccountRole$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssignableServiceAccountRole' from JSON`, ); }