{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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
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. 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'
{ $sel:s3BucketDestination:InventoryDestination' :: InventoryS3BucketDestination
s3BucketDestination =
InventoryS3BucketDestination
pS3BucketDestination_
}
inventoryDestination_s3BucketDestination :: Lens.Lens' InventoryDestination InventoryS3BucketDestination
inventoryDestination_s3BucketDestination :: Lens' InventoryDestination InventoryS3BucketDestination
inventoryDestination_s3BucketDestination = 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 Data.FromXML InventoryDestination where
parseXML :: [Node] -> Either String InventoryDestination
parseXML [Node]
x =
InventoryS3BucketDestination -> InventoryDestination
InventoryDestination'
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
"S3BucketDestination")
instance Prelude.Hashable InventoryDestination where
hashWithSalt :: Int -> InventoryDestination -> Int
hashWithSalt Int
_salt InventoryDestination' {InventoryS3BucketDestination
s3BucketDestination :: InventoryS3BucketDestination
$sel:s3BucketDestination:InventoryDestination' :: InventoryDestination -> InventoryS3BucketDestination
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` InventoryS3BucketDestination
s3BucketDestination
instance Prelude.NFData InventoryDestination where
rnf :: InventoryDestination -> ()
rnf InventoryDestination' {InventoryS3BucketDestination
s3BucketDestination :: InventoryS3BucketDestination
$sel:s3BucketDestination:InventoryDestination' :: InventoryDestination -> InventoryS3BucketDestination
..} =
forall a. NFData a => a -> ()
Prelude.rnf InventoryS3BucketDestination
s3BucketDestination
instance Data.ToXML InventoryDestination where
toXML :: InventoryDestination -> XML
toXML InventoryDestination' {InventoryS3BucketDestination
s3BucketDestination :: InventoryS3BucketDestination
$sel:s3BucketDestination:InventoryDestination' :: InventoryDestination -> InventoryS3BucketDestination
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[Name
"S3BucketDestination" forall a. ToXML a => Name -> a -> XML
Data.@= InventoryS3BucketDestination
s3BucketDestination]