/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
/** @internal */
export const Labels$inboundSchema = z
    .object({
    label: z.string(),
    score: z.number(),
});
/** @internal */
export const Labels$outboundSchema = z.object({
    label: z.string(),
    score: z.number(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Labels$;
(function (Labels$) {
    /** @deprecated use `Labels$inboundSchema` instead. */
    Labels$.inboundSchema = Labels$inboundSchema;
    /** @deprecated use `Labels$outboundSchema` instead. */
    Labels$.outboundSchema = Labels$outboundSchema;
})(Labels$ || (Labels$ = {}));
export function labelsToJSON(labels) {
    return JSON.stringify(Labels$outboundSchema.parse(labels));
}
export function labelsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Labels$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Labels' from JSON`);
}
/** @internal */
export const LabelAnnotations$inboundSchema = z.object({
    labels: z.array(z.lazy(() => Labels$inboundSchema)).optional(),
});
/** @internal */
export const LabelAnnotations$outboundSchema = z.object({
    labels: z.array(z.lazy(() => Labels$outboundSchema)).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var LabelAnnotations$;
(function (LabelAnnotations$) {
    /** @deprecated use `LabelAnnotations$inboundSchema` instead. */
    LabelAnnotations$.inboundSchema = LabelAnnotations$inboundSchema;
    /** @deprecated use `LabelAnnotations$outboundSchema` instead. */
    LabelAnnotations$.outboundSchema = LabelAnnotations$outboundSchema;
})(LabelAnnotations$ || (LabelAnnotations$ = {}));
export function labelAnnotationsToJSON(labelAnnotations) {
    return JSON.stringify(LabelAnnotations$outboundSchema.parse(labelAnnotations));
}
export function labelAnnotationsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => LabelAnnotations$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LabelAnnotations' from JSON`);
}
/** @internal */
export const GoogleTaggingAnalysisData$inboundSchema = z.object({
    label_annotations: z.lazy(() => LabelAnnotations$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "label_annotations": "labelAnnotations",
    });
});
/** @internal */
export const GoogleTaggingAnalysisData$outboundSchema = z.object({
    labelAnnotations: z.lazy(() => LabelAnnotations$outboundSchema),
}).transform((v) => {
    return remap$(v, {
        labelAnnotations: "label_annotations",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GoogleTaggingAnalysisData$;
(function (GoogleTaggingAnalysisData$) {
    /** @deprecated use `GoogleTaggingAnalysisData$inboundSchema` instead. */
    GoogleTaggingAnalysisData$.inboundSchema = GoogleTaggingAnalysisData$inboundSchema;
    /** @deprecated use `GoogleTaggingAnalysisData$outboundSchema` instead. */
    GoogleTaggingAnalysisData$.outboundSchema = GoogleTaggingAnalysisData$outboundSchema;
})(GoogleTaggingAnalysisData$ || (GoogleTaggingAnalysisData$ = {}));
export function googleTaggingAnalysisDataToJSON(googleTaggingAnalysisData) {
    return JSON.stringify(GoogleTaggingAnalysisData$outboundSchema.parse(googleTaggingAnalysisData));
}
export function googleTaggingAnalysisDataFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GoogleTaggingAnalysisData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GoogleTaggingAnalysisData' from JSON`);
}
//# sourceMappingURL=googletagginganalysisdata.js.map