{-# 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.UpdateRouteCalculator
-- 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)
--
-- Updates the specified properties for a given route calculator resource.
module Amazonka.Location.UpdateRouteCalculator
  ( -- * Creating a Request
    UpdateRouteCalculator (..),
    newUpdateRouteCalculator,

    -- * Request Lenses
    updateRouteCalculator_pricingPlan,
    updateRouteCalculator_description,
    updateRouteCalculator_calculatorName,

    -- * Destructuring the Response
    UpdateRouteCalculatorResponse (..),
    newUpdateRouteCalculatorResponse,

    -- * Response Lenses
    updateRouteCalculatorResponse_httpStatus,
    updateRouteCalculatorResponse_calculatorArn,
    updateRouteCalculatorResponse_calculatorName,
    updateRouteCalculatorResponse_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:/ 'newUpdateRouteCalculator' smart constructor.
data UpdateRouteCalculator = UpdateRouteCalculator'
  { -- | Updates the pricing plan for the route calculator resource.
    --
    -- For more information about each pricing plan option restrictions, see
    -- <https://aws.amazon.com/location/pricing/ Amazon Location Service pricing>.
    UpdateRouteCalculator -> Maybe PricingPlan
pricingPlan :: Prelude.Maybe PricingPlan,
    -- | Updates the description for the route calculator resource.
    UpdateRouteCalculator -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The name of the route calculator resource to update.
    UpdateRouteCalculator -> Text
calculatorName :: Prelude.Text
  }
  deriving (UpdateRouteCalculator -> UpdateRouteCalculator -> Bool
(UpdateRouteCalculator -> UpdateRouteCalculator -> Bool)
-> (UpdateRouteCalculator -> UpdateRouteCalculator -> Bool)
-> Eq UpdateRouteCalculator
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateRouteCalculator -> UpdateRouteCalculator -> Bool
$c/= :: UpdateRouteCalculator -> UpdateRouteCalculator -> Bool
== :: UpdateRouteCalculator -> UpdateRouteCalculator -> Bool
$c== :: UpdateRouteCalculator -> UpdateRouteCalculator -> Bool
Prelude.Eq, ReadPrec [UpdateRouteCalculator]
ReadPrec UpdateRouteCalculator
Int -> ReadS UpdateRouteCalculator
ReadS [UpdateRouteCalculator]
(Int -> ReadS UpdateRouteCalculator)
-> ReadS [UpdateRouteCalculator]
-> ReadPrec UpdateRouteCalculator
-> ReadPrec [UpdateRouteCalculator]
-> Read UpdateRouteCalculator
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateRouteCalculator]
$creadListPrec :: ReadPrec [UpdateRouteCalculator]
readPrec :: ReadPrec UpdateRouteCalculator
$creadPrec :: ReadPrec UpdateRouteCalculator
readList :: ReadS [UpdateRouteCalculator]
$creadList :: ReadS [UpdateRouteCalculator]
readsPrec :: Int -> ReadS UpdateRouteCalculator
$creadsPrec :: Int -> ReadS UpdateRouteCalculator
Prelude.Read, Int -> UpdateRouteCalculator -> ShowS
[UpdateRouteCalculator] -> ShowS
UpdateRouteCalculator -> String
(Int -> UpdateRouteCalculator -> ShowS)
-> (UpdateRouteCalculator -> String)
-> ([UpdateRouteCalculator] -> ShowS)
-> Show UpdateRouteCalculator
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateRouteCalculator] -> ShowS
$cshowList :: [UpdateRouteCalculator] -> ShowS
show :: UpdateRouteCalculator -> String
$cshow :: UpdateRouteCalculator -> String
showsPrec :: Int -> UpdateRouteCalculator -> ShowS
$cshowsPrec :: Int -> UpdateRouteCalculator -> ShowS
Prelude.Show, (forall x. UpdateRouteCalculator -> Rep UpdateRouteCalculator x)
-> (forall x. Rep UpdateRouteCalculator x -> UpdateRouteCalculator)
-> Generic UpdateRouteCalculator
forall x. Rep UpdateRouteCalculator x -> UpdateRouteCalculator
forall x. UpdateRouteCalculator -> Rep UpdateRouteCalculator x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateRouteCalculator x -> UpdateRouteCalculator
$cfrom :: forall x. UpdateRouteCalculator -> Rep UpdateRouteCalculator x
Prelude.Generic)

