module Stratosphere.Bedrock.Agent.SessionSummaryConfigurationProperty (
        SessionSummaryConfigurationProperty(..),
        mkSessionSummaryConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SessionSummaryConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-sessionsummaryconfiguration.html>
    SessionSummaryConfigurationProperty {SessionSummaryConfigurationProperty -> ()
haddock_workaround_ :: (),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-sessionsummaryconfiguration.html#cfn-bedrock-agent-sessionsummaryconfiguration-maxrecentsessions>
                                         SessionSummaryConfigurationProperty -> Maybe (Value Double)
maxRecentSessions :: (Prelude.Maybe (Value Prelude.Double))}
  deriving stock (SessionSummaryConfigurationProperty
-> SessionSummaryConfigurationProperty -> Bool
(SessionSummaryConfigurationProperty
 -> SessionSummaryConfigurationProperty -> Bool)
-> (SessionSummaryConfigurationProperty
    -> SessionSummaryConfigurationProperty -> Bool)
-> Eq SessionSummaryConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SessionSummaryConfigurationProperty
-> SessionSummaryConfigurationProperty -> Bool
== :: SessionSummaryConfigurationProperty
-> SessionSummaryConfigurationProperty -> Bool
$c/= :: SessionSummaryConfigurationProperty
-> SessionSummaryConfigurationProperty -> Bool
/= :: SessionSummaryConfigurationProperty
-> SessionSummaryConfigurationProperty -> Bool
Prelude.Eq, Int -> SessionSummaryConfigurationProperty -> ShowS
[SessionSummaryConfigurationProperty] -> ShowS
SessionSummaryConfigurationProperty -> String
(Int -> SessionSummaryConfigurationProperty -> ShowS)
-> (SessionSummaryConfigurationProperty -> String)
-> ([SessionSummaryConfigurationProperty] -> ShowS)
-> Show SessionSummaryConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SessionSummaryConfigurationProperty -> ShowS
showsPrec :: Int -> SessionSummaryConfigurationProperty -> ShowS
$cshow :: SessionSummaryConfigurationProperty -> String
show :: SessionSummaryConfigurationProperty -> String
$cshowList :: [SessionSummaryConfigurationProperty] -> ShowS
showList :: [SessionSummaryConfigurationProperty] -> ShowS
Prelude.Show)
mkSessionSummaryConfigurationProperty ::
  SessionSummaryConfigurationProperty
mkSessionSummaryConfigurationProperty :: SessionSummaryConfigurationProperty
mkSessionSummaryConfigurationProperty
  = SessionSummaryConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), maxRecentSessions :: Maybe (Value Double)
maxRecentSessions = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SessionSummaryConfigurationProperty where
  toResourceProperties :: SessionSummaryConfigurationProperty -> ResourceProperties
toResourceProperties SessionSummaryConfigurationProperty {Maybe (Value Double)
()
haddock_workaround_ :: SessionSummaryConfigurationProperty -> ()
maxRecentSessions :: SessionSummaryConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
maxRecentSessions :: Maybe (Value Double)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Bedrock::Agent.SessionSummaryConfiguration",
         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 -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MaxRecentSessions" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
maxRecentSessions])}
instance JSON.ToJSON SessionSummaryConfigurationProperty where
  toJSON :: SessionSummaryConfigurationProperty -> Value
toJSON SessionSummaryConfigurationProperty {Maybe (Value Double)
()
haddock_workaround_ :: SessionSummaryConfigurationProperty -> ()
maxRecentSessions :: SessionSummaryConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
maxRecentSessions :: Maybe (Value Double)
..}
    = [(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 -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"MaxRecentSessions" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
maxRecentSessions]))
instance Property "MaxRecentSessions" SessionSummaryConfigurationProperty where
  type PropertyType "MaxRecentSessions" SessionSummaryConfigurationProperty = Value Prelude.Double
  set :: PropertyType
  "MaxRecentSessions" SessionSummaryConfigurationProperty
-> SessionSummaryConfigurationProperty
-> SessionSummaryConfigurationProperty
set PropertyType
  "MaxRecentSessions" SessionSummaryConfigurationProperty
newValue SessionSummaryConfigurationProperty {Maybe (Value Double)
()
haddock_workaround_ :: SessionSummaryConfigurationProperty -> ()
maxRecentSessions :: SessionSummaryConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
maxRecentSessions :: Maybe (Value Double)
..}
    = SessionSummaryConfigurationProperty
        {maxRecentSessions :: Maybe (Value Double)
maxRecentSessions = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "MaxRecentSessions" SessionSummaryConfigurationProperty
Value Double
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}