{-# 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.SSMIncidents.GetReplicationSet
(
GetReplicationSet (..),
newGetReplicationSet,
getReplicationSet_arn,
GetReplicationSetResponse (..),
newGetReplicationSetResponse,
getReplicationSetResponse_httpStatus,
getReplicationSetResponse_replicationSet,
)
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 qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SSMIncidents.Types
data GetReplicationSet = GetReplicationSet'
{
GetReplicationSet -> Text
arn :: Prelude.Text
}
deriving (GetReplicationSet -> GetReplicationSet -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetReplicationSet -> GetReplicationSet -> Bool
$c/= :: GetReplicationSet -> GetReplicationSet -> Bool
== :: GetReplicationSet -> GetReplicationSet -> Bool
$c== :: GetReplicationSet -> GetReplicationSet -> Bool
Prelude.Eq, ReadPrec [GetReplicationSet]
ReadPrec GetReplicationSet
Int -> ReadS GetReplicationSet
ReadS [GetReplicationSet]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetReplicationSet]
$creadListPrec :: ReadPrec [GetReplicationSet]
readPrec :: ReadPrec GetReplicationSet
$creadPrec :: ReadPrec GetReplicationSet
readList :: ReadS [GetReplicationSet]
$creadList :: ReadS [GetReplicationSet]
readsPrec :: Int -> ReadS GetReplicationSet
$creadsPrec :: Int -> ReadS GetReplicationSet
Prelude.Read, Int -> GetReplicationSet -> ShowS
[GetReplicationSet] -> ShowS
GetReplicationSet -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetReplicationSet] -> ShowS
$cshowList :: [GetReplicationSet] -> ShowS
show :: GetReplicationSet -> String
$cshow :: GetReplicationSet -> String
showsPrec :: Int -> GetReplicationSet -> ShowS
$cshowsPrec :: Int -> GetReplicationSet -> ShowS
Prelude.Show, forall x. Rep GetReplicationSet x -> GetReplicationSet
forall x. GetReplicationSet -> Rep GetReplicationSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetReplicationSet x -> GetReplicationSet
$cfrom :: forall x. GetReplicationSet -> Rep GetReplicationSet x
Prelude.Generic)
newGetReplicationSet ::
Prelude.Text ->
GetReplicationSet
newGetReplicationSet :: Text -> GetReplicationSet
newGetReplicationSet Text
pArn_ =
GetReplicationSet' {$sel:arn:GetReplicationSet' :: Text
arn = Text
pArn_}
getReplicationSet_arn :: Lens.Lens' GetReplicationSet Prelude.Text
getReplicationSet_arn :: Lens' GetReplicationSet Text
getReplicationSet_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetReplicationSet' {Text
arn :: Text
$sel:arn:GetReplicationSet' :: GetReplicationSet -> Text
arn} -> Text
arn) (\s :: GetReplicationSet
s@GetReplicationSet' {} Text
a -> GetReplicationSet
s {$sel:arn:GetReplicationSet' :: Text
arn = Text
a} :: GetReplicationSet)
instance Core.AWSRequest GetReplicationSet where
type
AWSResponse GetReplicationSet =
GetReplicationSetResponse
request :: (Service -> Service)
-> GetReplicationSet -> Request GetReplicationSet
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetReplicationSet
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetReplicationSet)))
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 ->
Int -> ReplicationSet -> GetReplicationSetResponse
GetReplicationSetResponse'
forall (f :: * -> *) a b. Functor 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))
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"replicationSet")
)
instance Prelude.Hashable GetReplicationSet where
hashWithSalt :: Int -> GetReplicationSet -> Int
hashWithSalt Int
_salt GetReplicationSet' {Text
arn :: Text
$sel:arn:GetReplicationSet' :: GetReplicationSet -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
instance Prelude.NFData GetReplicationSet where
rnf :: GetReplicationSet -> ()
rnf GetReplicationSet' {Text
arn :: Text
$sel:arn:GetReplicationSet' :: GetReplicationSet -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
arn
instance Data.ToHeaders GetReplicationSet where
toHeaders :: GetReplicationSet -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToPath GetReplicationSet where
toPath :: GetReplicationSet -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/getReplicationSet"
instance Data.ToQuery GetReplicationSet where
toQuery :: GetReplicationSet -> QueryString
toQuery GetReplicationSet' {Text
arn :: Text
$sel:arn:GetReplicationSet' :: GetReplicationSet -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"arn" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
arn]
data GetReplicationSetResponse = GetReplicationSetResponse'
{
GetReplicationSetResponse -> Int
httpStatus :: Prelude.Int,
GetReplicationSetResponse -> ReplicationSet
replicationSet :: ReplicationSet
}
deriving (GetReplicationSetResponse -> GetReplicationSetResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetReplicationSetResponse -> GetReplicationSetResponse -> Bool
$c/= :: GetReplicationSetResponse -> GetReplicationSetResponse -> Bool
== :: GetReplicationSetResponse -> GetReplicationSetResponse -> Bool
$c== :: GetReplicationSetResponse -> GetReplicationSetResponse -> Bool
Prelude.Eq, ReadPrec [GetReplicationSetResponse]
ReadPrec GetReplicationSetResponse
Int -> ReadS GetReplicationSetResponse
ReadS [GetReplicationSetResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetReplicationSetResponse]
$creadListPrec :: ReadPrec [GetReplicationSetResponse]
readPrec :: ReadPrec GetReplicationSetResponse
$creadPrec :: ReadPrec GetReplicationSetResponse
readList :: ReadS [GetReplicationSetResponse]
$creadList :: ReadS [GetReplicationSetResponse]
readsPrec :: Int -> ReadS GetReplicationSetResponse
$creadsPrec :: Int -> ReadS GetReplicationSetResponse
Prelude.Read, Int -> GetReplicationSetResponse -> ShowS
[GetReplicationSetResponse] -> ShowS
GetReplicationSetResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetReplicationSetResponse] -> ShowS
$cshowList :: [GetReplicationSetResponse] -> ShowS
show :: GetReplicationSetResponse -> String
$cshow :: GetReplicationSetResponse -> String
showsPrec :: Int -> GetReplicationSetResponse -> ShowS
$cshowsPrec :: Int -> GetReplicationSetResponse -> ShowS
Prelude.Show, forall x.
Rep GetReplicationSetResponse x -> GetReplicationSetResponse
forall x.
GetReplicationSetResponse -> Rep GetReplicationSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetReplicationSetResponse x -> GetReplicationSetResponse
$cfrom :: forall x.
GetReplicationSetResponse -> Rep GetReplicationSetResponse x
Prelude.Generic)
newGetReplicationSetResponse ::
Prelude.Int ->
ReplicationSet ->
GetReplicationSetResponse
newGetReplicationSetResponse :: Int -> ReplicationSet -> GetReplicationSetResponse
newGetReplicationSetResponse
Int
pHttpStatus_
ReplicationSet
pReplicationSet_ =
GetReplicationSetResponse'
{ $sel:httpStatus:GetReplicationSetResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:replicationSet:GetReplicationSetResponse' :: ReplicationSet
replicationSet = ReplicationSet
pReplicationSet_
}
getReplicationSetResponse_httpStatus :: Lens.Lens' GetReplicationSetResponse Prelude.Int
getReplicationSetResponse_httpStatus :: Lens' GetReplicationSetResponse Int
getReplicationSetResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetReplicationSetResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetReplicationSetResponse' :: GetReplicationSetResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetReplicationSetResponse
s@GetReplicationSetResponse' {} Int
a -> GetReplicationSetResponse
s {$sel:httpStatus:GetReplicationSetResponse' :: Int
httpStatus = Int
a} :: GetReplicationSetResponse)
getReplicationSetResponse_replicationSet :: Lens.Lens' GetReplicationSetResponse ReplicationSet
getReplicationSetResponse_replicationSet :: Lens' GetReplicationSetResponse ReplicationSet
getReplicationSetResponse_replicationSet = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetReplicationSetResponse' {ReplicationSet
replicationSet :: ReplicationSet
$sel:replicationSet:GetReplicationSetResponse' :: GetReplicationSetResponse -> ReplicationSet
replicationSet} -> ReplicationSet
replicationSet) (\s :: GetReplicationSetResponse
s@GetReplicationSetResponse' {} ReplicationSet
a -> GetReplicationSetResponse
s {$sel:replicationSet:GetReplicationSetResponse' :: ReplicationSet
replicationSet = ReplicationSet
a} :: GetReplicationSetResponse)
instance Prelude.NFData GetReplicationSetResponse where
rnf :: GetReplicationSetResponse -> ()
rnf GetReplicationSetResponse' {Int
ReplicationSet
replicationSet :: ReplicationSet
httpStatus :: Int
$sel:replicationSet:GetReplicationSetResponse' :: GetReplicationSetResponse -> ReplicationSet
$sel:httpStatus:GetReplicationSetResponse' :: GetReplicationSetResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ReplicationSet
replicationSet