{-# 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.DescribeAction
-- 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 an action.
module Amazonka.SageMaker.DescribeAction
  ( -- * Creating a Request
    DescribeAction (..),
    newDescribeAction,

    -- * Request Lenses
    describeAction_actionName,

    -- * Destructuring the Response
    DescribeActionResponse (..),
    newDescribeActionResponse,

    -- * Response Lenses
    describeActionResponse_creationTime,
    describeActionResponse_metadataProperties,
    describeActionResponse_status,
    describeActionResponse_createdBy,
    describeActionResponse_lastModifiedTime,
    describeActionResponse_actionName,
    describeActionResponse_source,
    describeActionResponse_lastModifiedBy,
    describeActionResponse_actionArn,
    describeActionResponse_description,
    describeActionResponse_actionType,
    describeActionResponse_properties,
    describeActionResponse_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:/ 'newDescribeAction' smart constructor.
data DescribeAction = DescribeAction'
  { -- | The name of the action to describe.
    DescribeAction -> Text
actionName :: Prelude.Text
  }
  deriving (DescribeAction -> DescribeAction -> Bool
(DescribeAction -> DescribeAction -> Bool)
-> (DescribeAction -> DescribeAction -> Bool) -> Eq DescribeAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAction -> DescribeAction -> Bool
$c/= :: DescribeAction -> DescribeAction -> Bool
== :: DescribeAction -> DescribeAction -> Bool
$c== :: DescribeAction -> DescribeAction -> Bool
Prelude.Eq, ReadPrec [DescribeAction]
ReadPrec DescribeAction
Int -> ReadS DescribeAction
ReadS [DescribeAction]
(Int -> ReadS DescribeAction)
-> ReadS [DescribeAction]
-> ReadPrec DescribeAction
-> ReadPrec [DescribeAction]
-> Read DescribeAction
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAction]
$creadListPrec :: ReadPrec [DescribeAction]
readPrec :: ReadPrec DescribeAction
$creadPrec :: ReadPrec DescribeAction
readList :: ReadS [DescribeAction]
$creadList :: ReadS [DescribeAction]
readsPrec :: Int -> ReadS DescribeAction
$creadsPrec :: Int -> ReadS DescribeAction
Prelude.Read, Int -> DescribeAction -> ShowS
[DescribeAction] -> ShowS
DescribeAction -> String
(Int -> DescribeAction -> ShowS)
-> (DescribeAction -> String)
-> ([DescribeAction] -> ShowS)
-> Show DescribeAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAction] -> ShowS
$cshowList :: [DescribeAction] -> ShowS
show :: DescribeAction -> String
$cshow :: DescribeAction -> String
showsPrec :: Int -> DescribeAction -> ShowS
$cshowsPrec :: Int -> DescribeAction -> ShowS
Prelude.Show, (forall x. DescribeAction -> Rep DescribeAction x)
-> (forall x. Rep DescribeAction x -> DescribeAction)
-> Generic DescribeAction
forall x. Rep DescribeAction x -> DescribeAction
forall x. DescribeAction -> Rep DescribeAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeAction x -> DescribeAction
$cfrom :: forall x. DescribeAction -> Rep DescribeAction x
Prelude.Generic)

-- |
-- Create a value of 'DescribeAction' 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:
--
-- 'actionName', 'describeAction_actionName' - The name of the action to describe.
newDescribeAction ::
  -- | 'actionName'
  Prelude.Text ->
  DescribeAction
newDescribeAction :: Text -> DescribeAction
newDescribeAction Text
pActionName_ =
  DescribeAction' :: Text -> DescribeAction
DescribeAction' {$sel:actionName:DescribeAction' :: Text
actionName = Text
pActionName_}

-- | The name of the action to describe.
describeAction_actionName :: Lens.Lens' DescribeAction Prelude.Text
describeAction_actionName :: (Text -> f Text) -> DescribeAction -> f DescribeAction
describeAction_actionName = (DescribeAction -> Text)
-> (DescribeAction -> Text -> DescribeAction)
-> Lens DescribeAction DescribeAction Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAction' {Text
actionName :: Text
$sel:actionName:DescribeAction' :: DescribeAction -> Text
actionName} -> Text
actionName) (\s :: DescribeAction
s@DescribeAction' {} Text
a -> DescribeAction
s {$sel:actionName:DescribeAction' :: Text
actionName = Text
a} :: DescribeAction)

