{-# 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.DescribeTracker
-- 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 tracker resource details.
module Amazonka.Location.DescribeTracker
  ( -- * Creating a Request
    DescribeTracker (..),
    newDescribeTracker,

    -- * Request Lenses
    describeTracker_trackerName,

    -- * Destructuring the Response
    DescribeTrackerResponse (..),
    newDescribeTrackerResponse,

    -- * Response Lenses
    describeTrackerResponse_pricingPlanDataSource,
    describeTrackerResponse_kmsKeyId,
    describeTrackerResponse_tags,
    describeTrackerResponse_positionFiltering,
    describeTrackerResponse_httpStatus,
    describeTrackerResponse_createTime,
    describeTrackerResponse_description,
    describeTrackerResponse_pricingPlan,
    describeTrackerResponse_trackerArn,
    describeTrackerResponse_trackerName,
    describeTrackerResponse_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:/ 'newDescribeTracker' smart constructor.
data DescribeTracker = DescribeTracker'
  { -- | The name of the tracker resource.
    DescribeTracker -> Text
trackerName :: Prelude.Text
  }
  deriving (DescribeTracker -> DescribeTracker -> Bool
(DescribeTracker -> DescribeTracker -> Bool)
-> (DescribeTracker -> DescribeTracker -> Bool)
-> Eq DescribeTracker
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeTracker -> DescribeTracker -> Bool
$c/= :: DescribeTracker -> DescribeTracker -> Bool
== :: DescribeTracker -> DescribeTracker -> Bool
$c== :: DescribeTracker -> DescribeTracker -> Bool
Prelude.Eq, ReadPrec [DescribeTracker]
ReadPrec DescribeTracker
Int -> ReadS DescribeTracker
ReadS [DescribeTracker]
(Int -> ReadS DescribeTracker)
-> ReadS [DescribeTracker]
-> ReadPrec DescribeTracker
-> ReadPrec [DescribeTracker]
-> Read DescribeTracker
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeTracker]
$creadListPrec :: ReadPrec [DescribeTracker]
readPrec :: ReadPrec DescribeTracker
$creadPrec :: ReadPrec DescribeTracker
readList :: ReadS [DescribeTracker]
$creadList :: ReadS [DescribeTracker]
readsPrec :: Int -> ReadS DescribeTracker
$creadsPrec :: Int -> ReadS DescribeTracker
Prelude.Read, Int -> DescribeTracker -> ShowS
[DescribeTracker] -> ShowS
DescribeTracker -> String
(Int -> DescribeTracker -> ShowS)
-> (DescribeTracker -> String)
-> ([DescribeTracker] -> ShowS)
-> Show DescribeTracker
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeTracker] -> ShowS
$cshowList :: [DescribeTracker] -> ShowS
show :: DescribeTracker -> String
$cshow :: DescribeTracker -> String
showsPrec :: Int -> DescribeTracker -> ShowS
$cshowsPrec :: Int -> DescribeTracker -> ShowS
Prelude.Show, (forall x. DescribeTracker -> Rep DescribeTracker x)
-> (forall x. Rep DescribeTracker x -> DescribeTracker)
-> Generic DescribeTracker
forall x. Rep DescribeTracker x -> DescribeTracker
forall x. DescribeTracker -> Rep DescribeTracker x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeTracker x -> DescribeTracker
$cfrom :: forall x. DescribeTracker -> Rep DescribeTracker x
Prelude.Generic)

-- |
-- Create a value of 'DescribeTracker' 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:
--
-- 'trackerName', 'describeTracker_trackerName' - The name of the tracker resource.
newDescribeTracker ::
  -- | 'trackerName'
  Prelude.Text ->
  DescribeTracker
newDescribeTracker :: Text -> DescribeTracker
newDescribeTracker Text
pTrackerName_ =
  DescribeTracker' :: Text -> DescribeTracker
DescribeTracker' {$sel:trackerName:DescribeTracker' :: Text
trackerName = Text
pTrackerName_}

