{-# 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.Lens as Lens
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
(DeleteEnvironmentAccountConnection
-> DeleteEnvironmentAccountConnection -> Bool)
-> (DeleteEnvironmentAccountConnection
-> DeleteEnvironmentAccountConnection -> Bool)
-> Eq DeleteEnvironmentAccountConnection
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]
(Int -> ReadS DeleteEnvironmentAccountConnection)
-> ReadS [DeleteEnvironmentAccountConnection]
-> ReadPrec DeleteEnvironmentAccountConnection
-> ReadPrec [DeleteEnvironmentAccountConnection]
-> Read 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
(Int -> DeleteEnvironmentAccountConnection -> ShowS)
-> (DeleteEnvironmentAccountConnection -> String)
-> ([DeleteEnvironmentAccountConnection] -> ShowS)
-> Show DeleteEnvironmentAccountConnection
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.
DeleteEnvironmentAccountConnection
-> Rep DeleteEnvironmentAccountConnection x)
-> (forall x.
Rep DeleteEnvironmentAccountConnection x
-> DeleteEnvironmentAccountConnection)
-> Generic DeleteEnvironmentAccountConnection
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' :: Text -> DeleteEnvironmentAccountConnection
DeleteEnvironmentAccountConnection' {$sel:id:DeleteEnvironmentAccountConnection' :: Text
id = Text
pId_}
deleteEnvironmentAccountConnection_id :: Lens.Lens' DeleteEnvironmentAccountConnection Prelude.Text
deleteEnvironmentAccountConnection_id :: (Text -> f Text)
-> DeleteEnvironmentAccountConnection
-> f DeleteEnvironmentAccountConnection
deleteEnvironmentAccountConnection_id = (DeleteEnvironmentAccountConnection -> Text)
-> (DeleteEnvironmentAccountConnection
-> Text -> DeleteEnvironmentAccountConnection)
-> Lens
DeleteEnvironmentAccountConnection
DeleteEnvironmentAccountConnection
Text
Text
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 :: DeleteEnvironmentAccountConnection
-> Request DeleteEnvironmentAccountConnection
request = Service
-> DeleteEnvironmentAccountConnection
-> Request DeleteEnvironmentAccountConnection
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteEnvironmentAccountConnection
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DeleteEnvironmentAccountConnection)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DeleteEnvironmentAccountConnection))
-> Logger
-> Service
-> Proxy DeleteEnvironmentAccountConnection
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DeleteEnvironmentAccountConnection)))
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 EnvironmentAccountConnection
-> Int -> DeleteEnvironmentAccountConnectionResponse
DeleteEnvironmentAccountConnectionResponse'
(Maybe EnvironmentAccountConnection
-> Int -> DeleteEnvironmentAccountConnectionResponse)
-> Either String (Maybe EnvironmentAccountConnection)
-> Either
String (Int -> DeleteEnvironmentAccountConnectionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Either String (Maybe EnvironmentAccountConnection)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"environmentAccountConnection")
Either String (Int -> DeleteEnvironmentAccountConnectionResponse)
-> Either String Int
-> Either String DeleteEnvironmentAccountConnectionResponse
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
DeleteEnvironmentAccountConnection
instance
Prelude.NFData
DeleteEnvironmentAccountConnection
instance
Core.ToHeaders
DeleteEnvironmentAccountConnection
where
toHeaders :: DeleteEnvironmentAccountConnection -> ResponseHeaders
toHeaders =
ResponseHeaders
-> DeleteEnvironmentAccountConnection -> 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
"AwsProton20200720.DeleteEnvironmentAccountConnection" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance
Core.ToJSON
DeleteEnvironmentAccountConnection
where
toJSON :: DeleteEnvironmentAccountConnection -> Value
toJSON DeleteEnvironmentAccountConnection' {Text
id :: Text
$sel:id:DeleteEnvironmentAccountConnection' :: DeleteEnvironmentAccountConnection -> 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
"id" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
id)])
instance
Core.ToPath
DeleteEnvironmentAccountConnection
where
toPath :: DeleteEnvironmentAccountConnection -> ByteString
toPath = ByteString -> DeleteEnvironmentAccountConnection -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
DeleteEnvironmentAccountConnection
where
toQuery :: DeleteEnvironmentAccountConnection -> QueryString
toQuery = QueryString -> DeleteEnvironmentAccountConnection -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
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
(DeleteEnvironmentAccountConnectionResponse
-> DeleteEnvironmentAccountConnectionResponse -> Bool)
-> (DeleteEnvironmentAccountConnectionResponse
-> DeleteEnvironmentAccountConnectionResponse -> Bool)
-> Eq DeleteEnvironmentAccountConnectionResponse
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]
(Int -> ReadS DeleteEnvironmentAccountConnectionResponse)
-> ReadS [DeleteEnvironmentAccountConnectionResponse]
-> ReadPrec DeleteEnvironmentAccountConnectionResponse
-> ReadPrec [DeleteEnvironmentAccountConnectionResponse]
-> Read 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
(Int -> DeleteEnvironmentAccountConnectionResponse -> ShowS)
-> (DeleteEnvironmentAccountConnectionResponse -> String)
-> ([DeleteEnvironmentAccountConnectionResponse] -> ShowS)
-> Show DeleteEnvironmentAccountConnectionResponse
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.
DeleteEnvironmentAccountConnectionResponse
-> Rep DeleteEnvironmentAccountConnectionResponse x)
-> (forall x.
Rep DeleteEnvironmentAccountConnectionResponse x
-> DeleteEnvironmentAccountConnectionResponse)
-> Generic DeleteEnvironmentAccountConnectionResponse
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' :: Maybe EnvironmentAccountConnection
-> Int -> DeleteEnvironmentAccountConnectionResponse
DeleteEnvironmentAccountConnectionResponse'
{ $sel:environmentAccountConnection:DeleteEnvironmentAccountConnectionResponse' :: Maybe EnvironmentAccountConnection
environmentAccountConnection =
Maybe EnvironmentAccountConnection
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DeleteEnvironmentAccountConnectionResponse' :: Int
httpStatus = Int
pHttpStatus_
}
deleteEnvironmentAccountConnectionResponse_environmentAccountConnection :: Lens.Lens' DeleteEnvironmentAccountConnectionResponse (Prelude.Maybe EnvironmentAccountConnection)
deleteEnvironmentAccountConnectionResponse_environmentAccountConnection :: (Maybe EnvironmentAccountConnection
-> f (Maybe EnvironmentAccountConnection))
-> DeleteEnvironmentAccountConnectionResponse
-> f DeleteEnvironmentAccountConnectionResponse
deleteEnvironmentAccountConnectionResponse_environmentAccountConnection = (DeleteEnvironmentAccountConnectionResponse
-> Maybe EnvironmentAccountConnection)
-> (DeleteEnvironmentAccountConnectionResponse
-> Maybe EnvironmentAccountConnection
-> DeleteEnvironmentAccountConnectionResponse)
-> Lens
DeleteEnvironmentAccountConnectionResponse
DeleteEnvironmentAccountConnectionResponse
(Maybe EnvironmentAccountConnection)
(Maybe 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 :: (Int -> f Int)
-> DeleteEnvironmentAccountConnectionResponse
-> f DeleteEnvironmentAccountConnectionResponse
deleteEnvironmentAccountConnectionResponse_httpStatus = (DeleteEnvironmentAccountConnectionResponse -> Int)
-> (DeleteEnvironmentAccountConnectionResponse
-> Int -> DeleteEnvironmentAccountConnectionResponse)
-> Lens
DeleteEnvironmentAccountConnectionResponse
DeleteEnvironmentAccountConnectionResponse
Int
Int
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