instance Core.AWSRequest DescribeAction where
  type
    AWSResponse DescribeAction =
      DescribeActionResponse
  request :: DescribeAction -> Request DescribeAction
request = Service -> DescribeAction -> Request DescribeAction
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeAction
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeAction)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeAction))
-> Logger
-> Service
-> Proxy DescribeAction
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeAction)))
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 MetadataProperties
-> Maybe ActionStatus
-> Maybe UserContext
-> Maybe POSIX
-> Maybe Text
-> Maybe ActionSource
-> Maybe UserContext
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> DescribeActionResponse
DescribeActionResponse'
            (Maybe POSIX
 -> Maybe MetadataProperties
 -> Maybe ActionStatus
 -> Maybe UserContext
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe ActionSource
 -> Maybe UserContext
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Int
 -> DescribeActionResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe MetadataProperties
      -> Maybe ActionStatus
      -> Maybe UserContext
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe ActionSource
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeActionResponse)
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 MetadataProperties
   -> Maybe ActionStatus
   -> Maybe UserContext
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe ActionSource
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeActionResponse)
-> Either String (Maybe MetadataProperties)
-> Either
     String
     (Maybe ActionStatus
      -> Maybe UserContext
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe ActionSource
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeActionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe MetadataProperties)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"MetadataProperties")
            Either
  String
  (Maybe ActionStatus
   -> Maybe UserContext
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe ActionSource
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeActionResponse)
-> Either String (Maybe ActionStatus)
-> Either
     String
     (Maybe UserContext
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe ActionSource
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeActionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ActionStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Status")
            Either
  String
  (Maybe UserContext
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe ActionSource
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeActionResponse)
-> Either String (Maybe UserContext)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe ActionSource
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeActionResponse)
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 ActionSource
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeActionResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe ActionSource
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeActionResponse)
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 ActionSource
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeActionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ActionSource
      -> Maybe UserContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeActionResponse)
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
"ActionName")
            Either
  String
  (Maybe ActionSource
   -> Maybe UserContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeActionResponse)
-> Either String (Maybe ActionSource)
-> Either
     String
     (Maybe UserContext
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeActionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ActionSource)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Source")
            Either
  String
  (Maybe UserContext
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeActionResponse)
-> Either String (Maybe UserContext)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeActionResponse)
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 Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeActionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> DescribeActionResponse)
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
"ActionArn")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> DescribeActionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text) -> Int -> DescribeActionResponse)
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 Text
   -> Maybe (HashMap Text Text) -> Int -> DescribeActionResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe (HashMap Text Text) -> Int -> DescribeActionResponse)
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
"ActionType")
            Either
  String (Maybe (HashMap Text Text) -> Int -> DescribeActionResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> DescribeActionResponse)
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 -> DescribeActionResponse)
-> Either String Int -> Either String DescribeActionResponse
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 DescribeAction

instance Prelude.NFData DescribeAction

instance Core.ToHeaders DescribeAction where
  toHeaders :: DescribeAction -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeAction -> 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.DescribeAction" :: 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 DescribeAction where
  toJSON :: DescribeAction -> Value
toJSON DescribeAction' {Text
actionName :: Text
$sel:actionName:DescribeAction' :: DescribeAction -> 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
"ActionName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
actionName)]
      )

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

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

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

-- |
-- Create a value of 'DescribeActionResponse' 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', 'describeActionResponse_creationTime' - When the action was created.
--
-- 'metadataProperties', 'describeActionResponse_metadataProperties' - Undocumented member.
--
-- 'status', 'describeActionResponse_status' - The status of the action.
--
-- 'createdBy', 'describeActionResponse_createdBy' - Undocumented member.
--
-- 'lastModifiedTime', 'describeActionResponse_lastModifiedTime' - When the action was last modified.
--
-- 'actionName', 'describeActionResponse_actionName' - The name of the action.
--
-- 'source', 'describeActionResponse_source' - The source of the action.
--
-- 'lastModifiedBy', 'describeActionResponse_lastModifiedBy' - Undocumented member.
--
-- 'actionArn', 'describeActionResponse_actionArn' - The Amazon Resource Name (ARN) of the action.
--
-- 'description', 'describeActionResponse_description' - The description of the action.
--
-- 'actionType', 'describeActionResponse_actionType' - The type of the action.
--
-- 'properties', 'describeActionResponse_properties' - A list of the action\'s properties.
--
-- 'httpStatus', 'describeActionResponse_httpStatus' - The response's http status code.
newDescribeActionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeActionResponse
newDescribeActionResponse :: Int -> DescribeActionResponse
newDescribeActionResponse Int
pHttpStatus_ =
  DescribeActionResponse' :: Maybe POSIX
