/**
 * Cloudflare SSL API
 *
 * Generated from Cloudflare TypeScript SDK.
 * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service ssl
 */
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 CreateAnalyzeRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    bundleMethod: Schema.optional(Schema.Literals(["ubiquitous", "optimal", "force"])),
    certificate: Schema.optional(Schema.String),
}).pipe(Schema.encodeKeys({
    bundleMethod: "bundle_method",
    certificate: "certificate",
}), T.Http({ method: "POST", path: "/zones/{zone_id}/ssl/analyze" }));
export const CreateAnalyzeResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Unknown.pipe(T.ResponsePath("result"));
export const createAnalyze = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateAnalyzeRequest,
    output: CreateAnalyzeResponse,
    errors: [],
}));
export const GetCertificatePackRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    certificatePackId: Schema.String.pipe(T.HttpPath("certificatePackId")),
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/zones/{zone_id}/ssl/certificate_packs/{certificatePackId}",
}));
export const GetCertificatePackResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
    certificates: Schema.Array(Schema.Struct({
        id: Schema.String,
        hosts: Schema.Array(Schema.String),
        status: Schema.String,
        bundleMethod: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        expiresOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        geoRestrictions: Schema.optional(Schema.Union([
            Schema.Struct({
                label: Schema.optional(Schema.Union([
                    Schema.Literals(["us", "eu", "highest_security"]),
                    Schema.Null,
                ])),
            }),
            Schema.Null,
        ])),
        issuer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        signature: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        uploadedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        zoneId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    }).pipe(Schema.encodeKeys({
        id: "id",
        hosts: "hosts",
        status: "status",
        bundleMethod: "bundle_method",
        expiresOn: "expires_on",
        geoRestrictions: "geo_restrictions",
        issuer: "issuer",
        modifiedOn: "modified_on",
        priority: "priority",
        signature: "signature",
        uploadedOn: "uploaded_on",
        zoneId: "zone_id",
    }))),
    hosts: Schema.Array(Schema.String),
    status: 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",
    ]),
    type: Schema.Literals([
        "mh_custom",
        "managed_hostname",
        "sni_custom",
        "universal",
        "advanced",
        "total_tls",
        "keyless",
        "legacy_custom",
    ]),
    certificateAuthority: Schema.optional(Schema.Union([
        Schema.Literals(["google", "lets_encrypt", "ssl_com"]),
        Schema.Null,
    ])),
    cloudflareBranding: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    primaryCertificate: 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,
    ])),
    validationMethod: Schema.optional(Schema.Union([Schema.Literals(["txt", "http", "email"]), 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,
    ])),
    validityDays: Schema.optional(Schema.Union([Schema.Literals(["14", "30", "90", "365"]), Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    certificates: "certificates",
    hosts: "hosts",
    status: "status",
    type: "type",
    certificateAuthority: "certificate_authority",
    cloudflareBranding: "cloudflare_branding",
    primaryCertificate: "primary_certificate",
    validationErrors: "validation_errors",
    validationMethod: "validation_method",
    validationRecords: "validation_records",
    validityDays: "validity_days",
}))
    .pipe(T.ResponsePath("result"));
