{-# 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.MacieV2.GetMacieSession
-- 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 current status and configuration settings for an Amazon
-- Macie account.
module Amazonka.MacieV2.GetMacieSession
  ( -- * Creating a Request
    GetMacieSession (..),
    newGetMacieSession,

    -- * Destructuring the Response
    GetMacieSessionResponse (..),
    newGetMacieSessionResponse,

    -- * Response Lenses
    getMacieSessionResponse_status,
    getMacieSessionResponse_createdAt,
    getMacieSessionResponse_findingPublishingFrequency,
    getMacieSessionResponse_updatedAt,
    getMacieSessionResponse_serviceRole,
    getMacieSessionResponse_httpStatus,
  )
where

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

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

-- |
-- Create a value of 'GetMacieSession' 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.
newGetMacieSession ::
  GetMacieSession
newGetMacieSession :: GetMacieSession
newGetMacieSession = GetMacieSession
GetMacieSession'

instance Core.AWSRequest GetMacieSession where
  type
    AWSResponse GetMacieSession =
      GetMacieSessionResponse
  request :: GetMacieSession -> Request GetMacieSession
request = Service -> GetMacieSession -> Request GetMacieSession
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetMacieSession
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetMacieSession)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetMacieSession))
-> Logger
-> Service
-> Proxy GetMacieSession
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetMacieSession)))
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 MacieStatus
-> Maybe POSIX
-> Maybe FindingPublishingFrequency
-> Maybe POSIX
-> Maybe Text
-> Int
-> GetMacieSessionResponse
GetMacieSessionResponse'
            (Maybe MacieStatus
 -> Maybe POSIX
 -> Maybe FindingPublishingFrequency
 -> Maybe POSIX
 -> Maybe Text
 -> Int
 -> GetMacieSessionResponse)
-> Either String (Maybe MacieStatus)
-> Either
     String
     (Maybe POSIX
      -> Maybe FindingPublishingFrequency
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> GetMacieSessionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe MacieStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"status")
            Either
  String
  (Maybe POSIX
   -> Maybe FindingPublishingFrequency
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> GetMacieSessionResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe FindingPublishingFrequency
      -> Maybe POSIX -> Maybe Text -> Int -> GetMacieSessionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"createdAt")
            Either
  String
  (Maybe FindingPublishingFrequency
   -> Maybe POSIX -> Maybe Text -> Int -> GetMacieSessionResponse)
-> Either String (Maybe FindingPublishingFrequency)
-> Either
     String
     (Maybe POSIX -> Maybe Text -> Int -> GetMacieSessionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe FindingPublishingFrequency)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"findingPublishingFrequency")
            Either
  String
  (Maybe POSIX -> Maybe Text -> Int -> GetMacieSessionResponse)
-> Either String (Maybe POSIX)
-> Either String (Maybe Text -> Int -> GetMacieSessionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"updatedAt")
            Either String (Maybe Text -> Int -> GetMacieSessionResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetMacieSessionResponse)
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
"serviceRole")
            Either String (Int -> GetMacieSessionResponse)
-> Either String Int -> Either String GetMacieSessionResponse
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))
      )

instance Prelude.Hashable GetMacieSession

instance Prelude.NFData GetMacieSession

instance Core.ToHeaders GetMacieSession where
  toHeaders :: GetMacieSession -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetMacieSession -> 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 GetMacieSession where
  toPath :: GetMacieSession -> ByteString
toPath = ByteString -> GetMacieSession -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/macie"

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

