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

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

export const PostUsersSignInDataServerList = [
  "https://plex.tv/api/v2",
] as const;

export type PostUsersSignInDataGlobals = {
  /**
   * An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
   */
  clientID?: string | undefined;
  /**
   * The name of the client application. (Plex Web, Plex Media Server, etc.)
   */
  clientName?: string | undefined;
  /**
   * A relatively friendly name for the client device
   */
  deviceNickname?: string | undefined;
  /**
   * The version of the client application.
   */
  clientVersion?: string | undefined;
  /**
   * The platform of the client application.
   */
  platform?: string | undefined;
};

/**
 * Login credentials
 */
export type PostUsersSignInDataRequestBody = {
  login: string;
  password: string;
  rememberMe?: boolean | undefined;
  verificationCode?: string | undefined;
};

export type PostUsersSignInDataRequest = {
  /**
   * An opaque identifier unique to the client (UUID, serial number, or other unique device ID)
   */
  clientID?: string | undefined;
  /**
   * The name of the client application. (Plex Web, Plex Media Server, etc.)
   */
  clientName?: string | undefined;
  /**
   * A relatively friendly name for the client device
   */
  deviceNickname?: string | undefined;
  /**
   * The version of the client application.
   */
  clientVersion?: string | undefined;
  /**
   * The platform of the client application.
   */
  platform?: string | undefined;
  /**
   * Login credentials
   */
  requestBody?: PostUsersSignInDataRequestBody | undefined;
};

/**
 * Your current mailing list status (active or unsubscribed)
 */
export enum PostUsersSignInDataMailingListStatus {
  Active = "active",
  Unsubscribed = "unsubscribed",
}

/**
 * The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled)
 */
export enum PostUsersSignInDataAutoSelectSubtitle {
  Disable = 0,
  Enable = 1,
}

/**
 * The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only show non-SDH subtitles)
 */
export enum PostUsersSignInDataDefaultSubtitleAccessibility {
  Disable = 0,
  Enable = 1,
}

/**
 * The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles)
 */
export enum PostUsersSignInDataDefaultSubtitleForced {
  Disable = 0,
  Enable = 1,
}

/**
 * Whether or not media watched indicators are enabled (little orange dot on media)
 */
export enum PostUsersSignInDataWatchedIndicator {
  Disable = 0,
  Enable = 1,
}

/**
 * Whether or not the account has media reviews visibility enabled
 */
export enum PostUsersSignInDataMediaReviewsVisibility {
  Disable = 0,
  Enable = 1,
}

export type PostUsersSignInDataUserProfile = {
  /**
   * If the account has automatically select audio and subtitle tracks enabled
   */
  autoSelectAudio?: boolean | undefined;
  /**
   * The preferred audio language for the account
   */
  defaultAudioLanguage: string | null;
  /**
   * The preferred subtitle language for the account
   */
  defaultSubtitleLanguage: string | null;
  autoSelectSubtitle?: PostUsersSignInDataAutoSelectSubtitle | undefined;
  defaultSubtitleAccessibility?:
    | PostUsersSignInDataDefaultSubtitleAccessibility
    | undefined;
  defaultSubtitleForced?: PostUsersSignInDataDefaultSubtitleForced | undefined;
  watchedIndicator?: PostUsersSignInDataWatchedIndicator | undefined;
  mediaReviewsVisibility?:
    | PostUsersSignInDataMediaReviewsVisibility
    | undefined;
};

export enum PostUsersSignInDataStatus {
  Online = "online",
  Offline = "offline",
}

export type PostUsersSignInDataServices = {
  identifier: string;
  endpoint: string;
  token: string | null;
  secret: string | null;
  status: PostUsersSignInDataStatus;
};

/**
 * String representation of subscriptionActive
 */
export enum PostUsersSignInDataAuthenticationStatus {
  Inactive = "Inactive",
  Active = "Active",
}

/**
 * If the account’s Plex Pass subscription is active
 */
export type PostUsersSignInDataSubscription = {
  /**
   * List of features allowed on your Plex Pass subscription
   */
  features?: Array<string> | undefined;
  /**
   * If the account's Plex Pass subscription is active
   */
  active?: boolean | undefined;
  /**
   * Date the account subscribed to Plex Pass
   */
  subscribedAt?: string | null | undefined;
  /**
   * String representation of subscriptionActive
   */
  status?: PostUsersSignInDataAuthenticationStatus | undefined;
  /**
   * Payment service used for your Plex Pass subscription
   */
  paymentService?: string | null | undefined;
  /**
   * Name of Plex Pass subscription plan
   */
  plan?: string | null | undefined;
};

/**
 * String representation of subscriptionActive
 */
export enum PostUsersSignInDataAuthenticationResponseStatus {
  Inactive = "Inactive",
  Active = "Active",
}