export const getCertificatePack = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetCertificatePackRequest,
    output: GetCertificatePackResponse,
    errors: [],
}));
export const ListCertificatePacksRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    status: Schema.optional(Schema.Literal("all")).pipe(T.HttpQuery("status")),
}).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/ssl/certificate_packs" }));
export const ListCertificatePacksResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    result: Schema.Array(Schema.Struct({
        id: Schema.String,
        certificates: Schema.Array(Schema.Struct({
            id: Schema.String,
            hosts: Schema.Array(Schema.String),
            status: Schema.String,
            bundleMethod: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            expiresOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            geoRestrictions: Schema.optional(Schema.Union([
                Schema.Struct({
                    label: Schema.optional(Schema.Union([
                        Schema.Literals(["us", "eu", "highest_security"]),
                        Schema.Null,
                    ])),
                }),
                Schema.Null,
            ])),
            issuer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            signature: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            uploadedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
            zoneId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        }).pipe(Schema.encodeKeys({
            id: "id",
            hosts: "hosts",
            status: "status",
            bundleMethod: "bundle_method",
            expiresOn: "expires_on",
            geoRestrictions: "geo_restrictions",
            issuer: "issuer",
            modifiedOn: "modified_on",
            priority: "priority",
            signature: "signature",
            uploadedOn: "uploaded_on",
            zoneId: "zone_id",
        }))),
        hosts: Schema.Array(Schema.String),
        status: 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",
        ]),
        type: Schema.Literals([
            "mh_custom",
            "managed_hostname",
            "sni_custom",
            "universal",
            "advanced",
            "total_tls",
            "keyless",
            "legacy_custom",
        ]),
        certificateAuthority: Schema.optional(Schema.Union([
            Schema.Literals(["google", "lets_encrypt", "ssl_com"]),
            Schema.Null,
        ])),
        cloudflareBranding: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
        primaryCertificate: 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,
        ])),
        validationMethod: Schema.optional(Schema.Union([
            Schema.Literals(["txt", "http", "email"]),
            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,
        ])),
        validityDays: Schema.optional(Schema.Union([
            Schema.Literals(["14", "30", "90", "365"]),
            Schema.Null,
        ])),
    }).pipe(Schema.encodeKeys({
        id: "id",
        certificates: "certificates",
        hosts: "hosts",
        status: "status",
        type: "type",
        certificateAuthority: "certificate_authority",
        cloudflareBranding: "cloudflare_branding",
        primaryCertificate: "primary_certificate",
        validationErrors: "validation_errors",
        validationMethod: "validation_method",
        validationRecords: "validation_records",
        validityDays: "validity_days",
    }))),
});
export const listCertificatePacks = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
    input: ListCertificatePacksRequest,
    output: ListCertificatePacksResponse,
    errors: [],
    pagination: {
        mode: "single",
        items: "result",
    },
}));
export const CreateCertificatePackRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    certificateAuthority: Schema.Literals([
        "google",
        "lets_encrypt",
        "ssl_com",
    ]),
    hosts: Schema.Array(Schema.String),
    type: Schema.Literal("advanced"),
    validationMethod: Schema.Literals(["txt", "http", "email"]),
    validityDays: Schema.Literals(["14", "30", "90", "365"]),
    cloudflareBranding: Schema.optional(Schema.Boolean),
}).pipe(Schema.encodeKeys({
    certificateAuthority: "certificate_authority",
    hosts: "hosts",
    type: "type",
    validationMethod: "validation_method",
    validityDays: "validity_days",
    cloudflareBranding: "cloudflare_branding",
}), T.Http({
    method: "POST",
    path: "/zones/{zone_id}/ssl/certificate_packs/order",
}));
export const CreateCertificatePackResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
    certificates: Schema.Array(Schema.Struct({
        id: Schema.String,
        hosts: Schema.Array(Schema.String),
        status: Schema.String,
        bundleMethod: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        expiresOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        geoRestrictions: Schema.optional(Schema.Union([
            Schema.Struct({
                label: Schema.optional(Schema.Union([
                    Schema.Literals(["us", "eu", "highest_security"]),
                    Schema.Null,
                ])),
            }),
            Schema.Null,
        ])),
        issuer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        signature: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        uploadedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        zoneId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    }).pipe(Schema.encodeKeys({
        id: "id",
        hosts: "hosts",
        status: "status",
        bundleMethod: "bundle_method",
        expiresOn: "expires_on",
        geoRestrictions: "geo_restrictions",
        issuer: "issuer",
        modifiedOn: "modified_on",
        priority: "priority",
        signature: "signature",
        uploadedOn: "uploaded_on",
        zoneId: "zone_id",
    }))),
    hosts: Schema.Array(Schema.String),
    status: 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",
    ]),
    type: Schema.Literals([
        "mh_custom",
        "managed_hostname",
        "sni_custom",
        "universal",
        "advanced",
        "total_tls",
        "keyless",
        "legacy_custom",
    ]),
    certificateAuthority: Schema.optional(Schema.Union([
        Schema.Literals(["google", "lets_encrypt", "ssl_com"]),
        Schema.Null,
    ])),
    cloudflareBranding: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    primaryCertificate: 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,
    ])),
    validationMethod: Schema.optional(Schema.Union([Schema.Literals(["txt", "http", "email"]), 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,
    ])),
    validityDays: Schema.optional(Schema.Union([Schema.Literals(["14", "30", "90", "365"]), Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    certificates: "certificates",
    hosts: "hosts",
    status: "status",
    type: "type",
    certificateAuthority: "certificate_authority",
    cloudflareBranding: "cloudflare_branding",
    primaryCertificate: "primary_certificate",
    validationErrors: "validation_errors",
    validationMethod: "validation_method",
    validationRecords: "validation_records",
    validityDays: "validity_days",
}))
    .pipe(T.ResponsePath("result"));