-- | /See:/ 'newGetMacieSessionResponse' smart constructor.
data GetMacieSessionResponse = GetMacieSessionResponse'
  { -- | The current status of the Macie account. Possible values are: PAUSED,
    -- the account is enabled but all Macie activities are suspended (paused)
    -- for the account; and, ENABLED, the account is enabled and all Macie
    -- activities are enabled for the account.
    GetMacieSessionResponse -> Maybe MacieStatus
status :: Prelude.Maybe MacieStatus,
    -- | The date and time, in UTC and extended ISO 8601 format, when the Amazon
    -- Macie account was created.
    GetMacieSessionResponse -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The frequency with which Macie publishes updates to policy findings for
    -- the account. This includes publishing updates to Security Hub and Amazon
    -- EventBridge (formerly called Amazon CloudWatch Events).
    GetMacieSessionResponse -> Maybe FindingPublishingFrequency
findingPublishingFrequency :: Prelude.Maybe FindingPublishingFrequency,
    -- | The date and time, in UTC and extended ISO 8601 format, of the most
    -- recent change to the status of the Macie account.
    GetMacieSessionResponse -> Maybe POSIX
updatedAt :: Prelude.Maybe Core.POSIX,
    -- | The Amazon Resource Name (ARN) of the service-linked role that allows
    -- Macie to monitor and analyze data in Amazon Web Services resources for
    -- the account.
    GetMacieSessionResponse -> Maybe Text
serviceRole :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetMacieSessionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetMacieSessionResponse -> GetMacieSessionResponse -> Bool
(GetMacieSessionResponse -> GetMacieSessionResponse -> Bool)
-> (GetMacieSessionResponse -> GetMacieSessionResponse -> Bool)
-> Eq GetMacieSessionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetMacieSessionResponse -> GetMacieSessionResponse -> Bool
$c/= :: GetMacieSessionResponse -> GetMacieSessionResponse -> Bool
== :: GetMacieSessionResponse -> GetMacieSessionResponse -> Bool
$c== :: GetMacieSessionResponse -> GetMacieSessionResponse -> Bool
Prelude.Eq, ReadPrec [GetMacieSessionResponse]
ReadPrec GetMacieSessionResponse
Int -> ReadS GetMacieSessionResponse
ReadS [GetMacieSessionResponse]
(Int -> ReadS GetMacieSessionResponse)
-> ReadS [GetMacieSessionResponse]
-> ReadPrec GetMacieSessionResponse
-> ReadPrec [GetMacieSessionResponse]
-> Read GetMacieSessionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetMacieSessionResponse]
$creadListPrec :: ReadPrec [GetMacieSessionResponse]
readPrec :: ReadPrec GetMacieSessionResponse
$creadPrec :: ReadPrec GetMacieSessionResponse
readList :: ReadS [GetMacieSessionResponse]
$creadList :: ReadS [GetMacieSessionResponse]
readsPrec :: Int -> ReadS GetMacieSessionResponse
$creadsPrec :: Int -> ReadS GetMacieSessionResponse
Prelude.Read, Int -> GetMacieSessionResponse -> ShowS
[GetMacieSessionResponse] -> ShowS
GetMacieSessionResponse -> String
(Int -> GetMacieSessionResponse -> ShowS)
-> (GetMacieSessionResponse -> String)
-> ([GetMacieSessionResponse] -> ShowS)
-> Show GetMacieSessionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetMacieSessionResponse] -> ShowS
$cshowList :: [GetMacieSessionResponse] -> ShowS
show :: GetMacieSessionResponse -> String
$cshow :: GetMacieSessionResponse -> String
showsPrec :: Int -> GetMacieSessionResponse -> ShowS
$cshowsPrec :: Int -> GetMacieSessionResponse -> ShowS
Prelude.Show, (forall x.
 GetMacieSessionResponse -> Rep GetMacieSessionResponse x)
-> (forall x.
    Rep GetMacieSessionResponse x -> GetMacieSessionResponse)
-> Generic GetMacieSessionResponse
forall x. Rep GetMacieSessionResponse x -> GetMacieSessionResponse
forall x. GetMacieSessionResponse -> Rep GetMacieSessionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetMacieSessionResponse x -> GetMacieSessionResponse
$cfrom :: forall x. GetMacieSessionResponse -> Rep GetMacieSessionResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetMacieSessionResponse' 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:
--
-- 'status', 'getMacieSessionResponse_status' - The current status of the Macie account. Possible values are: PAUSED,
-- the account is enabled but all Macie activities are suspended (paused)
-- for the account; and, ENABLED, the account is enabled and all Macie
-- activities are enabled for the account.
--
-- 'createdAt', 'getMacieSessionResponse_createdAt' - The date and time, in UTC and extended ISO 8601 format, when the Amazon
-- Macie account was created.
--
-- 'findingPublishingFrequency', 'getMacieSessionResponse_findingPublishingFrequency' - The frequency with which Macie publishes updates to policy findings for
-- the account. This includes publishing updates to Security Hub and Amazon
-- EventBridge (formerly called Amazon CloudWatch Events).
--
-- 'updatedAt', 'getMacieSessionResponse_updatedAt' - The date and time, in UTC and extended ISO 8601 format, of the most
-- recent change to the status of the Macie account.
--
-- 'serviceRole', 'getMacieSessionResponse_serviceRole' - The Amazon Resource Name (ARN) of the service-linked role that allows
-- Macie to monitor and analyze data in Amazon Web Services resources for
-- the account.
--
-- 'httpStatus', 'getMacieSessionResponse_httpStatus' - The response's http status code.
newGetMacieSessionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetMacieSessionResponse
newGetMacieSessionResponse :: Int -> GetMacieSessionResponse
newGetMacieSessionResponse Int
pHttpStatus_ =
  GetMacieSessionResponse' :: Maybe MacieStatus
