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

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

export type ConnectorGetV1Request = {
  /**
   * Fetch the user-level data associated with the connector (e.g. connection credentials).
   */
  fetchUserData?: boolean | undefined;
  /**
   * Fetch the customer data associated with the connector (e.g. customer secrets / config).
   */
  fetchCustomerData?: boolean | undefined;
  connectorIdOrName: string;
};

/** @internal */
export type ConnectorGetV1Request$Outbound = {
  fetch_user_data: boolean;
  fetch_customer_data: boolean;
  connector_id_or_name: string;
};

/** @internal */
export const ConnectorGetV1Request$outboundSchema: z.ZodType<
  ConnectorGetV1Request$Outbound,
  ConnectorGetV1Request
> = z.object({
  fetchUserData: z.boolean().default(false),
  fetchCustomerData: z.boolean().default(false),
  connectorIdOrName: z.string(),
}).transform((v) => {
  return remap$(v, {
    fetchUserData: "fetch_user_data",
    fetchCustomerData: "fetch_customer_data",
    connectorIdOrName: "connector_id_or_name",
  });
});

export function connectorGetV1RequestToJSON(
  connectorGetV1Request: ConnectorGetV1Request,
): string {
  return JSON.stringify(
    ConnectorGetV1Request$outboundSchema.parse(connectorGetV1Request),
  );
}
