{-# 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.ListMapsResponseEntry
-- 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.ListMapsResponseEntry where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Location.Types.PricingPlan
import qualified Amazonka.Prelude as Prelude

-- | Contains details of an existing map resource in your AWS account.
--
-- /See:/ 'newListMapsResponseEntry' smart constructor.
data ListMapsResponseEntry = ListMapsResponseEntry'
  { -- | The timestamp for when the map resource was created in
    -- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
    -- format: @YYYY-MM-DDThh:mm:ss.sssZ@.
    ListMapsResponseEntry -> POSIX
createTime :: Core.POSIX,
    -- | Specifies the data provider for the associated map tiles.
    ListMapsResponseEntry -> Text
dataSource :: Prelude.Text,
    -- | The description for the map resource.
    ListMapsResponseEntry -> Text
description :: Prelude.Text,
    -- | The name of the associated map resource.
    ListMapsResponseEntry -> Text
mapName :: Prelude.Text,
    -- | The pricing plan for the specified map resource.
    --
    -- For additional details and restrictions on each pricing plan option, see
    -- <https://aws.amazon.com/location/pricing/ Amazon Location Service pricing>.
    ListMapsResponseEntry -> PricingPlan
pricingPlan :: PricingPlan,
    -- | The timestamp for when the map resource was last updated in
    -- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
    -- format: @YYYY-MM-DDThh:mm:ss.sssZ@.
    ListMapsResponseEntry -> POSIX
updateTime :: Core.POSIX
  }
  deriving (ListMapsResponseEntry -> ListMapsResponseEntry -> Bool
(ListMapsResponseEntry -> ListMapsResponseEntry -> Bool)
-> (ListMapsResponseEntry -> ListMapsResponseEntry -> Bool)
-> Eq ListMapsResponseEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMapsResponseEntry -> ListMapsResponseEntry -> Bool
$c/= :: ListMapsResponseEntry -> ListMapsResponseEntry -> Bool
== :: ListMapsResponseEntry -> ListMapsResponseEntry -> Bool
$c== :: ListMapsResponseEntry -> ListMapsResponseEntry -> Bool
Prelude.Eq, ReadPrec [ListMapsResponseEntry]
ReadPrec ListMapsResponseEntry
Int -> ReadS ListMapsResponseEntry
ReadS [ListMapsResponseEntry]
(Int -> ReadS ListMapsResponseEntry)
-> ReadS [ListMapsResponseEntry]
-> ReadPrec ListMapsResponseEntry
-> ReadPrec [ListMapsResponseEntry]
-> Read ListMapsResponseEntry
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMapsResponseEntry]
$creadListPrec :: ReadPrec [ListMapsResponseEntry]
readPrec :: ReadPrec ListMapsResponseEntry
$creadPrec :: ReadPrec ListMapsResponseEntry
readList :: ReadS [ListMapsResponseEntry]
$creadList :: ReadS [ListMapsResponseEntry]
readsPrec :: Int -> ReadS ListMapsResponseEntry
$creadsPrec :: Int -> ReadS ListMapsResponseEntry
Prelude.Read, Int -> ListMapsResponseEntry -> ShowS
[ListMapsResponseEntry] -> ShowS
ListMapsResponseEntry -> String
(Int -> ListMapsResponseEntry -> ShowS)
-> (ListMapsResponseEntry -> String)
-> ([ListMapsResponseEntry] -> ShowS)
-> Show ListMapsResponseEntry
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMapsResponseEntry] -> ShowS
$cshowList :: [ListMapsResponseEntry] -> ShowS
show :: ListMapsResponseEntry -> String
$cshow :: ListMapsResponseEntry -> String
showsPrec :: Int -> ListMapsResponseEntry -> ShowS
$cshowsPrec :: Int -> ListMapsResponseEntry -> ShowS
Prelude.Show, (forall x. ListMapsResponseEntry -> Rep ListMapsResponseEntry x)
-> (forall x. Rep ListMapsResponseEntry x -> ListMapsResponseEntry)
-> Generic ListMapsResponseEntry
forall x. Rep ListMapsResponseEntry x -> ListMapsResponseEntry
forall x. ListMapsResponseEntry -> Rep ListMapsResponseEntry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListMapsResponseEntry x -> ListMapsResponseEntry
$cfrom :: forall x. ListMapsResponseEntry -> Rep ListMapsResponseEntry x
Prelude.Generic)