-- | The name of the tracker resource.
describeTracker_trackerName :: Lens.Lens' DescribeTracker Prelude.Text
describeTracker_trackerName :: (Text -> f Text) -> DescribeTracker -> f DescribeTracker
describeTracker_trackerName = (DescribeTracker -> Text)
-> (DescribeTracker -> Text -> DescribeTracker)
-> Lens DescribeTracker DescribeTracker Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTracker' {Text
trackerName :: Text
$sel:trackerName:DescribeTracker' :: DescribeTracker -> Text
trackerName} -> Text
trackerName) (\s :: DescribeTracker
s@DescribeTracker' {} Text
a -> DescribeTracker
s {$sel:trackerName:DescribeTracker' :: Text
trackerName = Text
a} :: DescribeTracker)

instance Core.AWSRequest DescribeTracker where
  type
    AWSResponse DescribeTracker =
      DescribeTrackerResponse
  request :: DescribeTracker -> Request DescribeTracker
request = Service -> DescribeTracker -> Request DescribeTracker
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeTracker
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeTracker)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeTracker))
-> Logger
-> Service
-> Proxy DescribeTracker
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeTracker)))
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 Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe PositionFiltering
-> Int
-> POSIX
-> Text
-> PricingPlan
-> Text
-> Text
-> POSIX
-> DescribeTrackerResponse
DescribeTrackerResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Maybe PositionFiltering
 -> Int
 -> POSIX
 -> Text
 -> PricingPlan
 -> Text
 -> Text
 -> POSIX
 -> DescribeTrackerResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe PositionFiltering
      -> Int
      -> POSIX
      -> Text
      -> PricingPlan
      -> Text
      -> Text
      -> POSIX
      -> DescribeTrackerResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"PricingPlanDataSource")
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe PositionFiltering
   -> Int
   -> POSIX
   -> Text
   -> PricingPlan
   -> Text
   -> Text
   -> POSIX
   -> DescribeTrackerResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text Text)
      -> Maybe PositionFiltering
      -> Int
      -> POSIX
      -> Text
      -> PricingPlan
      -> Text
      -> Text
      -> POSIX
      -> DescribeTrackerResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"KmsKeyId")
            Either
  String
  (Maybe (HashMap Text Text)
   -> Maybe PositionFiltering
   -> Int
   -> POSIX
   -> Text
   -> PricingPlan
   -> Text
   -> Text
   -> POSIX
   -> DescribeTrackerResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either
     String
     (Maybe PositionFiltering
      -> Int
      -> POSIX
      -> Text
      -> PricingPlan
      -> Text
      -> Text
      -> POSIX
      -> DescribeTrackerResponse)
forall (f :: * -> *) a b. Applicative f => 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
  (Maybe PositionFiltering
   -> Int
   -> POSIX
   -> Text
   -> PricingPlan
   -> Text
   -> Text
   -> POSIX
   -> DescribeTrackerResponse)
-> Either String (Maybe PositionFiltering)
-> Either
     String
     (Int
      -> POSIX
      -> Text
      -> PricingPlan
      -> Text
      -> Text
      -> POSIX
      -> DescribeTrackerResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe PositionFiltering)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"PositionFiltering")
            Either
  String
  (Int
   -> POSIX
   -> Text
   -> PricingPlan
   -> Text
   -> Text
   -> POSIX
   -> DescribeTrackerResponse)
-> Either String Int
-> Either
     String
     (POSIX
      -> Text
      -> PricingPlan
      -> Text
      -> Text
      -> POSIX
      -> DescribeTrackerResponse)
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
  (POSIX
   -> Text
   -> PricingPlan
   -> Text
   -> Text
   -> POSIX
   -> DescribeTrackerResponse)
-> Either String POSIX
-> Either
     String
     (Text
      -> PricingPlan -> Text -> Text -> POSIX -> DescribeTrackerResponse)
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
   -> PricingPlan -> Text -> Text -> POSIX -> DescribeTrackerResponse)
