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