module Stratosphere.WorkspacesInstances.WorkspaceInstance.PlacementProperty (
        PlacementProperty(..), mkPlacementProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PlacementProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-workspacesinstances-workspaceinstance-placement.html>
    PlacementProperty {PlacementProperty -> ()
haddock_workaround_ :: (),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-workspacesinstances-workspaceinstance-placement.html#cfn-workspacesinstances-workspaceinstance-placement-availabilityzone>
                       PlacementProperty -> Maybe (Value Text)
availabilityZone :: (Prelude.Maybe (Value Prelude.Text)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-workspacesinstances-workspaceinstance-placement.html#cfn-workspacesinstances-workspaceinstance-placement-groupid>
                       PlacementProperty -> Maybe (Value Text)
groupId :: (Prelude.Maybe (Value Prelude.Text)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-workspacesinstances-workspaceinstance-placement.html#cfn-workspacesinstances-workspaceinstance-placement-groupname>
                       PlacementProperty -> Maybe (Value Text)
groupName :: (Prelude.Maybe (Value Prelude.Text)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-workspacesinstances-workspaceinstance-placement.html#cfn-workspacesinstances-workspaceinstance-placement-partitionnumber>
                       PlacementProperty -> Maybe (Value Integer)
partitionNumber :: (Prelude.Maybe (Value Prelude.Integer)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-workspacesinstances-workspaceinstance-placement.html#cfn-workspacesinstances-workspaceinstance-placement-tenancy>
                       PlacementProperty -> Maybe (Value Text)
tenancy :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (PlacementProperty -> PlacementProperty -> Bool
(PlacementProperty -> PlacementProperty -> Bool)
-> (PlacementProperty -> PlacementProperty -> Bool)
-> Eq PlacementProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PlacementProperty -> PlacementProperty -> Bool
== :: PlacementProperty -> PlacementProperty -> Bool
$c/= :: PlacementProperty -> PlacementProperty -> Bool
/= :: PlacementProperty -> PlacementProperty -> Bool
Prelude.Eq, Int -> PlacementProperty -> ShowS
[PlacementProperty] -> ShowS
PlacementProperty -> String
(Int -> PlacementProperty -> ShowS)
-> (PlacementProperty -> String)
-> ([PlacementProperty] -> ShowS)
-> Show PlacementProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PlacementProperty -> ShowS
showsPrec :: Int -> PlacementProperty -> ShowS
$cshow :: PlacementProperty -> String
show :: PlacementProperty -> String
$cshowList :: [PlacementProperty] -> ShowS
showList :: [PlacementProperty] -> ShowS
Prelude.Show)
mkPlacementProperty :: PlacementProperty
mkPlacementProperty :: PlacementProperty
mkPlacementProperty
  = PlacementProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), availabilityZone :: Maybe (Value Text)
availabilityZone = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       groupId :: Maybe (Value Text)
groupId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, groupName :: Maybe (Value Text)
groupName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       partitionNumber :: Maybe (Value Integer)
partitionNumber = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing, tenancy :: Maybe (Value Text)
tenancy = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PlacementProperty where
  toResourceProperties :: PlacementProperty -> ResourceProperties
toResourceProperties PlacementProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: PlacementProperty -> ()
availabilityZone :: PlacementProperty -> Maybe (Value Text)
groupId :: PlacementProperty -> Maybe (Value Text)
groupName :: PlacementProperty -> Maybe (Value Text)
partitionNumber :: PlacementProperty -> Maybe (Value Integer)
tenancy :: PlacementProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
groupId :: Maybe (Value Text)
groupName :: Maybe (Value Text)
partitionNumber :: Maybe (Value Integer)
tenancy :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::WorkspacesInstances::WorkspaceInstance.Placement",
         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
"AvailabilityZone" (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)
availabilityZone,
                            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
"GroupId" (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)
groupId,
                            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
"GroupName" (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)
groupName,
                            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
"PartitionNumber" (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)
partitionNumber,
                            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
"Tenancy" (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)
tenancy])}
instance JSON.ToJSON PlacementProperty where
  toJSON :: PlacementProperty -> Value
toJSON PlacementProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: PlacementProperty -> ()
availabilityZone :: PlacementProperty -> Maybe (Value Text)
groupId :: PlacementProperty -> Maybe (Value Text)
groupName :: PlacementProperty -> Maybe (Value Text)
partitionNumber :: PlacementProperty -> Maybe (Value Integer)
tenancy :: PlacementProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
groupId :: Maybe (Value Text)
groupName :: Maybe (Value Text)
partitionNumber :: Maybe (Value Integer)
tenancy :: 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
"AvailabilityZone" (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)
availabilityZone,
               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
"GroupId" (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)
groupId,
               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
"GroupName" (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)
groupName,
               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
"PartitionNumber" (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)
partitionNumber,
               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
"Tenancy" (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)
tenancy]))
instance Property "AvailabilityZone" PlacementProperty where
  type PropertyType "AvailabilityZone" PlacementProperty = Value Prelude.Text
  set :: PropertyType "AvailabilityZone" PlacementProperty
