{-# 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.S3.Types.IndexDocument where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.S3.Internal
data IndexDocument = IndexDocument'
{
IndexDocument -> Text
suffix :: Prelude.Text
}
deriving (IndexDocument -> IndexDocument -> Bool
(IndexDocument -> IndexDocument -> Bool)
-> (IndexDocument -> IndexDocument -> Bool) -> Eq IndexDocument
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: IndexDocument -> IndexDocument -> Bool
$c/= :: IndexDocument -> IndexDocument -> Bool
== :: IndexDocument -> IndexDocument -> Bool
$c== :: IndexDocument -> IndexDocument -> Bool
Prelude.Eq, ReadPrec [IndexDocument]
ReadPrec IndexDocument
Int -> ReadS IndexDocument
ReadS [IndexDocument]
(Int -> ReadS IndexDocument)
-> ReadS [IndexDocument]
-> ReadPrec IndexDocument
-> ReadPrec [IndexDocument]
-> Read IndexDocument
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [IndexDocument]
$creadListPrec :: ReadPrec [IndexDocument]
readPrec :: ReadPrec IndexDocument
$creadPrec :: ReadPrec IndexDocument
readList :: ReadS [IndexDocument]
$creadList :: ReadS [IndexDocument]
readsPrec :: Int -> ReadS IndexDocument
$creadsPrec :: Int -> ReadS IndexDocument
Prelude.Read, Int -> IndexDocument -> ShowS
[IndexDocument] -> ShowS
IndexDocument -> String
(Int -> IndexDocument -> ShowS)
-> (IndexDocument -> String)
-> ([IndexDocument] -> ShowS)
-> Show IndexDocument
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [IndexDocument] -> ShowS
$cshowList :: [IndexDocument] -> ShowS
show :: IndexDocument -> String
$cshow :: IndexDocument -> String
showsPrec :: Int -> IndexDocument -> ShowS
$cshowsPrec :: Int -> IndexDocument -> ShowS
Prelude.Show, (forall x. IndexDocument -> Rep IndexDocument x)
-> (forall x. Rep IndexDocument x -> IndexDocument)
-> Generic IndexDocument
forall x. Rep IndexDocument x -> IndexDocument
forall x. IndexDocument -> Rep IndexDocument x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep IndexDocument x -> IndexDocument
$cfrom :: forall x. IndexDocument -> Rep IndexDocument x
Prelude.Generic)
newIndexDocument ::
Prelude.Text ->
IndexDocument
newIndexDocument :: Text -> IndexDocument
newIndexDocument Text
pSuffix_ =
IndexDocument' :: Text -> IndexDocument
IndexDocument' {$sel:suffix:IndexDocument' :: Text
suffix = Text
pSuffix_}
indexDocument_suffix :: Lens.Lens' IndexDocument Prelude.Text
indexDocument_suffix :: (Text -> f Text) -> IndexDocument -> f IndexDocument
indexDocument_suffix = (IndexDocument -> Text)
-> (IndexDocument -> Text -> IndexDocument)
-> Lens IndexDocument IndexDocument Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IndexDocument' {Text
suffix :: Text
$sel:suffix:IndexDocument' :: IndexDocument -> Text
suffix} -> Text
suffix) (\s :: IndexDocument
s@IndexDocument' {} Text
a -> IndexDocument
s {$sel:suffix:IndexDocument' :: Text
suffix = Text
a} :: IndexDocument)
instance Core.FromXML IndexDocument where
parseXML :: [Node] -> Either String IndexDocument
parseXML [Node]
x =
Text -> IndexDocument
IndexDocument' (Text -> IndexDocument)
-> Either String Text -> Either String IndexDocument
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Suffix")
instance Prelude.Hashable IndexDocument
instance Prelude.NFData IndexDocument
instance Core.ToXML IndexDocument where
toXML :: IndexDocument -> XML
toXML IndexDocument' {Text
suffix :: Text
$sel:suffix:IndexDocument' :: IndexDocument -> Text
..} =
[XML] -> XML
forall a. Monoid a => [a] -> a
Prelude.mconcat [Name
"Suffix" Name -> Text -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Text
suffix]