{-# 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.CloudWatchEvents.DeauthorizeConnection
-- 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)
--
-- Removes all authorization parameters from the connection. This lets you
-- remove the secret from the connection so you can reuse it without having
-- to create a new connection.
module Amazonka.CloudWatchEvents.DeauthorizeConnection
  ( -- * Creating a Request
    DeauthorizeConnection (..),
    newDeauthorizeConnection,

    -- * Request Lenses
    deauthorizeConnection_name,

    -- * Destructuring the Response
    DeauthorizeConnectionResponse (..),
    newDeauthorizeConnectionResponse,

    -- * Response Lenses
    deauthorizeConnectionResponse_creationTime,
    deauthorizeConnectionResponse_lastModifiedTime,
    deauthorizeConnectionResponse_lastAuthorizedTime,
    deauthorizeConnectionResponse_connectionArn,
    deauthorizeConnectionResponse_connectionState,
    deauthorizeConnectionResponse_httpStatus,
  )
where

import Amazonka.CloudWatchEvents.Types
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

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

-- |
-- Create a value of 'DeauthorizeConnection' 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:
--
-- 'name', 'deauthorizeConnection_name' - The name of the connection to remove authorization from.
newDeauthorizeConnection ::
  -- | 'name'
  Prelude.Text ->
  DeauthorizeConnection
newDeauthorizeConnection :: Text -> DeauthorizeConnection
newDeauthorizeConnection Text
pName_ =
  DeauthorizeConnection' :: Text -> DeauthorizeConnection
DeauthorizeConnection' {$sel:name:DeauthorizeConnection' :: Text
name = Text
pName_}

-- | The name of the connection to remove authorization from.
deauthorizeConnection_name :: Lens.Lens' DeauthorizeConnection Prelude.Text
deauthorizeConnection_name :: (Text -> f Text)
-> DeauthorizeConnection -> f DeauthorizeConnection
deauthorizeConnection_name = (DeauthorizeConnection -> Text)
-> (DeauthorizeConnection -> Text -> DeauthorizeConnection)
-> Lens DeauthorizeConnection DeauthorizeConnection Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeauthorizeConnection' {Text
name :: Text
$sel:name:DeauthorizeConnection' :: DeauthorizeConnection -> Text
name} -> Text
name) (\s :: DeauthorizeConnection
s@DeauthorizeConnection' {} Text
a -> DeauthorizeConnection
s {$sel:name:DeauthorizeConnection' :: Text
name = Text
a} :: DeauthorizeConnection)

instance Core.AWSRequest DeauthorizeConnection where
  type
    AWSResponse DeauthorizeConnection =
      DeauthorizeConnectionResponse
  request :: DeauthorizeConnection -> Request DeauthorizeConnection
request = Service -> DeauthorizeConnection -> Request DeauthorizeConnection
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DeauthorizeConnection
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeauthorizeConnection)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DeauthorizeConnection))
-> Logger
-> Service
-> Proxy DeauthorizeConnection
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeauthorizeConnection)))
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 POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe ConnectionState
-> Int
-> DeauthorizeConnectionResponse
DeauthorizeConnectionResponse'
            (Maybe POSIX
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe ConnectionState
 -> Int
 -> DeauthorizeConnectionResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe ConnectionState
      -> Int
      -> DeauthorizeConnectionResponse)
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 POSIX
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe ConnectionState
   -> Int
   -> DeauthorizeConnectionResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe ConnectionState
      -> Int
      -> DeauthorizeConnectionResponse)
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 POSIX
   -> Maybe Text
   -> Maybe ConnectionState
   -> Int
   -> DeauthorizeConnectionResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe ConnectionState -> Int -> DeauthorizeConnectionResponse)
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
"LastAuthorizedTime")
            Either
  String
  (Maybe Text
   -> Maybe ConnectionState -> Int -> DeauthorizeConnectionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ConnectionState -> Int -> DeauthorizeConnectionResponse)
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
"ConnectionArn")
            Either
  String
  (Maybe ConnectionState -> Int -> DeauthorizeConnectionResponse)
-> Either String (Maybe ConnectionState)
-> Either String (Int -> DeauthorizeConnectionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ConnectionState)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ConnectionState")
            Either String (Int -> DeauthorizeConnectionResponse)
-> Either String Int -> Either String DeauthorizeConnectionResponse
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 DeauthorizeConnection

