module Stratosphere.AppStream.User ( User(..), mkUser ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value data User = -- | See: User {haddock_workaround_ :: (), -- | See: authenticationType :: (Value Prelude.Text), -- | See: firstName :: (Prelude.Maybe (Value Prelude.Text)), -- | See: lastName :: (Prelude.Maybe (Value Prelude.Text)), -- | See: messageAction :: (Prelude.Maybe (Value Prelude.Text)), -- | See: userName :: (Value Prelude.Text)} deriving stock (Prelude.Eq, Prelude.Show) mkUser :: Value Prelude.Text -> Value Prelude.Text -> User mkUser authenticationType userName = User {haddock_workaround_ = (), authenticationType = authenticationType, userName = userName, firstName = Prelude.Nothing, lastName = Prelude.Nothing, messageAction = Prelude.Nothing} instance ToResourceProperties User where toResourceProperties User {..} = ResourceProperties {awsType = "AWS::AppStream::User", supportsTags = Prelude.False, properties = Prelude.fromList ((Prelude.<>) ["AuthenticationType" JSON..= authenticationType, "UserName" JSON..= userName] (Prelude.catMaybes [(JSON..=) "FirstName" Prelude.<$> firstName, (JSON..=) "LastName" Prelude.<$> lastName, (JSON..=) "MessageAction" Prelude.<$> messageAction]))} instance JSON.ToJSON User where toJSON User {..} = JSON.object (Prelude.fromList ((Prelude.<>) ["AuthenticationType" JSON..= authenticationType, "UserName" JSON..= userName] (Prelude.catMaybes [(JSON..=) "FirstName" Prelude.<$> firstName, (JSON..=) "LastName" Prelude.<$> lastName, (JSON..=) "MessageAction" Prelude.<$> messageAction]))) instance Property "AuthenticationType" User where type PropertyType "AuthenticationType" User = Value Prelude.Text set newValue User {..} = User {authenticationType = newValue, ..} instance Property "FirstName" User where type PropertyType "FirstName" User = Value Prelude.Text set newValue User {..} = User {firstName = Prelude.pure newValue, ..} instance Property "LastName" User where type PropertyType "LastName" User = Value Prelude.Text set newValue User {..} = User {lastName = Prelude.pure newValue, ..} instance Property "MessageAction" User where type PropertyType "MessageAction" User = Value Prelude.Text set newValue User {..} = User {messageAction = Prelude.pure newValue, ..} instance Property "UserName" User where type PropertyType "UserName" User = Value Prelude.Text set newValue User {..} = User {userName = newValue, ..}