{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# 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.DescribeRouteCalculator
-- 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)
--
-- Retrieves the route calculator resource details.
module Amazonka.Location.DescribeRouteCalculator
  ( -- * Creating a Request
    DescribeRouteCalculator (..),
    newDescribeRouteCalculator,

    -- * Request Lenses
    describeRouteCalculator_calculatorName,

    -- * Destructuring the Response
    DescribeRouteCalculatorResponse (..),
    newDescribeRouteCalculatorResponse,

    -- * Response Lenses
    describeRouteCalculatorResponse_tags,
    describeRouteCalculatorResponse_httpStatus,
    describeRouteCalculatorResponse_calculatorArn,
    describeRouteCalculatorResponse_calculatorName,
    describeRouteCalculatorResponse_createTime,
    describeRouteCalculatorResponse_dataSource,
    describeRouteCalculatorResponse_description,
    describeRouteCalculatorResponse_pricingPlan,
    describeRouteCalculatorResponse_updateTime,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Location.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDescribeRouteCalculator' smart constructor.
data DescribeRouteCalculator = DescribeRouteCalculator'
  { -- | The name of the route calculator resource.
    DescribeRouteCalculator -> Text
calculatorName :: Prelude.Text
  }
  deriving (DescribeRouteCalculator -> DescribeRouteCalculator -> Bool
(DescribeRouteCalculator -> DescribeRouteCalculator -> Bool)
-> (DescribeRouteCalculator -> DescribeRouteCalculator -> Bool)
-> Eq DescribeRouteCalculator
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeRouteCalculator -> DescribeRouteCalculator -> Bool
$c/= :: DescribeRouteCalculator -> DescribeRouteCalculator -> Bool
== :: DescribeRouteCalculator -> DescribeRouteCalculator -> Bool
$c== :: DescribeRouteCalculator -> DescribeRouteCalculator -> Bool
Prelude.Eq, ReadPrec [DescribeRouteCalculator]
ReadPrec DescribeRouteCalculator
Int -> ReadS DescribeRouteCalculator
ReadS [DescribeRouteCalculator]
(Int -> ReadS DescribeRouteCalculator)
-> ReadS [DescribeRouteCalculator]
-> ReadPrec DescribeRouteCalculator
-> ReadPrec [DescribeRouteCalculator]
-> Read DescribeRouteCalculator
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeRouteCalculator]
$creadListPrec :: ReadPrec [DescribeRouteCalculator]
readPrec :: ReadPrec DescribeRouteCalculator
$creadPrec :: ReadPrec DescribeRouteCalculator
readList :: ReadS [DescribeRouteCalculator]
$creadList :: ReadS [DescribeRouteCalculator]
readsPrec :: Int -> ReadS DescribeRouteCalculator
$creadsPrec :: Int -> ReadS DescribeRouteCalculator
Prelude.Read, Int -> DescribeRouteCalculator -> ShowS
[DescribeRouteCalculator] -> ShowS
DescribeRouteCalculator -> String
(Int -> DescribeRouteCalculator -> ShowS)
-> (DescribeRouteCalculator -> String)
-> ([DescribeRouteCalculator] -> ShowS)
-> Show DescribeRouteCalculator
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeRouteCalculator] -> ShowS
$cshowList :: [DescribeRouteCalculator] -> ShowS
show :: DescribeRouteCalculator -> String
$cshow :: DescribeRouteCalculator -> String
showsPrec :: Int -> DescribeRouteCalculator -> ShowS
$cshowsPrec :: Int -> DescribeRouteCalculator -> ShowS
Prelude.Show, (forall x.
 DescribeRouteCalculator -> Rep DescribeRouteCalculator x)
-> (forall x.
    Rep DescribeRouteCalculator x -> DescribeRouteCalculator)
-> Generic DescribeRouteCalculator
forall x. Rep DescribeRouteCalculator x -> DescribeRouteCalculator
forall x. DescribeRouteCalculator -> Rep DescribeRouteCalculator x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeRouteCalculator x -> DescribeRouteCalculator
$cfrom :: forall x. DescribeRouteCalculator -> Rep DescribeRouteCalculator x
Prelude.Generic)

-- |
-- Create a value of 'DescribeRouteCalculator' 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:
--
-- 'calculatorName', 'describeRouteCalculator_calculatorName' - The name of the route calculator resource.
newDescribeRouteCalculator ::
  -- | 'calculatorName'
  Prelude.Text ->
  DescribeRouteCalculator
