/* tslint:disable */ /* eslint-disable */ /** * Hathora Cloud API * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. * * The version of the OpenAPI document: 0.0.1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { exists, mapValues } from '../runtime'; import type { RoomAllocation } from './RoomAllocation'; import { RoomAllocationFromJSON, RoomAllocationFromJSONTyped, RoomAllocationToJSON, } from './RoomAllocation'; import type { RoomStatus } from './RoomStatus'; import { RoomStatusFromJSON, RoomStatusFromJSONTyped, RoomStatusToJSON, } from './RoomStatus'; /** * From T, pick a set of properties whose keys are in the union K * @export * @interface PickRoomExcludeKeyofRoomAllocations */ export interface PickRoomExcludeKeyofRoomAllocations { /** * System generated unique identifier for an application. * @type {string} * @memberof PickRoomExcludeKeyofRoomAllocations */ appId: string; /** * Unique identifier to a game session or match. Use the default system generated ID or overwrite it with your own. * Note: error will be returned if `roomId` is not globally unique. * @type {string} * @memberof PickRoomExcludeKeyofRoomAllocations */ roomId: string; /** * Optional configuration parameters for the room. Can be any string including stringified JSON. It is accessible from the room via [`GetRoomInfo()`](https://hathora.dev/api#tag/RoomV2/operation/GetRoomInfo). * @type {string} * @memberof PickRoomExcludeKeyofRoomAllocations */ roomConfig: string | null; /** * * @type {RoomStatus} * @memberof PickRoomExcludeKeyofRoomAllocations */ status: RoomStatus; /** * * @type {RoomAllocation} * @memberof PickRoomExcludeKeyofRoomAllocations */ currentAllocation: RoomAllocation | null; } /** * Check if a given object implements the PickRoomExcludeKeyofRoomAllocations interface. */ export function instanceOfPickRoomExcludeKeyofRoomAllocations(value: object): boolean { let isInstance = true; isInstance = isInstance && "appId" in value; isInstance = isInstance && "roomId" in value; isInstance = isInstance && "roomConfig" in value; isInstance = isInstance && "status" in value; isInstance = isInstance && "currentAllocation" in value; return isInstance; } export function PickRoomExcludeKeyofRoomAllocationsFromJSON(json: any): PickRoomExcludeKeyofRoomAllocations { return PickRoomExcludeKeyofRoomAllocationsFromJSONTyped(json, false); } export function PickRoomExcludeKeyofRoomAllocationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PickRoomExcludeKeyofRoomAllocations { if ((json === undefined) || (json === null)) { return json; } return { 'appId': json['appId'], 'roomId': json['roomId'], 'roomConfig': json['roomConfig'], 'status': RoomStatusFromJSON(json['status']), 'currentAllocation': RoomAllocationFromJSON(json['currentAllocation']), }; } export function PickRoomExcludeKeyofRoomAllocationsToJSON(value?: PickRoomExcludeKeyofRoomAllocations | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'appId': value.appId, 'roomId': value.roomId, 'roomConfig': value.roomConfig, 'status': RoomStatusToJSON(value.status), 'currentAllocation': RoomAllocationToJSON(value.currentAllocation), }; }