-> Maybe POSIX
-> Maybe FindingPublishingFrequency
-> Maybe POSIX
-> Maybe Text
-> Int
-> GetMacieSessionResponse
GetMacieSessionResponse'
    { $sel:status:GetMacieSessionResponse' :: Maybe MacieStatus
status = Maybe MacieStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:GetMacieSessionResponse' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:findingPublishingFrequency:GetMacieSessionResponse' :: Maybe FindingPublishingFrequency
findingPublishingFrequency = Maybe FindingPublishingFrequency
forall a. Maybe a
Prelude.Nothing,
      $sel:updatedAt:GetMacieSessionResponse' :: Maybe POSIX
updatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceRole:GetMacieSessionResponse' :: Maybe Text
serviceRole = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetMacieSessionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The current status of the Macie account. Possible values are: PAUSED,
-- the account is enabled but all Macie activities are suspended (paused)
-- for the account; and, ENABLED, the account is enabled and all Macie
-- activities are enabled for the account.
getMacieSessionResponse_status :: Lens.Lens' GetMacieSessionResponse (Prelude.Maybe MacieStatus)
getMacieSessionResponse_status :: (Maybe MacieStatus -> f (Maybe MacieStatus))
-> GetMacieSessionResponse -> f GetMacieSessionResponse
getMacieSessionResponse_status = (GetMacieSessionResponse -> Maybe MacieStatus)
-> (GetMacieSessionResponse
    -> Maybe MacieStatus -> GetMacieSessionResponse)
-> Lens
     GetMacieSessionResponse
     GetMacieSessionResponse
     (Maybe MacieStatus)
     (Maybe MacieStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMacieSessionResponse' {Maybe MacieStatus
status :: Maybe MacieStatus
$sel:status:GetMacieSessionResponse' :: GetMacieSessionResponse -> Maybe MacieStatus
status} -> Maybe MacieStatus
status) (\s :: GetMacieSessionResponse
s@GetMacieSessionResponse' {} Maybe MacieStatus
a -> GetMacieSessionResponse
s {$sel:status:GetMacieSessionResponse' :: Maybe MacieStatus
status = Maybe MacieStatus
a} :: GetMacieSessionResponse)

-- | The date and time, in UTC and extended ISO 8601 format, when the Amazon
-- Macie account was created.
getMacieSessionResponse_createdAt :: Lens.Lens' GetMacieSessionResponse (Prelude.Maybe Prelude.UTCTime)
getMacieSessionResponse_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetMacieSessionResponse -> f GetMacieSessionResponse
getMacieSessionResponse_createdAt = (GetMacieSessionResponse -> Maybe POSIX)
-> (GetMacieSessionResponse
    -> Maybe POSIX -> GetMacieSessionResponse)
-> Lens
     GetMacieSessionResponse
     GetMacieSessionResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMacieSessionResponse' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:GetMacieSessionResponse' :: GetMacieSessionResponse -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: GetMacieSessionResponse