newDescribeRouteCalculator :: Text -> DescribeRouteCalculator
newDescribeRouteCalculator Text
pCalculatorName_ =
  DescribeRouteCalculator' :: Text -> DescribeRouteCalculator
DescribeRouteCalculator'
    { $sel:calculatorName:DescribeRouteCalculator' :: Text
calculatorName =
        Text
pCalculatorName_
    }

-- | The name of the route calculator resource.
describeRouteCalculator_calculatorName :: Lens.Lens' DescribeRouteCalculator Prelude.Text
describeRouteCalculator_calculatorName :: (Text -> f Text)
-> DescribeRouteCalculator -> f DescribeRouteCalculator
describeRouteCalculator_calculatorName = (DescribeRouteCalculator -> Text)
-> (DescribeRouteCalculator -> Text -> DescribeRouteCalculator)
-> Lens DescribeRouteCalculator DescribeRouteCalculator Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRouteCalculator' {Text
calculatorName :: Text
$sel:calculatorName:DescribeRouteCalculator' :: DescribeRouteCalculator -> Text
calculatorName} -> Text
calculatorName) (\s :: DescribeRouteCalculator
s@DescribeRouteCalculator' {} Text
a -> DescribeRouteCalculator
s {$sel:calculatorName:DescribeRouteCalculator' :: Text
calculatorName = Text
a} :: DescribeRouteCalculator)

instance Core.AWSRequest DescribeRouteCalculator where
  type
    AWSResponse DescribeRouteCalculator =
      DescribeRouteCalculatorResponse
  request :: DescribeRouteCalculator -> Request DescribeRouteCalculator
request = Service
-> DescribeRouteCalculator -> Request DescribeRouteCalculator
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeRouteCalculator
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeRouteCalculator)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeRouteCalculator))
-> Logger
-> Service
-> Proxy DescribeRouteCalculator
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeRouteCalculator)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe (HashMap Text Text)
-> Int
-> Text
-> Text
-> POSIX
-> Text
-> Text
-> PricingPlan
-> POSIX
-> DescribeRouteCalculatorResponse
DescribeRouteCalculatorResponse'
            (Maybe (HashMap Text Text)
 -> Int
 -> Text
 -> Text
 -> POSIX
 -> Text
 -> Text
 -> PricingPlan
 -> POSIX
 -> DescribeRouteCalculatorResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either
     String
     (Int
      -> Text
      -> Text
      -> POSIX
      -> Text
      -> Text
      -> PricingPlan
      -> POSIX
      -> DescribeRouteCalculatorResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Int
   -> Text
   -> Text
   -> POSIX
   -> Text
   -> Text
   -> PricingPlan
   -> POSIX
   -> DescribeRouteCalculatorResponse)
-> Either String Int
-> Either
     String
     (Text
      -> Text
      -> POSIX
      -> Text
      -> Text
      -> PricingPlan
      -> POSIX
      -> DescribeRouteCalculatorResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            Either
  String
  (Text
   -> Text
   -> POSIX
   -> Text
   -> Text
   -> PricingPlan
   -> POSIX
   -> DescribeRouteCalculatorResponse)
-> Either String Text
-> Either
     String
     (Text
      -> POSIX
      -> Text
      -> Text
      -> PricingPlan
      -> POSIX
      -> DescribeRouteCalculatorResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"CalculatorArn")
            Either
  String
  (Text
   -> POSIX
   -> Text
   -> Text
   -> PricingPlan
   -> POSIX
   -> DescribeRouteCalculatorResponse)
-> Either String Text
-> Either
     String
     (POSIX
      -> Text
      -> Text
      -> PricingPlan
      -> POSIX
      -> DescribeRouteCalculatorResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"CalculatorName")
            Either
  String
  (POSIX
   -> Text
   -> Text
   -> PricingPlan
   -> POSIX
   -> DescribeRouteCalculatorResponse)
-> Either String POSIX
-> Either
     String
     (Text
      -> Text -> PricingPlan -> POSIX -> DescribeRouteCalculatorResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String POSIX
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"CreateTime")
            Either
  String
  (Text
   -> Text -> PricingPlan -> POSIX -> DescribeRouteCalculatorResponse)
-> Either String Text
-> Either
     String
     (Text -> PricingPlan -> POSIX -> DescribeRouteCalculatorResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"DataSource")
            Either
  String
  (Text -> PricingPlan -> POSIX -> DescribeRouteCalculatorResponse)
-> Either String Text
-> Either
     String (PricingPlan -> POSIX -> DescribeRouteCalculatorResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"Description")
            Either
  String (PricingPlan -> POSIX -> DescribeRouteCalculatorResponse)
-> Either String PricingPlan
-> Either String (POSIX -> DescribeRouteCalculatorResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String PricingPlan
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"PricingPlan")
            Either String (POSIX -> DescribeRouteCalculatorResponse)
-> Either String POSIX
-> Either String DescribeRouteCalculatorResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String POSIX
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"UpdateTime")
      )

