/**
 * Cloudflare LOGPUSH API
 *
 * Generated from Cloudflare TypeScript SDK.
 * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service logpush
 */
import * as Schema from "effect/Schema";
import * as API from "../client/api.js";
import * as T from "../traits.js";
import {} from "../errors.js";
// =============================================================================
// DatasetField
// =============================================================================
const GetDatasetFieldBaseFields = {
    datasetId: Schema.Union([
        Schema.Literal("access_requests"),
        Schema.Literal("audit_logs"),
        Schema.Literal("audit_logs_v2"),
        Schema.Literal("biso_user_actions"),
        Schema.Literal("casb_findings"),
        Schema.Literal("device_posture_results"),
        Schema.Literal("dex_application_tests"),
        Schema.Literal("dex_device_state_events"),
        Schema.Literal("dlp_forensic_copies"),
        Schema.Literal("dns_firewall_logs"),
        Schema.Literal("dns_logs"),
        Schema.Literal("email_security_alerts"),
        Schema.Literal("firewall_events"),
        Schema.Literal("gateway_dns"),
        Schema.Literal("gateway_http"),
        Schema.Literal("gateway_network"),
        Schema.Literal("http_requests"),
        Schema.Literal("ipsec_logs"),
        Schema.Literal("magic_ids_detections"),
        Schema.Literal("nel_reports"),
        Schema.Literal("network_analytics_logs"),
        Schema.Literal("page_shield_events"),
        Schema.Literal("sinkhole_http_logs"),
        Schema.Literal("spectrum_events"),
        Schema.Literal("ssh_logs"),
        Schema.Literal("warp_config_changes"),
        Schema.Literal("warp_toggle_changes"),
        Schema.Literal("workers_trace_events"),
        Schema.Literal("zaraz_events"),
        Schema.Literal("zero_trust_network_sessions"),
        Schema.Null,
    ]).pipe(T.HttpPath("datasetId")),
};
export const GetDatasetFieldForAccountRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    ...GetDatasetFieldBaseFields,
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/logpush/datasets/{datasetId}/fields",
}));
export const GetDatasetFieldForZoneRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    ...GetDatasetFieldBaseFields,
}).pipe(T.Http({
    method: "GET",
    path: "/zones/{zone_id}/logpush/datasets/{datasetId}/fields",
}));
export const GetDatasetFieldResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown.pipe(T.ResponsePath("result"));
export const getDatasetFieldForAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetDatasetFieldForAccountRequest,
    output: GetDatasetFieldResponse,
    errors: [],
}));
export const getDatasetFieldForZone = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetDatasetFieldForZoneRequest,
    output: GetDatasetFieldResponse,
    errors: [],
}));
// =============================================================================
// DatasetJob
// =============================================================================
const GetDatasetJobBaseFields = {
    datasetId: Schema.Union([
        Schema.Literal("access_requests"),
        Schema.Literal("audit_logs"),
        Schema.Literal("audit_logs_v2"),
        Schema.Literal("biso_user_actions"),
        Schema.Literal("casb_findings"),
        Schema.Literal("device_posture_results"),
        Schema.Literal("dex_application_tests"),
        Schema.Literal("dex_device_state_events"),
        Schema.Literal("dlp_forensic_copies"),
        Schema.Literal("dns_firewall_logs"),
        Schema.Literal("dns_logs"),
        Schema.Literal("email_security_alerts"),
        Schema.Literal("firewall_events"),
        Schema.Literal("gateway_dns"),
        Schema.Literal("gateway_http"),
        Schema.Literal("gateway_network"),
        Schema.Literal("http_requests"),
        Schema.Literal("ipsec_logs"),
        Schema.Literal("magic_ids_detections"),
        Schema.Literal("nel_reports"),
        Schema.Literal("network_analytics_logs"),
        Schema.Literal("page_shield_events"),
        Schema.Literal("sinkhole_http_logs"),
        Schema.Literal("spectrum_events"),
        Schema.Literal("ssh_logs"),
        Schema.Literal("warp_config_changes"),
        Schema.Literal("warp_toggle_changes"),
        Schema.Literal("workers_trace_events"),
        Schema.Literal("zaraz_events"),
        Schema.Literal("zero_trust_network_sessions"),
        Schema.Null,
    ]).pipe(T.HttpPath("datasetId")),
};
export const GetDatasetJobForAccountRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    ...GetDatasetJobBaseFields,
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/logpush/datasets/{datasetId}/jobs",
}));
export const GetDatasetJobForZoneRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    ...GetDatasetJobBaseFields,
}).pipe(T.Http({
    method: "GET",
    path: "/zones/{zone_id}/logpush/datasets/{datasetId}/jobs",
}));
export const GetDatasetJobResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Union([
        Schema.Struct({
            id: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            dataset: Schema.optional(Schema.Union([
                Schema.Literal("access_requests"),
                Schema.Literal("audit_logs"),
                Schema.Literal("audit_logs_v2"),
                Schema.Literal("biso_user_actions"),
                Schema.Literal("casb_findings"),
                Schema.Literal("device_posture_results"),
                Schema.Literal("dex_application_tests"),
                Schema.Literal("dex_device_state_events"),
                Schema.Literal("dlp_forensic_copies"),
                Schema.Literal("dns_firewall_logs"),
                Schema.Literal("dns_logs"),
                Schema.Literal("email_security_alerts"),
                Schema.Literal("firewall_events"),
                Schema.Literal("gateway_dns"),
                Schema.Literal("gateway_http"),
                Schema.Literal("gateway_network"),
                Schema.Literal("http_requests"),
                Schema.Literal("ipsec_logs"),
                Schema.Literal("magic_ids_detections"),
                Schema.Literal("nel_reports"),
                Schema.Literal("network_analytics_logs"),
                Schema.Literal("page_shield_events"),
                Schema.Literal("sinkhole_http_logs"),
                Schema.Literal("spectrum_events"),
                Schema.Literal("ssh_logs"),
                Schema.Literal("warp_config_changes"),
                Schema.Literal("warp_toggle_changes"),
                Schema.Literal("workers_trace_events"),
                Schema.Literal("zaraz_events"),
                Schema.Literal("zero_trust_network_sessions"),
                Schema.Null,
            ])),
            destinationConf: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            errorMessage: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            frequency: Schema.optional(Schema.Union([
                Schema.Literal("high"),
                Schema.Literal("low"),
                Schema.Null,
            ])),
            kind: Schema.optional(Schema.Union([Schema.Literals(["", "edge"]), Schema.Null])),
            lastComplete: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            lastError: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            logpullOptions: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            maxUploadBytes: Schema.optional(Schema.Union([Schema.Literal("0"), Schema.Number, Schema.Null])),
            maxUploadIntervalSeconds: Schema.optional(Schema.Union([Schema.Literal("0"), Schema.Number, Schema.Null])),
            maxUploadRecords: Schema.optional(Schema.Union([Schema.Literal("0"), Schema.Number, Schema.Null])),
            name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            outputOptions: Schema.optional(Schema.Union([
                Schema.Struct({
                    batchPrefix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                    batchSuffix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                    "cve-2021-44228": Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
                    fieldDelimiter: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                    fieldNames: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
                    outputType: Schema.optional(Schema.Union([Schema.Literals(["ndjson", "csv"]), Schema.Null])),
                    recordDelimiter: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                    recordPrefix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                    recordSuffix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                    recordTemplate: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                    sampleRate: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
                    timestampFormat: Schema.optional(Schema.Union([
                        Schema.Literals(["unixnano", "unix", "rfc3339"]),
                        Schema.Null,
                    ])),
                }).pipe(Schema.encodeKeys({
                    batchPrefix: "batch_prefix",
                    batchSuffix: "batch_suffix",
                    "cve-2021-44228": "CVE-2021-44228",
                    fieldDelimiter: "field_delimiter",
                    fieldNames: "field_names",
                    outputType: "output_type",
                    recordDelimiter: "record_delimiter",
                    recordPrefix: "record_prefix",
                    recordSuffix: "record_suffix",
                    recordTemplate: "record_template",
                    sampleRate: "sample_rate",
                    timestampFormat: "timestamp_format",
                })),
                Schema.Null,
            ])),
        }).pipe(Schema.encodeKeys({
            id: "id",
            dataset: "dataset",
            destinationConf: "destination_conf",
            enabled: "enabled",
            errorMessage: "error_message",
            frequency: "frequency",
            kind: "kind",
            lastComplete: "last_complete",
            lastError: "last_error",
            logpullOptions: "logpull_options",
            maxUploadBytes: "max_upload_bytes",
            maxUploadIntervalSeconds: "max_upload_interval_seconds",
            maxUploadRecords: "max_upload_records",
            name: "name",
            outputOptions: "output_options",
        })),
        Schema.Null,
    ])),
});
export const getDatasetJobForAccount = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: GetDatasetJobForAccountRequest,
    output: GetDatasetJobResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
