/*
 * 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 Vertices$inboundSchema = z.object({
    x: z.number().int().optional(),
    y: z.number().int().optional(),
});
/** @internal */
export const 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.
 */
export var Vertices$;
(function (Vertices$) {
    /** @deprecated use `Vertices$inboundSchema` instead. */
    Vertices$.inboundSchema = Vertices$inboundSchema;
    /** @deprecated use `Vertices$outboundSchema` instead. */
    Vertices$.outboundSchema = Vertices$outboundSchema;
})(Vertices$ || (Vertices$ = {}));
export function verticesToJSON(vertices) {
    return JSON.stringify(Vertices$outboundSchema.parse(vertices));
}
export function verticesFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Vertices$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Vertices' from JSON`);
}
/** @internal */
export const BoundingPoly$inboundSchema = z.object({
    vertices: z.array(z.lazy(() => Vertices$inboundSchema)).optional(),
});
/** @internal */
export const BoundingPoly$outboundSchema = z.object({
    vertices: z.array(z.lazy(() => Vertices$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 BoundingPoly$;
(function (BoundingPoly$) {
    /** @deprecated use `BoundingPoly$inboundSchema` instead. */
    BoundingPoly$.inboundSchema = BoundingPoly$inboundSchema;
    /** @deprecated use `BoundingPoly$outboundSchema` instead. */
    BoundingPoly$.outboundSchema = BoundingPoly$outboundSchema;
})(BoundingPoly$ || (BoundingPoly$ = {}));
export function boundingPolyToJSON(boundingPoly) {
    return JSON.stringify(BoundingPoly$outboundSchema.parse(boundingPoly));
}
export function boundingPolyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => BoundingPoly$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BoundingPoly' from JSON`);
}
/** @internal */
export const LogoAnnotations$inboundSchema = z.object({
    mid: z.string().optional(),
    description: z.string(),
    score: z.number(),
    bounding_poly: z.lazy(() => BoundingPoly$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "bounding_poly": "boundingPoly",
    });
});
/** @internal */
export const LogoAnnotations$outboundSchema = z.object({
    mid: z.string().optional(),
    description: z.string(),
    score: z.number(),
    boundingPoly: z.lazy(() => BoundingPoly$outboundSchema),
}).transform((v) => {
    return 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.
 */
export var LogoAnnotations$;
(function (LogoAnnotations$) {
    /** @deprecated use `LogoAnnotations$inboundSchema` instead. */
    LogoAnnotations$.inboundSchema = LogoAnnotations$inboundSchema;
    /** @deprecated use `LogoAnnotations$outboundSchema` instead. */
    LogoAnnotations$.outboundSchema = LogoAnnotations$outboundSchema;
})(LogoAnnotations$ || (LogoAnnotations$ = {}));
export function logoAnnotationsToJSON(logoAnnotations) {
    return JSON.stringify(LogoAnnotations$outboundSchema.parse(logoAnnotations));
}
export function logoAnnotationsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => LogoAnnotations$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LogoAnnotations' from JSON`);
}
/** @internal */
export const GoogleLogoDetectionAnalysisData$inboundSchema = z.object({
    logo_annotations: z.array(z.lazy(() => LogoAnnotations$inboundSchema)),
}).transform((v) => {
    return remap$(v, {
        "logo_annotations": "logoAnnotations",
    });
});
/** @internal */
export const GoogleLogoDetectionAnalysisData$outboundSchema = z.object({
    logoAnnotations: z.array(z.lazy(() => LogoAnnotations$outboundSchema)),
}).transform((v) => {
    return 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.
 */
export var GoogleLogoDetectionAnalysisData$;
(function (GoogleLogoDetectionAnalysisData$) {
    /** @deprecated use `GoogleLogoDetectionAnalysisData$inboundSchema` instead. */
    GoogleLogoDetectionAnalysisData$.inboundSchema = GoogleLogoDetectionAnalysisData$inboundSchema;
    /** @deprecated use `GoogleLogoDetectionAnalysisData$outboundSchema` instead. */
    GoogleLogoDetectionAnalysisData$.outboundSchema = GoogleLogoDetectionAnalysisData$outboundSchema;
})(GoogleLogoDetectionAnalysisData$ || (GoogleLogoDetectionAnalysisData$ = {}));
export function googleLogoDetectionAnalysisDataToJSON(googleLogoDetectionAnalysisData) {
    return JSON.stringify(GoogleLogoDetectionAnalysisData$outboundSchema.parse(googleLogoDetectionAnalysisData));
}
export function googleLogoDetectionAnalysisDataFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GoogleLogoDetectionAnalysisData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GoogleLogoDetectionAnalysisData' from JSON`);
}
//# sourceMappingURL=googlelogodetectionanalysisdata.js.map