{-# 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.DeleteConnection
-- 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)
--
-- Deletes a connection.
module Amazonka.CloudWatchEvents.DeleteConnection
  ( -- * Creating a Request
    DeleteConnection (..),
    newDeleteConnection,

    -- * Request Lenses
    deleteConnection_name,

    -- * Destructuring the Response
    DeleteConnectionResponse (..),
    newDeleteConnectionResponse,

    -- * Response Lenses
    deleteConnectionResponse_creationTime,
    deleteConnectionResponse_lastModifiedTime,
    deleteConnectionResponse_lastAuthorizedTime,
    deleteConnectionResponse_connectionArn,
    deleteConnectionResponse_connectionState,
    deleteConnectionResponse_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:/ 'newDeleteConnection' smart constructor.
data DeleteConnection = DeleteConnection'
  { -- | The name of the connection to delete.
    DeleteConnection -> Text
name :: Prelude.Text
  }
  deriving (DeleteConnection -> DeleteConnection -> Bool
(DeleteConnection -> DeleteConnection -> Bool)
-> (DeleteConnection -> DeleteConnection -> Bool)
-> Eq DeleteConnection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteConnection -> DeleteConnection -> Bool
$c/= :: DeleteConnection -> DeleteConnection -> Bool
== :: DeleteConnection -> DeleteConnection -> Bool
$c== :: DeleteConnection -> DeleteConnection -> Bool
Prelude.Eq, ReadPrec [DeleteConnection]
ReadPrec DeleteConnection
Int -> ReadS DeleteConnection
ReadS [DeleteConnection]
(Int -> ReadS DeleteConnection)
-> ReadS [DeleteConnection]
-> ReadPrec DeleteConnection
-> ReadPrec [DeleteConnection]
-> Read DeleteConnection
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteConnection]
$creadListPrec :: ReadPrec [DeleteConnection]
readPrec :: ReadPrec DeleteConnection
$creadPrec :: ReadPrec DeleteConnection
readList :: ReadS [DeleteConnection]
$creadList :: ReadS [DeleteConnection]
readsPrec :: Int -> ReadS DeleteConnection
$creadsPrec :: Int -> ReadS DeleteConnection
Prelude.Read, Int -> DeleteConnection -> ShowS
[DeleteConnection] -> ShowS
DeleteConnection -> String
(Int -> DeleteConnection -> ShowS)
-> (DeleteConnection -> String)
-> ([DeleteConnection] -> ShowS)
-> Show DeleteConnection
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteConnection] -> ShowS
$cshowList :: [DeleteConnection] -> ShowS
show :: DeleteConnection -> String
$cshow :: DeleteConnection -> String
showsPrec :: Int -> DeleteConnection -> ShowS
$cshowsPrec :: Int -> DeleteConnection -> ShowS
Prelude.Show, (forall x. DeleteConnection -> Rep DeleteConnection x)
-> (forall x. Rep DeleteConnection x -> DeleteConnection)
-> Generic DeleteConnection
forall x. Rep DeleteConnection x -> DeleteConnection
forall x. DeleteConnection -> Rep DeleteConnection x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteConnection x -> DeleteConnection
$cfrom :: forall x. DeleteConnection -> Rep DeleteConnection x
Prelude.Generic)

-- |
-- Create a value of 'DeleteConnection' 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', 'deleteConnection_name' - The name of the connection to delete.
newDeleteConnection ::
  -- | 'name'
  Prelude.Text ->
  DeleteConnection
newDeleteConnection :: Text -> DeleteConnection
newDeleteConnection Text
pName_ =
  DeleteConnection' :: Text -> DeleteConnection
DeleteConnection' {$sel:name:DeleteConnection' :: Text
name = Text
pName_}

-- | The name of the connection to delete.
deleteConnection_name :: Lens.Lens' DeleteConnection Prelude.Text
deleteConnection_name :: (Text -> f Text) -> DeleteConnection -> f DeleteConnection
deleteConnection_name = (DeleteConnection -> Text)
-> (DeleteConnection -> Text -> DeleteConnection)
-> Lens DeleteConnection DeleteConnection Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteConnection' {Text
name :: Text
$sel:name:DeleteConnection' :: DeleteConnection -> Text
name} -> Text
name) (\s :: DeleteConnection
s@DeleteConnection' {} Text
a -> DeleteConnection
s {$sel:name:DeleteConnection' :: Text
name = Text
a} :: DeleteConnection)