export const getDatasetJobForZone = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: GetDatasetJobForZoneRequest,
    output: GetDatasetJobResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
export const GetEdgeRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/logpush/edge/jobs" }));
export const GetEdgeResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Union([
        Schema.Struct({
            destinationConf: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            fields: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            filter: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            sample: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            sessionId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        }).pipe(Schema.encodeKeys({
            destinationConf: "destination_conf",
            fields: "fields",
            filter: "filter",
            sample: "sample",
            sessionId: "session_id",
        })),
        Schema.Null,
    ])),
});
export const getEdge = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: GetEdgeRequest,
    output: GetEdgeResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
export const CreateEdgeRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    fields: Schema.optional(Schema.String),
    filter: Schema.optional(Schema.String),
    sample: Schema.optional(Schema.Number),
}).pipe(T.Http({ method: "POST", path: "/zones/{zone_id}/logpush/edge/jobs" }));
export const CreateEdgeResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    destinationConf: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    fields: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    filter: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    sample: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    sessionId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    destinationConf: "destination_conf",
    fields: "fields",
    filter: "filter",
    sample: "sample",
    sessionId: "session_id",
}))
    .pipe(T.ResponsePath("result"));
export const createEdge = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateEdgeRequest,
    output: CreateEdgeResponse,
    errors: [],
}));
// =============================================================================
// ExistsValidate
// =============================================================================
const DestinationExistsValidateBaseFields = {
    destinationConf: Schema.String,
};
export const DestinationExistsValidateForAccountRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    ...DestinationExistsValidateBaseFields,
}).pipe(Schema.encodeKeys({ destinationConf: "destination_conf" }), T.Http({
    method: "POST",
    path: "/accounts/{account_id}/logpush/validate/destination/exists",
}));
export const DestinationExistsValidateForZoneRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    ...DestinationExistsValidateBaseFields,
}).pipe(Schema.encodeKeys({ destinationConf: "destination_conf" }), T.Http({
    method: "POST",
    path: "/zones/{zone_id}/logpush/validate/destination/exists",
}));
export const DestinationExistsValidateResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    exists: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const destinationExistsValidateForAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DestinationExistsValidateForAccountRequest,
    output: DestinationExistsValidateResponse,
    errors: [],
}));
export const destinationExistsValidateForZone = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DestinationExistsValidateForZoneRequest,
    output: DestinationExistsValidateResponse,
    errors: [],
}));
// =============================================================================
// Job
// =============================================================================
const GetJobBaseFields = {
    jobId: Schema.Number.pipe(T.HttpPath("jobId")),
};
export const GetJobForAccountRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    ...GetJobBaseFields,
}).pipe(T.Http({
    method: "GET",
    path: "/accounts/{account_id}/logpush/jobs/{jobId}",
}));
export const GetJobForZoneRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    ...GetJobBaseFields,
}).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/logpush/jobs/{jobId}" }));
export const GetJobResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    dataset: Schema.optional(Schema.Union([
        Schema.Literal("access_requests"),
        Schema.Literal("audit_logs"),
        Schema.Literal("audit_logs_v2"),
        Schema.Literal("biso_user_actions"),
        Schema.Literal("casb_findings"),
        Schema.Literal("device_posture_results"),
        Schema.Literal("dex_application_tests"),
        Schema.Literal("dex_device_state_events"),
        Schema.Literal("dlp_forensic_copies"),
        Schema.Literal("dns_firewall_logs"),
        Schema.Literal("dns_logs"),
        Schema.Literal("email_security_alerts"),
        Schema.Literal("firewall_events"),
        Schema.Literal("gateway_dns"),
        Schema.Literal("gateway_http"),
        Schema.Literal("gateway_network"),
        Schema.Literal("http_requests"),
        Schema.Literal("ipsec_logs"),
        Schema.Literal("magic_ids_detections"),
        Schema.Literal("nel_reports"),
        Schema.Literal("network_analytics_logs"),
        Schema.Literal("page_shield_events"),
        Schema.Literal("sinkhole_http_logs"),
        Schema.Literal("spectrum_events"),
        Schema.Literal("ssh_logs"),
        Schema.Literal("warp_config_changes"),
        Schema.Literal("warp_toggle_changes"),
        Schema.Literal("workers_trace_events"),
        Schema.Literal("zaraz_events"),
        Schema.Literal("zero_trust_network_sessions"),
        Schema.Null,
    ])),
    destinationConf: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    errorMessage: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    frequency: Schema.optional(Schema.Union([Schema.Literal("high"), Schema.Literal("low"), Schema.Null])),
    kind: Schema.optional(Schema.Union([Schema.Literals(["", "edge"]), Schema.Null])),
    lastComplete: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    lastError: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    logpullOptions: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    maxUploadBytes: Schema.optional(Schema.Union([Schema.Literal("0"), Schema.Number, Schema.Null])),
    maxUploadIntervalSeconds: Schema.optional(Schema.Union([Schema.Literal("0"), Schema.Number, Schema.Null])),
    maxUploadRecords: Schema.optional(Schema.Union([Schema.Literal("0"), Schema.Number, Schema.Null])),
    name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    outputOptions: Schema.optional(Schema.Union([
        Schema.Struct({
            batchPrefix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            batchSuffix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            "cve-2021-44228": Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            fieldDelimiter: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            fieldNames: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
            outputType: Schema.optional(Schema.Union([Schema.Literals(["ndjson", "csv"]), Schema.Null])),
            recordDelimiter: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            recordPrefix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            recordSuffix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            recordTemplate: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            sampleRate: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            timestampFormat: Schema.optional(Schema.Union([
                Schema.Literals(["unixnano", "unix", "rfc3339"]),
                Schema.Null,
            ])),
        }).pipe(Schema.encodeKeys({
            batchPrefix: "batch_prefix",
            batchSuffix: "batch_suffix",
            "cve-2021-44228": "CVE-2021-44228",
            fieldDelimiter: "field_delimiter",
            fieldNames: "field_names",
            outputType: "output_type",
            recordDelimiter: "record_delimiter",
            recordPrefix: "record_prefix",
            recordSuffix: "record_suffix",
            recordTemplate: "record_template",
            sampleRate: "sample_rate",
            timestampFormat: "timestamp_format",
        })),
        Schema.Null,
    ])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    dataset: "dataset",
    destinationConf: "destination_conf",
    enabled: "enabled",
    errorMessage: "error_message",
    frequency: "frequency",
    kind: "kind",
    lastComplete: "last_complete",
    lastError: "last_error",
    logpullOptions: "logpull_options",
    maxUploadBytes: "max_upload_bytes",
    maxUploadIntervalSeconds: "max_upload_interval_seconds",
    maxUploadRecords: "max_upload_records",
    name: "name",
    outputOptions: "output_options",
}))
    .pipe(T.ResponsePath("result"));
