"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 (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.stackoneListLogsResponseFromJSON = exports.stackoneListLogsResponseToJSON = exports.StackoneListLogsResponse$ = exports.StackoneListLogsResponse$outboundSchema = exports.StackoneListLogsResponse$inboundSchema = exports.stackoneListLogsRequestFromJSON = exports.stackoneListLogsRequestToJSON = exports.StackoneListLogsRequest$ = exports.StackoneListLogsRequest$outboundSchema = exports.StackoneListLogsRequest$inboundSchema = exports.OrderDirection$ = exports.OrderDirection$outboundSchema = exports.OrderDirection$inboundSchema = exports.OrderBy$ = exports.OrderBy$outboundSchema = exports.OrderBy$inboundSchema = exports.QueryParamInclude$ = exports.QueryParamInclude$outboundSchema = exports.QueryParamInclude$inboundSchema = exports.filterFromJSON = exports.filterToJSON = exports.Filter$ = exports.Filter$outboundSchema = exports.Filter$inboundSchema = exports.QueryParamOrderDirection$ = exports.QueryParamOrderDirection$outboundSchema = exports.QueryParamOrderDirection$inboundSchema = exports.QueryParamOrderBy$ = exports.QueryParamOrderBy$outboundSchema = exports.QueryParamOrderBy$inboundSchema = exports.OrderDirection = exports.OrderBy = exports.QueryParamInclude = exports.QueryParamOrderDirection = exports.QueryParamOrderBy = void 0;
const z = __importStar(require("zod"));
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 QueryParamInclude;
(function (QueryParamInclude) {
    QueryParamInclude["StepLogs"] = "step_logs";
})(QueryParamInclude || (exports.QueryParamInclude = QueryParamInclude = {}));
/**
 * 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$inboundSchema = z.nativeEnum(QueryParamOrderBy);
/** @internal */
exports.QueryParamOrderBy$outboundSchema = exports.QueryParamOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var QueryParamOrderBy$;
(function (QueryParamOrderBy$) {
    /** @deprecated use `QueryParamOrderBy$inboundSchema` instead. */
    QueryParamOrderBy$.inboundSchema = exports.QueryParamOrderBy$inboundSchema;
    /** @deprecated use `QueryParamOrderBy$outboundSchema` instead. */
    QueryParamOrderBy$.outboundSchema = exports.QueryParamOrderBy$outboundSchema;
})(QueryParamOrderBy$ || (exports.QueryParamOrderBy$ = QueryParamOrderBy$ = {}));
/** @internal */
exports.QueryParamOrderDirection$inboundSchema = z.nativeEnum(QueryParamOrderDirection);
/** @internal */
exports.QueryParamOrderDirection$outboundSchema = exports.QueryParamOrderDirection$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var QueryParamOrderDirection$;
(function (QueryParamOrderDirection$) {
    /** @deprecated use `QueryParamOrderDirection$inboundSchema` instead. */
    QueryParamOrderDirection$.inboundSchema = exports.QueryParamOrderDirection$inboundSchema;
    /** @deprecated use `QueryParamOrderDirection$outboundSchema` instead. */
    QueryParamOrderDirection$.outboundSchema = exports.QueryParamOrderDirection$outboundSchema;
})(QueryParamOrderDirection$ || (exports.QueryParamOrderDirection$ = QueryParamOrderDirection$ = {}));
/** @internal */
exports.Filter$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()).optional(),
    http_methods: z.nullable(z.string()).optional(),
    order_by: z.nullable(exports.QueryParamOrderBy$inboundSchema).optional(),
    order_direction: z.nullable(exports.QueryParamOrderDirection$inboundSchema)
        .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(),
    source_ids: z.nullable(z.string()).optional(),
    source_types: z.nullable(z.string()).optional(),
    source_values: z.nullable(z.string()).optional(),
    start_date: z.nullable(z.string()).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",
        "order_by": "orderBy",
        "order_direction": "orderDirection",
        "request_ids": "requestIds",
        "source_ids": "sourceIds",
        "source_types": "sourceTypes",
        "source_values": "sourceValues",
        "start_date": "startDate",
        "status_codes": "statusCodes",
        "sub_resources": "subResources",
    });
});
/** @internal */
exports.Filter$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.string()).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.string()).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",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Filter$;
(function (Filter$) {
    /** @deprecated use `Filter$inboundSchema` instead. */
    Filter$.inboundSchema = exports.Filter$inboundSchema;
    /** @deprecated use `Filter$outboundSchema` instead. */
    Filter$.outboundSchema = exports.Filter$outboundSchema;
})(Filter$ || (exports.Filter$ = Filter$ = {}));
function filterToJSON(filter) {
    return JSON.stringify(exports.Filter$outboundSchema.parse(filter));
}
exports.filterToJSON = filterToJSON;
function filterFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.Filter$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Filter' from JSON`);
}
exports.filterFromJSON = filterFromJSON;
/** @internal */
exports.QueryParamInclude$inboundSchema = z.nativeEnum(QueryParamInclude);
/** @internal */
exports.QueryParamInclude$outboundSchema = exports.QueryParamInclude$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var QueryParamInclude$;
(function (QueryParamInclude$) {
    /** @deprecated use `QueryParamInclude$inboundSchema` instead. */
    QueryParamInclude$.inboundSchema = exports.QueryParamInclude$inboundSchema;
    /** @deprecated use `QueryParamInclude$outboundSchema` instead. */
    QueryParamInclude$.outboundSchema = exports.QueryParamInclude$outboundSchema;
})(QueryParamInclude$ || (exports.QueryParamInclude$ = QueryParamInclude$ = {}));
/** @internal */
exports.OrderBy$inboundSchema = z
    .nativeEnum(OrderBy);
