/**
 * Cloudflare LOGS API
 *
 * Generated from Cloudflare TypeScript SDK.
 * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service logs
 */
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 GetControlCmbConfigRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/logs/control/cmb/config",
}));
export const GetControlCmbConfigResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    allowOutOfRegionAccess: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    regions: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    allowOutOfRegionAccess: "allow_out_of_region_access",
    regions: "regions",
}))
    .pipe(T.ResponsePath("result"));
export const getControlCmbConfig = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetControlCmbConfigRequest,
    output: GetControlCmbConfigResponse,
    errors: [],
}));
export const CreateControlCmbConfigRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    allowOutOfRegionAccess: Schema.optional(Schema.Boolean),
    regions: Schema.optional(Schema.String),
}).pipe(Schema.encodeKeys({
    allowOutOfRegionAccess: "allow_out_of_region_access",
    regions: "regions",
}), T.Http({
    method: "POST",
    path: "/accounts/{account_id}/logs/control/cmb/config",
}));
export const CreateControlCmbConfigResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    allowOutOfRegionAccess: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    regions: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    allowOutOfRegionAccess: "allow_out_of_region_access",
    regions: "regions",
}))
    .pipe(T.ResponsePath("result"));
export const createControlCmbConfig = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateControlCmbConfigRequest,
    output: CreateControlCmbConfigResponse,
    errors: [],
}));
export const DeleteControlCmbConfigRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/logs/control/cmb/config",
}));
export const DeleteControlCmbConfigResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown.pipe(T.ResponsePath("result"));
export const deleteControlCmbConfig = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteControlCmbConfigRequest,
    output: DeleteControlCmbConfigResponse,
    errors: [],
}));
export const GetControlRetentionRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/zones/{zone_id}/logs/control/retention/flag",
}));
export const GetControlRetentionResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    flag: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const getControlRetention = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetControlRetentionRequest,
    output: GetControlRetentionResponse,
    errors: [],
}));
export const CreateControlRetentionRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    flag: Schema.optional(Schema.Boolean),
}).pipe(T.Http({
    method: "POST",
    path: "/zones/{zone_id}/logs/control/retention/flag",
}));
export const CreateControlRetentionResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    flag: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const createControlRetention = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateControlRetentionRequest,
    output: CreateControlRetentionResponse,
    errors: [],
}));
export const GetRayidRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    rayID: Schema.String.pipe(T.HttpPath("RayID")),
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    fields: Schema.optional(Schema.String).pipe(T.HttpQuery("fields")),
    timestamps: Schema.optional(Schema.Literals(["unix", "unixnano", "rfc3339"])).pipe(T.HttpQuery("timestamps")),
}).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/logs/rayids/{RayID}" }));
export const GetRayidResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.String;
export const getRayid = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetRayidRequest,
    output: GetRayidResponse,
    errors: [],
}));
export const GetReceivedRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    end: Schema.Union([Schema.String, Schema.Number]).pipe(T.HttpQuery("end")),
    count: Schema.optional(Schema.Number).pipe(T.HttpQuery("count")),
    fields: Schema.optional(Schema.String).pipe(T.HttpQuery("fields")),
    sample: Schema.optional(Schema.Number).pipe(T.HttpQuery("sample")),
    start: Schema.optional(Schema.Union([Schema.String, Schema.Number])).pipe(T.HttpQuery("start")),
    timestamps: Schema.optional(Schema.Literals(["unix", "unixnano", "rfc3339"])).pipe(T.HttpQuery("timestamps")),
}).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/logs/received" }));
export const GetReceivedResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.String;
export const getReceived = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetReceivedRequest,
    output: GetReceivedResponse,
    errors: [],
}));
export const GetReceivedFieldRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/logs/received/fields" }));
export const GetReceivedFieldResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    key: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
});
export const getReceivedField = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetReceivedFieldRequest,
    output: GetReceivedFieldResponse,
    errors: [],
}));
//# sourceMappingURL=logs.js.map