/**
 * Cloudflare CUSTOM-HOSTNAMES API
 *
 * Generated from Cloudflare TypeScript SDK.
 * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service custom-hostnames
 */
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 PutCertificatePackCertificateRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    customHostnameId: Schema.String.pipe(T.HttpPath("customHostnameId")),
    certificatePackId: Schema.String.pipe(T.HttpPath("certificatePackId")),
    certificateId: Schema.String.pipe(T.HttpPath("certificateId")),
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    customCertificate: Schema.String,
    customKey: Schema.String,
}).pipe(Schema.encodeKeys({
    customCertificate: "custom_certificate",
    customKey: "custom_key",
}), T.Http({
    method: "PUT",
    path: "/zones/{zone_id}/custom_hostnames/{customHostnameId}/certificate_pack/{certificatePackId}/certificates/{certificateId}",
}));
export const PutCertificatePackCertificateResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
    hostname: Schema.String,
    ssl: Schema.Struct({
        id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        bundleMethod: Schema.optional(Schema.Union([
            Schema.Literals(["ubiquitous", "optimal", "force"]),
            Schema.Null,
        ])),
        certificateAuthority: Schema.optional(Schema.Union([
            Schema.Literals(["digicert", "google", "lets_encrypt", "ssl_com"]),
            Schema.Null,
        ])),
        customCertificate: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        customCsrId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        customKey: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        expiresOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        hosts: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
        issuer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        method: Schema.optional(Schema.Union([Schema.Literals(["http", "txt", "email"]), Schema.Null])),
        serialNumber: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        settings: Schema.optional(Schema.Union([
            Schema.Struct({
                ciphers: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
                earlyHints: Schema.optional(Schema.Union([Schema.Literals(["on", "off"]), Schema.Null])),
                http2: Schema.optional(Schema.Union([Schema.Literals(["on", "off"]), Schema.Null])),
                minTlsVersion: Schema.optional(Schema.Union([
                    Schema.Literals(["1.0", "1.1", "1.2", "1.3"]),
                    Schema.Null,
                ])),
                tls_1_3: Schema.optional(Schema.Union([Schema.Literals(["on", "off"]), Schema.Null])),
            }).pipe(Schema.encodeKeys({
                ciphers: "ciphers",
                earlyHints: "early_hints",
                http2: "http2",
                minTlsVersion: "min_tls_version",
                tls_1_3: "tls_1_3",
            })),
            Schema.Null,
        ])),
        signature: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        status: Schema.optional(Schema.Union([
            Schema.Literals([
                "initializing",
                "pending_validation",
                "deleted",
                "pending_issuance",
                "pending_deployment",
                "pending_deletion",
                "pending_expiration",
                "expired",
                "active",
                "initializing_timed_out",
                "validation_timed_out",
                "issuance_timed_out",
                "deployment_timed_out",
                "deletion_timed_out",
                "pending_cleanup",
                "staging_deployment",
                "staging_active",
                "deactivating",
                "inactive",
                "backup_issued",
                "holding_deployment",
            ]),
            Schema.Null,
        ])),
        type: Schema.optional(Schema.Union([Schema.Literal("dv"), Schema.Null])),
        uploadedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        validationErrors: Schema.optional(Schema.Union([
            Schema.Array(Schema.Struct({
                message: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            })),
            Schema.Null,
        ])),
        validationRecords: Schema.optional(Schema.Union([
            Schema.Array(Schema.Struct({
                emails: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
                httpBody: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                httpUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                txtName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                txtValue: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }).pipe(Schema.encodeKeys({
                emails: "emails",
                httpBody: "http_body",
                httpUrl: "http_url",
                txtName: "txt_name",
                txtValue: "txt_value",
            }))),
            Schema.Null,
        ])),
        wildcard: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    }).pipe(Schema.encodeKeys({
        id: "id",
        bundleMethod: "bundle_method",
        certificateAuthority: "certificate_authority",
        customCertificate: "custom_certificate",
        customCsrId: "custom_csr_id",
        customKey: "custom_key",
        expiresOn: "expires_on",
        hosts: "hosts",
        issuer: "issuer",
        method: "method",
        serialNumber: "serial_number",
        settings: "settings",
        signature: "signature",
        status: "status",
        type: "type",
        uploadedOn: "uploaded_on",
        validationErrors: "validation_errors",
        validationRecords: "validation_records",
        wildcard: "wildcard",
    })),
    createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    customMetadata: Schema.optional(Schema.Union([Schema.Record(Schema.String, Schema.Unknown), Schema.Null])),
    customOriginServer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    customOriginSni: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    ownershipVerification: Schema.optional(Schema.Union([
        Schema.Struct({
            name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            type: Schema.optional(Schema.Union([Schema.Literal("txt"), Schema.Null])),
            value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        }),
        Schema.Null,
    ])),
    ownershipVerificationHttp: Schema.optional(Schema.Union([
        Schema.Struct({
            httpBody: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            httpUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        }).pipe(Schema.encodeKeys({ httpBody: "http_body", httpUrl: "http_url" })),
        Schema.Null,
    ])),
    status: Schema.optional(Schema.Union([
        Schema.Literals([
            "active",
            "pending",
            "active_redeploying",
            "moved",
            "pending_deletion",
            "deleted",
            "pending_blocked",
            "pending_migration",
            "pending_provisioned",
            "test_pending",
            "test_active",
            "test_active_apex",
            "test_blocked",
            "test_failed",
            "provisioned",
            "blocked",
        ]),
        Schema.Null,
    ])),
    verificationErrors: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    hostname: "hostname",
    ssl: "ssl",
    createdAt: "created_at",
    customMetadata: "custom_metadata",
    customOriginServer: "custom_origin_server",
    customOriginSni: "custom_origin_sni",
    ownershipVerification: "ownership_verification",
    ownershipVerificationHttp: "ownership_verification_http",
    status: "status",
    verificationErrors: "verification_errors",
}))
    .pipe(T.ResponsePath("result"));
