{-# 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.Mobile.Types.BundleDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Mobile.Types.Platform
import qualified Amazonka.Prelude as Prelude
data BundleDetails = BundleDetails'
{ BundleDetails -> Maybe [Platform]
availablePlatforms :: Prelude.Maybe [Platform],
BundleDetails -> Maybe Text
bundleId :: Prelude.Maybe Prelude.Text,
BundleDetails -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
BundleDetails -> Maybe Text
iconUrl :: Prelude.Maybe Prelude.Text,
BundleDetails -> Maybe Text
title :: Prelude.Maybe Prelude.Text,
BundleDetails -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (BundleDetails -> BundleDetails -> Bool
(BundleDetails -> BundleDetails -> Bool)
-> (BundleDetails -> BundleDetails -> Bool) -> Eq BundleDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BundleDetails -> BundleDetails -> Bool
$c/= :: BundleDetails -> BundleDetails -> Bool
== :: BundleDetails -> BundleDetails -> Bool
$c== :: BundleDetails -> BundleDetails -> Bool
Prelude.Eq, ReadPrec [BundleDetails]
ReadPrec BundleDetails
Int -> ReadS BundleDetails
ReadS [BundleDetails]
(Int -> ReadS BundleDetails)
-> ReadS [BundleDetails]
-> ReadPrec BundleDetails
-> ReadPrec [BundleDetails]
-> Read BundleDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BundleDetails]
$creadListPrec :: ReadPrec [BundleDetails]
readPrec :: ReadPrec BundleDetails
$creadPrec :: ReadPrec BundleDetails
readList :: ReadS [BundleDetails]
$creadList :: ReadS [BundleDetails]
readsPrec :: Int -> ReadS BundleDetails
$creadsPrec :: Int -> ReadS BundleDetails
Prelude.Read, Int -> BundleDetails -> ShowS
[BundleDetails] -> ShowS
BundleDetails -> String
(Int -> BundleDetails -> ShowS)
-> (BundleDetails -> String)
-> ([BundleDetails] -> ShowS)
-> Show BundleDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BundleDetails] -> ShowS
$cshowList :: [BundleDetails] -> ShowS
show :: BundleDetails -> String
$cshow :: BundleDetails -> String
showsPrec :: Int -> BundleDetails -> ShowS
$cshowsPrec :: Int -> BundleDetails -> ShowS
Prelude.Show, (forall x. BundleDetails -> Rep BundleDetails x)
-> (forall x. Rep BundleDetails x -> BundleDetails)
-> Generic BundleDetails
forall x. Rep BundleDetails x -> BundleDetails
forall x. BundleDetails -> Rep BundleDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BundleDetails x -> BundleDetails
$cfrom :: forall x. BundleDetails -> Rep BundleDetails x
Prelude.Generic)
newBundleDetails ::
BundleDetails
newBundleDetails :: BundleDetails
newBundleDetails =
BundleDetails' :: Maybe [Platform]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> BundleDetails
BundleDetails'
{ $sel:availablePlatforms:BundleDetails' :: Maybe [Platform]
availablePlatforms =
Maybe [Platform]
forall a. Maybe a
Prelude.Nothing,
$sel:bundleId:BundleDetails' :: Maybe Text
bundleId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:version:BundleDetails' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:iconUrl:BundleDetails' :: Maybe Text
iconUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:title:BundleDetails' :: Maybe Text
title = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:BundleDetails' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
bundleDetails_availablePlatforms :: Lens.Lens' BundleDetails (Prelude.Maybe [Platform])
bundleDetails_availablePlatforms :: (Maybe [Platform] -> f (Maybe [Platform]))
-> BundleDetails -> f BundleDetails
bundleDetails_availablePlatforms = (BundleDetails -> Maybe [Platform])
-> (BundleDetails -> Maybe [Platform] -> BundleDetails)
-> Lens
BundleDetails BundleDetails (Maybe [Platform]) (Maybe [Platform])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BundleDetails' {Maybe [Platform]
availablePlatforms :: Maybe [Platform]
$sel:availablePlatforms:BundleDetails' :: BundleDetails -> Maybe [Platform]
availablePlatforms} -> Maybe [Platform]
availablePlatforms) (\s :: BundleDetails
s@BundleDetails' {} Maybe [Platform]
a -> BundleDetails
s {$sel:availablePlatforms:BundleDetails' :: Maybe [Platform]
availablePlatforms = Maybe [Platform]
a} :: BundleDetails) ((Maybe [Platform] -> f (Maybe [Platform]))
-> BundleDetails -> f BundleDetails)
-> ((Maybe [Platform] -> f (Maybe [Platform]))
-> Maybe [Platform] -> f (Maybe [Platform]))
-> (Maybe [Platform] -> f (Maybe [Platform]))
-> BundleDetails
-> f BundleDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Platform] [Platform] [Platform] [Platform]
-> Iso
(Maybe [Platform])
(Maybe [Platform])
(Maybe [Platform])
(Maybe [Platform])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Platform] [Platform] [Platform] [Platform]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
bundleDetails_bundleId :: Lens.Lens' BundleDetails (Prelude.Maybe Prelude.Text)
bundleDetails_bundleId :: (Maybe Text -> f (Maybe Text)) -> BundleDetails -> f BundleDetails
bundleDetails_bundleId = (BundleDetails -> Maybe Text)
-> (BundleDetails -> Maybe Text -> BundleDetails)
-> Lens BundleDetails BundleDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BundleDetails' {Maybe Text
bundleId :: Maybe Text
$sel:bundleId:BundleDetails' :: BundleDetails -> Maybe Text
bundleId} -> Maybe Text
bundleId) (\s :: BundleDetails
s@BundleDetails' {} Maybe Text
a -> BundleDetails
s {$sel:bundleId:BundleDetails' :: Maybe Text
bundleId = Maybe Text
a} :: BundleDetails)
bundleDetails_version :: Lens.Lens' BundleDetails (Prelude.Maybe Prelude.Text)
bundleDetails_version :: (Maybe Text -> f (Maybe Text)) -> BundleDetails -> f BundleDetails
bundleDetails_version = (BundleDetails -> Maybe Text)
-> (BundleDetails -> Maybe Text -> BundleDetails)
-> Lens BundleDetails BundleDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BundleDetails' {Maybe Text
version :: Maybe Text
$sel:version:BundleDetails' :: BundleDetails -> Maybe Text
version} -> Maybe Text
version) (\s :: BundleDetails
s@BundleDetails' {} Maybe Text
a -> BundleDetails
s {$sel:version:BundleDetails' :: Maybe Text
version = Maybe Text
a} :: BundleDetails)
bundleDetails_iconUrl :: Lens.Lens' BundleDetails (Prelude.Maybe Prelude.Text)
bundleDetails_iconUrl :: (Maybe Text -> f (Maybe Text)) -> BundleDetails -> f BundleDetails
bundleDetails_iconUrl = (BundleDetails -> Maybe Text)
-> (BundleDetails -> Maybe Text -> BundleDetails)
-> Lens BundleDetails BundleDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BundleDetails' {Maybe Text
iconUrl :: Maybe Text
$sel:iconUrl:BundleDetails' :: BundleDetails -> Maybe Text
iconUrl} -> Maybe Text
iconUrl) (\s :: BundleDetails
s@BundleDetails' {} Maybe Text
a -> BundleDetails
s {$sel:iconUrl:BundleDetails' :: Maybe Text
iconUrl = Maybe Text
a} :: BundleDetails)
bundleDetails_title :: Lens.Lens' BundleDetails (Prelude.Maybe Prelude.Text)
bundleDetails_title :: (Maybe Text -> f (Maybe Text)) -> BundleDetails -> f BundleDetails
bundleDetails_title = (BundleDetails -> Maybe Text)
-> (BundleDetails -> Maybe Text -> BundleDetails)
-> Lens BundleDetails BundleDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BundleDetails' {Maybe Text
title :: Maybe Text
$sel:title:BundleDetails' :: BundleDetails -> Maybe Text
title} -> Maybe Text
title) (\s :: BundleDetails
s@BundleDetails' {} Maybe Text
a -> BundleDetails
s {$sel:title:BundleDetails' :: Maybe Text
title = Maybe Text
a} :: BundleDetails)
bundleDetails_description :: Lens.Lens' BundleDetails (Prelude.Maybe Prelude.Text)
bundleDetails_description :: (Maybe Text -> f (Maybe Text)) -> BundleDetails -> f BundleDetails
bundleDetails_description = (BundleDetails -> Maybe Text)
-> (BundleDetails -> Maybe Text -> BundleDetails)
-> Lens BundleDetails BundleDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BundleDetails' {Maybe Text
description :: Maybe Text
$sel:description:BundleDetails' :: BundleDetails -> Maybe Text
description} -> Maybe Text
description) (\s :: BundleDetails
s@BundleDetails' {} Maybe Text
a -> BundleDetails
s {$sel:description:BundleDetails' :: Maybe Text
description = Maybe Text
a} :: BundleDetails)
instance Core.FromJSON BundleDetails where
parseJSON :: Value -> Parser BundleDetails
parseJSON =
String
-> (Object -> Parser BundleDetails)
-> Value
-> Parser BundleDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"BundleDetails"
( \Object
x ->
Maybe [Platform]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> BundleDetails
BundleDetails'
(Maybe [Platform]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> BundleDetails)
-> Parser (Maybe [Platform])
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> BundleDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Platform]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"availablePlatforms"
Parser (Maybe (Maybe [Platform]))
-> Maybe [Platform] -> Parser (Maybe [Platform])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Platform]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> BundleDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> BundleDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"bundleId")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> BundleDetails)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> BundleDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"version")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> BundleDetails)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> BundleDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"iconUrl")
Parser (Maybe Text -> Maybe Text -> BundleDetails)
-> Parser (Maybe Text) -> Parser (Maybe Text -> BundleDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"title")
Parser (Maybe Text -> BundleDetails)
-> Parser (Maybe Text) -> Parser BundleDetails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"description")
)
instance Prelude.Hashable BundleDetails
instance Prelude.NFData BundleDetails