{-# 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 #-}
module Amazonka.Proton.DeleteEnvironmentAccountConnection
(
DeleteEnvironmentAccountConnection (..),
newDeleteEnvironmentAccountConnection,
deleteEnvironmentAccountConnection_id,
DeleteEnvironmentAccountConnectionResponse (..),
newDeleteEnvironmentAccountConnectionResponse,
deleteEnvironmentAccountConnectionResponse_environmentAccountConnection,
deleteEnvironmentAccountConnectionResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.Proton.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteEnvironmentAccountConnection = DeleteEnvironmentAccountConnection'
{
DeleteEnvironmentAccountConnection -> Text
id :: Prelude.Text
}
deriving (DeleteEnvironmentAccountConnection
-> DeleteEnvironmentAccountConnection -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteEnvironmentAccountConnection
-> DeleteEnvironmentAccountConnection -> Bool
$c/= :: DeleteEnvironmentAccountConnection
-> DeleteEnvironmentAccountConnection -> Bool
== :: DeleteEnvironmentAccountConnection
-> DeleteEnvironmentAccountConnection -> Bool
$c== :: DeleteEnvironmentAccountConnection
-> DeleteEnvironmentAccountConnection -> Bool
Prelude.Eq, ReadPrec [DeleteEnvironmentAccountConnection]
ReadPrec DeleteEnvironmentAccountConnection
Int -> ReadS DeleteEnvironmentAccountConnection
ReadS [DeleteEnvironmentAccountConnection]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteEnvironmentAccountConnection]
$creadListPrec :: ReadPrec [DeleteEnvironmentAccountConnection]
readPrec :: ReadPrec DeleteEnvironmentAccountConnection
$creadPrec :: ReadPrec DeleteEnvironmentAccountConnection
readList :: ReadS [DeleteEnvironmentAccountConnection]
$creadList :: ReadS [DeleteEnvironmentAccountConnection]
readsPrec :: Int -> ReadS DeleteEnvironmentAccountConnection
$creadsPrec :: Int -> ReadS DeleteEnvironmentAccountConnection
Prelude.Read, Int -> DeleteEnvironmentAccountConnection -> ShowS
[DeleteEnvironmentAccountConnection] -> ShowS
DeleteEnvironmentAccountConnection -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteEnvironmentAccountConnection] -> ShowS
$cshowList :: [DeleteEnvironmentAccountConnection] -> ShowS
show :: DeleteEnvironmentAccountConnection -> String
$cshow :: DeleteEnvironmentAccountConnection -> String
showsPrec :: Int -> DeleteEnvironmentAccountConnection -> ShowS
$cshowsPrec :: Int -> DeleteEnvironmentAccountConnection -> ShowS
Prelude.Show, forall x.
Rep DeleteEnvironmentAccountConnection x
-> DeleteEnvironmentAccountConnection
forall x.
DeleteEnvironmentAccountConnection
-> Rep DeleteEnvironmentAccountConnection x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteEnvironmentAccountConnection x
-> DeleteEnvironmentAccountConnection
$cfrom :: forall x.
DeleteEnvironmentAccountConnection
-> Rep DeleteEnvironmentAccountConnection x
Prelude.Generic)
newDeleteEnvironmentAccountConnection ::
Prelude.Text ->
DeleteEnvironmentAccountConnection
newDeleteEnvironmentAccountConnection :: Text -> DeleteEnvironmentAccountConnection
newDeleteEnvironmentAccountConnection Text
pId_ =
DeleteEnvironmentAccountConnection' {$sel:id:DeleteEnvironmentAccountConnection' :: Text
id = Text
pId_}
deleteEnvironmentAccountConnection_id :: Lens.Lens' DeleteEnvironmentAccountConnection Prelude.Text
deleteEnvironmentAccountConnection_id :: Lens' DeleteEnvironmentAccountConnection Text
deleteEnvironmentAccountConnection_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteEnvironmentAccountConnection' {Text
id :: Text
$sel:id:DeleteEnvironmentAccountConnection' :: DeleteEnvironmentAccountConnection -> Text
id} -> Text
id) (\s :: DeleteEnvironmentAccountConnection
s@DeleteEnvironmentAccountConnection' {} Text
a -> DeleteEnvironmentAccountConnection
s {$sel:id:DeleteEnvironmentAccountConnection' :: Text
id = Text
a} :: DeleteEnvironmentAccountConnection)
instance
Core.AWSRequest
DeleteEnvironmentAccountConnection
where
type
AWSResponse DeleteEnvironmentAccountConnection =
DeleteEnvironmentAccountConnectionResponse
request :: (Service -> Service)
-> DeleteEnvironmentAccountConnection
-> Request DeleteEnvironmentAccountConnection
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteEnvironmentAccountConnection
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DeleteEnvironmentAccountConnection)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe EnvironmentAccountConnection
-> Int -> DeleteEnvironmentAccountConnectionResponse
DeleteEnvironmentAccountConnectionResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"environmentAccountConnection")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
DeleteEnvironmentAccountConnection
where
hashWithSalt :: Int -> DeleteEnvironmentAccountConnection -> Int
hashWithSalt
Int
_salt
DeleteEnvironmentAccountConnection' {Text
id :: Text
$sel:id:DeleteEnvironmentAccountConnection' :: DeleteEnvironmentAccountConnection -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
id
instance
Prelude.NFData
DeleteEnvironmentAccountConnection
where
rnf :: DeleteEnvironmentAccountConnection -> ()
rnf DeleteEnvironmentAccountConnection' {Text
id :: Text
$sel:id:DeleteEnvironmentAccountConnection' :: DeleteEnvironmentAccountConnection -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
id
instance
Data.ToHeaders
DeleteEnvironmentAccountConnection
where
toHeaders :: DeleteEnvironmentAccountConnection -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"AwsProton20200720.DeleteEnvironmentAccountConnection" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance
Data.ToJSON
DeleteEnvironmentAccountConnection
where
toJSON :: DeleteEnvironmentAccountConnection -> Value
toJSON DeleteEnvironmentAccountConnection' {Text
id :: Text
$sel:id:DeleteEnvironmentAccountConnection' :: DeleteEnvironmentAccountConnection -> Text
..} =
[Pair] -> Value
Data.object
(forall a. [Maybe a] -> [a]
Prelude.catMaybes [forall a. a -> Maybe a
Prelude.Just (Key
"id" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
id)])
instance
Data.ToPath
DeleteEnvironmentAccountConnection
where
toPath :: DeleteEnvironmentAccountConnection -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Data.ToQuery
DeleteEnvironmentAccountConnection
where
toQuery :: DeleteEnvironmentAccountConnection -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteEnvironmentAccountConnectionResponse = DeleteEnvironmentAccountConnectionResponse'
{
DeleteEnvironmentAccountConnectionResponse
-> Maybe EnvironmentAccountConnection
environmentAccountConnection :: Prelude.Maybe EnvironmentAccountConnection,
DeleteEnvironmentAccountConnectionResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteEnvironmentAccountConnectionResponse
-> DeleteEnvironmentAccountConnectionResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteEnvironmentAccountConnectionResponse
-> DeleteEnvironmentAccountConnectionResponse -> Bool
$c/= :: DeleteEnvironmentAccountConnectionResponse
-> DeleteEnvironmentAccountConnectionResponse -> Bool
== :: DeleteEnvironmentAccountConnectionResponse
-> DeleteEnvironmentAccountConnectionResponse -> Bool
$c== :: DeleteEnvironmentAccountConnectionResponse
-> DeleteEnvironmentAccountConnectionResponse -> Bool
Prelude.Eq, ReadPrec [DeleteEnvironmentAccountConnectionResponse]
ReadPrec DeleteEnvironmentAccountConnectionResponse
Int -> ReadS DeleteEnvironmentAccountConnectionResponse
ReadS [DeleteEnvironmentAccountConnectionResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteEnvironmentAccountConnectionResponse]
$creadListPrec :: ReadPrec [DeleteEnvironmentAccountConnectionResponse]
readPrec :: ReadPrec DeleteEnvironmentAccountConnectionResponse
$creadPrec :: ReadPrec DeleteEnvironmentAccountConnectionResponse
readList :: ReadS [DeleteEnvironmentAccountConnectionResponse]
$creadList :: ReadS [DeleteEnvironmentAccountConnectionResponse]
readsPrec :: Int -> ReadS DeleteEnvironmentAccountConnectionResponse
$creadsPrec :: Int -> ReadS DeleteEnvironmentAccountConnectionResponse
Prelude.Read, Int -> DeleteEnvironmentAccountConnectionResponse -> ShowS
[DeleteEnvironmentAccountConnectionResponse] -> ShowS
DeleteEnvironmentAccountConnectionResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteEnvironmentAccountConnectionResponse] -> ShowS
$cshowList :: [DeleteEnvironmentAccountConnectionResponse] -> ShowS
show :: DeleteEnvironmentAccountConnectionResponse -> String
$cshow :: DeleteEnvironmentAccountConnectionResponse -> String
showsPrec :: Int -> DeleteEnvironmentAccountConnectionResponse -> ShowS
$cshowsPrec :: Int -> DeleteEnvironmentAccountConnectionResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteEnvironmentAccountConnectionResponse x
-> DeleteEnvironmentAccountConnectionResponse
forall x.
DeleteEnvironmentAccountConnectionResponse
-> Rep DeleteEnvironmentAccountConnectionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteEnvironmentAccountConnectionResponse x
-> DeleteEnvironmentAccountConnectionResponse
$cfrom :: forall x.
DeleteEnvironmentAccountConnectionResponse
-> Rep DeleteEnvironmentAccountConnectionResponse x
Prelude.Generic)
newDeleteEnvironmentAccountConnectionResponse ::
Prelude.Int ->
DeleteEnvironmentAccountConnectionResponse
newDeleteEnvironmentAccountConnectionResponse :: Int -> DeleteEnvironmentAccountConnectionResponse
newDeleteEnvironmentAccountConnectionResponse
Int
pHttpStatus_ =
DeleteEnvironmentAccountConnectionResponse'
{ $sel:environmentAccountConnection:DeleteEnvironmentAccountConnectionResponse' :: Maybe EnvironmentAccountConnection
environmentAccountConnection =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DeleteEnvironmentAccountConnectionResponse' :: Int
httpStatus = Int
pHttpStatus_
}
deleteEnvironmentAccountConnectionResponse_environmentAccountConnection :: Lens.Lens' DeleteEnvironmentAccountConnectionResponse (Prelude.Maybe EnvironmentAccountConnection)
deleteEnvironmentAccountConnectionResponse_environmentAccountConnection :: Lens'
DeleteEnvironmentAccountConnectionResponse
(Maybe EnvironmentAccountConnection)
deleteEnvironmentAccountConnectionResponse_environmentAccountConnection = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteEnvironmentAccountConnectionResponse' {Maybe EnvironmentAccountConnection
environmentAccountConnection :: Maybe EnvironmentAccountConnection
$sel:environmentAccountConnection:DeleteEnvironmentAccountConnectionResponse' :: DeleteEnvironmentAccountConnectionResponse
-> Maybe EnvironmentAccountConnection
environmentAccountConnection} -> Maybe EnvironmentAccountConnection
environmentAccountConnection) (\s :: DeleteEnvironmentAccountConnectionResponse
s@DeleteEnvironmentAccountConnectionResponse' {} Maybe EnvironmentAccountConnection
a -> DeleteEnvironmentAccountConnectionResponse
s {$sel:environmentAccountConnection:DeleteEnvironmentAccountConnectionResponse' :: Maybe EnvironmentAccountConnection
environmentAccountConnection = Maybe EnvironmentAccountConnection
a} :: DeleteEnvironmentAccountConnectionResponse)
deleteEnvironmentAccountConnectionResponse_httpStatus :: Lens.Lens' DeleteEnvironmentAccountConnectionResponse Prelude.Int
deleteEnvironmentAccountConnectionResponse_httpStatus :: Lens' DeleteEnvironmentAccountConnectionResponse Int
deleteEnvironmentAccountConnectionResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteEnvironmentAccountConnectionResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteEnvironmentAccountConnectionResponse' :: DeleteEnvironmentAccountConnectionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteEnvironmentAccountConnectionResponse
s@DeleteEnvironmentAccountConnectionResponse' {} Int
a -> DeleteEnvironmentAccountConnectionResponse
s {$sel:httpStatus:DeleteEnvironmentAccountConnectionResponse' :: Int
httpStatus = Int
a} :: DeleteEnvironmentAccountConnectionResponse)
instance
Prelude.NFData
DeleteEnvironmentAccountConnectionResponse
where
rnf :: DeleteEnvironmentAccountConnectionResponse -> ()
rnf DeleteEnvironmentAccountConnectionResponse' {Int
Maybe EnvironmentAccountConnection
httpStatus :: Int
environmentAccountConnection :: Maybe EnvironmentAccountConnection
$sel:httpStatus:DeleteEnvironmentAccountConnectionResponse' :: DeleteEnvironmentAccountConnectionResponse -> Int
$sel:environmentAccountConnection:DeleteEnvironmentAccountConnectionResponse' :: DeleteEnvironmentAccountConnectionResponse
-> Maybe EnvironmentAccountConnection
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe EnvironmentAccountConnection
environmentAccountConnection
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus