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

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

export type DeleteV2ListsListEntriesEntryIdRequest = {
  list: string;
  entryId: string;
};

/**
 * Success
 */
export type DeleteV2ListsListEntriesEntryIdResponse = {};

/** @internal */
export const DeleteV2ListsListEntriesEntryIdRequest$inboundSchema: z.ZodType<
  DeleteV2ListsListEntriesEntryIdRequest,
  z.ZodTypeDef,
  unknown
> = z.object({
  list: z.string(),
  entry_id: z.string(),
}).transform((v) => {
  return remap$(v, {
    "entry_id": "entryId",
  });
});

/** @internal */
export type DeleteV2ListsListEntriesEntryIdRequest$Outbound = {
  list: string;
  entry_id: string;
};

/** @internal */
export const DeleteV2ListsListEntriesEntryIdRequest$outboundSchema: z.ZodType<
  DeleteV2ListsListEntriesEntryIdRequest$Outbound,
  z.ZodTypeDef,
  DeleteV2ListsListEntriesEntryIdRequest
> = z.object({
  list: z.string(),
  entryId: z.string(),
}).transform((v) => {
  return remap$(v, {
    entryId: "entry_id",
  });
});

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace DeleteV2ListsListEntriesEntryIdRequest$ {
  /** @deprecated use `DeleteV2ListsListEntriesEntryIdRequest$inboundSchema` instead. */
  export const inboundSchema =
    DeleteV2ListsListEntriesEntryIdRequest$inboundSchema;
  /** @deprecated use `DeleteV2ListsListEntriesEntryIdRequest$outboundSchema` instead. */
  export const outboundSchema =
    DeleteV2ListsListEntriesEntryIdRequest$outboundSchema;
  /** @deprecated use `DeleteV2ListsListEntriesEntryIdRequest$Outbound` instead. */
  export type Outbound = DeleteV2ListsListEntriesEntryIdRequest$Outbound;
}

export function deleteV2ListsListEntriesEntryIdRequestToJSON(
  deleteV2ListsListEntriesEntryIdRequest:
    DeleteV2ListsListEntriesEntryIdRequest,
): string {
  return JSON.stringify(
    DeleteV2ListsListEntriesEntryIdRequest$outboundSchema.parse(
      deleteV2ListsListEntriesEntryIdRequest,
    ),
  );
}

export function deleteV2ListsListEntriesEntryIdRequestFromJSON(
  jsonString: string,
): SafeParseResult<DeleteV2ListsListEntriesEntryIdRequest, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      DeleteV2ListsListEntriesEntryIdRequest$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'DeleteV2ListsListEntriesEntryIdRequest' from JSON`,
  );
}

/** @internal */
export const DeleteV2ListsListEntriesEntryIdResponse$inboundSchema: z.ZodType<
  DeleteV2ListsListEntriesEntryIdResponse,
  z.ZodTypeDef,
  unknown
> = z.object({});

/** @internal */
export type DeleteV2ListsListEntriesEntryIdResponse$Outbound = {};

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

/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export namespace DeleteV2ListsListEntriesEntryIdResponse$ {
  /** @deprecated use `DeleteV2ListsListEntriesEntryIdResponse$inboundSchema` instead. */
  export const inboundSchema =
    DeleteV2ListsListEntriesEntryIdResponse$inboundSchema;
  /** @deprecated use `DeleteV2ListsListEntriesEntryIdResponse$outboundSchema` instead. */
  export const outboundSchema =
    DeleteV2ListsListEntriesEntryIdResponse$outboundSchema;
  /** @deprecated use `DeleteV2ListsListEntriesEntryIdResponse$Outbound` instead. */
  export type Outbound = DeleteV2ListsListEntriesEntryIdResponse$Outbound;
}

export function deleteV2ListsListEntriesEntryIdResponseToJSON(
  deleteV2ListsListEntriesEntryIdResponse:
    DeleteV2ListsListEntriesEntryIdResponse,
): string {
  return JSON.stringify(
    DeleteV2ListsListEntriesEntryIdResponse$outboundSchema.parse(
      deleteV2ListsListEntriesEntryIdResponse,
    ),
  );
}

export function deleteV2ListsListEntriesEntryIdResponseFromJSON(
  jsonString: string,
): SafeParseResult<
  DeleteV2ListsListEntriesEntryIdResponse,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      DeleteV2ListsListEntriesEntryIdResponse$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'DeleteV2ListsListEntriesEntryIdResponse' from JSON`,
  );
}
