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

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

export type UpdatePlaylistRequest = {
  /**
   * the ID of the playlist
   */
  playlistID: number;
  /**
   * name of the playlist
   */
  title?: string | undefined;
  /**
   * summary description of the playlist
   */
  summary?: string | undefined;
};

export type UpdatePlaylistResponse = {
  /**
   * HTTP response content type for this operation
   */
  contentType: string;
  /**
   * HTTP response status code for this operation
   */
  statusCode: number;
  /**
   * Raw HTTP response; suitable for custom response parsing
   */
  rawResponse: Response;
};

/** @internal */
export const UpdatePlaylistRequest$inboundSchema: z.ZodType<
  UpdatePlaylistRequest,
  z.ZodTypeDef,
  unknown
> = z.object({
  playlistID: z.number(),
  title: z.string().optional(),
  summary: z.string().optional(),
});

/** @internal */
export type UpdatePlaylistRequest$Outbound = {
  playlistID: number;
  title?: string | undefined;
  summary?: string | undefined;
};

/** @internal */
export const UpdatePlaylistRequest$outboundSchema: z.ZodType<
  UpdatePlaylistRequest$Outbound,
  z.ZodTypeDef,
  UpdatePlaylistRequest
> = z.object({
  playlistID: z.number(),
  title: z.string().optional(),
  summary: z.string().optional(),
});

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

/** @internal */
export const UpdatePlaylistResponse$inboundSchema: z.ZodType<
  UpdatePlaylistResponse,
  z.ZodTypeDef,
  unknown
> = z.object({
  ContentType: z.string(),
  StatusCode: z.number().int(),
  RawResponse: z.instanceof(Response),
}).transform((v) => {
  return remap$(v, {
    "ContentType": "contentType",
    "StatusCode": "statusCode",
    "RawResponse": "rawResponse",
  });
});

/** @internal */
export type UpdatePlaylistResponse$Outbound = {
  ContentType: string;
  StatusCode: number;
  RawResponse: never;
};

/** @internal */
export const UpdatePlaylistResponse$outboundSchema: z.ZodType<
  UpdatePlaylistResponse$Outbound,
  z.ZodTypeDef,
  UpdatePlaylistResponse
> = z.object({
  contentType: z.string(),
  statusCode: z.number().int(),
  rawResponse: z.instanceof(Response).transform(() => {
    throw new Error("Response cannot be serialized");
  }),
}).transform((v) => {
  return remap$(v, {
    contentType: "ContentType",
    statusCode: "StatusCode",
    rawResponse: "RawResponse",
  });
});

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