module Stratosphere.Pinpoint.APNSChannel ( APNSChannel(..), mkAPNSChannel ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value data APNSChannel = -- | See: APNSChannel {haddock_workaround_ :: (), -- | See: applicationId :: (Value Prelude.Text), -- | See: bundleId :: (Prelude.Maybe (Value Prelude.Text)), -- | See: certificate :: (Prelude.Maybe (Value Prelude.Text)), -- | See: defaultAuthenticationMethod :: (Prelude.Maybe (Value Prelude.Text)), -- | See: enabled :: (Prelude.Maybe (Value Prelude.Bool)), -- | See: privateKey :: (Prelude.Maybe (Value Prelude.Text)), -- | See: teamId :: (Prelude.Maybe (Value Prelude.Text)), -- | See: tokenKey :: (Prelude.Maybe (Value Prelude.Text)), -- | See: tokenKeyId :: (Prelude.Maybe (Value Prelude.Text))} deriving stock (Prelude.Eq, Prelude.Show) mkAPNSChannel :: Value Prelude.Text -> APNSChannel mkAPNSChannel applicationId = APNSChannel {haddock_workaround_ = (), applicationId = applicationId, bundleId = Prelude.Nothing, certificate = Prelude.Nothing, defaultAuthenticationMethod = Prelude.Nothing, enabled = Prelude.Nothing, privateKey = Prelude.Nothing, teamId = Prelude.Nothing, tokenKey = Prelude.Nothing, tokenKeyId = Prelude.Nothing} instance ToResourceProperties APNSChannel where toResourceProperties APNSChannel {..} = ResourceProperties {awsType = "AWS::Pinpoint::APNSChannel", supportsTags = Prelude.False, properties = Prelude.fromList ((Prelude.<>) ["ApplicationId" JSON..= applicationId] (Prelude.catMaybes [(JSON..=) "BundleId" Prelude.<$> bundleId, (JSON..=) "Certificate" Prelude.<$> certificate, (JSON..=) "DefaultAuthenticationMethod" Prelude.<$> defaultAuthenticationMethod, (JSON..=) "Enabled" Prelude.<$> enabled, (JSON..=) "PrivateKey" Prelude.<$> privateKey, (JSON..=) "TeamId" Prelude.<$> teamId, (JSON..=) "TokenKey" Prelude.<$> tokenKey, (JSON..=) "TokenKeyId" Prelude.<$> tokenKeyId]))} instance JSON.ToJSON APNSChannel where toJSON APNSChannel {..} = JSON.object (Prelude.fromList ((Prelude.<>) ["ApplicationId" JSON..= applicationId] (Prelude.catMaybes [(JSON..=) "BundleId" Prelude.<$> bundleId, (JSON..=) "Certificate" Prelude.<$> certificate, (JSON..=) "DefaultAuthenticationMethod" Prelude.<$> defaultAuthenticationMethod, (JSON..=) "Enabled" Prelude.<$> enabled, (JSON..=) "PrivateKey" Prelude.<$> privateKey, (JSON..=) "TeamId" Prelude.<$> teamId, (JSON..=) "TokenKey" Prelude.<$> tokenKey, (JSON..=) "TokenKeyId" Prelude.<$> tokenKeyId]))) instance Property "ApplicationId" APNSChannel where type PropertyType "ApplicationId" APNSChannel = Value Prelude.Text set newValue APNSChannel {..} = APNSChannel {applicationId = newValue, ..} instance Property "BundleId" APNSChannel where type PropertyType "BundleId" APNSChannel = Value Prelude.Text set newValue APNSChannel {..} = APNSChannel {bundleId = Prelude.pure newValue, ..} instance Property "Certificate" APNSChannel where type PropertyType "Certificate" APNSChannel = Value Prelude.Text set newValue APNSChannel {..} = APNSChannel {certificate = Prelude.pure newValue, ..} instance Property "DefaultAuthenticationMethod" APNSChannel where type PropertyType "DefaultAuthenticationMethod" APNSChannel = Value Prelude.Text set newValue APNSChannel {..} = APNSChannel {defaultAuthenticationMethod = Prelude.pure newValue, ..} instance Property "Enabled" APNSChannel where type PropertyType "Enabled" APNSChannel = Value Prelude.Bool set newValue APNSChannel {..} = APNSChannel {enabled = Prelude.pure newValue, ..} instance Property "PrivateKey" APNSChannel where type PropertyType "PrivateKey" APNSChannel = Value Prelude.Text set newValue APNSChannel {..} = APNSChannel {privateKey = Prelude.pure newValue, ..} instance Property "TeamId" APNSChannel where type PropertyType "TeamId" APNSChannel = Value Prelude.Text set newValue APNSChannel {..} = APNSChannel {teamId = Prelude.pure newValue, ..} instance Property "TokenKey" APNSChannel where type PropertyType "TokenKey" APNSChannel = Value Prelude.Text set newValue APNSChannel {..} = APNSChannel {tokenKey = Prelude.pure newValue, ..} instance Property "TokenKeyId" APNSChannel where type PropertyType "TokenKeyId" APNSChannel = Value Prelude.Text set newValue APNSChannel {..} = APNSChannel {tokenKeyId = Prelude.pure newValue, ..}