/*
 * 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 customer data associated with the connector (e.g. customer secrets / config).
   */
  fetchCustomerData?: boolean | undefined;
  /**
   * Fetch the general connection secrets associated with the connector.
   */
  fetchConnectionSecrets?: boolean | undefined;
  connectorIdOrName: string;
};

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

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

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