/**
 * Cloudflare CACHE API
 *
 * Generated from Cloudflare TypeScript SDK.
 * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service cache
 */
import * as Schema from "effect/Schema";
import * as API from "../client/api.js";
import * as T from "../traits.js";
import {} from "../errors.js";
export const PurgeCacheRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    tags: Schema.optional(Schema.Array(Schema.String)),
}).pipe(T.Http({ method: "POST", path: "/zones/{zone_id}/purge_cache" }));
export const PurgeCacheResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
}).pipe(T.ResponsePath("result"));
export const purgeCache = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PurgeCacheRequest,
    output: PurgeCacheResponse,
    errors: [],
}));
export const GetCacheReserveRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/cache/cache_reserve" }));
export const GetCacheReserveResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.Literal("cache_reserve"),
    editable: Schema.Boolean,
    value: Schema.Literals(["on", "off"]),
    modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    editable: "editable",
    value: "value",
    modifiedOn: "modified_on",
}))
    .pipe(T.ResponsePath("result"));
export const getCacheReserve = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetCacheReserveRequest,
    output: GetCacheReserveResponse,
    errors: [],
}));
export const PatchCacheReserveRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    value: Schema.Literals(["on", "off"]),
}).pipe(T.Http({ method: "PATCH", path: "/zones/{zone_id}/cache/cache_reserve" }));
export const PatchCacheReserveResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.Literal("cache_reserve"),
    editable: Schema.Boolean,
    value: Schema.Literals(["on", "off"]),
    modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    editable: "editable",
    value: "value",
    modifiedOn: "modified_on",
}))
    .pipe(T.ResponsePath("result"));
export const patchCacheReserve = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PatchCacheReserveRequest,
    output: PatchCacheReserveResponse,
    errors: [],
}));
export const StatusCacheReserveRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/zones/{zone_id}/cache/cache_reserve_clear",
}));
export const StatusCacheReserveResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.Literal("cache_reserve_clear"),
    startTs: Schema.String,
    state: Schema.Literals(["In-progress", "Completed"]),
    endTs: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    startTs: "start_ts",
    state: "state",
    endTs: "end_ts",
    modifiedOn: "modified_on",
}))
    .pipe(T.ResponsePath("result"));
export const statusCacheReserve = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: StatusCacheReserveRequest,
    output: StatusCacheReserveResponse,
    errors: [],
}));
export const ClearCacheReserveRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    body: Schema.Unknown.pipe(T.HttpBody()),
}).pipe(T.Http({
    method: "POST",
    path: "/zones/{zone_id}/cache/cache_reserve_clear",
}));
export const ClearCacheReserveResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.Literal("cache_reserve_clear"),
    startTs: Schema.String,
    state: Schema.Literals(["In-progress", "Completed"]),
    endTs: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    startTs: "start_ts",
    state: "state",
    endTs: "end_ts",
    modifiedOn: "modified_on",
}))
    .pipe(T.ResponsePath("result"));
export const clearCacheReserve = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: ClearCacheReserveRequest,
    output: ClearCacheReserveResponse,
    errors: [],
}));
export const GetRegionalTieredCacheRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/zones/{zone_id}/cache/regional_tiered_cache",
}));
export const GetRegionalTieredCacheResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.Literal("tc_regional"),
    editable: Schema.Boolean,
    value: Schema.Literals(["on", "off"]),
    modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    editable: "editable",
    value: "value",
    modifiedOn: "modified_on",
}))
    .pipe(T.ResponsePath("result"));
export const getRegionalTieredCache = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetRegionalTieredCacheRequest,
    output: GetRegionalTieredCacheResponse,
    errors: [],
}));
export const PatchRegionalTieredCacheRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    value: Schema.Literals(["on", "off"]),
}).pipe(T.Http({
    method: "PATCH",
    path: "/zones/{zone_id}/cache/regional_tiered_cache",
}));
export const PatchRegionalTieredCacheResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.Literal("tc_regional"),
    editable: Schema.Boolean,
    value: Schema.Literals(["on", "off"]),
    modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    editable: "editable",
    value: "value",
    modifiedOn: "modified_on",
}))
    .pipe(T.ResponsePath("result"));
