{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Location.Types.MapConfiguration
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Location.Types.MapConfiguration where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Specifies the map tile style selected from an available provider.
--
-- /See:/ 'newMapConfiguration' smart constructor.
data MapConfiguration = MapConfiguration'
  { -- | Specifies the map style selected from an available data provider.
    --
    -- Valid
    -- <https://docs.aws.amazon.com/location/latest/developerguide/esri.html Esri map styles>:
    --
    -- -   @VectorEsriDarkGrayCanvas@ – The Esri Dark Gray Canvas map style. A
    --     vector basemap with a dark gray, neutral background with minimal
    --     colors, labels, and features that\'s designed to draw attention to
    --     your thematic content.
    --
    -- -   @RasterEsriImagery@ – The Esri Imagery map style. A raster basemap
    --     that provides one meter or better satellite and aerial imagery in
    --     many parts of the world and lower resolution satellite imagery
    --     worldwide.
    --
    -- -   @VectorEsriLightGrayCanvas@ – The Esri Light Gray Canvas map style,
    --     which provides a detailed vector basemap with a light gray, neutral
    --     background style with minimal colors, labels, and features that\'s
    --     designed to draw attention to your thematic content.
    --
    -- -   @VectorEsriTopographic@ – The Esri Light map style, which provides a
    --     detailed vector basemap with a classic Esri map style.
    --
    -- -   @VectorEsriStreets@ – The Esri World Streets map style, which
    --     provides a detailed vector basemap for the world symbolized with a
    --     classic Esri street map style. The vector tile layer is similar in
    --     content and style to the World Street Map raster map.
    --
    -- -   @VectorEsriNavigation@ – The Esri World Navigation map style, which
    --     provides a detailed basemap for the world symbolized with a custom
    --     navigation map style that\'s designed for use during the day in
    --     mobile devices.
    --
    -- Valid
    -- <https://docs.aws.amazon.com/location/latest/developerguide/HERE.html HERE Technologies map styles>:
    --
    -- -   @VectorHereBerlin@ – The HERE Berlin map style is a high contrast
    --     detailed base map of the world that blends 3D and 2D rendering.
    --
    --     When using HERE as your data provider, and selecting the Style
    --     @VectorHereBerlin@, you may not use HERE Technologies maps for Asset
    --     Management. See the
    --     <https://aws.amazon.com/service-terms/ AWS Service Terms> for Amazon
    --     Location Service.
    MapConfiguration -> Text
style :: Prelude.Text
  }
  deriving (MapConfiguration -> MapConfiguration -> Bool
(MapConfiguration -> MapConfiguration -> Bool)
-> (MapConfiguration -> MapConfiguration -> Bool)
-> Eq MapConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MapConfiguration -> MapConfiguration -> Bool
$c/= :: MapConfiguration -> MapConfiguration -> Bool
== :: MapConfiguration -> MapConfiguration -> Bool
$c== :: MapConfiguration -> MapConfiguration -> Bool
Prelude.Eq, ReadPrec [MapConfiguration]
ReadPrec MapConfiguration
Int -> ReadS MapConfiguration
ReadS [MapConfiguration]
(Int -> ReadS MapConfiguration)
-> ReadS [MapConfiguration]
-> ReadPrec MapConfiguration
-> ReadPrec [MapConfiguration]
-> Read MapConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MapConfiguration]
$creadListPrec :: ReadPrec [MapConfiguration]
readPrec :: ReadPrec MapConfiguration
$creadPrec :: ReadPrec MapConfiguration
readList :: ReadS [MapConfiguration]
$creadList :: ReadS [MapConfiguration]
readsPrec :: Int -> ReadS MapConfiguration
$creadsPrec :: Int -> ReadS MapConfiguration
Prelude.Read, Int -> MapConfiguration -> ShowS
[MapConfiguration] -> ShowS
MapConfiguration -> String
(Int -> MapConfiguration -> ShowS)
-> (MapConfiguration -> String)
-> ([MapConfiguration] -> ShowS)
-> Show MapConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MapConfiguration] -> ShowS
$cshowList :: [MapConfiguration] -> ShowS
show :: MapConfiguration -> String
$cshow :: MapConfiguration -> String
showsPrec :: Int -> MapConfiguration -> ShowS
$cshowsPrec :: Int -> MapConfiguration -> ShowS
Prelude.Show, (forall x. MapConfiguration -> Rep MapConfiguration x)
-> (forall x. Rep MapConfiguration x -> MapConfiguration)
-> Generic MapConfiguration
forall x. Rep MapConfiguration x -> MapConfiguration
forall x. MapConfiguration -> Rep MapConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MapConfiguration x -> MapConfiguration
$cfrom :: forall x. MapConfiguration -> Rep MapConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'MapConfiguration' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'style', 'mapConfiguration_style' - Specifies the map style selected from an available data provider.
--
-- Valid
-- <https://docs.aws.amazon.com/location/latest/developerguide/esri.html Esri map styles>:
--
-- -   @VectorEsriDarkGrayCanvas@ – The Esri Dark Gray Canvas map style. A
--     vector basemap with a dark gray, neutral background with minimal
--     colors, labels, and features that\'s designed to draw attention to
--     your thematic content.
--
-- -   @RasterEsriImagery@ – The Esri Imagery map style. A raster basemap
--     that provides one meter or better satellite and aerial imagery in
--     many parts of the world and lower resolution satellite imagery
--     worldwide.
--
-- -   @VectorEsriLightGrayCanvas@ – The Esri Light Gray Canvas map style,
--     which provides a detailed vector basemap with a light gray, neutral
--     background style with minimal colors, labels, and features that\'s
--     designed to draw attention to your thematic content.
--
-- -   @VectorEsriTopographic@ – The Esri Light map style, which provides a
--     detailed vector basemap with a classic Esri map style.
--
-- -   @VectorEsriStreets@ – The Esri World Streets map style, which
--     provides a detailed vector basemap for the world symbolized with a
--     classic Esri street map style. The vector tile layer is similar in
--     content and style to the World Street Map raster map.
--
-- -   @VectorEsriNavigation@ – The Esri World Navigation map style, which
--     provides a detailed basemap for the world symbolized with a custom
--     navigation map style that\'s designed for use during the day in
--     mobile devices.
--
-- Valid
-- <https://docs.aws.amazon.com/location/latest/developerguide/HERE.html HERE Technologies map styles>:
--
-- -   @VectorHereBerlin@ – The HERE Berlin map style is a high contrast
--     detailed base map of the world that blends 3D and 2D rendering.
--
--     When using HERE as your data provider, and selecting the Style
--     @VectorHereBerlin@, you may not use HERE Technologies maps for Asset
--     Management. See the
--     <https://aws.amazon.com/service-terms/ AWS Service Terms> for Amazon
--     Location Service.
newMapConfiguration ::
  -- | 'style'
  Prelude.Text ->
  MapConfiguration
