module Stratosphere.LicenseManager.License.ConsumptionConfigurationProperty (
        module Exports, ConsumptionConfigurationProperty(..),
        mkConsumptionConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.LicenseManager.License.BorrowConfigurationProperty as Exports
import {-# SOURCE #-} Stratosphere.LicenseManager.License.ProvisionalConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ConsumptionConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-licensemanager-license-consumptionconfiguration.html>
    ConsumptionConfigurationProperty {ConsumptionConfigurationProperty -> ()
haddock_workaround_ :: (),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-licensemanager-license-consumptionconfiguration.html#cfn-licensemanager-license-consumptionconfiguration-borrowconfiguration>
                                      ConsumptionConfigurationProperty
-> Maybe BorrowConfigurationProperty
borrowConfiguration :: (Prelude.Maybe BorrowConfigurationProperty),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-licensemanager-license-consumptionconfiguration.html#cfn-licensemanager-license-consumptionconfiguration-provisionalconfiguration>
                                      ConsumptionConfigurationProperty
-> Maybe ProvisionalConfigurationProperty
provisionalConfiguration :: (Prelude.Maybe ProvisionalConfigurationProperty),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-licensemanager-license-consumptionconfiguration.html#cfn-licensemanager-license-consumptionconfiguration-renewtype>
                                      ConsumptionConfigurationProperty -> Maybe (Value Text)
renewType :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ConsumptionConfigurationProperty
-> ConsumptionConfigurationProperty -> Bool
(ConsumptionConfigurationProperty
 -> ConsumptionConfigurationProperty -> Bool)
-> (ConsumptionConfigurationProperty
    -> ConsumptionConfigurationProperty -> Bool)
-> Eq ConsumptionConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ConsumptionConfigurationProperty
-> ConsumptionConfigurationProperty -> Bool
== :: ConsumptionConfigurationProperty
-> ConsumptionConfigurationProperty -> Bool
$c/= :: ConsumptionConfigurationProperty
-> ConsumptionConfigurationProperty -> Bool
/= :: ConsumptionConfigurationProperty
-> ConsumptionConfigurationProperty -> Bool
Prelude.Eq, Int -> ConsumptionConfigurationProperty -> ShowS
[ConsumptionConfigurationProperty] -> ShowS
ConsumptionConfigurationProperty -> String
(Int -> ConsumptionConfigurationProperty -> ShowS)
-> (ConsumptionConfigurationProperty -> String)
-> ([ConsumptionConfigurationProperty] -> ShowS)
-> Show ConsumptionConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ConsumptionConfigurationProperty -> ShowS
showsPrec :: Int -> ConsumptionConfigurationProperty -> ShowS
$cshow :: ConsumptionConfigurationProperty -> String
show :: ConsumptionConfigurationProperty -> String
$cshowList :: [ConsumptionConfigurationProperty] -> ShowS
showList :: [ConsumptionConfigurationProperty] -> ShowS
Prelude.Show)
mkConsumptionConfigurationProperty ::
  ConsumptionConfigurationProperty
mkConsumptionConfigurationProperty :: ConsumptionConfigurationProperty
mkConsumptionConfigurationProperty
  = ConsumptionConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), borrowConfiguration :: Maybe BorrowConfigurationProperty
borrowConfiguration = Maybe BorrowConfigurationProperty
forall a. Maybe a
Prelude.Nothing,
       provisionalConfiguration :: Maybe ProvisionalConfigurationProperty
provisionalConfiguration = Maybe ProvisionalConfigurationProperty
forall a. Maybe a
Prelude.Nothing,
       renewType :: Maybe (Value Text)
renewType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ConsumptionConfigurationProperty where
  toResourceProperties :: ConsumptionConfigurationProperty -> ResourceProperties
toResourceProperties ConsumptionConfigurationProperty {Maybe (Value Text)
Maybe BorrowConfigurationProperty
Maybe ProvisionalConfigurationProperty
()
haddock_workaround_ :: ConsumptionConfigurationProperty -> ()
borrowConfiguration :: ConsumptionConfigurationProperty
-> Maybe BorrowConfigurationProperty
provisionalConfiguration :: ConsumptionConfigurationProperty
-> Maybe ProvisionalConfigurationProperty
renewType :: ConsumptionConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
borrowConfiguration :: Maybe BorrowConfigurationProperty
provisionalConfiguration :: Maybe ProvisionalConfigurationProperty
renewType :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::LicenseManager::License.ConsumptionConfiguration",
         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 -> BorrowConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"BorrowConfiguration" (BorrowConfigurationProperty -> (Key, Value))
-> Maybe BorrowConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BorrowConfigurationProperty
borrowConfiguration,
                            Key -> ProvisionalConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ProvisionalConfiguration"
                              (ProvisionalConfigurationProperty -> (Key, Value))
-> Maybe ProvisionalConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProvisionalConfigurationProperty
provisionalConfiguration,
                            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..=) Key
"RenewType" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
renewType])}
instance JSON.ToJSON ConsumptionConfigurationProperty where
  toJSON :: ConsumptionConfigurationProperty -> Value