export type PostUsersSignInDataAuthenticationSubscription = {
  /**
   * List of features allowed on your Plex Pass subscription
   */
  features?: Array<string> | undefined;
  /**
   * If the account's Plex Pass subscription is active
   */
  active?: boolean | undefined;
  /**
   * Date the account subscribed to Plex Pass
   */
  subscribedAt?: string | null | undefined;
  /**
   * String representation of subscriptionActive
   */
  status?: PostUsersSignInDataAuthenticationResponseStatus | undefined;
  /**
   * Payment service used for your Plex Pass subscription
   */
  paymentService?: string | null | undefined;
  /**
   * Name of Plex Pass subscription plan
   */
  plan?: string | null | undefined;
};

export enum PostUsersSignInDataState {
  Ended = "ended",
}

export type InternalPaymentMethod = {};

export type Billing = {
  internalPaymentMethod: InternalPaymentMethod;
  paymentMethodId: number | null;
};

export type PastSubscription = {
  id: string | null;
  mode: string | null;
  renewsAt: number | null;
  endsAt: number | null;
  canceled?: boolean | undefined;
  gracePeriod?: boolean | undefined;
  onHold?: boolean | undefined;
  canReactivate?: boolean | undefined;
  canUpgrade?: boolean | undefined;
  canDowngrade?: boolean | undefined;
  canConvert?: boolean | undefined;
  type: string;
  transfer: string | null;
  state: PostUsersSignInDataState;
  billing: Billing;
};

export type Trials = {};

/**
 * Returns the user account data with a valid auth token
 */
export type PostUsersSignInDataUserPlexAccount = {
  /**
   * Unknown
   */
  adsConsent: boolean | null;
  adsConsentReminderAt: number | null;
  adsConsentSetAt: number | null;
  /**
   * Unknown
   */
  anonymous?: boolean | null | undefined;
  /**
   * The account token
   */
  authToken: string;
  /**
   * If the two-factor authentication backup codes have been created
   */
  backupCodesCreated?: boolean | undefined;
  /**
   * If the account has been confirmed
   */
  confirmed?: boolean | undefined;
  /**
   * The account country
   */
  country: string;
  /**
   * The account email address
   */
  email: string;
  /**
   * If login with email only is enabled
   */
  emailOnlyAuth?: boolean | undefined;
  /**
   * If experimental features are enabled
   */
  experimentalFeatures?: boolean | undefined;
  /**
   * Your account full name
   */
  friendlyName: string;
  /**
   * List of devices your allowed to use with this account
   */
  entitlements: Array<string>;
  /**
   * If the account is a Plex Home guest user
   */
  guest?: boolean | undefined;
  /**
   * If the account has a password
   */
  hasPassword?: boolean | undefined;
  /**
   * If the account is a Plex Home user
   */
  home?: boolean | undefined;
  /**
   * If the account is the Plex Home admin
   */
  homeAdmin?: boolean | undefined;
  /**
   * The number of accounts in the Plex Home
   */
  homeSize: number;
  /**
   * The Plex account ID
   */
  id: number;
  /**
   * Unix epoch datetime in seconds
   */
  joinedAt: number;
  /**
   * The account locale
   */
  locale: string | null;
  /**
   * If you are subscribed to the Plex newsletter
   */
  mailingListActive?: boolean | undefined;
  /**
   * Your current mailing list status (active or unsubscribed)
   */
  mailingListStatus: PostUsersSignInDataMailingListStatus;
  /**
   * The maximum number of accounts allowed in the Plex Home
   */
  maxHomeSize: number;
  /**
   * [Might be removed] The hashed Plex Home PIN
   *
   * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
   */
  pin?: string | undefined;
  profile: PostUsersSignInDataUserProfile;
  /**
   * If the account has a Plex Home PIN enabled
   */
  protected?: boolean | undefined;
  /**
   * Unix epoch datetime in seconds
   */
  rememberExpiresAt: number;
  /**
   * If the account is a Plex Home managed user
   */
  restricted?: boolean | undefined;
  /**
   * [Might be removed] List of account roles. Plexpass membership listed here
   */
  roles?: Array<string> | undefined;
  /**
   * Unknown
   */
  scrobbleTypes: string;
  services: Array<PostUsersSignInDataServices>;
  /**
   * If the account’s Plex Pass subscription is active
   */
  subscription: PostUsersSignInDataSubscription;
  /**
   * Description of the Plex Pass subscription
   */
  subscriptionDescription: string | null;
  subscriptions: Array<PostUsersSignInDataAuthenticationSubscription>;
  /**
   * URL of the account thumbnail
   */
  thumb: string;
  /**
   * The title of the account (username or friendly name)
   */
  title: string;
  /**
   * If two-factor authentication is enabled
   */
  twoFactorEnabled?: boolean | undefined;
  /**
   * The account username
   */
  username: string;
  /**
   * The account UUID
   */
  uuid: string;
  attributionPartner: string | null;
  pastSubscriptions: Array<PastSubscription>;
  trials: Array<Trials>;
};

