module Stratosphere.ImageBuilder.InfrastructureConfiguration.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-imagebuilder-infrastructureconfiguration-placement.html>
    PlacementProperty {PlacementProperty -> ()
haddock_workaround_ :: (),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-imagebuilder-infrastructureconfiguration-placement.html#cfn-imagebuilder-infrastructureconfiguration-placement-availabilityzone>
                       PlacementProperty -> Maybe (Value Text)
availabilityZone :: (Prelude.Maybe (Value Prelude.Text)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-imagebuilder-infrastructureconfiguration-placement.html#cfn-imagebuilder-infrastructureconfiguration-placement-hostid>
                       PlacementProperty -> Maybe (Value Text)
hostId :: (Prelude.Maybe (Value Prelude.Text)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-imagebuilder-infrastructureconfiguration-placement.html#cfn-imagebuilder-infrastructureconfiguration-placement-hostresourcegrouparn>
                       PlacementProperty -> Maybe (Value Text)
hostResourceGroupArn :: (Prelude.Maybe (Value Prelude.Text)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-imagebuilder-infrastructureconfiguration-placement.html#cfn-imagebuilder-infrastructureconfiguration-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,
       hostId :: Maybe (Value Text)
hostId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, hostResourceGroupArn :: Maybe (Value Text)
hostResourceGroupArn = Maybe (Value Text)
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 Text)
()
haddock_workaround_ :: PlacementProperty -> ()
availabilityZone :: PlacementProperty -> Maybe (Value Text)
hostId :: PlacementProperty -> Maybe (Value Text)
hostResourceGroupArn :: PlacementProperty -> Maybe (Value Text)
tenancy :: PlacementProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
hostId :: Maybe (Value Text)
hostResourceGroupArn :: Maybe (Value Text)
tenancy :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ImageBuilder::InfrastructureConfiguration.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
"HostId" (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)
hostId,
                            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
"HostResourceGroupArn" (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)
hostResourceGroupArn,
                            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 Text)
()
haddock_workaround_ :: PlacementProperty -> ()
availabilityZone :: PlacementProperty -> Maybe (Value Text)
hostId :: PlacementProperty -> Maybe (Value Text)
hostResourceGroupArn :: PlacementProperty -> Maybe (Value Text)
tenancy :: PlacementProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
hostId :: Maybe (Value Text)
hostResourceGroupArn :: Maybe (Value Text)
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
"HostId" (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)
hostId,
               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
"HostResourceGroupArn" (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)
hostResourceGroupArn,
               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 Text)
()
haddock_workaround_ :: PlacementProperty -> ()
availabilityZone :: PlacementProperty -> Maybe (Value Text)
hostId :: PlacementProperty -> Maybe (Value Text)
hostResourceGroupArn :: PlacementProperty -> Maybe (Value Text)
tenancy :: PlacementProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
hostId :: Maybe (Value Text)
hostResourceGroupArn :: Maybe (Value Text)
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 Text)
()
haddock_workaround_ :: ()
hostId :: Maybe (Value Text)
hostResourceGroupArn :: Maybe (Value Text)
tenancy :: Maybe (Value Text)
haddock_workaround_ :: ()
hostId :: Maybe (Value Text)
hostResourceGroupArn :: Maybe (Value Text)
tenancy :: Maybe (Value Text)
..}
instance Property "HostId" PlacementProperty where
  type PropertyType "HostId" PlacementProperty = Value Prelude.Text
  set :: PropertyType "HostId" PlacementProperty
-> PlacementProperty -> PlacementProperty
set PropertyType "HostId" PlacementProperty
newValue PlacementProperty {Maybe (Value Text)
()
haddock_workaround_ :: PlacementProperty -> ()
availabilityZone :: PlacementProperty -> Maybe (Value Text)
hostId :: PlacementProperty -> Maybe (Value Text)
hostResourceGroupArn :: PlacementProperty -> Maybe (Value Text)
tenancy :: PlacementProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
hostId :: Maybe (Value Text)
hostResourceGroupArn :: Maybe (Value Text)
tenancy :: Maybe (Value Text)
..}
    = PlacementProperty {hostId :: Maybe (Value Text)
hostId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "HostId" PlacementProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
hostResourceGroupArn :: Maybe (Value Text)
tenancy :: Maybe (Value Text)
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
hostResourceGroupArn :: Maybe (Value Text)
tenancy :: Maybe (Value Text)
..}
instance Property "HostResourceGroupArn" PlacementProperty where
  type PropertyType "HostResourceGroupArn" PlacementProperty = Value Prelude.Text
  set :: PropertyType "HostResourceGroupArn" PlacementProperty
-> PlacementProperty -> PlacementProperty
set PropertyType "HostResourceGroupArn" PlacementProperty
newValue PlacementProperty {Maybe (Value Text)
()
haddock_workaround_ :: PlacementProperty -> ()
availabilityZone :: PlacementProperty -> Maybe (Value Text)
hostId :: PlacementProperty -> Maybe (Value Text)
hostResourceGroupArn :: PlacementProperty -> Maybe (Value Text)
tenancy :: PlacementProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
hostId :: Maybe (Value Text)
hostResourceGroupArn :: Maybe (Value Text)
tenancy :: Maybe (Value Text)
..}
    = PlacementProperty
        {hostResourceGroupArn :: Maybe (Value Text)
hostResourceGroupArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "HostResourceGroupArn" PlacementProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
hostId :: Maybe (Value Text)
tenancy :: Maybe (Value Text)
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
hostId :: 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 Text)
()
haddock_workaround_ :: PlacementProperty -> ()
availabilityZone :: PlacementProperty -> Maybe (Value Text)
hostId :: PlacementProperty -> Maybe (Value Text)
hostResourceGroupArn :: PlacementProperty -> Maybe (Value Text)
tenancy :: PlacementProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
hostId :: Maybe (Value Text)
hostResourceGroupArn :: Maybe (Value Text)
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 Text)
()
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
hostId :: Maybe (Value Text)
hostResourceGroupArn :: Maybe (Value Text)
haddock_workaround_ :: ()
availabilityZone :: Maybe (Value Text)
hostId :: Maybe (Value Text)
hostResourceGroupArn :: Maybe (Value Text)
..}