export const getJobForAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetJobForAccountRequest,
    output: GetJobResponse,
    errors: [],
}));
export const getJobForZone = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetJobForZoneRequest,
    output: GetJobResponse,
    errors: [],
}));
const ListJobsBaseFields = {};
export const ListJobsForAccountRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    ...ListJobsBaseFields,
}).pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/logpush/jobs" }));
export const ListJobsForZoneRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    ...ListJobsBaseFields,
}).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/logpush/jobs" }));
export const ListJobsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Union([
        Schema.Struct({
            id: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            dataset: Schema.optional(Schema.Union([
                Schema.Literal("access_requests"),
                Schema.Literal("audit_logs"),
                Schema.Literal("audit_logs_v2"),
                Schema.Literal("biso_user_actions"),
                Schema.Literal("casb_findings"),
                Schema.Literal("device_posture_results"),
                Schema.Literal("dex_application_tests"),
                Schema.Literal("dex_device_state_events"),
                Schema.Literal("dlp_forensic_copies"),
                Schema.Literal("dns_firewall_logs"),
                Schema.Literal("dns_logs"),
                Schema.Literal("email_security_alerts"),
                Schema.Literal("firewall_events"),
                Schema.Literal("gateway_dns"),
                Schema.Literal("gateway_http"),
                Schema.Literal("gateway_network"),
                Schema.Literal("http_requests"),
                Schema.Literal("ipsec_logs"),
                Schema.Literal("magic_ids_detections"),
                Schema.Literal("nel_reports"),
                Schema.Literal("network_analytics_logs"),
                Schema.Literal("page_shield_events"),
                Schema.Literal("sinkhole_http_logs"),
                Schema.Literal("spectrum_events"),
                Schema.Literal("ssh_logs"),
                Schema.Literal("warp_config_changes"),
                Schema.Literal("warp_toggle_changes"),
                Schema.Literal("workers_trace_events"),
                Schema.Literal("zaraz_events"),
                Schema.Literal("zero_trust_network_sessions"),
                Schema.Null,
            ])),
            destinationConf: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            errorMessage: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            frequency: Schema.optional(Schema.Union([
                Schema.Literal("high"),
                Schema.Literal("low"),
                Schema.Null,
            ])),
            kind: Schema.optional(Schema.Union([Schema.Literals(["", "edge"]), Schema.Null])),
            lastComplete: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            lastError: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            logpullOptions: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            maxUploadBytes: Schema.optional(Schema.Union([Schema.Literal("0"), Schema.Number, Schema.Null])),
            maxUploadIntervalSeconds: Schema.optional(Schema.Union([Schema.Literal("0"), Schema.Number, Schema.Null])),
            maxUploadRecords: Schema.optional(Schema.Union([Schema.Literal("0"), Schema.Number, Schema.Null])),
            name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            outputOptions: Schema.optional(Schema.Union([
                Schema.Struct({
                    batchPrefix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                    batchSuffix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                    "cve-2021-44228": Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
                    fieldDelimiter: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                    fieldNames: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
                    outputType: Schema.optional(Schema.Union([Schema.Literals(["ndjson", "csv"]), Schema.Null])),
                    recordDelimiter: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                    recordPrefix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                    recordSuffix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                    recordTemplate: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                    sampleRate: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
                    timestampFormat: Schema.optional(Schema.Union([
                        Schema.Literals(["unixnano", "unix", "rfc3339"]),
                        Schema.Null,
                    ])),
                }).pipe(Schema.encodeKeys({
                    batchPrefix: "batch_prefix",
                    batchSuffix: "batch_suffix",
                    "cve-2021-44228": "CVE-2021-44228",
                    fieldDelimiter: "field_delimiter",
                    fieldNames: "field_names",
                    outputType: "output_type",
                    recordDelimiter: "record_delimiter",
                    recordPrefix: "record_prefix",
                    recordSuffix: "record_suffix",
                    recordTemplate: "record_template",
                    sampleRate: "sample_rate",
                    timestampFormat: "timestamp_format",
                })),
                Schema.Null,
            ])),
        }).pipe(Schema.encodeKeys({
            id: "id",
            dataset: "dataset",
            destinationConf: "destination_conf",
            enabled: "enabled",
            errorMessage: "error_message",
            frequency: "frequency",
            kind: "kind",
            lastComplete: "last_complete",
            lastError: "last_error",
            logpullOptions: "logpull_options",
            maxUploadBytes: "max_upload_bytes",
            maxUploadIntervalSeconds: "max_upload_interval_seconds",
            maxUploadRecords: "max_upload_records",
            name: "name",
            outputOptions: "output_options",
        })),
        Schema.Null,
    ])),
});
export const listJobsForAccount = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListJobsForAccountRequest,
    output: ListJobsResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
