/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { EnvironmentDiffSummaryDto, EnvironmentDiffSummaryDto$inboundSchema, } from "./environmentdiffsummarydto.js"; import { ResourceDiffResultDto, ResourceDiffResultDto$inboundSchema, } from "./resourcediffresultdto.js"; export type DiffEnvironmentResponseDto = { /** * Source environment ID */ sourceEnvironmentId: string; /** * Target environment ID */ targetEnvironmentId: string; /** * Diff resources by resource type */ resources: Array; /** * Overall summary */ summary: EnvironmentDiffSummaryDto; }; /** @internal */ export const DiffEnvironmentResponseDto$inboundSchema: z.ZodType< DiffEnvironmentResponseDto, z.ZodTypeDef, unknown > = z.object({ sourceEnvironmentId: z.string(), targetEnvironmentId: z.string(), resources: z.array(ResourceDiffResultDto$inboundSchema), summary: EnvironmentDiffSummaryDto$inboundSchema, }); export function diffEnvironmentResponseDtoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DiffEnvironmentResponseDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DiffEnvironmentResponseDto' from JSON`, ); }