/* 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 { Region } from './Region'; import { RegionFromJSON, RegionFromJSONTyped, RegionToJSON, } from './Region'; /** * * @export * @interface CreateRoomParams */ export interface CreateRoomParams { /** * 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 CreateRoomParams */ roomConfig?: string; /** * * @type {Region} * @memberof CreateRoomParams */ region: Region; } /** * Check if a given object implements the CreateRoomParams interface. */ export function instanceOfCreateRoomParams(value: object): boolean { let isInstance = true; isInstance = isInstance && "region" in value; return isInstance; } export function CreateRoomParamsFromJSON(json: any): CreateRoomParams { return CreateRoomParamsFromJSONTyped(json, false); } export function CreateRoomParamsFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateRoomParams { if ((json === undefined) || (json === null)) { return json; } return { 'roomConfig': !exists(json, 'roomConfig') ? undefined : json['roomConfig'], 'region': RegionFromJSON(json['region']), }; } export function CreateRoomParamsToJSON(value?: CreateRoomParams | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'roomConfig': value.roomConfig, 'region': RegionToJSON(value.region), }; }