/* 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 { MetricValue } from './MetricValue'; import { MetricValueFromJSON, MetricValueFromJSONTyped, MetricValueToJSON, } from './MetricValue'; /** * Construct a type with a set of properties K of type T * @export * @interface RecordPartialMetricNameMetricValueArray */ export interface RecordPartialMetricNameMetricValueArray { /** * * @type {Array} * @memberof RecordPartialMetricNameMetricValueArray */ cpu?: Array; /** * * @type {Array} * @memberof RecordPartialMetricNameMetricValueArray */ memory?: Array; /** * * @type {Array} * @memberof RecordPartialMetricNameMetricValueArray */ rateEgress?: Array; /** * * @type {Array} * @memberof RecordPartialMetricNameMetricValueArray */ totalEgress?: Array; /** * * @type {Array} * @memberof RecordPartialMetricNameMetricValueArray */ activeConnections?: Array; } /** * Check if a given object implements the RecordPartialMetricNameMetricValueArray interface. */ export function instanceOfRecordPartialMetricNameMetricValueArray(value: object): boolean { let isInstance = true; return isInstance; } export function RecordPartialMetricNameMetricValueArrayFromJSON(json: any): RecordPartialMetricNameMetricValueArray { return RecordPartialMetricNameMetricValueArrayFromJSONTyped(json, false); } export function RecordPartialMetricNameMetricValueArrayFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecordPartialMetricNameMetricValueArray { if ((json === undefined) || (json === null)) { return json; } return { 'cpu': !exists(json, 'cpu') ? undefined : ((json['cpu'] as Array).map(MetricValueFromJSON)), 'memory': !exists(json, 'memory') ? undefined : ((json['memory'] as Array).map(MetricValueFromJSON)), 'rateEgress': !exists(json, 'rate_egress') ? undefined : ((json['rate_egress'] as Array).map(MetricValueFromJSON)), 'totalEgress': !exists(json, 'total_egress') ? undefined : ((json['total_egress'] as Array).map(MetricValueFromJSON)), 'activeConnections': !exists(json, 'active_connections') ? undefined : ((json['active_connections'] as Array).map(MetricValueFromJSON)), }; } export function RecordPartialMetricNameMetricValueArrayToJSON(value?: RecordPartialMetricNameMetricValueArray | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'cpu': value.cpu === undefined ? undefined : ((value.cpu as Array).map(MetricValueToJSON)), 'memory': value.memory === undefined ? undefined : ((value.memory as Array).map(MetricValueToJSON)), 'rate_egress': value.rateEgress === undefined ? undefined : ((value.rateEgress as Array).map(MetricValueToJSON)), 'total_egress': value.totalEgress === undefined ? undefined : ((value.totalEgress as Array).map(MetricValueToJSON)), 'active_connections': value.activeConnections === undefined ? undefined : ((value.activeConnections as Array).map(MetricValueToJSON)), }; }