-> Either String Text
-> Either
     String
     (PricingPlan -> Text -> Text -> POSIX -> DescribeTrackerResponse)
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 -> Text -> Text -> POSIX -> DescribeTrackerResponse)
-> Either String PricingPlan
-> Either String (Text -> Text -> POSIX -> DescribeTrackerResponse)
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 (Text -> Text -> POSIX -> DescribeTrackerResponse)
-> Either String Text
-> Either String (Text -> POSIX -> DescribeTrackerResponse)
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
"TrackerArn")
            Either String (Text -> POSIX -> DescribeTrackerResponse)
-> Either String Text
-> Either String (POSIX -> DescribeTrackerResponse)
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
"TrackerName")
            Either String (POSIX -> DescribeTrackerResponse)
-> Either String POSIX -> Either String DescribeTrackerResponse
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 DescribeTracker

instance Prelude.NFData DescribeTracker

instance Core.ToHeaders DescribeTracker where
  toHeaders :: DescribeTracker -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeTracker -> 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 DescribeTracker where
  toPath :: DescribeTracker -> ByteString
toPath DescribeTracker' {Text
trackerName :: Text
$sel:trackerName:DescribeTracker' :: DescribeTracker -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/tracking/v0/trackers/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
trackerName]

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

-- | /See:/ 'newDescribeTrackerResponse' smart constructor.
data DescribeTrackerResponse = DescribeTrackerResponse'
  { -- | The specified data provider for the tracker resource.
    DescribeTrackerResponse -> Maybe Text
pricingPlanDataSource :: Prelude.Maybe Prelude.Text,
    -- | A key identifier for an
    -- <https://docs.aws.amazon.com/kms/latest/developerguide/create-keys.html AWS KMS customer managed key>
    -- assigned to the Amazon Location resource.
    DescribeTrackerResponse -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | The tags associated with the tracker resource.
    DescribeTrackerResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The position filtering method of the tracker resource.
    DescribeTrackerResponse -> Maybe PositionFiltering
positionFiltering :: Prelude.Maybe PositionFiltering,
    -- | The response's http status code.
    DescribeTrackerResponse -> Int
httpStatus :: Prelude.Int,
    -- | The timestamp for when the tracker resource was created in
    -- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
    -- format: @YYYY-MM-DDThh:mm:ss.sssZ@.
    DescribeTrackerResponse -> POSIX
createTime :: Core.POSIX,
    -- | The optional description for the tracker resource.
    DescribeTrackerResponse -> Text
description :: Prelude.Text,
    -- | The pricing plan selected for the specified tracker resource.
    --
    -- For additional details and restrictions on each pricing plan option, see
    -- <https://aws.amazon.com/location/pricing/ Amazon Location Service pricing>.
    DescribeTrackerResponse -> PricingPlan
pricingPlan :: PricingPlan,
    -- | The Amazon Resource Name (ARN) for the tracker resource. Used when you
    -- need to specify a resource across all AWS.
    --
    -- -   Format example:
    --     @arn:aws:geo:region:account-id:tracker\/ExampleTracker@
    DescribeTrackerResponse -> Text
trackerArn :: Prelude.Text,
    -- | The name of the tracker resource.
    DescribeTrackerResponse -> Text
trackerName :: Prelude.Text,
    -- | The timestamp for when the tracker 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@.
    DescribeTrackerResponse -> POSIX
updateTime :: Core.POSIX
  }
  deriving (DescribeTrackerResponse -> DescribeTrackerResponse -> Bool
(DescribeTrackerResponse -> DescribeTrackerResponse -> Bool)
-> (DescribeTrackerResponse -> DescribeTrackerResponse -> Bool)
-> Eq DescribeTrackerResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeTrackerResponse -> DescribeTrackerResponse -> Bool
$c/= :: DescribeTrackerResponse -> DescribeTrackerResponse -> Bool
== :: DescribeTrackerResponse -> DescribeTrackerResponse -> Bool
$c== :: DescribeTrackerResponse -> DescribeTrackerResponse -> Bool
Prelude.Eq, ReadPrec [DescribeTrackerResponse]
ReadPrec DescribeTrackerResponse
Int -> ReadS DescribeTrackerResponse
ReadS [DescribeTrackerResponse]
(Int -> ReadS DescribeTrackerResponse)
-> ReadS [DescribeTrackerResponse]
-> ReadPrec DescribeTrackerResponse
-> ReadPrec [DescribeTrackerResponse]
-> Read DescribeTrackerResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeTrackerResponse]
$creadListPrec :: ReadPrec [DescribeTrackerResponse]
readPrec :: ReadPrec DescribeTrackerResponse
$creadPrec :: ReadPrec DescribeTrackerResponse
readList :: ReadS [DescribeTrackerResponse]
$creadList :: ReadS [DescribeTrackerResponse]
readsPrec :: Int -> ReadS DescribeTrackerResponse
$creadsPrec :: Int -> ReadS DescribeTrackerResponse
Prelude.Read, Int -> DescribeTrackerResponse -> ShowS
[DescribeTrackerResponse] -> ShowS
DescribeTrackerResponse -> String
(Int -> DescribeTrackerResponse -> ShowS)
-> (DescribeTrackerResponse -> String)
-> ([DescribeTrackerResponse] -> ShowS)
-> Show DescribeTrackerResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeTrackerResponse] -> ShowS
$cshowList :: [DescribeTrackerResponse] -> ShowS
show :: DescribeTrackerResponse -> String
$cshow :: DescribeTrackerResponse -> String
showsPrec :: Int -> DescribeTrackerResponse -> ShowS
$cshowsPrec :: Int -> DescribeTrackerResponse -> ShowS
Prelude.Show, (forall x.
 DescribeTrackerResponse -> Rep DescribeTrackerResponse x)