export const listJobsForZone = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListJobsForZoneRequest,
    output: ListJobsResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
const CreateJobBaseFields = {
    destinationConf: Schema.String,
    dataset: Schema.optional(Schema.Union([
        Schema.Literal("access_requests"),
        Schema.Literal("audit_logs"),
        Schema.Literal("audit_logs_v2"),
        Schema.Literal("biso_user_actions"),
        Schema.Literal("casb_findings"),
        Schema.Literal("device_posture_results"),
        Schema.Literal("dex_application_tests"),
        Schema.Literal("dex_device_state_events"),
        Schema.Literal("dlp_forensic_copies"),
        Schema.Literal("dns_firewall_logs"),
        Schema.Literal("dns_logs"),
        Schema.Literal("email_security_alerts"),
        Schema.Literal("firewall_events"),
        Schema.Literal("gateway_dns"),
        Schema.Literal("gateway_http"),
        Schema.Literal("gateway_network"),
        Schema.Literal("http_requests"),
        Schema.Literal("ipsec_logs"),
        Schema.Literal("magic_ids_detections"),
        Schema.Literal("nel_reports"),
        Schema.Literal("network_analytics_logs"),
        Schema.Literal("page_shield_events"),
        Schema.Literal("sinkhole_http_logs"),
        Schema.Literal("spectrum_events"),
        Schema.Literal("ssh_logs"),
        Schema.Literal("warp_config_changes"),
        Schema.Literal("warp_toggle_changes"),
        Schema.Literal("workers_trace_events"),
        Schema.Literal("zaraz_events"),
        Schema.Literal("zero_trust_network_sessions"),
        Schema.Null,
    ])),
    enabled: Schema.optional(Schema.Boolean),
    filter: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    frequency: Schema.optional(Schema.Union([Schema.Literal("high"), Schema.Literal("low"), Schema.Null])),
    kind: Schema.optional(Schema.Literals(["", "edge"])),
    logpullOptions: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    maxUploadBytes: Schema.optional(Schema.Union([Schema.Literal("0"), Schema.Number, Schema.Null])),
    maxUploadIntervalSeconds: Schema.optional(Schema.Union([Schema.Literal("0"), Schema.Number, Schema.Null])),
    maxUploadRecords: Schema.optional(Schema.Union([Schema.Literal("0"), Schema.Number, Schema.Null])),
    name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    outputOptions: Schema.optional(Schema.Union([
        Schema.Struct({
            batchPrefix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            batchSuffix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            "cve-2021-44228": Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            fieldDelimiter: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            fieldNames: Schema.optional(Schema.Array(Schema.String)),
            outputType: Schema.optional(Schema.Literals(["ndjson", "csv"])),
            recordDelimiter: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            recordPrefix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            recordSuffix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            recordTemplate: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            sampleRate: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            timestampFormat: Schema.optional(Schema.Literals(["unixnano", "unix", "rfc3339"])),
        }).pipe(Schema.encodeKeys({
            batchPrefix: "batch_prefix",
            batchSuffix: "batch_suffix",
            "cve-2021-44228": "CVE-2021-44228",
            fieldDelimiter: "field_delimiter",
            fieldNames: "field_names",
            outputType: "output_type",
            recordDelimiter: "record_delimiter",
            recordPrefix: "record_prefix",
            recordSuffix: "record_suffix",
            recordTemplate: "record_template",
            sampleRate: "sample_rate",
            timestampFormat: "timestamp_format",
        })),
        Schema.Null,
    ])),
    ownershipChallenge: Schema.optional(Schema.String),
};
export const CreateJobForAccountRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    ...CreateJobBaseFields,
}).pipe(Schema.encodeKeys({
    destinationConf: "destination_conf",
    dataset: "dataset",
    enabled: "enabled",
    filter: "filter",
    frequency: "frequency",
    kind: "kind",
    logpullOptions: "logpull_options",
    maxUploadBytes: "max_upload_bytes",
    maxUploadIntervalSeconds: "max_upload_interval_seconds",
    maxUploadRecords: "max_upload_records",
    name: "name",
    outputOptions: "output_options",
    ownershipChallenge: "ownership_challenge",
}), T.Http({ method: "POST", path: "/accounts/{account_id}/logpush/jobs" }));
export const CreateJobForZoneRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    ...CreateJobBaseFields,
}).pipe(Schema.encodeKeys({
    destinationConf: "destination_conf",
    dataset: "dataset",
    enabled: "enabled",
    filter: "filter",
    frequency: "frequency",
    kind: "kind",
    logpullOptions: "logpull_options",
    maxUploadBytes: "max_upload_bytes",
    maxUploadIntervalSeconds: "max_upload_interval_seconds",
    maxUploadRecords: "max_upload_records",
    name: "name",
    outputOptions: "output_options",
    ownershipChallenge: "ownership_challenge",
}), T.Http({ method: "POST", path: "/zones/{zone_id}/logpush/jobs" }));
export const CreateJobResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    dataset: Schema.optional(Schema.Union([
        Schema.Literal("access_requests"),
        Schema.Literal("audit_logs"),
        Schema.Literal("audit_logs_v2"),
        Schema.Literal("biso_user_actions"),
        Schema.Literal("casb_findings"),
        Schema.Literal("device_posture_results"),
        Schema.Literal("dex_application_tests"),
        Schema.Literal("dex_device_state_events"),
        Schema.Literal("dlp_forensic_copies"),
        Schema.Literal("dns_firewall_logs"),
        Schema.Literal("dns_logs"),
        Schema.Literal("email_security_alerts"),
        Schema.Literal("firewall_events"),
        Schema.Literal("gateway_dns"),
        Schema.Literal("gateway_http"),
        Schema.Literal("gateway_network"),
        Schema.Literal("http_requests"),
        Schema.Literal("ipsec_logs"),
        Schema.Literal("magic_ids_detections"),
        Schema.Literal("nel_reports"),
        Schema.Literal("network_analytics_logs"),
        Schema.Literal("page_shield_events"),
        Schema.Literal("sinkhole_http_logs"),
        Schema.Literal("spectrum_events"),
        Schema.Literal("ssh_logs"),
        Schema.Literal("warp_config_changes"),
        Schema.Literal("warp_toggle_changes"),
        Schema.Literal("workers_trace_events"),
        Schema.Literal("zaraz_events"),
        Schema.Literal("zero_trust_network_sessions"),
        Schema.Null,
    ])),
    destinationConf: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    errorMessage: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    frequency: Schema.optional(Schema.Union([Schema.Literal("high"), Schema.Literal("low"), Schema.Null])),
    kind: Schema.optional(Schema.Union([Schema.Literals(["", "edge"]), Schema.Null])),
    lastComplete: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    lastError: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    logpullOptions: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    maxUploadBytes: Schema.optional(Schema.Union([Schema.Literal("0"), Schema.Number, Schema.Null])),
    maxUploadIntervalSeconds: Schema.optional(Schema.Union([Schema.Literal("0"), Schema.Number, Schema.Null])),
    maxUploadRecords: Schema.optional(Schema.Union([Schema.Literal("0"), Schema.Number, Schema.Null])),
    name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    outputOptions: Schema.optional(Schema.Union([
        Schema.Struct({
            batchPrefix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            batchSuffix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            "cve-2021-44228": Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            fieldDelimiter: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            fieldNames: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
            outputType: Schema.optional(Schema.Union([Schema.Literals(["ndjson", "csv"]), Schema.Null])),
            recordDelimiter: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            recordPrefix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            recordSuffix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            recordTemplate: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            sampleRate: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            timestampFormat: Schema.optional(Schema.Union([
                Schema.Literals(["unixnano", "unix", "rfc3339"]),
                Schema.Null,
            ])),
        }).pipe(Schema.encodeKeys({
            batchPrefix: "batch_prefix",
            batchSuffix: "batch_suffix",
            "cve-2021-44228": "CVE-2021-44228",
            fieldDelimiter: "field_delimiter",
            fieldNames: "field_names",
            outputType: "output_type",
            recordDelimiter: "record_delimiter",
            recordPrefix: "record_prefix",
            recordSuffix: "record_suffix",
            recordTemplate: "record_template",
            sampleRate: "sample_rate",
            timestampFormat: "timestamp_format",
        })),
        Schema.Null,
    ])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    dataset: "dataset",
    destinationConf: "destination_conf",
    enabled: "enabled",
    errorMessage: "error_message",
    frequency: "frequency",
    kind: "kind",
    lastComplete: "last_complete",
    lastError: "last_error",
    logpullOptions: "logpull_options",
    maxUploadBytes: "max_upload_bytes",
    maxUploadIntervalSeconds: "max_upload_interval_seconds",
    maxUploadRecords: "max_upload_records",
    name: "name",
    outputOptions: "output_options",
}))
    .pipe(T.ResponsePath("result"));