-- |
-- Create a value of 'ListMapsResponseEntry' 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:
--
-- 'createTime', 'listMapsResponseEntry_createTime' - The timestamp for when the map resource was created in
-- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
-- format: @YYYY-MM-DDThh:mm:ss.sssZ@.
--
-- 'dataSource', 'listMapsResponseEntry_dataSource' - Specifies the data provider for the associated map tiles.
--
-- 'description', 'listMapsResponseEntry_description' - The description for the map resource.
--
-- 'mapName', 'listMapsResponseEntry_mapName' - The name of the associated map resource.
--
-- 'pricingPlan', 'listMapsResponseEntry_pricingPlan' - The pricing plan for the specified map resource.
--
-- For additional details and restrictions on each pricing plan option, see
-- <https://aws.amazon.com/location/pricing/ Amazon Location Service pricing>.
--
-- 'updateTime', 'listMapsResponseEntry_updateTime' - The timestamp for when the map resource was last updated in
-- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
-- format: @YYYY-MM-DDThh:mm:ss.sssZ@.
newListMapsResponseEntry ::
  -- | 'createTime'
  Prelude.UTCTime ->
  -- | 'dataSource'
  Prelude.Text ->
  -- | 'description'
  Prelude.Text ->
  -- | 'mapName'
  Prelude.Text ->
  -- | 'pricingPlan'
  PricingPlan ->
  -- | 'updateTime'
  Prelude.UTCTime ->
  ListMapsResponseEntry
newListMapsResponseEntry :: UTCTime
-> Text
-> Text
-> Text
-> PricingPlan
-> UTCTime
-> ListMapsResponseEntry
newListMapsResponseEntry
  UTCTime
pCreateTime_
  Text
pDataSource_
  Text
pDescription_
  Text
pMapName_
  PricingPlan
pPricingPlan_
  UTCTime
pUpdateTime_ =
    ListMapsResponseEntry' :: POSIX
-> Text
-> Text
-> Text
-> PricingPlan
-> POSIX
-> ListMapsResponseEntry
ListMapsResponseEntry'
      { $sel:createTime:ListMapsResponseEntry' :: POSIX
createTime =
          Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreateTime_,
        $sel:dataSource:ListMapsResponseEntry' :: Text
dataSource = Text
pDataSource_,
        $sel:description:ListMapsResponseEntry' :: Text
description = Text
pDescription_,
        $sel:mapName:ListMapsResponseEntry' :: Text
mapName = Text
pMapName_,
        $sel:pricingPlan:ListMapsResponseEntry' :: PricingPlan
pricingPlan = PricingPlan
pPricingPlan_,
        $sel:updateTime:ListMapsResponseEntry' :: POSIX
updateTime = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pUpdateTime_
      }

-- | The timestamp for when the map resource was created in
-- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
-- format: @YYYY-MM-DDThh:mm:ss.sssZ@.
listMapsResponseEntry_createTime :: Lens.Lens' ListMapsResponseEntry Prelude.UTCTime
listMapsResponseEntry_createTime :: (UTCTime -> f UTCTime)
-> ListMapsResponseEntry -> f ListMapsResponseEntry
listMapsResponseEntry_createTime = (ListMapsResponseEntry -> POSIX)
-> (ListMapsResponseEntry -> POSIX -> ListMapsResponseEntry)
-> Lens ListMapsResponseEntry ListMapsResponseEntry POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMapsResponseEntry' {POSIX
createTime :: POSIX
$sel:createTime:ListMapsResponseEntry' :: ListMapsResponseEntry -> POSIX
createTime} -> POSIX
createTime) (\s :: ListMapsResponseEntry
s@ListMapsResponseEntry' {} POSIX
a -> ListMapsResponseEntry
s {$sel:createTime:ListMapsResponseEntry' :: POSIX
createTime = POSIX
a} :: ListMapsResponseEntry) ((POSIX -> f POSIX)
 -> ListMapsResponseEntry -> f ListMapsResponseEntry)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> ListMapsResponseEntry
