/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 9559cb4341b8
 */

import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import * as components from "../components/index.js";

export type LibrariesPatchV1Request = {
  libraryId: string;
  updateLibraryRequest: components.UpdateLibraryRequest;
};

/** @internal */
export type LibrariesPatchV1Request$Outbound = {
  library_id: string;
  UpdateLibraryRequest: components.UpdateLibraryRequest$Outbound;
};

/** @internal */
export const LibrariesPatchV1Request$outboundSchema: z.ZodType<
  LibrariesPatchV1Request$Outbound,
  LibrariesPatchV1Request
> = z.object({
  libraryId: z.string(),
  updateLibraryRequest: components.UpdateLibraryRequest$outboundSchema,
}).transform((v) => {
  return remap$(v, {
    libraryId: "library_id",
    updateLibraryRequest: "UpdateLibraryRequest",
  });
});

export function librariesPatchV1RequestToJSON(
  librariesPatchV1Request: LibrariesPatchV1Request,
): string {
  return JSON.stringify(
    LibrariesPatchV1Request$outboundSchema.parse(librariesPatchV1Request),
  );
}
