{-# 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.Route53.DeleteTrafficPolicyInstance
(
DeleteTrafficPolicyInstance (..),
newDeleteTrafficPolicyInstance,
deleteTrafficPolicyInstance_id,
DeleteTrafficPolicyInstanceResponse (..),
newDeleteTrafficPolicyInstanceResponse,
deleteTrafficPolicyInstanceResponse_httpStatus,
)
where
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
import Amazonka.Route53.Types
data DeleteTrafficPolicyInstance = DeleteTrafficPolicyInstance'
{
DeleteTrafficPolicyInstance -> Text
id :: Prelude.Text
}
deriving (DeleteTrafficPolicyInstance -> DeleteTrafficPolicyInstance -> Bool
(DeleteTrafficPolicyInstance
-> DeleteTrafficPolicyInstance -> Bool)
-> (DeleteTrafficPolicyInstance
-> DeleteTrafficPolicyInstance -> Bool)
-> Eq DeleteTrafficPolicyInstance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteTrafficPolicyInstance -> DeleteTrafficPolicyInstance -> Bool
$c/= :: DeleteTrafficPolicyInstance -> DeleteTrafficPolicyInstance -> Bool
== :: DeleteTrafficPolicyInstance -> DeleteTrafficPolicyInstance -> Bool
$c== :: DeleteTrafficPolicyInstance -> DeleteTrafficPolicyInstance -> Bool
Prelude.Eq, ReadPrec [DeleteTrafficPolicyInstance]
ReadPrec DeleteTrafficPolicyInstance
Int -> ReadS DeleteTrafficPolicyInstance
ReadS [DeleteTrafficPolicyInstance]
(Int -> ReadS DeleteTrafficPolicyInstance)
-> ReadS [DeleteTrafficPolicyInstance]
-> ReadPrec DeleteTrafficPolicyInstance
-> ReadPrec [DeleteTrafficPolicyInstance]
-> Read DeleteTrafficPolicyInstance
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteTrafficPolicyInstance]
$creadListPrec :: ReadPrec [DeleteTrafficPolicyInstance]
readPrec :: ReadPrec DeleteTrafficPolicyInstance
$creadPrec :: ReadPrec DeleteTrafficPolicyInstance
readList :: ReadS [DeleteTrafficPolicyInstance]
$creadList :: ReadS [DeleteTrafficPolicyInstance]
readsPrec :: Int -> ReadS DeleteTrafficPolicyInstance
$creadsPrec :: Int -> ReadS DeleteTrafficPolicyInstance
Prelude.Read, Int -> DeleteTrafficPolicyInstance -> ShowS
[DeleteTrafficPolicyInstance] -> ShowS
DeleteTrafficPolicyInstance -> String
(Int -> DeleteTrafficPolicyInstance -> ShowS)
-> (DeleteTrafficPolicyInstance -> String)
-> ([DeleteTrafficPolicyInstance] -> ShowS)
-> Show DeleteTrafficPolicyInstance
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteTrafficPolicyInstance] -> ShowS
$cshowList :: [DeleteTrafficPolicyInstance] -> ShowS
show :: DeleteTrafficPolicyInstance -> String
$cshow :: DeleteTrafficPolicyInstance -> String
showsPrec :: Int -> DeleteTrafficPolicyInstance -> ShowS
$cshowsPrec :: Int -> DeleteTrafficPolicyInstance -> ShowS
Prelude.Show, (forall x.
DeleteTrafficPolicyInstance -> Rep DeleteTrafficPolicyInstance x)
-> (forall x.
Rep DeleteTrafficPolicyInstance x -> DeleteTrafficPolicyInstance)
-> Generic DeleteTrafficPolicyInstance
forall x.
Rep DeleteTrafficPolicyInstance x -> DeleteTrafficPolicyInstance
forall x.
DeleteTrafficPolicyInstance -> Rep DeleteTrafficPolicyInstance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteTrafficPolicyInstance x -> DeleteTrafficPolicyInstance
$cfrom :: forall x.
DeleteTrafficPolicyInstance -> Rep DeleteTrafficPolicyInstance x
Prelude.Generic)
newDeleteTrafficPolicyInstance ::
Prelude.Text ->
DeleteTrafficPolicyInstance
newDeleteTrafficPolicyInstance :: Text -> DeleteTrafficPolicyInstance
newDeleteTrafficPolicyInstance Text
pId_ =
DeleteTrafficPolicyInstance' :: Text -> DeleteTrafficPolicyInstance
DeleteTrafficPolicyInstance' {$sel:id:DeleteTrafficPolicyInstance' :: Text
id = Text
pId_}
deleteTrafficPolicyInstance_id :: Lens.Lens' DeleteTrafficPolicyInstance Prelude.Text
deleteTrafficPolicyInstance_id :: (Text -> f Text)
-> DeleteTrafficPolicyInstance -> f DeleteTrafficPolicyInstance
deleteTrafficPolicyInstance_id = (DeleteTrafficPolicyInstance -> Text)
-> (DeleteTrafficPolicyInstance
-> Text -> DeleteTrafficPolicyInstance)
-> Lens
DeleteTrafficPolicyInstance DeleteTrafficPolicyInstance Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteTrafficPolicyInstance' {Text
id :: Text
$sel:id:DeleteTrafficPolicyInstance' :: DeleteTrafficPolicyInstance -> Text
id} -> Text
id) (\s :: DeleteTrafficPolicyInstance
s@DeleteTrafficPolicyInstance' {} Text
a -> DeleteTrafficPolicyInstance
s {$sel:id:DeleteTrafficPolicyInstance' :: Text
id = Text
a} :: DeleteTrafficPolicyInstance)
instance Core.AWSRequest DeleteTrafficPolicyInstance where
type
AWSResponse DeleteTrafficPolicyInstance =
DeleteTrafficPolicyInstanceResponse
request :: DeleteTrafficPolicyInstance -> Request DeleteTrafficPolicyInstance
request = Service
-> DeleteTrafficPolicyInstance
-> Request DeleteTrafficPolicyInstance
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteTrafficPolicyInstance
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteTrafficPolicyInstance)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteTrafficPolicyInstance))
-> Logger
-> Service
-> Proxy DeleteTrafficPolicyInstance
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteTrafficPolicyInstance)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DeleteTrafficPolicyInstanceResponse
DeleteTrafficPolicyInstanceResponse'
(Int -> DeleteTrafficPolicyInstanceResponse)
-> Either String Int
-> Either String DeleteTrafficPolicyInstanceResponse
forall (f :: * -> *) a b. Functor 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 DeleteTrafficPolicyInstance
instance Prelude.NFData DeleteTrafficPolicyInstance
instance Core.ToHeaders DeleteTrafficPolicyInstance where
toHeaders :: DeleteTrafficPolicyInstance -> ResponseHeaders
toHeaders = ResponseHeaders -> DeleteTrafficPolicyInstance -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DeleteTrafficPolicyInstance where
toPath :: DeleteTrafficPolicyInstance -> ByteString
toPath DeleteTrafficPolicyInstance' {Text
id :: Text
$sel:id:DeleteTrafficPolicyInstance' :: DeleteTrafficPolicyInstance -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/2013-04-01/trafficpolicyinstance/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
id]
instance Core.ToQuery DeleteTrafficPolicyInstance where
toQuery :: DeleteTrafficPolicyInstance -> QueryString
toQuery = QueryString -> DeleteTrafficPolicyInstance -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteTrafficPolicyInstanceResponse = DeleteTrafficPolicyInstanceResponse'
{
DeleteTrafficPolicyInstanceResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteTrafficPolicyInstanceResponse
-> DeleteTrafficPolicyInstanceResponse -> Bool
(DeleteTrafficPolicyInstanceResponse
-> DeleteTrafficPolicyInstanceResponse -> Bool)
-> (DeleteTrafficPolicyInstanceResponse
-> DeleteTrafficPolicyInstanceResponse -> Bool)
-> Eq DeleteTrafficPolicyInstanceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteTrafficPolicyInstanceResponse
-> DeleteTrafficPolicyInstanceResponse -> Bool
$c/= :: DeleteTrafficPolicyInstanceResponse
-> DeleteTrafficPolicyInstanceResponse -> Bool
== :: DeleteTrafficPolicyInstanceResponse
-> DeleteTrafficPolicyInstanceResponse -> Bool
$c== :: DeleteTrafficPolicyInstanceResponse
-> DeleteTrafficPolicyInstanceResponse -> Bool
Prelude.Eq, ReadPrec [DeleteTrafficPolicyInstanceResponse]
ReadPrec DeleteTrafficPolicyInstanceResponse
Int -> ReadS DeleteTrafficPolicyInstanceResponse
ReadS [DeleteTrafficPolicyInstanceResponse]
(Int -> ReadS DeleteTrafficPolicyInstanceResponse)
-> ReadS [DeleteTrafficPolicyInstanceResponse]
-> ReadPrec DeleteTrafficPolicyInstanceResponse
-> ReadPrec [DeleteTrafficPolicyInstanceResponse]
-> Read DeleteTrafficPolicyInstanceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteTrafficPolicyInstanceResponse]
$creadListPrec :: ReadPrec [DeleteTrafficPolicyInstanceResponse]
readPrec :: ReadPrec DeleteTrafficPolicyInstanceResponse
$creadPrec :: ReadPrec DeleteTrafficPolicyInstanceResponse
readList :: ReadS [DeleteTrafficPolicyInstanceResponse]
$creadList :: ReadS [DeleteTrafficPolicyInstanceResponse]
readsPrec :: Int -> ReadS DeleteTrafficPolicyInstanceResponse
$creadsPrec :: Int -> ReadS DeleteTrafficPolicyInstanceResponse
Prelude.Read, Int -> DeleteTrafficPolicyInstanceResponse -> ShowS
[DeleteTrafficPolicyInstanceResponse] -> ShowS
DeleteTrafficPolicyInstanceResponse -> String
(Int -> DeleteTrafficPolicyInstanceResponse -> ShowS)
-> (DeleteTrafficPolicyInstanceResponse -> String)
-> ([DeleteTrafficPolicyInstanceResponse] -> ShowS)
-> Show DeleteTrafficPolicyInstanceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteTrafficPolicyInstanceResponse] -> ShowS
$cshowList :: [DeleteTrafficPolicyInstanceResponse] -> ShowS
show :: DeleteTrafficPolicyInstanceResponse -> String
$cshow :: DeleteTrafficPolicyInstanceResponse -> String
showsPrec :: Int -> DeleteTrafficPolicyInstanceResponse -> ShowS
$cshowsPrec :: Int -> DeleteTrafficPolicyInstanceResponse -> ShowS
Prelude.Show, (forall x.
DeleteTrafficPolicyInstanceResponse
-> Rep DeleteTrafficPolicyInstanceResponse x)
-> (forall x.
Rep DeleteTrafficPolicyInstanceResponse x
-> DeleteTrafficPolicyInstanceResponse)
-> Generic DeleteTrafficPolicyInstanceResponse
forall x.
Rep DeleteTrafficPolicyInstanceResponse x
-> DeleteTrafficPolicyInstanceResponse
forall x.
DeleteTrafficPolicyInstanceResponse
-> Rep DeleteTrafficPolicyInstanceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteTrafficPolicyInstanceResponse x
-> DeleteTrafficPolicyInstanceResponse
$cfrom :: forall x.
DeleteTrafficPolicyInstanceResponse
-> Rep DeleteTrafficPolicyInstanceResponse x
Prelude.Generic)
newDeleteTrafficPolicyInstanceResponse ::
Prelude.Int ->
DeleteTrafficPolicyInstanceResponse
newDeleteTrafficPolicyInstanceResponse :: Int -> DeleteTrafficPolicyInstanceResponse
newDeleteTrafficPolicyInstanceResponse Int
pHttpStatus_ =
DeleteTrafficPolicyInstanceResponse' :: Int -> DeleteTrafficPolicyInstanceResponse
DeleteTrafficPolicyInstanceResponse'
{ $sel:httpStatus:DeleteTrafficPolicyInstanceResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteTrafficPolicyInstanceResponse_httpStatus :: Lens.Lens' DeleteTrafficPolicyInstanceResponse Prelude.Int
deleteTrafficPolicyInstanceResponse_httpStatus :: (Int -> f Int)
-> DeleteTrafficPolicyInstanceResponse
-> f DeleteTrafficPolicyInstanceResponse
deleteTrafficPolicyInstanceResponse_httpStatus = (DeleteTrafficPolicyInstanceResponse -> Int)
-> (DeleteTrafficPolicyInstanceResponse
-> Int -> DeleteTrafficPolicyInstanceResponse)
-> Lens
DeleteTrafficPolicyInstanceResponse
DeleteTrafficPolicyInstanceResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteTrafficPolicyInstanceResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteTrafficPolicyInstanceResponse' :: DeleteTrafficPolicyInstanceResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteTrafficPolicyInstanceResponse
s@DeleteTrafficPolicyInstanceResponse' {} Int
a -> DeleteTrafficPolicyInstanceResponse
s {$sel:httpStatus:DeleteTrafficPolicyInstanceResponse' :: Int
httpStatus = Int
a} :: DeleteTrafficPolicyInstanceResponse)
instance
Prelude.NFData
DeleteTrafficPolicyInstanceResponse