export const putCertificatePackCertificate = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PutCertificatePackCertificateRequest,
    output: PutCertificatePackCertificateResponse,
    errors: [],
}));
export const DeleteCertificatePackCertificateRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    customHostnameId: Schema.String.pipe(T.HttpPath("customHostnameId")),
    certificatePackId: Schema.String.pipe(T.HttpPath("certificatePackId")),
    certificateId: Schema.String.pipe(T.HttpPath("certificateId")),
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/zones/{zone_id}/custom_hostnames/{customHostnameId}/certificate_pack/{certificatePackId}/certificates/{certificateId}",
}));
export const DeleteCertificatePackCertificateResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
});
export const deleteCertificatePackCertificate = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteCertificatePackCertificateRequest,
    output: DeleteCertificatePackCertificateResponse,
    errors: [],
}));
export const GetCustomHostnameRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    customHostnameId: Schema.String.pipe(T.HttpPath("customHostnameId")),
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/zones/{zone_id}/custom_hostnames/{customHostnameId}",
}));
export const GetCustomHostnameResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
    hostname: Schema.String,
    ssl: Schema.Struct({
        id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        bundleMethod: Schema.optional(Schema.Union([
            Schema.Literals(["ubiquitous", "optimal", "force"]),
            Schema.Null,
        ])),
        certificateAuthority: Schema.optional(Schema.Union([
            Schema.Literals(["digicert", "google", "lets_encrypt", "ssl_com"]),
            Schema.Null,
        ])),
        customCertificate: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        customCsrId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        customKey: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        expiresOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        hosts: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
        issuer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        method: Schema.optional(Schema.Union([Schema.Literals(["http", "txt", "email"]), Schema.Null])),
        serialNumber: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        settings: Schema.optional(Schema.Union([
            Schema.Struct({
                ciphers: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
                earlyHints: Schema.optional(Schema.Union([Schema.Literals(["on", "off"]), Schema.Null])),
                http2: Schema.optional(Schema.Union([Schema.Literals(["on", "off"]), Schema.Null])),
                minTlsVersion: Schema.optional(Schema.Union([
                    Schema.Literals(["1.0", "1.1", "1.2", "1.3"]),
                    Schema.Null,
                ])),
                tls_1_3: Schema.optional(Schema.Union([Schema.Literals(["on", "off"]), Schema.Null])),
            }).pipe(Schema.encodeKeys({
                ciphers: "ciphers",
                earlyHints: "early_hints",
                http2: "http2",
                minTlsVersion: "min_tls_version",
                tls_1_3: "tls_1_3",
            })),
            Schema.Null,
        ])),
        signature: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        status: Schema.optional(Schema.Union([
            Schema.Literals([
                "initializing",
                "pending_validation",
                "deleted",
                "pending_issuance",
                "pending_deployment",
                "pending_deletion",
                "pending_expiration",
                "expired",
                "active",
                "initializing_timed_out",
                "validation_timed_out",
                "issuance_timed_out",
                "deployment_timed_out",
                "deletion_timed_out",
                "pending_cleanup",
                "staging_deployment",
                "staging_active",
                "deactivating",
                "inactive",
                "backup_issued",
                "holding_deployment",
            ]),
            Schema.Null,
        ])),
        type: Schema.optional(Schema.Union([Schema.Literal("dv"), Schema.Null])),
        uploadedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        validationErrors: Schema.optional(Schema.Union([
            Schema.Array(Schema.Struct({
                message: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            })),
            Schema.Null,
        ])),
        validationRecords: Schema.optional(Schema.Union([
            Schema.Array(Schema.Struct({
                emails: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
                httpBody: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                httpUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                txtName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                txtValue: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }).pipe(Schema.encodeKeys({
                emails: "emails",
                httpBody: "http_body",
                httpUrl: "http_url",
                txtName: "txt_name",
                txtValue: "txt_value",
            }))),
            Schema.Null,
        ])),
        wildcard: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    }).pipe(Schema.encodeKeys({
        id: "id",
        bundleMethod: "bundle_method",
        certificateAuthority: "certificate_authority",
        customCertificate: "custom_certificate",
        customCsrId: "custom_csr_id",
        customKey: "custom_key",
        expiresOn: "expires_on",
        hosts: "hosts",
        issuer: "issuer",
        method: "method",
        serialNumber: "serial_number",
        settings: "settings",
        signature: "signature",
        status: "status",
        type: "type",
        uploadedOn: "uploaded_on",
        validationErrors: "validation_errors",
        validationRecords: "validation_records",
        wildcard: "wildcard",
    })),
    createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    customMetadata: Schema.optional(Schema.Union([Schema.Record(Schema.String, Schema.Unknown), Schema.Null])),
    customOriginServer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    customOriginSni: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    ownershipVerification: Schema.optional(Schema.Union([
        Schema.Struct({
            name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            type: Schema.optional(Schema.Union([Schema.Literal("txt"), Schema.Null])),
            value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        }),
        Schema.Null,
    ])),
    ownershipVerificationHttp: Schema.optional(Schema.Union([
        Schema.Struct({
            httpBody: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            httpUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        }).pipe(Schema.encodeKeys({ httpBody: "http_body", httpUrl: "http_url" })),
        Schema.Null,
    ])),
    status: Schema.optional(Schema.Union([
        Schema.Literals([
            "active",
            "pending",
            "active_redeploying",
            "moved",
            "pending_deletion",
            "deleted",
            "pending_blocked",
            "pending_migration",
            "pending_provisioned",
            "test_pending",
            "test_active",
            "test_active_apex",
            "test_blocked",
            "test_failed",
            "provisioned",
            "blocked",
        ]),
        Schema.Null,
    ])),
    verificationErrors: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    hostname: "hostname",
    ssl: "ssl",
    createdAt: "created_at",
    customMetadata: "custom_metadata",
    customOriginServer: "custom_origin_server",
    customOriginSni: "custom_origin_sni",
    ownershipVerification: "ownership_verification",
    ownershipVerificationHttp: "ownership_verification_http",
    status: "status",
    verificationErrors: "verification_errors",
}))
    .pipe(T.ResponsePath("result"));
export const getCustomHostname = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetCustomHostnameRequest,
    output: GetCustomHostnameResponse,
    errors: [],
}));
export const ListCustomHostnamesRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    page: Schema.optional(Schema.Number).pipe(T.HttpQuery("page")),
    perPage: Schema.optional(Schema.Number).pipe(T.HttpQuery("per_page")),
    id: Schema.optional(Schema.String).pipe(T.HttpQuery("id")),
    direction: Schema.optional(Schema.Literals(["asc", "desc"])).pipe(T.HttpQuery("direction")),
    hostname: Schema.optional(Schema.String).pipe(T.HttpQuery("hostname")),
    order: Schema.optional(Schema.Literals(["ssl", "ssl_status"])).pipe(T.HttpQuery("order")),
    ssl: Schema.optional(Schema.Literals(["0", "1"])).pipe(T.HttpQuery("ssl")),
}).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/custom_hostnames" }));
export const ListCustomHostnamesResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        id: Schema.String,
        hostname: Schema.String,
        ssl: Schema.Struct({
            id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            bundleMethod: Schema.optional(Schema.Union([
                Schema.Literals(["ubiquitous", "optimal", "force"]),
                Schema.Null,
            ])),
            certificateAuthority: Schema.optional(Schema.Union([
                Schema.Literals([
                    "digicert",
                    "google",
                    "lets_encrypt",
                    "ssl_com",
                ]),
                Schema.Null,
            ])),
            customCertificate: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            customCsrId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            customKey: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            expiresOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            hosts: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
            issuer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            method: Schema.optional(Schema.Union([
                Schema.Literals(["http", "txt", "email"]),
                Schema.Null,
            ])),
            serialNumber: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            settings: Schema.optional(Schema.Union([
                Schema.Struct({
                    ciphers: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
                    earlyHints: Schema.optional(Schema.Union([Schema.Literals(["on", "off"]), Schema.Null])),
                    http2: Schema.optional(Schema.Union([Schema.Literals(["on", "off"]), Schema.Null])),
                    minTlsVersion: Schema.optional(Schema.Union([
                        Schema.Literals(["1.0", "1.1", "1.2", "1.3"]),
                        Schema.Null,
                    ])),
                    tls_1_3: Schema.optional(Schema.Union([Schema.Literals(["on", "off"]), Schema.Null])),
                }).pipe(Schema.encodeKeys({
                    ciphers: "ciphers",
                    earlyHints: "early_hints",
                    http2: "http2",
                    minTlsVersion: "min_tls_version",
                    tls_1_3: "tls_1_3",
                })),
                Schema.Null,
            ])),
            signature: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            status: Schema.optional(Schema.Union([
                Schema.Literals([
                    "initializing",
                    "pending_validation",
                    "deleted",
                    "pending_issuance",
                    "pending_deployment",
                    "pending_deletion",
                    "pending_expiration",
                    "expired",
                    "active",
                    "initializing_timed_out",
                    "validation_timed_out",
                    "issuance_timed_out",
                    "deployment_timed_out",
                    "deletion_timed_out",
                    "pending_cleanup",
                    "staging_deployment",
                    "staging_active",
                    "deactivating",
                    "inactive",
                    "backup_issued",
                    "holding_deployment",
                ]),
                Schema.Null,
            ])),
            type: Schema.optional(Schema.Union([Schema.Literal("dv"), Schema.Null])),
            uploadedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            validationErrors: Schema.optional(Schema.Union([
                Schema.Array(Schema.Struct({
                    message: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                })),
                Schema.Null,
            ])),
            validationRecords: Schema.optional(Schema.Union([
                Schema.Array(Schema.Struct({
                    emails: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
                    httpBody: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                    httpUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                    txtName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                    txtValue: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                }).pipe(Schema.encodeKeys({
                    emails: "emails",
                    httpBody: "http_body",
                    httpUrl: "http_url",
                    txtName: "txt_name",
                    txtValue: "txt_value",
                }))),
                Schema.Null,
            ])),
            wildcard: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        }).pipe(Schema.encodeKeys({
            id: "id",
            bundleMethod: "bundle_method",
            certificateAuthority: "certificate_authority",
            customCertificate: "custom_certificate",
            customCsrId: "custom_csr_id",
            customKey: "custom_key",
            expiresOn: "expires_on",
            hosts: "hosts",
            issuer: "issuer",
            method: "method",
            serialNumber: "serial_number",
            settings: "settings",
            signature: "signature",
            status: "status",
            type: "type",
            uploadedOn: "uploaded_on",
            validationErrors: "validation_errors",
            validationRecords: "validation_records",
            wildcard: "wildcard",
        })),
        createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        customMetadata: Schema.optional(Schema.Union([
            Schema.Record(Schema.String, Schema.Unknown),
            Schema.Null,
        ])),
        customOriginServer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        customOriginSni: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        ownershipVerification: Schema.optional(Schema.Union([
            Schema.Struct({
                name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                type: Schema.optional(Schema.Union([Schema.Literal("txt"), Schema.Null])),
                value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }),
            Schema.Null,
        ])),
        ownershipVerificationHttp: Schema.optional(Schema.Union([
            Schema.Struct({
                httpBody: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                httpUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }).pipe(Schema.encodeKeys({ httpBody: "http_body", httpUrl: "http_url" })),
            Schema.Null,
        ])),
        status: Schema.optional(Schema.Union([
            Schema.Literals([
                "active",
                "pending",
                "active_redeploying",
                "moved",
                "pending_deletion",
                "deleted",
                "pending_blocked",
                "pending_migration",
                "pending_provisioned",
                "test_pending",
                "test_active",
                "test_active_apex",
                "test_blocked",
                "test_failed",
                "provisioned",
                "blocked",
            ]),
            Schema.Null,
        ])),
        verificationErrors: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
    }).pipe(Schema.encodeKeys({
        id: "id",
        hostname: "hostname",
        ssl: "ssl",
        createdAt: "created_at",
        customMetadata: "custom_metadata",
        customOriginServer: "custom_origin_server",
        customOriginSni: "custom_origin_sni",
        ownershipVerification: "ownership_verification",
        ownershipVerificationHttp: "ownership_verification_http",
        status: "status",
        verificationErrors: "verification_errors",
    }))),
    resultInfo: Schema.optional(Schema.Union([
        Schema.Struct({
            count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        }).pipe(Schema.encodeKeys({
            count: "count",
            page: "page",
            perPage: "per_page",
            totalCount: "total_count",
        })),
        Schema.Null,
    ])),
}).pipe(Schema.encodeKeys({ result: "result", resultInfo: "result_info" }));
export const listCustomHostnames = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListCustomHostnamesRequest,
    output: ListCustomHostnamesResponse,
    errors: [],
    pagination: {
        mode: "page",
        inputToken: "page",
        outputToken: "resultInfo.page",
        items: "result",
        pageSize: "perPage",
    },
}));
export const CreateCustomHostnameRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    hostname: Schema.String,
    customMetadata: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
    ssl: Schema.optional(Schema.Struct({
        bundleMethod: Schema.optional(Schema.Literals(["ubiquitous", "optimal", "force"])),
        certificateAuthority: Schema.optional(Schema.Literals(["digicert", "google", "lets_encrypt", "ssl_com"])),
        cloudflareBranding: Schema.optional(Schema.Boolean),
        customCertBundle: Schema.optional(Schema.Array(Schema.Struct({
            customCertificate: Schema.String,
            customKey: Schema.String,
        }).pipe(Schema.encodeKeys({
            customCertificate: "custom_certificate",
            customKey: "custom_key",
        })))),
        customCertificate: Schema.optional(Schema.String),
        customKey: Schema.optional(Schema.String),
        method: Schema.optional(Schema.Literals(["http", "txt", "email"])),
        settings: Schema.optional(Schema.Struct({
            ciphers: Schema.optional(Schema.Array(Schema.String)),
            earlyHints: Schema.optional(Schema.Literals(["on", "off"])),
            http2: Schema.optional(Schema.Literals(["on", "off"])),
            minTlsVersion: Schema.optional(Schema.Literals(["1.0", "1.1", "1.2", "1.3"])),
            tls_1_3: Schema.optional(Schema.Literals(["on", "off"])),
        }).pipe(Schema.encodeKeys({
            ciphers: "ciphers",
            earlyHints: "early_hints",
            http2: "http2",
            minTlsVersion: "min_tls_version",
            tls_1_3: "tls_1_3",
        }))),
        type: Schema.optional(Schema.Literal("dv")),
        wildcard: Schema.optional(Schema.Boolean),
    }).pipe(Schema.encodeKeys({
        bundleMethod: "bundle_method",
        certificateAuthority: "certificate_authority",
        cloudflareBranding: "cloudflare_branding",
        customCertBundle: "custom_cert_bundle",
        customCertificate: "custom_certificate",
        customKey: "custom_key",
        method: "method",
        settings: "settings",
        type: "type",
        wildcard: "wildcard",
    }))),
}).pipe(Schema.encodeKeys({
    hostname: "hostname",
    customMetadata: "custom_metadata",
    ssl: "ssl",
}), T.Http({ method: "POST", path: "/zones/{zone_id}/custom_hostnames" }));
export const CreateCustomHostnameResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
    hostname: Schema.String,
    ssl: Schema.Struct({
        id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        bundleMethod: Schema.optional(Schema.Union([
            Schema.Literals(["ubiquitous", "optimal", "force"]),
            Schema.Null,
        ])),
        certificateAuthority: Schema.optional(Schema.Union([
            Schema.Literals(["digicert", "google", "lets_encrypt", "ssl_com"]),
            Schema.Null,
        ])),
        customCertificate: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        customCsrId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        customKey: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        expiresOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        hosts: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
        issuer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        method: Schema.optional(Schema.Union([Schema.Literals(["http", "txt", "email"]), Schema.Null])),
        serialNumber: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        settings: Schema.optional(Schema.Union([
            Schema.Struct({
                ciphers: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
                earlyHints: Schema.optional(Schema.Union([Schema.Literals(["on", "off"]), Schema.Null])),
                http2: Schema.optional(Schema.Union([Schema.Literals(["on", "off"]), Schema.Null])),
                minTlsVersion: Schema.optional(Schema.Union([
                    Schema.Literals(["1.0", "1.1", "1.2", "1.3"]),
                    Schema.Null,
                ])),
                tls_1_3: Schema.optional(Schema.Union([Schema.Literals(["on", "off"]), Schema.Null])),
            }).pipe(Schema.encodeKeys({
                ciphers: "ciphers",
                earlyHints: "early_hints",
                http2: "http2",
                minTlsVersion: "min_tls_version",
                tls_1_3: "tls_1_3",
            })),
            Schema.Null,
        ])),
        signature: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        status: Schema.optional(Schema.Union([
            Schema.Literals([
                "initializing",
                "pending_validation",
                "deleted",
                "pending_issuance",
                "pending_deployment",
                "pending_deletion",
                "pending_expiration",
                "expired",
                "active",
                "initializing_timed_out",
                "validation_timed_out",
                "issuance_timed_out",
                "deployment_timed_out",
                "deletion_timed_out",
                "pending_cleanup",
                "staging_deployment",
                "staging_active",
                "deactivating",
                "inactive",
                "backup_issued",
                "holding_deployment",
            ]),
            Schema.Null,
        ])),
        type: Schema.optional(Schema.Union([Schema.Literal("dv"), Schema.Null])),
        uploadedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        validationErrors: Schema.optional(Schema.Union([
            Schema.Array(Schema.Struct({
                message: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            })),
            Schema.Null,
        ])),
        validationRecords: Schema.optional(Schema.Union([
            Schema.Array(Schema.Struct({
                emails: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
                httpBody: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                httpUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                txtName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                txtValue: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }).pipe(Schema.encodeKeys({
                emails: "emails",
                httpBody: "http_body",
                httpUrl: "http_url",
                txtName: "txt_name",
                txtValue: "txt_value",
            }))),
            Schema.Null,
        ])),
        wildcard: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    }).pipe(Schema.encodeKeys({
        id: "id",
        bundleMethod: "bundle_method",
        certificateAuthority: "certificate_authority",
        customCertificate: "custom_certificate",
        customCsrId: "custom_csr_id",
        customKey: "custom_key",
        expiresOn: "expires_on",
        hosts: "hosts",
        issuer: "issuer",
        method: "method",
        serialNumber: "serial_number",
        settings: "settings",
        signature: "signature",
        status: "status",
        type: "type",
        uploadedOn: "uploaded_on",
        validationErrors: "validation_errors",
        validationRecords: "validation_records",
        wildcard: "wildcard",
    })),
    createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    customMetadata: Schema.optional(Schema.Union([Schema.Record(Schema.String, Schema.Unknown), Schema.Null])),
    customOriginServer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    customOriginSni: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    ownershipVerification: Schema.optional(Schema.Union([
        Schema.Struct({
            name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            type: Schema.optional(Schema.Union([Schema.Literal("txt"), Schema.Null])),
            value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        }),
        Schema.Null,
    ])),
    ownershipVerificationHttp: Schema.optional(Schema.Union([
        Schema.Struct({
            httpBody: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            httpUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        }).pipe(Schema.encodeKeys({ httpBody: "http_body", httpUrl: "http_url" })),
        Schema.Null,
    ])),
    status: Schema.optional(Schema.Union([
        Schema.Literals([
            "active",
            "pending",
            "active_redeploying",
            "moved",
            "pending_deletion",
            "deleted",
            "pending_blocked",
            "pending_migration",
            "pending_provisioned",
            "test_pending",
            "test_active",
            "test_active_apex",
            "test_blocked",
            "test_failed",
            "provisioned",
            "blocked",
        ]),
        Schema.Null,
    ])),
    verificationErrors: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    hostname: "hostname",
    ssl: "ssl",
    createdAt: "created_at",
    customMetadata: "custom_metadata",
    customOriginServer: "custom_origin_server",
    customOriginSni: "custom_origin_sni",
    ownershipVerification: "ownership_verification",
    ownershipVerificationHttp: "ownership_verification_http",
    status: "status",
    verificationErrors: "verification_errors",
}))
    .pipe(T.ResponsePath("result"));
export const createCustomHostname = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateCustomHostnameRequest,
    output: CreateCustomHostnameResponse,
    errors: [],
}));
export const PatchCustomHostnameRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    customHostnameId: Schema.String.pipe(T.HttpPath("customHostnameId")),
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    customMetadata: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
    customOriginServer: Schema.optional(Schema.String),
    customOriginSni: Schema.optional(Schema.String),
    ssl: Schema.optional(Schema.Struct({
        bundleMethod: Schema.optional(Schema.Literals(["ubiquitous", "optimal", "force"])),
        certificateAuthority: Schema.optional(Schema.Literals(["digicert", "google", "lets_encrypt", "ssl_com"])),
        cloudflareBranding: Schema.optional(Schema.Boolean),
        customCertBundle: Schema.optional(Schema.Array(Schema.Struct({
            customCertificate: Schema.String,
            customKey: Schema.String,
        }).pipe(Schema.encodeKeys({
            customCertificate: "custom_certificate",
            customKey: "custom_key",
        })))),
        customCertificate: Schema.optional(Schema.String),
        customKey: Schema.optional(Schema.String),
        method: Schema.optional(Schema.Literals(["http", "txt", "email"])),
        settings: Schema.optional(Schema.Struct({
            ciphers: Schema.optional(Schema.Array(Schema.String)),
            earlyHints: Schema.optional(Schema.Literals(["on", "off"])),
            http2: Schema.optional(Schema.Literals(["on", "off"])),
            minTlsVersion: Schema.optional(Schema.Literals(["1.0", "1.1", "1.2", "1.3"])),
            tls_1_3: Schema.optional(Schema.Literals(["on", "off"])),
        }).pipe(Schema.encodeKeys({
            ciphers: "ciphers",
            earlyHints: "early_hints",
            http2: "http2",
            minTlsVersion: "min_tls_version",
            tls_1_3: "tls_1_3",
        }))),
        type: Schema.optional(Schema.Literal("dv")),
        wildcard: Schema.optional(Schema.Boolean),
    }).pipe(Schema.encodeKeys({
        bundleMethod: "bundle_method",
        certificateAuthority: "certificate_authority",
        cloudflareBranding: "cloudflare_branding",
        customCertBundle: "custom_cert_bundle",
        customCertificate: "custom_certificate",
        customKey: "custom_key",
        method: "method",
        settings: "settings",
        type: "type",
        wildcard: "wildcard",
    }))),
}).pipe(Schema.encodeKeys({
    customMetadata: "custom_metadata",
    customOriginServer: "custom_origin_server",
    customOriginSni: "custom_origin_sni",
    ssl: "ssl",
}), T.Http({
    method: "PATCH",
    path: "/zones/{zone_id}/custom_hostnames/{customHostnameId}",
}));
export const PatchCustomHostnameResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
    hostname: Schema.String,
    ssl: Schema.Struct({
        id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        bundleMethod: Schema.optional(Schema.Union([
            Schema.Literals(["ubiquitous", "optimal", "force"]),
            Schema.Null,
        ])),
        certificateAuthority: Schema.optional(Schema.Union([
            Schema.Literals(["digicert", "google", "lets_encrypt", "ssl_com"]),
            Schema.Null,
        ])),
        customCertificate: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        customCsrId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        customKey: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        expiresOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        hosts: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
        issuer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        method: Schema.optional(Schema.Union([Schema.Literals(["http", "txt", "email"]), Schema.Null])),
        serialNumber: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        settings: Schema.optional(Schema.Union([
            Schema.Struct({
                ciphers: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
                earlyHints: Schema.optional(Schema.Union([Schema.Literals(["on", "off"]), Schema.Null])),
                http2: Schema.optional(Schema.Union([Schema.Literals(["on", "off"]), Schema.Null])),
                minTlsVersion: Schema.optional(Schema.Union([
                    Schema.Literals(["1.0", "1.1", "1.2", "1.3"]),
                    Schema.Null,
                ])),
                tls_1_3: Schema.optional(Schema.Union([Schema.Literals(["on", "off"]), Schema.Null])),
            }).pipe(Schema.encodeKeys({
                ciphers: "ciphers",
                earlyHints: "early_hints",
                http2: "http2",
                minTlsVersion: "min_tls_version",
                tls_1_3: "tls_1_3",
            })),
            Schema.Null,
        ])),
        signature: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        status: Schema.optional(Schema.Union([
            Schema.Literals([
                "initializing",
                "pending_validation",
                "deleted",
                "pending_issuance",
                "pending_deployment",
                "pending_deletion",
                "pending_expiration",
                "expired",
                "active",
                "initializing_timed_out",
                "validation_timed_out",
                "issuance_timed_out",
                "deployment_timed_out",
                "deletion_timed_out",
                "pending_cleanup",
                "staging_deployment",
                "staging_active",
                "deactivating",
                "inactive",
                "backup_issued",
                "holding_deployment",
            ]),
            Schema.Null,
        ])),
        type: Schema.optional(Schema.Union([Schema.Literal("dv"), Schema.Null])),
        uploadedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        validationErrors: Schema.optional(Schema.Union([
            Schema.Array(Schema.Struct({
                message: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            })),
            Schema.Null,
        ])),
        validationRecords: Schema.optional(Schema.Union([
            Schema.Array(Schema.Struct({
                emails: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
                httpBody: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                httpUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                txtName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
                txtValue: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            }).pipe(Schema.encodeKeys({
                emails: "emails",
                httpBody: "http_body",
                httpUrl: "http_url",
                txtName: "txt_name",
                txtValue: "txt_value",
            }))),
            Schema.Null,
        ])),
        wildcard: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    }).pipe(Schema.encodeKeys({
        id: "id",
        bundleMethod: "bundle_method",
        certificateAuthority: "certificate_authority",
        customCertificate: "custom_certificate",
        customCsrId: "custom_csr_id",
        customKey: "custom_key",
        expiresOn: "expires_on",
        hosts: "hosts",
        issuer: "issuer",
        method: "method",
        serialNumber: "serial_number",
        settings: "settings",
        signature: "signature",
        status: "status",
        type: "type",
        uploadedOn: "uploaded_on",
        validationErrors: "validation_errors",
        validationRecords: "validation_records",
        wildcard: "wildcard",
    })),
    createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    customMetadata: Schema.optional(Schema.Union([Schema.Record(Schema.String, Schema.Unknown), Schema.Null])),
    customOriginServer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    customOriginSni: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    ownershipVerification: Schema.optional(Schema.Union([
        Schema.Struct({
            name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            type: Schema.optional(Schema.Union([Schema.Literal("txt"), Schema.Null])),
            value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        }),
        Schema.Null,
    ])),
    ownershipVerificationHttp: Schema.optional(Schema.Union([
        Schema.Struct({
            httpBody: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            httpUrl: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        }).pipe(Schema.encodeKeys({ httpBody: "http_body", httpUrl: "http_url" })),
        Schema.Null,
    ])),
    status: Schema.optional(Schema.Union([
        Schema.Literals([
            "active",
            "pending",
            "active_redeploying",
            "moved",
            "pending_deletion",
            "deleted",
            "pending_blocked",
            "pending_migration",
            "pending_provisioned",
            "test_pending",
            "test_active",
            "test_active_apex",
            "test_blocked",
            "test_failed",
            "provisioned",
            "blocked",
        ]),
        Schema.Null,
    ])),
    verificationErrors: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    hostname: "hostname",
    ssl: "ssl",
    createdAt: "created_at",
    customMetadata: "custom_metadata",
    customOriginServer: "custom_origin_server",
    customOriginSni: "custom_origin_sni",
    ownershipVerification: "ownership_verification",
    ownershipVerificationHttp: "ownership_verification_http",
    status: "status",
    verificationErrors: "verification_errors",
}))
    .pipe(T.ResponsePath("result"));
