{-# 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.Kendra.Types.SiteMapsConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data SiteMapsConfiguration = SiteMapsConfiguration'
{
SiteMapsConfiguration -> [Text]
siteMaps :: [Prelude.Text]
}
deriving (SiteMapsConfiguration -> SiteMapsConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SiteMapsConfiguration -> SiteMapsConfiguration -> Bool
$c/= :: SiteMapsConfiguration -> SiteMapsConfiguration -> Bool
== :: SiteMapsConfiguration -> SiteMapsConfiguration -> Bool
$c== :: SiteMapsConfiguration -> SiteMapsConfiguration -> Bool
Prelude.Eq, ReadPrec [SiteMapsConfiguration]
ReadPrec SiteMapsConfiguration
Int -> ReadS SiteMapsConfiguration
ReadS [SiteMapsConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SiteMapsConfiguration]
$creadListPrec :: ReadPrec [SiteMapsConfiguration]
readPrec :: ReadPrec SiteMapsConfiguration
$creadPrec :: ReadPrec SiteMapsConfiguration
readList :: ReadS [SiteMapsConfiguration]
$creadList :: ReadS [SiteMapsConfiguration]
readsPrec :: Int -> ReadS SiteMapsConfiguration
$creadsPrec :: Int -> ReadS SiteMapsConfiguration
Prelude.Read, Int -> SiteMapsConfiguration -> ShowS
[SiteMapsConfiguration] -> ShowS
SiteMapsConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SiteMapsConfiguration] -> ShowS
$cshowList :: [SiteMapsConfiguration] -> ShowS
show :: SiteMapsConfiguration -> String
$cshow :: SiteMapsConfiguration -> String
showsPrec :: Int -> SiteMapsConfiguration -> ShowS
$cshowsPrec :: Int -> SiteMapsConfiguration -> ShowS
Prelude.Show, forall x. Rep SiteMapsConfiguration x -> SiteMapsConfiguration
forall x. SiteMapsConfiguration -> Rep SiteMapsConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SiteMapsConfiguration x -> SiteMapsConfiguration
$cfrom :: forall x. SiteMapsConfiguration -> Rep SiteMapsConfiguration x
Prelude.Generic)
newSiteMapsConfiguration ::
SiteMapsConfiguration
newSiteMapsConfiguration :: SiteMapsConfiguration
newSiteMapsConfiguration =
SiteMapsConfiguration' {$sel:siteMaps:SiteMapsConfiguration' :: [Text]
siteMaps = forall a. Monoid a => a
Prelude.mempty}
siteMapsConfiguration_siteMaps :: Lens.Lens' SiteMapsConfiguration [Prelude.Text]
siteMapsConfiguration_siteMaps :: Lens' SiteMapsConfiguration [Text]
siteMapsConfiguration_siteMaps = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SiteMapsConfiguration' {[Text]
siteMaps :: [Text]
$sel:siteMaps:SiteMapsConfiguration' :: SiteMapsConfiguration -> [Text]
siteMaps} -> [Text]
siteMaps) (\s :: SiteMapsConfiguration
s@SiteMapsConfiguration' {} [Text]
a -> SiteMapsConfiguration
s {$sel:siteMaps:SiteMapsConfiguration' :: [Text]
siteMaps = [Text]
a} :: SiteMapsConfiguration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON SiteMapsConfiguration where
parseJSON :: Value -> Parser SiteMapsConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"SiteMapsConfiguration"
( \Object
x ->
[Text] -> SiteMapsConfiguration
SiteMapsConfiguration'
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
"SiteMaps" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable SiteMapsConfiguration where
hashWithSalt :: Int -> SiteMapsConfiguration -> Int
hashWithSalt Int
_salt SiteMapsConfiguration' {[Text]
siteMaps :: [Text]
$sel:siteMaps:SiteMapsConfiguration' :: SiteMapsConfiguration -> [Text]
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Text]
siteMaps
instance Prelude.NFData SiteMapsConfiguration where
rnf :: SiteMapsConfiguration -> ()
rnf SiteMapsConfiguration' {[Text]
siteMaps :: [Text]
$sel:siteMaps:SiteMapsConfiguration' :: SiteMapsConfiguration -> [Text]
..} = forall a. NFData a => a -> ()
Prelude.rnf [Text]
siteMaps
instance Data.ToJSON SiteMapsConfiguration where
toJSON :: SiteMapsConfiguration -> Value
toJSON SiteMapsConfiguration' {[Text]
siteMaps :: [Text]
$sel:siteMaps:SiteMapsConfiguration' :: SiteMapsConfiguration -> [Text]
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"SiteMaps" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= [Text]
siteMaps)]
)