/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { LocationServicesLocationManagementUpdateListOrPoExternalResponseDay, LocationServicesLocationManagementUpdateListOrPoExternalResponseDay$inboundSchema, } from "./locationserviceslocationmanagementupdatelistorpoexternalresponseday.js"; export type LocationServicesLocationManagementUpdateListOrPoExternalResponseOpeningHours = { monday?: | LocationServicesLocationManagementUpdateListOrPoExternalResponseDay | undefined; tuesday?: | LocationServicesLocationManagementUpdateListOrPoExternalResponseDay | undefined; wednesday?: | LocationServicesLocationManagementUpdateListOrPoExternalResponseDay | undefined; thursday?: | LocationServicesLocationManagementUpdateListOrPoExternalResponseDay | undefined; friday?: | LocationServicesLocationManagementUpdateListOrPoExternalResponseDay | undefined; saturday?: | LocationServicesLocationManagementUpdateListOrPoExternalResponseDay | undefined; sunday?: | LocationServicesLocationManagementUpdateListOrPoExternalResponseDay | undefined; }; /** @internal */ export const LocationServicesLocationManagementUpdateListOrPoExternalResponseOpeningHours$inboundSchema: z.ZodType< LocationServicesLocationManagementUpdateListOrPoExternalResponseOpeningHours, z.ZodTypeDef, unknown > = z.object({ Monday: LocationServicesLocationManagementUpdateListOrPoExternalResponseDay$inboundSchema .optional(), Tuesday: LocationServicesLocationManagementUpdateListOrPoExternalResponseDay$inboundSchema .optional(), Wednesday: LocationServicesLocationManagementUpdateListOrPoExternalResponseDay$inboundSchema .optional(), Thursday: LocationServicesLocationManagementUpdateListOrPoExternalResponseDay$inboundSchema .optional(), Friday: LocationServicesLocationManagementUpdateListOrPoExternalResponseDay$inboundSchema .optional(), Saturday: LocationServicesLocationManagementUpdateListOrPoExternalResponseDay$inboundSchema .optional(), Sunday: LocationServicesLocationManagementUpdateListOrPoExternalResponseDay$inboundSchema .optional(), }).transform((v) => { return remap$(v, { "Monday": "monday", "Tuesday": "tuesday", "Wednesday": "wednesday", "Thursday": "thursday", "Friday": "friday", "Saturday": "saturday", "Sunday": "sunday", }); }); export function locationServicesLocationManagementUpdateListOrPoExternalResponseOpeningHoursFromJSON( jsonString: string, ): SafeParseResult< LocationServicesLocationManagementUpdateListOrPoExternalResponseOpeningHours, SDKValidationError > { return safeParse( jsonString, (x) => LocationServicesLocationManagementUpdateListOrPoExternalResponseOpeningHours$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'LocationServicesLocationManagementUpdateListOrPoExternalResponseOpeningHours' from JSON`, ); }