/**
 * Shell EVLib
 *
 * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
 */

import { lazy, number, object, optional, Schema, string } from '../schema';
import { Coordinates, coordinatesSchema } from './coordinates';

/** A Marker is a place on the map that represent multiple Locations at the same spot */
export interface MultiLocationMarker {
  /** Identifies the marker type. If it's a `MultiLocationMarker`, then the value is `MultiLocation` */
  markerType: string;
  /** Uniquely identifies the marker object */
  uniqueKey?: string;
  /** Coordinates of the Shell Recharge Site Location */
  coordinates?: Coordinates;
  /** Number of Locations that this Marker represents in the given set of bounds */
  locationCount?: number;
  /** Total number of Evses in Locations that this Marker represents */
  evseCount?: number;
  /** Maximum power in kW across all locations grouped in this marker (disregarding availability) */
  maxPower?: number;
  /** GeoHash of marker coordinates */
  geoHash?: string;
}

export const multiLocationMarkerSchema: Schema<MultiLocationMarker> = object({
  markerType: ['markerType', string()],
  uniqueKey: ['uniqueKey', optional(string())],
  coordinates: ['coordinates', optional(lazy(() => coordinatesSchema))],
  locationCount: ['locationCount', optional(number())],
  evseCount: ['evseCount', optional(number())],
  maxPower: ['maxPower', optional(number())],
  geoHash: ['geoHash', optional(string())],
});
