{-# 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.Lightsail.Types.Bucket where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Lightsail.Types.AccessRules
import Amazonka.Lightsail.Types.BucketState
import Amazonka.Lightsail.Types.ResourceLocation
import Amazonka.Lightsail.Types.ResourceReceivingAccess
import Amazonka.Lightsail.Types.Tag
import qualified Amazonka.Prelude as Prelude
data Bucket = Bucket'
{
Bucket -> Maybe BucketState
state :: Prelude.Maybe BucketState,
Bucket -> Maybe Text
objectVersioning :: Prelude.Maybe Prelude.Text,
Bucket -> Maybe Text
resourceType :: Prelude.Maybe Prelude.Text,
Bucket -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
Bucket -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
Bucket -> Maybe ResourceLocation
location :: Prelude.Maybe ResourceLocation,
Bucket -> Maybe [Text]
readonlyAccessAccounts :: Prelude.Maybe [Prelude.Text],
Bucket -> Maybe Text
url :: Prelude.Maybe Prelude.Text,
Bucket -> Maybe [ResourceReceivingAccess]
resourcesReceivingAccess :: Prelude.Maybe [ResourceReceivingAccess],
Bucket -> Maybe Text
bundleId :: Prelude.Maybe Prelude.Text,
Bucket -> Maybe AccessRules
accessRules :: Prelude.Maybe AccessRules,
Bucket -> Maybe Bool
ableToUpdateBundle :: Prelude.Maybe Prelude.Bool,
Bucket -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
Bucket -> Maybe Text
supportCode :: Prelude.Maybe Prelude.Text,
Bucket -> Maybe [Tag]
tags :: Prelude.Maybe [Tag]
}
deriving (Bucket -> Bucket -> Bool
(Bucket -> Bucket -> Bool)
-> (Bucket -> Bucket -> Bool) -> Eq Bucket
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Bucket -> Bucket -> Bool
$c/= :: Bucket -> Bucket -> Bool
== :: Bucket -> Bucket -> Bool
$c== :: Bucket -> Bucket -> Bool
Prelude.Eq, ReadPrec [Bucket]
ReadPrec Bucket
Int -> ReadS Bucket
ReadS [Bucket]
(Int -> ReadS Bucket)
-> ReadS [Bucket]
-> ReadPrec Bucket
-> ReadPrec [Bucket]
-> Read Bucket
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Bucket]
$creadListPrec :: ReadPrec [Bucket]
readPrec :: ReadPrec Bucket
$creadPrec :: ReadPrec Bucket
readList :: ReadS [Bucket]
$creadList :: ReadS [Bucket]
readsPrec :: Int -> ReadS Bucket
$creadsPrec :: Int -> ReadS Bucket
Prelude.Read, Int -> Bucket -> ShowS
[Bucket] -> ShowS
Bucket -> String
(Int -> Bucket -> ShowS)
-> (Bucket -> String) -> ([Bucket] -> ShowS) -> Show Bucket
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Bucket] -> ShowS
$cshowList :: [Bucket] -> ShowS
show :: Bucket -> String
$cshow :: Bucket -> String
showsPrec :: Int -> Bucket -> ShowS
$cshowsPrec :: Int -> Bucket -> ShowS
Prelude.Show, (forall x. Bucket -> Rep Bucket x)
-> (forall x. Rep Bucket x -> Bucket) -> Generic Bucket
forall x. Rep Bucket x -> Bucket
forall x. Bucket -> Rep Bucket x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Bucket x -> Bucket
$cfrom :: forall x. Bucket -> Rep Bucket x
Prelude.Generic)
newBucket ::
Bucket
newBucket :: Bucket
newBucket =
Bucket' :: Maybe BucketState
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe [Text]
-> Maybe Text
-> Maybe [ResourceReceivingAccess]
-> Maybe Text
-> Maybe AccessRules
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Bucket
Bucket'
{ $sel:state:Bucket' :: Maybe BucketState
state = Maybe BucketState
forall a. Maybe a
Prelude.Nothing,
$sel:objectVersioning:Bucket' :: Maybe Text
objectVersioning = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resourceType:Bucket' :: Maybe Text
resourceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:arn:Bucket' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:Bucket' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:location:Bucket' :: Maybe ResourceLocation
location = Maybe ResourceLocation
forall a. Maybe a
Prelude.Nothing,
$sel:readonlyAccessAccounts:Bucket' :: Maybe [Text]
readonlyAccessAccounts = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:url:Bucket' :: Maybe Text
url = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resourcesReceivingAccess:Bucket' :: Maybe [ResourceReceivingAccess]
resourcesReceivingAccess = Maybe [ResourceReceivingAccess]
forall a. Maybe a
Prelude.Nothing,
$sel:bundleId:Bucket' :: Maybe Text
bundleId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:accessRules:Bucket' :: Maybe AccessRules
accessRules = Maybe AccessRules
forall a. Maybe a
Prelude.Nothing,
$sel:ableToUpdateBundle:Bucket' :: Maybe Bool
ableToUpdateBundle = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:name:Bucket' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:supportCode:Bucket' :: Maybe Text
supportCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:Bucket' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing
}
bucket_state :: Lens.Lens' Bucket (Prelude.Maybe BucketState)
bucket_state :: (Maybe BucketState -> f (Maybe BucketState)) -> Bucket -> f Bucket
bucket_state = (Bucket -> Maybe BucketState)
-> (Bucket -> Maybe BucketState -> Bucket)
-> Lens Bucket Bucket (Maybe BucketState) (Maybe BucketState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Bucket' {Maybe BucketState
state :: Maybe BucketState
$sel:state:Bucket' :: Bucket -> Maybe BucketState
state} -> Maybe BucketState
state) (\s :: Bucket
s@Bucket' {} Maybe BucketState
a -> Bucket
s {$sel:state:Bucket' :: Maybe BucketState
state = Maybe BucketState
a} :: Bucket)
bucket_objectVersioning :: Lens.Lens' Bucket (Prelude.Maybe Prelude.Text)
bucket_objectVersioning :: (Maybe Text -> f (Maybe Text)) -> Bucket -> f Bucket
bucket_objectVersioning = (Bucket -> Maybe Text)
-> (Bucket -> Maybe Text -> Bucket)
-> Lens Bucket Bucket (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Bucket' {Maybe Text
objectVersioning :: Maybe Text
$sel:objectVersioning:Bucket' :: Bucket -> Maybe Text
objectVersioning} -> Maybe Text
objectVersioning) (\s :: Bucket
s@Bucket' {} Maybe Text
a -> Bucket
s {$sel:objectVersioning:Bucket' :: Maybe Text
objectVersioning = Maybe Text
a} :: Bucket)
bucket_resourceType :: Lens.Lens' Bucket (Prelude.Maybe Prelude.Text)
bucket_resourceType :: (Maybe Text -> f (Maybe Text)) -> Bucket -> f Bucket
bucket_resourceType = (Bucket -> Maybe Text)
-> (Bucket -> Maybe Text -> Bucket)
-> Lens Bucket Bucket (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Bucket' {Maybe Text
resourceType :: Maybe Text
$sel:resourceType:Bucket' :: Bucket -> Maybe Text
resourceType} -> Maybe Text
resourceType) (\s :: Bucket
s@Bucket' {} Maybe Text
a -> Bucket
s {$sel:resourceType:Bucket' :: Maybe Text
resourceType = Maybe Text
a} :: Bucket)
bucket_arn :: Lens.Lens' Bucket (Prelude.Maybe Prelude.Text)
bucket_arn :: (Maybe Text -> f (Maybe Text)) -> Bucket -> f Bucket
bucket_arn = (Bucket -> Maybe Text)
-> (Bucket -> Maybe Text -> Bucket)
-> Lens Bucket Bucket (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Bucket' {Maybe Text
arn :: Maybe Text
$sel:arn:Bucket' :: Bucket -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Bucket
s@Bucket' {} Maybe Text
a -> Bucket
s {$sel:arn:Bucket' :: Maybe Text
arn = Maybe Text
a} :: Bucket)
bucket_createdAt :: Lens.Lens' Bucket (Prelude.Maybe Prelude.UTCTime)
bucket_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Bucket -> f Bucket
bucket_createdAt = (Bucket -> Maybe POSIX)
-> (Bucket -> Maybe POSIX -> Bucket)
-> Lens Bucket Bucket (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Bucket' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:Bucket' :: Bucket -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: Bucket
s@Bucket' {} Maybe POSIX
a -> Bucket
s {$sel:createdAt:Bucket' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: Bucket) ((Maybe POSIX -> f (Maybe POSIX)) -> Bucket -> f Bucket)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Bucket
-> f Bucket
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
bucket_location :: Lens.Lens' Bucket (Prelude.Maybe ResourceLocation)
bucket_location :: (Maybe ResourceLocation -> f (Maybe ResourceLocation))
-> Bucket -> f Bucket
bucket_location = (Bucket -> Maybe ResourceLocation)
-> (Bucket -> Maybe ResourceLocation -> Bucket)
-> Lens
Bucket Bucket (Maybe ResourceLocation) (Maybe ResourceLocation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Bucket' {Maybe ResourceLocation
location :: Maybe ResourceLocation
$sel:location:Bucket' :: Bucket -> Maybe ResourceLocation
location} -> Maybe ResourceLocation
location) (\s :: Bucket
s@Bucket' {} Maybe ResourceLocation
a -> Bucket
s {$sel:location:Bucket' :: Maybe ResourceLocation
location = Maybe ResourceLocation
a} :: Bucket)
bucket_readonlyAccessAccounts :: Lens.Lens' Bucket (Prelude.Maybe [Prelude.Text])
bucket_readonlyAccessAccounts :: (Maybe [Text] -> f (Maybe [Text])) -> Bucket -> f Bucket
bucket_readonlyAccessAccounts = (Bucket -> Maybe [Text])
-> (Bucket -> Maybe [Text] -> Bucket)
-> Lens Bucket Bucket (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Bucket' {Maybe [Text]
readonlyAccessAccounts :: Maybe [Text]
$sel:readonlyAccessAccounts:Bucket' :: Bucket -> Maybe [Text]
readonlyAccessAccounts} -> Maybe [Text]
readonlyAccessAccounts) (\s :: Bucket
s@Bucket' {} Maybe [Text]
a -> Bucket
s {$sel:readonlyAccessAccounts:Bucket' :: Maybe [Text]
readonlyAccessAccounts = Maybe [Text]
a} :: Bucket) ((Maybe [Text] -> f (Maybe [Text])) -> Bucket -> f Bucket)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> Bucket
-> f Bucket
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
bucket_url :: Lens.Lens' Bucket (Prelude.Maybe Prelude.Text)
bucket_url :: (Maybe Text -> f (Maybe Text)) -> Bucket -> f Bucket
bucket_url = (Bucket -> Maybe Text)
-> (Bucket -> Maybe Text -> Bucket)
-> Lens Bucket Bucket (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Bucket' {Maybe Text
url :: Maybe Text
$sel:url:Bucket' :: Bucket -> Maybe Text
url} -> Maybe Text
url) (\s :: Bucket
s@Bucket' {} Maybe Text
a -> Bucket
s {$sel:url:Bucket' :: Maybe Text
url = Maybe Text
a} :: Bucket)
bucket_resourcesReceivingAccess :: Lens.Lens' Bucket (Prelude.Maybe [ResourceReceivingAccess])
bucket_resourcesReceivingAccess :: (Maybe [ResourceReceivingAccess]
-> f (Maybe [ResourceReceivingAccess]))
-> Bucket -> f Bucket
bucket_resourcesReceivingAccess = (Bucket -> Maybe [ResourceReceivingAccess])
-> (Bucket -> Maybe [ResourceReceivingAccess] -> Bucket)
-> Lens
Bucket
Bucket
(Maybe [ResourceReceivingAccess])
(Maybe [ResourceReceivingAccess])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Bucket' {Maybe [ResourceReceivingAccess]
resourcesReceivingAccess :: Maybe [ResourceReceivingAccess]
$sel:resourcesReceivingAccess:Bucket' :: Bucket -> Maybe [ResourceReceivingAccess]
resourcesReceivingAccess} -> Maybe [ResourceReceivingAccess]
resourcesReceivingAccess) (\s :: Bucket
s@Bucket' {} Maybe [ResourceReceivingAccess]
a -> Bucket
s {$sel:resourcesReceivingAccess:Bucket' :: Maybe [ResourceReceivingAccess]
resourcesReceivingAccess = Maybe [ResourceReceivingAccess]
a} :: Bucket) ((Maybe [ResourceReceivingAccess]
-> f (Maybe [ResourceReceivingAccess]))
-> Bucket -> f Bucket)
-> ((Maybe [ResourceReceivingAccess]
-> f (Maybe [ResourceReceivingAccess]))
-> Maybe [ResourceReceivingAccess]
-> f (Maybe [ResourceReceivingAccess]))
-> (Maybe [ResourceReceivingAccess]
-> f (Maybe [ResourceReceivingAccess]))
-> Bucket
-> f Bucket
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ResourceReceivingAccess]
[ResourceReceivingAccess]
[ResourceReceivingAccess]
[ResourceReceivingAccess]
-> Iso
(Maybe [ResourceReceivingAccess])
(Maybe [ResourceReceivingAccess])
(Maybe [ResourceReceivingAccess])
(Maybe [ResourceReceivingAccess])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[ResourceReceivingAccess]
[ResourceReceivingAccess]
[ResourceReceivingAccess]
[ResourceReceivingAccess]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
bucket_bundleId :: Lens.Lens' Bucket (Prelude.Maybe Prelude.Text)
bucket_bundleId :: (Maybe Text -> f (Maybe Text)) -> Bucket -> f Bucket
bucket_bundleId = (Bucket -> Maybe Text)
-> (Bucket -> Maybe Text -> Bucket)
-> Lens Bucket Bucket (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Bucket' {Maybe Text
bundleId :: Maybe Text
$sel:bundleId:Bucket' :: Bucket -> Maybe Text
bundleId} -> Maybe Text
bundleId) (\s :: Bucket
s@Bucket' {} Maybe Text
a -> Bucket
s {$sel:bundleId:Bucket' :: Maybe Text
bundleId = Maybe Text
a} :: Bucket)
bucket_accessRules :: Lens.Lens' Bucket (Prelude.Maybe AccessRules)
bucket_accessRules :: (Maybe AccessRules -> f (Maybe AccessRules)) -> Bucket -> f Bucket
bucket_accessRules = (Bucket -> Maybe AccessRules)
-> (Bucket -> Maybe AccessRules -> Bucket)
-> Lens Bucket Bucket (Maybe AccessRules) (Maybe AccessRules)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Bucket' {Maybe AccessRules
accessRules :: Maybe AccessRules
$sel:accessRules:Bucket' :: Bucket -> Maybe AccessRules
accessRules} -> Maybe AccessRules
accessRules) (\s :: Bucket
s@Bucket' {} Maybe AccessRules
a -> Bucket
s {$sel:accessRules:Bucket' :: Maybe AccessRules
accessRules = Maybe AccessRules
a} :: Bucket)
bucket_ableToUpdateBundle :: Lens.Lens' Bucket (Prelude.Maybe Prelude.Bool)
bucket_ableToUpdateBundle :: (Maybe Bool -> f (Maybe Bool)) -> Bucket -> f Bucket
bucket_ableToUpdateBundle = (Bucket -> Maybe Bool)
-> (Bucket -> Maybe Bool -> Bucket)
-> Lens Bucket Bucket (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Bucket' {Maybe Bool
ableToUpdateBundle :: Maybe Bool
$sel:ableToUpdateBundle:Bucket' :: Bucket -> Maybe Bool
ableToUpdateBundle} -> Maybe Bool
ableToUpdateBundle) (\s :: Bucket
s@Bucket' {} Maybe Bool
a -> Bucket
s {$sel:ableToUpdateBundle:Bucket' :: Maybe Bool
ableToUpdateBundle = Maybe Bool
a} :: Bucket)
bucket_name :: Lens.Lens' Bucket (Prelude.Maybe Prelude.Text)
bucket_name :: (Maybe Text -> f (Maybe Text)) -> Bucket -> f Bucket
bucket_name = (Bucket -> Maybe Text)
-> (Bucket -> Maybe Text -> Bucket)
-> Lens Bucket Bucket (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Bucket' {Maybe Text
name :: Maybe Text
$sel:name:Bucket' :: Bucket -> Maybe Text
name} -> Maybe Text
name) (\s :: Bucket
s@Bucket' {} Maybe Text
a -> Bucket
s {$sel:name:Bucket' :: Maybe Text
name = Maybe Text
a} :: Bucket)
bucket_supportCode :: Lens.Lens' Bucket (Prelude.Maybe Prelude.Text)
bucket_supportCode :: (Maybe Text -> f (Maybe Text)) -> Bucket -> f Bucket
bucket_supportCode = (Bucket -> Maybe Text)
-> (Bucket -> Maybe Text -> Bucket)
-> Lens Bucket Bucket (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Bucket' {Maybe Text
supportCode :: Maybe Text
$sel:supportCode:Bucket' :: Bucket -> Maybe Text
supportCode} -> Maybe Text
supportCode) (\s :: Bucket
s@Bucket' {} Maybe Text
a -> Bucket
s {$sel:supportCode:Bucket' :: Maybe Text
supportCode = Maybe Text
a} :: Bucket)
bucket_tags :: Lens.Lens' Bucket (Prelude.Maybe [Tag])
bucket_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> Bucket -> f Bucket
bucket_tags = (Bucket -> Maybe [Tag])
-> (Bucket -> Maybe [Tag] -> Bucket)
-> Lens Bucket Bucket (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Bucket' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:Bucket' :: Bucket -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: Bucket
s@Bucket' {} Maybe [Tag]
a -> Bucket
s {$sel:tags:Bucket' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: Bucket) ((Maybe [Tag] -> f (Maybe [Tag])) -> Bucket -> f Bucket)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> Bucket
-> f Bucket
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON Bucket where
parseJSON :: Value -> Parser Bucket
parseJSON =
String -> (Object -> Parser Bucket) -> Value -> Parser Bucket
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Bucket"
( \Object
x ->
Maybe BucketState
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe [Text]
-> Maybe Text
-> Maybe [ResourceReceivingAccess]
-> Maybe Text
-> Maybe AccessRules
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Bucket
Bucket'
(Maybe BucketState
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe [Text]
-> Maybe Text
-> Maybe [ResourceReceivingAccess]
-> Maybe Text
-> Maybe AccessRules
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Bucket)
-> Parser (Maybe BucketState)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe [Text]
-> Maybe Text
-> Maybe [ResourceReceivingAccess]
-> Maybe Text
-> Maybe AccessRules
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Bucket)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe BucketState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"state")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe [Text]
-> Maybe Text
-> Maybe [ResourceReceivingAccess]
-> Maybe Text
-> Maybe AccessRules
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Bucket)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe [Text]
-> Maybe Text
-> Maybe [ResourceReceivingAccess]
-> Maybe Text
-> Maybe AccessRules
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Bucket)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"objectVersioning")
Parser
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe [Text]
-> Maybe Text
-> Maybe [ResourceReceivingAccess]
-> Maybe Text
-> Maybe AccessRules
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Bucket)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe [Text]
-> Maybe Text
-> Maybe [ResourceReceivingAccess]
-> Maybe Text
-> Maybe AccessRules
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Bucket)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"resourceType")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe ResourceLocation
-> Maybe [Text]
-> Maybe Text
-> Maybe [ResourceReceivingAccess]
-> Maybe Text
-> Maybe AccessRules
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Bucket)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe ResourceLocation
-> Maybe [Text]
-> Maybe Text
-> Maybe [ResourceReceivingAccess]
-> Maybe Text
-> Maybe AccessRules
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Bucket)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"arn")
Parser
(Maybe POSIX
-> Maybe ResourceLocation
-> Maybe [Text]
-> Maybe Text
-> Maybe [ResourceReceivingAccess]
-> Maybe Text
-> Maybe AccessRules
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Bucket)
-> Parser (Maybe POSIX)
-> Parser
(Maybe ResourceLocation
-> Maybe [Text]
-> Maybe Text
-> Maybe [ResourceReceivingAccess]
-> Maybe Text
-> Maybe AccessRules
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Bucket)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"createdAt")
Parser
(Maybe ResourceLocation
-> Maybe [Text]
-> Maybe Text
-> Maybe [ResourceReceivingAccess]
-> Maybe Text
-> Maybe AccessRules
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Bucket)
-> Parser (Maybe ResourceLocation)
-> Parser
(Maybe [Text]
-> Maybe Text
-> Maybe [ResourceReceivingAccess]
-> Maybe Text
-> Maybe AccessRules
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Bucket)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ResourceLocation)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"location")
Parser
(Maybe [Text]
-> Maybe Text
-> Maybe [ResourceReceivingAccess]
-> Maybe Text
-> Maybe AccessRules
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Bucket)
-> Parser (Maybe [Text])
-> Parser
(Maybe Text
-> Maybe [ResourceReceivingAccess]
-> Maybe Text
-> Maybe AccessRules
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Bucket)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"readonlyAccessAccounts"
Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe Text
-> Maybe [ResourceReceivingAccess]
-> Maybe Text
-> Maybe AccessRules
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Bucket)
-> Parser (Maybe Text)
-> Parser
(Maybe [ResourceReceivingAccess]
-> Maybe Text
-> Maybe AccessRules
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Bucket)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"url")
Parser
(Maybe [ResourceReceivingAccess]
-> Maybe Text
-> Maybe AccessRules
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Bucket)
-> Parser (Maybe [ResourceReceivingAccess])
-> Parser
(Maybe Text
-> Maybe AccessRules
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Bucket)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [ResourceReceivingAccess]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"resourcesReceivingAccess"
Parser (Maybe (Maybe [ResourceReceivingAccess]))
-> Maybe [ResourceReceivingAccess]
-> Parser (Maybe [ResourceReceivingAccess])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ResourceReceivingAccess]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe Text
-> Maybe AccessRules
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Bucket)
-> Parser (Maybe Text)
-> Parser
(Maybe AccessRules
-> Maybe Bool -> Maybe Text -> Maybe Text -> Maybe [Tag] -> Bucket)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"bundleId")
Parser
(Maybe AccessRules
-> Maybe Bool -> Maybe Text -> Maybe Text -> Maybe [Tag] -> Bucket)
-> Parser (Maybe AccessRules)
-> Parser
(Maybe Bool -> Maybe Text -> Maybe Text -> Maybe [Tag] -> Bucket)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AccessRules)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"accessRules")
Parser
(Maybe Bool -> Maybe Text -> Maybe Text -> Maybe [Tag] -> Bucket)
-> Parser (Maybe Bool)
-> Parser (Maybe Text -> Maybe Text -> Maybe [Tag] -> Bucket)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ableToUpdateBundle")
Parser (Maybe Text -> Maybe Text -> Maybe [Tag] -> Bucket)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe [Tag] -> Bucket)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"name")
Parser (Maybe Text -> Maybe [Tag] -> Bucket)
-> Parser (Maybe Text) -> Parser (Maybe [Tag] -> Bucket)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"supportCode")
Parser (Maybe [Tag] -> Bucket)
-> Parser (Maybe [Tag]) -> Parser Bucket
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe [Tag])) -> Maybe [Tag] -> Parser (Maybe [Tag])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable Bucket
instance Prelude.NFData Bucket