-- |
-- Create a value of 'UpdateRouteCalculator' 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', 'updateRouteCalculator_pricingPlan' - Updates the pricing plan for the route calculator resource.
--
-- For more information about each pricing plan option restrictions, see
-- <https://aws.amazon.com/location/pricing/ Amazon Location Service pricing>.
--
-- 'description', 'updateRouteCalculator_description' - Updates the description for the route calculator resource.
--
-- 'calculatorName', 'updateRouteCalculator_calculatorName' - The name of the route calculator resource to update.
newUpdateRouteCalculator ::
  -- | 'calculatorName'
  Prelude.Text ->
  UpdateRouteCalculator
newUpdateRouteCalculator :: Text -> UpdateRouteCalculator
newUpdateRouteCalculator Text
pCalculatorName_ =
  UpdateRouteCalculator' :: Maybe PricingPlan -> Maybe Text -> Text -> UpdateRouteCalculator
UpdateRouteCalculator'
    { $sel:pricingPlan:UpdateRouteCalculator' :: Maybe PricingPlan
pricingPlan =
        Maybe PricingPlan
forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateRouteCalculator' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:calculatorName:UpdateRouteCalculator' :: Text
calculatorName = Text
pCalculatorName_
    }

-- | Updates the pricing plan for the route calculator resource.
--
-- For more information about each pricing plan option restrictions, see
-- <https://aws.amazon.com/location/pricing/ Amazon Location Service pricing>.
updateRouteCalculator_pricingPlan :: Lens.Lens' UpdateRouteCalculator (Prelude.Maybe PricingPlan)
updateRouteCalculator_pricingPlan :: (Maybe PricingPlan -> f (Maybe PricingPlan))
-> UpdateRouteCalculator -> f UpdateRouteCalculator
updateRouteCalculator_pricingPlan = (UpdateRouteCalculator -> Maybe PricingPlan)
-> (UpdateRouteCalculator
    -> Maybe PricingPlan -> UpdateRouteCalculator)
-> Lens
     UpdateRouteCalculator
     UpdateRouteCalculator
     (Maybe PricingPlan)
     (Maybe PricingPlan)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRouteCalculator' {Maybe PricingPlan
pricingPlan :: Maybe PricingPlan
$sel:pricingPlan:UpdateRouteCalculator' :: UpdateRouteCalculator -> Maybe PricingPlan
pricingPlan} -> Maybe PricingPlan
pricingPlan) (\s :: UpdateRouteCalculator
s@UpdateRouteCalculator' {} Maybe PricingPlan
a -> UpdateRouteCalculator
s {$sel:pricingPlan:UpdateRouteCalculator' :: Maybe PricingPlan
pricingPlan = Maybe PricingPlan
a} :: UpdateRouteCalculator)

-- | Updates the description for the route calculator resource.
updateRouteCalculator_description :: Lens.Lens' UpdateRouteCalculator (Prelude.Maybe Prelude.Text)
updateRouteCalculator_description :: (Maybe Text -> f (Maybe Text))
-> UpdateRouteCalculator -> f UpdateRouteCalculator
updateRouteCalculator_description = (UpdateRouteCalculator -> Maybe Text)
-> (UpdateRouteCalculator -> Maybe Text -> UpdateRouteCalculator)
-> Lens
     UpdateRouteCalculator
     UpdateRouteCalculator
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRouteCalculator' {Maybe Text
description :: Maybe Text
$sel:description:UpdateRouteCalculator' :: UpdateRouteCalculator -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateRouteCalculator
s@UpdateRouteCalculator' {} Maybe Text
a -> UpdateRouteCalculator
s {$sel:description:UpdateRouteCalculator' :: Maybe Text
description = Maybe Text
a} :: UpdateRouteCalculator)

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

instance Core.AWSRequest UpdateRouteCalculator where
  type
    AWSResponse UpdateRouteCalculator =
      UpdateRouteCalculatorResponse
  request :: UpdateRouteCalculator -> Request UpdateRouteCalculator
request = Service -> UpdateRouteCalculator -> Request UpdateRouteCalculator
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.patchJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateRouteCalculator
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateRouteCalculator)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateRouteCalculator))
-> Logger
-> Service
-> Proxy UpdateRouteCalculator
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateRouteCalculator)))
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 ->
          Int -> Text -> Text -> POSIX -> UpdateRouteCalculatorResponse