-> f ListMapsResponseEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Specifies the data provider for the associated map tiles.
listMapsResponseEntry_dataSource :: Lens.Lens' ListMapsResponseEntry Prelude.Text
listMapsResponseEntry_dataSource :: (Text -> f Text)
-> ListMapsResponseEntry -> f ListMapsResponseEntry
listMapsResponseEntry_dataSource = (ListMapsResponseEntry -> Text)
-> (ListMapsResponseEntry -> Text -> ListMapsResponseEntry)
-> Lens ListMapsResponseEntry ListMapsResponseEntry Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMapsResponseEntry' {Text
dataSource :: Text
$sel:dataSource:ListMapsResponseEntry' :: ListMapsResponseEntry -> Text
dataSource} -> Text
dataSource) (\s :: ListMapsResponseEntry
s@ListMapsResponseEntry' {} Text
a -> ListMapsResponseEntry
s {$sel:dataSource:ListMapsResponseEntry' :: Text
dataSource = Text
a} :: ListMapsResponseEntry)

-- | The description for the map resource.
listMapsResponseEntry_description :: Lens.Lens' ListMapsResponseEntry Prelude.Text
listMapsResponseEntry_description :: (Text -> f Text)
-> ListMapsResponseEntry -> f ListMapsResponseEntry
listMapsResponseEntry_description = (ListMapsResponseEntry -> Text)
-> (ListMapsResponseEntry -> Text -> ListMapsResponseEntry)
-> Lens ListMapsResponseEntry ListMapsResponseEntry Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMapsResponseEntry' {Text
description :: Text
$sel:description:ListMapsResponseEntry' :: ListMapsResponseEntry -> Text
description} -> Text
description) (\s :: ListMapsResponseEntry
s@ListMapsResponseEntry' {} Text
a -> ListMapsResponseEntry
s {$sel:description:ListMapsResponseEntry' :: Text
description = Text
a} :: ListMapsResponseEntry)

-- | The name of the associated map resource.
listMapsResponseEntry_mapName :: Lens.Lens' ListMapsResponseEntry Prelude.Text
listMapsResponseEntry_mapName :: (Text -> f Text)
-> ListMapsResponseEntry -> f ListMapsResponseEntry
listMapsResponseEntry_mapName = (ListMapsResponseEntry -> Text)
-> (ListMapsResponseEntry -> Text -> ListMapsResponseEntry)
-> Lens ListMapsResponseEntry ListMapsResponseEntry Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMapsResponseEntry' {Text
mapName :: Text
$sel:mapName:ListMapsResponseEntry' :: ListMapsResponseEntry -> Text
mapName} -> Text
mapName) (\s :: ListMapsResponseEntry
s@ListMapsResponseEntry' {} Text
a -> ListMapsResponseEntry
s {$sel:mapName:ListMapsResponseEntry' :: Text
mapName = Text
a} :: ListMapsResponseEntry)

-- | The pricing plan for the specified map resource.
--
-- For additional details and restrictions on each pricing plan option, see
-- <https://aws.amazon.com/location/pricing/ Amazon Location Service pricing>.
listMapsResponseEntry_pricingPlan :: Lens.Lens' ListMapsResponseEntry PricingPlan
listMapsResponseEntry_pricingPlan :: (PricingPlan -> f PricingPlan)
-> ListMapsResponseEntry -> f ListMapsResponseEntry
listMapsResponseEntry_pricingPlan = (ListMapsResponseEntry -> PricingPlan)
-> (ListMapsResponseEntry -> PricingPlan -> ListMapsResponseEntry)
-> Lens
     ListMapsResponseEntry ListMapsResponseEntry PricingPlan PricingPlan
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMapsResponseEntry' {PricingPlan
pricingPlan :: PricingPlan
$sel:pricingPlan:ListMapsResponseEntry' :: ListMapsResponseEntry -> PricingPlan
pricingPlan} -> PricingPlan
pricingPlan) (\s :: ListMapsResponseEntry
s@ListMapsResponseEntry' {} PricingPlan
a -> ListMapsResponseEntry
s {$sel:pricingPlan:ListMapsResponseEntry' :: PricingPlan
pricingPlan = PricingPlan
a} :: ListMapsResponseEntry)