toJSON ConsumptionConfigurationProperty {Maybe (Value Text)
Maybe BorrowConfigurationProperty
Maybe ProvisionalConfigurationProperty
()
haddock_workaround_ :: ConsumptionConfigurationProperty -> ()
borrowConfiguration :: ConsumptionConfigurationProperty
-> Maybe BorrowConfigurationProperty
provisionalConfiguration :: ConsumptionConfigurationProperty
-> Maybe ProvisionalConfigurationProperty
renewType :: ConsumptionConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
borrowConfiguration :: Maybe BorrowConfigurationProperty
provisionalConfiguration :: Maybe ProvisionalConfigurationProperty
renewType :: Maybe (Value Text)
..}
    = [(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 -> BorrowConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"BorrowConfiguration" (BorrowConfigurationProperty -> (Key, Value))
-> Maybe BorrowConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BorrowConfigurationProperty
borrowConfiguration,
               Key -> ProvisionalConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ProvisionalConfiguration"
                 (ProvisionalConfigurationProperty -> (Key, Value))
-> Maybe ProvisionalConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProvisionalConfigurationProperty
provisionalConfiguration,
               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..=) Key
"RenewType" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
renewType]))
instance Property "BorrowConfiguration" ConsumptionConfigurationProperty where
  type PropertyType "BorrowConfiguration" ConsumptionConfigurationProperty = BorrowConfigurationProperty
  set :: PropertyType "BorrowConfiguration" ConsumptionConfigurationProperty
-> ConsumptionConfigurationProperty
-> ConsumptionConfigurationProperty
set PropertyType "BorrowConfiguration" ConsumptionConfigurationProperty
newValue ConsumptionConfigurationProperty {Maybe (Value Text)
Maybe BorrowConfigurationProperty
Maybe ProvisionalConfigurationProperty
()
haddock_workaround_ :: ConsumptionConfigurationProperty -> ()
borrowConfiguration :: ConsumptionConfigurationProperty
-> Maybe BorrowConfigurationProperty
provisionalConfiguration :: ConsumptionConfigurationProperty
-> Maybe ProvisionalConfigurationProperty
renewType :: ConsumptionConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
borrowConfiguration :: Maybe BorrowConfigurationProperty
provisionalConfiguration :: Maybe ProvisionalConfigurationProperty
renewType :: Maybe (Value Text)
..}
    = ConsumptionConfigurationProperty
        {borrowConfiguration :: Maybe BorrowConfigurationProperty
borrowConfiguration = BorrowConfigurationProperty -> Maybe BorrowConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "BorrowConfiguration" ConsumptionConfigurationProperty
BorrowConfigurationProperty
newValue, Maybe (Value Text)
Maybe ProvisionalConfigurationProperty
()
haddock_workaround_ :: ()
provisionalConfiguration :: Maybe ProvisionalConfigurationProperty
renewType :: Maybe (Value Text)
haddock_workaround_ :: ()
provisionalConfiguration :: Maybe ProvisionalConfigurationProperty
renewType :: Maybe (Value Text)
..}
instance Property "ProvisionalConfiguration" ConsumptionConfigurationProperty where
  type PropertyType "ProvisionalConfiguration" ConsumptionConfigurationProperty = ProvisionalConfigurationProperty
  set :: PropertyType
  "ProvisionalConfiguration" ConsumptionConfigurationProperty
