module Stratosphere.WorkspacesInstances.WorkspaceInstance.CapacityReservationTargetProperty (
        CapacityReservationTargetProperty(..),
        mkCapacityReservationTargetProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CapacityReservationTargetProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-workspacesinstances-workspaceinstance-capacityreservationtarget.html>
    CapacityReservationTargetProperty {CapacityReservationTargetProperty -> ()
haddock_workaround_ :: (),
                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-workspacesinstances-workspaceinstance-capacityreservationtarget.html#cfn-workspacesinstances-workspaceinstance-capacityreservationtarget-capacityreservationid>
                                       CapacityReservationTargetProperty -> Maybe (Value Text)
capacityReservationId :: (Prelude.Maybe (Value Prelude.Text)),
                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-workspacesinstances-workspaceinstance-capacityreservationtarget.html#cfn-workspacesinstances-workspaceinstance-capacityreservationtarget-capacityreservationresourcegrouparn>
                                       CapacityReservationTargetProperty -> Maybe (Value Text)
capacityReservationResourceGroupArn :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (CapacityReservationTargetProperty
-> CapacityReservationTargetProperty -> Bool
(CapacityReservationTargetProperty
 -> CapacityReservationTargetProperty -> Bool)
-> (CapacityReservationTargetProperty
    -> CapacityReservationTargetProperty -> Bool)
-> Eq CapacityReservationTargetProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CapacityReservationTargetProperty
-> CapacityReservationTargetProperty -> Bool
== :: CapacityReservationTargetProperty
-> CapacityReservationTargetProperty -> Bool
$c/= :: CapacityReservationTargetProperty
-> CapacityReservationTargetProperty -> Bool
/= :: CapacityReservationTargetProperty
-> CapacityReservationTargetProperty -> Bool
Prelude.Eq, Int -> CapacityReservationTargetProperty -> ShowS
[CapacityReservationTargetProperty] -> ShowS
CapacityReservationTargetProperty -> String
(Int -> CapacityReservationTargetProperty -> ShowS)
-> (CapacityReservationTargetProperty -> String)
-> ([CapacityReservationTargetProperty] -> ShowS)
-> Show CapacityReservationTargetProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CapacityReservationTargetProperty -> ShowS
showsPrec :: Int -> CapacityReservationTargetProperty -> ShowS
$cshow :: CapacityReservationTargetProperty -> String
show :: CapacityReservationTargetProperty -> String
$cshowList :: [CapacityReservationTargetProperty] -> ShowS
showList :: [CapacityReservationTargetProperty] -> ShowS
Prelude.Show)
mkCapacityReservationTargetProperty ::
  CapacityReservationTargetProperty
mkCapacityReservationTargetProperty :: CapacityReservationTargetProperty
mkCapacityReservationTargetProperty
  = CapacityReservationTargetProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), capacityReservationId :: Maybe (Value Text)
capacityReservationId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       capacityReservationResourceGroupArn :: Maybe (Value Text)
capacityReservationResourceGroupArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CapacityReservationTargetProperty where
  toResourceProperties :: CapacityReservationTargetProperty -> ResourceProperties
toResourceProperties CapacityReservationTargetProperty {Maybe (Value Text)
()
haddock_workaround_ :: CapacityReservationTargetProperty -> ()
capacityReservationId :: CapacityReservationTargetProperty -> Maybe (Value Text)
capacityReservationResourceGroupArn :: CapacityReservationTargetProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
capacityReservationId :: Maybe (Value Text)
capacityReservationResourceGroupArn :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::WorkspacesInstances::WorkspaceInstance.CapacityReservationTarget",
         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 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
"CapacityReservationId"
                              (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)
capacityReservationId,
                            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
"CapacityReservationResourceGroupArn"
                              (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)
capacityReservationResourceGroupArn])}
instance JSON.ToJSON CapacityReservationTargetProperty where
  toJSON :: CapacityReservationTargetProperty -> Value
toJSON CapacityReservationTargetProperty {Maybe (Value Text)
()
haddock_workaround_ :: CapacityReservationTargetProperty -> ()
capacityReservationId :: CapacityReservationTargetProperty -> Maybe (Value Text)
capacityReservationResourceGroupArn :: CapacityReservationTargetProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
capacityReservationId :: Maybe (Value Text)
capacityReservationResourceGroupArn :: 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 -> 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
"CapacityReservationId"
                 (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)
capacityReservationId,
               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
"CapacityReservationResourceGroupArn"
                 (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)
capacityReservationResourceGroupArn]))
instance Property "CapacityReservationId" CapacityReservationTargetProperty where
  type PropertyType "CapacityReservationId" CapacityReservationTargetProperty = Value Prelude.Text
  set :: PropertyType
  "CapacityReservationId" CapacityReservationTargetProperty
-> CapacityReservationTargetProperty
-> CapacityReservationTargetProperty
set PropertyType
  "CapacityReservationId" CapacityReservationTargetProperty
newValue CapacityReservationTargetProperty {Maybe (Value Text)
()
haddock_workaround_ :: CapacityReservationTargetProperty -> ()
capacityReservationId :: CapacityReservationTargetProperty -> Maybe (Value Text)
capacityReservationResourceGroupArn :: CapacityReservationTargetProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
capacityReservationId :: Maybe (Value Text)
capacityReservationResourceGroupArn :: Maybe (Value Text)
..}
    = CapacityReservationTargetProperty
        {capacityReservationId :: Maybe (Value Text)
capacityReservationId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "CapacityReservationId" CapacityReservationTargetProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
capacityReservationResourceGroupArn :: Maybe (Value Text)
haddock_workaround_ :: ()
capacityReservationResourceGroupArn :: Maybe (Value Text)
..}
instance Property "CapacityReservationResourceGroupArn" CapacityReservationTargetProperty where
  type PropertyType "CapacityReservationResourceGroupArn" CapacityReservationTargetProperty = Value Prelude.Text
  set :: PropertyType
  "CapacityReservationResourceGroupArn"
  CapacityReservationTargetProperty
-> CapacityReservationTargetProperty
-> CapacityReservationTargetProperty
set PropertyType
  "CapacityReservationResourceGroupArn"
  CapacityReservationTargetProperty
newValue CapacityReservationTargetProperty {Maybe (Value Text)
()
haddock_workaround_ :: CapacityReservationTargetProperty -> ()
capacityReservationId :: CapacityReservationTargetProperty -> Maybe (Value Text)
capacityReservationResourceGroupArn :: CapacityReservationTargetProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
capacityReservationId :: Maybe (Value Text)
capacityReservationResourceGroupArn :: Maybe (Value Text)
..}
    = CapacityReservationTargetProperty
        {capacityReservationResourceGroupArn :: Maybe (Value Text)
capacityReservationResourceGroupArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "CapacityReservationResourceGroupArn"
  CapacityReservationTargetProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
capacityReservationId :: Maybe (Value Text)
haddock_workaround_ :: ()
capacityReservationId :: Maybe (Value Text)
..}