"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.GoogleTaggingAnalysisData$ = exports.GoogleTaggingAnalysisData$outboundSchema = exports.GoogleTaggingAnalysisData$inboundSchema = exports.LabelAnnotations$ = exports.LabelAnnotations$outboundSchema = exports.LabelAnnotations$inboundSchema = exports.Labels$ = exports.Labels$outboundSchema = exports.Labels$inboundSchema = void 0;
exports.labelsToJSON = labelsToJSON;
exports.labelsFromJSON = labelsFromJSON;
exports.labelAnnotationsToJSON = labelAnnotationsToJSON;
exports.labelAnnotationsFromJSON = labelAnnotationsFromJSON;
exports.googleTaggingAnalysisDataToJSON = googleTaggingAnalysisDataToJSON;
exports.googleTaggingAnalysisDataFromJSON = googleTaggingAnalysisDataFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
/** @internal */
exports.Labels$inboundSchema = z
    .object({
    label: z.string(),
    score: z.number(),
});
/** @internal */
exports.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.
 */
var Labels$;
(function (Labels$) {
    /** @deprecated use `Labels$inboundSchema` instead. */
    Labels$.inboundSchema = exports.Labels$inboundSchema;
    /** @deprecated use `Labels$outboundSchema` instead. */
    Labels$.outboundSchema = exports.Labels$outboundSchema;
})(Labels$ || (exports.Labels$ = Labels$ = {}));
function labelsToJSON(labels) {
    return JSON.stringify(exports.Labels$outboundSchema.parse(labels));
}
function labelsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Labels$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Labels' from JSON`);
}
/** @internal */
exports.LabelAnnotations$inboundSchema = z.object({
    labels: z.array(z.lazy(() => exports.Labels$inboundSchema)).optional(),
});
/** @internal */
exports.LabelAnnotations$outboundSchema = z.object({
    labels: z.array(z.lazy(() => exports.Labels$outboundSchema)).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var LabelAnnotations$;
(function (LabelAnnotations$) {
    /** @deprecated use `LabelAnnotations$inboundSchema` instead. */
    LabelAnnotations$.inboundSchema = exports.LabelAnnotations$inboundSchema;
    /** @deprecated use `LabelAnnotations$outboundSchema` instead. */
    LabelAnnotations$.outboundSchema = exports.LabelAnnotations$outboundSchema;
})(LabelAnnotations$ || (exports.LabelAnnotations$ = LabelAnnotations$ = {}));
function labelAnnotationsToJSON(labelAnnotations) {
    return JSON.stringify(exports.LabelAnnotations$outboundSchema.parse(labelAnnotations));
}
function labelAnnotationsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LabelAnnotations$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LabelAnnotations' from JSON`);
}
/** @internal */
exports.GoogleTaggingAnalysisData$inboundSchema = z.object({
    label_annotations: z.lazy(() => exports.LabelAnnotations$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "label_annotations": "labelAnnotations",
    });
});
/** @internal */
exports.GoogleTaggingAnalysisData$outboundSchema = z.object({
    labelAnnotations: z.lazy(() => exports.LabelAnnotations$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.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.
 */
var GoogleTaggingAnalysisData$;
(function (GoogleTaggingAnalysisData$) {
    /** @deprecated use `GoogleTaggingAnalysisData$inboundSchema` instead. */
    GoogleTaggingAnalysisData$.inboundSchema = exports.GoogleTaggingAnalysisData$inboundSchema;
    /** @deprecated use `GoogleTaggingAnalysisData$outboundSchema` instead. */
    GoogleTaggingAnalysisData$.outboundSchema = exports.GoogleTaggingAnalysisData$outboundSchema;
})(GoogleTaggingAnalysisData$ || (exports.GoogleTaggingAnalysisData$ = GoogleTaggingAnalysisData$ = {}));
function googleTaggingAnalysisDataToJSON(googleTaggingAnalysisData) {
    return JSON.stringify(exports.GoogleTaggingAnalysisData$outboundSchema.parse(googleTaggingAnalysisData));
}
function googleTaggingAnalysisDataFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GoogleTaggingAnalysisData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GoogleTaggingAnalysisData' from JSON`);
}
//# sourceMappingURL=googletagginganalysisdata.js.map