instance Prelude.Hashable DescribeRouteCalculator

instance Prelude.NFData DescribeRouteCalculator

instance Core.ToHeaders DescribeRouteCalculator where
  toHeaders :: DescribeRouteCalculator -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeRouteCalculator -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToPath DescribeRouteCalculator where
  toPath :: DescribeRouteCalculator -> ByteString
toPath DescribeRouteCalculator' {Text
calculatorName :: Text
$sel:calculatorName:DescribeRouteCalculator' :: DescribeRouteCalculator -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/routes/v0/calculators/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
calculatorName]

instance Core.ToQuery DescribeRouteCalculator where
  toQuery :: DescribeRouteCalculator -> QueryString
toQuery = QueryString -> DescribeRouteCalculator -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newDescribeRouteCalculatorResponse' smart constructor.
data DescribeRouteCalculatorResponse = DescribeRouteCalculatorResponse'
  { -- | Tags associated with route calculator resource.
    DescribeRouteCalculatorResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    DescribeRouteCalculatorResponse -> Int
httpStatus :: Prelude.Int,
    -- | The Amazon Resource Name (ARN) for the Route calculator resource. Use
    -- the ARN when you specify a resource across AWS.
    --
    -- -   Format example:
    --     @arn:aws:geo:region:account-id:route-calculator\/ExampleCalculator@
    DescribeRouteCalculatorResponse -> Text
calculatorArn :: Prelude.Text,
    -- | The name of the route calculator resource being described.
    DescribeRouteCalculatorResponse -> Text
calculatorName :: Prelude.Text,
    -- | The timestamp when the route calculator resource was created in
    -- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
    -- format: @YYYY-MM-DDThh:mm:ss.sssZ@.
    --
    -- -   For example, @2020–07-2T12:15:20.000Z+01:00@
    DescribeRouteCalculatorResponse -> POSIX
createTime :: Core.POSIX,
    -- | The data provider of traffic and road network data. Indicates one of the
    -- available providers:
    --
    -- -   @Esri@
    --
    -- -   @Here@
    --
    -- For more information about data providers, see
    -- <https://docs.aws.amazon.com/location/latest/developerguide/what-is-data-provider.html Amazon Location Service data providers>.
    DescribeRouteCalculatorResponse -> Text
dataSource :: Prelude.Text,
    -- | The optional description of the route calculator resource.
    DescribeRouteCalculatorResponse -> Text
description :: Prelude.Text,
    -- | The pricing plan selected for the specified route calculator resource.
    --
    -- For additional details and restrictions on each pricing plan option, see
    -- <https://aws.amazon.com/location/pricing/ Amazon Location Service pricing>.
    DescribeRouteCalculatorResponse -> PricingPlan
pricingPlan :: PricingPlan,
    -- | The timestamp when the route calculator 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@.
    --
    -- -   For example, @2020–07-2T12:15:20.000Z+01:00@
    DescribeRouteCalculatorResponse -> POSIX
updateTime :: Core.POSIX
  }
  deriving (DescribeRouteCalculatorResponse
-> DescribeRouteCalculatorResponse -> Bool
(DescribeRouteCalculatorResponse
 -> DescribeRouteCalculatorResponse -> Bool)
-> (DescribeRouteCalculatorResponse
    -> DescribeRouteCalculatorResponse -> Bool)
-> Eq DescribeRouteCalculatorResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeRouteCalculatorResponse
-> DescribeRouteCalculatorResponse -> Bool
$c/= :: DescribeRouteCalculatorResponse
-> DescribeRouteCalculatorResponse -> Bool
== :: DescribeRouteCalculatorResponse
-> DescribeRouteCalculatorResponse -> Bool
$c== :: DescribeRouteCalculatorResponse
-> DescribeRouteCalculatorResponse -> Bool
Prelude.Eq, ReadPrec [DescribeRouteCalculatorResponse]
ReadPrec DescribeRouteCalculatorResponse
Int -> ReadS DescribeRouteCalculatorResponse
ReadS [DescribeRouteCalculatorResponse]
(Int -> ReadS DescribeRouteCalculatorResponse)
-> ReadS [DescribeRouteCalculatorResponse]
-> ReadPrec DescribeRouteCalculatorResponse
-> ReadPrec [DescribeRouteCalculatorResponse]
-> Read DescribeRouteCalculatorResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeRouteCalculatorResponse]
$creadListPrec :: ReadPrec [DescribeRouteCalculatorResponse]
readPrec :: ReadPrec DescribeRouteCalculatorResponse
$creadPrec :: ReadPrec DescribeRouteCalculatorResponse
readList :: ReadS [DescribeRouteCalculatorResponse]
$creadList :: ReadS [DescribeRouteCalculatorResponse]
readsPrec :: Int -> ReadS DescribeRouteCalculatorResponse
$creadsPrec :: Int -> ReadS DescribeRouteCalculatorResponse
Prelude.Read, Int -> DescribeRouteCalculatorResponse -> ShowS
[DescribeRouteCalculatorResponse] -> ShowS
DescribeRouteCalculatorResponse -> String
(Int -> DescribeRouteCalculatorResponse -> ShowS)
-> (DescribeRouteCalculatorResponse -> String)
-> ([DescribeRouteCalculatorResponse] -> ShowS)
-> Show DescribeRouteCalculatorResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeRouteCalculatorResponse] -> ShowS
$cshowList :: [DescribeRouteCalculatorResponse] -> ShowS
show :: DescribeRouteCalculatorResponse -> String
$cshow :: DescribeRouteCalculatorResponse -> String
showsPrec :: Int -> DescribeRouteCalculatorResponse -> ShowS
$cshowsPrec :: Int -> DescribeRouteCalculatorResponse -> ShowS
Prelude.Show, (forall x.
 DescribeRouteCalculatorResponse
 -> Rep DescribeRouteCalculatorResponse x)
