{-# 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.DataExchange.UpdateEventAction
-- 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)
--
-- This operation updates the event action.
module Amazonka.DataExchange.UpdateEventAction
  ( -- * Creating a Request
    UpdateEventAction (..),
    newUpdateEventAction,

    -- * Request Lenses
    updateEventAction_action,
    updateEventAction_eventActionId,

    -- * Destructuring the Response
    UpdateEventActionResponse (..),
    newUpdateEventActionResponse,

    -- * Response Lenses
    updateEventActionResponse_event,
    updateEventActionResponse_arn,
    updateEventActionResponse_createdAt,
    updateEventActionResponse_action,
    updateEventActionResponse_id,
    updateEventActionResponse_updatedAt,
    updateEventActionResponse_httpStatus,
  )
where

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

-- | The request body for UpdateEventAction.
--
-- /See:/ 'newUpdateEventAction' smart constructor.
data UpdateEventAction = UpdateEventAction'
  { -- | What occurs after a certain event.
    UpdateEventAction -> Maybe Action
action :: Prelude.Maybe Action,
    -- | The unique identifier for the event action.
    UpdateEventAction -> Text
eventActionId :: Prelude.Text
  }
  deriving (UpdateEventAction -> UpdateEventAction -> Bool
(UpdateEventAction -> UpdateEventAction -> Bool)
-> (UpdateEventAction -> UpdateEventAction -> Bool)
-> Eq UpdateEventAction
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateEventAction -> UpdateEventAction -> Bool
$c/= :: UpdateEventAction -> UpdateEventAction -> Bool
== :: UpdateEventAction -> UpdateEventAction -> Bool
$c== :: UpdateEventAction -> UpdateEventAction -> Bool
Prelude.Eq, ReadPrec [UpdateEventAction]
ReadPrec UpdateEventAction
Int -> ReadS UpdateEventAction
ReadS [UpdateEventAction]
(Int -> ReadS UpdateEventAction)
-> ReadS [UpdateEventAction]
-> ReadPrec UpdateEventAction
-> ReadPrec [UpdateEventAction]
-> Read UpdateEventAction
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateEventAction]
$creadListPrec :: ReadPrec [UpdateEventAction]
readPrec :: ReadPrec UpdateEventAction
$creadPrec :: ReadPrec UpdateEventAction
readList :: ReadS [UpdateEventAction]
$creadList :: ReadS [UpdateEventAction]
readsPrec :: Int -> ReadS UpdateEventAction
$creadsPrec :: Int -> ReadS UpdateEventAction
Prelude.Read, Int -> UpdateEventAction -> ShowS
[UpdateEventAction] -> ShowS
UpdateEventAction -> String
(Int -> UpdateEventAction -> ShowS)
-> (UpdateEventAction -> String)
-> ([UpdateEventAction] -> ShowS)
-> Show UpdateEventAction
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateEventAction] -> ShowS
$cshowList :: [UpdateEventAction] -> ShowS
show :: UpdateEventAction -> String
$cshow :: UpdateEventAction -> String
showsPrec :: Int -> UpdateEventAction -> ShowS
$cshowsPrec :: Int -> UpdateEventAction -> ShowS
Prelude.Show, (forall x. UpdateEventAction -> Rep UpdateEventAction x)
-> (forall x. Rep UpdateEventAction x -> UpdateEventAction)
-> Generic UpdateEventAction
forall x. Rep UpdateEventAction x -> UpdateEventAction
forall x. UpdateEventAction -> Rep UpdateEventAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateEventAction x -> UpdateEventAction
$cfrom :: forall x. UpdateEventAction -> Rep UpdateEventAction x
Prelude.Generic)

-- |
-- Create a value of 'UpdateEventAction' 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:
--
-- 'action', 'updateEventAction_action' - What occurs after a certain event.
--
-- 'eventActionId', 'updateEventAction_eventActionId' - The unique identifier for the event action.
newUpdateEventAction ::
  -- | 'eventActionId'
  Prelude.Text ->
  UpdateEventAction
newUpdateEventAction :: Text -> UpdateEventAction
newUpdateEventAction Text
pEventActionId_ =
  UpdateEventAction' :: Maybe Action -> Text -> UpdateEventAction
UpdateEventAction'
    { $sel:action:UpdateEventAction' :: Maybe Action
action = Maybe Action
forall a. Maybe a
Prelude.Nothing,
      $sel:eventActionId:UpdateEventAction' :: Text
eventActionId = Text
pEventActionId_
    }