newMapConfiguration :: Text -> MapConfiguration
newMapConfiguration Text
pStyle_ =
  MapConfiguration' :: Text -> MapConfiguration
MapConfiguration' {$sel:style:MapConfiguration' :: Text
style = Text
pStyle_}

-- | Specifies the map style selected from an available data provider.
--
-- Valid
-- <https://docs.aws.amazon.com/location/latest/developerguide/esri.html Esri map styles>:
--
-- -   @VectorEsriDarkGrayCanvas@ – The Esri Dark Gray Canvas map style. A
--     vector basemap with a dark gray, neutral background with minimal
--     colors, labels, and features that\'s designed to draw attention to
--     your thematic content.
--
-- -   @RasterEsriImagery@ – The Esri Imagery map style. A raster basemap
--     that provides one meter or better satellite and aerial imagery in
--     many parts of the world and lower resolution satellite imagery
--     worldwide.
--
-- -   @VectorEsriLightGrayCanvas@ – The Esri Light Gray Canvas map style,
--     which provides a detailed vector basemap with a light gray, neutral
--     background style with minimal colors, labels, and features that\'s
--     designed to draw attention to your thematic content.
--
-- -   @VectorEsriTopographic@ – The Esri Light map style, which provides a
--     detailed vector basemap with a classic Esri map style.
--
-- -   @VectorEsriStreets@ – The Esri World Streets map style, which
--     provides a detailed vector basemap for the world symbolized with a
--     classic Esri street map style. The vector tile layer is similar in
--     content and style to the World Street Map raster map.
--
-- -   @VectorEsriNavigation@ – The Esri World Navigation map style, which
--     provides a detailed basemap for the world symbolized with a custom
--     navigation map style that\'s designed for use during the day in
--     mobile devices.
--
-- Valid
-- <https://docs.aws.amazon.com/location/latest/developerguide/HERE.html HERE Technologies map styles>:
--
-- -   @VectorHereBerlin@ – The HERE Berlin map style is a high contrast
--     detailed base map of the world that blends 3D and 2D rendering.
--
--     When using HERE as your data provider, and selecting the Style
--     @VectorHereBerlin@, you may not use HERE Technologies maps for Asset
--     Management. See the
--     <https://aws.amazon.com/service-terms/ AWS Service Terms> for Amazon
--     Location Service.
mapConfiguration_style :: Lens.Lens' MapConfiguration Prelude.Text
mapConfiguration_style :: (Text -> f Text) -> MapConfiguration -> f MapConfiguration
mapConfiguration_style = (MapConfiguration -> Text)
-> (MapConfiguration -> Text -> MapConfiguration)
-> Lens MapConfiguration MapConfiguration Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MapConfiguration' {Text
style :: Text
$sel:style:MapConfiguration' :: MapConfiguration -> Text
style} -> Text
style) (\s :: MapConfiguration
s@MapConfiguration' {} Text
a -> MapConfiguration
s {$sel:style:MapConfiguration' :: Text
style = Text
a} :: MapConfiguration)

instance Core.FromJSON MapConfiguration where
  parseJSON :: Value -> Parser MapConfiguration
parseJSON =
    String
-> (Object -> Parser MapConfiguration)
-> Value
-> Parser MapConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"MapConfiguration"
      ( \Object
x ->
          Text -> MapConfiguration
MapConfiguration' (Text -> MapConfiguration)
-> Parser Text -> Parser MapConfiguration
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Style")
      )

instance Prelude.Hashable MapConfiguration

instance Prelude.NFData MapConfiguration

instance Core.ToJSON MapConfiguration where
  toJSON :: MapConfiguration -> Value
toJSON MapConfiguration' {Text
style :: Text
$sel:style:MapConfiguration' :: MapConfiguration -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Style" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
style)]
      )