"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.StackoneListPlatformLogsResponse$inboundSchema = exports.StackoneListPlatformLogsRequest$outboundSchema = exports.StackoneListPlatformLogsQueryParamOrderDirection$outboundSchema = exports.StackoneListPlatformLogsQueryParamOrderBy$outboundSchema = exports.StackoneListPlatformLogsQueryParamFilter$outboundSchema = exports.StackoneListPlatformLogsQueryParamRequestLogsOrderDirection$outboundSchema = exports.StackoneListPlatformLogsQueryParamRequestLogsOrderBy$outboundSchema = exports.StackoneListPlatformLogsQueryParamOrderDirection = exports.StackoneListPlatformLogsQueryParamOrderBy = exports.StackoneListPlatformLogsQueryParamRequestLogsOrderDirection = exports.StackoneListPlatformLogsQueryParamRequestLogsOrderBy = void 0;
exports.stackoneListPlatformLogsQueryParamFilterToJSON = stackoneListPlatformLogsQueryParamFilterToJSON;
exports.stackoneListPlatformLogsRequestToJSON = stackoneListPlatformLogsRequestToJSON;
exports.stackoneListPlatformLogsResponseFromJSON = stackoneListPlatformLogsResponseFromJSON;
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 StackoneListPlatformLogsQueryParamRequestLogsOrderBy;
(function (StackoneListPlatformLogsQueryParamRequestLogsOrderBy) {
    StackoneListPlatformLogsQueryParamRequestLogsOrderBy["Provider"] = "provider";
    StackoneListPlatformLogsQueryParamRequestLogsOrderBy["Service"] = "service";
    StackoneListPlatformLogsQueryParamRequestLogsOrderBy["Status"] = "status";
    StackoneListPlatformLogsQueryParamRequestLogsOrderBy["EventDatetime"] = "eventDatetime";
    StackoneListPlatformLogsQueryParamRequestLogsOrderBy["Duration"] = "duration";
})(StackoneListPlatformLogsQueryParamRequestLogsOrderBy || (exports.StackoneListPlatformLogsQueryParamRequestLogsOrderBy = StackoneListPlatformLogsQueryParamRequestLogsOrderBy = {}));
/**
 * The direction to order the results by.
 */
var StackoneListPlatformLogsQueryParamRequestLogsOrderDirection;
(function (StackoneListPlatformLogsQueryParamRequestLogsOrderDirection) {
    StackoneListPlatformLogsQueryParamRequestLogsOrderDirection["Asc"] = "asc";
    StackoneListPlatformLogsQueryParamRequestLogsOrderDirection["Desc"] = "desc";
})(StackoneListPlatformLogsQueryParamRequestLogsOrderDirection || (exports.StackoneListPlatformLogsQueryParamRequestLogsOrderDirection = StackoneListPlatformLogsQueryParamRequestLogsOrderDirection = {}));
/**
 * The field to order the results by.
 */
var StackoneListPlatformLogsQueryParamOrderBy;
(function (StackoneListPlatformLogsQueryParamOrderBy) {
    StackoneListPlatformLogsQueryParamOrderBy["Provider"] = "provider";
    StackoneListPlatformLogsQueryParamOrderBy["Service"] = "service";
    StackoneListPlatformLogsQueryParamOrderBy["Status"] = "status";
    StackoneListPlatformLogsQueryParamOrderBy["EventDatetime"] = "eventDatetime";
    StackoneListPlatformLogsQueryParamOrderBy["Duration"] = "duration";
})(StackoneListPlatformLogsQueryParamOrderBy || (exports.StackoneListPlatformLogsQueryParamOrderBy = StackoneListPlatformLogsQueryParamOrderBy = {}));
/**
 * The direction to order the results by.
 */
var StackoneListPlatformLogsQueryParamOrderDirection;
(function (StackoneListPlatformLogsQueryParamOrderDirection) {
    StackoneListPlatformLogsQueryParamOrderDirection["Asc"] = "asc";
    StackoneListPlatformLogsQueryParamOrderDirection["Desc"] = "desc";
})(StackoneListPlatformLogsQueryParamOrderDirection || (exports.StackoneListPlatformLogsQueryParamOrderDirection = StackoneListPlatformLogsQueryParamOrderDirection = {}));
/** @internal */
exports.StackoneListPlatformLogsQueryParamRequestLogsOrderBy$outboundSchema = z.nativeEnum(StackoneListPlatformLogsQueryParamRequestLogsOrderBy);
/** @internal */
exports.StackoneListPlatformLogsQueryParamRequestLogsOrderDirection$outboundSchema = z.nativeEnum(StackoneListPlatformLogsQueryParamRequestLogsOrderDirection);
/** @internal */
exports.StackoneListPlatformLogsQueryParamFilter$outboundSchema = z.object({
    accountIds: z.nullable(z.string()).optional(),
    actions: z.nullable(z.string()).optional(),
    categories: 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.StackoneListPlatformLogsQueryParamRequestLogsOrderBy$outboundSchema).optional(),
    orderDirection: z.nullable(exports.StackoneListPlatformLogsQueryParamRequestLogsOrderDirection$outboundSchema).optional(),
    requestIds: z.nullable(z.string()).optional(),
    resources: 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(),
    success: z.nullable(z.boolean()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        accountIds: "account_ids",
        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",
    });
});
function stackoneListPlatformLogsQueryParamFilterToJSON(stackoneListPlatformLogsQueryParamFilter) {
    return JSON.stringify(exports.StackoneListPlatformLogsQueryParamFilter$outboundSchema.parse(stackoneListPlatformLogsQueryParamFilter));
}
/** @internal */
exports.StackoneListPlatformLogsQueryParamOrderBy$outboundSchema = z
    .nativeEnum(StackoneListPlatformLogsQueryParamOrderBy);
/** @internal */
exports.StackoneListPlatformLogsQueryParamOrderDirection$outboundSchema = z
    .nativeEnum(StackoneListPlatformLogsQueryParamOrderDirection);
/** @internal */
exports.StackoneListPlatformLogsRequest$outboundSchema = z.object({
    filter: z.nullable(z.lazy(() => exports.StackoneListPlatformLogsQueryParamFilter$outboundSchema)).optional(),
    next: z.nullable(z.string()).optional(),
    orderBy: z.nullable(exports.StackoneListPlatformLogsQueryParamOrderBy$outboundSchema)
        .optional(),
    orderDirection: z.nullable(exports.StackoneListPlatformLogsQueryParamOrderDirection$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 stackoneListPlatformLogsRequestToJSON(stackoneListPlatformLogsRequest) {
    return JSON.stringify(exports.StackoneListPlatformLogsRequest$outboundSchema.parse(stackoneListPlatformLogsRequest));
}
/** @internal */
exports.StackoneListPlatformLogsResponse$inboundSchema = z.object({
    ContentType: z.string(),
    Headers: z.record(z.array(z.string())).default({}),
    PlatformLogsPaginated: shared.PlatformLogsPaginated$inboundSchema.optional(),
    StatusCode: z.number().int(),
    RawResponse: z.instanceof(Response),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "ContentType": "contentType",
        "Headers": "headers",
        "PlatformLogsPaginated": "platformLogsPaginated",
        "StatusCode": "statusCode",
        "RawResponse": "rawResponse",
    });
});
function stackoneListPlatformLogsResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.StackoneListPlatformLogsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StackoneListPlatformLogsResponse' from JSON`);
}
//# sourceMappingURL=stackonelistplatformlogs.js.map