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