s@GetMacieSessionResponse' {} Maybe POSIX
a -> GetMacieSessionResponse
s {$sel:createdAt:GetMacieSessionResponse' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: GetMacieSessionResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetMacieSessionResponse -> f GetMacieSessionResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetMacieSessionResponse
-> f GetMacieSessionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The frequency with which Macie publishes updates to policy findings for
-- the account. This includes publishing updates to Security Hub and Amazon
-- EventBridge (formerly called Amazon CloudWatch Events).
getMacieSessionResponse_findingPublishingFrequency :: Lens.Lens' GetMacieSessionResponse (Prelude.Maybe FindingPublishingFrequency)
getMacieSessionResponse_findingPublishingFrequency :: (Maybe FindingPublishingFrequency
 -> f (Maybe FindingPublishingFrequency))
-> GetMacieSessionResponse -> f GetMacieSessionResponse
getMacieSessionResponse_findingPublishingFrequency = (GetMacieSessionResponse -> Maybe FindingPublishingFrequency)
-> (GetMacieSessionResponse
    -> Maybe FindingPublishingFrequency -> GetMacieSessionResponse)
-> Lens
     GetMacieSessionResponse
     GetMacieSessionResponse
     (Maybe FindingPublishingFrequency)
     (Maybe FindingPublishingFrequency)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMacieSessionResponse' {Maybe FindingPublishingFrequency
findingPublishingFrequency :: Maybe FindingPublishingFrequency
$sel:findingPublishingFrequency:GetMacieSessionResponse' :: GetMacieSessionResponse -> Maybe FindingPublishingFrequency
findingPublishingFrequency} -> Maybe FindingPublishingFrequency
findingPublishingFrequency) (\s :: GetMacieSessionResponse
s@GetMacieSessionResponse' {} Maybe FindingPublishingFrequency
a -> GetMacieSessionResponse
s {$sel:findingPublishingFrequency:GetMacieSessionResponse' :: Maybe FindingPublishingFrequency
findingPublishingFrequency = Maybe FindingPublishingFrequency
a} :: GetMacieSessionResponse)

-- | The date and time, in UTC and extended ISO 8601 format, of the most
-- recent change to the status of the Macie account.
getMacieSessionResponse_updatedAt :: Lens.Lens' GetMacieSessionResponse (Prelude.Maybe Prelude.UTCTime)
getMacieSessionResponse_updatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetMacieSessionResponse -> f GetMacieSessionResponse
getMacieSessionResponse_updatedAt = (GetMacieSessionResponse -> Maybe POSIX)
-> (GetMacieSessionResponse
    -> Maybe POSIX -> GetMacieSessionResponse)
-> Lens
     GetMacieSessionResponse
     GetMacieSessionResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMacieSessionResponse' {Maybe POSIX
updatedAt :: Maybe POSIX
$sel:updatedAt:GetMacieSessionResponse' :: GetMacieSessionResponse -> Maybe POSIX
updatedAt} -> Maybe POSIX
updatedAt) (\s :: GetMacieSessionResponse
s@GetMacieSessionResponse' {} Maybe POSIX
a -> GetMacieSessionResponse
s {$sel:updatedAt:GetMacieSessionResponse' :: Maybe POSIX
updatedAt = Maybe POSIX
a} :: GetMacieSessionResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetMacieSessionResponse -> f GetMacieSessionResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetMacieSessionResponse
-> f GetMacieSessionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The Amazon Resource Name (ARN) of the service-linked role that allows
-- Macie to monitor and analyze data in Amazon Web Services resources for
-- the account.
getMacieSessionResponse_serviceRole :: Lens.Lens' GetMacieSessionResponse (Prelude.Maybe Prelude.Text)
getMacieSessionResponse_serviceRole :: (Maybe Text -> f (Maybe Text))
-> GetMacieSessionResponse -> f GetMacieSessionResponse
getMacieSessionResponse_serviceRole = (GetMacieSessionResponse -> Maybe Text)
-> (GetMacieSessionResponse
    -> Maybe Text -> GetMacieSessionResponse)
-> Lens
     GetMacieSessionResponse
     GetMacieSessionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetMacieSessionResponse' {Maybe Text
serviceRole :: Maybe Text
$sel:serviceRole:GetMacieSessionResponse' :: GetMacieSessionResponse -> Maybe Text
serviceRole} -> Maybe Text
serviceRole) (\s :: GetMacieSessionResponse
s@GetMacieSessionResponse' {} Maybe Text
a -> GetMacieSessionResponse
s {$sel:serviceRole:GetMacieSessionResponse' :: Maybe Text
serviceRole = Maybe Text
a} :: GetMacieSessionResponse)

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

instance Prelude.NFData GetMacieSessionResponse