{-# 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.Forecast.DeleteResourceTree
(
DeleteResourceTree (..),
newDeleteResourceTree,
deleteResourceTree_resourceArn,
DeleteResourceTreeResponse (..),
newDeleteResourceTreeResponse,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Forecast.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
data DeleteResourceTree = DeleteResourceTree'
{
DeleteResourceTree -> Text
resourceArn :: Prelude.Text
}
deriving (DeleteResourceTree -> DeleteResourceTree -> Bool
(DeleteResourceTree -> DeleteResourceTree -> Bool)
-> (DeleteResourceTree -> DeleteResourceTree -> Bool)
-> Eq DeleteResourceTree
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteResourceTree -> DeleteResourceTree -> Bool
$c/= :: DeleteResourceTree -> DeleteResourceTree -> Bool
== :: DeleteResourceTree -> DeleteResourceTree -> Bool
$c== :: DeleteResourceTree -> DeleteResourceTree -> Bool
Prelude.Eq, ReadPrec [DeleteResourceTree]
ReadPrec DeleteResourceTree
Int -> ReadS DeleteResourceTree
ReadS [DeleteResourceTree]
(Int -> ReadS DeleteResourceTree)
-> ReadS [DeleteResourceTree]
-> ReadPrec DeleteResourceTree
-> ReadPrec [DeleteResourceTree]
-> Read DeleteResourceTree
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteResourceTree]
$creadListPrec :: ReadPrec [DeleteResourceTree]
readPrec :: ReadPrec DeleteResourceTree
$creadPrec :: ReadPrec DeleteResourceTree
readList :: ReadS [DeleteResourceTree]
$creadList :: ReadS [DeleteResourceTree]
readsPrec :: Int -> ReadS DeleteResourceTree
$creadsPrec :: Int -> ReadS DeleteResourceTree
Prelude.Read, Int -> DeleteResourceTree -> ShowS
[DeleteResourceTree] -> ShowS
DeleteResourceTree -> String
(Int -> DeleteResourceTree -> ShowS)
-> (DeleteResourceTree -> String)
-> ([DeleteResourceTree] -> ShowS)
-> Show DeleteResourceTree
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteResourceTree] -> ShowS
$cshowList :: [DeleteResourceTree] -> ShowS
show :: DeleteResourceTree -> String
$cshow :: DeleteResourceTree -> String
showsPrec :: Int -> DeleteResourceTree -> ShowS
$cshowsPrec :: Int -> DeleteResourceTree -> ShowS
Prelude.Show, (forall x. DeleteResourceTree -> Rep DeleteResourceTree x)
-> (forall x. Rep DeleteResourceTree x -> DeleteResourceTree)
-> Generic DeleteResourceTree
forall x. Rep DeleteResourceTree x -> DeleteResourceTree
forall x. DeleteResourceTree -> Rep DeleteResourceTree x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteResourceTree x -> DeleteResourceTree
$cfrom :: forall x. DeleteResourceTree -> Rep DeleteResourceTree x
Prelude.Generic)
newDeleteResourceTree ::
Prelude.Text ->
DeleteResourceTree
newDeleteResourceTree :: Text -> DeleteResourceTree
newDeleteResourceTree Text
pResourceArn_ =
DeleteResourceTree' :: Text -> DeleteResourceTree
DeleteResourceTree' {$sel:resourceArn:DeleteResourceTree' :: Text
resourceArn = Text
pResourceArn_}
deleteResourceTree_resourceArn :: Lens.Lens' DeleteResourceTree Prelude.Text
deleteResourceTree_resourceArn :: (Text -> f Text) -> DeleteResourceTree -> f DeleteResourceTree
deleteResourceTree_resourceArn = (DeleteResourceTree -> Text)
-> (DeleteResourceTree -> Text -> DeleteResourceTree)
-> Lens DeleteResourceTree DeleteResourceTree Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteResourceTree' {Text
resourceArn :: Text
$sel:resourceArn:DeleteResourceTree' :: DeleteResourceTree -> Text
resourceArn} -> Text
resourceArn) (\s :: DeleteResourceTree
s@DeleteResourceTree' {} Text
a -> DeleteResourceTree
s {$sel:resourceArn:DeleteResourceTree' :: Text
resourceArn = Text
a} :: DeleteResourceTree)
instance Core.AWSRequest DeleteResourceTree where
type
AWSResponse DeleteResourceTree =
DeleteResourceTreeResponse
request :: DeleteResourceTree -> Request DeleteResourceTree
request = Service -> DeleteResourceTree -> Request DeleteResourceTree
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteResourceTree
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteResourceTree)))
response =
AWSResponse DeleteResourceTree
-> Logger
-> Service
-> Proxy DeleteResourceTree
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteResourceTree)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteResourceTree
DeleteResourceTreeResponse
DeleteResourceTreeResponse'
instance Prelude.Hashable DeleteResourceTree
instance Prelude.NFData DeleteResourceTree
instance Core.ToHeaders DeleteResourceTree where
toHeaders :: DeleteResourceTree -> [Header]
toHeaders =
[Header] -> DeleteResourceTree -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"AmazonForecast.DeleteResourceTree" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON DeleteResourceTree where
toJSON :: DeleteResourceTree -> Value
toJSON DeleteResourceTree' {Text
resourceArn :: Text
$sel:resourceArn:DeleteResourceTree' :: DeleteResourceTree -> 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
"ResourceArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
resourceArn)]
)
instance Core.ToPath DeleteResourceTree where
toPath :: DeleteResourceTree -> ByteString
toPath = ByteString -> DeleteResourceTree -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteResourceTree where
toQuery :: DeleteResourceTree -> QueryString
toQuery = QueryString -> DeleteResourceTree -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteResourceTreeResponse = DeleteResourceTreeResponse'
{
}
deriving (DeleteResourceTreeResponse -> DeleteResourceTreeResponse -> Bool
(DeleteResourceTreeResponse -> DeleteResourceTreeResponse -> Bool)
-> (DeleteResourceTreeResponse
-> DeleteResourceTreeResponse -> Bool)
-> Eq DeleteResourceTreeResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteResourceTreeResponse -> DeleteResourceTreeResponse -> Bool
$c/= :: DeleteResourceTreeResponse -> DeleteResourceTreeResponse -> Bool
== :: DeleteResourceTreeResponse -> DeleteResourceTreeResponse -> Bool
$c== :: DeleteResourceTreeResponse -> DeleteResourceTreeResponse -> Bool
Prelude.Eq, ReadPrec [DeleteResourceTreeResponse]
ReadPrec DeleteResourceTreeResponse
Int -> ReadS DeleteResourceTreeResponse
ReadS [DeleteResourceTreeResponse]
(Int -> ReadS DeleteResourceTreeResponse)
-> ReadS [DeleteResourceTreeResponse]
-> ReadPrec DeleteResourceTreeResponse
-> ReadPrec [DeleteResourceTreeResponse]
-> Read DeleteResourceTreeResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteResourceTreeResponse]
$creadListPrec :: ReadPrec [DeleteResourceTreeResponse]
readPrec :: ReadPrec DeleteResourceTreeResponse
$creadPrec :: ReadPrec DeleteResourceTreeResponse
readList :: ReadS [DeleteResourceTreeResponse]
$creadList :: ReadS [DeleteResourceTreeResponse]
readsPrec :: Int -> ReadS DeleteResourceTreeResponse
$creadsPrec :: Int -> ReadS DeleteResourceTreeResponse
Prelude.Read, Int -> DeleteResourceTreeResponse -> ShowS
[DeleteResourceTreeResponse] -> ShowS
DeleteResourceTreeResponse -> String
(Int -> DeleteResourceTreeResponse -> ShowS)
-> (DeleteResourceTreeResponse -> String)
-> ([DeleteResourceTreeResponse] -> ShowS)
-> Show DeleteResourceTreeResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteResourceTreeResponse] -> ShowS
$cshowList :: [DeleteResourceTreeResponse] -> ShowS
show :: DeleteResourceTreeResponse -> String
$cshow :: DeleteResourceTreeResponse -> String
showsPrec :: Int -> DeleteResourceTreeResponse -> ShowS
$cshowsPrec :: Int -> DeleteResourceTreeResponse -> ShowS
Prelude.Show, (forall x.
DeleteResourceTreeResponse -> Rep DeleteResourceTreeResponse x)
-> (forall x.
Rep DeleteResourceTreeResponse x -> DeleteResourceTreeResponse)
-> Generic DeleteResourceTreeResponse
forall x.
Rep DeleteResourceTreeResponse x -> DeleteResourceTreeResponse
forall x.
DeleteResourceTreeResponse -> Rep DeleteResourceTreeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteResourceTreeResponse x -> DeleteResourceTreeResponse
$cfrom :: forall x.
DeleteResourceTreeResponse -> Rep DeleteResourceTreeResponse x
Prelude.Generic)
newDeleteResourceTreeResponse ::
DeleteResourceTreeResponse
newDeleteResourceTreeResponse :: DeleteResourceTreeResponse
newDeleteResourceTreeResponse =
DeleteResourceTreeResponse
DeleteResourceTreeResponse'
instance Prelude.NFData DeleteResourceTreeResponse