/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import { RFCDate } from "../../types/rfcdate.js";
/** @internal */
export const GetUsageGlobals$inboundSchema = z.object({
    cloud_name: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        "cloud_name": "cloudName",
    });
});
/** @internal */
export const GetUsageGlobals$outboundSchema = z.object({
    cloudName: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        cloudName: "cloud_name",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetUsageGlobals$;
(function (GetUsageGlobals$) {
    /** @deprecated use `GetUsageGlobals$inboundSchema` instead. */
    GetUsageGlobals$.inboundSchema = GetUsageGlobals$inboundSchema;
    /** @deprecated use `GetUsageGlobals$outboundSchema` instead. */
    GetUsageGlobals$.outboundSchema = GetUsageGlobals$outboundSchema;
})(GetUsageGlobals$ || (GetUsageGlobals$ = {}));
export function getUsageGlobalsToJSON(getUsageGlobals) {
    return JSON.stringify(GetUsageGlobals$outboundSchema.parse(getUsageGlobals));
}
export function getUsageGlobalsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetUsageGlobals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetUsageGlobals' from JSON`);
}
/** @internal */
export const GetUsageRequest$inboundSchema = z.object({
    date: z.string().transform(v => new RFCDate(v)).optional(),
});
/** @internal */
export const GetUsageRequest$outboundSchema = z.object({
    date: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetUsageRequest$;
(function (GetUsageRequest$) {
    /** @deprecated use `GetUsageRequest$inboundSchema` instead. */
    GetUsageRequest$.inboundSchema = GetUsageRequest$inboundSchema;
    /** @deprecated use `GetUsageRequest$outboundSchema` instead. */
    GetUsageRequest$.outboundSchema = GetUsageRequest$outboundSchema;
})(GetUsageRequest$ || (GetUsageRequest$ = {}));
export function getUsageRequestToJSON(getUsageRequest) {
    return JSON.stringify(GetUsageRequest$outboundSchema.parse(getUsageRequest));
}
export function getUsageRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetUsageRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetUsageRequest' from JSON`);
}
//# sourceMappingURL=getusage.js.map