instance Core.AWSRequest DeleteConnection where
  type
    AWSResponse DeleteConnection =
      DeleteConnectionResponse
  request :: DeleteConnection -> Request DeleteConnection
request = Service -> DeleteConnection -> Request DeleteConnection
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DeleteConnection
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteConnection)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DeleteConnection))
-> Logger
-> Service
-> Proxy DeleteConnection
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteConnection)))
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
-> DeleteConnectionResponse
DeleteConnectionResponse'
            (Maybe POSIX
 -> Maybe POSIX
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe ConnectionState
 -> Int
 -> DeleteConnectionResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe POSIX
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe ConnectionState
      -> Int
      -> DeleteConnectionResponse)
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
   -> DeleteConnectionResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe ConnectionState
      -> Int
      -> DeleteConnectionResponse)
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
   -> DeleteConnectionResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe ConnectionState -> Int -> DeleteConnectionResponse)
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 -> DeleteConnectionResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe ConnectionState -> Int -> DeleteConnectionResponse)
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 -> DeleteConnectionResponse)
-> Either String (Maybe ConnectionState)
-> Either String (Int -> DeleteConnectionResponse)
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 -> DeleteConnectionResponse)
-> Either String Int -> Either String DeleteConnectionResponse
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 DeleteConnection

instance Prelude.NFData DeleteConnection

instance Core.ToHeaders DeleteConnection where
  toHeaders :: DeleteConnection -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DeleteConnection -> 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.DeleteConnection" :: 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 DeleteConnection where
  toJSON :: DeleteConnection -> Value
toJSON DeleteConnection' {Text
name :: Text
$sel:name:DeleteConnection' :: DeleteConnection -> 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 DeleteConnection where
  toPath :: DeleteConnection -> ByteString
toPath = ByteString -> DeleteConnection -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

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

-- |
-- Create a value of 'DeleteConnectionResponse' 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', 'deleteConnectionResponse_creationTime' - A time stamp for the time that the connection was created.
--
-- 'lastModifiedTime', 'deleteConnectionResponse_lastModifiedTime' - A time stamp for the time that the connection was last modified before
-- it was deleted.
--
-- 'lastAuthorizedTime', 'deleteConnectionResponse_lastAuthorizedTime' - A time stamp for the time that the connection was last authorized before
-- it wa deleted.
--
-- 'connectionArn', 'deleteConnectionResponse_connectionArn' - The ARN of the connection that was deleted.
--
-- 'connectionState', 'deleteConnectionResponse_connectionState' - The state of the connection before it was deleted.
--
-- 'httpStatus', 'deleteConnectionResponse_httpStatus' - The response's http status code.
newDeleteConnectionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DeleteConnectionResponse
newDeleteConnectionResponse :: Int -> DeleteConnectionResponse
newDeleteConnectionResponse Int
pHttpStatus_ =
  DeleteConnectionResponse' :: Maybe POSIX
-> Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe ConnectionState
-> Int
-> DeleteConnectionResponse
DeleteConnectionResponse'
    { $sel:creationTime:DeleteConnectionResponse' :: Maybe POSIX
creationTime =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTime:DeleteConnectionResponse' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:lastAuthorizedTime:DeleteConnectionResponse' :: Maybe POSIX
lastAuthorizedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:connectionArn:DeleteConnectionResponse' :: Maybe Text
connectionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:connectionState:DeleteConnectionResponse' :: Maybe ConnectionState
connectionState = Maybe ConnectionState
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DeleteConnectionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A time stamp for the time that the connection was created.
deleteConnectionResponse_creationTime :: Lens.Lens' DeleteConnectionResponse (Prelude.Maybe Prelude.UTCTime)
deleteConnectionResponse_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DeleteConnectionResponse -> f DeleteConnectionResponse
deleteConnectionResponse_creationTime = (DeleteConnectionResponse -> Maybe POSIX)
-> (DeleteConnectionResponse
    -> Maybe POSIX -> DeleteConnectionResponse)
-> Lens
     DeleteConnectionResponse
     DeleteConnectionResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteConnectionResponse' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:DeleteConnectionResponse' :: DeleteConnectionResponse -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: DeleteConnectionResponse
s@DeleteConnectionResponse' {} Maybe POSIX
a -> DeleteConnectionResponse
s {$sel:creationTime:DeleteConnectionResponse' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: DeleteConnectionResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DeleteConnectionResponse -> f DeleteConnectionResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DeleteConnectionResponse
-> f DeleteConnectionResponse
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 modified before
-- it was deleted.
deleteConnectionResponse_lastModifiedTime :: Lens.Lens' DeleteConnectionResponse (Prelude.Maybe Prelude.UTCTime)
deleteConnectionResponse_lastModifiedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DeleteConnectionResponse -> f DeleteConnectionResponse
deleteConnectionResponse_lastModifiedTime = (DeleteConnectionResponse -> Maybe POSIX)
-> (DeleteConnectionResponse
    -> Maybe POSIX -> DeleteConnectionResponse)
-> Lens
     DeleteConnectionResponse
     DeleteConnectionResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteConnectionResponse' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:DeleteConnectionResponse' :: DeleteConnectionResponse -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: DeleteConnectionResponse
s@DeleteConnectionResponse' {} Maybe POSIX
a -> DeleteConnectionResponse
s {$sel:lastModifiedTime:DeleteConnectionResponse' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: DeleteConnectionResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DeleteConnectionResponse -> f DeleteConnectionResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DeleteConnectionResponse
-> f DeleteConnectionResponse
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 before
-- it wa deleted.
deleteConnectionResponse_lastAuthorizedTime :: Lens.Lens' DeleteConnectionResponse (Prelude.Maybe Prelude.UTCTime)
deleteConnectionResponse_lastAuthorizedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DeleteConnectionResponse -> f DeleteConnectionResponse
deleteConnectionResponse_lastAuthorizedTime = (DeleteConnectionResponse -> Maybe POSIX)
-> (DeleteConnectionResponse
    -> Maybe POSIX -> DeleteConnectionResponse)
-> Lens
     DeleteConnectionResponse
     DeleteConnectionResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteConnectionResponse' {Maybe POSIX
lastAuthorizedTime :: Maybe POSIX
$sel:lastAuthorizedTime:DeleteConnectionResponse' :: DeleteConnectionResponse -> Maybe POSIX
lastAuthorizedTime} -> Maybe POSIX
lastAuthorizedTime) (\s :: DeleteConnectionResponse
s@DeleteConnectionResponse' {} Maybe POSIX
a -> DeleteConnectionResponse
s {$sel:lastAuthorizedTime:DeleteConnectionResponse' :: Maybe POSIX
lastAuthorizedTime = Maybe POSIX
a} :: DeleteConnectionResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DeleteConnectionResponse -> f DeleteConnectionResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DeleteConnectionResponse
-> f DeleteConnectionResponse
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 was deleted.
deleteConnectionResponse_connectionArn :: Lens.Lens' DeleteConnectionResponse (Prelude.Maybe Prelude.Text)
deleteConnectionResponse_connectionArn :: (Maybe Text -> f (Maybe Text))
-> DeleteConnectionResponse -> f DeleteConnectionResponse
deleteConnectionResponse_connectionArn = (DeleteConnectionResponse -> Maybe Text)
-> (DeleteConnectionResponse
    -> Maybe Text -> DeleteConnectionResponse)
-> Lens
     DeleteConnectionResponse
     DeleteConnectionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteConnectionResponse' {Maybe Text
connectionArn :: Maybe Text
$sel:connectionArn:DeleteConnectionResponse' :: DeleteConnectionResponse -> Maybe Text
connectionArn} -> Maybe Text
connectionArn) (\s :: DeleteConnectionResponse
s@DeleteConnectionResponse' {} Maybe Text
a -> DeleteConnectionResponse
s {$sel:connectionArn:DeleteConnectionResponse' :: Maybe Text
connectionArn = Maybe Text
a} :: DeleteConnectionResponse)

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

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

instance Prelude.NFData DeleteConnectionResponse