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