{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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_pricingPlan,
    describeRouteCalculatorResponse_tags,
    describeRouteCalculatorResponse_httpStatus,
    describeRouteCalculatorResponse_calculatorArn,
    describeRouteCalculatorResponse_calculatorName,
    describeRouteCalculatorResponse_createTime,
    describeRouteCalculatorResponse_dataSource,
    describeRouteCalculatorResponse_description,
    describeRouteCalculatorResponse_updateTime,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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. 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'
    { $sel:calculatorName:DescribeRouteCalculator' :: Text
calculatorName =
        Text
pCalculatorName_
    }

-- | The name of the route calculator resource.
describeRouteCalculator_calculatorName :: Lens.Lens' DescribeRouteCalculator Prelude.Text
describeRouteCalculator_calculatorName :: Lens' DescribeRouteCalculator Text
describeRouteCalculator_calculatorName = 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 :: (Service -> Service)
-> DescribeRouteCalculator -> Request DescribeRouteCalculator
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribeRouteCalculator
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeRouteCalculator)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe PricingPlan
-> Maybe (HashMap Text Text)
-> Int
-> Text
-> Text
-> ISO8601
-> Text
-> Text
-> ISO8601
-> DescribeRouteCalculatorResponse
DescribeRouteCalculatorResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"PricingPlan")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Tags" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"CalculatorArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"CalculatorName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"CreateTime")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"DataSource")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"Description")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"UpdateTime")
      )

instance Prelude.Hashable DescribeRouteCalculator where
  hashWithSalt :: Int -> DescribeRouteCalculator -> Int
hashWithSalt Int
_salt DescribeRouteCalculator' {Text
calculatorName :: Text
$sel:calculatorName:DescribeRouteCalculator' :: DescribeRouteCalculator -> Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
calculatorName

instance Prelude.NFData DescribeRouteCalculator where
  rnf :: DescribeRouteCalculator -> ()
rnf DescribeRouteCalculator' {Text
calculatorName :: Text
$sel:calculatorName:DescribeRouteCalculator' :: DescribeRouteCalculator -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
calculatorName

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

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

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

-- | /See:/ 'newDescribeRouteCalculatorResponse' smart constructor.
data DescribeRouteCalculatorResponse = DescribeRouteCalculatorResponse'
  { -- | Always returns @RequestBasedUsage@.
    DescribeRouteCalculatorResponse -> Maybe PricingPlan
pricingPlan :: Prelude.Maybe PricingPlan,
    -- | 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 -> ISO8601
createTime :: Data.ISO8601,
    -- | 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 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 -> ISO8601
updateTime :: Data.ISO8601
  }
  deriving (DescribeRouteCalculatorResponse
-> DescribeRouteCalculatorResponse -> Bool
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]
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
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.
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:
--
-- 'pricingPlan', 'describeRouteCalculatorResponse_pricingPlan' - Always returns @RequestBasedUsage@.
--
-- '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.
--
-- '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 ->
  -- | 'updateTime'
  Prelude.UTCTime ->
  DescribeRouteCalculatorResponse
newDescribeRouteCalculatorResponse :: Int
-> Text
-> Text
-> UTCTime
-> Text
-> Text
-> UTCTime
-> DescribeRouteCalculatorResponse
newDescribeRouteCalculatorResponse
  Int
pHttpStatus_
  Text
pCalculatorArn_
  Text
pCalculatorName_
  UTCTime
pCreateTime_
  Text
pDataSource_
  Text
pDescription_
  UTCTime
pUpdateTime_ =
    DescribeRouteCalculatorResponse'
      { $sel:pricingPlan:DescribeRouteCalculatorResponse' :: Maybe PricingPlan
pricingPlan =
          forall a. Maybe a
Prelude.Nothing,
        $sel:tags:DescribeRouteCalculatorResponse' :: Maybe (HashMap Text Text)
tags = 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' :: ISO8601
createTime =
          forall (a :: Format). Iso' (Time a) UTCTime
Data._Time 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:updateTime:DescribeRouteCalculatorResponse' :: ISO8601
updateTime =
          forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pUpdateTime_
      }

-- | Always returns @RequestBasedUsage@.
describeRouteCalculatorResponse_pricingPlan :: Lens.Lens' DescribeRouteCalculatorResponse (Prelude.Maybe PricingPlan)
describeRouteCalculatorResponse_pricingPlan :: Lens' DescribeRouteCalculatorResponse (Maybe PricingPlan)
describeRouteCalculatorResponse_pricingPlan = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRouteCalculatorResponse' {Maybe PricingPlan
pricingPlan :: Maybe PricingPlan
$sel:pricingPlan:DescribeRouteCalculatorResponse' :: DescribeRouteCalculatorResponse -> Maybe PricingPlan
pricingPlan} -> Maybe PricingPlan
pricingPlan) (\s :: DescribeRouteCalculatorResponse
s@DescribeRouteCalculatorResponse' {} Maybe PricingPlan
a -> DescribeRouteCalculatorResponse
s {$sel:pricingPlan:DescribeRouteCalculatorResponse' :: Maybe PricingPlan
pricingPlan = Maybe PricingPlan
a} :: DescribeRouteCalculatorResponse)

