{-# 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.SageMaker.DescribeContext
-- 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)
--
-- Describes a context.
module Amazonka.SageMaker.DescribeContext
  ( -- * Creating a Request
    DescribeContext (..),
    newDescribeContext,

    -- * Request Lenses
    describeContext_contextName,

    -- * Destructuring the Response
    DescribeContextResponse (..),
    newDescribeContextResponse,

    -- * Response Lenses
    describeContextResponse_creationTime,
    describeContextResponse_createdBy,
    describeContextResponse_lastModifiedTime,
    describeContextResponse_contextType,
    describeContextResponse_contextArn,
    describeContextResponse_source,
    describeContextResponse_contextName,
    describeContextResponse_lastModifiedBy,
    describeContextResponse_description,
    describeContextResponse_properties,
    describeContextResponse_httpStatus,
  )
where

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

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

-- |
-- Create a value of 'DescribeContext' 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:
--
-- 'contextName', 'describeContext_contextName' - The name of the context to describe.
newDescribeContext ::
  -- | 'contextName'
  Prelude.Text ->
  DescribeContext
newDescribeContext :: Text -> DescribeContext
newDescribeContext Text
pContextName_ =
  DescribeContext' :: Text -> DescribeContext
DescribeContext' {$sel:contextName:DescribeContext' :: Text
contextName = Text
pContextName_}

-- | The name of the context to describe.
describeContext_contextName :: Lens.Lens' DescribeContext Prelude.Text
describeContext_contextName :: (Text -> f Text) -> DescribeContext -> f DescribeContext
describeContext_contextName = (DescribeContext -> Text)
-> (DescribeContext -> Text -> DescribeContext)
-> Lens DescribeContext DescribeContext Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeContext' {Text
contextName :: Text
$sel:contextName:DescribeContext' :: DescribeContext -> Text
contextName} -> Text
contextName) (\s :: DescribeContext
s@DescribeContext' {} Text
a -> DescribeContext
s {$sel:contextName:DescribeContext' :: Text
contextName = Text
a} :: DescribeContext)

instance Core.AWSRequest DescribeContext where
  type
    AWSResponse DescribeContext =
      DescribeContextResponse
  request :: DescribeContext -> Request DescribeContext
request = Service -> DescribeContext -> Request DescribeContext
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeContext
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeContext)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeContext))
-> Logger
-> Service
-> Proxy DescribeContext
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeContext)))
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 POSIX
-> Maybe UserContext
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe ContextSource
-> Maybe Text
-> Maybe UserContext
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> DescribeContextResponse
DescribeContextResponse'
            (Maybe POSIX
 -> Maybe UserContext
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe ContextSource
 -> Maybe Text
 -> Maybe UserContext
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Int
 -> DescribeContextResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe UserContext
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe ContextSource
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeContextResponse)
forall (f :: * -> *) a b. Functor 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
"CreationTime")
            Either
  String
  (Maybe UserContext
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe ContextSource
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeContextResponse)
-> Either String (Maybe UserContext)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> Maybe ContextSource
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeContextResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe UserContext)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreatedBy")
            Either
  String
  (Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> Maybe ContextSource
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeContextResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe ContextSource
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeContextResponse)
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
"LastModifiedTime")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe ContextSource
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeContextResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe ContextSource
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeContextResponse)
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
"ContextType")
            Either
  String
  (Maybe Text
   -> Maybe ContextSource
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeContextResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ContextSource
      -> Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeContextResponse)
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
"ContextArn")
            Either
  String
  (Maybe ContextSource
   -> Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeContextResponse)
-> Either String (Maybe ContextSource)
-> Either
     String
     (Maybe Text
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeContextResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ContextSource)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Source")
            Either
  String
  (Maybe Text
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeContextResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe UserContext
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeContextResponse)
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
"ContextName")
            Either
  String
  (Maybe UserContext
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeContextResponse)
-> Either String (Maybe UserContext)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text) -> Int -> DescribeContextResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe UserContext)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LastModifiedBy")
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text Text) -> Int -> DescribeContextResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text Text) -> Int -> DescribeContextResponse)
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
"Description")
            Either
  String
  (Maybe (HashMap Text Text) -> Int -> DescribeContextResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> DescribeContextResponse)
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
"Properties" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> DescribeContextResponse)
-> Either String Int -> Either String DescribeContextResponse
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 DescribeContext