instance Prelude.NFData DeauthorizeConnection

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

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

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

-- | /See:/ 'newDeauthorizeConnectionResponse' smart constructor.
data DeauthorizeConnectionResponse = DeauthorizeConnectionResponse'
  { -- | A time stamp for the time that the connection was created.
    DeauthorizeConnectionResponse -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | A time stamp for the time that the connection was last updated.
    DeauthorizeConnectionResponse -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Core.POSIX,
    -- | A time stamp for the time that the connection was last authorized.
    DeauthorizeConnectionResponse -> Maybe POSIX
lastAuthorizedTime :: Prelude.Maybe Core.POSIX,
    -- | The ARN of the connection that authorization was removed from.
    DeauthorizeConnectionResponse -> Maybe Text
connectionArn :: Prelude.Maybe Prelude.Text,
    -- | The state of the connection.
    DeauthorizeConnectionResponse -> Maybe ConnectionState
connectionState :: Prelude.Maybe ConnectionState,
    -- | The response's http status code.
    DeauthorizeConnectionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DeauthorizeConnectionResponse
-> DeauthorizeConnectionResponse -> Bool
(DeauthorizeConnectionResponse
 -> DeauthorizeConnectionResponse -> Bool)
-> (DeauthorizeConnectionResponse
    -> DeauthorizeConnectionResponse -> Bool)
-> Eq DeauthorizeConnectionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeauthorizeConnectionResponse
-> DeauthorizeConnectionResponse -> Bool
$c/= :: DeauthorizeConnectionResponse
-> DeauthorizeConnectionResponse -> Bool
== :: DeauthorizeConnectionResponse
-> DeauthorizeConnectionResponse -> Bool
$c== :: DeauthorizeConnectionResponse
-> DeauthorizeConnectionResponse -> Bool
Prelude.Eq, ReadPrec [DeauthorizeConnectionResponse]
ReadPrec DeauthorizeConnectionResponse
Int -> ReadS DeauthorizeConnectionResponse
ReadS [DeauthorizeConnectionResponse]
(Int -> ReadS DeauthorizeConnectionResponse)
-> ReadS [DeauthorizeConnectionResponse]
-> ReadPrec DeauthorizeConnectionResponse
-> ReadPrec [DeauthorizeConnectionResponse]
-> Read DeauthorizeConnectionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeauthorizeConnectionResponse]
$creadListPrec :: ReadPrec [DeauthorizeConnectionResponse]
readPrec :: ReadPrec DeauthorizeConnectionResponse
$creadPrec :: ReadPrec DeauthorizeConnectionResponse
readList :: ReadS [DeauthorizeConnectionResponse]
$creadList :: ReadS [DeauthorizeConnectionResponse]
readsPrec :: Int -> ReadS DeauthorizeConnectionResponse
$creadsPrec :: Int -> ReadS DeauthorizeConnectionResponse
Prelude.Read, Int -> DeauthorizeConnectionResponse -> ShowS
[DeauthorizeConnectionResponse] -> ShowS
DeauthorizeConnectionResponse -> String
(Int -> DeauthorizeConnectionResponse -> ShowS)
-> (DeauthorizeConnectionResponse -> String)
-> ([DeauthorizeConnectionResponse] -> ShowS)
-> Show DeauthorizeConnectionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeauthorizeConnectionResponse] -> ShowS
$cshowList :: [DeauthorizeConnectionResponse] -> ShowS
show :: DeauthorizeConnectionResponse -> String
$cshow :: DeauthorizeConnectionResponse -> String
showsPrec :: Int -> DeauthorizeConnectionResponse -> ShowS
$cshowsPrec :: Int -> DeauthorizeConnectionResponse -> ShowS
Prelude.Show, (forall x.
 DeauthorizeConnectionResponse
 -> Rep DeauthorizeConnectionResponse x)
-> (forall x.
    Rep DeauthorizeConnectionResponse x
    -> DeauthorizeConnectionResponse)
-> Generic DeauthorizeConnectionResponse
forall x.
Rep DeauthorizeConnectionResponse x
-> DeauthorizeConnectionResponse
forall x.
DeauthorizeConnectionResponse
-> Rep DeauthorizeConnectionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeauthorizeConnectionResponse x
-> DeauthorizeConnectionResponse
$cfrom :: forall x.
DeauthorizeConnectionResponse
-> Rep DeauthorizeConnectionResponse x
Prelude.Generic)

