/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod/v3";
import { safeParse } from "../../lib/schemas.js";
import { TimeUnit$inboundSchema, TimeUnit$outboundSchema, } from "./timeunit.js";
export const FeedbackTimeBasedGroupBySelectionField = {
    Id: "id",
    Type: "type",
    MessageId: "messageId",
    CreatedAt: "createdAt",
    UpdatedAt: "updatedAt",
    OrganizationId: "organizationId",
    Reasons: "reasons",
    Sources: "sources",
    Details: "details",
    Properties: "properties",
    UserProperties: "userProperties",
    ConversationId: "conversationId",
    ProjectId: "projectId",
    IntegrationId: "integrationId",
};
/** @internal */
export const FeedbackTimeBasedGroupBySelectionField$inboundSchema = z.nativeEnum(FeedbackTimeBasedGroupBySelectionField);
/** @internal */
export const FeedbackTimeBasedGroupBySelectionField$outboundSchema = FeedbackTimeBasedGroupBySelectionField$inboundSchema;
/** @internal */
export const FeedbackTimeBasedGroupBySelection$inboundSchema = z.object({
    type: z.literal("time"),
    timeUnit: TimeUnit$inboundSchema,
    field: FeedbackTimeBasedGroupBySelectionField$inboundSchema.optional(),
});
/** @internal */
export const FeedbackTimeBasedGroupBySelection$outboundSchema = z.object({
    type: z.literal("time"),
    timeUnit: TimeUnit$outboundSchema,
    field: FeedbackTimeBasedGroupBySelectionField$outboundSchema.optional(),
});
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