"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$ = exports.StackoneListStepLogsResponse$outboundSchema = exports.StackoneListStepLogsResponse$inboundSchema = exports.StackoneListStepLogsRequest$ = exports.StackoneListStepLogsRequest$outboundSchema = exports.StackoneListStepLogsRequest$inboundSchema = exports.StackoneListStepLogsQueryParamOrderDirection$ = exports.StackoneListStepLogsQueryParamOrderDirection$outboundSchema = exports.StackoneListStepLogsQueryParamOrderDirection$inboundSchema = exports.StackoneListStepLogsQueryParamOrderBy$ = exports.StackoneListStepLogsQueryParamOrderBy$outboundSchema = exports.StackoneListStepLogsQueryParamOrderBy$inboundSchema = exports.StackoneListStepLogsQueryParamFilter$ = exports.StackoneListStepLogsQueryParamFilter$outboundSchema = exports.StackoneListStepLogsQueryParamFilter$inboundSchema = exports.StackoneListStepLogsQueryParamOrderDirection = exports.StackoneListStepLogsQueryParamOrderBy = void 0;
exports.stackoneListStepLogsQueryParamFilterToJSON = stackoneListStepLogsQueryParamFilterToJSON;
exports.stackoneListStepLogsQueryParamFilterFromJSON = stackoneListStepLogsQueryParamFilterFromJSON;
exports.stackoneListStepLogsRequestToJSON = stackoneListStepLogsRequestToJSON;
exports.stackoneListStepLogsRequestFromJSON = stackoneListStepLogsRequestFromJSON;
exports.stackoneListStepLogsResponseToJSON = stackoneListStepLogsResponseToJSON;
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$inboundSchema = z.object({
    account_ids: z.nullable(z.string()).optional(),
    actions: z.nullable(z.string()).optional(),
    child_resources: z.nullable(z.string()).optional(),
    end_date: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    http_methods: z.nullable(z.string()).optional(),
    providers: z.nullable(z.string()).optional(),
    request_ids: z.nullable(z.string()).optional(),
    resources: z.nullable(z.string()).optional(),
    services: z.nullable(z.string()).optional(),
    start_date: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
    status_codes: z.nullable(z.string()).optional(),
    sub_resources: z.nullable(z.string()).optional(),
    success: z.nullable(z.boolean()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "account_ids": "accountIds",
        "child_resources": "childResources",
        "end_date": "endDate",
        "http_methods": "httpMethods",
        "request_ids": "requestIds",
        "start_date": "startDate",
        "status_codes": "statusCodes",
        "sub_resources": "subResources",
    });
});
/** @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",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var StackoneListStepLogsQueryParamFilter$;
(function (StackoneListStepLogsQueryParamFilter$) {
    /** @deprecated use `StackoneListStepLogsQueryParamFilter$inboundSchema` instead. */
    StackoneListStepLogsQueryParamFilter$.inboundSchema = exports.StackoneListStepLogsQueryParamFilter$inboundSchema;
    /** @deprecated use `StackoneListStepLogsQueryParamFilter$outboundSchema` instead. */
    StackoneListStepLogsQueryParamFilter$.outboundSchema = exports.StackoneListStepLogsQueryParamFilter$outboundSchema;
})(StackoneListStepLogsQueryParamFilter$ || (exports.StackoneListStepLogsQueryParamFilter$ = StackoneListStepLogsQueryParamFilter$ = {}));
function stackoneListStepLogsQueryParamFilterToJSON(stackoneListStepLogsQueryParamFilter) {
    return JSON.stringify(exports.StackoneListStepLogsQueryParamFilter$outboundSchema.parse(stackoneListStepLogsQueryParamFilter));
}
function stackoneListStepLogsQueryParamFilterFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.StackoneListStepLogsQueryParamFilter$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StackoneListStepLogsQueryParamFilter' from JSON`);
}
/** @internal */
exports.StackoneListStepLogsQueryParamOrderBy$inboundSchema = z.nativeEnum(StackoneListStepLogsQueryParamOrderBy);
/** @internal */
exports.StackoneListStepLogsQueryParamOrderBy$outboundSchema = exports.StackoneListStepLogsQueryParamOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var StackoneListStepLogsQueryParamOrderBy$;
(function (StackoneListStepLogsQueryParamOrderBy$) {
    /** @deprecated use `StackoneListStepLogsQueryParamOrderBy$inboundSchema` instead. */
    StackoneListStepLogsQueryParamOrderBy$.inboundSchema = exports.StackoneListStepLogsQueryParamOrderBy$inboundSchema;
    /** @deprecated use `StackoneListStepLogsQueryParamOrderBy$outboundSchema` instead. */
    StackoneListStepLogsQueryParamOrderBy$.outboundSchema = exports.StackoneListStepLogsQueryParamOrderBy$outboundSchema;
})(StackoneListStepLogsQueryParamOrderBy$ || (exports.StackoneListStepLogsQueryParamOrderBy$ = StackoneListStepLogsQueryParamOrderBy$ = {}));
/** @internal */
exports.StackoneListStepLogsQueryParamOrderDirection$inboundSchema = z
    .nativeEnum(StackoneListStepLogsQueryParamOrderDirection);
/** @internal */
exports.StackoneListStepLogsQueryParamOrderDirection$outboundSchema = exports.StackoneListStepLogsQueryParamOrderDirection$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var StackoneListStepLogsQueryParamOrderDirection$;
(function (StackoneListStepLogsQueryParamOrderDirection$) {
    /** @deprecated use `StackoneListStepLogsQueryParamOrderDirection$inboundSchema` instead. */
    StackoneListStepLogsQueryParamOrderDirection$.inboundSchema = exports.StackoneListStepLogsQueryParamOrderDirection$inboundSchema;
    /** @deprecated use `StackoneListStepLogsQueryParamOrderDirection$outboundSchema` instead. */
    StackoneListStepLogsQueryParamOrderDirection$.outboundSchema = exports.StackoneListStepLogsQueryParamOrderDirection$outboundSchema;
})(StackoneListStepLogsQueryParamOrderDirection$ || (exports.StackoneListStepLogsQueryParamOrderDirection$ = StackoneListStepLogsQueryParamOrderDirection$ = {}));
/** @internal */
exports.StackoneListStepLogsRequest$inboundSchema = z.object({
    filter: z.nullable(z.lazy(() => exports.StackoneListStepLogsQueryParamFilter$inboundSchema)).optional(),
    next: z.nullable(z.string()).optional(),
    order_by: z.nullable(exports.StackoneListStepLogsQueryParamOrderBy$inboundSchema)
        .optional(),
    order_direction: z.nullable(exports.StackoneListStepLogsQueryParamOrderDirection$inboundSchema).optional(),
    page_size: z.nullable(z.number()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "order_by": "orderBy",
        "order_direction": "orderDirection",
        "page_size": "pageSize",
    });
});
/** @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",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var StackoneListStepLogsRequest$;
(function (StackoneListStepLogsRequest$) {
    /** @deprecated use `StackoneListStepLogsRequest$inboundSchema` instead. */
    StackoneListStepLogsRequest$.inboundSchema = exports.StackoneListStepLogsRequest$inboundSchema;
    /** @deprecated use `StackoneListStepLogsRequest$outboundSchema` instead. */
    StackoneListStepLogsRequest$.outboundSchema = exports.StackoneListStepLogsRequest$outboundSchema;
})(StackoneListStepLogsRequest$ || (exports.StackoneListStepLogsRequest$ = StackoneListStepLogsRequest$ = {}));
function stackoneListStepLogsRequestToJSON(stackoneListStepLogsRequest) {
    return JSON.stringify(exports.StackoneListStepLogsRequest$outboundSchema.parse(stackoneListStepLogsRequest));
}
function stackoneListStepLogsRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.StackoneListStepLogsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StackoneListStepLogsRequest' from JSON`);
}
/** @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",
    });
});
/** @internal */
exports.StackoneListStepLogsResponse$outboundSchema = z.object({
    contentType: z.string(),
    headers: z.record(z.array(z.string())),
    statusCode: z.number().int(),
    rawResponse: z.instanceof(Response).transform(() => {
        throw new Error("Response cannot be serialized");
    }),
    stepLogsPaginated: shared.StepLogsPaginated$outboundSchema.optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        contentType: "ContentType",
        headers: "Headers",
        statusCode: "StatusCode",
        rawResponse: "RawResponse",
        stepLogsPaginated: "StepLogsPaginated",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var StackoneListStepLogsResponse$;
(function (StackoneListStepLogsResponse$) {
    /** @deprecated use `StackoneListStepLogsResponse$inboundSchema` instead. */
    StackoneListStepLogsResponse$.inboundSchema = exports.StackoneListStepLogsResponse$inboundSchema;
    /** @deprecated use `StackoneListStepLogsResponse$outboundSchema` instead. */
    StackoneListStepLogsResponse$.outboundSchema = exports.StackoneListStepLogsResponse$outboundSchema;
})(StackoneListStepLogsResponse$ || (exports.StackoneListStepLogsResponse$ = StackoneListStepLogsResponse$ = {}));
function stackoneListStepLogsResponseToJSON(stackoneListStepLogsResponse) {
    return JSON.stringify(exports.StackoneListStepLogsResponse$outboundSchema.parse(stackoneListStepLogsResponse));
}
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