{-# 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.ChannelMessages where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ChannelMessages = ChannelMessages'
{
ChannelMessages -> Maybe (NonEmpty Text)
s3Paths :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text)
}
deriving (ChannelMessages -> ChannelMessages -> Bool
(ChannelMessages -> ChannelMessages -> Bool)
-> (ChannelMessages -> ChannelMessages -> Bool)
-> Eq ChannelMessages
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ChannelMessages -> ChannelMessages -> Bool
$c/= :: ChannelMessages -> ChannelMessages -> Bool
== :: ChannelMessages -> ChannelMessages -> Bool
$c== :: ChannelMessages -> ChannelMessages -> Bool
Prelude.Eq, ReadPrec [ChannelMessages]
ReadPrec ChannelMessages
Int -> ReadS ChannelMessages
ReadS [ChannelMessages]
(Int -> ReadS ChannelMessages)
-> ReadS [ChannelMessages]
-> ReadPrec ChannelMessages
-> ReadPrec [ChannelMessages]
-> Read ChannelMessages
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ChannelMessages]
$creadListPrec :: ReadPrec [ChannelMessages]
readPrec :: ReadPrec ChannelMessages
$creadPrec :: ReadPrec ChannelMessages
readList :: ReadS [ChannelMessages]
$creadList :: ReadS [ChannelMessages]
readsPrec :: Int -> ReadS ChannelMessages
$creadsPrec :: Int -> ReadS ChannelMessages
Prelude.Read, Int -> ChannelMessages -> ShowS
[ChannelMessages] -> ShowS
ChannelMessages -> String
(Int -> ChannelMessages -> ShowS)
-> (ChannelMessages -> String)
-> ([ChannelMessages] -> ShowS)
-> Show ChannelMessages
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ChannelMessages] -> ShowS
$cshowList :: [ChannelMessages] -> ShowS
show :: ChannelMessages -> String
$cshow :: ChannelMessages -> String
showsPrec :: Int -> ChannelMessages -> ShowS
$cshowsPrec :: Int -> ChannelMessages -> ShowS
Prelude.Show, (forall x. ChannelMessages -> Rep ChannelMessages x)
-> (forall x. Rep ChannelMessages x -> ChannelMessages)
-> Generic ChannelMessages
forall x. Rep ChannelMessages x -> ChannelMessages
forall x. ChannelMessages -> Rep ChannelMessages x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ChannelMessages x -> ChannelMessages
$cfrom :: forall x. ChannelMessages -> Rep ChannelMessages x
Prelude.Generic)
newChannelMessages ::
ChannelMessages
newChannelMessages :: ChannelMessages
newChannelMessages =
ChannelMessages' :: Maybe (NonEmpty Text) -> ChannelMessages
ChannelMessages' {$sel:s3Paths:ChannelMessages' :: Maybe (NonEmpty Text)
s3Paths = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing}
channelMessages_s3Paths :: Lens.Lens' ChannelMessages (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
channelMessages_s3Paths :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> ChannelMessages -> f ChannelMessages
channelMessages_s3Paths = (ChannelMessages -> Maybe (NonEmpty Text))
-> (ChannelMessages -> Maybe (NonEmpty Text) -> ChannelMessages)
-> Lens
ChannelMessages
ChannelMessages
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ChannelMessages' {Maybe (NonEmpty Text)
s3Paths :: Maybe (NonEmpty Text)
$sel:s3Paths:ChannelMessages' :: ChannelMessages -> Maybe (NonEmpty Text)
s3Paths} -> Maybe (NonEmpty Text)
s3Paths) (\s :: ChannelMessages
s@ChannelMessages' {} Maybe (NonEmpty Text)
a -> ChannelMessages
s {$sel:s3Paths:ChannelMessages' :: Maybe (NonEmpty Text)
s3Paths = Maybe (NonEmpty Text)
a} :: ChannelMessages) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> ChannelMessages -> f ChannelMessages)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> ChannelMessages
-> f ChannelMessages
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
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
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.Hashable ChannelMessages
instance Prelude.NFData ChannelMessages
instance Core.ToJSON ChannelMessages where
toJSON :: ChannelMessages -> Value
toJSON ChannelMessages' {Maybe (NonEmpty Text)
s3Paths :: Maybe (NonEmpty Text)
$sel:s3Paths:ChannelMessages' :: ChannelMessages -> Maybe (NonEmpty Text)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Text
"s3Paths" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Text -> Pair) -> Maybe (NonEmpty Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
s3Paths]
)