/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
import { TimeUnit$inboundSchema, TimeUnit$outboundSchema, } from "./timeunit.js";
export const FeedbackTimeBasedGroupBySelectionType = {
    Time: "time",
};
export const FeedbackTimeBasedGroupBySelectionField = {
    Id: "id",
    Type: "type",
    MessageId: "messageId",
    CreatedAt: "createdAt",
    OrganizationId: "organizationId",
    Reasons: "reasons",
    Properties: "properties",
    UserProperties: "userProperties",
    ConversationId: "conversationId",
    ProjectId: "projectId",
    IntegrationId: "integrationId",
};
/** @internal */
export const FeedbackTimeBasedGroupBySelectionType$inboundSchema = z.nativeEnum(FeedbackTimeBasedGroupBySelectionType);
/** @internal */
export const FeedbackTimeBasedGroupBySelectionType$outboundSchema = FeedbackTimeBasedGroupBySelectionType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var FeedbackTimeBasedGroupBySelectionType$;
(function (FeedbackTimeBasedGroupBySelectionType$) {
    /** @deprecated use `FeedbackTimeBasedGroupBySelectionType$inboundSchema` instead. */
    FeedbackTimeBasedGroupBySelectionType$.inboundSchema = FeedbackTimeBasedGroupBySelectionType$inboundSchema;
    /** @deprecated use `FeedbackTimeBasedGroupBySelectionType$outboundSchema` instead. */
    FeedbackTimeBasedGroupBySelectionType$.outboundSchema = FeedbackTimeBasedGroupBySelectionType$outboundSchema;
})(FeedbackTimeBasedGroupBySelectionType$ || (FeedbackTimeBasedGroupBySelectionType$ = {}));
/** @internal */
export const FeedbackTimeBasedGroupBySelectionField$inboundSchema = z.nativeEnum(FeedbackTimeBasedGroupBySelectionField);
/** @internal */
export const FeedbackTimeBasedGroupBySelectionField$outboundSchema = FeedbackTimeBasedGroupBySelectionField$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var FeedbackTimeBasedGroupBySelectionField$;
(function (FeedbackTimeBasedGroupBySelectionField$) {
    /** @deprecated use `FeedbackTimeBasedGroupBySelectionField$inboundSchema` instead. */
    FeedbackTimeBasedGroupBySelectionField$.inboundSchema = FeedbackTimeBasedGroupBySelectionField$inboundSchema;
    /** @deprecated use `FeedbackTimeBasedGroupBySelectionField$outboundSchema` instead. */
    FeedbackTimeBasedGroupBySelectionField$.outboundSchema = FeedbackTimeBasedGroupBySelectionField$outboundSchema;
})(FeedbackTimeBasedGroupBySelectionField$ || (FeedbackTimeBasedGroupBySelectionField$ = {}));
/** @internal */
export const FeedbackTimeBasedGroupBySelection$inboundSchema = z.object({
    type: FeedbackTimeBasedGroupBySelectionType$inboundSchema,
    timeUnit: TimeUnit$inboundSchema,
    field: FeedbackTimeBasedGroupBySelectionField$inboundSchema.optional(),
});
/** @internal */
export const FeedbackTimeBasedGroupBySelection$outboundSchema = z.object({
    type: FeedbackTimeBasedGroupBySelectionType$outboundSchema,
    timeUnit: TimeUnit$outboundSchema,
    field: FeedbackTimeBasedGroupBySelectionField$outboundSchema.optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var FeedbackTimeBasedGroupBySelection$;
(function (FeedbackTimeBasedGroupBySelection$) {
    /** @deprecated use `FeedbackTimeBasedGroupBySelection$inboundSchema` instead. */
    FeedbackTimeBasedGroupBySelection$.inboundSchema = FeedbackTimeBasedGroupBySelection$inboundSchema;
    /** @deprecated use `FeedbackTimeBasedGroupBySelection$outboundSchema` instead. */
    FeedbackTimeBasedGroupBySelection$.outboundSchema = FeedbackTimeBasedGroupBySelection$outboundSchema;
})(FeedbackTimeBasedGroupBySelection$ || (FeedbackTimeBasedGroupBySelection$ = {}));
export function feedbackTimeBasedGroupBySelectionToJSON(feedbackTimeBasedGroupBySelection) {
    return JSON.stringify(FeedbackTimeBasedGroupBySelection$outboundSchema.parse(feedbackTimeBasedGroupBySelection));
}
export function feedbackTimeBasedGroupBySelectionFromJSON(jsonString) {
    return safeParse(jsonString, (x) => FeedbackTimeBasedGroupBySelection$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FeedbackTimeBasedGroupBySelection' from JSON`);
}
//# sourceMappingURL=feedbacktimebasedgroupbyselection.js.map