export const createCertificatePack = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: CreateCertificatePackRequest,
    output: CreateCertificatePackResponse,
    errors: [],
}));
export const PatchCertificatePackRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    certificatePackId: Schema.String.pipe(T.HttpPath("certificatePackId")),
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    cloudflareBranding: Schema.optional(Schema.Boolean),
}).pipe(Schema.encodeKeys({ cloudflareBranding: "cloudflare_branding" }), T.Http({
    method: "PATCH",
    path: "/zones/{zone_id}/ssl/certificate_packs/{certificatePackId}",
}));
export const PatchCertificatePackResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
    certificates: Schema.Array(Schema.Struct({
        id: Schema.String,
        hosts: Schema.Array(Schema.String),
        status: Schema.String,
        bundleMethod: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        expiresOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        geoRestrictions: Schema.optional(Schema.Union([
            Schema.Struct({
                label: Schema.optional(Schema.Union([
                    Schema.Literals(["us", "eu", "highest_security"]),
                    Schema.Null,
                ])),
            }),
            Schema.Null,
        ])),
        issuer: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        signature: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        uploadedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
        zoneId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    }).pipe(Schema.encodeKeys({
        id: "id",
        hosts: "hosts",
        status: "status",
        bundleMethod: "bundle_method",
        expiresOn: "expires_on",
        geoRestrictions: "geo_restrictions",
        issuer: "issuer",
        modifiedOn: "modified_on",
        priority: "priority",
        signature: "signature",
        uploadedOn: "uploaded_on",
        zoneId: "zone_id",
    }))),
    hosts: Schema.Array(Schema.String),
    status: 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",
    ]),
    type: Schema.Literals([
        "mh_custom",
        "managed_hostname",
        "sni_custom",
        "universal",
        "advanced",
        "total_tls",
        "keyless",
        "legacy_custom",
    ]),
    certificateAuthority: Schema.optional(Schema.Union([
        Schema.Literals(["google", "lets_encrypt", "ssl_com"]),
        Schema.Null,
    ])),
    cloudflareBranding: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    primaryCertificate: 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,
    ])),
    validationMethod: Schema.optional(Schema.Union([Schema.Literals(["txt", "http", "email"]), 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,
    ])),
    validityDays: Schema.optional(Schema.Union([Schema.Literals(["14", "30", "90", "365"]), Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    certificates: "certificates",
    hosts: "hosts",
    status: "status",
    type: "type",
    certificateAuthority: "certificate_authority",
    cloudflareBranding: "cloudflare_branding",
    primaryCertificate: "primary_certificate",
    validationErrors: "validation_errors",
    validationMethod: "validation_method",
    validationRecords: "validation_records",
    validityDays: "validity_days",
}))
    .pipe(T.ResponsePath("result"));
export const patchCertificatePack = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PatchCertificatePackRequest,
    output: PatchCertificatePackResponse,
    errors: [],
}));
export const DeleteCertificatePackRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    certificatePackId: Schema.String.pipe(T.HttpPath("certificatePackId")),
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({
    method: "DELETE",
    path: "/zones/{zone_id}/ssl/certificate_packs/{certificatePackId}",
}));
export const DeleteCertificatePackResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const deleteCertificatePack = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: DeleteCertificatePackRequest,
    output: DeleteCertificatePackResponse,
    errors: [],
}));
export const GetCertificatePackQuotaRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({
    method: "GET",
    path: "/zones/{zone_id}/ssl/certificate_packs/quota",
}));
export const GetCertificatePackQuotaResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    advanced: Schema.optional(Schema.Union([
        Schema.Struct({
            allocated: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
            used: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
        }),
        Schema.Null,
    ])),
}).pipe(T.ResponsePath("result"));
export const getCertificatePackQuota = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetCertificatePackQuotaRequest,
    output: GetCertificatePackQuotaResponse,
    errors: [],
}));
export const GetRecommendationRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/ssl/recommendation" }));
export const GetRecommendationResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    id: Schema.String,
    editable: Schema.Boolean,
    modifiedOn: Schema.String,
    value: Schema.Literals(["auto", "custom"]),
    nextScheduledScan: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
})
    .pipe(Schema.encodeKeys({
    id: "id",
    editable: "editable",
    modifiedOn: "modified_on",
    value: "value",
    nextScheduledScan: "next_scheduled_scan",
}))
    .pipe(T.ResponsePath("result"));
