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

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

export type ConnectorActivateForUserV1Request = {
  connectorId: string;
  toolExecutionConfiguration?:
    | components.ToolExecutionConfiguration
    | null
    | undefined;
};

/** @internal */
export type ConnectorActivateForUserV1Request$Outbound = {
  connector_id: string;
  ToolExecutionConfiguration?:
    | components.ToolExecutionConfiguration$Outbound
    | null
    | undefined;
};

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

export function connectorActivateForUserV1RequestToJSON(
  connectorActivateForUserV1Request: ConnectorActivateForUserV1Request,
): string {
  return JSON.stringify(
    ConnectorActivateForUserV1Request$outboundSchema.parse(
      connectorActivateForUserV1Request,
    ),
  );
}