-> (forall x.
    Rep DescribeRouteCalculatorResponse x
    -> DescribeRouteCalculatorResponse)
-> Generic DescribeRouteCalculatorResponse
forall x.
Rep DescribeRouteCalculatorResponse x
-> DescribeRouteCalculatorResponse
forall x.
DescribeRouteCalculatorResponse
-> Rep DescribeRouteCalculatorResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeRouteCalculatorResponse x
-> DescribeRouteCalculatorResponse
$cfrom :: forall x.
DescribeRouteCalculatorResponse
-> Rep DescribeRouteCalculatorResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeRouteCalculatorResponse' 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:
--
-- 'tags', 'describeRouteCalculatorResponse_tags' - Tags associated with route calculator resource.
--
-- 'httpStatus', 'describeRouteCalculatorResponse_httpStatus' - The response's http status code.
--
-- 'calculatorArn', 'describeRouteCalculatorResponse_calculatorArn' - The Amazon Resource Name (ARN) for the Route calculator resource. Use
-- the ARN when you specify a resource across AWS.
--
-- -   Format example:
--     @arn:aws:geo:region:account-id:route-calculator\/ExampleCalculator@
--
-- 'calculatorName', 'describeRouteCalculatorResponse_calculatorName' - The name of the route calculator resource being described.
--
-- 'createTime', 'describeRouteCalculatorResponse_createTime' - The timestamp when the route calculator resource was created in
-- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
-- format: @YYYY-MM-DDThh:mm:ss.sssZ@.
--
-- -   For example, @2020–07-2T12:15:20.000Z+01:00@
--
-- 'dataSource', 'describeRouteCalculatorResponse_dataSource' - The data provider of traffic and road network data. Indicates one of the
-- available providers:
--
-- -   @Esri@
--
-- -   @Here@
--
-- For more information about data providers, see
-- <https://docs.aws.amazon.com/location/latest/developerguide/what-is-data-provider.html Amazon Location Service data providers>.
--
-- 'description', 'describeRouteCalculatorResponse_description' - The optional description of the route calculator resource.
--
-- 'pricingPlan', 'describeRouteCalculatorResponse_pricingPlan' - The pricing plan selected for the specified route calculator resource.
--
-- For additional details and restrictions on each pricing plan option, see
-- <https://aws.amazon.com/location/pricing/ Amazon Location Service pricing>.
--
-- 'updateTime', 'describeRouteCalculatorResponse_updateTime' - The timestamp when the route calculator 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@.
--
-- -   For example, @2020–07-2T12:15:20.000Z+01:00@
newDescribeRouteCalculatorResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'calculatorArn'
  Prelude.Text ->
  -- | 'calculatorName'
  Prelude.Text ->
  -- | 'createTime'
  Prelude.UTCTime ->
  -- | 'dataSource'
  Prelude.Text ->
  -- | 'description'
  Prelude.Text ->
  -- | 'pricingPlan'
  PricingPlan ->
  -- | 'updateTime'
  Prelude.UTCTime ->
  DescribeRouteCalculatorResponse
