/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: bbcd43bc9f51
 */
import * as z from "zod";
import { AccessControlItem$zodSchema, } from "./accesscontrolitem.js";
import { DeliveryTypeAll$zodSchema, } from "./deliverytypeall.js";
/**
 * The type of resource.
 */
export const SearchResponseResourceType = {
    Image: "image",
    Video: "video",
    Raw: "raw",
};
export const SearchResponseResourceType$zodSchema = z.enum([
    "image",
    "video",
    "raw",
]).describe("The type of resource.");
/**
 * The current status of the asset.
 */
export const SearchResponseStatus = {
    Active: "active",
    Inactive: "inactive",
    Deleted: "deleted",
    Pending: "pending",
};
export const SearchResponseStatus$zodSchema = z.enum([
    "active",
    "inactive",
    "deleted",
    "pending",
]).describe("The current status of the asset.");
/**
 * The access mode of the asset.
 */
export const SearchResponseAccessMode = {
    Public: "public",
    Authenticated: "authenticated",
};
export const SearchResponseAccessMode$zodSchema = z.enum([
    "public",
    "authenticated",
]).describe("The access mode of the asset.");
export const CreatedBy$zodSchema = z.object({
    access_key: z.string().optional().describe("The access key of the user who created the asset."),
}).describe("Information about who created the asset.");
export const UploadedBy$zodSchema = z.object({
    access_key: z.string().optional().describe("The access key of the user who uploaded the asset."),
}).describe("Information about who uploaded the asset.");
export const SearchResponseImageMetadata$zodSchema = z.object({}).describe("Technical metadata extracted from the image.");
export const ImageAnalysis$zodSchema = z.object({})
    .describe("Results of image analysis.");
export const Metadata$zodSchema = z.object({}).describe("Structured metadata associated with the asset.");
export const QualityAnalysis$zodSchema = z.object({}).describe("Results of quality analysis.");
export const AccessibilityAnalysis$zodSchema = z.object({}).describe("Results of accessibility analysis.");
export const Resource$zodSchema = z.object({
    access_control: z.array(AccessControlItem$zodSchema).nullable().optional()
        .describe("The access control settings for the asset."),
    access_mode: SearchResponseAccessMode$zodSchema.optional().describe("The access mode of the asset."),
    accessibility_analysis: z.lazy(() => AccessibilityAnalysis$zodSchema)
        .nullable().optional().describe("Results of accessibility analysis."),
    aspect_ratio: z.number().optional().describe("The aspect ratio of the asset (width/height)."),
    asset_folder: z.string().optional().describe("The folder where the asset is stored."),
    asset_id: z.string().optional().describe("The unique identifier of the asset."),
    backup_bytes: z.int().optional().describe("The size of the backup asset in bytes."),
    bytes: z.int().optional().describe("The size of the asset in bytes."),
    context: z.record(z.string(), z.string()).nullable().optional().describe("Custom context metadata associated with the asset."),
    created_at: z.iso.datetime({ offset: true }).optional().describe("The timestamp when the asset was created."),
    created_by: z.lazy(() => CreatedBy$zodSchema).nullable().optional().describe("Information about who created the asset."),
    display_name: z.string().optional().describe("The display name of the asset."),
    etag: z.string().optional().describe("The ETag of the asset."),
    filename: z.string().optional().describe("The original filename of the asset."),
    format: z.string().optional().describe("The format of the asset."),
    height: z.int().optional().describe("The height of the asset in pixels."),
    image_analysis: z.lazy(() => ImageAnalysis$zodSchema).nullable().optional()
        .describe("Results of image analysis."),
    image_metadata: z.lazy(() => SearchResponseImageMetadata$zodSchema).nullable()
        .optional().describe("Technical metadata extracted from the image."),
    metadata: z.lazy(() => Metadata$zodSchema).nullable().optional().describe("Structured metadata associated with the asset."),
    pixels: z.int().optional().describe("The total number of pixels in the asset."),
    public_id: z.string().optional().describe("The public identifier that is used to build the URL."),
    quality_analysis: z.lazy(() => QualityAnalysis$zodSchema).nullable()
        .optional().describe("Results of quality analysis."),
    resource_type: SearchResponseResourceType$zodSchema.optional().describe("The type of resource."),
    secure_url: z.string().optional().describe("The HTTPS URL for accessing the asset."),
    status: SearchResponseStatus$zodSchema.optional().describe("The current status of the asset."),
    tags: z.array(z.string()).nullable().optional().describe("Tags associated with the asset."),
    type: DeliveryTypeAll$zodSchema.optional().describe("All supported delivery types."),
    uploaded_at: z.iso.datetime({ offset: true }).optional().describe("The timestamp when the asset was uploaded."),
    uploaded_by: z.lazy(() => UploadedBy$zodSchema).nullable().optional()
        .describe("Information about who uploaded the asset."),
    url: z.string().optional().describe("The HTTP URL for accessing the asset."),
    version: z.int().optional().describe("The version number of the asset."),
    width: z.int().optional().describe("The width of the asset in pixels."),
}).describe("Resource fields that can be returned. All fields are optional and can be filtered using the fields parameter.");
export const Value$zodSchema = z.object({
    count: z.int().optional().describe("The count of resources with this value"),
    value: z.string().optional().describe("The value being aggregated"),
});
export const SearchResponseRange$zodSchema = z
    .object({
    count: z.int().optional().describe("The count of resources within this range"),
    from: z.number().optional().describe("Start of the range (inclusive)"),
    to: z.number().optional().describe("End of the range (exclusive)"),
});
export const Aggregations$zodSchema = z.object({
    ranges: z.array(z.lazy(() => SearchResponseRange$zodSchema)).optional()
        .describe("Array of range-based aggregation results when using range aggregation (e.g., bytes, width, height, etc.)"),
    values: z.array(z.lazy(() => Value$zodSchema)).optional().describe("Array of aggregation values when using simple aggregation (e.g., by format, resource_type, etc.)"),
}).describe("Aggregation results when the aggregate parameter is used in the request. Only included when aggregations are requested.");
export const SearchResponse$zodSchema = z.object({
    aggregations: z.lazy(() => Aggregations$zodSchema).optional().describe("Aggregation results when the aggregate parameter is used in the request. Only included when aggregations are requested."),
    next_cursor: z.string().nullable().optional().describe("A cursor for pagination. Only included when there are more results available."),
    resources: z.array(z.lazy(() => Resource$zodSchema)).optional().describe("The list of resources matching the search criteria. Can be empty if no results found."),
    time: z.int().optional().describe("The time taken to execute the search query in milliseconds."),
    total_count: z.int().optional().describe("The total number of resources matching the search criteria."),
}).describe("The response object returned by search operations.");
//# sourceMappingURL=searchresponse.js.map