{-# 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.InventoryDestination where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.S3.Internal
import Amazonka.S3.Types.InventoryS3BucketDestination
data InventoryDestination = InventoryDestination'
{
InventoryDestination -> InventoryS3BucketDestination
s3BucketDestination :: InventoryS3BucketDestination
}
deriving (InventoryDestination -> InventoryDestination -> Bool
(InventoryDestination -> InventoryDestination -> Bool)
-> (InventoryDestination -> InventoryDestination -> Bool)
-> Eq InventoryDestination
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InventoryDestination -> InventoryDestination -> Bool
$c/= :: InventoryDestination -> InventoryDestination -> Bool
== :: InventoryDestination -> InventoryDestination -> Bool
$c== :: InventoryDestination -> InventoryDestination -> Bool
Prelude.Eq, Int -> InventoryDestination -> ShowS
[InventoryDestination] -> ShowS
InventoryDestination -> String
(Int -> InventoryDestination -> ShowS)
-> (InventoryDestination -> String)
-> ([InventoryDestination] -> ShowS)
-> Show InventoryDestination
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InventoryDestination] -> ShowS
$cshowList :: [InventoryDestination] -> ShowS
show :: InventoryDestination -> String
$cshow :: InventoryDestination -> String
showsPrec :: Int -> InventoryDestination -> ShowS
$cshowsPrec :: Int -> InventoryDestination -> ShowS
Prelude.Show, (forall x. InventoryDestination -> Rep InventoryDestination x)
-> (forall x. Rep InventoryDestination x -> InventoryDestination)
-> Generic InventoryDestination
forall x. Rep InventoryDestination x -> InventoryDestination
forall x. InventoryDestination -> Rep InventoryDestination x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InventoryDestination x -> InventoryDestination
$cfrom :: forall x. InventoryDestination -> Rep InventoryDestination x
Prelude.Generic)
newInventoryDestination ::
InventoryS3BucketDestination ->
InventoryDestination
newInventoryDestination :: InventoryS3BucketDestination -> InventoryDestination
newInventoryDestination InventoryS3BucketDestination
pS3BucketDestination_ =
InventoryDestination' :: InventoryS3BucketDestination -> InventoryDestination
InventoryDestination'
{ $sel:s3BucketDestination:InventoryDestination' :: InventoryS3BucketDestination
s3BucketDestination =
InventoryS3BucketDestination
pS3BucketDestination_
}
inventoryDestination_s3BucketDestination :: Lens.Lens' InventoryDestination InventoryS3BucketDestination
inventoryDestination_s3BucketDestination :: (InventoryS3BucketDestination -> f InventoryS3BucketDestination)
-> InventoryDestination -> f InventoryDestination
inventoryDestination_s3BucketDestination = (InventoryDestination -> InventoryS3BucketDestination)
-> (InventoryDestination
-> InventoryS3BucketDestination -> InventoryDestination)
-> Lens
InventoryDestination
InventoryDestination
InventoryS3BucketDestination
InventoryS3BucketDestination
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InventoryDestination' {InventoryS3BucketDestination
s3BucketDestination :: InventoryS3BucketDestination
$sel:s3BucketDestination:InventoryDestination' :: InventoryDestination -> InventoryS3BucketDestination
s3BucketDestination} -> InventoryS3BucketDestination
s3BucketDestination) (\s :: InventoryDestination
s@InventoryDestination' {} InventoryS3BucketDestination
a -> InventoryDestination
s {$sel:s3BucketDestination:InventoryDestination' :: InventoryS3BucketDestination
s3BucketDestination = InventoryS3BucketDestination
a} :: InventoryDestination)
instance Core.FromXML InventoryDestination where
parseXML :: [Node] -> Either String InventoryDestination
parseXML [Node]
x =
InventoryS3BucketDestination -> InventoryDestination
InventoryDestination'
(InventoryS3BucketDestination -> InventoryDestination)
-> Either String InventoryS3BucketDestination
-> Either String InventoryDestination
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String InventoryS3BucketDestination
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"S3BucketDestination")
instance Prelude.Hashable InventoryDestination
instance Prelude.NFData InventoryDestination
instance Core.ToXML InventoryDestination where
toXML :: InventoryDestination -> XML
toXML InventoryDestination' {InventoryS3BucketDestination
s3BucketDestination :: InventoryS3BucketDestination
$sel:s3BucketDestination:InventoryDestination' :: InventoryDestination -> InventoryS3BucketDestination
..} =
[XML] -> XML
forall a. Monoid a => [a] -> a
Prelude.mconcat
[Name
"S3BucketDestination" Name -> InventoryS3BucketDestination -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= InventoryS3BucketDestination
s3BucketDestination]