export const createJobForAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateJobForAccountRequest,
    output: CreateJobResponse,
    errors: [],
}));
export const createJobForZone = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateJobForZoneRequest,
    output: CreateJobResponse,
    errors: [],
}));
const UpdateJobBaseFields = {
    jobId: Schema.Number.pipe(T.HttpPath("jobId")),
    destinationConf: Schema.optional(Schema.String),
    enabled: Schema.optional(Schema.Boolean),
    filter: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    frequency: Schema.optional(Schema.Union([Schema.Literal("high"), Schema.Literal("low"), Schema.Null])),
    kind: Schema.optional(Schema.Literals(["", "edge"])),
    logpullOptions: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    maxUploadBytes: Schema.optional(Schema.Union([Schema.Literal("0"), Schema.Number, Schema.Null])),
    maxUploadIntervalSeconds: Schema.optional(Schema.Union([Schema.Literal("0"), Schema.Number, Schema.Null])),
    maxUploadRecords: Schema.optional(Schema.Union([Schema.Literal("0"), Schema.Number, Schema.Null])),
    name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    outputOptions: Schema.optional(Schema.Union([
        Schema.Struct({
            batchPrefix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            batchSuffix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            "cve-2021-44228": Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            fieldDelimiter: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            fieldNames: Schema.optional(Schema.Array(Schema.String)),
            outputType: Schema.optional(Schema.Literals(["ndjson", "csv"])),
            recordDelimiter: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            recordPrefix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            recordSuffix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            recordTemplate: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            sampleRate: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            timestampFormat: Schema.optional(Schema.Literals(["unixnano", "unix", "rfc3339"])),
        }).pipe(Schema.encodeKeys({
            batchPrefix: "batch_prefix",
            batchSuffix: "batch_suffix",
            "cve-2021-44228": "CVE-2021-44228",
            fieldDelimiter: "field_delimiter",
            fieldNames: "field_names",
            outputType: "output_type",
            recordDelimiter: "record_delimiter",
            recordPrefix: "record_prefix",
            recordSuffix: "record_suffix",
            recordTemplate: "record_template",
            sampleRate: "sample_rate",
            timestampFormat: "timestamp_format",
        })),
        Schema.Null,
    ])),
    ownershipChallenge: Schema.optional(Schema.String),
};
export const UpdateJobForAccountRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    ...UpdateJobBaseFields,
}).pipe(Schema.encodeKeys({
    destinationConf: "destination_conf",
    enabled: "enabled",
    filter: "filter",
    frequency: "frequency",
    kind: "kind",
    logpullOptions: "logpull_options",
    maxUploadBytes: "max_upload_bytes",
    maxUploadIntervalSeconds: "max_upload_interval_seconds",
    maxUploadRecords: "max_upload_records",
    name: "name",
    outputOptions: "output_options",
    ownershipChallenge: "ownership_challenge",
}), T.Http({
    method: "PUT",
    path: "/accounts/{account_id}/logpush/jobs/{jobId}",
}));
export const UpdateJobForZoneRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    ...UpdateJobBaseFields,
}).pipe(Schema.encodeKeys({
    destinationConf: "destination_conf",
    enabled: "enabled",
    filter: "filter",
    frequency: "frequency",
    kind: "kind",
    logpullOptions: "logpull_options",
    maxUploadBytes: "max_upload_bytes",
    maxUploadIntervalSeconds: "max_upload_interval_seconds",
    maxUploadRecords: "max_upload_records",
    name: "name",
    outputOptions: "output_options",
    ownershipChallenge: "ownership_challenge",
}), T.Http({ method: "PUT", path: "/zones/{zone_id}/logpush/jobs/{jobId}" }));
export const UpdateJobResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
    dataset: Schema.optional(Schema.Union([
        Schema.Literal("access_requests"),
        Schema.Literal("audit_logs"),
        Schema.Literal("audit_logs_v2"),
        Schema.Literal("biso_user_actions"),
        Schema.Literal("casb_findings"),
        Schema.Literal("device_posture_results"),
        Schema.Literal("dex_application_tests"),
        Schema.Literal("dex_device_state_events"),
        Schema.Literal("dlp_forensic_copies"),
        Schema.Literal("dns_firewall_logs"),
        Schema.Literal("dns_logs"),
        Schema.Literal("email_security_alerts"),
        Schema.Literal("firewall_events"),
        Schema.Literal("gateway_dns"),
        Schema.Literal("gateway_http"),
        Schema.Literal("gateway_network"),
        Schema.Literal("http_requests"),
        Schema.Literal("ipsec_logs"),
        Schema.Literal("magic_ids_detections"),
        Schema.Literal("nel_reports"),
        Schema.Literal("network_analytics_logs"),
        Schema.Literal("page_shield_events"),
        Schema.Literal("sinkhole_http_logs"),
        Schema.Literal("spectrum_events"),
        Schema.Literal("ssh_logs"),
        Schema.Literal("warp_config_changes"),
        Schema.Literal("warp_toggle_changes"),
        Schema.Literal("workers_trace_events"),
        Schema.Literal("zaraz_events"),
        Schema.Literal("zero_trust_network_sessions"),
        Schema.Null,
    ])),
    destinationConf: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    errorMessage: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    frequency: Schema.optional(Schema.Union([Schema.Literal("high"), Schema.Literal("low"), Schema.Null])),
    kind: Schema.optional(Schema.Union([Schema.Literals(["", "edge"]), Schema.Null])),
    lastComplete: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    lastError: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    logpullOptions: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    maxUploadBytes: Schema.optional(Schema.Union([Schema.Literal("0"), Schema.Number, Schema.Null])),
    maxUploadIntervalSeconds: Schema.optional(Schema.Union([Schema.Literal("0"), Schema.Number, Schema.Null])),
    maxUploadRecords: Schema.optional(Schema.Union([Schema.Literal("0"), Schema.Number, Schema.Null])),
    name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    outputOptions: Schema.optional(Schema.Union([
        Schema.Struct({
            batchPrefix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            batchSuffix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            "cve-2021-44228": Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
            fieldDelimiter: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            fieldNames: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
            outputType: Schema.optional(Schema.Union([Schema.Literals(["ndjson", "csv"]), Schema.Null])),
            recordDelimiter: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            recordPrefix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            recordSuffix: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            recordTemplate: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            sampleRate: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            timestampFormat: Schema.optional(Schema.Union([
                Schema.Literals(["unixnano", "unix", "rfc3339"]),
                Schema.Null,
            ])),
        }).pipe(Schema.encodeKeys({
            batchPrefix: "batch_prefix",
            batchSuffix: "batch_suffix",
            "cve-2021-44228": "CVE-2021-44228",
            fieldDelimiter: "field_delimiter",
            fieldNames: "field_names",
            outputType: "output_type",
            recordDelimiter: "record_delimiter",
            recordPrefix: "record_prefix",
            recordSuffix: "record_suffix",
            recordTemplate: "record_template",
            sampleRate: "sample_rate",
            timestampFormat: "timestamp_format",
        })),
        Schema.Null,
    ])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    dataset: "dataset",
    destinationConf: "destination_conf",
    enabled: "enabled",
    errorMessage: "error_message",
    frequency: "frequency",
    kind: "kind",
    lastComplete: "last_complete",
    lastError: "last_error",
    logpullOptions: "logpull_options",
    maxUploadBytes: "max_upload_bytes",
    maxUploadIntervalSeconds: "max_upload_interval_seconds",
    maxUploadRecords: "max_upload_records",
    name: "name",
    outputOptions: "output_options",
}))
    .pipe(T.ResponsePath("result"));
