/*
 * 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 GetServerListServer = {
  name?: string | undefined;
  host?: string | undefined;
  address?: string | undefined;
  port?: number | undefined;
  machineIdentifier?: string | undefined;
  version?: string | undefined;
};

export type GetServerListMediaContainer = {
  size?: number | undefined;
  server?: Array<GetServerListServer> | undefined;
};

/**
 * List of Servers
 */
export type GetServerListResponseBody = {
  mediaContainer?: GetServerListMediaContainer | undefined;
};

export type GetServerListResponse = {
  /**
   * 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;
  /**
   * List of Servers
   */
  object?: GetServerListResponseBody | undefined;
};

/** @internal */
export const GetServerListServer$inboundSchema: z.ZodType<
  GetServerListServer,
  z.ZodTypeDef,
  unknown
> = z.object({
  name: z.string().optional(),
  host: z.string().optional(),
  address: z.string().optional(),
  port: z.number().optional(),
  machineIdentifier: z.string().optional(),
  version: z.string().optional(),
});

/** @internal */
export type GetServerListServer$Outbound = {
  name?: string | undefined;
  host?: string | undefined;
  address?: string | undefined;
  port?: number | undefined;
  machineIdentifier?: string | undefined;
  version?: string | undefined;
};

/** @internal */
export const GetServerListServer$outboundSchema: z.ZodType<
  GetServerListServer$Outbound,
  z.ZodTypeDef,
  GetServerListServer
> = z.object({
  name: z.string().optional(),
  host: z.string().optional(),
  address: z.string().optional(),
  port: z.number().optional(),
  machineIdentifier: z.string().optional(),
  version: 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 GetServerListServer$ {
  /** @deprecated use `GetServerListServer$inboundSchema` instead. */
  export const inboundSchema = GetServerListServer$inboundSchema;
  /** @deprecated use `GetServerListServer$outboundSchema` instead. */
  export const outboundSchema = GetServerListServer$outboundSchema;
  /** @deprecated use `GetServerListServer$Outbound` instead. */
  export type Outbound = GetServerListServer$Outbound;
}

/** @internal */
export const GetServerListMediaContainer$inboundSchema: z.ZodType<
  GetServerListMediaContainer,
  z.ZodTypeDef,
  unknown
> = z.object({
  size: z.number().optional(),
  Server: z.array(z.lazy(() => GetServerListServer$inboundSchema)).optional(),
}).transform((v) => {
  return remap$(v, {
    "Server": "server",
  });
});

/** @internal */
export type GetServerListMediaContainer$Outbound = {
  size?: number | undefined;
  Server?: Array<GetServerListServer$Outbound> | undefined;
};

/** @internal */
export const GetServerListMediaContainer$outboundSchema: z.ZodType<
  GetServerListMediaContainer$Outbound,
  z.ZodTypeDef,
  GetServerListMediaContainer
> = z.object({
  size: z.number().optional(),
  server: z.array(z.lazy(() => GetServerListServer$outboundSchema)).optional(),
}).transform((v) => {
  return remap$(v, {
    server: "Server",
  });
});

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

/** @internal */
export const GetServerListResponseBody$inboundSchema: z.ZodType<
  GetServerListResponseBody,
  z.ZodTypeDef,
  unknown
> = z.object({
  MediaContainer: z.lazy(() => GetServerListMediaContainer$inboundSchema)
    .optional(),
}).transform((v) => {
  return remap$(v, {
    "MediaContainer": "mediaContainer",
  });
});

/** @internal */
export type GetServerListResponseBody$Outbound = {
  MediaContainer?: GetServerListMediaContainer$Outbound | undefined;
};

/** @internal */
export const GetServerListResponseBody$outboundSchema: z.ZodType<
  GetServerListResponseBody$Outbound,
  z.ZodTypeDef,
  GetServerListResponseBody
> = z.object({
  mediaContainer: z.lazy(() => GetServerListMediaContainer$outboundSchema)
    .optional(),
}).transform((v) => {
  return remap$(v, {
    mediaContainer: "MediaContainer",
  });
});

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

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

/** @internal */
export type GetServerListResponse$Outbound = {
  ContentType: string;
  StatusCode: number;
  RawResponse: never;
  object?: GetServerListResponseBody$Outbound | undefined;
};

/** @internal */
export const GetServerListResponse$outboundSchema: z.ZodType<
  GetServerListResponse$Outbound,
  z.ZodTypeDef,
  GetServerListResponse
> = z.object({
  contentType: z.string(),
  statusCode: z.number().int(),
  rawResponse: z.instanceof(Response).transform(() => {
    throw new Error("Response cannot be serialized");
  }),
  object: z.lazy(() => GetServerListResponseBody$outboundSchema).optional(),
}).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 GetServerListResponse$ {
  /** @deprecated use `GetServerListResponse$inboundSchema` instead. */
  export const inboundSchema = GetServerListResponse$inboundSchema;
  /** @deprecated use `GetServerListResponse$outboundSchema` instead. */
  export const outboundSchema = GetServerListResponse$outboundSchema;
  /** @deprecated use `GetServerListResponse$Outbound` instead. */
  export type Outbound = GetServerListResponse$Outbound;
}