-- | The timestamp for when the map resource was last updated in
-- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
-- format: @YYYY-MM-DDThh:mm:ss.sssZ@.
listMapsResponseEntry_updateTime :: Lens.Lens' ListMapsResponseEntry Prelude.UTCTime
listMapsResponseEntry_updateTime :: (UTCTime -> f UTCTime)
-> ListMapsResponseEntry -> f ListMapsResponseEntry
listMapsResponseEntry_updateTime = (ListMapsResponseEntry -> POSIX)
-> (ListMapsResponseEntry -> POSIX -> ListMapsResponseEntry)
-> Lens ListMapsResponseEntry ListMapsResponseEntry POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMapsResponseEntry' {POSIX
updateTime :: POSIX
$sel:updateTime:ListMapsResponseEntry' :: ListMapsResponseEntry -> POSIX
updateTime} -> POSIX
updateTime) (\s :: ListMapsResponseEntry
s@ListMapsResponseEntry' {} POSIX
a -> ListMapsResponseEntry
s {$sel:updateTime:ListMapsResponseEntry' :: POSIX
updateTime = POSIX
a} :: ListMapsResponseEntry) ((POSIX -> f POSIX)
 -> ListMapsResponseEntry -> f ListMapsResponseEntry)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> ListMapsResponseEntry
-> f ListMapsResponseEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

instance Core.FromJSON ListMapsResponseEntry where
  parseJSON :: Value -> Parser ListMapsResponseEntry
parseJSON =
    String
-> (Object -> Parser ListMapsResponseEntry)
-> Value
-> Parser ListMapsResponseEntry
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ListMapsResponseEntry"
      ( \Object
x ->
          POSIX
-> Text
-> Text
-> Text
-> PricingPlan
-> POSIX
-> ListMapsResponseEntry
ListMapsResponseEntry'
            (POSIX
 -> Text
 -> Text
 -> Text
 -> PricingPlan
 -> POSIX
 -> ListMapsResponseEntry)
-> Parser POSIX
-> Parser
     (Text
      -> Text -> Text -> PricingPlan -> POSIX -> ListMapsResponseEntry)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"CreateTime")
            Parser
  (Text
   -> Text -> Text -> PricingPlan -> POSIX -> ListMapsResponseEntry)
-> Parser Text
-> Parser
     (Text -> Text -> PricingPlan -> POSIX -> ListMapsResponseEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"DataSource")
            Parser
  (Text -> Text -> PricingPlan -> POSIX -> ListMapsResponseEntry)
-> Parser Text
-> Parser (Text -> PricingPlan -> POSIX -> ListMapsResponseEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Description")
            Parser (Text -> PricingPlan -> POSIX -> ListMapsResponseEntry)
-> Parser Text
-> Parser (PricingPlan -> POSIX -> ListMapsResponseEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"MapName")
            Parser (PricingPlan -> POSIX -> ListMapsResponseEntry)
-> Parser PricingPlan -> Parser (POSIX -> ListMapsResponseEntry)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser PricingPlan
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"PricingPlan")
            Parser (POSIX -> ListMapsResponseEntry)
-> Parser POSIX -> Parser ListMapsResponseEntry
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser POSIX
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"UpdateTime")
      )

instance Prelude.Hashable ListMapsResponseEntry

instance Prelude.NFData ListMapsResponseEntry