{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.S3.Internal
data IndexDocument = IndexDocument'
{
IndexDocument -> Text
suffix :: Prelude.Text
}
deriving (IndexDocument -> IndexDocument -> Bool
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]
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
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. 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' {$sel:suffix:IndexDocument' :: Text
suffix = Text
pSuffix_}
indexDocument_suffix :: Lens.Lens' IndexDocument Prelude.Text
indexDocument_suffix :: Lens' IndexDocument Text
indexDocument_suffix = 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 Data.FromXML IndexDocument where
parseXML :: [Node] -> Either String IndexDocument
parseXML [Node]
x =
Text -> IndexDocument
IndexDocument' forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"Suffix")
instance Prelude.Hashable IndexDocument where
hashWithSalt :: Int -> IndexDocument -> Int
hashWithSalt Int
_salt IndexDocument' {Text
suffix :: Text
$sel:suffix:IndexDocument' :: IndexDocument -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
suffix
instance Prelude.NFData IndexDocument where
rnf :: IndexDocument -> ()
rnf IndexDocument' {Text
suffix :: Text
$sel:suffix:IndexDocument' :: IndexDocument -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
suffix
instance Data.ToXML IndexDocument where
toXML :: IndexDocument -> XML
toXML IndexDocument' {Text
suffix :: Text
$sel:suffix:IndexDocument' :: IndexDocument -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat [Name
"Suffix" forall a. ToXML a => Name -> a -> XML
Data.@= Text
suffix]