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

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

export type ConnectorUpdateV1Request = {
  connectorId: string;
  updateConnectorRequest: components.UpdateConnectorRequest;
};

/** @internal */
export type ConnectorUpdateV1Request$Outbound = {
  connector_id: string;
  UpdateConnectorRequest: components.UpdateConnectorRequest$Outbound;
};

/** @internal */
export const ConnectorUpdateV1Request$outboundSchema: z.ZodType<
  ConnectorUpdateV1Request$Outbound,
  ConnectorUpdateV1Request
> = z.object({
  connectorId: z.string(),
  updateConnectorRequest: components.UpdateConnectorRequest$outboundSchema,
}).transform((v) => {
  return remap$(v, {
    connectorId: "connector_id",
    updateConnectorRequest: "UpdateConnectorRequest",
  });
});

export function connectorUpdateV1RequestToJSON(
  connectorUpdateV1Request: ConnectorUpdateV1Request,
): string {
  return JSON.stringify(
    ConnectorUpdateV1Request$outboundSchema.parse(connectorUpdateV1Request),
  );
}