UpdateRouteCalculatorResponse'
            (Int -> Text -> Text -> POSIX -> UpdateRouteCalculatorResponse)
-> Either String Int
-> Either
     String (Text -> Text -> POSIX -> UpdateRouteCalculatorResponse)
forall (f :: * -> *) a b. Functor 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 -> UpdateRouteCalculatorResponse)
-> Either String Text
-> Either String (Text -> POSIX -> UpdateRouteCalculatorResponse)
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 -> UpdateRouteCalculatorResponse)
-> Either String Text
-> Either String (POSIX -> UpdateRouteCalculatorResponse)
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 -> UpdateRouteCalculatorResponse)
-> Either String POSIX
-> Either String UpdateRouteCalculatorResponse
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 UpdateRouteCalculator

instance Prelude.NFData UpdateRouteCalculator

instance Core.ToHeaders UpdateRouteCalculator where
  toHeaders :: UpdateRouteCalculator -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateRouteCalculator -> 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.ToJSON UpdateRouteCalculator where
  toJSON :: UpdateRouteCalculator -> Value
toJSON UpdateRouteCalculator' {Maybe Text
Maybe PricingPlan
Text
calculatorName :: Text
description :: Maybe Text
pricingPlan :: Maybe PricingPlan
$sel:calculatorName:UpdateRouteCalculator' :: UpdateRouteCalculator -> Text
$sel:description:UpdateRouteCalculator' :: UpdateRouteCalculator -> Maybe Text
$sel:pricingPlan:UpdateRouteCalculator' :: UpdateRouteCalculator -> Maybe PricingPlan
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"PricingPlan" Text -> PricingPlan -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (PricingPlan -> Pair) -> Maybe PricingPlan -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PricingPlan
pricingPlan,
            (Text
"Description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description
          ]
      )

instance Core.ToPath UpdateRouteCalculator where
  toPath :: UpdateRouteCalculator -> ByteString
toPath UpdateRouteCalculator' {Maybe Text
Maybe PricingPlan
Text
calculatorName :: Text
description :: Maybe Text
pricingPlan :: Maybe PricingPlan
$sel:calculatorName:UpdateRouteCalculator' :: UpdateRouteCalculator -> Text
$sel:description:UpdateRouteCalculator' :: UpdateRouteCalculator -> Maybe Text
$sel:pricingPlan:UpdateRouteCalculator' :: UpdateRouteCalculator -> Maybe PricingPlan
..} =
    [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 UpdateRouteCalculator where
  toQuery :: UpdateRouteCalculator -> QueryString
toQuery = QueryString -> UpdateRouteCalculator -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateRouteCalculatorResponse' smart constructor.
data UpdateRouteCalculatorResponse = UpdateRouteCalculatorResponse'
  { -- | The response's http status code.
    UpdateRouteCalculatorResponse -> Int
httpStatus :: Prelude.Int,
    -- | The Amazon Resource Name (ARN) of the updated route calculator resource.
    -- Used to specify a resource across AWS.
    --
    -- -   Format example:
    --     @arn:aws:geo:region:account-id:route- calculator\/ExampleCalculator@
    UpdateRouteCalculatorResponse -> Text
calculatorArn :: Prelude.Text,
    -- | The name of the updated route calculator resource.
    UpdateRouteCalculatorResponse -> Text
calculatorName :: Prelude.Text,
    -- | The timestamp for when the route calculator was last updated in
    -- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
    -- format: @YYYY-MM-DDThh:mm:ss.sssZ@.
    UpdateRouteCalculatorResponse -> POSIX
updateTime :: Core.POSIX
  }
  deriving (UpdateRouteCalculatorResponse
-> UpdateRouteCalculatorResponse -> Bool
(UpdateRouteCalculatorResponse
 -> UpdateRouteCalculatorResponse -> Bool)
-> (UpdateRouteCalculatorResponse
    -> UpdateRouteCalculatorResponse -> Bool)
-> Eq UpdateRouteCalculatorResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateRouteCalculatorResponse
-> UpdateRouteCalculatorResponse -> Bool
$c/= :: UpdateRouteCalculatorResponse
-> UpdateRouteCalculatorResponse -> Bool
== :: UpdateRouteCalculatorResponse
-> UpdateRouteCalculatorResponse -> Bool
$c== :: UpdateRouteCalculatorResponse
-> UpdateRouteCalculatorResponse -> Bool
Prelude.Eq, ReadPrec [UpdateRouteCalculatorResponse]
ReadPrec UpdateRouteCalculatorResponse
Int -> ReadS UpdateRouteCalculatorResponse
ReadS [UpdateRouteCalculatorResponse]
(Int -> ReadS UpdateRouteCalculatorResponse)
-> ReadS [UpdateRouteCalculatorResponse]
-> ReadPrec UpdateRouteCalculatorResponse
-> ReadPrec [UpdateRouteCalculatorResponse]
-> Read UpdateRouteCalculatorResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateRouteCalculatorResponse]
$creadListPrec :: ReadPrec [UpdateRouteCalculatorResponse]
readPrec :: ReadPrec UpdateRouteCalculatorResponse
$creadPrec :: ReadPrec UpdateRouteCalculatorResponse
readList :: ReadS [UpdateRouteCalculatorResponse]
$creadList :: ReadS [UpdateRouteCalculatorResponse]
readsPrec :: Int -> ReadS UpdateRouteCalculatorResponse
$creadsPrec :: Int -> ReadS UpdateRouteCalculatorResponse
Prelude.Read, Int -> UpdateRouteCalculatorResponse -> ShowS
[UpdateRouteCalculatorResponse] -> ShowS
UpdateRouteCalculatorResponse -> String
(Int -> UpdateRouteCalculatorResponse -> ShowS)
-> (UpdateRouteCalculatorResponse -> String)
-> ([UpdateRouteCalculatorResponse] -> ShowS)
-> Show UpdateRouteCalculatorResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateRouteCalculatorResponse] -> ShowS
$cshowList :: [UpdateRouteCalculatorResponse] -> ShowS
show :: UpdateRouteCalculatorResponse -> String
$cshow :: UpdateRouteCalculatorResponse -> String
showsPrec :: Int -> UpdateRouteCalculatorResponse -> ShowS
$cshowsPrec :: Int -> UpdateRouteCalculatorResponse -> ShowS
Prelude.Show, (forall x.
 UpdateRouteCalculatorResponse
 -> Rep UpdateRouteCalculatorResponse x)
