/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 42337611c4b4
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import { AuthStatus$inboundSchema } from "./authstatus.js";
import { HTTPStatus$inboundSchema } from "./httpstatus.js";
/** @internal */
export const CredentialsStatus$inboundSchema = z.object({
    status_type: AuthStatus$inboundSchema,
    last_checked_at: z.nullable(z.iso.datetime({ offset: true }).transform(v => new Date(v))).optional(),
    error_http_code: z.nullable(HTTPStatus$inboundSchema).optional(),
    error_message: z.nullable(z.string()).optional(),
}).transform((v) => {
    return remap$(v, {
        "status_type": "statusType",
        "last_checked_at": "lastCheckedAt",
        "error_http_code": "errorHttpCode",
        "error_message": "errorMessage",
    });
});
export function credentialsStatusFromJSON(jsonString) {
    return safeParse(jsonString, (x) => CredentialsStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CredentialsStatus' from JSON`);
}
//# sourceMappingURL=credentialsstatus.js.map