instance Prelude.NFData DescribeContext

instance Core.ToHeaders DescribeContext where
  toHeaders :: DescribeContext -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeContext -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# (ByteString
"SageMaker.DescribeContext" :: Prelude.ByteString),
            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 DescribeContext where
  toJSON :: DescribeContext -> Value
toJSON DescribeContext' {Text
contextName :: Text
$sel:contextName:DescribeContext' :: DescribeContext -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ContextName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
contextName)]
      )

instance Core.ToPath DescribeContext where
  toPath :: DescribeContext -> ByteString
toPath = ByteString -> DescribeContext -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newDescribeContextResponse' smart constructor.
data DescribeContextResponse = DescribeContextResponse'
  { -- | When the context was created.
    DescribeContextResponse -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    DescribeContextResponse -> Maybe UserContext
createdBy :: Prelude.Maybe UserContext,
    -- | When the context was last modified.
    DescribeContextResponse -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Core.POSIX,
    -- | The type of the context.
    DescribeContextResponse -> Maybe Text
contextType :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the context.
    DescribeContextResponse -> Maybe Text
contextArn :: Prelude.Maybe Prelude.Text,
    -- | The source of the context.
    DescribeContextResponse -> Maybe ContextSource
source :: Prelude.Maybe ContextSource,
    -- | The name of the context.
    DescribeContextResponse -> Maybe Text
contextName :: Prelude.Maybe Prelude.Text,
    DescribeContextResponse -> Maybe UserContext
lastModifiedBy :: Prelude.Maybe UserContext,
    -- | The description of the context.
    DescribeContextResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | A list of the context\'s properties.
    DescribeContextResponse -> Maybe (HashMap Text Text)
properties :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    DescribeContextResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeContextResponse -> DescribeContextResponse -> Bool
(DescribeContextResponse -> DescribeContextResponse -> Bool)
-> (DescribeContextResponse -> DescribeContextResponse -> Bool)
-> Eq DescribeContextResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeContextResponse -> DescribeContextResponse -> Bool
$c/= :: DescribeContextResponse -> DescribeContextResponse -> Bool
== :: DescribeContextResponse -> DescribeContextResponse -> Bool
$c== :: DescribeContextResponse -> DescribeContextResponse -> Bool
Prelude.Eq, ReadPrec [DescribeContextResponse]
ReadPrec DescribeContextResponse
Int -> ReadS DescribeContextResponse
ReadS [DescribeContextResponse]
(Int -> ReadS DescribeContextResponse)
-> ReadS [DescribeContextResponse]
-> ReadPrec DescribeContextResponse
-> ReadPrec [DescribeContextResponse]
-> Read DescribeContextResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeContextResponse]
$creadListPrec :: ReadPrec [DescribeContextResponse]
readPrec :: ReadPrec DescribeContextResponse
$creadPrec :: ReadPrec DescribeContextResponse
readList :: ReadS [DescribeContextResponse]
$creadList :: ReadS [DescribeContextResponse]
readsPrec :: Int -> ReadS DescribeContextResponse
$creadsPrec :: Int -> ReadS DescribeContextResponse
Prelude.Read, Int -> DescribeContextResponse -> ShowS
[DescribeContextResponse] -> ShowS
DescribeContextResponse -> String
(Int -> DescribeContextResponse -> ShowS)
-> (DescribeContextResponse -> String)
-> ([DescribeContextResponse] -> ShowS)
-> Show DescribeContextResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeContextResponse] -> ShowS
$cshowList :: [DescribeContextResponse] -> ShowS
show :: DescribeContextResponse -> String
$cshow :: DescribeContextResponse -> String
showsPrec :: Int -> DescribeContextResponse -> ShowS
$cshowsPrec :: Int -> DescribeContextResponse -> ShowS
Prelude.Show, (forall x.
 DescribeContextResponse -> Rep DescribeContextResponse x)
-> (forall x.
    Rep DescribeContextResponse x -> DescribeContextResponse)
