/**
 * Cloudflare CLOUD-CONNECTOR API
 *
 * Generated from Cloudflare TypeScript SDK.
 * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service cloud-connector
 */
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 ListRulesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/cloud_connector/rules" }));
export const ListRulesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        expression: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        parameters: Schema.optional(Schema.Union([
            Schema.Struct({
                host: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }),
            Schema.Null,
        ])),
        provider: Schema.optional(Schema.Union([
            Schema.Literals([
                "aws_s3",
                "cloudflare_r2",
                "gcp_storage",
                "azure_storage",
            ]),
            Schema.Null,
        ])),
    })),
});
export const listRules = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListRulesRequest,
    output: ListRulesResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
export const PutRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    rules: Schema.optional(Schema.Array(Schema.Struct({
        id: Schema.optional(Schema.String),
        description: Schema.optional(Schema.String),
        enabled: Schema.optional(Schema.Boolean),
        expression: Schema.optional(Schema.String),
        parameters: Schema.optional(Schema.Struct({
            host: Schema.optional(Schema.String),
        })),
        provider: Schema.optional(Schema.Literals([
            "aws_s3",
            "cloudflare_r2",
            "gcp_storage",
            "azure_storage",
        ])),
    }))),
}).pipe(T.Http({ method: "PUT", path: "/zones/{zone_id}/cloud_connector/rules" }));
export const PutRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        expression: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        parameters: Schema.optional(Schema.Union([
            Schema.Struct({
                host: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }),
            Schema.Null,
        ])),
        provider: Schema.optional(Schema.Union([
            Schema.Literals([
                "aws_s3",
                "cloudflare_r2",
                "gcp_storage",
                "azure_storage",
            ]),
            Schema.Null,
        ])),
    })),
});
export const putRule = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: PutRuleRequest,
    output: PutRuleResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
//# sourceMappingURL=cloud-connector.js.map