export const updateJobForAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateJobForAccountRequest,
    output: UpdateJobResponse,
    errors: [],
}));
export const updateJobForZone = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: UpdateJobForZoneRequest,
    output: UpdateJobResponse,
    errors: [],
}));
const DeleteJobBaseFields = {
    jobId: Schema.Number.pipe(T.HttpPath("jobId")),
};
export const DeleteJobForAccountRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    ...DeleteJobBaseFields,
}).pipe(T.Http({
    method: "DELETE",
    path: "/accounts/{account_id}/logpush/jobs/{jobId}",
}));
export const DeleteJobForZoneRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    ...DeleteJobBaseFields,
}).pipe(T.Http({ method: "DELETE", path: "/zones/{zone_id}/logpush/jobs/{jobId}" }));
export const DeleteJobResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const deleteJobForAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteJobForAccountRequest,
    output: DeleteJobResponse,
    errors: [],
}));
export const deleteJobForZone = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteJobForZoneRequest,
    output: DeleteJobResponse,
    errors: [],
}));
// =============================================================================
// Ownership
// =============================================================================
const CreateOwnershipBaseFields = {
    destinationConf: Schema.String,
};
export const CreateOwnershipForAccountRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    ...CreateOwnershipBaseFields,
}).pipe(Schema.encodeKeys({ destinationConf: "destination_conf" }), T.Http({
    method: "POST",
    path: "/accounts/{account_id}/logpush/ownership",
}));
export const CreateOwnershipForZoneRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    ...CreateOwnershipBaseFields,
}).pipe(Schema.encodeKeys({ destinationConf: "destination_conf" }), T.Http({ method: "POST", path: "/zones/{zone_id}/logpush/ownership" }));
export const CreateOwnershipResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    filename: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    message: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    valid: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const createOwnershipForAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateOwnershipForAccountRequest,
    output: CreateOwnershipResponse,
    errors: [],
}));
export const createOwnershipForZone = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateOwnershipForZoneRequest,
    output: CreateOwnershipResponse,
    errors: [],
}));
const ValidateOwnershipBaseFields = {
    destinationConf: Schema.String,
    ownershipChallenge: Schema.String,
};
export const ValidateOwnershipForAccountRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    ...ValidateOwnershipBaseFields,
}).pipe(Schema.encodeKeys({
    destinationConf: "destination_conf",
    ownershipChallenge: "ownership_challenge",
}), T.Http({
    method: "POST",
    path: "/accounts/{account_id}/logpush/ownership/validate",
}));
export const ValidateOwnershipForZoneRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    ...ValidateOwnershipBaseFields,
}).pipe(Schema.encodeKeys({
    destinationConf: "destination_conf",
    ownershipChallenge: "ownership_challenge",
}), T.Http({
    method: "POST",
    path: "/zones/{zone_id}/logpush/ownership/validate",
}));
export const ValidateOwnershipResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    valid: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const validateOwnershipForAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: ValidateOwnershipForAccountRequest,
    output: ValidateOwnershipResponse,
    errors: [],
}));
export const validateOwnershipForZone = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: ValidateOwnershipForZoneRequest,
    output: ValidateOwnershipResponse,
    errors: [],
}));
// =============================================================================
// Validate
// =============================================================================
const DestinationValidateBaseFields = {
    destinationConf: Schema.String,
};
export const DestinationValidateForAccountRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    ...DestinationValidateBaseFields,
}).pipe(Schema.encodeKeys({ destinationConf: "destination_conf" }), T.Http({
    method: "POST",
    path: "/accounts/{account_id}/logpush/validate/destination",
}));
export const DestinationValidateForZoneRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    ...DestinationValidateBaseFields,
}).pipe(Schema.encodeKeys({ destinationConf: "destination_conf" }), T.Http({
    method: "POST",
    path: "/zones/{zone_id}/logpush/validate/destination",
}));
export const DestinationValidateResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    message: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    valid: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const destinationValidateForAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DestinationValidateForAccountRequest,
    output: DestinationValidateResponse,
    errors: [],
}));
export const destinationValidateForZone = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DestinationValidateForZoneRequest,
    output: DestinationValidateResponse,
    errors: [],
}));
const OriginValidateBaseFields = {
    logpullOptions: Schema.Union([Schema.String, Schema.Null]),
};
export const OriginValidateForAccountRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    accountId: Schema.String.pipe(T.HttpPath("account_id")),
    ...OriginValidateBaseFields,
}).pipe(Schema.encodeKeys({ logpullOptions: "logpull_options" }), T.Http({
    method: "POST",
    path: "/accounts/{account_id}/logpush/validate/origin",
}));
export const OriginValidateForZoneRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    ...OriginValidateBaseFields,
}).pipe(Schema.encodeKeys({ logpullOptions: "logpull_options" }), T.Http({
    method: "POST",
    path: "/zones/{zone_id}/logpush/validate/origin",
}));
export const OriginValidateResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    message: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    valid: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const originValidateForAccount = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: OriginValidateForAccountRequest,
    output: OriginValidateResponse,
    errors: [],
}));
export const originValidateForZone = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: OriginValidateForZoneRequest,
    output: OriginValidateResponse,
    errors: [],
}));
//# sourceMappingURL=logpush.js.map