/* * 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 PrometheusResponseActiveTargetDiscoveredLabels = { /** * 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 PrometheusResponseActiveTargetDiscoveredLabels$inboundSchema: z.ZodType< PrometheusResponseActiveTargetDiscoveredLabels, 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 prometheusResponseActiveTargetDiscoveredLabelsFromJSON( jsonString: string, ): SafeParseResult< PrometheusResponseActiveTargetDiscoveredLabels, SDKValidationError > { return safeParse( jsonString, (x) => PrometheusResponseActiveTargetDiscoveredLabels$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PrometheusResponseActiveTargetDiscoveredLabels' from JSON`, ); }