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

import * as z from "zod/v3";
import { safeParse } from "../../lib/schemas.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";

export type DeleteAIConfigRequest = {
  /**
   * The project key
   */
  projectKey: string;
  /**
   * The AI Config key
   */
  configKey: string;
};

/** @internal */
export const DeleteAIConfigRequest$inboundSchema: z.ZodType<
  DeleteAIConfigRequest,
  z.ZodTypeDef,
  unknown
> = z.object({
  projectKey: z.string(),
  configKey: z.string(),
});
/** @internal */
export type DeleteAIConfigRequest$Outbound = {
  projectKey: string;
  configKey: string;
};

/** @internal */
export const DeleteAIConfigRequest$outboundSchema: z.ZodType<
  DeleteAIConfigRequest$Outbound,
  z.ZodTypeDef,
  DeleteAIConfigRequest
> = z.object({
  projectKey: z.string(),
  configKey: z.string(),
});

export function deleteAIConfigRequestToJSON(
  deleteAIConfigRequest: DeleteAIConfigRequest,
): string {
  return JSON.stringify(
    DeleteAIConfigRequest$outboundSchema.parse(deleteAIConfigRequest),
  );
}
export function deleteAIConfigRequestFromJSON(
  jsonString: string,
): SafeParseResult<DeleteAIConfigRequest, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => DeleteAIConfigRequest$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'DeleteAIConfigRequest' from JSON`,
  );
}
