"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.SearchResponseRange$inboundSchema = exports.Value$ = exports.Value$outboundSchema = exports.Value$inboundSchema = exports.Resource$ = exports.Resource$outboundSchema = exports.Resource$inboundSchema = exports.AccessibilityAnalysis$ = exports.AccessibilityAnalysis$outboundSchema = exports.AccessibilityAnalysis$inboundSchema = exports.QualityAnalysis$ = exports.QualityAnalysis$outboundSchema = exports.QualityAnalysis$inboundSchema = exports.Metadata$ = exports.Metadata$outboundSchema = exports.Metadata$inboundSchema = exports.ImageAnalysis$ = exports.ImageAnalysis$outboundSchema = exports.ImageAnalysis$inboundSchema = exports.SearchResponseImageMetadata$ = exports.SearchResponseImageMetadata$outboundSchema = exports.SearchResponseImageMetadata$inboundSchema = exports.SearchResponseContext$ = exports.SearchResponseContext$outboundSchema = exports.SearchResponseContext$inboundSchema = exports.UploadedBy$ = exports.UploadedBy$outboundSchema = exports.UploadedBy$inboundSchema = exports.CreatedBy$ = exports.CreatedBy$outboundSchema = exports.CreatedBy$inboundSchema = exports.SearchResponseAccessControl$ = exports.SearchResponseAccessControl$outboundSchema = exports.SearchResponseAccessControl$inboundSchema = exports.SearchResponseAccessMode$ = exports.SearchResponseAccessMode$outboundSchema = exports.SearchResponseAccessMode$inboundSchema = exports.SearchResponseStatus$ = exports.SearchResponseStatus$outboundSchema = exports.SearchResponseStatus$inboundSchema = exports.SearchResponseType$ = exports.SearchResponseType$outboundSchema = exports.SearchResponseType$inboundSchema = exports.SearchResponseResourceType$ = exports.SearchResponseResourceType$outboundSchema = exports.SearchResponseResourceType$inboundSchema = exports.SearchResponseAccessMode = exports.SearchResponseStatus = exports.SearchResponseType = exports.SearchResponseResourceType = void 0;
exports.SearchResponse$ = exports.SearchResponse$outboundSchema = exports.SearchResponse$inboundSchema = exports.Aggregations$ = exports.Aggregations$outboundSchema = exports.Aggregations$inboundSchema = exports.SearchResponseRange$ = exports.SearchResponseRange$outboundSchema = void 0;
exports.searchResponseAccessControlToJSON = searchResponseAccessControlToJSON;
exports.searchResponseAccessControlFromJSON = searchResponseAccessControlFromJSON;
exports.createdByToJSON = createdByToJSON;
exports.createdByFromJSON = createdByFromJSON;
exports.uploadedByToJSON = uploadedByToJSON;
exports.uploadedByFromJSON = uploadedByFromJSON;
exports.searchResponseContextToJSON = searchResponseContextToJSON;
exports.searchResponseContextFromJSON = searchResponseContextFromJSON;
exports.searchResponseImageMetadataToJSON = searchResponseImageMetadataToJSON;
exports.searchResponseImageMetadataFromJSON = searchResponseImageMetadataFromJSON;
exports.imageAnalysisToJSON = imageAnalysisToJSON;
exports.imageAnalysisFromJSON = imageAnalysisFromJSON;
exports.metadataToJSON = metadataToJSON;
exports.metadataFromJSON = metadataFromJSON;
exports.qualityAnalysisToJSON = qualityAnalysisToJSON;
exports.qualityAnalysisFromJSON = qualityAnalysisFromJSON;
exports.accessibilityAnalysisToJSON = accessibilityAnalysisToJSON;
exports.accessibilityAnalysisFromJSON = accessibilityAnalysisFromJSON;
exports.resourceToJSON = resourceToJSON;
exports.resourceFromJSON = resourceFromJSON;
exports.valueToJSON = valueToJSON;
exports.valueFromJSON = valueFromJSON;
exports.searchResponseRangeToJSON = searchResponseRangeToJSON;
exports.searchResponseRangeFromJSON = searchResponseRangeFromJSON;
exports.aggregationsToJSON = aggregationsToJSON;
exports.aggregationsFromJSON = aggregationsFromJSON;
exports.searchResponseToJSON = searchResponseToJSON;
exports.searchResponseFromJSON = searchResponseFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
/**
 * The type of resource.
 */
