/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { S3JobConfig, S3JobConfig$inboundSchema } from "./s3-job-config.js"; import { ScheduledTaskEntityType, ScheduledTaskEntityType$inboundSchema, } from "./scheduled-task-entity-type.js"; import { ScheduledTaskInterval, ScheduledTaskInterval$inboundSchema, } from "./scheduled-task-interval.js"; import { SDKValidationError } from "./sdk-validation-error.js"; export type ScheduledTaskResponse = { connectionId?: string | undefined; createdAt?: Date | undefined; enabled?: boolean | undefined; entityType?: ScheduledTaskEntityType | undefined; environmentId?: string | undefined; id?: string | undefined; interval?: ScheduledTaskInterval | undefined; jobConfig?: S3JobConfig | undefined; status?: string | undefined; tenantId?: string | undefined; updatedAt?: Date | undefined; }; /** @internal */ export const ScheduledTaskResponse$inboundSchema: z.ZodMiniType< ScheduledTaskResponse, unknown > = z.pipe( z.object({ connection_id: types.optional(types.string()), created_at: types.optional(types.date()), enabled: types.optional(types.boolean()), entity_type: types.optional(ScheduledTaskEntityType$inboundSchema), environment_id: types.optional(types.string()), id: types.optional(types.string()), interval: types.optional(ScheduledTaskInterval$inboundSchema), job_config: types.optional(S3JobConfig$inboundSchema), status: types.optional(types.string()), tenant_id: types.optional(types.string()), updated_at: types.optional(types.date()), }), z.transform((v) => { return remap$(v, { "connection_id": "connectionId", "created_at": "createdAt", "entity_type": "entityType", "environment_id": "environmentId", "job_config": "jobConfig", "tenant_id": "tenantId", "updated_at": "updatedAt", }); }), ); export function scheduledTaskResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ScheduledTaskResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ScheduledTaskResponse' from JSON`, ); }