"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.StackoneListLogsResponse$inboundSchema = exports.StackoneListLogsRequest$outboundSchema = exports.OrderDirection$outboundSchema = exports.OrderBy$outboundSchema = exports.StackoneListLogsQueryParamInclude$outboundSchema = exports.QueryParamFilter$outboundSchema = exports.QueryParamOrderDirection$outboundSchema = exports.QueryParamOrderBy$outboundSchema = exports.OrderDirection = exports.OrderBy = exports.StackoneListLogsQueryParamInclude = exports.QueryParamOrderDirection = exports.QueryParamOrderBy = void 0;
exports.queryParamFilterToJSON = queryParamFilterToJSON;
exports.stackoneListLogsRequestToJSON = stackoneListLogsRequestToJSON;
exports.stackoneListLogsResponseFromJSON = stackoneListLogsResponseFromJSON;
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 QueryParamOrderBy;
(function (QueryParamOrderBy) {
    QueryParamOrderBy["Provider"] = "provider";
    QueryParamOrderBy["Service"] = "service";
    QueryParamOrderBy["Status"] = "status";
    QueryParamOrderBy["EventDatetime"] = "eventDatetime";
    QueryParamOrderBy["Duration"] = "duration";
})(QueryParamOrderBy || (exports.QueryParamOrderBy = QueryParamOrderBy = {}));
/**
 * The direction to order the results by.
 */
var QueryParamOrderDirection;
(function (QueryParamOrderDirection) {
    QueryParamOrderDirection["Asc"] = "asc";
    QueryParamOrderDirection["Desc"] = "desc";
})(QueryParamOrderDirection || (exports.QueryParamOrderDirection = QueryParamOrderDirection = {}));
/**
 * The include parameter allows you to include additional data in the response.
 */
var StackoneListLogsQueryParamInclude;
(function (StackoneListLogsQueryParamInclude) {
    StackoneListLogsQueryParamInclude["StepLogs"] = "step_logs";
})(StackoneListLogsQueryParamInclude || (exports.StackoneListLogsQueryParamInclude = StackoneListLogsQueryParamInclude = {}));
/**
 * The field to order the results by.
 */
var OrderBy;
(function (OrderBy) {
    OrderBy["Provider"] = "provider";
    OrderBy["Service"] = "service";
    OrderBy["Status"] = "status";
    OrderBy["EventDatetime"] = "eventDatetime";
    OrderBy["Duration"] = "duration";
})(OrderBy || (exports.OrderBy = OrderBy = {}));
/**
 * The direction to order the results by.
 */
var OrderDirection;
(function (OrderDirection) {
    OrderDirection["Asc"] = "asc";
    OrderDirection["Desc"] = "desc";
})(OrderDirection || (exports.OrderDirection = OrderDirection = {}));
/** @internal */
exports.QueryParamOrderBy$outboundSchema = z.nativeEnum(QueryParamOrderBy);
/** @internal */
exports.QueryParamOrderDirection$outboundSchema = z.nativeEnum(QueryParamOrderDirection);
/** @internal */
exports.QueryParamFilter$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(),
    orderBy: z.nullable(exports.QueryParamOrderBy$outboundSchema).optional(),
    orderDirection: z.nullable(exports.QueryParamOrderDirection$outboundSchema)
        .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(),
    sourceIds: z.nullable(z.string()).optional(),
    sourceTypes: z.nullable(z.string()).optional(),
    sourceValues: 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",
        orderBy: "order_by",
        orderDirection: "order_direction",
        requestIds: "request_ids",
        sourceIds: "source_ids",
        sourceTypes: "source_types",
        sourceValues: "source_values",
        startDate: "start_date",
        statusCodes: "status_codes",
        subResources: "sub_resources",
    });
});
function queryParamFilterToJSON(queryParamFilter) {
    return JSON.stringify(exports.QueryParamFilter$outboundSchema.parse(queryParamFilter));
}
/** @internal */
exports.StackoneListLogsQueryParamInclude$outboundSchema = z.nativeEnum(StackoneListLogsQueryParamInclude);
/** @internal */
exports.OrderBy$outboundSchema = z
    .nativeEnum(OrderBy);
/** @internal */
exports.OrderDirection$outboundSchema = z.nativeEnum(OrderDirection);
/** @internal */
exports.StackoneListLogsRequest$outboundSchema = z.object({
    filter: z.nullable(z.lazy(() => exports.QueryParamFilter$outboundSchema)).optional(),
    include: z.nullable(exports.StackoneListLogsQueryParamInclude$outboundSchema)
        .optional(),
    next: z.nullable(z.string()).optional(),
    orderBy: z.nullable(exports.OrderBy$outboundSchema).optional(),
    orderDirection: z.nullable(exports.OrderDirection$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 stackoneListLogsRequestToJSON(stackoneListLogsRequest) {
    return JSON.stringify(exports.StackoneListLogsRequest$outboundSchema.parse(stackoneListLogsRequest));
}
/** @internal */
exports.StackoneListLogsResponse$inboundSchema = z.object({
    ContentType: z.string(),
    Headers: z.record(z.array(z.string())).default({}),
    StatusCode: z.number().int(),
    RawResponse: z.instanceof(Response),
    UnifiedLogsPaginated: shared.UnifiedLogsPaginated$inboundSchema.optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "ContentType": "contentType",
        "Headers": "headers",
        "StatusCode": "statusCode",
        "RawResponse": "rawResponse",
        "UnifiedLogsPaginated": "unifiedLogsPaginated",
    });
});
function stackoneListLogsResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.StackoneListLogsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StackoneListLogsResponse' from JSON`);
}
//# sourceMappingURL=stackonelistlogs.js.map