module Network.AWS.CloudFront.SignedCookies.Types
(
Policy (..), Resource (..)
, PemFilePath (..), KeyPairId (..)
, CookiesText, SetCookie, CookieDomain (..), CookiePath (..)
, PolicyCookie (..), SignatureCookie (..)
, NominalDiffTime, POSIXTime, Lifespan (..), StartTime (..), EndTime (..)
, IpAddress (..)
, Text, ByteString
, PrivateKey
) where
import Data.ByteString (ByteString)
import Web.Cookie (CookiesText, SetCookie)
import Crypto.PubKey.RSA (PrivateKey (..))
import Data.Text (Text)
import Data.Time.Clock (NominalDiffTime)
import Data.Time.Clock.POSIX (POSIXTime)
newtype PemFilePath = PemFilePath Text
deriving (PemFilePath -> PemFilePath -> Bool
(PemFilePath -> PemFilePath -> Bool)
-> (PemFilePath -> PemFilePath -> Bool) -> Eq PemFilePath
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PemFilePath -> PemFilePath -> Bool
== :: PemFilePath -> PemFilePath -> Bool
$c/= :: PemFilePath -> PemFilePath -> Bool
/= :: PemFilePath -> PemFilePath -> Bool
Eq, Int -> PemFilePath -> ShowS
[PemFilePath] -> ShowS
PemFilePath -> String
(Int -> PemFilePath -> ShowS)
-> (PemFilePath -> String)
-> ([PemFilePath] -> ShowS)
-> Show PemFilePath
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PemFilePath -> ShowS
showsPrec :: Int -> PemFilePath -> ShowS
$cshow :: PemFilePath -> String
show :: PemFilePath -> String
$cshowList :: [PemFilePath] -> ShowS
showList :: [PemFilePath] -> ShowS
Show)
newtype KeyPairId = KeyPairId Text
deriving (KeyPairId -> KeyPairId -> Bool
(KeyPairId -> KeyPairId -> Bool)
-> (KeyPairId -> KeyPairId -> Bool) -> Eq KeyPairId
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: KeyPairId -> KeyPairId -> Bool
== :: KeyPairId -> KeyPairId -> Bool
$c/= :: KeyPairId -> KeyPairId -> Bool
/= :: KeyPairId -> KeyPairId -> Bool
Eq, Int -> KeyPairId -> ShowS
[KeyPairId] -> ShowS
KeyPairId -> String
(Int -> KeyPairId -> ShowS)
-> (KeyPairId -> String)
-> ([KeyPairId] -> ShowS)
-> Show KeyPairId
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> KeyPairId -> ShowS
showsPrec :: Int -> KeyPairId -> ShowS
$cshow :: KeyPairId -> String
show :: KeyPairId -> String
$cshowList :: [KeyPairId] -> ShowS
showList :: [KeyPairId] -> ShowS
Show)
newtype CookieDomain = CookieDomain Text
deriving (CookieDomain -> CookieDomain -> Bool
(CookieDomain -> CookieDomain -> Bool)
-> (CookieDomain -> CookieDomain -> Bool) -> Eq CookieDomain
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CookieDomain -> CookieDomain -> Bool
== :: CookieDomain -> CookieDomain -> Bool
$c/= :: CookieDomain -> CookieDomain -> Bool
/= :: CookieDomain -> CookieDomain -> Bool
Eq, Int -> CookieDomain -> ShowS
[CookieDomain] -> ShowS
CookieDomain -> String
(Int -> CookieDomain -> ShowS)
-> (CookieDomain -> String)
-> ([CookieDomain] -> ShowS)
-> Show CookieDomain
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CookieDomain -> ShowS
showsPrec :: Int -> CookieDomain -> ShowS
$cshow :: CookieDomain -> String
show :: CookieDomain -> String
$cshowList :: [CookieDomain] -> ShowS
showList :: [CookieDomain] -> ShowS
Show)
newtype CookiePath = CookiePath Text
deriving (CookiePath -> CookiePath -> Bool
(CookiePath -> CookiePath -> Bool)
-> (CookiePath -> CookiePath -> Bool) -> Eq CookiePath
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CookiePath -> CookiePath -> Bool
== :: CookiePath -> CookiePath -> Bool
$c/= :: CookiePath -> CookiePath -> Bool
/= :: CookiePath -> CookiePath -> Bool
Eq, Int -> CookiePath -> ShowS
[CookiePath] -> ShowS
CookiePath -> String
(Int -> CookiePath -> ShowS)
-> (CookiePath -> String)
-> ([CookiePath] -> ShowS)
-> Show CookiePath
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CookiePath -> ShowS
showsPrec :: Int -> CookiePath -> ShowS
$cshow :: CookiePath -> String
show :: CookiePath -> String
$cshowList :: [CookiePath] -> ShowS
showList :: [CookiePath] -> ShowS
Show)
newtype PolicyCookie = PolicyCookie Text
deriving (PolicyCookie -> PolicyCookie -> Bool
(PolicyCookie -> PolicyCookie -> Bool)
-> (PolicyCookie -> PolicyCookie -> Bool) -> Eq PolicyCookie
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PolicyCookie -> PolicyCookie -> Bool
== :: PolicyCookie -> PolicyCookie -> Bool
$c/= :: PolicyCookie -> PolicyCookie -> Bool
/= :: PolicyCookie -> PolicyCookie -> Bool
Eq, Int -> PolicyCookie -> ShowS
[PolicyCookie] -> ShowS
PolicyCookie -> String
(Int -> PolicyCookie -> ShowS)
-> (PolicyCookie -> String)
-> ([PolicyCookie] -> ShowS)
-> Show PolicyCookie
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PolicyCookie -> ShowS
showsPrec :: Int -> PolicyCookie -> ShowS
$cshow :: PolicyCookie -> String
show :: PolicyCookie -> String
$cshowList :: [PolicyCookie] -> ShowS
showList :: [PolicyCookie] -> ShowS
Show)
newtype SignatureCookie = SignatureCookie Text
deriving (SignatureCookie -> SignatureCookie -> Bool
(SignatureCookie -> SignatureCookie -> Bool)
-> (SignatureCookie -> SignatureCookie -> Bool)
-> Eq SignatureCookie
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SignatureCookie -> SignatureCookie -> Bool
== :: SignatureCookie -> SignatureCookie -> Bool
$c/= :: SignatureCookie -> SignatureCookie -> Bool
/= :: SignatureCookie -> SignatureCookie -> Bool
Eq, Int -> SignatureCookie -> ShowS
[SignatureCookie] -> ShowS
SignatureCookie -> String
(Int -> SignatureCookie -> ShowS)
-> (SignatureCookie -> String)
-> ([SignatureCookie] -> ShowS)
-> Show SignatureCookie
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SignatureCookie -> ShowS
showsPrec :: Int -> SignatureCookie -> ShowS
$cshow :: SignatureCookie -> String
show :: SignatureCookie -> String
$cshowList :: [SignatureCookie] -> ShowS
showList :: [SignatureCookie] -> ShowS
Show)
newtype Resource = Resource Text
deriving (Resource -> Resource -> Bool
(Resource -> Resource -> Bool)
-> (Resource -> Resource -> Bool) -> Eq Resource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Resource -> Resource -> Bool
== :: Resource -> Resource -> Bool
$c/= :: Resource -> Resource -> Bool
/= :: Resource -> Resource -> Bool
Eq, Int -> Resource -> ShowS
[Resource] -> ShowS
Resource -> String
(Int -> Resource -> ShowS)
-> (Resource -> String) -> ([Resource] -> ShowS) -> Show Resource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Resource -> ShowS
showsPrec :: Int -> Resource -> ShowS
$cshow :: Resource -> String
show :: Resource -> String
$cshowList :: [Resource] -> ShowS
showList :: [Resource] -> ShowS
Show)
newtype Lifespan = Lifespan NominalDiffTime
deriving (Lifespan -> Lifespan -> Bool
(Lifespan -> Lifespan -> Bool)
-> (Lifespan -> Lifespan -> Bool) -> Eq Lifespan
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Lifespan -> Lifespan -> Bool
== :: Lifespan -> Lifespan -> Bool
$c/= :: Lifespan -> Lifespan -> Bool
/= :: Lifespan -> Lifespan -> Bool
Eq, Int -> Lifespan -> ShowS
[Lifespan] -> ShowS
Lifespan -> String
(Int -> Lifespan -> ShowS)
-> (Lifespan -> String) -> ([Lifespan] -> ShowS) -> Show Lifespan
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Lifespan -> ShowS
showsPrec :: Int -> Lifespan -> ShowS
$cshow :: Lifespan -> String
show :: Lifespan -> String
$cshowList :: [Lifespan] -> ShowS
showList :: [Lifespan] -> ShowS
Show)
data StartTime = StartImmediately | StartTime POSIXTime
deriving (StartTime -> StartTime -> Bool
(StartTime -> StartTime -> Bool)
-> (StartTime -> StartTime -> Bool) -> Eq StartTime
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: StartTime -> StartTime -> Bool
== :: StartTime -> StartTime -> Bool
$c/= :: StartTime -> StartTime -> Bool
/= :: StartTime -> StartTime -> Bool
Eq, Int -> StartTime -> ShowS
[StartTime] -> ShowS
StartTime -> String
(Int -> StartTime -> ShowS)
-> (StartTime -> String)
-> ([StartTime] -> ShowS)
-> Show StartTime
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> StartTime -> ShowS
showsPrec :: Int -> StartTime -> ShowS
$cshow :: StartTime -> String
show :: StartTime -> String
$cshowList :: [StartTime] -> ShowS
showList :: [StartTime] -> ShowS
Show)
newtype EndTime = EndTime POSIXTime
deriving (EndTime -> EndTime -> Bool
(EndTime -> EndTime -> Bool)
-> (EndTime -> EndTime -> Bool) -> Eq EndTime
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EndTime -> EndTime -> Bool
== :: EndTime -> EndTime -> Bool
$c/= :: EndTime -> EndTime -> Bool
/= :: EndTime -> EndTime -> Bool
Eq, Int -> EndTime -> ShowS
[EndTime] -> ShowS
EndTime -> String
(Int -> EndTime -> ShowS)
-> (EndTime -> String) -> ([EndTime] -> ShowS) -> Show EndTime
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EndTime -> ShowS
showsPrec :: Int -> EndTime -> ShowS
$cshow :: EndTime -> String
show :: EndTime -> String
$cshowList :: [EndTime] -> ShowS
showList :: [EndTime] -> ShowS
Show)
data IpAddress = AnyIp | IpAddress Text
deriving (IpAddress -> IpAddress -> Bool
(IpAddress -> IpAddress -> Bool)
-> (IpAddress -> IpAddress -> Bool) -> Eq IpAddress
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IpAddress -> IpAddress -> Bool
== :: IpAddress -> IpAddress -> Bool
$c/= :: IpAddress -> IpAddress -> Bool
/= :: IpAddress -> IpAddress -> Bool
Eq, Int -> IpAddress -> ShowS
[IpAddress] -> ShowS
IpAddress -> String
(Int -> IpAddress -> ShowS)
-> (IpAddress -> String)
-> ([IpAddress] -> ShowS)
-> Show IpAddress
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IpAddress -> ShowS
showsPrec :: Int -> IpAddress -> ShowS
$cshow :: IpAddress -> String
show :: IpAddress -> String
$cshowList :: [IpAddress] -> ShowS
showList :: [IpAddress] -> ShowS
Show)
data Policy =
Policy
{ Policy -> Resource
policyResource :: Resource
, Policy -> StartTime
policyStart :: StartTime
, Policy -> EndTime
policyEnd :: EndTime
, Policy -> IpAddress
policyIpAddress :: IpAddress
}
deriving (Policy -> Policy -> Bool
(Policy -> Policy -> Bool)
-> (Policy -> Policy -> Bool) -> Eq Policy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Policy -> Policy -> Bool
== :: Policy -> Policy -> Bool
$c/= :: Policy -> Policy -> Bool
/= :: Policy -> Policy -> Bool
Eq, Int -> Policy -> ShowS
[Policy] -> ShowS
Policy -> String
(Int -> Policy -> ShowS)
-> (Policy -> String) -> ([Policy] -> ShowS) -> Show Policy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Policy -> ShowS
showsPrec :: Int -> Policy -> ShowS
$cshow :: Policy -> String
show :: Policy -> String
$cshowList :: [Policy] -> ShowS
showList :: [Policy] -> ShowS
Show)