newDescribeRouteCalculatorResponse :: Int
-> Text
-> Text
-> UTCTime
-> Text
-> Text
-> PricingPlan
-> UTCTime
-> DescribeRouteCalculatorResponse
newDescribeRouteCalculatorResponse
  Int
pHttpStatus_
  Text
pCalculatorArn_
  Text
pCalculatorName_
  UTCTime
pCreateTime_
  Text
pDataSource_
  Text
pDescription_
  PricingPlan
pPricingPlan_
  UTCTime
pUpdateTime_ =
    DescribeRouteCalculatorResponse' :: Maybe (HashMap Text Text)
-> Int
-> Text
-> Text
-> POSIX
-> Text
-> Text
-> PricingPlan
-> POSIX
-> DescribeRouteCalculatorResponse
DescribeRouteCalculatorResponse'
      { $sel:tags:DescribeRouteCalculatorResponse' :: Maybe (HashMap Text Text)
tags =
          Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeRouteCalculatorResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:calculatorArn:DescribeRouteCalculatorResponse' :: Text
calculatorArn = Text
pCalculatorArn_,
        $sel:calculatorName:DescribeRouteCalculatorResponse' :: Text
calculatorName = Text
pCalculatorName_,
        $sel:createTime:DescribeRouteCalculatorResponse' :: 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:DescribeRouteCalculatorResponse' :: Text
dataSource = Text
pDataSource_,
        $sel:description:DescribeRouteCalculatorResponse' :: Text
description = Text
pDescription_,
        $sel:pricingPlan:DescribeRouteCalculatorResponse' :: PricingPlan
pricingPlan = PricingPlan
pPricingPlan_,
        $sel:updateTime:DescribeRouteCalculatorResponse' :: 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_
      }

-- | Tags associated with route calculator resource.
describeRouteCalculatorResponse_tags :: Lens.Lens' DescribeRouteCalculatorResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
describeRouteCalculatorResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeRouteCalculatorResponse
-> f DescribeRouteCalculatorResponse
describeRouteCalculatorResponse_tags = (DescribeRouteCalculatorResponse -> Maybe (HashMap Text Text))
-> (DescribeRouteCalculatorResponse
    -> Maybe (HashMap Text Text) -> DescribeRouteCalculatorResponse)
-> Lens
     DescribeRouteCalculatorResponse
     DescribeRouteCalculatorResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRouteCalculatorResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:DescribeRouteCalculatorResponse' :: DescribeRouteCalculatorResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: DescribeRouteCalculatorResponse
s@DescribeRouteCalculatorResponse' {} Maybe (HashMap Text Text)
a -> DescribeRouteCalculatorResponse
s {$sel:tags:DescribeRouteCalculatorResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: DescribeRouteCalculatorResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> DescribeRouteCalculatorResponse
 -> f DescribeRouteCalculatorResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeRouteCalculatorResponse
-> f DescribeRouteCalculatorResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
describeRouteCalculatorResponse_httpStatus :: Lens.Lens' DescribeRouteCalculatorResponse Prelude.Int
describeRouteCalculatorResponse_httpStatus :: (Int -> f Int)
-> DescribeRouteCalculatorResponse
-> f DescribeRouteCalculatorResponse
describeRouteCalculatorResponse_httpStatus = (DescribeRouteCalculatorResponse -> Int)
-> (DescribeRouteCalculatorResponse
    -> Int -> DescribeRouteCalculatorResponse)
-> Lens
     DescribeRouteCalculatorResponse
     DescribeRouteCalculatorResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRouteCalculatorResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeRouteCalculatorResponse' :: DescribeRouteCalculatorResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeRouteCalculatorResponse
s@DescribeRouteCalculatorResponse' {} Int
a -> DescribeRouteCalculatorResponse
s {$sel:httpStatus:DescribeRouteCalculatorResponse' :: Int
httpStatus = Int
a} :: DescribeRouteCalculatorResponse)