-> (forall x.
    Rep UpdateRouteCalculatorResponse x
    -> UpdateRouteCalculatorResponse)
-> Generic UpdateRouteCalculatorResponse
forall x.
Rep UpdateRouteCalculatorResponse x
-> UpdateRouteCalculatorResponse
forall x.
UpdateRouteCalculatorResponse
-> Rep UpdateRouteCalculatorResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateRouteCalculatorResponse x
-> UpdateRouteCalculatorResponse
$cfrom :: forall x.
UpdateRouteCalculatorResponse
-> Rep UpdateRouteCalculatorResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateRouteCalculatorResponse' 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:
--
-- 'httpStatus', 'updateRouteCalculatorResponse_httpStatus' - The response's http status code.
--
-- 'calculatorArn', 'updateRouteCalculatorResponse_calculatorArn' - The Amazon Resource Name (ARN) of the updated route calculator resource.
-- Used to specify a resource across AWS.
--
-- -   Format example:
--     @arn:aws:geo:region:account-id:route- calculator\/ExampleCalculator@
--
-- 'calculatorName', 'updateRouteCalculatorResponse_calculatorName' - The name of the updated route calculator resource.
--
-- 'updateTime', 'updateRouteCalculatorResponse_updateTime' - The timestamp for when the route calculator was last updated in
-- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
-- format: @YYYY-MM-DDThh:mm:ss.sssZ@.
newUpdateRouteCalculatorResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'calculatorArn'
  Prelude.Text ->
  -- | 'calculatorName'
  Prelude.Text ->
  -- | 'updateTime'
  Prelude.UTCTime ->
  UpdateRouteCalculatorResponse
newUpdateRouteCalculatorResponse :: Int -> Text -> Text -> UTCTime -> UpdateRouteCalculatorResponse
newUpdateRouteCalculatorResponse
  Int
pHttpStatus_
  Text
pCalculatorArn_
  Text
pCalculatorName_
  UTCTime
pUpdateTime_ =
    UpdateRouteCalculatorResponse' :: Int -> Text -> Text -> POSIX -> UpdateRouteCalculatorResponse
