{-# 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.IoTAnalytics.Types.ChannelStorageSummary where
import qualified Amazonka.Core as Core
import Amazonka.IoTAnalytics.Types.CustomerManagedChannelS3StorageSummary
import Amazonka.IoTAnalytics.Types.ServiceManagedChannelS3StorageSummary
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ChannelStorageSummary = ChannelStorageSummary'
{
ChannelStorageSummary
-> Maybe ServiceManagedChannelS3StorageSummary
serviceManagedS3 :: Prelude.Maybe ServiceManagedChannelS3StorageSummary,
ChannelStorageSummary
-> Maybe CustomerManagedChannelS3StorageSummary
customerManagedS3 :: Prelude.Maybe CustomerManagedChannelS3StorageSummary
}
deriving (ChannelStorageSummary -> ChannelStorageSummary -> Bool
(ChannelStorageSummary -> ChannelStorageSummary -> Bool)
-> (ChannelStorageSummary -> ChannelStorageSummary -> Bool)
-> Eq ChannelStorageSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ChannelStorageSummary -> ChannelStorageSummary -> Bool
$c/= :: ChannelStorageSummary -> ChannelStorageSummary -> Bool
== :: ChannelStorageSummary -> ChannelStorageSummary -> Bool
$c== :: ChannelStorageSummary -> ChannelStorageSummary -> Bool
Prelude.Eq, ReadPrec [ChannelStorageSummary]
ReadPrec ChannelStorageSummary
Int -> ReadS ChannelStorageSummary
ReadS [ChannelStorageSummary]
(Int -> ReadS ChannelStorageSummary)
-> ReadS [ChannelStorageSummary]
-> ReadPrec ChannelStorageSummary
-> ReadPrec [ChannelStorageSummary]
-> Read ChannelStorageSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ChannelStorageSummary]
$creadListPrec :: ReadPrec [ChannelStorageSummary]
readPrec :: ReadPrec ChannelStorageSummary
$creadPrec :: ReadPrec ChannelStorageSummary
readList :: ReadS [ChannelStorageSummary]
$creadList :: ReadS [ChannelStorageSummary]
readsPrec :: Int -> ReadS ChannelStorageSummary
$creadsPrec :: Int -> ReadS ChannelStorageSummary
Prelude.Read, Int -> ChannelStorageSummary -> ShowS
[ChannelStorageSummary] -> ShowS
ChannelStorageSummary -> String
(Int -> ChannelStorageSummary -> ShowS)
-> (ChannelStorageSummary -> String)
-> ([ChannelStorageSummary] -> ShowS)
-> Show ChannelStorageSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ChannelStorageSummary] -> ShowS
$cshowList :: [ChannelStorageSummary] -> ShowS
show :: ChannelStorageSummary -> String
$cshow :: ChannelStorageSummary -> String
showsPrec :: Int -> ChannelStorageSummary -> ShowS
$cshowsPrec :: Int -> ChannelStorageSummary -> ShowS
Prelude.Show, (forall x. ChannelStorageSummary -> Rep ChannelStorageSummary x)
-> (forall x. Rep ChannelStorageSummary x -> ChannelStorageSummary)
-> Generic ChannelStorageSummary
forall x. Rep ChannelStorageSummary x -> ChannelStorageSummary
forall x. ChannelStorageSummary -> Rep ChannelStorageSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ChannelStorageSummary x -> ChannelStorageSummary
$cfrom :: forall x. ChannelStorageSummary -> Rep ChannelStorageSummary x
Prelude.Generic)
newChannelStorageSummary ::
ChannelStorageSummary
newChannelStorageSummary :: ChannelStorageSummary
newChannelStorageSummary =
ChannelStorageSummary' :: Maybe ServiceManagedChannelS3StorageSummary
-> Maybe CustomerManagedChannelS3StorageSummary
-> ChannelStorageSummary
ChannelStorageSummary'
{ $sel:serviceManagedS3:ChannelStorageSummary' :: Maybe ServiceManagedChannelS3StorageSummary
serviceManagedS3 =
Maybe ServiceManagedChannelS3StorageSummary
forall a. Maybe a
Prelude.Nothing,
$sel:customerManagedS3:ChannelStorageSummary' :: Maybe CustomerManagedChannelS3StorageSummary
customerManagedS3 = Maybe CustomerManagedChannelS3StorageSummary
forall a. Maybe a
Prelude.Nothing
}
channelStorageSummary_serviceManagedS3 :: Lens.Lens' ChannelStorageSummary (Prelude.Maybe ServiceManagedChannelS3StorageSummary)
channelStorageSummary_serviceManagedS3 :: (Maybe ServiceManagedChannelS3StorageSummary
-> f (Maybe ServiceManagedChannelS3StorageSummary))
-> ChannelStorageSummary -> f ChannelStorageSummary
channelStorageSummary_serviceManagedS3 = (ChannelStorageSummary
-> Maybe ServiceManagedChannelS3StorageSummary)
-> (ChannelStorageSummary
-> Maybe ServiceManagedChannelS3StorageSummary
-> ChannelStorageSummary)
-> Lens
ChannelStorageSummary
ChannelStorageSummary
(Maybe ServiceManagedChannelS3StorageSummary)
(Maybe ServiceManagedChannelS3StorageSummary)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelStorageSummary' {Maybe ServiceManagedChannelS3StorageSummary
serviceManagedS3 :: Maybe ServiceManagedChannelS3StorageSummary
$sel:serviceManagedS3:ChannelStorageSummary' :: ChannelStorageSummary
-> Maybe ServiceManagedChannelS3StorageSummary
serviceManagedS3} -> Maybe ServiceManagedChannelS3StorageSummary
serviceManagedS3) (\s :: ChannelStorageSummary
s@ChannelStorageSummary' {} Maybe ServiceManagedChannelS3StorageSummary
a -> ChannelStorageSummary
s {$sel:serviceManagedS3:ChannelStorageSummary' :: Maybe ServiceManagedChannelS3StorageSummary
serviceManagedS3 = Maybe ServiceManagedChannelS3StorageSummary
a} :: ChannelStorageSummary)
channelStorageSummary_customerManagedS3 :: Lens.Lens' ChannelStorageSummary (Prelude.Maybe CustomerManagedChannelS3StorageSummary)
channelStorageSummary_customerManagedS3 :: (Maybe CustomerManagedChannelS3StorageSummary
-> f (Maybe CustomerManagedChannelS3StorageSummary))
-> ChannelStorageSummary -> f ChannelStorageSummary
channelStorageSummary_customerManagedS3 = (ChannelStorageSummary
-> Maybe CustomerManagedChannelS3StorageSummary)
-> (ChannelStorageSummary
-> Maybe CustomerManagedChannelS3StorageSummary
-> ChannelStorageSummary)
-> Lens
ChannelStorageSummary
ChannelStorageSummary
(Maybe CustomerManagedChannelS3StorageSummary)
(Maybe CustomerManagedChannelS3StorageSummary)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelStorageSummary' {Maybe CustomerManagedChannelS3StorageSummary
customerManagedS3 :: Maybe CustomerManagedChannelS3StorageSummary
$sel:customerManagedS3:ChannelStorageSummary' :: ChannelStorageSummary
-> Maybe CustomerManagedChannelS3StorageSummary
customerManagedS3} -> Maybe CustomerManagedChannelS3StorageSummary
customerManagedS3) (\s :: ChannelStorageSummary
s@ChannelStorageSummary' {} Maybe CustomerManagedChannelS3StorageSummary
a -> ChannelStorageSummary
s {$sel:customerManagedS3:ChannelStorageSummary' :: Maybe CustomerManagedChannelS3StorageSummary
customerManagedS3 = Maybe CustomerManagedChannelS3StorageSummary
a} :: ChannelStorageSummary)
instance Core.FromJSON ChannelStorageSummary where
parseJSON :: Value -> Parser ChannelStorageSummary
parseJSON =
String
-> (Object -> Parser ChannelStorageSummary)
-> Value
-> Parser ChannelStorageSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ChannelStorageSummary"
( \Object
x ->
Maybe ServiceManagedChannelS3StorageSummary
-> Maybe CustomerManagedChannelS3StorageSummary
-> ChannelStorageSummary
ChannelStorageSummary'
(Maybe ServiceManagedChannelS3StorageSummary
-> Maybe CustomerManagedChannelS3StorageSummary
-> ChannelStorageSummary)
-> Parser (Maybe ServiceManagedChannelS3StorageSummary)
-> Parser
(Maybe CustomerManagedChannelS3StorageSummary
-> ChannelStorageSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Parser (Maybe ServiceManagedChannelS3StorageSummary)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"serviceManagedS3")
Parser
(Maybe CustomerManagedChannelS3StorageSummary
-> ChannelStorageSummary)
-> Parser (Maybe CustomerManagedChannelS3StorageSummary)
-> Parser ChannelStorageSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Parser (Maybe CustomerManagedChannelS3StorageSummary)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"customerManagedS3")
)
instance Prelude.Hashable ChannelStorageSummary
instance Prelude.NFData ChannelStorageSummary