/* * 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"; export type PrometheusResponseDroppedTarget = { /** * Address of target. */ address?: string | undefined; /** * Job of target. */ job?: string | undefined; /** * Path to metrics of target. */ metricsPath?: string | undefined; /** * URL scheme. */ scheme?: string | undefined; }; /** @internal */ export const PrometheusResponseDroppedTarget$inboundSchema: z.ZodType< PrometheusResponseDroppedTarget, z.ZodTypeDef, unknown > = z.object({ address: z.string().optional(), job: z.string().optional(), metrics_path: z.string().optional(), scheme: z.string().optional(), }).transform((v) => { return remap$(v, { "metrics_path": "metricsPath", }); }); export function prometheusResponseDroppedTargetFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PrometheusResponseDroppedTarget$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PrometheusResponseDroppedTarget' from JSON`, ); }