-> Generic DescribeContextResponse
forall x. Rep DescribeContextResponse x -> DescribeContextResponse
forall x. DescribeContextResponse -> Rep DescribeContextResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeContextResponse x -> DescribeContextResponse
$cfrom :: forall x. DescribeContextResponse -> Rep DescribeContextResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeContextResponse' 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:
--
-- 'creationTime', 'describeContextResponse_creationTime' - When the context was created.
--
-- 'createdBy', 'describeContextResponse_createdBy' - Undocumented member.
--
-- 'lastModifiedTime', 'describeContextResponse_lastModifiedTime' - When the context was last modified.
--
-- 'contextType', 'describeContextResponse_contextType' - The type of the context.
--
-- 'contextArn', 'describeContextResponse_contextArn' - The Amazon Resource Name (ARN) of the context.
--
-- 'source', 'describeContextResponse_source' - The source of the context.
--
-- 'contextName', 'describeContextResponse_contextName' - The name of the context.
--
-- 'lastModifiedBy', 'describeContextResponse_lastModifiedBy' - Undocumented member.
--
-- 'description', 'describeContextResponse_description' - The description of the context.
--
-- 'properties', 'describeContextResponse_properties' - A list of the context\'s properties.
--
-- 'httpStatus', 'describeContextResponse_httpStatus' - The response's http status code.
newDescribeContextResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeContextResponse
newDescribeContextResponse :: Int -> DescribeContextResponse
newDescribeContextResponse Int
pHttpStatus_ =
  DescribeContextResponse' :: Maybe POSIX
-> Maybe UserContext
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe ContextSource
-> Maybe Text
-> Maybe UserContext
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> DescribeContextResponse
DescribeContextResponse'
    { $sel:creationTime:DescribeContextResponse' :: Maybe POSIX
creationTime =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:createdBy:DescribeContextResponse' :: Maybe UserContext
createdBy = Maybe UserContext
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTime:DescribeContextResponse' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:contextType:DescribeContextResponse' :: Maybe Text
contextType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:contextArn:DescribeContextResponse' :: Maybe Text
contextArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:source:DescribeContextResponse' :: Maybe ContextSource
source = Maybe ContextSource
forall a. Maybe a
Prelude.Nothing,
      $sel:contextName:DescribeContextResponse' :: Maybe Text
contextName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedBy:DescribeContextResponse' :: Maybe UserContext
lastModifiedBy = Maybe UserContext
forall a. Maybe a
Prelude.Nothing,
      $sel:description:DescribeContextResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:properties:DescribeContextResponse' :: Maybe (HashMap Text Text)
properties = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeContextResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | When the context was created.
describeContextResponse_creationTime :: Lens.Lens' DescribeContextResponse (Prelude.Maybe Prelude.UTCTime)
describeContextResponse_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeContextResponse -> f DescribeContextResponse
describeContextResponse_creationTime = (DescribeContextResponse -> Maybe POSIX)
-> (DescribeContextResponse
    -> Maybe POSIX -> DescribeContextResponse)
-> Lens
     DescribeContextResponse
     DescribeContextResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeContextResponse' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:DescribeContextResponse' :: DescribeContextResponse -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: DescribeContextResponse
s@DescribeContextResponse' {} Maybe POSIX
a -> DescribeContextResponse
s {$sel:creationTime:DescribeContextResponse' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: DescribeContextResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeContextResponse -> f DescribeContextResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeContextResponse
-> f DescribeContextResponse
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

-- | Undocumented member.
describeContextResponse_createdBy :: Lens.Lens' DescribeContextResponse (Prelude.Maybe UserContext)
describeContextResponse_createdBy :: (Maybe UserContext -> f (Maybe UserContext))
-> DescribeContextResponse -> f DescribeContextResponse
describeContextResponse_createdBy = (DescribeContextResponse -> Maybe UserContext)
-> (DescribeContextResponse
    -> Maybe UserContext -> DescribeContextResponse)
-> Lens
     DescribeContextResponse
     DescribeContextResponse
     (Maybe UserContext)
     (Maybe UserContext)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeContextResponse' {Maybe UserContext
createdBy :: Maybe UserContext
$sel:createdBy:DescribeContextResponse' :: DescribeContextResponse -> Maybe UserContext
createdBy} -> Maybe UserContext
createdBy) (\s :: DescribeContextResponse
s@DescribeContextResponse' {} Maybe UserContext
a -> DescribeContextResponse
s {$sel:createdBy:DescribeContextResponse' :: Maybe UserContext
createdBy = Maybe UserContext
a} :: DescribeContextResponse)

