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

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

export type GetWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIdGetRequest =
  {
    workflowRegistrationId: string;
    /**
     * Whether to include the workflow definition
     */
    withWorkflow?: boolean | undefined;
    /**
     * Whether to include shared workflow versions
     */
    includeShared?: boolean | undefined;
  };

/** @internal */
export type GetWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIdGetRequest$Outbound =
  {
    workflow_registration_id: string;
    with_workflow: boolean;
    include_shared: boolean;
  };

/** @internal */
export const GetWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIdGetRequest$outboundSchema:
  z.ZodType<
    GetWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIdGetRequest$Outbound,
    GetWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIdGetRequest
  > = z.object({
    workflowRegistrationId: z.string(),
    withWorkflow: z.boolean().default(false),
    includeShared: z.boolean().default(true),
  }).transform((v) => {
    return remap$(v, {
      workflowRegistrationId: "workflow_registration_id",
      withWorkflow: "with_workflow",
      includeShared: "include_shared",
    });
  });

export function getWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIdGetRequestToJSON(
  getWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIdGetRequest:
    GetWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIdGetRequest,
): string {
  return JSON.stringify(
    GetWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIdGetRequest$outboundSchema
      .parse(
        getWorkflowRegistrationV1WorkflowsRegistrationsWorkflowRegistrationIdGetRequest,
      ),
  );
}
