{-# 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.AlexaBusiness.Types.BusinessReportS3Location where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data BusinessReportS3Location = BusinessReportS3Location'
{
BusinessReportS3Location -> Maybe Text
path :: Prelude.Maybe Prelude.Text,
BusinessReportS3Location -> Maybe Text
bucketName :: Prelude.Maybe Prelude.Text
}
deriving (BusinessReportS3Location -> BusinessReportS3Location -> Bool
(BusinessReportS3Location -> BusinessReportS3Location -> Bool)
-> (BusinessReportS3Location -> BusinessReportS3Location -> Bool)
-> Eq BusinessReportS3Location
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BusinessReportS3Location -> BusinessReportS3Location -> Bool
$c/= :: BusinessReportS3Location -> BusinessReportS3Location -> Bool
== :: BusinessReportS3Location -> BusinessReportS3Location -> Bool
$c== :: BusinessReportS3Location -> BusinessReportS3Location -> Bool
Prelude.Eq, ReadPrec [BusinessReportS3Location]
ReadPrec BusinessReportS3Location
Int -> ReadS BusinessReportS3Location
ReadS [BusinessReportS3Location]
(Int -> ReadS BusinessReportS3Location)
-> ReadS [BusinessReportS3Location]
-> ReadPrec BusinessReportS3Location
-> ReadPrec [BusinessReportS3Location]
-> Read BusinessReportS3Location
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BusinessReportS3Location]
$creadListPrec :: ReadPrec [BusinessReportS3Location]
readPrec :: ReadPrec BusinessReportS3Location
$creadPrec :: ReadPrec BusinessReportS3Location
readList :: ReadS [BusinessReportS3Location]
$creadList :: ReadS [BusinessReportS3Location]
readsPrec :: Int -> ReadS BusinessReportS3Location
$creadsPrec :: Int -> ReadS BusinessReportS3Location
Prelude.Read, Int -> BusinessReportS3Location -> ShowS
[BusinessReportS3Location] -> ShowS
BusinessReportS3Location -> String
(Int -> BusinessReportS3Location -> ShowS)
-> (BusinessReportS3Location -> String)
-> ([BusinessReportS3Location] -> ShowS)
-> Show BusinessReportS3Location
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BusinessReportS3Location] -> ShowS
$cshowList :: [BusinessReportS3Location] -> ShowS
show :: BusinessReportS3Location -> String
$cshow :: BusinessReportS3Location -> String
showsPrec :: Int -> BusinessReportS3Location -> ShowS
$cshowsPrec :: Int -> BusinessReportS3Location -> ShowS
Prelude.Show, (forall x.
BusinessReportS3Location -> Rep BusinessReportS3Location x)
-> (forall x.
Rep BusinessReportS3Location x -> BusinessReportS3Location)
-> Generic BusinessReportS3Location
forall x.
Rep BusinessReportS3Location x -> BusinessReportS3Location
forall x.
BusinessReportS3Location -> Rep BusinessReportS3Location x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BusinessReportS3Location x -> BusinessReportS3Location
$cfrom :: forall x.
BusinessReportS3Location -> Rep BusinessReportS3Location x
Prelude.Generic)
newBusinessReportS3Location ::
BusinessReportS3Location
newBusinessReportS3Location :: BusinessReportS3Location
newBusinessReportS3Location =
BusinessReportS3Location' :: Maybe Text -> Maybe Text -> BusinessReportS3Location
BusinessReportS3Location'
{ $sel:path:BusinessReportS3Location' :: Maybe Text
path = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:bucketName:BusinessReportS3Location' :: Maybe Text
bucketName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
businessReportS3Location_path :: Lens.Lens' BusinessReportS3Location (Prelude.Maybe Prelude.Text)
businessReportS3Location_path :: (Maybe Text -> f (Maybe Text))
-> BusinessReportS3Location -> f BusinessReportS3Location
businessReportS3Location_path = (BusinessReportS3Location -> Maybe Text)
-> (BusinessReportS3Location
-> Maybe Text -> BusinessReportS3Location)
-> Lens
BusinessReportS3Location
BusinessReportS3Location
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BusinessReportS3Location' {Maybe Text
path :: Maybe Text
$sel:path:BusinessReportS3Location' :: BusinessReportS3Location -> Maybe Text
path} -> Maybe Text
path) (\s :: BusinessReportS3Location
s@BusinessReportS3Location' {} Maybe Text
a -> BusinessReportS3Location
s {$sel:path:BusinessReportS3Location' :: Maybe Text
path = Maybe Text
a} :: BusinessReportS3Location)
businessReportS3Location_bucketName :: Lens.Lens' BusinessReportS3Location (Prelude.Maybe Prelude.Text)
businessReportS3Location_bucketName :: (Maybe Text -> f (Maybe Text))
-> BusinessReportS3Location -> f BusinessReportS3Location
businessReportS3Location_bucketName = (BusinessReportS3Location -> Maybe Text)
-> (BusinessReportS3Location
-> Maybe Text -> BusinessReportS3Location)
-> Lens
BusinessReportS3Location
BusinessReportS3Location
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BusinessReportS3Location' {Maybe Text
bucketName :: Maybe Text
$sel:bucketName:BusinessReportS3Location' :: BusinessReportS3Location -> Maybe Text
bucketName} -> Maybe Text
bucketName) (\s :: BusinessReportS3Location
s@BusinessReportS3Location' {} Maybe Text
a -> BusinessReportS3Location
s {$sel:bucketName:BusinessReportS3Location' :: Maybe Text
bucketName = Maybe Text
a} :: BusinessReportS3Location)
instance Core.FromJSON BusinessReportS3Location where
parseJSON :: Value -> Parser BusinessReportS3Location
parseJSON =
String
-> (Object -> Parser BusinessReportS3Location)
-> Value
-> Parser BusinessReportS3Location
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"BusinessReportS3Location"
( \Object
x ->
Maybe Text -> Maybe Text -> BusinessReportS3Location
BusinessReportS3Location'
(Maybe Text -> Maybe Text -> BusinessReportS3Location)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> BusinessReportS3Location)
forall (f :: * -> *) a b. Functor 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
"Path")
Parser (Maybe Text -> BusinessReportS3Location)
-> Parser (Maybe Text) -> Parser BusinessReportS3Location
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
"BucketName")
)
instance Prelude.Hashable BusinessReportS3Location
instance Prelude.NFData BusinessReportS3Location