-- | The Amazon Resource Name (ARN) for the Route calculator resource. Use
-- the ARN when you specify a resource across AWS.
--
-- -   Format example:
--     @arn:aws:geo:region:account-id:route-calculator\/ExampleCalculator@
describeRouteCalculatorResponse_calculatorArn :: Lens.Lens' DescribeRouteCalculatorResponse Prelude.Text
describeRouteCalculatorResponse_calculatorArn :: (Text -> f Text)
-> DescribeRouteCalculatorResponse
-> f DescribeRouteCalculatorResponse
describeRouteCalculatorResponse_calculatorArn = (DescribeRouteCalculatorResponse -> Text)
-> (DescribeRouteCalculatorResponse
    -> Text -> DescribeRouteCalculatorResponse)
-> Lens
     DescribeRouteCalculatorResponse
     DescribeRouteCalculatorResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRouteCalculatorResponse' {Text
calculatorArn :: Text
$sel:calculatorArn:DescribeRouteCalculatorResponse' :: DescribeRouteCalculatorResponse -> Text
calculatorArn} -> Text
calculatorArn) (\s :: DescribeRouteCalculatorResponse
s@DescribeRouteCalculatorResponse' {} Text
a -> DescribeRouteCalculatorResponse
s {$sel:calculatorArn:DescribeRouteCalculatorResponse' :: Text
calculatorArn = Text
a} :: DescribeRouteCalculatorResponse)

-- | The name of the route calculator resource being described.
describeRouteCalculatorResponse_calculatorName :: Lens.Lens' DescribeRouteCalculatorResponse Prelude.Text
describeRouteCalculatorResponse_calculatorName :: (Text -> f Text)
-> DescribeRouteCalculatorResponse
-> f DescribeRouteCalculatorResponse
describeRouteCalculatorResponse_calculatorName = (DescribeRouteCalculatorResponse -> Text)
-> (DescribeRouteCalculatorResponse
    -> Text -> DescribeRouteCalculatorResponse)
-> Lens
     DescribeRouteCalculatorResponse
     DescribeRouteCalculatorResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRouteCalculatorResponse' {Text
calculatorName :: Text
$sel:calculatorName:DescribeRouteCalculatorResponse' :: DescribeRouteCalculatorResponse -> Text
calculatorName} -> Text
calculatorName) (\s :: DescribeRouteCalculatorResponse
s@DescribeRouteCalculatorResponse' {} Text
a -> DescribeRouteCalculatorResponse
s {$sel:calculatorName:DescribeRouteCalculatorResponse' :: Text
calculatorName = Text
a} :: DescribeRouteCalculatorResponse)

-- | The timestamp when the route calculator resource was created in
-- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
-- format: @YYYY-MM-DDThh:mm:ss.sssZ@.
--
-- -   For example, @2020–07-2T12:15:20.000Z+01:00@
describeRouteCalculatorResponse_createTime :: Lens.Lens' DescribeRouteCalculatorResponse Prelude.UTCTime
describeRouteCalculatorResponse_createTime :: (UTCTime -> f UTCTime)
-> DescribeRouteCalculatorResponse
-> f DescribeRouteCalculatorResponse
describeRouteCalculatorResponse_createTime = (DescribeRouteCalculatorResponse -> POSIX)
-> (DescribeRouteCalculatorResponse
    -> POSIX -> DescribeRouteCalculatorResponse)
-> Lens
     DescribeRouteCalculatorResponse
     DescribeRouteCalculatorResponse
     POSIX
     POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRouteCalculatorResponse' {POSIX
