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