{-# 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.Signer.RevokeSigningProfile
(
RevokeSigningProfile (..),
newRevokeSigningProfile,
revokeSigningProfile_profileVersion,
revokeSigningProfile_reason,
revokeSigningProfile_effectiveTime,
revokeSigningProfile_profileName,
RevokeSigningProfileResponse (..),
newRevokeSigningProfileResponse,
)
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.Signer.Types
data RevokeSigningProfile = RevokeSigningProfile'
{
RevokeSigningProfile -> Text
profileVersion :: Prelude.Text,
RevokeSigningProfile -> Text
reason :: Prelude.Text,
RevokeSigningProfile -> POSIX
effectiveTime :: Core.POSIX,
RevokeSigningProfile -> Text
profileName :: Prelude.Text
}
deriving (RevokeSigningProfile -> RevokeSigningProfile -> Bool
(RevokeSigningProfile -> RevokeSigningProfile -> Bool)
-> (RevokeSigningProfile -> RevokeSigningProfile -> Bool)
-> Eq RevokeSigningProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RevokeSigningProfile -> RevokeSigningProfile -> Bool
$c/= :: RevokeSigningProfile -> RevokeSigningProfile -> Bool
== :: RevokeSigningProfile -> RevokeSigningProfile -> Bool
$c== :: RevokeSigningProfile -> RevokeSigningProfile -> Bool
Prelude.Eq, ReadPrec [RevokeSigningProfile]
ReadPrec RevokeSigningProfile
Int -> ReadS RevokeSigningProfile
ReadS [RevokeSigningProfile]
(Int -> ReadS RevokeSigningProfile)
-> ReadS [RevokeSigningProfile]
-> ReadPrec RevokeSigningProfile
-> ReadPrec [RevokeSigningProfile]
-> Read RevokeSigningProfile
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RevokeSigningProfile]
$creadListPrec :: ReadPrec [RevokeSigningProfile]
readPrec :: ReadPrec RevokeSigningProfile
$creadPrec :: ReadPrec RevokeSigningProfile
readList :: ReadS [RevokeSigningProfile]
$creadList :: ReadS [RevokeSigningProfile]
readsPrec :: Int -> ReadS RevokeSigningProfile
$creadsPrec :: Int -> ReadS RevokeSigningProfile
Prelude.Read, Int -> RevokeSigningProfile -> ShowS
[RevokeSigningProfile] -> ShowS
RevokeSigningProfile -> String
(Int -> RevokeSigningProfile -> ShowS)
-> (RevokeSigningProfile -> String)
-> ([RevokeSigningProfile] -> ShowS)
-> Show RevokeSigningProfile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RevokeSigningProfile] -> ShowS
$cshowList :: [RevokeSigningProfile] -> ShowS
show :: RevokeSigningProfile -> String
$cshow :: RevokeSigningProfile -> String
showsPrec :: Int -> RevokeSigningProfile -> ShowS
$cshowsPrec :: Int -> RevokeSigningProfile -> ShowS
Prelude.Show, (forall x. RevokeSigningProfile -> Rep RevokeSigningProfile x)
-> (forall x. Rep RevokeSigningProfile x -> RevokeSigningProfile)
-> Generic RevokeSigningProfile
forall x. Rep RevokeSigningProfile x -> RevokeSigningProfile
forall x. RevokeSigningProfile -> Rep RevokeSigningProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RevokeSigningProfile x -> RevokeSigningProfile
$cfrom :: forall x. RevokeSigningProfile -> Rep RevokeSigningProfile x
Prelude.Generic)
newRevokeSigningProfile ::
Prelude.Text ->
Prelude.Text ->
Prelude.UTCTime ->
Prelude.Text ->
RevokeSigningProfile
newRevokeSigningProfile :: Text -> Text -> UTCTime -> Text -> RevokeSigningProfile
newRevokeSigningProfile
Text
pProfileVersion_
Text
pReason_
UTCTime
pEffectiveTime_
Text
pProfileName_ =
RevokeSigningProfile' :: Text -> Text -> POSIX -> Text -> RevokeSigningProfile
RevokeSigningProfile'
{ $sel:profileVersion:RevokeSigningProfile' :: Text
profileVersion =
Text
pProfileVersion_,
$sel:reason:RevokeSigningProfile' :: Text
reason = Text
pReason_,
$sel:effectiveTime:RevokeSigningProfile' :: POSIX
effectiveTime = Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
-> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pEffectiveTime_,
$sel:profileName:RevokeSigningProfile' :: Text
profileName = Text
pProfileName_
}
revokeSigningProfile_profileVersion :: Lens.Lens' RevokeSigningProfile Prelude.Text
revokeSigningProfile_profileVersion :: (Text -> f Text) -> RevokeSigningProfile -> f RevokeSigningProfile
revokeSigningProfile_profileVersion = (RevokeSigningProfile -> Text)
-> (RevokeSigningProfile -> Text -> RevokeSigningProfile)
-> Lens RevokeSigningProfile RevokeSigningProfile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeSigningProfile' {Text
profileVersion :: Text
$sel:profileVersion:RevokeSigningProfile' :: RevokeSigningProfile -> Text
profileVersion} -> Text
profileVersion) (\s :: RevokeSigningProfile
s@RevokeSigningProfile' {} Text
a -> RevokeSigningProfile
s {$sel:profileVersion:RevokeSigningProfile' :: Text
profileVersion = Text
a} :: RevokeSigningProfile)
revokeSigningProfile_reason :: Lens.Lens' RevokeSigningProfile Prelude.Text
revokeSigningProfile_reason :: (Text -> f Text) -> RevokeSigningProfile -> f RevokeSigningProfile
revokeSigningProfile_reason = (RevokeSigningProfile -> Text)
-> (RevokeSigningProfile -> Text -> RevokeSigningProfile)
-> Lens RevokeSigningProfile RevokeSigningProfile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeSigningProfile' {Text
reason :: Text
$sel:reason:RevokeSigningProfile' :: RevokeSigningProfile -> Text
reason} -> Text
reason) (\s :: RevokeSigningProfile
s@RevokeSigningProfile' {} Text
a -> RevokeSigningProfile
s {$sel:reason:RevokeSigningProfile' :: Text
reason = Text
a} :: RevokeSigningProfile)
revokeSigningProfile_effectiveTime :: Lens.Lens' RevokeSigningProfile Prelude.UTCTime
revokeSigningProfile_effectiveTime :: (UTCTime -> f UTCTime)
-> RevokeSigningProfile -> f RevokeSigningProfile
revokeSigningProfile_effectiveTime = (RevokeSigningProfile -> POSIX)
-> (RevokeSigningProfile -> POSIX -> RevokeSigningProfile)
-> Lens RevokeSigningProfile RevokeSigningProfile POSIX POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeSigningProfile' {POSIX
effectiveTime :: POSIX
$sel:effectiveTime:RevokeSigningProfile' :: RevokeSigningProfile -> POSIX
effectiveTime} -> POSIX
effectiveTime) (\s :: RevokeSigningProfile
s@RevokeSigningProfile' {} POSIX
a -> RevokeSigningProfile
s {$sel:effectiveTime:RevokeSigningProfile' :: POSIX
effectiveTime = POSIX
a} :: RevokeSigningProfile) ((POSIX -> f POSIX)
-> RevokeSigningProfile -> f RevokeSigningProfile)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> RevokeSigningProfile
-> f RevokeSigningProfile
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
revokeSigningProfile_profileName :: Lens.Lens' RevokeSigningProfile Prelude.Text
revokeSigningProfile_profileName :: (Text -> f Text) -> RevokeSigningProfile -> f RevokeSigningProfile
revokeSigningProfile_profileName = (RevokeSigningProfile -> Text)
-> (RevokeSigningProfile -> Text -> RevokeSigningProfile)
-> Lens RevokeSigningProfile RevokeSigningProfile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeSigningProfile' {Text
profileName :: Text
$sel:profileName:RevokeSigningProfile' :: RevokeSigningProfile -> Text
profileName} -> Text
profileName) (\s :: RevokeSigningProfile
s@RevokeSigningProfile' {} Text
a -> RevokeSigningProfile
s {$sel:profileName:RevokeSigningProfile' :: Text
profileName = Text
a} :: RevokeSigningProfile)
instance Core.AWSRequest RevokeSigningProfile where
type
AWSResponse RevokeSigningProfile =
RevokeSigningProfileResponse
request :: RevokeSigningProfile -> Request RevokeSigningProfile
request = Service -> RevokeSigningProfile -> Request RevokeSigningProfile
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
response :: Logger
-> Service
-> Proxy RevokeSigningProfile
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse RevokeSigningProfile)))
response =
AWSResponse RevokeSigningProfile
-> Logger
-> Service
-> Proxy RevokeSigningProfile
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse RevokeSigningProfile)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse RevokeSigningProfile
RevokeSigningProfileResponse
RevokeSigningProfileResponse'
instance Prelude.Hashable RevokeSigningProfile
instance Prelude.NFData RevokeSigningProfile
instance Core.ToHeaders RevokeSigningProfile where
toHeaders :: RevokeSigningProfile -> [Header]
toHeaders =
[Header] -> RevokeSigningProfile -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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 RevokeSigningProfile where
toJSON :: RevokeSigningProfile -> Value
toJSON RevokeSigningProfile' {Text
POSIX
profileName :: Text
effectiveTime :: POSIX
reason :: Text
profileVersion :: Text
$sel:profileName:RevokeSigningProfile' :: RevokeSigningProfile -> Text
$sel:effectiveTime:RevokeSigningProfile' :: RevokeSigningProfile -> POSIX
$sel:reason:RevokeSigningProfile' :: RevokeSigningProfile -> Text
$sel:profileVersion:RevokeSigningProfile' :: RevokeSigningProfile -> 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
"profileVersion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
profileVersion),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"reason" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
reason),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"effectiveTime" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= POSIX
effectiveTime)
]
)
instance Core.ToPath RevokeSigningProfile where
toPath :: RevokeSigningProfile -> ByteString
toPath RevokeSigningProfile' {Text
POSIX
profileName :: Text
effectiveTime :: POSIX
reason :: Text
profileVersion :: Text
$sel:profileName:RevokeSigningProfile' :: RevokeSigningProfile -> Text
$sel:effectiveTime:RevokeSigningProfile' :: RevokeSigningProfile -> POSIX
$sel:reason:RevokeSigningProfile' :: RevokeSigningProfile -> Text
$sel:profileVersion:RevokeSigningProfile' :: RevokeSigningProfile -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/signing-profiles/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
profileName,
ByteString
"/revoke"
]
instance Core.ToQuery RevokeSigningProfile where
toQuery :: RevokeSigningProfile -> QueryString
toQuery = QueryString -> RevokeSigningProfile -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data RevokeSigningProfileResponse = RevokeSigningProfileResponse'
{
}
deriving (RevokeSigningProfileResponse
-> RevokeSigningProfileResponse -> Bool
(RevokeSigningProfileResponse
-> RevokeSigningProfileResponse -> Bool)
-> (RevokeSigningProfileResponse
-> RevokeSigningProfileResponse -> Bool)
-> Eq RevokeSigningProfileResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RevokeSigningProfileResponse
-> RevokeSigningProfileResponse -> Bool
$c/= :: RevokeSigningProfileResponse
-> RevokeSigningProfileResponse -> Bool
== :: RevokeSigningProfileResponse
-> RevokeSigningProfileResponse -> Bool
$c== :: RevokeSigningProfileResponse
-> RevokeSigningProfileResponse -> Bool
Prelude.Eq, ReadPrec [RevokeSigningProfileResponse]
ReadPrec RevokeSigningProfileResponse
Int -> ReadS RevokeSigningProfileResponse
ReadS [RevokeSigningProfileResponse]
(Int -> ReadS RevokeSigningProfileResponse)
-> ReadS [RevokeSigningProfileResponse]
-> ReadPrec RevokeSigningProfileResponse
-> ReadPrec [RevokeSigningProfileResponse]
-> Read RevokeSigningProfileResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RevokeSigningProfileResponse]
$creadListPrec :: ReadPrec [RevokeSigningProfileResponse]
readPrec :: ReadPrec RevokeSigningProfileResponse
$creadPrec :: ReadPrec RevokeSigningProfileResponse
readList :: ReadS [RevokeSigningProfileResponse]
$creadList :: ReadS [RevokeSigningProfileResponse]
readsPrec :: Int -> ReadS RevokeSigningProfileResponse
$creadsPrec :: Int -> ReadS RevokeSigningProfileResponse
Prelude.Read, Int -> RevokeSigningProfileResponse -> ShowS
[RevokeSigningProfileResponse] -> ShowS
RevokeSigningProfileResponse -> String
(Int -> RevokeSigningProfileResponse -> ShowS)
-> (RevokeSigningProfileResponse -> String)
-> ([RevokeSigningProfileResponse] -> ShowS)
-> Show RevokeSigningProfileResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RevokeSigningProfileResponse] -> ShowS
$cshowList :: [RevokeSigningProfileResponse] -> ShowS
show :: RevokeSigningProfileResponse -> String
$cshow :: RevokeSigningProfileResponse -> String
showsPrec :: Int -> RevokeSigningProfileResponse -> ShowS
$cshowsPrec :: Int -> RevokeSigningProfileResponse -> ShowS
Prelude.Show, (forall x.
RevokeSigningProfileResponse -> Rep RevokeSigningProfileResponse x)
-> (forall x.
Rep RevokeSigningProfileResponse x -> RevokeSigningProfileResponse)
-> Generic RevokeSigningProfileResponse
forall x.
Rep RevokeSigningProfileResponse x -> RevokeSigningProfileResponse
forall x.
RevokeSigningProfileResponse -> Rep RevokeSigningProfileResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RevokeSigningProfileResponse x -> RevokeSigningProfileResponse
$cfrom :: forall x.
RevokeSigningProfileResponse -> Rep RevokeSigningProfileResponse x
Prelude.Generic)
newRevokeSigningProfileResponse ::
RevokeSigningProfileResponse
newRevokeSigningProfileResponse :: RevokeSigningProfileResponse
newRevokeSigningProfileResponse =
RevokeSigningProfileResponse
RevokeSigningProfileResponse'
instance Prelude.NFData RevokeSigningProfileResponse