-> (forall x.
    Rep DescribeTrackerResponse x -> DescribeTrackerResponse)
-> Generic DescribeTrackerResponse
forall x. Rep DescribeTrackerResponse x -> DescribeTrackerResponse
forall x. DescribeTrackerResponse -> Rep DescribeTrackerResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeTrackerResponse x -> DescribeTrackerResponse
$cfrom :: forall x. DescribeTrackerResponse -> Rep DescribeTrackerResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeTrackerResponse' 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:
--
-- 'pricingPlanDataSource', 'describeTrackerResponse_pricingPlanDataSource' - The specified data provider for the tracker resource.
--
-- 'kmsKeyId', 'describeTrackerResponse_kmsKeyId' - A key identifier for an
-- <https://docs.aws.amazon.com/kms/latest/developerguide/create-keys.html AWS KMS customer managed key>
-- assigned to the Amazon Location resource.
--
-- 'tags', 'describeTrackerResponse_tags' - The tags associated with the tracker resource.
--
-- 'positionFiltering', 'describeTrackerResponse_positionFiltering' - The position filtering method of the tracker resource.
--
-- 'httpStatus', 'describeTrackerResponse_httpStatus' - The response's http status code.
--
-- 'createTime', 'describeTrackerResponse_createTime' - The timestamp for when the tracker resource was created in
-- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
-- format: @YYYY-MM-DDThh:mm:ss.sssZ@.
--
-- 'description', 'describeTrackerResponse_description' - The optional description for the tracker resource.
--
-- 'pricingPlan', 'describeTrackerResponse_pricingPlan' - The pricing plan selected for the specified tracker resource.
--
-- For additional details and restrictions on each pricing plan option, see
-- <https://aws.amazon.com/location/pricing/ Amazon Location Service pricing>.
--
-- 'trackerArn', 'describeTrackerResponse_trackerArn' - The Amazon Resource Name (ARN) for the tracker resource. Used when you
-- need to specify a resource across all AWS.
--
-- -   Format example:
--     @arn:aws:geo:region:account-id:tracker\/ExampleTracker@
--
-- 'trackerName', 'describeTrackerResponse_trackerName' - The name of the tracker resource.
--
-- 'updateTime', 'describeTrackerResponse_updateTime' - The timestamp for when the tracker 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@.
newDescribeTrackerResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'createTime'
  Prelude.UTCTime ->
  -- | 'description'
  Prelude.Text ->
  -- | 'pricingPlan'
  PricingPlan ->
  -- | 'trackerArn'
  Prelude.Text ->
  -- | 'trackerName'
  Prelude.Text ->
  -- | 'updateTime'
  Prelude.UTCTime ->
  DescribeTrackerResponse
