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