{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
description :: Prelude.Maybe Prelude.Text,
BundleDetails -> Maybe Text
iconUrl :: Prelude.Maybe Prelude.Text,
BundleDetails -> Maybe Text
title :: Prelude.Maybe Prelude.Text,
BundleDetails -> Maybe Text
version :: Prelude.Maybe Prelude.Text
}
deriving (BundleDetails -> BundleDetails -> Bool
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]
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
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. 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'
{ $sel:availablePlatforms:BundleDetails' :: Maybe [Platform]
availablePlatforms =
forall a. Maybe a
Prelude.Nothing,
$sel:bundleId:BundleDetails' :: Maybe Text
bundleId = forall a. Maybe a
Prelude.Nothing,
$sel:description:BundleDetails' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:iconUrl:BundleDetails' :: Maybe Text
iconUrl = forall a. Maybe a
Prelude.Nothing,
$sel:title:BundleDetails' :: Maybe Text
title = forall a. Maybe a
Prelude.Nothing,
$sel:version:BundleDetails' :: Maybe Text
version = forall a. Maybe a
Prelude.Nothing
}
bundleDetails_availablePlatforms :: Lens.Lens' BundleDetails (Prelude.Maybe [Platform])
bundleDetails_availablePlatforms :: Lens' BundleDetails (Maybe [Platform])
bundleDetails_availablePlatforms = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 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 :: Lens' BundleDetails (Maybe Text)
bundleDetails_bundleId = 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_description :: Lens.Lens' BundleDetails (Prelude.Maybe Prelude.Text)
bundleDetails_description :: Lens' BundleDetails (Maybe Text)
bundleDetails_description = 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)
bundleDetails_iconUrl :: Lens.Lens' BundleDetails (Prelude.Maybe Prelude.Text)
bundleDetails_iconUrl :: Lens' BundleDetails (Maybe Text)
bundleDetails_iconUrl = 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 :: Lens' BundleDetails (Maybe Text)
bundleDetails_title = 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_version :: Lens.Lens' BundleDetails (Prelude.Maybe Prelude.Text)
bundleDetails_version :: Lens' BundleDetails (Maybe Text)
bundleDetails_version = 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)
instance Data.FromJSON BundleDetails where
parseJSON :: Value -> Parser BundleDetails
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"BundleDetails"
( \Object
x ->
Maybe [Platform]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> BundleDetails
BundleDetails'
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
"availablePlatforms"
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 (Maybe a)
Data..:? Key
"bundleId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"description")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"iconUrl")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"title")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"version")
)
instance Prelude.Hashable BundleDetails where
hashWithSalt :: Int -> BundleDetails -> Int
hashWithSalt Int
_salt BundleDetails' {Maybe [Platform]
Maybe Text
version :: Maybe Text
title :: Maybe Text
iconUrl :: Maybe Text
description :: Maybe Text
bundleId :: Maybe Text
availablePlatforms :: Maybe [Platform]
$sel:version:BundleDetails' :: BundleDetails -> Maybe Text
$sel:title:BundleDetails' :: BundleDetails -> Maybe Text
$sel:iconUrl:BundleDetails' :: BundleDetails -> Maybe Text
$sel:description:BundleDetails' :: BundleDetails -> Maybe Text
$sel:bundleId:BundleDetails' :: BundleDetails -> Maybe Text
$sel:availablePlatforms:BundleDetails' :: BundleDetails -> Maybe [Platform]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Platform]
availablePlatforms
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
bundleId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
iconUrl
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
title
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
version
instance Prelude.NFData BundleDetails where
rnf :: BundleDetails -> ()
rnf BundleDetails' {Maybe [Platform]
Maybe Text
version :: Maybe Text
title :: Maybe Text
iconUrl :: Maybe Text
description :: Maybe Text
bundleId :: Maybe Text
availablePlatforms :: Maybe [Platform]
$sel:version:BundleDetails' :: BundleDetails -> Maybe Text
$sel:title:BundleDetails' :: BundleDetails -> Maybe Text
$sel:iconUrl:BundleDetails' :: BundleDetails -> Maybe Text
$sel:description:BundleDetails' :: BundleDetails -> Maybe Text
$sel:bundleId:BundleDetails' :: BundleDetails -> Maybe Text
$sel:availablePlatforms:BundleDetails' :: BundleDetails -> Maybe [Platform]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [Platform]
availablePlatforms
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
bundleId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
iconUrl
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
title
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
version