-- | When the context was last modified.
describeContextResponse_lastModifiedTime :: Lens.Lens' DescribeContextResponse (Prelude.Maybe Prelude.UTCTime)
describeContextResponse_lastModifiedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeContextResponse -> f DescribeContextResponse
describeContextResponse_lastModifiedTime = (DescribeContextResponse -> Maybe POSIX)
-> (DescribeContextResponse
    -> Maybe POSIX -> DescribeContextResponse)
-> Lens
     DescribeContextResponse
     DescribeContextResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeContextResponse' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:DescribeContextResponse' :: DescribeContextResponse -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: DescribeContextResponse
s@DescribeContextResponse' {} Maybe POSIX
a -> DescribeContextResponse
s {$sel:lastModifiedTime:DescribeContextResponse' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: DescribeContextResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeContextResponse -> f DescribeContextResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeContextResponse
-> f DescribeContextResponse
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 type of the context.
describeContextResponse_contextType :: Lens.Lens' DescribeContextResponse (Prelude.Maybe Prelude.Text)
describeContextResponse_contextType :: (Maybe Text -> f (Maybe Text))
-> DescribeContextResponse -> f DescribeContextResponse
describeContextResponse_contextType = (DescribeContextResponse -> Maybe Text)
-> (DescribeContextResponse
    -> Maybe Text -> DescribeContextResponse)
-> Lens
     DescribeContextResponse
     DescribeContextResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeContextResponse' {Maybe Text
contextType :: Maybe Text
$sel:contextType:DescribeContextResponse' :: DescribeContextResponse -> Maybe Text
contextType} -> Maybe Text
contextType) (\s :: DescribeContextResponse
s@DescribeContextResponse' {} Maybe Text
a -> DescribeContextResponse
s {$sel:contextType:DescribeContextResponse' :: Maybe Text
contextType = Maybe Text
a} :: DescribeContextResponse)

-- | The Amazon Resource Name (ARN) of the context.
describeContextResponse_contextArn :: Lens.Lens' DescribeContextResponse (Prelude.Maybe Prelude.Text)
describeContextResponse_contextArn :: (Maybe Text -> f (Maybe Text))
-> DescribeContextResponse -> f DescribeContextResponse
describeContextResponse_contextArn = (DescribeContextResponse -> Maybe Text)
-> (DescribeContextResponse
    -> Maybe Text -> DescribeContextResponse)
-> Lens
     DescribeContextResponse
     DescribeContextResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeContextResponse' {Maybe Text
contextArn :: Maybe Text
$sel:contextArn:DescribeContextResponse' :: DescribeContextResponse -> Maybe Text
contextArn} -> Maybe Text
contextArn) (\s :: DescribeContextResponse
s@DescribeContextResponse' {} Maybe Text
a -> DescribeContextResponse
s {$sel:contextArn:DescribeContextResponse' :: Maybe Text
contextArn = Maybe Text
a} :: DescribeContextResponse)

-- | The source of the context.
describeContextResponse_source :: Lens.Lens' DescribeContextResponse (Prelude.Maybe ContextSource)
describeContextResponse_source :: (Maybe ContextSource -> f (Maybe ContextSource))
-> DescribeContextResponse -> f DescribeContextResponse
describeContextResponse_source = (DescribeContextResponse -> Maybe ContextSource)
-> (DescribeContextResponse
    -> Maybe ContextSource -> DescribeContextResponse)
-> Lens
     DescribeContextResponse
     DescribeContextResponse
     (Maybe ContextSource)
     (Maybe ContextSource)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeContextResponse' {Maybe ContextSource
source :: Maybe ContextSource
$sel:source:DescribeContextResponse' :: DescribeContextResponse -> Maybe ContextSource
source} -> Maybe ContextSource
source) (\s :: DescribeContextResponse
s@DescribeContextResponse' {} Maybe ContextSource
a -> DescribeContextResponse
s {$sel:source:DescribeContextResponse' :: Maybe ContextSource
source = Maybe ContextSource
a} :: DescribeContextResponse)