createTime :: POSIX
$sel:createTime:DescribeRouteCalculatorResponse' :: DescribeRouteCalculatorResponse -> POSIX
createTime} -> POSIX
createTime) (\s :: DescribeRouteCalculatorResponse
s@DescribeRouteCalculatorResponse' {} POSIX
a -> DescribeRouteCalculatorResponse
s {$sel:createTime:DescribeRouteCalculatorResponse' :: POSIX
createTime = POSIX
a} :: DescribeRouteCalculatorResponse) ((POSIX -> f POSIX)
 -> DescribeRouteCalculatorResponse
 -> f DescribeRouteCalculatorResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> DescribeRouteCalculatorResponse
-> f DescribeRouteCalculatorResponse
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

-- | The data provider of traffic and road network data. Indicates one of the
-- available providers:
--
-- -   @Esri@
--
-- -   @Here@
--
-- For more information about data providers, see
-- <https://docs.aws.amazon.com/location/latest/developerguide/what-is-data-provider.html Amazon Location Service data providers>.
describeRouteCalculatorResponse_dataSource :: Lens.Lens' DescribeRouteCalculatorResponse Prelude.Text
describeRouteCalculatorResponse_dataSource :: (Text -> f Text)
-> DescribeRouteCalculatorResponse
-> f DescribeRouteCalculatorResponse
describeRouteCalculatorResponse_dataSource = (DescribeRouteCalculatorResponse -> Text)
-> (DescribeRouteCalculatorResponse
    -> Text -> DescribeRouteCalculatorResponse)
-> Lens
     DescribeRouteCalculatorResponse
     DescribeRouteCalculatorResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRouteCalculatorResponse' {Text
dataSource :: Text
$sel:dataSource:DescribeRouteCalculatorResponse' :: DescribeRouteCalculatorResponse -> Text
dataSource} -> Text
dataSource) (\s :: DescribeRouteCalculatorResponse
s@DescribeRouteCalculatorResponse' {} Text
a -> DescribeRouteCalculatorResponse
s {$sel:dataSource:DescribeRouteCalculatorResponse' :: Text
dataSource = Text
a} :: DescribeRouteCalculatorResponse)

-- | The optional description of the route calculator resource.
describeRouteCalculatorResponse_description :: Lens.Lens' DescribeRouteCalculatorResponse Prelude.Text
describeRouteCalculatorResponse_description :: (Text -> f Text)
-> DescribeRouteCalculatorResponse
-> f DescribeRouteCalculatorResponse
describeRouteCalculatorResponse_description = (DescribeRouteCalculatorResponse -> Text)
-> (DescribeRouteCalculatorResponse
    -> Text -> DescribeRouteCalculatorResponse)
-> Lens
     DescribeRouteCalculatorResponse
     DescribeRouteCalculatorResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRouteCalculatorResponse' {Text
description :: Text
$sel:description:DescribeRouteCalculatorResponse' :: DescribeRouteCalculatorResponse -> Text
description} -> Text
description) (\s :: DescribeRouteCalculatorResponse
s@DescribeRouteCalculatorResponse' {} Text
a -> DescribeRouteCalculatorResponse
s {$sel:description:DescribeRouteCalculatorResponse' :: Text
description = Text
a} :: DescribeRouteCalculatorResponse)

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

-- | The timestamp when the route calculator 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@.
--
-- -   For example, @2020–07-2T12:15:20.000Z+01:00@
describeRouteCalculatorResponse_updateTime :: Lens.Lens' DescribeRouteCalculatorResponse Prelude.UTCTime
describeRouteCalculatorResponse_updateTime :: (UTCTime -> f UTCTime)
-> DescribeRouteCalculatorResponse
-> f DescribeRouteCalculatorResponse
describeRouteCalculatorResponse_updateTime = (DescribeRouteCalculatorResponse -> POSIX)
-> (DescribeRouteCalculatorResponse
    -> POSIX -> DescribeRouteCalculatorResponse)
-> Lens
     DescribeRouteCalculatorResponse
     DescribeRouteCalculatorResponse
     POSIX
     POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRouteCalculatorResponse' {POSIX
updateTime :: POSIX
$sel:updateTime:DescribeRouteCalculatorResponse' :: DescribeRouteCalculatorResponse -> POSIX
updateTime} -> POSIX
updateTime) (\s :: DescribeRouteCalculatorResponse
s@DescribeRouteCalculatorResponse' {} POSIX
a -> DescribeRouteCalculatorResponse
s {$sel:updateTime:DescribeRouteCalculatorResponse' :: POSIX
updateTime = POSIX
a} :: DescribeRouteCalculatorResponse) ((POSIX -> f POSIX)
 -> DescribeRouteCalculatorResponse
 -> f DescribeRouteCalculatorResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> DescribeRouteCalculatorResponse
-> f DescribeRouteCalculatorResponse
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
  Prelude.NFData
    DescribeRouteCalculatorResponse