module Stratosphere.PCS.Cluster.AccountingProperty (
        AccountingProperty(..), mkAccountingProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AccountingProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcs-cluster-accounting.html>
    AccountingProperty {AccountingProperty -> ()
haddock_workaround_ :: (),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcs-cluster-accounting.html#cfn-pcs-cluster-accounting-defaultpurgetimeindays>
                        AccountingProperty -> Maybe (Value Integer)
defaultPurgeTimeInDays :: (Prelude.Maybe (Value Prelude.Integer)),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcs-cluster-accounting.html#cfn-pcs-cluster-accounting-mode>
                        AccountingProperty -> Value Text
mode :: (Value Prelude.Text)}
  deriving stock (AccountingProperty -> AccountingProperty -> Bool
(AccountingProperty -> AccountingProperty -> Bool)
-> (AccountingProperty -> AccountingProperty -> Bool)
-> Eq AccountingProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccountingProperty -> AccountingProperty -> Bool
== :: AccountingProperty -> AccountingProperty -> Bool
$c/= :: AccountingProperty -> AccountingProperty -> Bool
/= :: AccountingProperty -> AccountingProperty -> Bool
Prelude.Eq, Int -> AccountingProperty -> ShowS
[AccountingProperty] -> ShowS
AccountingProperty -> String
(Int -> AccountingProperty -> ShowS)
-> (AccountingProperty -> String)
-> ([AccountingProperty] -> ShowS)
-> Show AccountingProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccountingProperty -> ShowS
showsPrec :: Int -> AccountingProperty -> ShowS
$cshow :: AccountingProperty -> String
show :: AccountingProperty -> String
$cshowList :: [AccountingProperty] -> ShowS
showList :: [AccountingProperty] -> ShowS
Prelude.Show)
mkAccountingProperty :: Value Prelude.Text -> AccountingProperty
mkAccountingProperty :: Value Text -> AccountingProperty
mkAccountingProperty Value Text
mode
  = AccountingProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), mode :: Value Text
mode = Value Text
mode,
       defaultPurgeTimeInDays :: Maybe (Value Integer)
defaultPurgeTimeInDays = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AccountingProperty where
  toResourceProperties :: AccountingProperty -> ResourceProperties
toResourceProperties AccountingProperty {Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: AccountingProperty -> ()
defaultPurgeTimeInDays :: AccountingProperty -> Maybe (Value Integer)
mode :: AccountingProperty -> Value Text
haddock_workaround_ :: ()
defaultPurgeTimeInDays :: Maybe (Value Integer)
mode :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::PCS::Cluster.Accounting",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"Mode" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
mode]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DefaultPurgeTimeInDays"
                                 (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
defaultPurgeTimeInDays]))}
instance JSON.ToJSON AccountingProperty where
  toJSON :: AccountingProperty -> Value
toJSON AccountingProperty {Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: AccountingProperty -> ()
defaultPurgeTimeInDays :: AccountingProperty -> Maybe (Value Integer)
mode :: AccountingProperty -> Value Text
haddock_workaround_ :: ()
defaultPurgeTimeInDays :: Maybe (Value Integer)
mode :: Value Text
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"Mode" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
mode]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"DefaultPurgeTimeInDays"
                    (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
defaultPurgeTimeInDays])))
instance Property "DefaultPurgeTimeInDays" AccountingProperty where
  type PropertyType "DefaultPurgeTimeInDays" AccountingProperty = Value Prelude.Integer
  set :: PropertyType "DefaultPurgeTimeInDays" AccountingProperty
-> AccountingProperty -> AccountingProperty
set PropertyType "DefaultPurgeTimeInDays" AccountingProperty
newValue AccountingProperty {Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: AccountingProperty -> ()
defaultPurgeTimeInDays :: AccountingProperty -> Maybe (Value Integer)
mode :: AccountingProperty -> Value Text
haddock_workaround_ :: ()
defaultPurgeTimeInDays :: Maybe (Value Integer)
mode :: Value Text
..}
    = AccountingProperty
        {defaultPurgeTimeInDays :: Maybe (Value Integer)
defaultPurgeTimeInDays = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DefaultPurgeTimeInDays" AccountingProperty
Value Integer
newValue, ()
Value Text
haddock_workaround_ :: ()
mode :: Value Text
haddock_workaround_ :: ()
mode :: Value Text
..}
instance Property "Mode" AccountingProperty where
  type PropertyType "Mode" AccountingProperty = Value Prelude.Text
  set :: PropertyType "Mode" AccountingProperty
-> AccountingProperty -> AccountingProperty
set PropertyType "Mode" AccountingProperty
newValue AccountingProperty {Maybe (Value Integer)
()
Value Text
haddock_workaround_ :: AccountingProperty -> ()
defaultPurgeTimeInDays :: AccountingProperty -> Maybe (Value Integer)
mode :: AccountingProperty -> Value Text
haddock_workaround_ :: ()
defaultPurgeTimeInDays :: Maybe (Value Integer)
mode :: Value Text
..}
    = AccountingProperty {mode :: Value Text
mode = PropertyType "Mode" AccountingProperty
Value Text
newValue, Maybe (Value Integer)
()
haddock_workaround_ :: ()
defaultPurgeTimeInDays :: Maybe (Value Integer)
haddock_workaround_ :: ()
defaultPurgeTimeInDays :: Maybe (Value Integer)
..}