"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.StackoneListStepLogsResponse$inboundSchema = exports.StackoneListStepLogsRequest$outboundSchema = exports.StackoneListStepLogsQueryParamOrderDirection$outboundSchema = exports.StackoneListStepLogsQueryParamOrderBy$outboundSchema = exports.StackoneListStepLogsQueryParamFilter$outboundSchema = exports.StackoneListStepLogsQueryParamOrderDirection = exports.StackoneListStepLogsQueryParamOrderBy = void 0;
exports.stackoneListStepLogsQueryParamFilterToJSON = stackoneListStepLogsQueryParamFilterToJSON;
exports.stackoneListStepLogsRequestToJSON = stackoneListStepLogsRequestToJSON;
exports.stackoneListStepLogsResponseFromJSON = stackoneListStepLogsResponseFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../../lib/primitives.js");
const schemas_js_1 = require("../../../lib/schemas.js");
const shared = __importStar(require("../shared/index.js"));
/**
 * The field to order the results by.
 */
var StackoneListStepLogsQueryParamOrderBy;
(function (StackoneListStepLogsQueryParamOrderBy) {
    StackoneListStepLogsQueryParamOrderBy["Provider"] = "provider";
    StackoneListStepLogsQueryParamOrderBy["Service"] = "service";
    StackoneListStepLogsQueryParamOrderBy["Status"] = "status";
    StackoneListStepLogsQueryParamOrderBy["EventDatetime"] = "eventDatetime";
    StackoneListStepLogsQueryParamOrderBy["Duration"] = "duration";
})(StackoneListStepLogsQueryParamOrderBy || (exports.StackoneListStepLogsQueryParamOrderBy = StackoneListStepLogsQueryParamOrderBy = {}));
/**
 * The direction to order the results by.
 */
var StackoneListStepLogsQueryParamOrderDirection;
(function (StackoneListStepLogsQueryParamOrderDirection) {
    StackoneListStepLogsQueryParamOrderDirection["Asc"] = "asc";
    StackoneListStepLogsQueryParamOrderDirection["Desc"] = "desc";
})(StackoneListStepLogsQueryParamOrderDirection || (exports.StackoneListStepLogsQueryParamOrderDirection = StackoneListStepLogsQueryParamOrderDirection = {}));
/** @internal */
exports.StackoneListStepLogsQueryParamFilter$outboundSchema = z.object({
    accountIds: z.nullable(z.string()).optional(),
    actions: z.nullable(z.string()).optional(),
    childResources: z.nullable(z.string()).optional(),
    endDate: z.nullable(z.date().transform(v => v.toISOString())).optional(),
    httpMethods: z.nullable(z.string()).optional(),
    providers: z.nullable(z.string()).optional(),
    requestIds: z.nullable(z.string()).optional(),
    resources: z.nullable(z.string()).optional(),
    services: z.nullable(z.string()).optional(),
    startDate: z.nullable(z.date().transform(v => v.toISOString())).optional(),
    statusCodes: z.nullable(z.string()).optional(),
    subResources: z.nullable(z.string()).optional(),
    success: z.nullable(z.boolean()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        accountIds: "account_ids",
        childResources: "child_resources",
        endDate: "end_date",
        httpMethods: "http_methods",
        requestIds: "request_ids",
        startDate: "start_date",
        statusCodes: "status_codes",
        subResources: "sub_resources",
    });
});
function stackoneListStepLogsQueryParamFilterToJSON(stackoneListStepLogsQueryParamFilter) {
    return JSON.stringify(exports.StackoneListStepLogsQueryParamFilter$outboundSchema.parse(stackoneListStepLogsQueryParamFilter));
}
/** @internal */
exports.StackoneListStepLogsQueryParamOrderBy$outboundSchema = z.nativeEnum(StackoneListStepLogsQueryParamOrderBy);
/** @internal */
exports.StackoneListStepLogsQueryParamOrderDirection$outboundSchema = z
    .nativeEnum(StackoneListStepLogsQueryParamOrderDirection);
/** @internal */
exports.StackoneListStepLogsRequest$outboundSchema = z.object({
    filter: z.nullable(z.lazy(() => exports.StackoneListStepLogsQueryParamFilter$outboundSchema)).optional(),
    next: z.nullable(z.string()).optional(),
    orderBy: z.nullable(exports.StackoneListStepLogsQueryParamOrderBy$outboundSchema)
        .optional(),
    orderDirection: z.nullable(exports.StackoneListStepLogsQueryParamOrderDirection$outboundSchema).optional(),
    pageSize: z.nullable(z.number()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        orderBy: "order_by",
        orderDirection: "order_direction",
        pageSize: "page_size",
    });
});
function stackoneListStepLogsRequestToJSON(stackoneListStepLogsRequest) {
    return JSON.stringify(exports.StackoneListStepLogsRequest$outboundSchema.parse(stackoneListStepLogsRequest));
}
/** @internal */
exports.StackoneListStepLogsResponse$inboundSchema = z.object({
    ContentType: z.string(),
    Headers: z.record(z.array(z.string())).default({}),
    StatusCode: z.number().int(),
    RawResponse: z.instanceof(Response),
    StepLogsPaginated: shared.StepLogsPaginated$inboundSchema.optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "ContentType": "contentType",
        "Headers": "headers",
        "StatusCode": "statusCode",
        "RawResponse": "rawResponse",
        "StepLogsPaginated": "stepLogsPaginated",
    });
});
function stackoneListStepLogsResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.StackoneListStepLogsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StackoneListStepLogsResponse' from JSON`);
}
//# sourceMappingURL=stackoneliststeplogs.js.map