/*
 * 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 DeleteV2NotesNoteIdRequest = {
  noteId: string;
};

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

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

/** @internal */
export type DeleteV2NotesNoteIdRequest$Outbound = {
  note_id: string;
};

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

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

export function deleteV2NotesNoteIdRequestToJSON(
  deleteV2NotesNoteIdRequest: DeleteV2NotesNoteIdRequest,
): string {
  return JSON.stringify(
    DeleteV2NotesNoteIdRequest$outboundSchema.parse(deleteV2NotesNoteIdRequest),
  );
}

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

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

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

/** @internal */
export const DeleteV2NotesNoteIdResponse$outboundSchema: z.ZodType<
  DeleteV2NotesNoteIdResponse$Outbound,
  z.ZodTypeDef,
  DeleteV2NotesNoteIdResponse
> = 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 DeleteV2NotesNoteIdResponse$ {
  /** @deprecated use `DeleteV2NotesNoteIdResponse$inboundSchema` instead. */
  export const inboundSchema = DeleteV2NotesNoteIdResponse$inboundSchema;
  /** @deprecated use `DeleteV2NotesNoteIdResponse$outboundSchema` instead. */
  export const outboundSchema = DeleteV2NotesNoteIdResponse$outboundSchema;
  /** @deprecated use `DeleteV2NotesNoteIdResponse$Outbound` instead. */
  export type Outbound = DeleteV2NotesNoteIdResponse$Outbound;
}

export function deleteV2NotesNoteIdResponseToJSON(
  deleteV2NotesNoteIdResponse: DeleteV2NotesNoteIdResponse,
): string {
  return JSON.stringify(
    DeleteV2NotesNoteIdResponse$outboundSchema.parse(
      deleteV2NotesNoteIdResponse,
    ),
  );
}

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