module Stratosphere.IVS.PublicKey ( PublicKey(..), mkPublicKey ) 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 PublicKey = -- | See: PublicKey {haddock_workaround_ :: (), -- | See: name :: (Prelude.Maybe (Value Prelude.Text)), -- | See: publicKeyMaterial :: (Prelude.Maybe (Value Prelude.Text)), -- | See: tags :: (Prelude.Maybe [Tag])} deriving stock (Prelude.Eq, Prelude.Show) mkPublicKey :: PublicKey mkPublicKey = PublicKey {haddock_workaround_ = (), name = Prelude.Nothing, publicKeyMaterial = Prelude.Nothing, tags = Prelude.Nothing} instance ToResourceProperties PublicKey where toResourceProperties PublicKey {..} = ResourceProperties {awsType = "AWS::IVS::PublicKey", supportsTags = Prelude.True, properties = Prelude.fromList (Prelude.catMaybes [(JSON..=) "Name" Prelude.<$> name, (JSON..=) "PublicKeyMaterial" Prelude.<$> publicKeyMaterial, (JSON..=) "Tags" Prelude.<$> tags])} instance JSON.ToJSON PublicKey where toJSON PublicKey {..} = JSON.object (Prelude.fromList (Prelude.catMaybes [(JSON..=) "Name" Prelude.<$> name, (JSON..=) "PublicKeyMaterial" Prelude.<$> publicKeyMaterial, (JSON..=) "Tags" Prelude.<$> tags])) instance Property "Name" PublicKey where type PropertyType "Name" PublicKey = Value Prelude.Text set newValue PublicKey {..} = PublicKey {name = Prelude.pure newValue, ..} instance Property "PublicKeyMaterial" PublicKey where type PropertyType "PublicKeyMaterial" PublicKey = Value Prelude.Text set newValue PublicKey {..} = PublicKey {publicKeyMaterial = Prelude.pure newValue, ..} instance Property "Tags" PublicKey where type PropertyType "Tags" PublicKey = [Tag] set newValue PublicKey {..} = PublicKey {tags = Prelude.pure newValue, ..}