/**
 * Cloudflare ARGO API
 *
 * Generated from Cloudflare TypeScript SDK.
 * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service argo
 */
import * as Schema from "effect/Schema";
import * as API from "../client/api.js";
import * as T from "../traits.js";
import {} from "../errors.js";
// =============================================================================
// Errors
// =============================================================================
export class InvalidObjectIdentifier extends Schema.TaggedErrorClass()("InvalidObjectIdentifier", { code: Schema.Number, message: Schema.String }) {
}
T.applyErrorMatchers(InvalidObjectIdentifier, [{ code: 7003 }]);
export class NotAuthorized extends Schema.TaggedErrorClass()("NotAuthorized", { code: Schema.Number, message: Schema.String }) {
}
T.applyErrorMatchers(NotAuthorized, [{ code: 1015 }]);
export const GetSmartRoutingRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/argo/smart_routing" }));
export const GetSmartRoutingResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
    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 getSmartRouting = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetSmartRoutingRequest,
    output: GetSmartRoutingResponse,
    errors: [InvalidObjectIdentifier, NotAuthorized],
}));
export const PatchSmartRoutingRequest = 
/*@__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}/argo/smart_routing" }));
export const PatchSmartRoutingResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
    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 patchSmartRouting = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PatchSmartRoutingRequest,
    output: PatchSmartRoutingResponse,
    errors: [InvalidObjectIdentifier, NotAuthorized],
}));
export const GetTieredCachingRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/argo/tiered_caching" }));
export const GetTieredCachingResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.Literal("tiered_caching"),
    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 getTieredCaching = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetTieredCachingRequest,
    output: GetTieredCachingResponse,
    errors: [InvalidObjectIdentifier],
}));
export const PatchTieredCachingRequest = 
/*@__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}/argo/tiered_caching" }));
export const PatchTieredCachingResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.Literal("tiered_caching"),
    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 patchTieredCaching = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PatchTieredCachingRequest,
    output: PatchTieredCachingResponse,
    errors: [InvalidObjectIdentifier],
}));
//# sourceMappingURL=argo.js.map