-- | What occurs after a certain event.
updateEventAction_action :: Lens.Lens' UpdateEventAction (Prelude.Maybe Action)
updateEventAction_action :: (Maybe Action -> f (Maybe Action))
-> UpdateEventAction -> f UpdateEventAction
updateEventAction_action = (UpdateEventAction -> Maybe Action)
-> (UpdateEventAction -> Maybe Action -> UpdateEventAction)
-> Lens
     UpdateEventAction UpdateEventAction (Maybe Action) (Maybe Action)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEventAction' {Maybe Action
action :: Maybe Action
$sel:action:UpdateEventAction' :: UpdateEventAction -> Maybe Action
action} -> Maybe Action
action) (\s :: UpdateEventAction
s@UpdateEventAction' {} Maybe Action
a -> UpdateEventAction
s {$sel:action:UpdateEventAction' :: Maybe Action
action = Maybe Action
a} :: UpdateEventAction)

-- | The unique identifier for the event action.
updateEventAction_eventActionId :: Lens.Lens' UpdateEventAction Prelude.Text
updateEventAction_eventActionId :: (Text -> f Text) -> UpdateEventAction -> f UpdateEventAction
updateEventAction_eventActionId = (UpdateEventAction -> Text)
-> (UpdateEventAction -> Text -> UpdateEventAction)
-> Lens UpdateEventAction UpdateEventAction Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEventAction' {Text
eventActionId :: Text
$sel:eventActionId:UpdateEventAction' :: UpdateEventAction -> Text
eventActionId} -> Text
eventActionId) (\s :: UpdateEventAction
s@UpdateEventAction' {} Text
a -> UpdateEventAction
s {$sel:eventActionId:UpdateEventAction' :: Text
eventActionId = Text
a} :: UpdateEventAction)

instance Core.AWSRequest UpdateEventAction where
  type
    AWSResponse UpdateEventAction =
      UpdateEventActionResponse
  request :: UpdateEventAction -> Request UpdateEventAction
request = Service -> UpdateEventAction -> Request UpdateEventAction
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.patchJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateEventAction
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateEventAction)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateEventAction))
-> Logger
-> Service
-> Proxy UpdateEventAction
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateEventAction)))
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 Event
-> Maybe Text
-> Maybe POSIX
-> Maybe Action
-> Maybe Text
-> Maybe POSIX
-> Int
-> UpdateEventActionResponse
UpdateEventActionResponse'
            (Maybe Event
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Action
 -> Maybe Text
 -> Maybe POSIX
 -> Int
 -> UpdateEventActionResponse)
-> Either String (Maybe Event)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Action
      -> Maybe Text
      -> Maybe POSIX
      -> Int
      -> UpdateEventActionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Event)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Event")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Action
   -> Maybe Text
   -> Maybe POSIX
   -> Int
   -> UpdateEventActionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe Action
      -> Maybe Text
      -> Maybe POSIX
      -> Int
      -> UpdateEventActionResponse)
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
"Arn")
            Either
  String
  (Maybe POSIX
   -> Maybe Action
   -> Maybe Text
   -> Maybe POSIX
   -> Int
   -> UpdateEventActionResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Action
      -> Maybe Text -> Maybe POSIX -> Int -> UpdateEventActionResponse)
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 Action
   -> Maybe Text -> Maybe POSIX -> Int -> UpdateEventActionResponse)
-> Either String (Maybe Action)
-> Either
     String
     (Maybe Text -> Maybe POSIX -> Int -> UpdateEventActionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Action)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Action")
            Either
  String
  (Maybe Text -> Maybe POSIX -> Int -> UpdateEventActionResponse)
-> Either String (Maybe Text)
-> Either String (Maybe POSIX -> Int -> UpdateEventActionResponse)
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
"Id")
            Either String (Maybe POSIX -> Int -> UpdateEventActionResponse)
-> Either String (Maybe POSIX)
-> Either String (Int -> UpdateEventActionResponse)
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 (Int -> UpdateEventActionResponse)
-> Either String Int -> Either String UpdateEventActionResponse
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 UpdateEventAction

instance Prelude.NFData UpdateEventAction

instance Core.ToHeaders UpdateEventAction where
  toHeaders :: UpdateEventAction -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateEventAction -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON UpdateEventAction where
  toJSON :: UpdateEventAction -> Value