newDescribeTrackerResponse :: Int
-> UTCTime
-> Text
-> PricingPlan
-> Text
-> Text
-> UTCTime
-> DescribeTrackerResponse
newDescribeTrackerResponse
  Int
pHttpStatus_
  UTCTime
pCreateTime_
  Text
pDescription_
  PricingPlan
pPricingPlan_
  Text
pTrackerArn_
  Text
pTrackerName_
  UTCTime
pUpdateTime_ =
    DescribeTrackerResponse' :: Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe PositionFiltering
-> Int
-> POSIX
-> Text
-> PricingPlan
-> Text
-> Text
-> POSIX
-> DescribeTrackerResponse
DescribeTrackerResponse'
      { $sel:pricingPlanDataSource:DescribeTrackerResponse' :: Maybe Text
pricingPlanDataSource =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:kmsKeyId:DescribeTrackerResponse' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:tags:DescribeTrackerResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:positionFiltering:DescribeTrackerResponse' :: Maybe PositionFiltering
positionFiltering = Maybe PositionFiltering
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DescribeTrackerResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:createTime:DescribeTrackerResponse' :: 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:description:DescribeTrackerResponse' :: Text
description = Text
pDescription_,
        $sel:pricingPlan:DescribeTrackerResponse' :: PricingPlan
pricingPlan = PricingPlan
pPricingPlan_,
        $sel:trackerArn:DescribeTrackerResponse' :: Text
trackerArn = Text
pTrackerArn_,
        $sel:trackerName:DescribeTrackerResponse' :: Text
trackerName = Text
pTrackerName_,
        $sel:updateTime:DescribeTrackerResponse' :: 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 specified data provider for the tracker resource.
describeTrackerResponse_pricingPlanDataSource :: Lens.Lens' DescribeTrackerResponse (Prelude.Maybe Prelude.Text)
describeTrackerResponse_pricingPlanDataSource :: (Maybe Text -> f (Maybe Text))
-> DescribeTrackerResponse -> f DescribeTrackerResponse
describeTrackerResponse_pricingPlanDataSource = (DescribeTrackerResponse -> Maybe Text)
-> (DescribeTrackerResponse
    -> Maybe Text -> DescribeTrackerResponse)
-> Lens
     DescribeTrackerResponse
     DescribeTrackerResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTrackerResponse' {Maybe Text
pricingPlanDataSource :: Maybe Text
$sel:pricingPlanDataSource:DescribeTrackerResponse' :: DescribeTrackerResponse -> Maybe Text
pricingPlanDataSource} -> Maybe Text
pricingPlanDataSource) (\s :: DescribeTrackerResponse
s@DescribeTrackerResponse' {} Maybe Text
a -> DescribeTrackerResponse
s {$sel:pricingPlanDataSource:DescribeTrackerResponse' :: Maybe Text
pricingPlanDataSource = Maybe Text
a} :: DescribeTrackerResponse)

-- | A key identifier for an
-- <https://docs.aws.amazon.com/kms/latest/developerguide/create-keys.html AWS KMS customer managed key>
-- assigned to the Amazon Location resource.
describeTrackerResponse_kmsKeyId :: Lens.Lens' DescribeTrackerResponse (Prelude.Maybe Prelude.Text)
describeTrackerResponse_kmsKeyId :: (Maybe Text -> f (Maybe Text))
-> DescribeTrackerResponse -> f DescribeTrackerResponse
describeTrackerResponse_kmsKeyId = (DescribeTrackerResponse -> Maybe Text)
-> (DescribeTrackerResponse
    -> Maybe Text -> DescribeTrackerResponse)
-> Lens
     DescribeTrackerResponse
     DescribeTrackerResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTrackerResponse' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:DescribeTrackerResponse' :: DescribeTrackerResponse -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: DescribeTrackerResponse
