{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.AlexaBusiness.Types.BusinessReportS3Location
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.AlexaBusiness.Types.BusinessReportS3Location 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

-- | The S3 location of the output reports.
--
-- /See:/ 'newBusinessReportS3Location' smart constructor.
data BusinessReportS3Location = BusinessReportS3Location'
  { -- | The S3 bucket name of the output reports.
    BusinessReportS3Location -> Maybe Text
bucketName :: Prelude.Maybe Prelude.Text,
    -- | The path of the business report.
    BusinessReportS3Location -> Maybe Text
path :: Prelude.Maybe Prelude.Text
  }
  deriving (BusinessReportS3Location -> BusinessReportS3Location -> Bool
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]
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
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.
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)

-- |
-- Create a value of 'BusinessReportS3Location' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'bucketName', 'businessReportS3Location_bucketName' - The S3 bucket name of the output reports.
--
-- 'path', 'businessReportS3Location_path' - The path of the business report.
newBusinessReportS3Location ::
  BusinessReportS3Location
newBusinessReportS3Location :: BusinessReportS3Location
newBusinessReportS3Location =
  BusinessReportS3Location'
    { $sel:bucketName:BusinessReportS3Location' :: Maybe Text
bucketName =
        forall a. Maybe a
Prelude.Nothing,
      $sel:path:BusinessReportS3Location' :: Maybe Text
path = forall a. Maybe a
Prelude.Nothing
    }

-- | The S3 bucket name of the output reports.
businessReportS3Location_bucketName :: Lens.Lens' BusinessReportS3Location (Prelude.Maybe Prelude.Text)
businessReportS3Location_bucketName :: Lens' BusinessReportS3Location (Maybe Text)
businessReportS3Location_bucketName = 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)

-- | The path of the business report.
businessReportS3Location_path :: Lens.Lens' BusinessReportS3Location (Prelude.Maybe Prelude.Text)
businessReportS3Location_path :: Lens' BusinessReportS3Location (Maybe Text)
businessReportS3Location_path = 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)

instance Data.FromJSON BusinessReportS3Location where
  parseJSON :: Value -> Parser BusinessReportS3Location
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"BusinessReportS3Location"
      ( \Object
x ->
          Maybe Text -> Maybe Text -> BusinessReportS3Location
BusinessReportS3Location'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"BucketName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Path")
      )

instance Prelude.Hashable BusinessReportS3Location where
  hashWithSalt :: Int -> BusinessReportS3Location -> Int
hashWithSalt Int
_salt BusinessReportS3Location' {Maybe Text
path :: Maybe Text
bucketName :: Maybe Text
$sel:path:BusinessReportS3Location' :: BusinessReportS3Location -> Maybe Text
$sel:bucketName:BusinessReportS3Location' :: BusinessReportS3Location -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
bucketName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
path

instance Prelude.NFData BusinessReportS3Location where
  rnf :: BusinessReportS3Location -> ()
rnf BusinessReportS3Location' {Maybe Text
path :: Maybe Text
bucketName :: Maybe Text
$sel:path:BusinessReportS3Location' :: BusinessReportS3Location -> Maybe Text
$sel:bucketName:BusinessReportS3Location' :: BusinessReportS3Location -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
bucketName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
path