/* * 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 * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type UpdateVectorStoreFileAttributesRequest = { vectorStoreId: string; fileId: string; /** * Optional external end-user identifier forwarded by the API gateway. */ xOnBehalfOf?: string | undefined; updateVectorStoreFileAttributesRequest: components.UpdateVectorStoreFileAttributesRequest; }; /** @internal */ export const UpdateVectorStoreFileAttributesRequest$inboundSchema: z.ZodType< UpdateVectorStoreFileAttributesRequest, z.ZodTypeDef, unknown > = z.object({ vector_store_id: z.string(), file_id: z.string(), "X-On-Behalf-Of": z.string().optional(), UpdateVectorStoreFileAttributesRequest: components.UpdateVectorStoreFileAttributesRequest$inboundSchema, }).transform((v) => { return remap$(v, { "vector_store_id": "vectorStoreId", "file_id": "fileId", "X-On-Behalf-Of": "xOnBehalfOf", "UpdateVectorStoreFileAttributesRequest": "updateVectorStoreFileAttributesRequest", }); }); /** @internal */ export type UpdateVectorStoreFileAttributesRequest$Outbound = { vector_store_id: string; file_id: string; "X-On-Behalf-Of"?: string | undefined; UpdateVectorStoreFileAttributesRequest: components.UpdateVectorStoreFileAttributesRequest$Outbound; }; /** @internal */ export const UpdateVectorStoreFileAttributesRequest$outboundSchema: z.ZodType< UpdateVectorStoreFileAttributesRequest$Outbound, z.ZodTypeDef, UpdateVectorStoreFileAttributesRequest > = z.object({ vectorStoreId: z.string(), fileId: z.string(), xOnBehalfOf: z.string().optional(), updateVectorStoreFileAttributesRequest: components.UpdateVectorStoreFileAttributesRequest$outboundSchema, }).transform((v) => { return remap$(v, { vectorStoreId: "vector_store_id", fileId: "file_id", xOnBehalfOf: "X-On-Behalf-Of", updateVectorStoreFileAttributesRequest: "UpdateVectorStoreFileAttributesRequest", }); }); export function updateVectorStoreFileAttributesRequestToJSON( updateVectorStoreFileAttributesRequest: UpdateVectorStoreFileAttributesRequest, ): string { return JSON.stringify( UpdateVectorStoreFileAttributesRequest$outboundSchema.parse( updateVectorStoreFileAttributesRequest, ), ); } export function updateVectorStoreFileAttributesRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => UpdateVectorStoreFileAttributesRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateVectorStoreFileAttributesRequest' from JSON`, ); }