export const getRecommendation = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetRecommendationRequest,
    output: GetRecommendationResponse,
    errors: [],
}));
export const GetUniversalSettingRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
}).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/ssl/universal/settings" }));
export const GetUniversalSettingResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const getUniversalSetting = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetUniversalSettingRequest,
    output: GetUniversalSettingResponse,
    errors: [],
}));
export const PatchUniversalSettingRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    enabled: Schema.optional(Schema.Boolean),
}).pipe(T.Http({
    method: "PATCH",
    path: "/zones/{zone_id}/ssl/universal/settings",
}));
export const PatchUniversalSettingResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    enabled: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
}).pipe(T.ResponsePath("result"));
export const patchUniversalSetting = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PatchUniversalSettingRequest,
    output: PatchUniversalSettingResponse,
    errors: [],
}));
export const GetVerificationRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    retry: Schema.optional(Schema.Literal(true)).pipe(T.HttpQuery("retry")),
}).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/ssl/verification" }));
export const GetVerificationResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(Schema.Struct({
    certificateStatus: Schema.Literals([
        "initializing",
        "authorizing",
        "active",
        "expired",
        "issuing",
        "timing_out",
        "pending_deployment",
    ]),
    brandCheck: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    certPackUuid: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    signature: Schema.optional(Schema.Union([
        Schema.Literals(["ECDSAWithSHA256", "SHA1WithRSA", "SHA256WithRSA"]),
        Schema.Null,
    ])),
    validationMethod: Schema.optional(Schema.Union([Schema.Literals(["http", "cname", "txt"]), Schema.Null])),
    verificationInfo: Schema.optional(Schema.Union([
        Schema.Struct({
            recordName: Schema.optional(Schema.Union([
                Schema.Literals(["record_name", "http_url", "cname", "txt_name"]),
                Schema.Null,
            ])),
            recordTarget: Schema.optional(Schema.Union([
                Schema.Literals([
                    "record_value",
                    "http_body",
                    "cname_target",
                    "txt_value",
                ]),
                Schema.Null,
            ])),
        }).pipe(Schema.encodeKeys({
            recordName: "record_name",
            recordTarget: "record_target",
        })),
        Schema.Null,
    ])),
    verificationStatus: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
    verificationType: Schema.optional(Schema.Union([Schema.Literals(["cname", "meta tag"]), Schema.Null])),
}).pipe(Schema.encodeKeys({
    certificateStatus: "certificate_status",
    brandCheck: "brand_check",
    certPackUuid: "cert_pack_uuid",
    signature: "signature",
    validationMethod: "validation_method",
    verificationInfo: "verification_info",
    verificationStatus: "verification_status",
    verificationType: "verification_type",
}))).pipe(T.ResponsePath("result"));
export const getVerification = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: GetVerificationRequest,
    output: GetVerificationResponse,
    errors: [],
}));
export const PatchVerificationRequest = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    certificatePackId: Schema.String.pipe(T.HttpPath("certificatePackId")),
    zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
    validationMethod: Schema.Literals(["http", "cname", "txt", "email"]),
}).pipe(Schema.encodeKeys({ validationMethod: "validation_method" }), T.Http({
    method: "PATCH",
    path: "/zones/{zone_id}/ssl/verification/{certificatePackId}",
}));
export const PatchVerificationResponse = 
/*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
    status: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
    validationMethod: Schema.optional(Schema.Union([
        Schema.Literals(["http", "cname", "txt", "email"]),
        Schema.Null,
    ])),
})
    .pipe(Schema.encodeKeys({
    status: "status",
    validationMethod: "validation_method",
}))
    .pipe(T.ResponsePath("result"));
export const patchVerification = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
    input: PatchVerificationRequest,
    output: PatchVerificationResponse,
    errors: [],
}));
//# sourceMappingURL=ssl.js.map