{-# 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.QuickSight.Types.ExportToCSVOption
-- 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.QuickSight.Types.ExportToCSVOption 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
import Amazonka.QuickSight.Types.DashboardBehavior

-- | Export to .csv option.
--
-- /See:/ 'newExportToCSVOption' smart constructor.
data ExportToCSVOption = ExportToCSVOption'
  { -- | Availability status.
    ExportToCSVOption -> Maybe DashboardBehavior
availabilityStatus :: Prelude.Maybe DashboardBehavior
  }
  deriving (ExportToCSVOption -> ExportToCSVOption -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportToCSVOption -> ExportToCSVOption -> Bool
$c/= :: ExportToCSVOption -> ExportToCSVOption -> Bool
== :: ExportToCSVOption -> ExportToCSVOption -> Bool
$c== :: ExportToCSVOption -> ExportToCSVOption -> Bool
Prelude.Eq, ReadPrec [ExportToCSVOption]
ReadPrec ExportToCSVOption
Int -> ReadS ExportToCSVOption
ReadS [ExportToCSVOption]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExportToCSVOption]
$creadListPrec :: ReadPrec [ExportToCSVOption]
readPrec :: ReadPrec ExportToCSVOption
$creadPrec :: ReadPrec ExportToCSVOption
readList :: ReadS [ExportToCSVOption]
$creadList :: ReadS [ExportToCSVOption]
readsPrec :: Int -> ReadS ExportToCSVOption
$creadsPrec :: Int -> ReadS ExportToCSVOption
Prelude.Read, Int -> ExportToCSVOption -> ShowS
[ExportToCSVOption] -> ShowS
ExportToCSVOption -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExportToCSVOption] -> ShowS
$cshowList :: [ExportToCSVOption] -> ShowS
show :: ExportToCSVOption -> String
$cshow :: ExportToCSVOption -> String
showsPrec :: Int -> ExportToCSVOption -> ShowS
$cshowsPrec :: Int -> ExportToCSVOption -> ShowS
Prelude.Show, forall x. Rep ExportToCSVOption x -> ExportToCSVOption
forall x. ExportToCSVOption -> Rep ExportToCSVOption x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ExportToCSVOption x -> ExportToCSVOption
$cfrom :: forall x. ExportToCSVOption -> Rep ExportToCSVOption x
Prelude.Generic)

-- |
-- Create a value of 'ExportToCSVOption' 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:
--
-- 'availabilityStatus', 'exportToCSVOption_availabilityStatus' - Availability status.
newExportToCSVOption ::
  ExportToCSVOption
newExportToCSVOption :: ExportToCSVOption
newExportToCSVOption =
  ExportToCSVOption'
    { $sel:availabilityStatus:ExportToCSVOption' :: Maybe DashboardBehavior
availabilityStatus =
        forall a. Maybe a
Prelude.Nothing
    }

-- | Availability status.
exportToCSVOption_availabilityStatus :: Lens.Lens' ExportToCSVOption (Prelude.Maybe DashboardBehavior)
exportToCSVOption_availabilityStatus :: Lens' ExportToCSVOption (Maybe DashboardBehavior)
exportToCSVOption_availabilityStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportToCSVOption' {Maybe DashboardBehavior
availabilityStatus :: Maybe DashboardBehavior
$sel:availabilityStatus:ExportToCSVOption' :: ExportToCSVOption -> Maybe DashboardBehavior
availabilityStatus} -> Maybe DashboardBehavior
availabilityStatus) (\s :: ExportToCSVOption
s@ExportToCSVOption' {} Maybe DashboardBehavior
a -> ExportToCSVOption
s {$sel:availabilityStatus:ExportToCSVOption' :: Maybe DashboardBehavior
availabilityStatus = Maybe DashboardBehavior
a} :: ExportToCSVOption)

instance Prelude.Hashable ExportToCSVOption where
  hashWithSalt :: Int -> ExportToCSVOption -> Int
hashWithSalt Int
_salt ExportToCSVOption' {Maybe DashboardBehavior
availabilityStatus :: Maybe DashboardBehavior
$sel:availabilityStatus:ExportToCSVOption' :: ExportToCSVOption -> Maybe DashboardBehavior
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DashboardBehavior
availabilityStatus

instance Prelude.NFData ExportToCSVOption where
  rnf :: ExportToCSVOption -> ()
rnf ExportToCSVOption' {Maybe DashboardBehavior
availabilityStatus :: Maybe DashboardBehavior
$sel:availabilityStatus:ExportToCSVOption' :: ExportToCSVOption -> Maybe DashboardBehavior
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe DashboardBehavior
availabilityStatus

instance Data.ToJSON ExportToCSVOption where
  toJSON :: ExportToCSVOption -> Value
toJSON ExportToCSVOption' {Maybe DashboardBehavior
availabilityStatus :: Maybe DashboardBehavior
$sel:availabilityStatus:ExportToCSVOption' :: ExportToCSVOption -> Maybe DashboardBehavior
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"AvailabilityStatus" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DashboardBehavior
availabilityStatus
          ]
      )