export const patchCustomHostname = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PatchCustomHostnameRequest,
    output: PatchCustomHostnameResponse,
    errors: [],
}));
export const DeleteCustomHostnameRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    customHostnameId: Schema.String.pipe(T.HttpPath("customHostnameId")),
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/zones/{zone_id}/custom_hostnames/{customHostnameId}",
}));
export const DeleteCustomHostnameResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
});
export const deleteCustomHostname = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteCustomHostnameRequest,
    output: DeleteCustomHostnameResponse,
    errors: [],
}));
export const GetFallbackOriginRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/zones/{zone_id}/custom_hostnames/fallback_origin",
}));
export const GetFallbackOriginResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    errors: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
    origin: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    status: Schema.optional(Schema.Union([
        Schema.Literals([
            "initializing",
            "pending_deployment",
            "pending_deletion",
            "active",
            "deployment_timed_out",
            "deletion_timed_out",
        ]),
        Schema.Null,
    ])),
    updatedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    createdAt: "created_at",
    errors: "errors",
    origin: "origin",
    status: "status",
    updatedAt: "updated_at",
}))
    .pipe(T.ResponsePath("result"));
export const getFallbackOrigin = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetFallbackOriginRequest,
    output: GetFallbackOriginResponse,
    errors: [],
}));
export const PutFallbackOriginRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    origin: Schema.String,
}).pipe(T.Http({
    method: "PUT",
    path: "/zones/{zone_id}/custom_hostnames/fallback_origin",
}));
export const PutFallbackOriginResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    errors: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
    origin: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    status: Schema.optional(Schema.Union([
        Schema.Literals([
            "initializing",
            "pending_deployment",
            "pending_deletion",
            "active",
            "deployment_timed_out",
            "deletion_timed_out",
        ]),
        Schema.Null,
    ])),
    updatedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    createdAt: "created_at",
    errors: "errors",
    origin: "origin",
    status: "status",
    updatedAt: "updated_at",
}))
    .pipe(T.ResponsePath("result"));
export const putFallbackOrigin = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PutFallbackOriginRequest,
    output: PutFallbackOriginResponse,
    errors: [],
}));
export const DeleteFallbackOriginRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/zones/{zone_id}/custom_hostnames/fallback_origin",
}));
export const DeleteFallbackOriginResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    errors: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
    origin: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    status: Schema.optional(Schema.Union([
        Schema.Literals([
            "initializing",
            "pending_deployment",
            "pending_deletion",
            "active",
            "deployment_timed_out",
            "deletion_timed_out",
        ]),
        Schema.Null,
    ])),
    updatedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    createdAt: "created_at",
    errors: "errors",
    origin: "origin",
    status: "status",
    updatedAt: "updated_at",
}))
    .pipe(T.ResponsePath("result"));
export const deleteFallbackOrigin = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteFallbackOriginRequest,
    output: DeleteFallbackOriginResponse,
    errors: [],
}));
//# sourceMappingURL=custom-hostnames.js.map