-- | Tags associated with route calculator resource.
describeRouteCalculatorResponse_tags :: Lens.Lens' DescribeRouteCalculatorResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
describeRouteCalculatorResponse_tags :: Lens' DescribeRouteCalculatorResponse (Maybe (HashMap Text Text))
describeRouteCalculatorResponse_tags = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 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 :: Lens' DescribeRouteCalculatorResponse Int
describeRouteCalculatorResponse_httpStatus = 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 :: Lens' DescribeRouteCalculatorResponse Text
describeRouteCalculatorResponse_calculatorArn = 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 :: Lens' DescribeRouteCalculatorResponse Text
describeRouteCalculatorResponse_calculatorName = 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 :: Lens' DescribeRouteCalculatorResponse UTCTime
describeRouteCalculatorResponse_createTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRouteCalculatorResponse' {ISO8601
createTime :: ISO8601
$sel:createTime:DescribeRouteCalculatorResponse' :: DescribeRouteCalculatorResponse -> ISO8601
createTime} -> ISO8601
createTime) (\s :: DescribeRouteCalculatorResponse
s@DescribeRouteCalculatorResponse' {} ISO8601
a -> DescribeRouteCalculatorResponse
s {$sel:createTime:DescribeRouteCalculatorResponse' :: ISO8601
createTime = ISO8601
a} :: DescribeRouteCalculatorResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._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 :: Lens' DescribeRouteCalculatorResponse Text
describeRouteCalculatorResponse_dataSource = 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 :: Lens' DescribeRouteCalculatorResponse Text
describeRouteCalculatorResponse_description = 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 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 :: Lens' DescribeRouteCalculatorResponse UTCTime
describeRouteCalculatorResponse_updateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeRouteCalculatorResponse' {ISO8601
updateTime :: ISO8601
$sel:updateTime:DescribeRouteCalculatorResponse' :: DescribeRouteCalculatorResponse -> ISO8601
updateTime} -> ISO8601
updateTime) (\s :: DescribeRouteCalculatorResponse
s@DescribeRouteCalculatorResponse' {} ISO8601
a -> DescribeRouteCalculatorResponse
s {$sel:updateTime:DescribeRouteCalculatorResponse' :: ISO8601
updateTime = ISO8601
a} :: DescribeRouteCalculatorResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

instance
  Prelude.NFData
    DescribeRouteCalculatorResponse
  where
  rnf :: DescribeRouteCalculatorResponse -> ()
rnf DescribeRouteCalculatorResponse' {Int
Maybe (HashMap Text Text)
Maybe PricingPlan
Text
ISO8601
updateTime :: ISO8601
description :: Text
dataSource :: Text
createTime :: ISO8601
calculatorName :: Text
calculatorArn :: Text
httpStatus :: Int
tags :: Maybe (HashMap Text Text)
pricingPlan :: Maybe PricingPlan
$sel:updateTime:DescribeRouteCalculatorResponse' :: DescribeRouteCalculatorResponse -> ISO8601
$sel:description:DescribeRouteCalculatorResponse' :: DescribeRouteCalculatorResponse -> Text
$sel:dataSource:DescribeRouteCalculatorResponse' :: DescribeRouteCalculatorResponse -> Text
$sel:createTime:DescribeRouteCalculatorResponse' :: DescribeRouteCalculatorResponse -> ISO8601
$sel:calculatorName:DescribeRouteCalculatorResponse' :: DescribeRouteCalculatorResponse -> Text
$sel:calculatorArn:DescribeRouteCalculatorResponse' :: DescribeRouteCalculatorResponse -> Text
$sel:httpStatus:DescribeRouteCalculatorResponse' :: DescribeRouteCalculatorResponse -> Int
$sel:tags:DescribeRouteCalculatorResponse' :: DescribeRouteCalculatorResponse -> Maybe (HashMap Text Text)
$sel:pricingPlan:DescribeRouteCalculatorResponse' :: DescribeRouteCalculatorResponse -> Maybe PricingPlan
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe PricingPlan
pricingPlan
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
calculatorArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
calculatorName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ISO8601
createTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
dataSource
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ISO8601
updateTime