export type PostUsersSignInDataResponse = {
  /**
   * 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;
  /**
   * Returns the user account data with a valid auth token
   */
  userPlexAccount?: PostUsersSignInDataUserPlexAccount | undefined;
};

/** @internal */
export const PostUsersSignInDataGlobals$inboundSchema: z.ZodType<
  PostUsersSignInDataGlobals,
  z.ZodTypeDef,
  unknown
> = z.object({
  ClientID: z.string().optional(),
  ClientName: z.string().optional(),
  DeviceNickname: z.string().optional(),
  ClientVersion: z.string().optional(),
  Platform: z.string().optional(),
}).transform((v) => {
  return remap$(v, {
    "ClientID": "clientID",
    "ClientName": "clientName",
    "DeviceNickname": "deviceNickname",
    "ClientVersion": "clientVersion",
    "Platform": "platform",
  });
});

/** @internal */
export type PostUsersSignInDataGlobals$Outbound = {
  ClientID?: string | undefined;
  ClientName?: string | undefined;
  DeviceNickname?: string | undefined;
  ClientVersion?: string | undefined;
  Platform?: string | undefined;
};

/** @internal */
export const PostUsersSignInDataGlobals$outboundSchema: z.ZodType<
  PostUsersSignInDataGlobals$Outbound,
  z.ZodTypeDef,
  PostUsersSignInDataGlobals
> = z.object({
  clientID: z.string().optional(),
  clientName: z.string().optional(),
  deviceNickname: z.string().optional(),
  clientVersion: z.string().optional(),
  platform: z.string().optional(),
}).transform((v) => {
  return remap$(v, {
    clientID: "ClientID",
    clientName: "ClientName",
    deviceNickname: "DeviceNickname",
    clientVersion: "ClientVersion",
    platform: "Platform",
  });
});

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

/** @internal */
export const PostUsersSignInDataRequestBody$inboundSchema: z.ZodType<
  PostUsersSignInDataRequestBody,
  z.ZodTypeDef,
  unknown
> = z.object({
  login: z.string(),
  password: z.string(),
  rememberMe: z.boolean().default(false),
  verificationCode: z.string().optional(),
});

/** @internal */
export type PostUsersSignInDataRequestBody$Outbound = {
  login: string;
  password: string;
  rememberMe: boolean;
  verificationCode?: string | undefined;
};

/** @internal */
export const PostUsersSignInDataRequestBody$outboundSchema: z.ZodType<
  PostUsersSignInDataRequestBody$Outbound,
  z.ZodTypeDef,
  PostUsersSignInDataRequestBody
