module Stratosphere.Route53RecoveryControl.Cluster ( Cluster(..), mkCluster ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Tag import Stratosphere.Value data Cluster = -- | See: Cluster {haddock_workaround_ :: (), -- | See: name :: (Value Prelude.Text), -- | See: networkType :: (Prelude.Maybe (Value Prelude.Text)), -- | See: tags :: (Prelude.Maybe [Tag])} deriving stock (Prelude.Eq, Prelude.Show) mkCluster :: Value Prelude.Text -> Cluster mkCluster name = Cluster {haddock_workaround_ = (), name = name, networkType = Prelude.Nothing, tags = Prelude.Nothing} instance ToResourceProperties Cluster where toResourceProperties Cluster {..} = ResourceProperties {awsType = "AWS::Route53RecoveryControl::Cluster", supportsTags = Prelude.True, properties = Prelude.fromList ((Prelude.<>) ["Name" JSON..= name] (Prelude.catMaybes [(JSON..=) "NetworkType" Prelude.<$> networkType, (JSON..=) "Tags" Prelude.<$> tags]))} instance JSON.ToJSON Cluster where toJSON Cluster {..} = JSON.object (Prelude.fromList ((Prelude.<>) ["Name" JSON..= name] (Prelude.catMaybes [(JSON..=) "NetworkType" Prelude.<$> networkType, (JSON..=) "Tags" Prelude.<$> tags]))) instance Property "Name" Cluster where type PropertyType "Name" Cluster = Value Prelude.Text set newValue Cluster {..} = Cluster {name = newValue, ..} instance Property "NetworkType" Cluster where type PropertyType "NetworkType" Cluster = Value Prelude.Text set newValue Cluster {..} = Cluster {networkType = Prelude.pure newValue, ..} instance Property "Tags" Cluster where type PropertyType "Tags" Cluster = [Tag] set newValue Cluster {..} = Cluster {tags = Prelude.pure newValue, ..}