solarnetwork-api-core
    Preparing search index...

    Class Location

    A geographic location.

    Hierarchy (View Summary)

    Implements

    Index
    props: Map<string, any>

    The object that all properties are stored on.

    • get country(): string | undefined

      An ISO 3166-1 alpha-2 character country code.

      Returns string | undefined

    • set country(val: string | null): void

      Parameters

      • val: string | null

      Returns void

    • get elevation(): number | undefined

      The elevation above sea level, in meters.

      Returns number | undefined

    • set elevation(val: number | null): void

      Parameters

      • val: number | null

      Returns void

    • get id(): number | undefined

      A SolarNetwork assigned unique identifier.

      Returns number | undefined

    • set id(val: number | null): void

      Parameters

      • val: number | null

      Returns void

    • get latitude(): number | undefined

      The decimal world latitude.

      Returns number | undefined

    • set latitude(val: number | null): void

      Parameters

      • val: number | null

      Returns void

    • get locality(): string | undefined

      Get the locality (city, town).

      Returns string | undefined

    • set locality(val: string | null): void

      Parameters

      • val: string | null

      Returns void

    • get longitude(): number | undefined

      The decimal world longitude.

      Returns number | undefined

    • set longitude(val: number | null): void

      Parameters

      • val: number | null

      Returns void

    • get name(): string | undefined

      A generalized name, can be used for "virtual" locations.

      Returns string | undefined

    • set name(val: string | null): void

      Parameters

      • val: string | null

      Returns void

    • get postalCode(): string | undefined

      A country-specific postal code.

      Returns string | undefined

    • set postalCode(val: string | null): void

      Parameters

      • val: string | null

      Returns void

    • get region(): string | undefined

      A country-specific regional identifier.

      Returns string | undefined

    • set region(val: string | null): void

      Parameters

      • val: string | null

      Returns void

    • get size(): number

      Get the number of properties configured.

      Returns number

    • get stateOrProvince(): string | undefined

      A country-specific state or province identifier.

      Returns string | undefined

    • set stateOrProvince(val: string | null): void

      Parameters

      • val: string | null

      Returns void

    • get street(): string | undefined

      The street address.

      Returns string | undefined

    • set street(val: string | null): void

      Parameters

      • val: string | null

      Returns void

    • get timeZoneId(): string | undefined

      A time zone ID, for example Pacific/Auckland.

      Returns string | undefined

    • set timeZoneId(val: string | null): void

      Parameters

      • val: string | null

      Returns void

    • Get an iterator over the property entries.

      Returns MapIterator<[string, any]>

      iterator over [k, v] values

    • Get a property value.

      Parameters

      • key: string

        the key to get

      Returns any

      the associated value for the given key

    • Set or remove a property value.

      Parameters

      • key: string

        the key to set the value for

      • newValue: any

        the new value to set for the given key; if null then the key property will be removed

      Returns this

      this object

    • Get all properties.

      Returns Record<string, any>

      all properties of this object copied into a simple object

    • Set or remove multiple properties.

      Parameters

      • newProps: object | Map<string, any>

        the new values to set; if any value is null that property will be deleted

      Returns this

      this object

    • Get this object as a standard URI encoded (query parameters) string value.

      All enumerable properties of the props property will be added to the result. If any property value is an array, the values of the array will be joined by a comma. Any Util.Enum values will have their name property used.

      Parameters

      • OptionalpropertyName: string

        an optional object property prefix to add to all properties

      • OptionalcallbackFn: PropMapUriEncodingCallbackFn

        An optional function that will be called for each property. The function will be passed property name and value arguments, and must return either undefined to skip the property, a 2 or 3-element array with the property name and value to use, and an optional boolean to force array values to use mutliple parameter keys. Any other return value causes the property to be used as-is.

      Returns string

      the URI encoded string

    • Get this object as a standard URI encoded (query parameters) string value with sorting and pagination parameters.

      This calls Util.PropMap.toUriEncoding first, then encodes the sorts and pagination parameters, if provided.

      Parameters

      • Optionalsorts: SortDescriptor[]

        optional sort settings to use

      • Optionalpagination: Pagination

        optional pagination settings to use

      • OptionalpropertyName: string

        an optional object property prefix to add to all properties

      • OptionalcallbackFn: PropMapUriEncodingCallbackFn

        An optional function that will be called for each property. The function will be passed property name and value arguments, and must return either undefined to skip the property, a 2-element array with the property name and value to use, or anything else to use the property as-is.

      Returns string

      the URI encoded string