UpdateRouteCalculatorResponse'
      { $sel:httpStatus:UpdateRouteCalculatorResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:calculatorArn:UpdateRouteCalculatorResponse' :: Text
calculatorArn = Text
pCalculatorArn_,
        $sel:calculatorName:UpdateRouteCalculatorResponse' :: Text
calculatorName = Text
pCalculatorName_,
        $sel:updateTime:UpdateRouteCalculatorResponse' :: 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 response's http status code.
updateRouteCalculatorResponse_httpStatus :: Lens.Lens' UpdateRouteCalculatorResponse Prelude.Int
updateRouteCalculatorResponse_httpStatus :: (Int -> f Int)
-> UpdateRouteCalculatorResponse -> f UpdateRouteCalculatorResponse
updateRouteCalculatorResponse_httpStatus = (UpdateRouteCalculatorResponse -> Int)
-> (UpdateRouteCalculatorResponse
    -> Int -> UpdateRouteCalculatorResponse)
-> Lens
     UpdateRouteCalculatorResponse UpdateRouteCalculatorResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRouteCalculatorResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateRouteCalculatorResponse' :: UpdateRouteCalculatorResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateRouteCalculatorResponse
s@UpdateRouteCalculatorResponse' {} Int
a -> UpdateRouteCalculatorResponse
s {$sel:httpStatus:UpdateRouteCalculatorResponse' :: Int
httpStatus = Int
a} :: UpdateRouteCalculatorResponse)

-- | The Amazon Resource Name (ARN) of the updated route calculator resource.
-- Used to specify a resource across AWS.
--
-- -   Format example:
--     @arn:aws:geo:region:account-id:route- calculator\/ExampleCalculator@
updateRouteCalculatorResponse_calculatorArn :: Lens.Lens' UpdateRouteCalculatorResponse Prelude.Text
updateRouteCalculatorResponse_calculatorArn :: (Text -> f Text)
-> UpdateRouteCalculatorResponse -> f UpdateRouteCalculatorResponse
updateRouteCalculatorResponse_calculatorArn = (UpdateRouteCalculatorResponse -> Text)
-> (UpdateRouteCalculatorResponse
    -> Text -> UpdateRouteCalculatorResponse)
-> Lens
     UpdateRouteCalculatorResponse
     UpdateRouteCalculatorResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRouteCalculatorResponse' {Text
calculatorArn :: Text
$sel:calculatorArn:UpdateRouteCalculatorResponse' :: UpdateRouteCalculatorResponse -> Text
calculatorArn} -> Text
calculatorArn) (\s :: UpdateRouteCalculatorResponse
s@UpdateRouteCalculatorResponse' {} Text
a -> UpdateRouteCalculatorResponse
s {$sel:calculatorArn:UpdateRouteCalculatorResponse' :: Text
calculatorArn = Text
a} :: UpdateRouteCalculatorResponse)

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

-- | The timestamp for when the route calculator was last updated in
-- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
-- format: @YYYY-MM-DDThh:mm:ss.sssZ@.
updateRouteCalculatorResponse_updateTime :: Lens.Lens' UpdateRouteCalculatorResponse Prelude.UTCTime
updateRouteCalculatorResponse_updateTime :: (UTCTime -> f UTCTime)
-> UpdateRouteCalculatorResponse -> f UpdateRouteCalculatorResponse
updateRouteCalculatorResponse_updateTime = (UpdateRouteCalculatorResponse -> POSIX)
-> (UpdateRouteCalculatorResponse
    -> POSIX -> UpdateRouteCalculatorResponse)
-> Lens
     UpdateRouteCalculatorResponse
     UpdateRouteCalculatorResponse
     POSIX
     POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRouteCalculatorResponse' {POSIX
updateTime :: POSIX
$sel:updateTime:UpdateRouteCalculatorResponse' :: UpdateRouteCalculatorResponse -> POSIX
updateTime} -> POSIX
updateTime) (\s :: UpdateRouteCalculatorResponse
s@UpdateRouteCalculatorResponse' {} POSIX
a -> UpdateRouteCalculatorResponse
s {$sel:updateTime:UpdateRouteCalculatorResponse' :: POSIX
updateTime = POSIX
a} :: UpdateRouteCalculatorResponse) ((POSIX -> f POSIX)
 -> UpdateRouteCalculatorResponse
 -> f UpdateRouteCalculatorResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> UpdateRouteCalculatorResponse
-> f UpdateRouteCalculatorResponse
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 UpdateRouteCalculatorResponse