-- |
-- Create a value of 'DeauthorizeConnectionResponse' 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', 'deauthorizeConnectionResponse_creationTime' - A time stamp for the time that the connection was created.
--
-- 'lastModifiedTime', 'deauthorizeConnectionResponse_lastModifiedTime' - A time stamp for the time that the connection was last updated.
--
-- 'lastAuthorizedTime', 'deauthorizeConnectionResponse_lastAuthorizedTime' - A time stamp for the time that the connection was last authorized.
--
-- 'connectionArn', 'deauthorizeConnectionResponse_connectionArn' - The ARN of the connection that authorization was removed from.
--
-- 'connectionState', 'deauthorizeConnectionResponse_connectionState' - The state of the connection.
--
-- 'httpStatus', 'deauthorizeConnectionResponse_httpStatus' - The response's http status code.
newDeauthorizeConnectionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DeauthorizeConnectionResponse
newDeauthorizeConnectionResponse :: Int -> DeauthorizeConnectionResponse
newDeauthorizeConnectionResponse Int
pHttpStatus_ =
  DeauthorizeConnectionResponse' :: Maybe POSIX
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe ConnectionState
-> Int
-> DeauthorizeConnectionResponse
DeauthorizeConnectionResponse'
    { $sel:creationTime:DeauthorizeConnectionResponse' :: Maybe POSIX
creationTime =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTime:DeauthorizeConnectionResponse' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:lastAuthorizedTime:DeauthorizeConnectionResponse' :: Maybe POSIX
lastAuthorizedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:connectionArn:DeauthorizeConnectionResponse' :: Maybe Text
connectionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:connectionState:DeauthorizeConnectionResponse' :: Maybe ConnectionState
connectionState = Maybe ConnectionState
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DeauthorizeConnectionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A time stamp for the time that the connection was created.
deauthorizeConnectionResponse_creationTime :: Lens.Lens' DeauthorizeConnectionResponse (Prelude.Maybe Prelude.UTCTime)
deauthorizeConnectionResponse_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DeauthorizeConnectionResponse -> f DeauthorizeConnectionResponse
deauthorizeConnectionResponse_creationTime = (DeauthorizeConnectionResponse -> Maybe POSIX)
-> (DeauthorizeConnectionResponse
    -> Maybe POSIX -> DeauthorizeConnectionResponse)
-> Lens
     DeauthorizeConnectionResponse
     DeauthorizeConnectionResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeauthorizeConnectionResponse' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:DeauthorizeConnectionResponse' :: DeauthorizeConnectionResponse -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: DeauthorizeConnectionResponse
s@DeauthorizeConnectionResponse' {} Maybe POSIX
a -> DeauthorizeConnectionResponse
s {$sel:creationTime:DeauthorizeConnectionResponse' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: DeauthorizeConnectionResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DeauthorizeConnectionResponse
 -> f DeauthorizeConnectionResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DeauthorizeConnectionResponse
-> f DeauthorizeConnectionResponse
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

-- | A time stamp for the time that the connection was last updated.
deauthorizeConnectionResponse_lastModifiedTime :: Lens.Lens' DeauthorizeConnectionResponse (Prelude.Maybe Prelude.UTCTime)
deauthorizeConnectionResponse_lastModifiedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DeauthorizeConnectionResponse -> f DeauthorizeConnectionResponse
deauthorizeConnectionResponse_lastModifiedTime = (DeauthorizeConnectionResponse -> Maybe POSIX)
-> (DeauthorizeConnectionResponse
    -> Maybe POSIX -> DeauthorizeConnectionResponse)
-> Lens
     DeauthorizeConnectionResponse
     DeauthorizeConnectionResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeauthorizeConnectionResponse' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:DeauthorizeConnectionResponse' :: DeauthorizeConnectionResponse -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: DeauthorizeConnectionResponse
s@DeauthorizeConnectionResponse' {} Maybe POSIX
a -> DeauthorizeConnectionResponse
s {$sel:lastModifiedTime:DeauthorizeConnectionResponse' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: DeauthorizeConnectionResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DeauthorizeConnectionResponse
 -> f DeauthorizeConnectionResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DeauthorizeConnectionResponse
-> f DeauthorizeConnectionResponse
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

-- | A time stamp for the time that the connection was last authorized.
deauthorizeConnectionResponse_lastAuthorizedTime :: Lens.Lens' DeauthorizeConnectionResponse (Prelude.Maybe Prelude.UTCTime)
deauthorizeConnectionResponse_lastAuthorizedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DeauthorizeConnectionResponse -> f DeauthorizeConnectionResponse
deauthorizeConnectionResponse_lastAuthorizedTime = (DeauthorizeConnectionResponse -> Maybe POSIX)
-> (DeauthorizeConnectionResponse
    -> Maybe POSIX -> DeauthorizeConnectionResponse)
-> Lens
     DeauthorizeConnectionResponse
     DeauthorizeConnectionResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeauthorizeConnectionResponse' {Maybe POSIX
lastAuthorizedTime :: Maybe POSIX
$sel:lastAuthorizedTime:DeauthorizeConnectionResponse' :: DeauthorizeConnectionResponse -> Maybe POSIX
lastAuthorizedTime} -> Maybe POSIX
lastAuthorizedTime) (\s :: DeauthorizeConnectionResponse
s@DeauthorizeConnectionResponse' {} Maybe POSIX
a -> DeauthorizeConnectionResponse
s {$sel:lastAuthorizedTime:DeauthorizeConnectionResponse' :: Maybe POSIX
lastAuthorizedTime = Maybe POSIX
a} :: DeauthorizeConnectionResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DeauthorizeConnectionResponse
 -> f DeauthorizeConnectionResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DeauthorizeConnectionResponse
-> f DeauthorizeConnectionResponse
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 ARN of the connection that authorization was removed from.
deauthorizeConnectionResponse_connectionArn :: Lens.Lens' DeauthorizeConnectionResponse (Prelude.Maybe Prelude.Text)
deauthorizeConnectionResponse_connectionArn :: (Maybe Text -> f (Maybe Text))
-> DeauthorizeConnectionResponse -> f DeauthorizeConnectionResponse
deauthorizeConnectionResponse_connectionArn = (DeauthorizeConnectionResponse -> Maybe Text)
-> (DeauthorizeConnectionResponse
    -> Maybe Text -> DeauthorizeConnectionResponse)
-> Lens
     DeauthorizeConnectionResponse
     DeauthorizeConnectionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeauthorizeConnectionResponse' {Maybe Text
connectionArn :: Maybe Text
$sel:connectionArn:DeauthorizeConnectionResponse' :: DeauthorizeConnectionResponse -> Maybe Text
connectionArn} -> Maybe Text
connectionArn) (\s :: DeauthorizeConnectionResponse
s@DeauthorizeConnectionResponse' {} Maybe Text
a -> DeauthorizeConnectionResponse
s {$sel:connectionArn:DeauthorizeConnectionResponse' :: Maybe Text
connectionArn = Maybe Text
a} :: DeauthorizeConnectionResponse)