> = z.object({
  login: z.string(),
  password: z.string(),
  rememberMe: z.boolean().default(false),
  verificationCode: 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 PostUsersSignInDataRequestBody$ {
  /** @deprecated use `PostUsersSignInDataRequestBody$inboundSchema` instead. */
  export const inboundSchema = PostUsersSignInDataRequestBody$inboundSchema;
  /** @deprecated use `PostUsersSignInDataRequestBody$outboundSchema` instead. */
  export const outboundSchema = PostUsersSignInDataRequestBody$outboundSchema;
  /** @deprecated use `PostUsersSignInDataRequestBody$Outbound` instead. */
  export type Outbound = PostUsersSignInDataRequestBody$Outbound;
}

/** @internal */
export const PostUsersSignInDataRequest$inboundSchema: z.ZodType<
  PostUsersSignInDataRequest,
  z.ZodTypeDef,
  unknown
> = z.object({
  ClientID: z.string().optional(),
  ClientName: z.string().optional(),
  DeviceNickname: z.string().optional(),
  ClientVersion: z.string().optional(),
  Platform: z.string().optional(),
  RequestBody: z.lazy(() => PostUsersSignInDataRequestBody$inboundSchema)
    .optional(),
}).transform((v) => {
  return remap$(v, {
    "ClientID": "clientID",
    "ClientName": "clientName",
    "DeviceNickname": "deviceNickname",
    "ClientVersion": "clientVersion",
    "Platform": "platform",
    "RequestBody": "requestBody",
  });
});

/** @internal */
export type PostUsersSignInDataRequest$Outbound = {
  ClientID?: string | undefined;
  ClientName?: string | undefined;
  DeviceNickname?: string | undefined;
  ClientVersion?: string | undefined;
  Platform?: string | undefined;
  RequestBody?: PostUsersSignInDataRequestBody$Outbound | undefined;
};

/** @internal */
export const PostUsersSignInDataRequest$outboundSchema: z.ZodType<
  PostUsersSignInDataRequest$Outbound,
  z.ZodTypeDef,
  PostUsersSignInDataRequest
> = z.object({
  clientID: z.string().optional(),
  clientName: z.string().optional(),
  deviceNickname: z.string().optional(),
  clientVersion: z.string().optional(),
  platform: z.string().optional(),
  requestBody: z.lazy(() => PostUsersSignInDataRequestBody$outboundSchema)
    .optional(),
}).transform((v) => {
  return remap$(v, {
    clientID: "ClientID",
    clientName: "ClientName",
    deviceNickname: "DeviceNickname",
    clientVersion: "ClientVersion",
    platform: "Platform",
    requestBody: "RequestBody",
  });
});

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

/** @internal */
export const PostUsersSignInDataMailingListStatus$inboundSchema:
  z.ZodNativeEnum<typeof PostUsersSignInDataMailingListStatus> = z.nativeEnum(
    PostUsersSignInDataMailingListStatus,
  );

/** @internal */
export const PostUsersSignInDataMailingListStatus$outboundSchema:
  z.ZodNativeEnum<typeof PostUsersSignInDataMailingListStatus> =
    PostUsersSignInDataMailingListStatus$inboundSchema;

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

/** @internal */
export const PostUsersSignInDataAutoSelectSubtitle$inboundSchema:
  z.ZodNativeEnum<typeof PostUsersSignInDataAutoSelectSubtitle> = z.nativeEnum(
    PostUsersSignInDataAutoSelectSubtitle,
  );

/** @internal */
export const PostUsersSignInDataAutoSelectSubtitle$outboundSchema:
  z.ZodNativeEnum<typeof PostUsersSignInDataAutoSelectSubtitle> =
    PostUsersSignInDataAutoSelectSubtitle$inboundSchema;

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

/** @internal */
export const PostUsersSignInDataDefaultSubtitleAccessibility$inboundSchema:
  z.ZodNativeEnum<typeof PostUsersSignInDataDefaultSubtitleAccessibility> = z
    .nativeEnum(PostUsersSignInDataDefaultSubtitleAccessibility);

/** @internal */
export const PostUsersSignInDataDefaultSubtitleAccessibility$outboundSchema:
  z.ZodNativeEnum<typeof PostUsersSignInDataDefaultSubtitleAccessibility> =
    PostUsersSignInDataDefaultSubtitleAccessibility$inboundSchema;

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

/** @internal */
export const PostUsersSignInDataDefaultSubtitleForced$inboundSchema:
  z.ZodNativeEnum<typeof PostUsersSignInDataDefaultSubtitleForced> = z
    .nativeEnum(PostUsersSignInDataDefaultSubtitleForced);

/** @internal */
export const PostUsersSignInDataDefaultSubtitleForced$outboundSchema:
  z.ZodNativeEnum<typeof PostUsersSignInDataDefaultSubtitleForced> =
    PostUsersSignInDataDefaultSubtitleForced$inboundSchema;

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

/** @internal */
export const PostUsersSignInDataWatchedIndicator$inboundSchema: z.ZodNativeEnum<
  typeof PostUsersSignInDataWatchedIndicator
> = z.nativeEnum(PostUsersSignInDataWatchedIndicator);

/** @internal */
export const PostUsersSignInDataWatchedIndicator$outboundSchema:
  z.ZodNativeEnum<typeof PostUsersSignInDataWatchedIndicator> =
    PostUsersSignInDataWatchedIndicator$inboundSchema;

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

/** @internal */
export const PostUsersSignInDataMediaReviewsVisibility$inboundSchema:
  z.ZodNativeEnum<typeof PostUsersSignInDataMediaReviewsVisibility> = z
    .nativeEnum(PostUsersSignInDataMediaReviewsVisibility);

/** @internal */
export const PostUsersSignInDataMediaReviewsVisibility$outboundSchema:
  z.ZodNativeEnum<typeof PostUsersSignInDataMediaReviewsVisibility> =
    PostUsersSignInDataMediaReviewsVisibility$inboundSchema;

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

/** @internal */
export const PostUsersSignInDataUserProfile$inboundSchema: z.ZodType<
  PostUsersSignInDataUserProfile,
  z.ZodTypeDef,
  unknown
> = z.object({
  autoSelectAudio: z.boolean().default(true),
  defaultAudioLanguage: z.nullable(z.string()),
  defaultSubtitleLanguage: z.nullable(z.string()),
  autoSelectSubtitle: PostUsersSignInDataAutoSelectSubtitle$inboundSchema,
  defaultSubtitleAccessibility:
    PostUsersSignInDataDefaultSubtitleAccessibility$inboundSchema,
  defaultSubtitleForced: PostUsersSignInDataDefaultSubtitleForced$inboundSchema,
  watchedIndicator: PostUsersSignInDataWatchedIndicator$inboundSchema,
  mediaReviewsVisibility:
    PostUsersSignInDataMediaReviewsVisibility$inboundSchema,
});

/** @internal */
export type PostUsersSignInDataUserProfile$Outbound = {
  autoSelectAudio: boolean;
  defaultAudioLanguage: string | null;
  defaultSubtitleLanguage: string | null;
  autoSelectSubtitle: number;
  defaultSubtitleAccessibility: number;
  defaultSubtitleForced: number;
  watchedIndicator: number;
  mediaReviewsVisibility: number;
};

/** @internal */
export const PostUsersSignInDataUserProfile$outboundSchema: z.ZodType<
  PostUsersSignInDataUserProfile$Outbound,
  z.ZodTypeDef,
  PostUsersSignInDataUserProfile
> = z.object({
  autoSelectAudio: z.boolean().default(true),
  defaultAudioLanguage: z.nullable(z.string()),
  defaultSubtitleLanguage: z.nullable(z.string()),
  autoSelectSubtitle: PostUsersSignInDataAutoSelectSubtitle$outboundSchema
    .default(PostUsersSignInDataAutoSelectSubtitle.Disable),
  defaultSubtitleAccessibility:
    PostUsersSignInDataDefaultSubtitleAccessibility$outboundSchema.default(
      PostUsersSignInDataDefaultSubtitleAccessibility.Disable,
    ),
  defaultSubtitleForced: PostUsersSignInDataDefaultSubtitleForced$outboundSchema
    .default(PostUsersSignInDataDefaultSubtitleForced.Disable),
  watchedIndicator: PostUsersSignInDataWatchedIndicator$outboundSchema.default(
    PostUsersSignInDataWatchedIndicator.Disable,
  ),
  mediaReviewsVisibility:
    PostUsersSignInDataMediaReviewsVisibility$outboundSchema.default(
      PostUsersSignInDataMediaReviewsVisibility.Disable,
    ),
});

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

/** @internal */
export const PostUsersSignInDataStatus$inboundSchema: z.ZodNativeEnum<
  typeof PostUsersSignInDataStatus
> = z.nativeEnum(PostUsersSignInDataStatus);

/** @internal */
export const PostUsersSignInDataStatus$outboundSchema: z.ZodNativeEnum<
  typeof PostUsersSignInDataStatus
> = PostUsersSignInDataStatus$inboundSchema;

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

/** @internal */
export const PostUsersSignInDataServices$inboundSchema: z.ZodType<
  PostUsersSignInDataServices,
  z.ZodTypeDef,
  unknown
> = z.object({
  identifier: z.string(),
  endpoint: z.string(),
  token: z.nullable(z.string()),
  secret: z.nullable(z.string()),
  status: PostUsersSignInDataStatus$inboundSchema,
});

/** @internal */
export type PostUsersSignInDataServices$Outbound = {
  identifier: string;
  endpoint: string;
  token: string | null;
  secret: string | null;
  status: string;
};

/** @internal */
export const PostUsersSignInDataServices$outboundSchema: z.ZodType<
  PostUsersSignInDataServices$Outbound,
  z.ZodTypeDef,
  PostUsersSignInDataServices
> = z.object({
  identifier: z.string(),
  endpoint: z.string(),
  token: z.nullable(z.string()),
  secret: z.nullable(z.string()),
  status: PostUsersSignInDataStatus$outboundSchema,
});

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

/** @internal */
export const PostUsersSignInDataAuthenticationStatus$inboundSchema:
  z.ZodNativeEnum<typeof PostUsersSignInDataAuthenticationStatus> = z
    .nativeEnum(PostUsersSignInDataAuthenticationStatus);

/** @internal */
export const PostUsersSignInDataAuthenticationStatus$outboundSchema:
  z.ZodNativeEnum<typeof PostUsersSignInDataAuthenticationStatus> =
    PostUsersSignInDataAuthenticationStatus$inboundSchema;

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

/** @internal */
export const PostUsersSignInDataSubscription$inboundSchema: z.ZodType<
  PostUsersSignInDataSubscription,
  z.ZodTypeDef,
  unknown
> = z.object({
  features: z.array(z.string()).optional(),
  active: z.boolean().optional(),
  subscribedAt: z.nullable(z.string()).optional(),
  status: PostUsersSignInDataAuthenticationStatus$inboundSchema.optional(),
  paymentService: z.nullable(z.string()).optional(),
  plan: z.nullable(z.string()).optional(),
});

/** @internal */
export type PostUsersSignInDataSubscription$Outbound = {
  features?: Array<string> | undefined;
  active?: boolean | undefined;
  subscribedAt?: string | null | undefined;
  status?: string | undefined;
  paymentService?: string | null | undefined;
  plan?: string | null | undefined;
};

/** @internal */
export const PostUsersSignInDataSubscription$outboundSchema: z.ZodType<
  PostUsersSignInDataSubscription$Outbound,
  z.ZodTypeDef,
  PostUsersSignInDataSubscription
> = z.object({
  features: z.array(z.string()).optional(),
  active: z.boolean().optional(),
  subscribedAt: z.nullable(z.string()).optional(),
  status: PostUsersSignInDataAuthenticationStatus$outboundSchema.optional(),
  paymentService: z.nullable(z.string()).optional(),
  plan: z.nullable(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 PostUsersSignInDataSubscription$ {
  /** @deprecated use `PostUsersSignInDataSubscription$inboundSchema` instead. */
  export const inboundSchema = PostUsersSignInDataSubscription$inboundSchema;
  /** @deprecated use `PostUsersSignInDataSubscription$outboundSchema` instead. */
  export const outboundSchema = PostUsersSignInDataSubscription$outboundSchema;
  /** @deprecated use `PostUsersSignInDataSubscription$Outbound` instead. */
  export type Outbound = PostUsersSignInDataSubscription$Outbound;
}

/** @internal */
export const PostUsersSignInDataAuthenticationResponseStatus$inboundSchema:
  z.ZodNativeEnum<typeof PostUsersSignInDataAuthenticationResponseStatus> = z
    .nativeEnum(PostUsersSignInDataAuthenticationResponseStatus);

/** @internal */
export const PostUsersSignInDataAuthenticationResponseStatus$outboundSchema:
  z.ZodNativeEnum<typeof PostUsersSignInDataAuthenticationResponseStatus> =
    PostUsersSignInDataAuthenticationResponseStatus$inboundSchema;

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

/** @internal */
export const PostUsersSignInDataAuthenticationSubscription$inboundSchema:
  z.ZodType<
    PostUsersSignInDataAuthenticationSubscription,
    z.ZodTypeDef,
    unknown
  > = z.object({
    features: z.array(z.string()).optional(),
    active: z.boolean().optional(),
    subscribedAt: z.nullable(z.string()).optional(),
    status: PostUsersSignInDataAuthenticationResponseStatus$inboundSchema
      .optional(),
    paymentService: z.nullable(z.string()).optional(),
    plan: z.nullable(z.string()).optional(),
  });

/** @internal */
export type PostUsersSignInDataAuthenticationSubscription$Outbound = {
  features?: Array<string> | undefined;
  active?: boolean | undefined;
  subscribedAt?: string | null | undefined;
  status?: string | undefined;
  paymentService?: string | null | undefined;
  plan?: string | null | undefined;
};

/** @internal */
export const PostUsersSignInDataAuthenticationSubscription$outboundSchema:
  z.ZodType<
    PostUsersSignInDataAuthenticationSubscription$Outbound,
    z.ZodTypeDef,
    PostUsersSignInDataAuthenticationSubscription
  > = z.object({
    features: z.array(z.string()).optional(),
    active: z.boolean().optional(),
    subscribedAt: z.nullable(z.string()).optional(),
    status: PostUsersSignInDataAuthenticationResponseStatus$outboundSchema
      .optional(),
    paymentService: z.nullable(z.string()).optional(),
    plan: z.nullable(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 PostUsersSignInDataAuthenticationSubscription$ {
  /** @deprecated use `PostUsersSignInDataAuthenticationSubscription$inboundSchema` instead. */
  export const inboundSchema =
    PostUsersSignInDataAuthenticationSubscription$inboundSchema;
  /** @deprecated use `PostUsersSignInDataAuthenticationSubscription$outboundSchema` instead. */
  export const outboundSchema =
    PostUsersSignInDataAuthenticationSubscription$outboundSchema;
  /** @deprecated use `PostUsersSignInDataAuthenticationSubscription$Outbound` instead. */
  export type Outbound = PostUsersSignInDataAuthenticationSubscription$Outbound;
}

/** @internal */
export const PostUsersSignInDataState$inboundSchema: z.ZodNativeEnum<
  typeof PostUsersSignInDataState
> = z.nativeEnum(PostUsersSignInDataState);

/** @internal */
export const PostUsersSignInDataState$outboundSchema: z.ZodNativeEnum<
  typeof PostUsersSignInDataState
> = PostUsersSignInDataState$inboundSchema;

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

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

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

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

/** @internal */
export const Billing$inboundSchema: z.ZodType<Billing, z.ZodTypeDef, unknown> =
  z.object({
    internalPaymentMethod: z.lazy(() => InternalPaymentMethod$inboundSchema),
    paymentMethodId: z.nullable(z.number().int()),
  });

/** @internal */
export type Billing$Outbound = {
  internalPaymentMethod: InternalPaymentMethod$Outbound;
  paymentMethodId: number | null;
};

/** @internal */
export const Billing$outboundSchema: z.ZodType<
  Billing$Outbound,
  z.ZodTypeDef,
  Billing
> = z.object({
  internalPaymentMethod: z.lazy(() => InternalPaymentMethod$outboundSchema),
  paymentMethodId: z.nullable(z.number().int()),
});

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

/** @internal */
export const PastSubscription$inboundSchema: z.ZodType<
  PastSubscription,
  z.ZodTypeDef,
  unknown
> = z.object({
  id: z.nullable(z.string()),
  mode: z.nullable(z.string()),
  renewsAt: z.nullable(z.number().int()),
  endsAt: z.nullable(z.number().int()),
  canceled: z.boolean().default(false),
  gracePeriod: z.boolean().default(false),
  onHold: z.boolean().default(false),
  canReactivate: z.boolean().default(false),
  canUpgrade: z.boolean().default(false),
  canDowngrade: z.boolean().default(false),
  canConvert: z.boolean().default(false),
  type: z.string(),
  transfer: z.nullable(z.string()),
  state: PostUsersSignInDataState$inboundSchema,
  billing: z.lazy(() => Billing$inboundSchema),
});

/** @internal */
export type PastSubscription$Outbound = {
  id: string | null;
  mode: string | null;
  renewsAt: number | null;
  endsAt: number | null;
  canceled: boolean;
  gracePeriod: boolean;
  onHold: boolean;
  canReactivate: boolean;
  canUpgrade: boolean;
  canDowngrade: boolean;
  canConvert: boolean;
  type: string;
  transfer: string | null;
  state: string;
  billing: Billing$Outbound;
};

/** @internal */
export const PastSubscription$outboundSchema: z.ZodType<
  PastSubscription$Outbound,
  z.ZodTypeDef,
  PastSubscription
> = z.object({
  id: z.nullable(z.string()),
  mode: z.nullable(z.string()),
  renewsAt: z.nullable(z.number().int()),
  endsAt: z.nullable(z.number().int()),
  canceled: z.boolean().default(false),
  gracePeriod: z.boolean().default(false),
  onHold: z.boolean().default(false),
  canReactivate: z.boolean().default(false),
  canUpgrade: z.boolean().default(false),
  canDowngrade: z.boolean().default(false),
  canConvert: z.boolean().default(false),
  type: z.string(),
  transfer: z.nullable(z.string()),
  state: PostUsersSignInDataState$outboundSchema,
  billing: z.lazy(() => Billing$outboundSchema),
});

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

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

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

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

/** @internal */
export const PostUsersSignInDataUserPlexAccount$inboundSchema: z.ZodType<
  PostUsersSignInDataUserPlexAccount,
  z.ZodTypeDef,
  unknown
> = z.object({
  adsConsent: z.nullable(z.boolean()),
  adsConsentReminderAt: z.nullable(z.number().int()),
  adsConsentSetAt: z.nullable(z.number().int()),
  anonymous: z.nullable(z.boolean().default(false)),
  authToken: z.string(),
  backupCodesCreated: z.boolean().default(false),
  confirmed: z.boolean().default(false),
  country: z.string(),
  email: z.string(),
  emailOnlyAuth: z.boolean().default(false),
  experimentalFeatures: z.boolean().default(false),
  friendlyName: z.string(),
  entitlements: z.array(z.string()),
  guest: z.boolean().default(false),
  hasPassword: z.boolean().default(true),
  home: z.boolean().default(false),
  homeAdmin: z.boolean().default(false),
  homeSize: z.number().int(),
  id: z.number().int(),
  joinedAt: z.number().int(),
  locale: z.nullable(z.string()),
  mailingListActive: z.boolean().default(false),
  mailingListStatus: PostUsersSignInDataMailingListStatus$inboundSchema,
  maxHomeSize: z.number().int(),
  pin: z.string().optional(),
  profile: z.lazy(() => PostUsersSignInDataUserProfile$inboundSchema),
  protected: z.boolean().default(false),
  rememberExpiresAt: z.number().int(),
  restricted: z.boolean().default(false),
  roles: z.array(z.string()).optional(),
  scrobbleTypes: z.string(),
  services: z.array(z.lazy(() => PostUsersSignInDataServices$inboundSchema)),
  subscription: z.lazy(() => PostUsersSignInDataSubscription$inboundSchema),
  subscriptionDescription: z.nullable(z.string()),
  subscriptions: z.array(
    z.lazy(() => PostUsersSignInDataAuthenticationSubscription$inboundSchema),
  ),
  thumb: z.string(),
  title: z.string(),
  twoFactorEnabled: z.boolean().default(false),
  username: z.string(),
  uuid: z.string(),
  attributionPartner: z.nullable(z.string()),
  pastSubscriptions: z.array(z.lazy(() => PastSubscription$inboundSchema)),
  trials: z.array(z.lazy(() => Trials$inboundSchema)),
});

/** @internal */
export type PostUsersSignInDataUserPlexAccount$Outbound = {
  adsConsent: boolean | null;
  adsConsentReminderAt: number | null;
  adsConsentSetAt: number | null;
  anonymous: boolean | null;
  authToken: string;
  backupCodesCreated: boolean;
  confirmed: boolean;
  country: string;
  email: string;
  emailOnlyAuth: boolean;
  experimentalFeatures: boolean;
  friendlyName: string;
  entitlements: Array<string>;
  guest: boolean;
  hasPassword: boolean;
  home: boolean;
  homeAdmin: boolean;
  homeSize: number;
  id: number;
  joinedAt: number;
  locale: string | null;
  mailingListActive: boolean;
  mailingListStatus: string;
  maxHomeSize: number;
  pin?: string | undefined;
  profile: PostUsersSignInDataUserProfile$Outbound;
  protected: boolean;
  rememberExpiresAt: number;
  restricted: boolean;
  roles?: Array<string> | undefined;
  scrobbleTypes: string;
  services: Array<PostUsersSignInDataServices$Outbound>;
  subscription: PostUsersSignInDataSubscription$Outbound;
  subscriptionDescription: string | null;
  subscriptions: Array<PostUsersSignInDataAuthenticationSubscription$Outbound>;
  thumb: string;
  title: string;
  twoFactorEnabled: boolean;
  username: string;
  uuid: string;
  attributionPartner: string | null;
  pastSubscriptions: Array<PastSubscription$Outbound>;
  trials: Array<Trials$Outbound>;
};

/** @internal */
export const PostUsersSignInDataUserPlexAccount$outboundSchema: z.ZodType<
  PostUsersSignInDataUserPlexAccount$Outbound,
  z.ZodTypeDef,
  PostUsersSignInDataUserPlexAccount
> = z.object({
  adsConsent: z.nullable(z.boolean()),
  adsConsentReminderAt: z.nullable(z.number().int()),
  adsConsentSetAt: z.nullable(z.number().int()),
  anonymous: z.nullable(z.boolean().default(false)),
  authToken: z.string(),
  backupCodesCreated: z.boolean().default(false),
  confirmed: z.boolean().default(false),
  country: z.string(),
  email: z.string(),
  emailOnlyAuth: z.boolean().default(false),
  experimentalFeatures: z.boolean().default(false),
  friendlyName: z.string(),
  entitlements: z.array(z.string()),
  guest: z.boolean().default(false),
  hasPassword: z.boolean().default(true),
  home: z.boolean().default(false),
  homeAdmin: z.boolean().default(false),
  homeSize: z.number().int(),
  id: z.number().int(),
  joinedAt: z.number().int(),
  locale: z.nullable(z.string()),
  mailingListActive: z.boolean().default(false),
  mailingListStatus: PostUsersSignInDataMailingListStatus$outboundSchema,
  maxHomeSize: z.number().int(),
  pin: z.string().optional(),
  profile: z.lazy(() => PostUsersSignInDataUserProfile$outboundSchema),
  protected: z.boolean().default(false),
  rememberExpiresAt: z.number().int(),
  restricted: z.boolean().default(false),
  roles: z.array(z.string()).optional(),
  scrobbleTypes: z.string(),
  services: z.array(z.lazy(() => PostUsersSignInDataServices$outboundSchema)),
  subscription: z.lazy(() => PostUsersSignInDataSubscription$outboundSchema),
  subscriptionDescription: z.nullable(z.string()),
  subscriptions: z.array(
    z.lazy(() => PostUsersSignInDataAuthenticationSubscription$outboundSchema),
  ),
  thumb: z.string(),
  title: z.string(),
  twoFactorEnabled: z.boolean().default(false),
  username: z.string(),
  uuid: z.string(),
  attributionPartner: z.nullable(z.string()),
  pastSubscriptions: z.array(z.lazy(() => PastSubscription$outboundSchema)),
  trials: z.array(z.lazy(() => Trials$outboundSchema)),
});

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

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

/** @internal */
export type PostUsersSignInDataResponse$Outbound = {
  ContentType: string;
  StatusCode: number;
  RawResponse: never;
  UserPlexAccount?: PostUsersSignInDataUserPlexAccount$Outbound | undefined;
};

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

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