Files
plexjs/src/sdk/models/operations/getdevices.ts
2024-09-08 03:06:14 +00:00

252 lines
7.4 KiB
TypeScript

/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives.js";
import * as z from "zod";
export type Device = {
id?: number | undefined;
name?: string | undefined;
platform?: string | undefined;
clientIdentifier?: string | undefined;
createdAt?: number | undefined;
};
export type GetDevicesMediaContainer = {
size?: number | undefined;
identifier?: string | undefined;
device?: Array<Device> | undefined;
};
/**
* Devices
*/
export type GetDevicesResponseBody = {
mediaContainer?: GetDevicesMediaContainer | undefined;
};
export type GetDevicesResponse = {
/**
* 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;
/**
* Devices
*/
object?: GetDevicesResponseBody | undefined;
};
/** @internal */
export const Device$inboundSchema: z.ZodType<Device, z.ZodTypeDef, unknown> = z.object({
id: z.number().optional(),
name: z.string().optional(),
platform: z.string().optional(),
clientIdentifier: z.string().optional(),
createdAt: z.number().optional(),
});
/** @internal */
export type Device$Outbound = {
id?: number | undefined;
name?: string | undefined;
platform?: string | undefined;
clientIdentifier?: string | undefined;
createdAt?: number | undefined;
};
/** @internal */
export const Device$outboundSchema: z.ZodType<Device$Outbound, z.ZodTypeDef, Device> = z.object({
id: z.number().optional(),
name: z.string().optional(),
platform: z.string().optional(),
clientIdentifier: z.string().optional(),
createdAt: z.number().optional(),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace Device$ {
/** @deprecated use `Device$inboundSchema` instead. */
export const inboundSchema = Device$inboundSchema;
/** @deprecated use `Device$outboundSchema` instead. */
export const outboundSchema = Device$outboundSchema;
/** @deprecated use `Device$Outbound` instead. */
export type Outbound = Device$Outbound;
}
/** @internal */
export const GetDevicesMediaContainer$inboundSchema: z.ZodType<
GetDevicesMediaContainer,
z.ZodTypeDef,
unknown
> = z
.object({
size: z.number().optional(),
identifier: z.string().optional(),
Device: z.array(z.lazy(() => Device$inboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
Device: "device",
});
});
/** @internal */
export type GetDevicesMediaContainer$Outbound = {
size?: number | undefined;
identifier?: string | undefined;
Device?: Array<Device$Outbound> | undefined;
};
/** @internal */
export const GetDevicesMediaContainer$outboundSchema: z.ZodType<
GetDevicesMediaContainer$Outbound,
z.ZodTypeDef,
GetDevicesMediaContainer
> = z
.object({
size: z.number().optional(),
identifier: z.string().optional(),
device: z.array(z.lazy(() => Device$outboundSchema)).optional(),
})
.transform((v) => {
return remap$(v, {
device: "Device",
});
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace GetDevicesMediaContainer$ {
/** @deprecated use `GetDevicesMediaContainer$inboundSchema` instead. */
export const inboundSchema = GetDevicesMediaContainer$inboundSchema;
/** @deprecated use `GetDevicesMediaContainer$outboundSchema` instead. */
export const outboundSchema = GetDevicesMediaContainer$outboundSchema;
/** @deprecated use `GetDevicesMediaContainer$Outbound` instead. */
export type Outbound = GetDevicesMediaContainer$Outbound;
}
/** @internal */
export const GetDevicesResponseBody$inboundSchema: z.ZodType<
GetDevicesResponseBody,
z.ZodTypeDef,
unknown
> = z
.object({
MediaContainer: z.lazy(() => GetDevicesMediaContainer$inboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
MediaContainer: "mediaContainer",
});
});
/** @internal */
export type GetDevicesResponseBody$Outbound = {
MediaContainer?: GetDevicesMediaContainer$Outbound | undefined;
};
/** @internal */
export const GetDevicesResponseBody$outboundSchema: z.ZodType<
GetDevicesResponseBody$Outbound,
z.ZodTypeDef,
GetDevicesResponseBody
> = z
.object({
mediaContainer: z.lazy(() => GetDevicesMediaContainer$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 GetDevicesResponseBody$ {
/** @deprecated use `GetDevicesResponseBody$inboundSchema` instead. */
export const inboundSchema = GetDevicesResponseBody$inboundSchema;
/** @deprecated use `GetDevicesResponseBody$outboundSchema` instead. */
export const outboundSchema = GetDevicesResponseBody$outboundSchema;
/** @deprecated use `GetDevicesResponseBody$Outbound` instead. */
export type Outbound = GetDevicesResponseBody$Outbound;
}
/** @internal */
export const GetDevicesResponse$inboundSchema: z.ZodType<
GetDevicesResponse,
z.ZodTypeDef,
unknown
> = z
.object({
ContentType: z.string(),
StatusCode: z.number().int(),
RawResponse: z.instanceof(Response),
object: z.lazy(() => GetDevicesResponseBody$inboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
/** @internal */
export type GetDevicesResponse$Outbound = {
ContentType: string;
StatusCode: number;
RawResponse: never;
object?: GetDevicesResponseBody$Outbound | undefined;
};
/** @internal */
export const GetDevicesResponse$outboundSchema: z.ZodType<
GetDevicesResponse$Outbound,
z.ZodTypeDef,
GetDevicesResponse
> = z
.object({
contentType: z.string(),
statusCode: z.number().int(),
rawResponse: z.instanceof(Response).transform(() => {
throw new Error("Response cannot be serialized");
}),
object: z.lazy(() => GetDevicesResponseBody$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 GetDevicesResponse$ {
/** @deprecated use `GetDevicesResponse$inboundSchema` instead. */
export const inboundSchema = GetDevicesResponse$inboundSchema;
/** @deprecated use `GetDevicesResponse$outboundSchema` instead. */
export const outboundSchema = GetDevicesResponse$outboundSchema;
/** @deprecated use `GetDevicesResponse$Outbound` instead. */
export type Outbound = GetDevicesResponse$Outbound;
}