-- | The state of the connection.
deauthorizeConnectionResponse_connectionState :: Lens.Lens' DeauthorizeConnectionResponse (Prelude.Maybe ConnectionState)
deauthorizeConnectionResponse_connectionState :: (Maybe ConnectionState -> f (Maybe ConnectionState))
-> DeauthorizeConnectionResponse -> f DeauthorizeConnectionResponse
deauthorizeConnectionResponse_connectionState = (DeauthorizeConnectionResponse -> Maybe ConnectionState)
-> (DeauthorizeConnectionResponse
    -> Maybe ConnectionState -> DeauthorizeConnectionResponse)
-> Lens
     DeauthorizeConnectionResponse
     DeauthorizeConnectionResponse
     (Maybe ConnectionState)
     (Maybe ConnectionState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeauthorizeConnectionResponse' {Maybe ConnectionState
connectionState :: Maybe ConnectionState
$sel:connectionState:DeauthorizeConnectionResponse' :: DeauthorizeConnectionResponse -> Maybe ConnectionState
connectionState} -> Maybe ConnectionState
connectionState) (\s :: DeauthorizeConnectionResponse
s@DeauthorizeConnectionResponse' {} Maybe ConnectionState
a -> DeauthorizeConnectionResponse
s {$sel:connectionState:DeauthorizeConnectionResponse' :: Maybe ConnectionState
connectionState = Maybe ConnectionState
a} :: DeauthorizeConnectionResponse)

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

instance Prelude.NFData DeauthorizeConnectionResponse