/* * 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 { DependencyReasonEnum, DependencyReasonEnum$inboundSchema, } from "./dependencyreasonenum.js"; import { ResourceTypeEnum, ResourceTypeEnum$inboundSchema, } from "./resourcetypeenum.js"; export type ResourceDependencyDto = { /** * Type of the layout */ resourceType: ResourceTypeEnum; /** * ID of the dependent resource */ resourceId: string; /** * Name of the dependent resource */ resourceName: string; /** * Whether this dependency blocks the operation */ isBlocking: boolean; /** * Reason for the dependency */ reason: DependencyReasonEnum; }; /** @internal */ export const ResourceDependencyDto$inboundSchema: z.ZodType< ResourceDependencyDto, z.ZodTypeDef, unknown > = z.object({ resourceType: ResourceTypeEnum$inboundSchema, resourceId: z.string(), resourceName: z.string(), isBlocking: z.boolean(), reason: DependencyReasonEnum$inboundSchema, }); export function resourceDependencyDtoFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ResourceDependencyDto$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResourceDependencyDto' from JSON`, ); }