-> Maybe MetadataProperties
-> Maybe ActionStatus
-> Maybe UserContext
-> Maybe POSIX
-> Maybe Text
-> Maybe ActionSource
-> Maybe UserContext
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> DescribeActionResponse
DescribeActionResponse'
    { $sel:creationTime:DescribeActionResponse' :: Maybe POSIX
creationTime =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:metadataProperties:DescribeActionResponse' :: Maybe MetadataProperties
metadataProperties = Maybe MetadataProperties
forall a. Maybe a
Prelude.Nothing,
      $sel:status:DescribeActionResponse' :: Maybe ActionStatus
status = Maybe ActionStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:createdBy:DescribeActionResponse' :: Maybe UserContext
createdBy = Maybe UserContext
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTime:DescribeActionResponse' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:actionName:DescribeActionResponse' :: Maybe Text
actionName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:source:DescribeActionResponse' :: Maybe ActionSource
source = Maybe ActionSource
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedBy:DescribeActionResponse' :: Maybe UserContext
lastModifiedBy = Maybe UserContext
forall a. Maybe a
Prelude.Nothing,
      $sel:actionArn:DescribeActionResponse' :: Maybe Text
actionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:DescribeActionResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:actionType:DescribeActionResponse' :: Maybe Text
actionType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:properties:DescribeActionResponse' :: Maybe (HashMap Text Text)
properties = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeActionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

-- | The status of the action.
describeActionResponse_status :: Lens.Lens' DescribeActionResponse (Prelude.Maybe ActionStatus)
describeActionResponse_status :: (Maybe ActionStatus -> f (Maybe ActionStatus))
-> DescribeActionResponse -> f DescribeActionResponse
describeActionResponse_status = (DescribeActionResponse -> Maybe ActionStatus)
-> (DescribeActionResponse
    -> Maybe ActionStatus -> DescribeActionResponse)
-> Lens
     DescribeActionResponse
     DescribeActionResponse
     (Maybe ActionStatus)
     (Maybe ActionStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeActionResponse' {Maybe ActionStatus
status :: Maybe ActionStatus
$sel:status:DescribeActionResponse' :: DescribeActionResponse -> Maybe ActionStatus
status} -> Maybe ActionStatus
status) (\s :: DescribeActionResponse
s@DescribeActionResponse' {} Maybe ActionStatus
a -> DescribeActionResponse
s {$sel:status:DescribeActionResponse' :: Maybe ActionStatus
status = Maybe ActionStatus
a} :: DescribeActionResponse)

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

-- | When the action was last modified.
describeActionResponse_lastModifiedTime :: Lens.Lens' DescribeActionResponse (Prelude.Maybe Prelude.UTCTime)
describeActionResponse_lastModifiedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeActionResponse -> f DescribeActionResponse
describeActionResponse_lastModifiedTime = (DescribeActionResponse -> Maybe POSIX)
-> (DescribeActionResponse
    -> Maybe POSIX -> DescribeActionResponse)
-> Lens
     DescribeActionResponse
     DescribeActionResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeActionResponse' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:DescribeActionResponse' :: DescribeActionResponse -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: DescribeActionResponse
s@DescribeActionResponse' {} Maybe POSIX
a -> DescribeActionResponse
s {$sel:lastModifiedTime:DescribeActionResponse' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: DescribeActionResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeActionResponse -> f DescribeActionResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeActionResponse
-> f DescribeActionResponse
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 name of the action.
describeActionResponse_actionName :: Lens.Lens' DescribeActionResponse (Prelude.Maybe Prelude.Text)
describeActionResponse_actionName :: (Maybe Text -> f (Maybe Text))
-> DescribeActionResponse -> f DescribeActionResponse
describeActionResponse_actionName = (DescribeActionResponse -> Maybe Text)
-> (DescribeActionResponse -> Maybe Text -> DescribeActionResponse)
-> Lens
     DescribeActionResponse
     DescribeActionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeActionResponse' {Maybe Text
actionName :: Maybe Text
$sel:actionName:DescribeActionResponse' :: DescribeActionResponse -> Maybe Text
actionName} -> Maybe Text
actionName) (\s :: DescribeActionResponse
s@DescribeActionResponse' {} Maybe Text
a -> DescribeActionResponse
s {$sel:actionName:DescribeActionResponse' :: Maybe Text
actionName = Maybe Text
a} :: DescribeActionResponse)