-- | The name of the context.
describeContextResponse_contextName :: Lens.Lens' DescribeContextResponse (Prelude.Maybe Prelude.Text)
describeContextResponse_contextName :: (Maybe Text -> f (Maybe Text))
-> DescribeContextResponse -> f DescribeContextResponse
describeContextResponse_contextName = (DescribeContextResponse -> Maybe Text)
-> (DescribeContextResponse
    -> Maybe Text -> DescribeContextResponse)
-> Lens
     DescribeContextResponse
     DescribeContextResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeContextResponse' {Maybe Text
contextName :: Maybe Text
$sel:contextName:DescribeContextResponse' :: DescribeContextResponse -> Maybe Text
contextName} -> Maybe Text
contextName) (\s :: DescribeContextResponse
s@DescribeContextResponse' {} Maybe Text
a -> DescribeContextResponse
s {$sel:contextName:DescribeContextResponse' :: Maybe Text
contextName = Maybe Text
a} :: DescribeContextResponse)

-- | Undocumented member.
describeContextResponse_lastModifiedBy :: Lens.Lens' DescribeContextResponse (Prelude.Maybe UserContext)
describeContextResponse_lastModifiedBy :: (Maybe UserContext -> f (Maybe UserContext))
-> DescribeContextResponse -> f DescribeContextResponse
describeContextResponse_lastModifiedBy = (DescribeContextResponse -> Maybe UserContext)
-> (DescribeContextResponse
    -> Maybe UserContext -> DescribeContextResponse)
-> Lens
     DescribeContextResponse
     DescribeContextResponse
     (Maybe UserContext)
     (Maybe UserContext)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeContextResponse' {Maybe UserContext
lastModifiedBy :: Maybe UserContext
$sel:lastModifiedBy:DescribeContextResponse' :: DescribeContextResponse -> Maybe UserContext
lastModifiedBy} -> Maybe UserContext
lastModifiedBy) (\s :: DescribeContextResponse
s@DescribeContextResponse' {} Maybe UserContext
a -> DescribeContextResponse
s {$sel:lastModifiedBy:DescribeContextResponse' :: Maybe UserContext
lastModifiedBy = Maybe UserContext
a} :: DescribeContextResponse)

-- | The description of the context.
describeContextResponse_description :: Lens.Lens' DescribeContextResponse (Prelude.Maybe Prelude.Text)
describeContextResponse_description :: (Maybe Text -> f (Maybe Text))
-> DescribeContextResponse -> f DescribeContextResponse
describeContextResponse_description = (DescribeContextResponse -> Maybe Text)
-> (DescribeContextResponse
    -> Maybe Text -> DescribeContextResponse)
-> Lens
     DescribeContextResponse
     DescribeContextResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeContextResponse' {Maybe Text
description :: Maybe Text
$sel:description:DescribeContextResponse' :: DescribeContextResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: DescribeContextResponse
s@DescribeContextResponse' {} Maybe Text
a -> DescribeContextResponse
s {$sel:description:DescribeContextResponse' :: Maybe Text
description = Maybe Text
a} :: DescribeContextResponse)

-- | A list of the context\'s properties.
describeContextResponse_properties :: Lens.Lens' DescribeContextResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
describeContextResponse_properties :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeContextResponse -> f DescribeContextResponse
describeContextResponse_properties = (DescribeContextResponse -> Maybe (HashMap Text Text))
-> (DescribeContextResponse
    -> Maybe (HashMap Text Text) -> DescribeContextResponse)
-> Lens
     DescribeContextResponse
     DescribeContextResponse
     (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 (\DescribeContextResponse' {Maybe (HashMap Text Text)
properties :: Maybe (HashMap Text Text)
$sel:properties:DescribeContextResponse' :: DescribeContextResponse -> Maybe (HashMap Text Text)
properties} -> Maybe (HashMap Text Text)
properties) (\s :: DescribeContextResponse
s@DescribeContextResponse' {} Maybe (HashMap Text Text)
a -> DescribeContextResponse
s {$sel:properties:DescribeContextResponse' :: Maybe (HashMap Text Text)
properties = Maybe (HashMap Text Text)
a} :: DescribeContextResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> DescribeContextResponse -> f DescribeContextResponse)
-> ((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)))
-> DescribeContextResponse
-> f DescribeContextResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData DescribeContextResponse