toJSON UpdateEventAction' {Maybe Action
Text
eventActionId :: Text
action :: Maybe Action
$sel:eventActionId:UpdateEventAction' :: UpdateEventAction -> Text
$sel:action:UpdateEventAction' :: UpdateEventAction -> Maybe Action
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [(Text
"Action" Text -> Action -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Action -> Pair) -> Maybe Action -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Action
action]
      )

instance Core.ToPath UpdateEventAction where
  toPath :: UpdateEventAction -> ByteString
toPath UpdateEventAction' {Maybe Action
Text
eventActionId :: Text
action :: Maybe Action
$sel:eventActionId:UpdateEventAction' :: UpdateEventAction -> Text
$sel:action:UpdateEventAction' :: UpdateEventAction -> Maybe Action
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/v1/event-actions/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
eventActionId]

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

-- | /See:/ 'newUpdateEventActionResponse' smart constructor.
data UpdateEventActionResponse = UpdateEventActionResponse'
  { -- | What occurs to start an action.
    UpdateEventActionResponse -> Maybe Event
event :: Prelude.Maybe Event,
    -- | The ARN for the event action.
    UpdateEventActionResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The date and time that the event action was created, in ISO 8601 format.
    UpdateEventActionResponse -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | What occurs after a certain event.
    UpdateEventActionResponse -> Maybe Action
action :: Prelude.Maybe Action,
    -- | The unique identifier for the event action.
    UpdateEventActionResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The date and time that the event action was last updated, in ISO 8601
    -- format.
    UpdateEventActionResponse -> Maybe POSIX
updatedAt :: Prelude.Maybe Core.POSIX,
    -- | The response's http status code.
    UpdateEventActionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateEventActionResponse -> UpdateEventActionResponse -> Bool
(UpdateEventActionResponse -> UpdateEventActionResponse -> Bool)
-> (UpdateEventActionResponse -> UpdateEventActionResponse -> Bool)
-> Eq UpdateEventActionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateEventActionResponse -> UpdateEventActionResponse -> Bool
$c/= :: UpdateEventActionResponse -> UpdateEventActionResponse -> Bool
== :: UpdateEventActionResponse -> UpdateEventActionResponse -> Bool
$c== :: UpdateEventActionResponse -> UpdateEventActionResponse -> Bool
Prelude.Eq, ReadPrec [UpdateEventActionResponse]
ReadPrec UpdateEventActionResponse
Int -> ReadS UpdateEventActionResponse
ReadS [UpdateEventActionResponse]
(Int -> ReadS UpdateEventActionResponse)
-> ReadS [UpdateEventActionResponse]
-> ReadPrec UpdateEventActionResponse
-> ReadPrec [UpdateEventActionResponse]
-> Read UpdateEventActionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateEventActionResponse]
$creadListPrec :: ReadPrec [UpdateEventActionResponse]
readPrec :: ReadPrec UpdateEventActionResponse
$creadPrec :: ReadPrec UpdateEventActionResponse
readList :: ReadS [UpdateEventActionResponse]
$creadList :: ReadS [UpdateEventActionResponse]
readsPrec :: Int -> ReadS UpdateEventActionResponse
$creadsPrec :: Int -> ReadS UpdateEventActionResponse
Prelude.Read, Int -> UpdateEventActionResponse -> ShowS
[UpdateEventActionResponse] -> ShowS
UpdateEventActionResponse -> String
(Int -> UpdateEventActionResponse -> ShowS)
-> (UpdateEventActionResponse -> String)
-> ([UpdateEventActionResponse] -> ShowS)
-> Show UpdateEventActionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateEventActionResponse] -> ShowS
$cshowList :: [UpdateEventActionResponse] -> ShowS
show :: UpdateEventActionResponse -> String
$cshow :: UpdateEventActionResponse -> String
showsPrec :: Int -> UpdateEventActionResponse -> ShowS
$cshowsPrec :: Int -> UpdateEventActionResponse -> ShowS
Prelude.Show, (forall x.
 UpdateEventActionResponse -> Rep UpdateEventActionResponse x)
-> (forall x.
    Rep UpdateEventActionResponse x -> UpdateEventActionResponse)