export const patchRegionalTieredCache = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PatchRegionalTieredCacheRequest,
    output: PatchRegionalTieredCacheResponse,
    errors: [],
}));
export const GetSmartTieredCacheRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/zones/{zone_id}/cache/tiered_cache_smart_topology_enable",
}));
export const GetSmartTieredCacheResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.Literal("tiered_cache_smart_topology_enable"),
    editable: Schema.Boolean,
    value: Schema.Literals(["on", "off"]),
    modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    editable: "editable",
    value: "value",
    modifiedOn: "modified_on",
}))
    .pipe(T.ResponsePath("result"));
export const getSmartTieredCache = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetSmartTieredCacheRequest,
    output: GetSmartTieredCacheResponse,
    errors: [],
}));
export const PatchSmartTieredCacheRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    value: Schema.Literals(["on", "off"]),
}).pipe(T.Http({
    method: "PATCH",
    path: "/zones/{zone_id}/cache/tiered_cache_smart_topology_enable",
}));
export const PatchSmartTieredCacheResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.Literal("tiered_cache_smart_topology_enable"),
    editable: Schema.Boolean,
    value: Schema.Literals(["on", "off"]),
    modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    editable: "editable",
    value: "value",
    modifiedOn: "modified_on",
}))
    .pipe(T.ResponsePath("result"));
export const patchSmartTieredCache = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PatchSmartTieredCacheRequest,
    output: PatchSmartTieredCacheResponse,
    errors: [],
}));
export const DeleteSmartTieredCacheRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/zones/{zone_id}/cache/tiered_cache_smart_topology_enable",
}));
export const DeleteSmartTieredCacheResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.Literal("tiered_cache_smart_topology_enable"),
    editable: Schema.Boolean,
    modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    editable: "editable",
    modifiedOn: "modified_on",
}))
    .pipe(T.ResponsePath("result"));
export const deleteSmartTieredCache = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteSmartTieredCacheRequest,
    output: DeleteSmartTieredCacheResponse,
    errors: [],
}));
export const GetVariantRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/cache/variants" }));
export const GetVariantResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.Literal("variants"),
    editable: Schema.Boolean,
    value: Schema.Struct({
        avif: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
        bmp: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
        gif: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
        jp2: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
        jpeg: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
        jpg: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
        jpg2: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
        png: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
        tif: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
        tiff: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
        webp: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
    }),
    modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    editable: "editable",
    value: "value",
    modifiedOn: "modified_on",
}))
    .pipe(T.ResponsePath("result"));
export const getVariant = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetVariantRequest,
    output: GetVariantResponse,
    errors: [],
}));
export const PatchVariantRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    value: Schema.Struct({
        avif: Schema.optional(Schema.Array(Schema.String)),
        bmp: Schema.optional(Schema.Array(Schema.String)),
        gif: Schema.optional(Schema.Array(Schema.String)),
        jp2: Schema.optional(Schema.Array(Schema.String)),
        jpeg: Schema.optional(Schema.Array(Schema.String)),
        jpg: Schema.optional(Schema.Array(Schema.String)),
        jpg2: Schema.optional(Schema.Array(Schema.String)),
        png: Schema.optional(Schema.Array(Schema.String)),
        tif: Schema.optional(Schema.Array(Schema.String)),
        tiff: Schema.optional(Schema.Array(Schema.String)),
        webp: Schema.optional(Schema.Array(Schema.String)),
    }),
}).pipe(T.Http({ method: "PATCH", path: "/zones/{zone_id}/cache/variants" }));
export const PatchVariantResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.Literal("variants"),
    editable: Schema.Boolean,
    value: Schema.Struct({
        avif: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
        bmp: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
        gif: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
        jp2: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
        jpeg: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
        jpg: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
        jpg2: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
        png: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
        tif: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
        tiff: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
        webp: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
    }),
    modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    editable: "editable",
    value: "value",
    modifiedOn: "modified_on",
}))
    .pipe(T.ResponsePath("result"));
export const patchVariant = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PatchVariantRequest,
    output: PatchVariantResponse,
    errors: [],
}));
export const DeleteVariantRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({ method: "DELETE", path: "/zones/{zone_id}/cache/variants" }));
export const DeleteVariantResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.Literal("variants"),
    editable: Schema.Boolean,
    modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    editable: "editable",
    modifiedOn: "modified_on",
}))
    .pipe(T.ResponsePath("result"));
export const deleteVariant = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteVariantRequest,
    output: DeleteVariantResponse,
    errors: [],
}));
//# sourceMappingURL=cache.js.map