module Stratosphere.QBusiness.Index.IndexStatisticsProperty (
        module Exports, IndexStatisticsProperty(..),
        mkIndexStatisticsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.QBusiness.Index.TextDocumentStatisticsProperty as Exports
import Stratosphere.ResourceProperties
data IndexStatisticsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-index-indexstatistics.html>
    IndexStatisticsProperty {IndexStatisticsProperty -> ()
haddock_workaround_ :: (),
                             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-index-indexstatistics.html#cfn-qbusiness-index-indexstatistics-textdocumentstatistics>
                             IndexStatisticsProperty -> Maybe TextDocumentStatisticsProperty
textDocumentStatistics :: (Prelude.Maybe TextDocumentStatisticsProperty)}
  deriving stock (IndexStatisticsProperty -> IndexStatisticsProperty -> Bool
(IndexStatisticsProperty -> IndexStatisticsProperty -> Bool)
-> (IndexStatisticsProperty -> IndexStatisticsProperty -> Bool)
-> Eq IndexStatisticsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IndexStatisticsProperty -> IndexStatisticsProperty -> Bool
== :: IndexStatisticsProperty -> IndexStatisticsProperty -> Bool
$c/= :: IndexStatisticsProperty -> IndexStatisticsProperty -> Bool
/= :: IndexStatisticsProperty -> IndexStatisticsProperty -> Bool
Prelude.Eq, Int -> IndexStatisticsProperty -> ShowS
[IndexStatisticsProperty] -> ShowS
IndexStatisticsProperty -> String
(Int -> IndexStatisticsProperty -> ShowS)
-> (IndexStatisticsProperty -> String)
-> ([IndexStatisticsProperty] -> ShowS)
-> Show IndexStatisticsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IndexStatisticsProperty -> ShowS
showsPrec :: Int -> IndexStatisticsProperty -> ShowS
$cshow :: IndexStatisticsProperty -> String
show :: IndexStatisticsProperty -> String
$cshowList :: [IndexStatisticsProperty] -> ShowS
showList :: [IndexStatisticsProperty] -> ShowS
Prelude.Show)
mkIndexStatisticsProperty :: IndexStatisticsProperty
mkIndexStatisticsProperty :: IndexStatisticsProperty
mkIndexStatisticsProperty
  = IndexStatisticsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       textDocumentStatistics :: Maybe TextDocumentStatisticsProperty
textDocumentStatistics = Maybe TextDocumentStatisticsProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties IndexStatisticsProperty where
  toResourceProperties :: IndexStatisticsProperty -> ResourceProperties
toResourceProperties IndexStatisticsProperty {Maybe TextDocumentStatisticsProperty
()
haddock_workaround_ :: IndexStatisticsProperty -> ()
textDocumentStatistics :: IndexStatisticsProperty -> Maybe TextDocumentStatisticsProperty
haddock_workaround_ :: ()
textDocumentStatistics :: Maybe TextDocumentStatisticsProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QBusiness::Index.IndexStatistics",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                           [Key -> TextDocumentStatisticsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TextDocumentStatistics"
                              (TextDocumentStatisticsProperty -> (Key, Value))
-> Maybe TextDocumentStatisticsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TextDocumentStatisticsProperty
textDocumentStatistics])}
instance JSON.ToJSON IndexStatisticsProperty where
  toJSON :: IndexStatisticsProperty -> Value
toJSON IndexStatisticsProperty {Maybe TextDocumentStatisticsProperty
()
haddock_workaround_ :: IndexStatisticsProperty -> ()
textDocumentStatistics :: IndexStatisticsProperty -> Maybe TextDocumentStatisticsProperty
haddock_workaround_ :: ()
textDocumentStatistics :: Maybe TextDocumentStatisticsProperty
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
              [Key -> TextDocumentStatisticsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"TextDocumentStatistics"
                 (TextDocumentStatisticsProperty -> (Key, Value))
-> Maybe TextDocumentStatisticsProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TextDocumentStatisticsProperty
textDocumentStatistics]))
instance Property "TextDocumentStatistics" IndexStatisticsProperty where
  type PropertyType "TextDocumentStatistics" IndexStatisticsProperty = TextDocumentStatisticsProperty
  set :: PropertyType "TextDocumentStatistics" IndexStatisticsProperty
-> IndexStatisticsProperty -> IndexStatisticsProperty
set PropertyType "TextDocumentStatistics" IndexStatisticsProperty
newValue IndexStatisticsProperty {Maybe TextDocumentStatisticsProperty
()
haddock_workaround_ :: IndexStatisticsProperty -> ()
textDocumentStatistics :: IndexStatisticsProperty -> Maybe TextDocumentStatisticsProperty
haddock_workaround_ :: ()
textDocumentStatistics :: Maybe TextDocumentStatisticsProperty
..}
    = IndexStatisticsProperty
        {textDocumentStatistics :: Maybe TextDocumentStatisticsProperty
textDocumentStatistics = TextDocumentStatisticsProperty
-> Maybe TextDocumentStatisticsProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "TextDocumentStatistics" IndexStatisticsProperty
TextDocumentStatisticsProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}