/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 18bc706a24f1 */ 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"; /** * Deployment counts per rollout state across all deployments the filters allow (ignores the state filter) */ export type ReleaseRolloutStateCounts = { updated: number; updating: number; failed: number; pending: number; pinnedOther: number; superseded: number; onOther: number; }; /** @internal */ export const ReleaseRolloutStateCounts$inboundSchema: z.ZodType< ReleaseRolloutStateCounts, unknown > = z.object({ updated: z.int(), updating: z.int(), failed: z.int(), pending: z.int(), "pinned-other": z.int(), superseded: z.int(), "on-other": z.int(), }).transform((v) => { return remap$(v, { "pinned-other": "pinnedOther", "on-other": "onOther", }); }); export function releaseRolloutStateCountsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ReleaseRolloutStateCounts$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ReleaseRolloutStateCounts' from JSON`, ); }