-> Generic UpdateEventActionResponse
forall x.
Rep UpdateEventActionResponse x -> UpdateEventActionResponse
forall x.
UpdateEventActionResponse -> Rep UpdateEventActionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateEventActionResponse x -> UpdateEventActionResponse
$cfrom :: forall x.
UpdateEventActionResponse -> Rep UpdateEventActionResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateEventActionResponse' 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:
--
-- 'event', 'updateEventActionResponse_event' - What occurs to start an action.
--
-- 'arn', 'updateEventActionResponse_arn' - The ARN for the event action.
--
-- 'createdAt', 'updateEventActionResponse_createdAt' - The date and time that the event action was created, in ISO 8601 format.
--
-- 'action', 'updateEventActionResponse_action' - What occurs after a certain event.
--
-- 'id', 'updateEventActionResponse_id' - The unique identifier for the event action.
--
-- 'updatedAt', 'updateEventActionResponse_updatedAt' - The date and time that the event action was last updated, in ISO 8601
-- format.
--
-- 'httpStatus', 'updateEventActionResponse_httpStatus' - The response's http status code.
newUpdateEventActionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateEventActionResponse
newUpdateEventActionResponse :: Int -> UpdateEventActionResponse
newUpdateEventActionResponse Int
pHttpStatus_ =
  UpdateEventActionResponse' :: Maybe Event
-> Maybe Text
-> Maybe POSIX
-> Maybe Action
-> Maybe Text
-> Maybe POSIX
-> Int
-> UpdateEventActionResponse
UpdateEventActionResponse'
    { $sel:event:UpdateEventActionResponse' :: Maybe Event
event = Maybe Event
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:UpdateEventActionResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:UpdateEventActionResponse' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:action:UpdateEventActionResponse' :: Maybe Action
action = Maybe Action
forall a. Maybe a
Prelude.Nothing,
      $sel:id:UpdateEventActionResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:updatedAt:UpdateEventActionResponse' :: Maybe POSIX
updatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateEventActionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | What occurs to start an action.
updateEventActionResponse_event :: Lens.Lens' UpdateEventActionResponse (Prelude.Maybe Event)
updateEventActionResponse_event :: (Maybe Event -> f (Maybe Event))
-> UpdateEventActionResponse -> f UpdateEventActionResponse
updateEventActionResponse_event = (UpdateEventActionResponse -> Maybe Event)
-> (UpdateEventActionResponse
    -> Maybe Event -> UpdateEventActionResponse)
-> Lens
     UpdateEventActionResponse
     UpdateEventActionResponse
     (Maybe Event)
     (Maybe Event)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEventActionResponse' {Maybe Event
event :: Maybe Event
$sel:event:UpdateEventActionResponse' :: UpdateEventActionResponse -> Maybe Event
event} -> Maybe Event
event) (\s :: UpdateEventActionResponse
s@UpdateEventActionResponse' {} Maybe Event
a -> UpdateEventActionResponse
s {$sel:event:UpdateEventActionResponse' :: Maybe Event
event = Maybe Event
a} :: UpdateEventActionResponse)

-- | The ARN for the event action.
updateEventActionResponse_arn :: Lens.Lens' UpdateEventActionResponse (Prelude.Maybe Prelude.Text)
updateEventActionResponse_arn :: (Maybe Text -> f (Maybe Text))
-> UpdateEventActionResponse -> f UpdateEventActionResponse
updateEventActionResponse_arn = (UpdateEventActionResponse -> Maybe Text)
-> (UpdateEventActionResponse
    -> Maybe Text -> UpdateEventActionResponse)
-> Lens
     UpdateEventActionResponse
     UpdateEventActionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEventActionResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:UpdateEventActionResponse' :: UpdateEventActionResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: UpdateEventActionResponse
s@UpdateEventActionResponse' {} Maybe Text
a -> UpdateEventActionResponse
s {$sel:arn:UpdateEventActionResponse' :: Maybe Text
arn = Maybe Text
a} :: UpdateEventActionResponse)

-- | The date and time that the event action was created, in ISO 8601 format.
updateEventActionResponse_createdAt :: Lens.Lens' UpdateEventActionResponse (Prelude.Maybe Prelude.UTCTime)
updateEventActionResponse_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateEventActionResponse -> f UpdateEventActionResponse
updateEventActionResponse_createdAt = (UpdateEventActionResponse -> Maybe POSIX)
-> (UpdateEventActionResponse
    -> Maybe POSIX -> UpdateEventActionResponse)
-> Lens
     UpdateEventActionResponse
     UpdateEventActionResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEventActionResponse' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:UpdateEventActionResponse' :: UpdateEventActionResponse -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: UpdateEventActionResponse
