{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Signer.Types.SigningImageFormat 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 Amazonka.Signer.Types.ImageFormat
data SigningImageFormat = SigningImageFormat'
{
SigningImageFormat -> [ImageFormat]
supportedFormats :: [ImageFormat],
SigningImageFormat -> ImageFormat
defaultFormat :: ImageFormat
}
deriving (SigningImageFormat -> SigningImageFormat -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SigningImageFormat -> SigningImageFormat -> Bool
$c/= :: SigningImageFormat -> SigningImageFormat -> Bool
== :: SigningImageFormat -> SigningImageFormat -> Bool
$c== :: SigningImageFormat -> SigningImageFormat -> Bool
Prelude.Eq, ReadPrec [SigningImageFormat]
ReadPrec SigningImageFormat
Int -> ReadS SigningImageFormat
ReadS [SigningImageFormat]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SigningImageFormat]
$creadListPrec :: ReadPrec [SigningImageFormat]
readPrec :: ReadPrec SigningImageFormat
$creadPrec :: ReadPrec SigningImageFormat
readList :: ReadS [SigningImageFormat]
$creadList :: ReadS [SigningImageFormat]
readsPrec :: Int -> ReadS SigningImageFormat
$creadsPrec :: Int -> ReadS SigningImageFormat
Prelude.Read, Int -> SigningImageFormat -> ShowS
[SigningImageFormat] -> ShowS
SigningImageFormat -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SigningImageFormat] -> ShowS
$cshowList :: [SigningImageFormat] -> ShowS
show :: SigningImageFormat -> String
$cshow :: SigningImageFormat -> String
showsPrec :: Int -> SigningImageFormat -> ShowS
$cshowsPrec :: Int -> SigningImageFormat -> ShowS
Prelude.Show, forall x. Rep SigningImageFormat x -> SigningImageFormat
forall x. SigningImageFormat -> Rep SigningImageFormat x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SigningImageFormat x -> SigningImageFormat
$cfrom :: forall x. SigningImageFormat -> Rep SigningImageFormat x
Prelude.Generic)
newSigningImageFormat ::
ImageFormat ->
SigningImageFormat
newSigningImageFormat :: ImageFormat -> SigningImageFormat
newSigningImageFormat ImageFormat
pDefaultFormat_ =
SigningImageFormat'
{ $sel:supportedFormats:SigningImageFormat' :: [ImageFormat]
supportedFormats =
forall a. Monoid a => a
Prelude.mempty,
$sel:defaultFormat:SigningImageFormat' :: ImageFormat
defaultFormat = ImageFormat
pDefaultFormat_
}
signingImageFormat_supportedFormats :: Lens.Lens' SigningImageFormat [ImageFormat]
signingImageFormat_supportedFormats :: Lens' SigningImageFormat [ImageFormat]
signingImageFormat_supportedFormats = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningImageFormat' {[ImageFormat]
supportedFormats :: [ImageFormat]
$sel:supportedFormats:SigningImageFormat' :: SigningImageFormat -> [ImageFormat]
supportedFormats} -> [ImageFormat]
supportedFormats) (\s :: SigningImageFormat
s@SigningImageFormat' {} [ImageFormat]
a -> SigningImageFormat
s {$sel:supportedFormats:SigningImageFormat' :: [ImageFormat]
supportedFormats = [ImageFormat]
a} :: SigningImageFormat) 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
signingImageFormat_defaultFormat :: Lens.Lens' SigningImageFormat ImageFormat
signingImageFormat_defaultFormat :: Lens' SigningImageFormat ImageFormat
signingImageFormat_defaultFormat = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SigningImageFormat' {ImageFormat
defaultFormat :: ImageFormat
$sel:defaultFormat:SigningImageFormat' :: SigningImageFormat -> ImageFormat
defaultFormat} -> ImageFormat
defaultFormat) (\s :: SigningImageFormat
s@SigningImageFormat' {} ImageFormat
a -> SigningImageFormat
s {$sel:defaultFormat:SigningImageFormat' :: ImageFormat
defaultFormat = ImageFormat
a} :: SigningImageFormat)
instance Data.FromJSON SigningImageFormat where
parseJSON :: Value -> Parser SigningImageFormat
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"SigningImageFormat"
( \Object
x ->
[ImageFormat] -> ImageFormat -> SigningImageFormat
SigningImageFormat'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"supportedFormats"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"defaultFormat")
)
instance Prelude.Hashable SigningImageFormat where
hashWithSalt :: Int -> SigningImageFormat -> Int
hashWithSalt Int
_salt SigningImageFormat' {[ImageFormat]
ImageFormat
defaultFormat :: ImageFormat
supportedFormats :: [ImageFormat]
$sel:defaultFormat:SigningImageFormat' :: SigningImageFormat -> ImageFormat
$sel:supportedFormats:SigningImageFormat' :: SigningImageFormat -> [ImageFormat]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [ImageFormat]
supportedFormats
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ImageFormat
defaultFormat
instance Prelude.NFData SigningImageFormat where
rnf :: SigningImageFormat -> ()
rnf SigningImageFormat' {[ImageFormat]
ImageFormat
defaultFormat :: ImageFormat
supportedFormats :: [ImageFormat]
$sel:defaultFormat:SigningImageFormat' :: SigningImageFormat -> ImageFormat
$sel:supportedFormats:SigningImageFormat' :: SigningImageFormat -> [ImageFormat]
..} =
forall a. NFData a => a -> ()
Prelude.rnf [ImageFormat]
supportedFormats
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ImageFormat
defaultFormat