/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 4cc82a39690a */ 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 * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListServiceAccountsV1ServiceAccountsGetRequest = { workspaceId?: string | null | undefined; includeDeleted?: boolean | undefined; offset: number; limit: number; }; export type ListServiceAccountsV1ServiceAccountsGetResponse = { result: components.ListServiceAccountsResponse; }; /** @internal */ export type ListServiceAccountsV1ServiceAccountsGetRequest$Outbound = { workspace_id?: string | null | undefined; include_deleted: boolean; offset: number; limit: number; }; /** @internal */ export const ListServiceAccountsV1ServiceAccountsGetRequest$outboundSchema: z.ZodType< ListServiceAccountsV1ServiceAccountsGetRequest$Outbound, ListServiceAccountsV1ServiceAccountsGetRequest > = z.object({ workspaceId: z.nullable(z.string()).optional(), includeDeleted: z.boolean().default(false), offset: z.int(), limit: z.int(), }).transform((v) => { return remap$(v, { workspaceId: "workspace_id", includeDeleted: "include_deleted", }); }); export function listServiceAccountsV1ServiceAccountsGetRequestToJSON( listServiceAccountsV1ServiceAccountsGetRequest: ListServiceAccountsV1ServiceAccountsGetRequest, ): string { return JSON.stringify( ListServiceAccountsV1ServiceAccountsGetRequest$outboundSchema.parse( listServiceAccountsV1ServiceAccountsGetRequest, ), ); } /** @internal */ export const ListServiceAccountsV1ServiceAccountsGetResponse$inboundSchema: z.ZodType = z .object({ Result: components.ListServiceAccountsResponse$inboundSchema, }).transform((v) => { return remap$(v, { "Result": "result", }); }); export function listServiceAccountsV1ServiceAccountsGetResponseFromJSON( jsonString: string, ): SafeParseResult< ListServiceAccountsV1ServiceAccountsGetResponse, SDKValidationError > { return safeParse( jsonString, (x) => ListServiceAccountsV1ServiceAccountsGetResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'ListServiceAccountsV1ServiceAccountsGetResponse' from JSON`, ); }