exports.SearchResponseResourceType = {
    Image: "image",
    Video: "video",
    Raw: "raw",
};
/**
 * The delivery type of the asset.
 */
exports.SearchResponseType = {
    Upload: "upload",
    Private: "private",
    Authenticated: "authenticated",
    List: "list",
    Fetch: "fetch",
};
/**
 * The current status of the asset.
 */
exports.SearchResponseStatus = {
    Active: "active",
    Inactive: "inactive",
};
/**
 * The access mode of the asset.
 */
exports.SearchResponseAccessMode = {
    Public: "public",
    Authenticated: "authenticated",
};
/** @internal */
exports.SearchResponseResourceType$inboundSchema = z.nativeEnum(exports.SearchResponseResourceType);
/** @internal */
exports.SearchResponseResourceType$outboundSchema = exports.SearchResponseResourceType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var SearchResponseResourceType$;
(function (SearchResponseResourceType$) {
    /** @deprecated use `SearchResponseResourceType$inboundSchema` instead. */
    SearchResponseResourceType$.inboundSchema = exports.SearchResponseResourceType$inboundSchema;
    /** @deprecated use `SearchResponseResourceType$outboundSchema` instead. */
    SearchResponseResourceType$.outboundSchema = exports.SearchResponseResourceType$outboundSchema;
})(SearchResponseResourceType$ || (exports.SearchResponseResourceType$ = SearchResponseResourceType$ = {}));
/** @internal */
exports.SearchResponseType$inboundSchema = z.nativeEnum(exports.SearchResponseType);
/** @internal */
exports.SearchResponseType$outboundSchema = exports.SearchResponseType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var SearchResponseType$;
(function (SearchResponseType$) {
    /** @deprecated use `SearchResponseType$inboundSchema` instead. */
    SearchResponseType$.inboundSchema = exports.SearchResponseType$inboundSchema;
    /** @deprecated use `SearchResponseType$outboundSchema` instead. */
    SearchResponseType$.outboundSchema = exports.SearchResponseType$outboundSchema;
})(SearchResponseType$ || (exports.SearchResponseType$ = SearchResponseType$ = {}));
/** @internal */
exports.SearchResponseStatus$inboundSchema = z.nativeEnum(exports.SearchResponseStatus);
/** @internal */
exports.SearchResponseStatus$outboundSchema = exports.SearchResponseStatus$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var SearchResponseStatus$;
(function (SearchResponseStatus$) {
    /** @deprecated use `SearchResponseStatus$inboundSchema` instead. */
    SearchResponseStatus$.inboundSchema = exports.SearchResponseStatus$inboundSchema;
    /** @deprecated use `SearchResponseStatus$outboundSchema` instead. */
    SearchResponseStatus$.outboundSchema = exports.SearchResponseStatus$outboundSchema;
})(SearchResponseStatus$ || (exports.SearchResponseStatus$ = SearchResponseStatus$ = {}));
/** @internal */
exports.SearchResponseAccessMode$inboundSchema = z.nativeEnum(exports.SearchResponseAccessMode);
/** @internal */
exports.SearchResponseAccessMode$outboundSchema = exports.SearchResponseAccessMode$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var SearchResponseAccessMode$;
(function (SearchResponseAccessMode$) {
    /** @deprecated use `SearchResponseAccessMode$inboundSchema` instead. */
    SearchResponseAccessMode$.inboundSchema = exports.SearchResponseAccessMode$inboundSchema;
    /** @deprecated use `SearchResponseAccessMode$outboundSchema` instead. */
    SearchResponseAccessMode$.outboundSchema = exports.SearchResponseAccessMode$outboundSchema;
})(SearchResponseAccessMode$ || (exports.SearchResponseAccessMode$ = SearchResponseAccessMode$ = {}));
/** @internal */
exports.SearchResponseAccessControl$inboundSchema = z.object({});
/** @internal */
exports.SearchResponseAccessControl$outboundSchema = z.object({});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var SearchResponseAccessControl$;
(function (SearchResponseAccessControl$) {
    /** @deprecated use `SearchResponseAccessControl$inboundSchema` instead. */
    SearchResponseAccessControl$.inboundSchema = exports.SearchResponseAccessControl$inboundSchema;
    /** @deprecated use `SearchResponseAccessControl$outboundSchema` instead. */
    SearchResponseAccessControl$.outboundSchema = exports.SearchResponseAccessControl$outboundSchema;
})(SearchResponseAccessControl$ || (exports.SearchResponseAccessControl$ = SearchResponseAccessControl$ = {}));
function searchResponseAccessControlToJSON(searchResponseAccessControl) {
    return JSON.stringify(exports.SearchResponseAccessControl$outboundSchema.parse(searchResponseAccessControl));
}
function searchResponseAccessControlFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchResponseAccessControl$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchResponseAccessControl' from JSON`);
}
/** @internal */
exports.CreatedBy$inboundSchema = z.object({
    access_key: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "access_key": "accessKey",
    });
});
/** @internal */
exports.CreatedBy$outboundSchema = z.object({
    accessKey: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        accessKey: "access_key",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CreatedBy$;
(function (CreatedBy$) {
    /** @deprecated use `CreatedBy$inboundSchema` instead. */
    CreatedBy$.inboundSchema = exports.CreatedBy$inboundSchema;
    /** @deprecated use `CreatedBy$outboundSchema` instead. */
    CreatedBy$.outboundSchema = exports.CreatedBy$outboundSchema;
})(CreatedBy$ || (exports.CreatedBy$ = CreatedBy$ = {}));
function createdByToJSON(createdBy) {
    return JSON.stringify(exports.CreatedBy$outboundSchema.parse(createdBy));
}
function createdByFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreatedBy$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreatedBy' from JSON`);
}
/** @internal */
exports.UploadedBy$inboundSchema = z.object({
    access_key: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "access_key": "accessKey",
    });
});
/** @internal */
exports.UploadedBy$outboundSchema = z.object({
    accessKey: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        accessKey: "access_key",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var UploadedBy$;
(function (UploadedBy$) {
    /** @deprecated use `UploadedBy$inboundSchema` instead. */
    UploadedBy$.inboundSchema = exports.UploadedBy$inboundSchema;
    /** @deprecated use `UploadedBy$outboundSchema` instead. */
    UploadedBy$.outboundSchema = exports.UploadedBy$outboundSchema;
})(UploadedBy$ || (exports.UploadedBy$ = UploadedBy$ = {}));
function uploadedByToJSON(uploadedBy) {
    return JSON.stringify(exports.UploadedBy$outboundSchema.parse(uploadedBy));
}
function uploadedByFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UploadedBy$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UploadedBy' from JSON`);
}
/** @internal */
exports.SearchResponseContext$inboundSchema = z.object({});
/** @internal */
exports.SearchResponseContext$outboundSchema = z.object({});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var SearchResponseContext$;
(function (SearchResponseContext$) {
    /** @deprecated use `SearchResponseContext$inboundSchema` instead. */
    SearchResponseContext$.inboundSchema = exports.SearchResponseContext$inboundSchema;
    /** @deprecated use `SearchResponseContext$outboundSchema` instead. */
    SearchResponseContext$.outboundSchema = exports.SearchResponseContext$outboundSchema;
})(SearchResponseContext$ || (exports.SearchResponseContext$ = SearchResponseContext$ = {}));
function searchResponseContextToJSON(searchResponseContext) {
    return JSON.stringify(exports.SearchResponseContext$outboundSchema.parse(searchResponseContext));
}
function searchResponseContextFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchResponseContext$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchResponseContext' from JSON`);
}
/** @internal */
exports.SearchResponseImageMetadata$inboundSchema = z.object({});
/** @internal */
exports.SearchResponseImageMetadata$outboundSchema = z.object({});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var SearchResponseImageMetadata$;
(function (SearchResponseImageMetadata$) {
    /** @deprecated use `SearchResponseImageMetadata$inboundSchema` instead. */
    SearchResponseImageMetadata$.inboundSchema = exports.SearchResponseImageMetadata$inboundSchema;
    /** @deprecated use `SearchResponseImageMetadata$outboundSchema` instead. */
    SearchResponseImageMetadata$.outboundSchema = exports.SearchResponseImageMetadata$outboundSchema;
})(SearchResponseImageMetadata$ || (exports.SearchResponseImageMetadata$ = SearchResponseImageMetadata$ = {}));
function searchResponseImageMetadataToJSON(searchResponseImageMetadata) {
    return JSON.stringify(exports.SearchResponseImageMetadata$outboundSchema.parse(searchResponseImageMetadata));
}
function searchResponseImageMetadataFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchResponseImageMetadata$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchResponseImageMetadata' from JSON`);
}
/** @internal */
exports.ImageAnalysis$inboundSchema = z.object({});
/** @internal */
exports.ImageAnalysis$outboundSchema = z.object({});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var ImageAnalysis$;
(function (ImageAnalysis$) {
    /** @deprecated use `ImageAnalysis$inboundSchema` instead. */
    ImageAnalysis$.inboundSchema = exports.ImageAnalysis$inboundSchema;
    /** @deprecated use `ImageAnalysis$outboundSchema` instead. */
    ImageAnalysis$.outboundSchema = exports.ImageAnalysis$outboundSchema;
})(ImageAnalysis$ || (exports.ImageAnalysis$ = ImageAnalysis$ = {}));
function imageAnalysisToJSON(imageAnalysis) {
    return JSON.stringify(exports.ImageAnalysis$outboundSchema.parse(imageAnalysis));
}
function imageAnalysisFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ImageAnalysis$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ImageAnalysis' from JSON`);
}
/** @internal */
exports.Metadata$inboundSchema = z.object({});
/** @internal */
exports.Metadata$outboundSchema = z.object({});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Metadata$;
(function (Metadata$) {
    /** @deprecated use `Metadata$inboundSchema` instead. */
    Metadata$.inboundSchema = exports.Metadata$inboundSchema;
    /** @deprecated use `Metadata$outboundSchema` instead. */
    Metadata$.outboundSchema = exports.Metadata$outboundSchema;
})(Metadata$ || (exports.Metadata$ = Metadata$ = {}));
function metadataToJSON(metadata) {
    return JSON.stringify(exports.Metadata$outboundSchema.parse(metadata));
}
function metadataFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Metadata$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Metadata' from JSON`);
}
/** @internal */
exports.QualityAnalysis$inboundSchema = z.object({});
/** @internal */
exports.QualityAnalysis$outboundSchema = z.object({});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var QualityAnalysis$;
(function (QualityAnalysis$) {
    /** @deprecated use `QualityAnalysis$inboundSchema` instead. */
    QualityAnalysis$.inboundSchema = exports.QualityAnalysis$inboundSchema;
    /** @deprecated use `QualityAnalysis$outboundSchema` instead. */
    QualityAnalysis$.outboundSchema = exports.QualityAnalysis$outboundSchema;
})(QualityAnalysis$ || (exports.QualityAnalysis$ = QualityAnalysis$ = {}));
function qualityAnalysisToJSON(qualityAnalysis) {
    return JSON.stringify(exports.QualityAnalysis$outboundSchema.parse(qualityAnalysis));
}
function qualityAnalysisFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.QualityAnalysis$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'QualityAnalysis' from JSON`);
}
/** @internal */
exports.AccessibilityAnalysis$inboundSchema = z.object({});
/** @internal */
exports.AccessibilityAnalysis$outboundSchema = z.object({});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var AccessibilityAnalysis$;
(function (AccessibilityAnalysis$) {
    /** @deprecated use `AccessibilityAnalysis$inboundSchema` instead. */
    AccessibilityAnalysis$.inboundSchema = exports.AccessibilityAnalysis$inboundSchema;
    /** @deprecated use `AccessibilityAnalysis$outboundSchema` instead. */
    AccessibilityAnalysis$.outboundSchema = exports.AccessibilityAnalysis$outboundSchema;
})(AccessibilityAnalysis$ || (exports.AccessibilityAnalysis$ = AccessibilityAnalysis$ = {}));
function accessibilityAnalysisToJSON(accessibilityAnalysis) {
    return JSON.stringify(exports.AccessibilityAnalysis$outboundSchema.parse(accessibilityAnalysis));
}
function accessibilityAnalysisFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AccessibilityAnalysis$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AccessibilityAnalysis' from JSON`);
}
/** @internal */
exports.Resource$inboundSchema = z.object({
    asset_id: z.string().optional(),
    public_id: z.string().optional(),
    asset_folder: z.string().optional(),
    filename: z.string().optional(),
    display_name: z.string().optional(),
    format: z.string().optional(),
    version: z.number().int().optional(),
    resource_type: exports.SearchResponseResourceType$inboundSchema.optional(),
    type: exports.SearchResponseType$inboundSchema.optional(),
    created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
        .optional(),
    uploaded_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
        .optional(),
    bytes: z.number().int().optional(),
    backup_bytes: z.number().int().optional(),
    width: z.number().int().optional(),
    height: z.number().int().optional(),
    aspect_ratio: z.number().optional(),
    pixels: z.number().int().optional(),
    url: z.string().optional(),
    secure_url: z.string().optional(),
    status: exports.SearchResponseStatus$inboundSchema.optional(),
    access_mode: exports.SearchResponseAccessMode$inboundSchema.optional(),
    access_control: z.nullable(z.lazy(() => exports.SearchResponseAccessControl$inboundSchema)).optional(),
    etag: z.string().optional(),
    created_by: z.lazy(() => exports.CreatedBy$inboundSchema).optional(),
    uploaded_by: z.lazy(() => exports.UploadedBy$inboundSchema).optional(),
    context: z.lazy(() => exports.SearchResponseContext$inboundSchema).optional(),
    tags: z.array(z.string()).optional(),
    image_metadata: z.lazy(() => exports.SearchResponseImageMetadata$inboundSchema)
        .optional(),
    image_analysis: z.lazy(() => exports.ImageAnalysis$inboundSchema).optional(),
    metadata: z.lazy(() => exports.Metadata$inboundSchema).optional(),
    quality_analysis: z.lazy(() => exports.QualityAnalysis$inboundSchema).optional(),
    accessibility_analysis: z.lazy(() => exports.AccessibilityAnalysis$inboundSchema)
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "asset_id": "assetId",
        "public_id": "publicId",
        "asset_folder": "assetFolder",
        "display_name": "displayName",
        "resource_type": "resourceType",
        "created_at": "createdAt",
        "uploaded_at": "uploadedAt",
        "backup_bytes": "backupBytes",
        "aspect_ratio": "aspectRatio",
        "secure_url": "secureUrl",
        "access_mode": "accessMode",
        "access_control": "accessControl",
        "created_by": "createdBy",
        "uploaded_by": "uploadedBy",
        "image_metadata": "imageMetadata",
        "image_analysis": "imageAnalysis",
        "quality_analysis": "qualityAnalysis",
        "accessibility_analysis": "accessibilityAnalysis",
    });
});
/** @internal */
exports.Resource$outboundSchema = z.object({
    assetId: z.string().optional(),
    publicId: z.string().optional(),
    assetFolder: z.string().optional(),
    filename: z.string().optional(),
    displayName: z.string().optional(),
    format: z.string().optional(),
    version: z.number().int().optional(),
    resourceType: exports.SearchResponseResourceType$outboundSchema.optional(),
    type: exports.SearchResponseType$outboundSchema.optional(),
    createdAt: z.date().transform(v => v.toISOString()).optional(),
    uploadedAt: z.date().transform(v => v.toISOString()).optional(),
    bytes: z.number().int().optional(),
    backupBytes: z.number().int().optional(),
    width: z.number().int().optional(),
    height: z.number().int().optional(),
    aspectRatio: z.number().optional(),
    pixels: z.number().int().optional(),
    url: z.string().optional(),
    secureUrl: z.string().optional(),
    status: exports.SearchResponseStatus$outboundSchema.optional(),
    accessMode: exports.SearchResponseAccessMode$outboundSchema.optional(),
    accessControl: z.nullable(z.lazy(() => exports.SearchResponseAccessControl$outboundSchema)).optional(),
    etag: z.string().optional(),
    createdBy: z.lazy(() => exports.CreatedBy$outboundSchema).optional(),
    uploadedBy: z.lazy(() => exports.UploadedBy$outboundSchema).optional(),
    context: z.lazy(() => exports.SearchResponseContext$outboundSchema).optional(),
    tags: z.array(z.string()).optional(),
    imageMetadata: z.lazy(() => exports.SearchResponseImageMetadata$outboundSchema)
        .optional(),
    imageAnalysis: z.lazy(() => exports.ImageAnalysis$outboundSchema).optional(),
    metadata: z.lazy(() => exports.Metadata$outboundSchema).optional(),
    qualityAnalysis: z.lazy(() => exports.QualityAnalysis$outboundSchema).optional(),
    accessibilityAnalysis: z.lazy(() => exports.AccessibilityAnalysis$outboundSchema)
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        assetId: "asset_id",
        publicId: "public_id",
        assetFolder: "asset_folder",
        displayName: "display_name",
        resourceType: "resource_type",
        createdAt: "created_at",
        uploadedAt: "uploaded_at",
        backupBytes: "backup_bytes",
        aspectRatio: "aspect_ratio",
        secureUrl: "secure_url",
        accessMode: "access_mode",
        accessControl: "access_control",
        createdBy: "created_by",
        uploadedBy: "uploaded_by",
        imageMetadata: "image_metadata",
        imageAnalysis: "image_analysis",
        qualityAnalysis: "quality_analysis",
        accessibilityAnalysis: "accessibility_analysis",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Resource$;
(function (Resource$) {
    /** @deprecated use `Resource$inboundSchema` instead. */
    Resource$.inboundSchema = exports.Resource$inboundSchema;
    /** @deprecated use `Resource$outboundSchema` instead. */
    Resource$.outboundSchema = exports.Resource$outboundSchema;
})(Resource$ || (exports.Resource$ = Resource$ = {}));
function resourceToJSON(resource) {
    return JSON.stringify(exports.Resource$outboundSchema.parse(resource));
}
function resourceFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Resource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Resource' from JSON`);
}
/** @internal */
exports.Value$inboundSchema = z
    .object({
    value: z.string().optional(),
    count: z.number().int().optional(),
});
/** @internal */
exports.Value$outboundSchema = z.object({
    value: z.string().optional(),
    count: 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 Value$;
(function (Value$) {
    /** @deprecated use `Value$inboundSchema` instead. */
    Value$.inboundSchema = exports.Value$inboundSchema;
    /** @deprecated use `Value$outboundSchema` instead. */
    Value$.outboundSchema = exports.Value$outboundSchema;
})(Value$ || (exports.Value$ = Value$ = {}));
function valueToJSON(value) {
    return JSON.stringify(exports.Value$outboundSchema.parse(value));
}
function valueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Value$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Value' from JSON`);
}
/** @internal */
exports.SearchResponseRange$inboundSchema = z.object({
    from: z.number().optional(),
    to: z.number().optional(),
    count: z.number().int().optional(),
});
/** @internal */
exports.SearchResponseRange$outboundSchema = z.object({
    from: z.number().optional(),
    to: z.number().optional(),
    count: 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 SearchResponseRange$;
(function (SearchResponseRange$) {
    /** @deprecated use `SearchResponseRange$inboundSchema` instead. */
    SearchResponseRange$.inboundSchema = exports.SearchResponseRange$inboundSchema;
    /** @deprecated use `SearchResponseRange$outboundSchema` instead. */
    SearchResponseRange$.outboundSchema = exports.SearchResponseRange$outboundSchema;
})(SearchResponseRange$ || (exports.SearchResponseRange$ = SearchResponseRange$ = {}));
function searchResponseRangeToJSON(searchResponseRange) {
    return JSON.stringify(exports.SearchResponseRange$outboundSchema.parse(searchResponseRange));
}
function searchResponseRangeFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchResponseRange$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchResponseRange' from JSON`);
}
/** @internal */
exports.Aggregations$inboundSchema = z.object({
    values: z.array(z.lazy(() => exports.Value$inboundSchema)).optional(),
    ranges: z.array(z.lazy(() => exports.SearchResponseRange$inboundSchema)).optional(),
});
/** @internal */
exports.Aggregations$outboundSchema = z.object({
    values: z.array(z.lazy(() => exports.Value$outboundSchema)).optional(),
    ranges: z.array(z.lazy(() => exports.SearchResponseRange$outboundSchema)).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Aggregations$;
(function (Aggregations$) {
    /** @deprecated use `Aggregations$inboundSchema` instead. */
    Aggregations$.inboundSchema = exports.Aggregations$inboundSchema;
    /** @deprecated use `Aggregations$outboundSchema` instead. */
    Aggregations$.outboundSchema = exports.Aggregations$outboundSchema;
})(Aggregations$ || (exports.Aggregations$ = Aggregations$ = {}));
function aggregationsToJSON(aggregations) {
    return JSON.stringify(exports.Aggregations$outboundSchema.parse(aggregations));
}
function aggregationsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Aggregations$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Aggregations' from JSON`);
}
/** @internal */
exports.SearchResponse$inboundSchema = z.object({
    total_count: z.number().int().optional(),
    time: z.number().int().optional(),
    resources: z.array(z.lazy(() => exports.Resource$inboundSchema)).optional(),
    next_cursor: z.nullable(z.string()).optional(),
    aggregations: z.lazy(() => exports.Aggregations$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "total_count": "totalCount",
        "next_cursor": "nextCursor",
    });
});
/** @internal */
exports.SearchResponse$outboundSchema = z.object({
    totalCount: z.number().int().optional(),
    time: z.number().int().optional(),
    resources: z.array(z.lazy(() => exports.Resource$outboundSchema)).optional(),
    nextCursor: z.nullable(z.string()).optional(),
    aggregations: z.lazy(() => exports.Aggregations$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        totalCount: "total_count",
        nextCursor: "next_cursor",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var SearchResponse$;
(function (SearchResponse$) {
    /** @deprecated use `SearchResponse$inboundSchema` instead. */
    SearchResponse$.inboundSchema = exports.SearchResponse$inboundSchema;
    /** @deprecated use `SearchResponse$outboundSchema` instead. */
    SearchResponse$.outboundSchema = exports.SearchResponse$outboundSchema;
})(SearchResponse$ || (exports.SearchResponse$ = SearchResponse$ = {}));
function searchResponseToJSON(searchResponse) {
    return JSON.stringify(exports.SearchResponse$outboundSchema.parse(searchResponse));
}
function searchResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.SearchResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SearchResponse' from JSON`);
}
//# sourceMappingURL=searchresponse.js.map