-> ConsumptionConfigurationProperty
-> ConsumptionConfigurationProperty
set PropertyType
  "ProvisionalConfiguration" ConsumptionConfigurationProperty
newValue ConsumptionConfigurationProperty {Maybe (Value Text)
Maybe BorrowConfigurationProperty
Maybe ProvisionalConfigurationProperty
()
haddock_workaround_ :: ConsumptionConfigurationProperty -> ()
borrowConfiguration :: ConsumptionConfigurationProperty
-> Maybe BorrowConfigurationProperty
provisionalConfiguration :: ConsumptionConfigurationProperty
-> Maybe ProvisionalConfigurationProperty
renewType :: ConsumptionConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
borrowConfiguration :: Maybe BorrowConfigurationProperty
provisionalConfiguration :: Maybe ProvisionalConfigurationProperty
renewType :: Maybe (Value Text)
..}
    = ConsumptionConfigurationProperty
        {provisionalConfiguration :: Maybe ProvisionalConfigurationProperty
provisionalConfiguration = ProvisionalConfigurationProperty
-> Maybe ProvisionalConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "ProvisionalConfiguration" ConsumptionConfigurationProperty
ProvisionalConfigurationProperty
newValue, Maybe (Value Text)
Maybe BorrowConfigurationProperty
()
haddock_workaround_ :: ()
borrowConfiguration :: Maybe BorrowConfigurationProperty
renewType :: Maybe (Value Text)
haddock_workaround_ :: ()
borrowConfiguration :: Maybe BorrowConfigurationProperty
renewType :: Maybe (Value Text)
..}
instance Property "RenewType" ConsumptionConfigurationProperty where
  type PropertyType "RenewType" ConsumptionConfigurationProperty = Value Prelude.Text
  set :: PropertyType "RenewType" ConsumptionConfigurationProperty
-> ConsumptionConfigurationProperty
-> ConsumptionConfigurationProperty
set PropertyType "RenewType" ConsumptionConfigurationProperty
newValue ConsumptionConfigurationProperty {Maybe (Value Text)
Maybe BorrowConfigurationProperty
Maybe ProvisionalConfigurationProperty
()
haddock_workaround_ :: ConsumptionConfigurationProperty -> ()
borrowConfiguration :: ConsumptionConfigurationProperty
-> Maybe BorrowConfigurationProperty
provisionalConfiguration :: ConsumptionConfigurationProperty
-> Maybe ProvisionalConfigurationProperty
renewType :: ConsumptionConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
borrowConfiguration :: Maybe BorrowConfigurationProperty
provisionalConfiguration :: Maybe ProvisionalConfigurationProperty
renewType :: Maybe (Value Text)
..}
    = ConsumptionConfigurationProperty
        {renewType :: Maybe (Value Text)
renewType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RenewType" ConsumptionConfigurationProperty
Value Text
newValue, Maybe BorrowConfigurationProperty
Maybe ProvisionalConfigurationProperty
()
haddock_workaround_ :: ()
borrowConfiguration :: Maybe BorrowConfigurationProperty
provisionalConfiguration :: Maybe ProvisionalConfigurationProperty
haddock_workaround_ :: ()
borrowConfiguration :: Maybe BorrowConfigurationProperty
provisionalConfiguration :: Maybe ProvisionalConfigurationProperty
..}