-- | The source of the action.
describeActionResponse_source :: Lens.Lens' DescribeActionResponse (Prelude.Maybe ActionSource)
describeActionResponse_source :: (Maybe ActionSource -> f (Maybe ActionSource))
-> DescribeActionResponse -> f DescribeActionResponse
describeActionResponse_source = (DescribeActionResponse -> Maybe ActionSource)
-> (DescribeActionResponse
    -> Maybe ActionSource -> DescribeActionResponse)
-> Lens
     DescribeActionResponse
     DescribeActionResponse
     (Maybe ActionSource)
     (Maybe ActionSource)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeActionResponse' {Maybe ActionSource
source :: Maybe ActionSource
$sel:source:DescribeActionResponse' :: DescribeActionResponse -> Maybe ActionSource
source} -> Maybe ActionSource
source) (\s :: DescribeActionResponse
s@DescribeActionResponse' {} Maybe ActionSource
a -> DescribeActionResponse
s {$sel:source:DescribeActionResponse' :: Maybe ActionSource
source = Maybe ActionSource
a} :: DescribeActionResponse)

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

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

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

-- | The type of the action.
describeActionResponse_actionType :: Lens.Lens' DescribeActionResponse (Prelude.Maybe Prelude.Text)
describeActionResponse_actionType :: (Maybe Text -> f (Maybe Text))
-> DescribeActionResponse -> f DescribeActionResponse
describeActionResponse_actionType = (DescribeActionResponse -> Maybe Text)
-> (DescribeActionResponse -> Maybe Text -> DescribeActionResponse)
-> Lens
     DescribeActionResponse
     DescribeActionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeActionResponse' {Maybe Text
actionType :: Maybe Text
$sel:actionType:DescribeActionResponse' :: DescribeActionResponse -> Maybe Text
actionType} -> Maybe Text
actionType) (\s :: DescribeActionResponse
s@DescribeActionResponse' {} Maybe Text
a -> DescribeActionResponse
s {$sel:actionType:DescribeActionResponse' :: Maybe Text
actionType = Maybe Text
a} :: DescribeActionResponse)

-- | A list of the action\'s properties.
describeActionResponse_properties :: Lens.Lens' DescribeActionResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
describeActionResponse_properties :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> DescribeActionResponse -> f DescribeActionResponse
describeActionResponse_properties = (DescribeActionResponse -> Maybe (HashMap Text Text))
-> (DescribeActionResponse
    -> Maybe (HashMap Text Text) -> DescribeActionResponse)
-> Lens
     DescribeActionResponse
     DescribeActionResponse
     (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 (\DescribeActionResponse' {Maybe (HashMap Text Text)
properties :: Maybe (HashMap Text Text)
$sel:properties:DescribeActionResponse' :: DescribeActionResponse -> Maybe (HashMap Text Text)
properties} -> Maybe (HashMap Text Text)
properties) (\s :: DescribeActionResponse
s@DescribeActionResponse' {} Maybe (HashMap Text Text)
a -> DescribeActionResponse
s {$sel:properties:DescribeActionResponse' :: Maybe (HashMap Text Text)
properties = Maybe (HashMap Text Text)
a} :: DescribeActionResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> DescribeActionResponse -> f DescribeActionResponse)
-> ((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)))
-> DescribeActionResponse
-> f DescribeActionResponse
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.
describeActionResponse_httpStatus :: Lens.Lens' DescribeActionResponse Prelude.Int
describeActionResponse_httpStatus :: (Int -> f Int)
-> DescribeActionResponse -> f DescribeActionResponse
describeActionResponse_httpStatus = (DescribeActionResponse -> Int)
-> (DescribeActionResponse -> Int -> DescribeActionResponse)
-> Lens DescribeActionResponse DescribeActionResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeActionResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeActionResponse' :: DescribeActionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeActionResponse
s@DescribeActionResponse' {} Int
a -> DescribeActionResponse
s {$sel:httpStatus:DescribeActionResponse' :: Int
httpStatus = Int
a} :: DescribeActionResponse)

instance Prelude.NFData DescribeActionResponse