{-# 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.GlobalAccelerator.RemoveEndpoints
(
RemoveEndpoints (..),
newRemoveEndpoints,
removeEndpoints_endpointIdentifiers,
removeEndpoints_endpointGroupArn,
RemoveEndpointsResponse (..),
newRemoveEndpointsResponse,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.GlobalAccelerator.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data RemoveEndpoints = RemoveEndpoints'
{
RemoveEndpoints -> NonEmpty EndpointIdentifier
endpointIdentifiers :: Prelude.NonEmpty EndpointIdentifier,
RemoveEndpoints -> Text
endpointGroupArn :: Prelude.Text
}
deriving (RemoveEndpoints -> RemoveEndpoints -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoveEndpoints -> RemoveEndpoints -> Bool
$c/= :: RemoveEndpoints -> RemoveEndpoints -> Bool
== :: RemoveEndpoints -> RemoveEndpoints -> Bool
$c== :: RemoveEndpoints -> RemoveEndpoints -> Bool
Prelude.Eq, ReadPrec [RemoveEndpoints]
ReadPrec RemoveEndpoints
Int -> ReadS RemoveEndpoints
ReadS [RemoveEndpoints]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RemoveEndpoints]
$creadListPrec :: ReadPrec [RemoveEndpoints]
readPrec :: ReadPrec RemoveEndpoints
$creadPrec :: ReadPrec RemoveEndpoints
readList :: ReadS [RemoveEndpoints]
$creadList :: ReadS [RemoveEndpoints]
readsPrec :: Int -> ReadS RemoveEndpoints
$creadsPrec :: Int -> ReadS RemoveEndpoints
Prelude.Read, Int -> RemoveEndpoints -> ShowS
[RemoveEndpoints] -> ShowS
RemoveEndpoints -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemoveEndpoints] -> ShowS
$cshowList :: [RemoveEndpoints] -> ShowS
show :: RemoveEndpoints -> String
$cshow :: RemoveEndpoints -> String
showsPrec :: Int -> RemoveEndpoints -> ShowS
$cshowsPrec :: Int -> RemoveEndpoints -> ShowS
Prelude.Show, forall x. Rep RemoveEndpoints x -> RemoveEndpoints
forall x. RemoveEndpoints -> Rep RemoveEndpoints x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RemoveEndpoints x -> RemoveEndpoints
$cfrom :: forall x. RemoveEndpoints -> Rep RemoveEndpoints x
Prelude.Generic)
newRemoveEndpoints ::
Prelude.NonEmpty EndpointIdentifier ->
Prelude.Text ->
RemoveEndpoints
newRemoveEndpoints :: NonEmpty EndpointIdentifier -> Text -> RemoveEndpoints
newRemoveEndpoints
NonEmpty EndpointIdentifier
pEndpointIdentifiers_
Text
pEndpointGroupArn_ =
RemoveEndpoints'
{ $sel:endpointIdentifiers:RemoveEndpoints' :: NonEmpty EndpointIdentifier
endpointIdentifiers =
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced forall t b. AReview t b -> b -> t
Lens.# NonEmpty EndpointIdentifier
pEndpointIdentifiers_,
$sel:endpointGroupArn:RemoveEndpoints' :: Text
endpointGroupArn = Text
pEndpointGroupArn_
}
removeEndpoints_endpointIdentifiers :: Lens.Lens' RemoveEndpoints (Prelude.NonEmpty EndpointIdentifier)
removeEndpoints_endpointIdentifiers :: Lens' RemoveEndpoints (NonEmpty EndpointIdentifier)
removeEndpoints_endpointIdentifiers = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveEndpoints' {NonEmpty EndpointIdentifier
endpointIdentifiers :: NonEmpty EndpointIdentifier
$sel:endpointIdentifiers:RemoveEndpoints' :: RemoveEndpoints -> NonEmpty EndpointIdentifier
endpointIdentifiers} -> NonEmpty EndpointIdentifier
endpointIdentifiers) (\s :: RemoveEndpoints
s@RemoveEndpoints' {} NonEmpty EndpointIdentifier
a -> RemoveEndpoints
s {$sel:endpointIdentifiers:RemoveEndpoints' :: NonEmpty EndpointIdentifier
endpointIdentifiers = NonEmpty EndpointIdentifier
a} :: RemoveEndpoints) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
removeEndpoints_endpointGroupArn :: Lens.Lens' RemoveEndpoints Prelude.Text
removeEndpoints_endpointGroupArn :: Lens' RemoveEndpoints Text
removeEndpoints_endpointGroupArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveEndpoints' {Text
endpointGroupArn :: Text
$sel:endpointGroupArn:RemoveEndpoints' :: RemoveEndpoints -> Text
endpointGroupArn} -> Text
endpointGroupArn) (\s :: RemoveEndpoints
s@RemoveEndpoints' {} Text
a -> RemoveEndpoints
s {$sel:endpointGroupArn:RemoveEndpoints' :: Text
endpointGroupArn = Text
a} :: RemoveEndpoints)
instance Core.AWSRequest RemoveEndpoints where
type
AWSResponse RemoveEndpoints =
RemoveEndpointsResponse
request :: (Service -> Service) -> RemoveEndpoints -> Request RemoveEndpoints
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 RemoveEndpoints
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse RemoveEndpoints)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull RemoveEndpointsResponse
RemoveEndpointsResponse'
instance Prelude.Hashable RemoveEndpoints where
hashWithSalt :: Int -> RemoveEndpoints -> Int
hashWithSalt Int
_salt RemoveEndpoints' {NonEmpty EndpointIdentifier
Text
endpointGroupArn :: Text
endpointIdentifiers :: NonEmpty EndpointIdentifier
$sel:endpointGroupArn:RemoveEndpoints' :: RemoveEndpoints -> Text
$sel:endpointIdentifiers:RemoveEndpoints' :: RemoveEndpoints -> NonEmpty EndpointIdentifier
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NonEmpty EndpointIdentifier
endpointIdentifiers
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
endpointGroupArn
instance Prelude.NFData RemoveEndpoints where
rnf :: RemoveEndpoints -> ()
rnf RemoveEndpoints' {NonEmpty EndpointIdentifier
Text
endpointGroupArn :: Text
endpointIdentifiers :: NonEmpty EndpointIdentifier
$sel:endpointGroupArn:RemoveEndpoints' :: RemoveEndpoints -> Text
$sel:endpointIdentifiers:RemoveEndpoints' :: RemoveEndpoints -> NonEmpty EndpointIdentifier
..} =
forall a. NFData a => a -> ()
Prelude.rnf NonEmpty EndpointIdentifier
endpointIdentifiers
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
endpointGroupArn
instance Data.ToHeaders RemoveEndpoints where
toHeaders :: RemoveEndpoints -> [Header]
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 -> [Header]
Data.=# ( ByteString
"GlobalAccelerator_V20180706.RemoveEndpoints" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON RemoveEndpoints where
toJSON :: RemoveEndpoints -> Value
toJSON RemoveEndpoints' {NonEmpty EndpointIdentifier
Text
endpointGroupArn :: Text
endpointIdentifiers :: NonEmpty EndpointIdentifier
$sel:endpointGroupArn:RemoveEndpoints' :: RemoveEndpoints -> Text
$sel:endpointIdentifiers:RemoveEndpoints' :: RemoveEndpoints -> NonEmpty EndpointIdentifier
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"EndpointIdentifiers" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= NonEmpty EndpointIdentifier
endpointIdentifiers),
forall a. a -> Maybe a
Prelude.Just
(Key
"EndpointGroupArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
endpointGroupArn)
]
)
instance Data.ToPath RemoveEndpoints where
toPath :: RemoveEndpoints -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery RemoveEndpoints where
toQuery :: RemoveEndpoints -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data RemoveEndpointsResponse = RemoveEndpointsResponse'
{
}
deriving (RemoveEndpointsResponse -> RemoveEndpointsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoveEndpointsResponse -> RemoveEndpointsResponse -> Bool
$c/= :: RemoveEndpointsResponse -> RemoveEndpointsResponse -> Bool
== :: RemoveEndpointsResponse -> RemoveEndpointsResponse -> Bool
$c== :: RemoveEndpointsResponse -> RemoveEndpointsResponse -> Bool
Prelude.Eq, ReadPrec [RemoveEndpointsResponse]
ReadPrec RemoveEndpointsResponse
Int -> ReadS RemoveEndpointsResponse
ReadS [RemoveEndpointsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RemoveEndpointsResponse]
$creadListPrec :: ReadPrec [RemoveEndpointsResponse]
readPrec :: ReadPrec RemoveEndpointsResponse
$creadPrec :: ReadPrec RemoveEndpointsResponse
readList :: ReadS [RemoveEndpointsResponse]
$creadList :: ReadS [RemoveEndpointsResponse]
readsPrec :: Int -> ReadS RemoveEndpointsResponse
$creadsPrec :: Int -> ReadS RemoveEndpointsResponse
Prelude.Read, Int -> RemoveEndpointsResponse -> ShowS
[RemoveEndpointsResponse] -> ShowS
RemoveEndpointsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemoveEndpointsResponse] -> ShowS
$cshowList :: [RemoveEndpointsResponse] -> ShowS
show :: RemoveEndpointsResponse -> String
$cshow :: RemoveEndpointsResponse -> String
showsPrec :: Int -> RemoveEndpointsResponse -> ShowS
$cshowsPrec :: Int -> RemoveEndpointsResponse -> ShowS
Prelude.Show, forall x. Rep RemoveEndpointsResponse x -> RemoveEndpointsResponse
forall x. RemoveEndpointsResponse -> Rep RemoveEndpointsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RemoveEndpointsResponse x -> RemoveEndpointsResponse
$cfrom :: forall x. RemoveEndpointsResponse -> Rep RemoveEndpointsResponse x
Prelude.Generic)
newRemoveEndpointsResponse ::
RemoveEndpointsResponse
newRemoveEndpointsResponse :: RemoveEndpointsResponse
newRemoveEndpointsResponse = RemoveEndpointsResponse
RemoveEndpointsResponse'
instance Prelude.NFData RemoveEndpointsResponse where
rnf :: RemoveEndpointsResponse -> ()
rnf RemoveEndpointsResponse
_ = ()