/** @internal */
exports.OrderBy$outboundSchema = exports.OrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var OrderBy$;
(function (OrderBy$) {
    /** @deprecated use `OrderBy$inboundSchema` instead. */
    OrderBy$.inboundSchema = exports.OrderBy$inboundSchema;
    /** @deprecated use `OrderBy$outboundSchema` instead. */
    OrderBy$.outboundSchema = exports.OrderBy$outboundSchema;
})(OrderBy$ || (exports.OrderBy$ = OrderBy$ = {}));
/** @internal */
exports.OrderDirection$inboundSchema = z.nativeEnum(OrderDirection);
/** @internal */
exports.OrderDirection$outboundSchema = exports.OrderDirection$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var OrderDirection$;
(function (OrderDirection$) {
    /** @deprecated use `OrderDirection$inboundSchema` instead. */
    OrderDirection$.inboundSchema = exports.OrderDirection$inboundSchema;
    /** @deprecated use `OrderDirection$outboundSchema` instead. */
    OrderDirection$.outboundSchema = exports.OrderDirection$outboundSchema;
})(OrderDirection$ || (exports.OrderDirection$ = OrderDirection$ = {}));
/** @internal */
exports.StackoneListLogsRequest$inboundSchema = z.object({
    filter: z.nullable(z.lazy(() => exports.Filter$inboundSchema)).optional(),
    include: z.nullable(exports.QueryParamInclude$inboundSchema).optional(),
    next: z.nullable(z.string()).optional(),
    order_by: z.nullable(exports.OrderBy$inboundSchema).optional(),
    order_direction: z.nullable(exports.OrderDirection$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.StackoneListLogsRequest$outboundSchema = z.object({
    filter: z.nullable(z.lazy(() => exports.Filter$outboundSchema)).optional(),
    include: z.nullable(exports.QueryParamInclude$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",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var StackoneListLogsRequest$;
(function (StackoneListLogsRequest$) {
    /** @deprecated use `StackoneListLogsRequest$inboundSchema` instead. */
    StackoneListLogsRequest$.inboundSchema = exports.StackoneListLogsRequest$inboundSchema;
    /** @deprecated use `StackoneListLogsRequest$outboundSchema` instead. */
    StackoneListLogsRequest$.outboundSchema = exports.StackoneListLogsRequest$outboundSchema;
})(StackoneListLogsRequest$ || (exports.StackoneListLogsRequest$ = StackoneListLogsRequest$ = {}));
function stackoneListLogsRequestToJSON(stackoneListLogsRequest) {
    return JSON.stringify(exports.StackoneListLogsRequest$outboundSchema.parse(stackoneListLogsRequest));
}
exports.stackoneListLogsRequestToJSON = stackoneListLogsRequestToJSON;
function stackoneListLogsRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.StackoneListLogsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StackoneListLogsRequest' from JSON`);
}
exports.stackoneListLogsRequestFromJSON = stackoneListLogsRequestFromJSON;
/** @internal */
exports.StackoneListLogsResponse$inboundSchema = z.object({
    ContentType: z.string(),
    Headers: z.record(z.array(z.string())),
    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",
    });
});
/** @internal */
exports.StackoneListLogsResponse$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");
    }),
    unifiedLogsPaginated: shared.UnifiedLogsPaginated$outboundSchema.optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        contentType: "ContentType",
        headers: "Headers",
        statusCode: "StatusCode",
        rawResponse: "RawResponse",
        unifiedLogsPaginated: "UnifiedLogsPaginated",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var StackoneListLogsResponse$;
(function (StackoneListLogsResponse$) {
    /** @deprecated use `StackoneListLogsResponse$inboundSchema` instead. */
    StackoneListLogsResponse$.inboundSchema = exports.StackoneListLogsResponse$inboundSchema;
    /** @deprecated use `StackoneListLogsResponse$outboundSchema` instead. */
    StackoneListLogsResponse$.outboundSchema = exports.StackoneListLogsResponse$outboundSchema;
})(StackoneListLogsResponse$ || (exports.StackoneListLogsResponse$ = StackoneListLogsResponse$ = {}));
function stackoneListLogsResponseToJSON(stackoneListLogsResponse) {
    return JSON.stringify(exports.StackoneListLogsResponse$outboundSchema.parse(stackoneListLogsResponse));
}
exports.stackoneListLogsResponseToJSON = stackoneListLogsResponseToJSON;
function stackoneListLogsResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.StackoneListLogsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StackoneListLogsResponse' from JSON`);
}
exports.stackoneListLogsResponseFromJSON = stackoneListLogsResponseFromJSON;
//# sourceMappingURL=stackonelistlogs.js.map