"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.GoogleLogoDetectionAnalysisData$ = exports.GoogleLogoDetectionAnalysisData$outboundSchema = exports.GoogleLogoDetectionAnalysisData$inboundSchema = exports.LogoAnnotations$ = exports.LogoAnnotations$outboundSchema = exports.LogoAnnotations$inboundSchema = exports.BoundingPoly$ = exports.BoundingPoly$outboundSchema = exports.BoundingPoly$inboundSchema = exports.Vertices$ = exports.Vertices$outboundSchema = exports.Vertices$inboundSchema = void 0;
exports.verticesToJSON = verticesToJSON;
exports.verticesFromJSON = verticesFromJSON;
exports.boundingPolyToJSON = boundingPolyToJSON;
exports.boundingPolyFromJSON = boundingPolyFromJSON;
exports.logoAnnotationsToJSON = logoAnnotationsToJSON;
exports.logoAnnotationsFromJSON = logoAnnotationsFromJSON;
exports.googleLogoDetectionAnalysisDataToJSON = googleLogoDetectionAnalysisDataToJSON;
exports.googleLogoDetectionAnalysisDataFromJSON = googleLogoDetectionAnalysisDataFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
/** @internal */
exports.Vertices$inboundSchema = z.object({
    x: z.number().int().optional(),
    y: z.number().int().optional(),
});
/** @internal */
exports.Vertices$outboundSchema = z.object({
    x: z.number().int().optional(),
    y: z.number().int().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Vertices$;
(function (Vertices$) {
    /** @deprecated use `Vertices$inboundSchema` instead. */
    Vertices$.inboundSchema = exports.Vertices$inboundSchema;
    /** @deprecated use `Vertices$outboundSchema` instead. */
    Vertices$.outboundSchema = exports.Vertices$outboundSchema;
})(Vertices$ || (exports.Vertices$ = Vertices$ = {}));
function verticesToJSON(vertices) {
    return JSON.stringify(exports.Vertices$outboundSchema.parse(vertices));
}
function verticesFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Vertices$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Vertices' from JSON`);
}
/** @internal */
exports.BoundingPoly$inboundSchema = z.object({
    vertices: z.array(z.lazy(() => exports.Vertices$inboundSchema)).optional(),
});
/** @internal */
exports.BoundingPoly$outboundSchema = z.object({
    vertices: z.array(z.lazy(() => exports.Vertices$outboundSchema)).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var BoundingPoly$;
(function (BoundingPoly$) {
    /** @deprecated use `BoundingPoly$inboundSchema` instead. */
    BoundingPoly$.inboundSchema = exports.BoundingPoly$inboundSchema;
    /** @deprecated use `BoundingPoly$outboundSchema` instead. */
    BoundingPoly$.outboundSchema = exports.BoundingPoly$outboundSchema;
})(BoundingPoly$ || (exports.BoundingPoly$ = BoundingPoly$ = {}));
function boundingPolyToJSON(boundingPoly) {
    return JSON.stringify(exports.BoundingPoly$outboundSchema.parse(boundingPoly));
}
function boundingPolyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.BoundingPoly$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BoundingPoly' from JSON`);
}
/** @internal */
exports.LogoAnnotations$inboundSchema = z.object({
    mid: z.string().optional(),
    description: z.string(),
    score: z.number(),
    bounding_poly: z.lazy(() => exports.BoundingPoly$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "bounding_poly": "boundingPoly",
    });
});
/** @internal */
exports.LogoAnnotations$outboundSchema = z.object({
    mid: z.string().optional(),
    description: z.string(),
    score: z.number(),
    boundingPoly: z.lazy(() => exports.BoundingPoly$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        boundingPoly: "bounding_poly",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var LogoAnnotations$;
(function (LogoAnnotations$) {
    /** @deprecated use `LogoAnnotations$inboundSchema` instead. */
    LogoAnnotations$.inboundSchema = exports.LogoAnnotations$inboundSchema;
    /** @deprecated use `LogoAnnotations$outboundSchema` instead. */
    LogoAnnotations$.outboundSchema = exports.LogoAnnotations$outboundSchema;
})(LogoAnnotations$ || (exports.LogoAnnotations$ = LogoAnnotations$ = {}));
function logoAnnotationsToJSON(logoAnnotations) {
    return JSON.stringify(exports.LogoAnnotations$outboundSchema.parse(logoAnnotations));
}
function logoAnnotationsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.LogoAnnotations$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LogoAnnotations' from JSON`);
}
/** @internal */
exports.GoogleLogoDetectionAnalysisData$inboundSchema = z.object({
    logo_annotations: z.array(z.lazy(() => exports.LogoAnnotations$inboundSchema)),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "logo_annotations": "logoAnnotations",
    });
});
/** @internal */
exports.GoogleLogoDetectionAnalysisData$outboundSchema = z.object({
    logoAnnotations: z.array(z.lazy(() => exports.LogoAnnotations$outboundSchema)),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        logoAnnotations: "logo_annotations",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GoogleLogoDetectionAnalysisData$;
(function (GoogleLogoDetectionAnalysisData$) {
    /** @deprecated use `GoogleLogoDetectionAnalysisData$inboundSchema` instead. */
    GoogleLogoDetectionAnalysisData$.inboundSchema = exports.GoogleLogoDetectionAnalysisData$inboundSchema;
    /** @deprecated use `GoogleLogoDetectionAnalysisData$outboundSchema` instead. */
    GoogleLogoDetectionAnalysisData$.outboundSchema = exports.GoogleLogoDetectionAnalysisData$outboundSchema;
})(GoogleLogoDetectionAnalysisData$ || (exports.GoogleLogoDetectionAnalysisData$ = GoogleLogoDetectionAnalysisData$ = {}));
function googleLogoDetectionAnalysisDataToJSON(googleLogoDetectionAnalysisData) {
    return JSON.stringify(exports.GoogleLogoDetectionAnalysisData$outboundSchema.parse(googleLogoDetectionAnalysisData));
}
function googleLogoDetectionAnalysisDataFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GoogleLogoDetectionAnalysisData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GoogleLogoDetectionAnalysisData' from JSON`);
}
//# sourceMappingURL=googlelogodetectionanalysisdata.js.map