/* * 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"; import { JenkinsJob, JenkinsJob$inboundSchema } from "./jenkinsjob.js"; import { JenkinsLabel, JenkinsLabel$inboundSchema } from "./jenkinslabel.js"; export type Jenkins = { assignedLabels?: Array | null | undefined; jobs?: Array | null | undefined; mode?: string | undefined; nodeDescription?: string | undefined; nodeName?: string | undefined; slaveAgentPort?: number | undefined; useSecurity?: boolean | undefined; }; /** @internal */ export const Jenkins$inboundSchema: z.ZodType = z.object({ assigned_labels: z.nullable(z.array(JenkinsLabel$inboundSchema)).optional(), jobs: z.nullable(z.array(JenkinsJob$inboundSchema)).optional(), mode: z.string().optional(), node_description: z.string().optional(), node_name: z.string().optional(), slave_agent_port: z.number().int().optional(), use_security: z.boolean().optional(), }).transform((v) => { return remap$(v, { "assigned_labels": "assignedLabels", "node_description": "nodeDescription", "node_name": "nodeName", "slave_agent_port": "slaveAgentPort", "use_security": "useSecurity", }); }); export function jenkinsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Jenkins$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Jenkins' from JSON`, ); }