-> PlacementProperty -> PlacementProperty
set PropertyType "AvailabilityZone" PlacementProperty
newValue PlacementProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: PlacementProperty -> ()
availabilityZone :: PlacementProperty -> Maybe (Value Text)
groupId :: PlacementProperty -> Maybe (Value Text)
groupName :: PlacementProperty -> Maybe (Value Text)
partitionNumber :: PlacementProperty -> Maybe (Value Integer)
tenancy :: PlacementProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
groupId :: Maybe (Value Text)
groupName :: Maybe (Value Text)
partitionNumber :: Maybe (Value Integer)
tenancy :: Maybe (Value Text)
..}
    = PlacementProperty {availabilityZone :: Maybe (Value Text)
availabilityZone = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AvailabilityZone" PlacementProperty
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
groupId :: Maybe (Value Text)
groupName :: Maybe (Value Text)
partitionNumber :: Maybe (Value Integer)
tenancy :: Maybe (Value Text)
haddock_workaround_ :: ()
groupId :: Maybe (Value Text)
groupName :: Maybe (Value Text)
partitionNumber :: Maybe (Value Integer)
tenancy :: Maybe (Value Text)
..}
instance Property "GroupId" PlacementProperty where
  type PropertyType "GroupId" PlacementProperty = Value Prelude.Text
  set :: PropertyType "GroupId" PlacementProperty
-> PlacementProperty -> PlacementProperty
set PropertyType "GroupId" PlacementProperty
newValue PlacementProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: PlacementProperty -> ()
availabilityZone :: PlacementProperty -> Maybe (Value Text)
groupId :: PlacementProperty -> Maybe (Value Text)
groupName :: PlacementProperty -> Maybe (Value Text)
partitionNumber :: PlacementProperty -> Maybe (Value Integer)
tenancy :: PlacementProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
groupId :: Maybe (Value Text)
groupName :: Maybe (Value Text)
partitionNumber :: Maybe (Value Integer)
tenancy :: Maybe (Value Text)
..}
    = PlacementProperty {groupId :: Maybe (Value Text)
groupId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "GroupId" PlacementProperty
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
groupName :: Maybe (Value Text)
partitionNumber :: Maybe (Value Integer)
tenancy :: Maybe (Value Text)
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
groupName :: Maybe (Value Text)
partitionNumber :: Maybe (Value Integer)
tenancy :: Maybe (Value Text)
..}
instance Property "GroupName" PlacementProperty where
  type PropertyType "GroupName" PlacementProperty = Value Prelude.Text
  set :: PropertyType "GroupName" PlacementProperty
-> PlacementProperty -> PlacementProperty
set PropertyType "GroupName" PlacementProperty
newValue PlacementProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: PlacementProperty -> ()
availabilityZone :: PlacementProperty -> Maybe (Value Text)
groupId :: PlacementProperty -> Maybe (Value Text)
groupName :: PlacementProperty -> Maybe (Value Text)
partitionNumber :: PlacementProperty -> Maybe (Value Integer)
tenancy :: PlacementProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
groupId :: Maybe (Value Text)
groupName :: Maybe (Value Text)
partitionNumber :: Maybe (Value Integer)
tenancy :: Maybe (Value Text)
..}
    = PlacementProperty {groupName :: Maybe (Value Text)
groupName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "GroupName" PlacementProperty
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
groupId :: Maybe (Value Text)
partitionNumber :: Maybe (Value Integer)
tenancy :: Maybe (Value Text)
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
groupId :: Maybe (Value Text)
partitionNumber :: Maybe (Value Integer)
tenancy :: Maybe (Value Text)
..}
instance Property "PartitionNumber" PlacementProperty where
  type PropertyType "PartitionNumber" PlacementProperty = Value Prelude.Integer
  set :: PropertyType "PartitionNumber" PlacementProperty
-> PlacementProperty -> PlacementProperty
set PropertyType "PartitionNumber" PlacementProperty
newValue PlacementProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: PlacementProperty -> ()
availabilityZone :: PlacementProperty -> Maybe (Value Text)
groupId :: PlacementProperty -> Maybe (Value Text)
groupName :: PlacementProperty -> Maybe (Value Text)
partitionNumber :: PlacementProperty -> Maybe (Value Integer)
tenancy :: PlacementProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
groupId :: Maybe (Value Text)
groupName :: Maybe (Value Text)
partitionNumber :: Maybe (Value Integer)
tenancy :: Maybe (Value Text)
..}
    = PlacementProperty {partitionNumber :: Maybe (Value Integer)
partitionNumber = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PartitionNumber" PlacementProperty
Value Integer
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
groupId :: Maybe (Value Text)
groupName :: Maybe (Value Text)
tenancy :: Maybe (Value Text)
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
groupId :: Maybe (Value Text)
groupName :: Maybe (Value Text)
tenancy :: Maybe (Value Text)
..}
instance Property "Tenancy" PlacementProperty where
  type PropertyType "Tenancy" PlacementProperty = Value Prelude.Text
  set :: PropertyType "Tenancy" PlacementProperty
-> PlacementProperty -> PlacementProperty
set PropertyType "Tenancy" PlacementProperty
newValue PlacementProperty {Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: PlacementProperty -> ()
availabilityZone :: PlacementProperty -> Maybe (Value Text)
groupId :: PlacementProperty -> Maybe (Value Text)
groupName :: PlacementProperty -> Maybe (Value Text)
partitionNumber :: PlacementProperty -> Maybe (Value Integer)
tenancy :: PlacementProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
groupId :: Maybe (Value Text)
groupName :: Maybe (Value Text)
partitionNumber :: Maybe (Value Integer)
tenancy :: Maybe (Value Text)
..}
    = PlacementProperty {tenancy :: Maybe (Value Text)
tenancy = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Tenancy" PlacementProperty
Value Text
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
groupId :: Maybe (Value Text)
groupName :: Maybe (Value Text)
partitionNumber :: Maybe (Value Integer)
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
groupId :: Maybe (Value Text)
groupName :: Maybe (Value Text)
partitionNumber :: Maybe (Value Integer)
..}