s@UpdateEventActionResponse' {} Maybe POSIX
a -> UpdateEventActionResponse
s {$sel:createdAt:UpdateEventActionResponse' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: UpdateEventActionResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> UpdateEventActionResponse -> f UpdateEventActionResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateEventActionResponse
-> f UpdateEventActionResponse
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

-- | What occurs after a certain event.
updateEventActionResponse_action :: Lens.Lens' UpdateEventActionResponse (Prelude.Maybe Action)
updateEventActionResponse_action :: (Maybe Action -> f (Maybe Action))
-> UpdateEventActionResponse -> f UpdateEventActionResponse
updateEventActionResponse_action = (UpdateEventActionResponse -> Maybe Action)
-> (UpdateEventActionResponse
    -> Maybe Action -> UpdateEventActionResponse)
-> Lens
     UpdateEventActionResponse
     UpdateEventActionResponse
     (Maybe Action)
     (Maybe Action)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEventActionResponse' {Maybe Action
action :: Maybe Action
$sel:action:UpdateEventActionResponse' :: UpdateEventActionResponse -> Maybe Action
action} -> Maybe Action
action) (\s :: UpdateEventActionResponse
s@UpdateEventActionResponse' {} Maybe Action
a -> UpdateEventActionResponse
s {$sel:action:UpdateEventActionResponse' :: Maybe Action
action = Maybe Action
a} :: UpdateEventActionResponse)

-- | The unique identifier for the event action.
updateEventActionResponse_id :: Lens.Lens' UpdateEventActionResponse (Prelude.Maybe Prelude.Text)
updateEventActionResponse_id :: (Maybe Text -> f (Maybe Text))
-> UpdateEventActionResponse -> f UpdateEventActionResponse
updateEventActionResponse_id = (UpdateEventActionResponse -> Maybe Text)
-> (UpdateEventActionResponse
    -> Maybe Text -> UpdateEventActionResponse)
-> Lens
     UpdateEventActionResponse
     UpdateEventActionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEventActionResponse' {Maybe Text
id :: Maybe Text
$sel:id:UpdateEventActionResponse' :: UpdateEventActionResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: UpdateEventActionResponse
s@UpdateEventActionResponse' {} Maybe Text
a -> UpdateEventActionResponse
s {$sel:id:UpdateEventActionResponse' :: Maybe Text
id = Maybe Text
a} :: UpdateEventActionResponse)

-- | The date and time that the event action was last updated, in ISO 8601
-- format.
updateEventActionResponse_updatedAt :: Lens.Lens' UpdateEventActionResponse (Prelude.Maybe Prelude.UTCTime)
updateEventActionResponse_updatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateEventActionResponse -> f UpdateEventActionResponse
updateEventActionResponse_updatedAt = (UpdateEventActionResponse -> Maybe POSIX)
-> (UpdateEventActionResponse
    -> Maybe POSIX -> UpdateEventActionResponse)
-> Lens
     UpdateEventActionResponse
     UpdateEventActionResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEventActionResponse' {Maybe POSIX
updatedAt :: Maybe POSIX
$sel:updatedAt:UpdateEventActionResponse' :: UpdateEventActionResponse -> Maybe POSIX
updatedAt} -> Maybe POSIX
updatedAt) (\s :: UpdateEventActionResponse
s@UpdateEventActionResponse' {} Maybe POSIX
a -> UpdateEventActionResponse
s {$sel:updatedAt:UpdateEventActionResponse' :: Maybe POSIX
updatedAt = Maybe POSIX
a} :: UpdateEventActionResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> UpdateEventActionResponse -> f UpdateEventActionResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateEventActionResponse
-> f UpdateEventActionResponse
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 response's http status code.
updateEventActionResponse_httpStatus :: Lens.Lens' UpdateEventActionResponse Prelude.Int
updateEventActionResponse_httpStatus :: (Int -> f Int)
-> UpdateEventActionResponse -> f UpdateEventActionResponse
updateEventActionResponse_httpStatus = (UpdateEventActionResponse -> Int)
-> (UpdateEventActionResponse -> Int -> UpdateEventActionResponse)
-> Lens UpdateEventActionResponse UpdateEventActionResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEventActionResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateEventActionResponse' :: UpdateEventActionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateEventActionResponse
s@UpdateEventActionResponse' {} Int
a -> UpdateEventActionResponse
s {$sel:httpStatus:UpdateEventActionResponse' :: Int
httpStatus = Int
a} :: UpdateEventActionResponse)

instance Prelude.NFData UpdateEventActionResponse