{-# 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.OutputLocation 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.S3Location
data OutputLocation = OutputLocation'
{
OutputLocation -> Maybe S3Location
s3 :: Prelude.Maybe S3Location
}
deriving (OutputLocation -> OutputLocation -> Bool
(OutputLocation -> OutputLocation -> Bool)
-> (OutputLocation -> OutputLocation -> Bool) -> Eq OutputLocation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OutputLocation -> OutputLocation -> Bool
$c/= :: OutputLocation -> OutputLocation -> Bool
== :: OutputLocation -> OutputLocation -> Bool
$c== :: OutputLocation -> OutputLocation -> Bool
Prelude.Eq, Int -> OutputLocation -> ShowS
[OutputLocation] -> ShowS
OutputLocation -> String
(Int -> OutputLocation -> ShowS)
-> (OutputLocation -> String)
-> ([OutputLocation] -> ShowS)
-> Show OutputLocation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OutputLocation] -> ShowS
$cshowList :: [OutputLocation] -> ShowS
show :: OutputLocation -> String
$cshow :: OutputLocation -> String
showsPrec :: Int -> OutputLocation -> ShowS
$cshowsPrec :: Int -> OutputLocation -> ShowS
Prelude.Show, (forall x. OutputLocation -> Rep OutputLocation x)
-> (forall x. Rep OutputLocation x -> OutputLocation)
-> Generic OutputLocation
forall x. Rep OutputLocation x -> OutputLocation
forall x. OutputLocation -> Rep OutputLocation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OutputLocation x -> OutputLocation
$cfrom :: forall x. OutputLocation -> Rep OutputLocation x
Prelude.Generic)
newOutputLocation ::
OutputLocation
newOutputLocation :: OutputLocation
newOutputLocation =
OutputLocation' :: Maybe S3Location -> OutputLocation
OutputLocation' {$sel:s3:OutputLocation' :: Maybe S3Location
s3 = Maybe S3Location
forall a. Maybe a
Prelude.Nothing}
outputLocation_s3 :: Lens.Lens' OutputLocation (Prelude.Maybe S3Location)
outputLocation_s3 :: (Maybe S3Location -> f (Maybe S3Location))
-> OutputLocation -> f OutputLocation
outputLocation_s3 = (OutputLocation -> Maybe S3Location)
-> (OutputLocation -> Maybe S3Location -> OutputLocation)
-> Lens
OutputLocation OutputLocation (Maybe S3Location) (Maybe S3Location)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OutputLocation' {Maybe S3Location
s3 :: Maybe S3Location
$sel:s3:OutputLocation' :: OutputLocation -> Maybe S3Location
s3} -> Maybe S3Location
s3) (\s :: OutputLocation
s@OutputLocation' {} Maybe S3Location
a -> OutputLocation
s {$sel:s3:OutputLocation' :: Maybe S3Location
s3 = Maybe S3Location
a} :: OutputLocation)
instance Prelude.Hashable OutputLocation
instance Prelude.NFData OutputLocation
instance Core.ToXML OutputLocation where
toXML :: OutputLocation -> XML
toXML OutputLocation' {Maybe S3Location
s3 :: Maybe S3Location
$sel:s3:OutputLocation' :: OutputLocation -> Maybe S3Location
..} =
[XML] -> XML
forall a. Monoid a => [a] -> a
Prelude.mconcat [Name
"S3" Name -> Maybe S3Location -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe S3Location
s3]