s@DescribeTrackerResponse' {} Maybe Text
a -> DescribeTrackerResponse
s {$sel:kmsKeyId:DescribeTrackerResponse' :: Maybe Text
kmsKeyId = Maybe Text
a} :: DescribeTrackerResponse)

-- | The tags associated with the tracker resource.
describeTrackerResponse_tags :: Lens.Lens' DescribeTrackerResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
describeTrackerResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeTrackerResponse -> f DescribeTrackerResponse
describeTrackerResponse_tags = (DescribeTrackerResponse -> Maybe (HashMap Text Text))
-> (DescribeTrackerResponse
    -> Maybe (HashMap Text Text) -> DescribeTrackerResponse)
-> Lens
     DescribeTrackerResponse
     DescribeTrackerResponse
     (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 (\DescribeTrackerResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:DescribeTrackerResponse' :: DescribeTrackerResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: DescribeTrackerResponse
s@DescribeTrackerResponse' {} Maybe (HashMap Text Text)
a -> DescribeTrackerResponse
s {$sel:tags:DescribeTrackerResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: DescribeTrackerResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> DescribeTrackerResponse -> f DescribeTrackerResponse)
-> ((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)))
-> DescribeTrackerResponse
-> f DescribeTrackerResponse
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 position filtering method of the tracker resource.
describeTrackerResponse_positionFiltering :: Lens.Lens' DescribeTrackerResponse (Prelude.Maybe PositionFiltering)
describeTrackerResponse_positionFiltering :: (Maybe PositionFiltering -> f (Maybe PositionFiltering))
-> DescribeTrackerResponse -> f DescribeTrackerResponse
describeTrackerResponse_positionFiltering = (DescribeTrackerResponse -> Maybe PositionFiltering)
-> (DescribeTrackerResponse
    -> Maybe PositionFiltering -> DescribeTrackerResponse)
-> Lens
     DescribeTrackerResponse
     DescribeTrackerResponse
     (Maybe PositionFiltering)
     (Maybe PositionFiltering)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTrackerResponse' {Maybe PositionFiltering
positionFiltering :: Maybe PositionFiltering
$sel:positionFiltering:DescribeTrackerResponse' :: DescribeTrackerResponse -> Maybe PositionFiltering
positionFiltering} -> Maybe PositionFiltering
positionFiltering) (\s :: DescribeTrackerResponse
s@DescribeTrackerResponse' {} Maybe PositionFiltering
a -> DescribeTrackerResponse
s {$sel:positionFiltering:DescribeTrackerResponse' :: Maybe PositionFiltering
positionFiltering = Maybe PositionFiltering
a} :: DescribeTrackerResponse)

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

-- | The timestamp for when the tracker resource was created in
-- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
-- format: @YYYY-MM-DDThh:mm:ss.sssZ@.
describeTrackerResponse_createTime :: Lens.Lens' DescribeTrackerResponse Prelude.UTCTime
describeTrackerResponse_createTime :: (UTCTime -> f UTCTime)
-> DescribeTrackerResponse -> f DescribeTrackerResponse
describeTrackerResponse_createTime = (DescribeTrackerResponse -> POSIX)
-> (DescribeTrackerResponse -> POSIX -> DescribeTrackerResponse)
-> Lens DescribeTrackerResponse DescribeTrackerResponse POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTrackerResponse' {POSIX
createTime :: POSIX
$sel:createTime:DescribeTrackerResponse' :: DescribeTrackerResponse -> POSIX
createTime} -> POSIX
createTime) (\s :: DescribeTrackerResponse
s@DescribeTrackerResponse' {} POSIX
a -> DescribeTrackerResponse
s {$sel:createTime:DescribeTrackerResponse' :: POSIX
createTime = POSIX
a} :: DescribeTrackerResponse) ((POSIX -> f POSIX)
 -> DescribeTrackerResponse -> f DescribeTrackerResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> DescribeTrackerResponse
-> f DescribeTrackerResponse
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 optional description for the tracker resource.
describeTrackerResponse_description :: Lens.Lens' DescribeTrackerResponse Prelude.Text
describeTrackerResponse_description :: (Text -> f Text)
-> DescribeTrackerResponse -> f DescribeTrackerResponse
describeTrackerResponse_description = (DescribeTrackerResponse -> Text)
-> (DescribeTrackerResponse -> Text -> DescribeTrackerResponse)
-> Lens DescribeTrackerResponse DescribeTrackerResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTrackerResponse' {Text
description :: Text
$sel:description:DescribeTrackerResponse' :: DescribeTrackerResponse -> Text
description} -> Text
description) (\s :: DescribeTrackerResponse
s@DescribeTrackerResponse' {} Text
a -> DescribeTrackerResponse
s {$sel:description:DescribeTrackerResponse' :: Text
description = Text
a} :: DescribeTrackerResponse)

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

-- | The Amazon Resource Name (ARN) for the tracker resource. Used when you
-- need to specify a resource across all AWS.
--
-- -   Format example:
--     @arn:aws:geo:region:account-id:tracker\/ExampleTracker@
describeTrackerResponse_trackerArn :: Lens.Lens' DescribeTrackerResponse Prelude.Text
describeTrackerResponse_trackerArn :: (Text -> f Text)
-> DescribeTrackerResponse -> f DescribeTrackerResponse
describeTrackerResponse_trackerArn = (DescribeTrackerResponse -> Text)
-> (DescribeTrackerResponse -> Text -> DescribeTrackerResponse)
-> Lens DescribeTrackerResponse DescribeTrackerResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTrackerResponse' {Text
trackerArn :: Text
$sel:trackerArn:DescribeTrackerResponse' :: DescribeTrackerResponse -> Text
trackerArn} -> Text
trackerArn) (\s :: DescribeTrackerResponse
s@DescribeTrackerResponse' {} Text
a -> DescribeTrackerResponse
s {$sel:trackerArn:DescribeTrackerResponse' :: Text
trackerArn = Text
a} :: DescribeTrackerResponse)

-- | The name of the tracker resource.
describeTrackerResponse_trackerName :: Lens.Lens' DescribeTrackerResponse Prelude.Text
describeTrackerResponse_trackerName :: (Text -> f Text)
-> DescribeTrackerResponse -> f DescribeTrackerResponse
describeTrackerResponse_trackerName = (DescribeTrackerResponse -> Text)
-> (DescribeTrackerResponse -> Text -> DescribeTrackerResponse)
-> Lens DescribeTrackerResponse DescribeTrackerResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTrackerResponse' {Text
trackerName :: Text
$sel:trackerName:DescribeTrackerResponse' :: DescribeTrackerResponse -> Text
trackerName} -> Text
trackerName) (\s :: DescribeTrackerResponse
s@DescribeTrackerResponse' {} Text
a -> DescribeTrackerResponse
s {$sel:trackerName:DescribeTrackerResponse' :: Text
trackerName = Text
a} :: DescribeTrackerResponse)

-- | The timestamp for when the tracker 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@.
describeTrackerResponse_updateTime :: Lens.Lens' DescribeTrackerResponse Prelude.UTCTime
describeTrackerResponse_updateTime :: (UTCTime -> f UTCTime)
-> DescribeTrackerResponse -> f DescribeTrackerResponse
describeTrackerResponse_updateTime = (DescribeTrackerResponse -> POSIX)
-> (DescribeTrackerResponse -> POSIX -> DescribeTrackerResponse)
-> Lens DescribeTrackerResponse DescribeTrackerResponse POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTrackerResponse' {POSIX
updateTime :: POSIX
$sel:updateTime:DescribeTrackerResponse' :: DescribeTrackerResponse -> POSIX
updateTime} -> POSIX
updateTime) (\s :: DescribeTrackerResponse
s@DescribeTrackerResponse' {} POSIX
a -> DescribeTrackerResponse
s {$sel:updateTime:DescribeTrackerResponse' :: POSIX
updateTime = POSIX
a} :: DescribeTrackerResponse) ((POSIX -> f POSIX)
 -> DescribeTrackerResponse -> f DescribeTrackerResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> DescribeTrackerResponse
-> f DescribeTrackerResponse
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 DescribeTrackerResponse