{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.AWS.Pinpoint.Types.Product where
import Network.AWS.Lens
import Network.AWS.Pinpoint.Types.Sum
import Network.AWS.Prelude
data ADMChannelRequest = ADMChannelRequest'
{ _admcrClientId :: !(Maybe Text)
, _admcrClientSecret :: !(Maybe Text)
, _admcrEnabled :: !(Maybe Bool)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
aDMChannelRequest
:: ADMChannelRequest
aDMChannelRequest =
ADMChannelRequest'
{ _admcrClientId = Nothing
, _admcrClientSecret = Nothing
, _admcrEnabled = Nothing
}
admcrClientId :: Lens' ADMChannelRequest (Maybe Text)
admcrClientId = lens _admcrClientId (\ s a -> s{_admcrClientId = a})
admcrClientSecret :: Lens' ADMChannelRequest (Maybe Text)
admcrClientSecret = lens _admcrClientSecret (\ s a -> s{_admcrClientSecret = a})
admcrEnabled :: Lens' ADMChannelRequest (Maybe Bool)
admcrEnabled = lens _admcrEnabled (\ s a -> s{_admcrEnabled = a})
instance Hashable ADMChannelRequest where
instance NFData ADMChannelRequest where
instance ToJSON ADMChannelRequest where
toJSON ADMChannelRequest'{..}
= object
(catMaybes
[("ClientId" .=) <$> _admcrClientId,
("ClientSecret" .=) <$> _admcrClientSecret,
("Enabled" .=) <$> _admcrEnabled])
data ADMChannelResponse = ADMChannelResponse'
{ _admcPlatform :: !(Maybe Text)
, _admcLastModifiedDate :: !(Maybe Text)
, _admcEnabled :: !(Maybe Bool)
, _admcIsArchived :: !(Maybe Bool)
, _admcApplicationId :: !(Maybe Text)
, _admcVersion :: !(Maybe Int)
, _admcId :: !(Maybe Text)
, _admcCreationDate :: !(Maybe Text)
, _admcLastModifiedBy :: !(Maybe Text)
, _admcHasCredential :: !(Maybe Bool)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
aDMChannelResponse
:: ADMChannelResponse
aDMChannelResponse =
ADMChannelResponse'
{ _admcPlatform = Nothing
, _admcLastModifiedDate = Nothing
, _admcEnabled = Nothing
, _admcIsArchived = Nothing
, _admcApplicationId = Nothing
, _admcVersion = Nothing
, _admcId = Nothing
, _admcCreationDate = Nothing
, _admcLastModifiedBy = Nothing
, _admcHasCredential = Nothing
}
admcPlatform :: Lens' ADMChannelResponse (Maybe Text)
admcPlatform = lens _admcPlatform (\ s a -> s{_admcPlatform = a})
admcLastModifiedDate :: Lens' ADMChannelResponse (Maybe Text)
admcLastModifiedDate = lens _admcLastModifiedDate (\ s a -> s{_admcLastModifiedDate = a})
admcEnabled :: Lens' ADMChannelResponse (Maybe Bool)
admcEnabled = lens _admcEnabled (\ s a -> s{_admcEnabled = a})
admcIsArchived :: Lens' ADMChannelResponse (Maybe Bool)
admcIsArchived = lens _admcIsArchived (\ s a -> s{_admcIsArchived = a})
admcApplicationId :: Lens' ADMChannelResponse (Maybe Text)
admcApplicationId = lens _admcApplicationId (\ s a -> s{_admcApplicationId = a})
admcVersion :: Lens' ADMChannelResponse (Maybe Int)
admcVersion = lens _admcVersion (\ s a -> s{_admcVersion = a})
admcId :: Lens' ADMChannelResponse (Maybe Text)
admcId = lens _admcId (\ s a -> s{_admcId = a})
admcCreationDate :: Lens' ADMChannelResponse (Maybe Text)
admcCreationDate = lens _admcCreationDate (\ s a -> s{_admcCreationDate = a})
admcLastModifiedBy :: Lens' ADMChannelResponse (Maybe Text)
admcLastModifiedBy = lens _admcLastModifiedBy (\ s a -> s{_admcLastModifiedBy = a})
admcHasCredential :: Lens' ADMChannelResponse (Maybe Bool)
admcHasCredential = lens _admcHasCredential (\ s a -> s{_admcHasCredential = a})
instance FromJSON ADMChannelResponse where
parseJSON
= withObject "ADMChannelResponse"
(\ x ->
ADMChannelResponse' <$>
(x .:? "Platform") <*> (x .:? "LastModifiedDate") <*>
(x .:? "Enabled")
<*> (x .:? "IsArchived")
<*> (x .:? "ApplicationId")
<*> (x .:? "Version")
<*> (x .:? "Id")
<*> (x .:? "CreationDate")
<*> (x .:? "LastModifiedBy")
<*> (x .:? "HasCredential"))
instance Hashable ADMChannelResponse where
instance NFData ADMChannelResponse where
data ADMMessage = ADMMessage'
{ _admmSubstitutions :: !(Maybe (Map Text [Text]))
, _admmExpiresAfter :: !(Maybe Text)
, _admmMD5 :: !(Maybe Text)
, _admmSilentPush :: !(Maybe Bool)
, _admmImageIconURL :: !(Maybe Text)
, _admmRawContent :: !(Maybe Text)
, _admmData :: !(Maybe (Map Text Text))
, _admmSmallImageIconURL :: !(Maybe Text)
, _admmBody :: !(Maybe Text)
, _admmURL :: !(Maybe Text)
, _admmSound :: !(Maybe Text)
, _admmAction :: !(Maybe Action)
, _admmImageURL :: !(Maybe Text)
, _admmConsolidationKey :: !(Maybe Text)
, _admmTitle :: !(Maybe Text)
, _admmIconReference :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
aDMMessage
:: ADMMessage
aDMMessage =
ADMMessage'
{ _admmSubstitutions = Nothing
, _admmExpiresAfter = Nothing
, _admmMD5 = Nothing
, _admmSilentPush = Nothing
, _admmImageIconURL = Nothing
, _admmRawContent = Nothing
, _admmData = Nothing
, _admmSmallImageIconURL = Nothing
, _admmBody = Nothing
, _admmURL = Nothing
, _admmSound = Nothing
, _admmAction = Nothing
, _admmImageURL = Nothing
, _admmConsolidationKey = Nothing
, _admmTitle = Nothing
, _admmIconReference = Nothing
}
admmSubstitutions :: Lens' ADMMessage (HashMap Text [Text])
admmSubstitutions = lens _admmSubstitutions (\ s a -> s{_admmSubstitutions = a}) . _Default . _Map
admmExpiresAfter :: Lens' ADMMessage (Maybe Text)
admmExpiresAfter = lens _admmExpiresAfter (\ s a -> s{_admmExpiresAfter = a})
admmMD5 :: Lens' ADMMessage (Maybe Text)
admmMD5 = lens _admmMD5 (\ s a -> s{_admmMD5 = a})
admmSilentPush :: Lens' ADMMessage (Maybe Bool)
admmSilentPush = lens _admmSilentPush (\ s a -> s{_admmSilentPush = a})
admmImageIconURL :: Lens' ADMMessage (Maybe Text)
admmImageIconURL = lens _admmImageIconURL (\ s a -> s{_admmImageIconURL = a})
admmRawContent :: Lens' ADMMessage (Maybe Text)
admmRawContent = lens _admmRawContent (\ s a -> s{_admmRawContent = a})
admmData :: Lens' ADMMessage (HashMap Text Text)
admmData = lens _admmData (\ s a -> s{_admmData = a}) . _Default . _Map
admmSmallImageIconURL :: Lens' ADMMessage (Maybe Text)
admmSmallImageIconURL = lens _admmSmallImageIconURL (\ s a -> s{_admmSmallImageIconURL = a})
admmBody :: Lens' ADMMessage (Maybe Text)
admmBody = lens _admmBody (\ s a -> s{_admmBody = a})
admmURL :: Lens' ADMMessage (Maybe Text)
admmURL = lens _admmURL (\ s a -> s{_admmURL = a})
admmSound :: Lens' ADMMessage (Maybe Text)
admmSound = lens _admmSound (\ s a -> s{_admmSound = a})
admmAction :: Lens' ADMMessage (Maybe Action)
admmAction = lens _admmAction (\ s a -> s{_admmAction = a})
admmImageURL :: Lens' ADMMessage (Maybe Text)
admmImageURL = lens _admmImageURL (\ s a -> s{_admmImageURL = a})
admmConsolidationKey :: Lens' ADMMessage (Maybe Text)
admmConsolidationKey = lens _admmConsolidationKey (\ s a -> s{_admmConsolidationKey = a})
admmTitle :: Lens' ADMMessage (Maybe Text)
admmTitle = lens _admmTitle (\ s a -> s{_admmTitle = a})
admmIconReference :: Lens' ADMMessage (Maybe Text)
admmIconReference = lens _admmIconReference (\ s a -> s{_admmIconReference = a})
instance Hashable ADMMessage where
instance NFData ADMMessage where
instance ToJSON ADMMessage where
toJSON ADMMessage'{..}
= object
(catMaybes
[("Substitutions" .=) <$> _admmSubstitutions,
("ExpiresAfter" .=) <$> _admmExpiresAfter,
("MD5" .=) <$> _admmMD5,
("SilentPush" .=) <$> _admmSilentPush,
("ImageIconUrl" .=) <$> _admmImageIconURL,
("RawContent" .=) <$> _admmRawContent,
("Data" .=) <$> _admmData,
("SmallImageIconUrl" .=) <$> _admmSmallImageIconURL,
("Body" .=) <$> _admmBody, ("Url" .=) <$> _admmURL,
("Sound" .=) <$> _admmSound,
("Action" .=) <$> _admmAction,
("ImageUrl" .=) <$> _admmImageURL,
("ConsolidationKey" .=) <$> _admmConsolidationKey,
("Title" .=) <$> _admmTitle,
("IconReference" .=) <$> _admmIconReference])
data APNSChannelRequest = APNSChannelRequest'
{ _acrTokenKey :: !(Maybe Text)
, _acrPrivateKey :: !(Maybe Text)
, _acrEnabled :: !(Maybe Bool)
, _acrTeamId :: !(Maybe Text)
, _acrBundleId :: !(Maybe Text)
, _acrDefaultAuthenticationMethod :: !(Maybe Text)
, _acrCertificate :: !(Maybe Text)
, _acrTokenKeyId :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
apnsChannelRequest
:: APNSChannelRequest
apnsChannelRequest =
APNSChannelRequest'
{ _acrTokenKey = Nothing
, _acrPrivateKey = Nothing
, _acrEnabled = Nothing
, _acrTeamId = Nothing
, _acrBundleId = Nothing
, _acrDefaultAuthenticationMethod = Nothing
, _acrCertificate = Nothing
, _acrTokenKeyId = Nothing
}
acrTokenKey :: Lens' APNSChannelRequest (Maybe Text)
acrTokenKey = lens _acrTokenKey (\ s a -> s{_acrTokenKey = a})
acrPrivateKey :: Lens' APNSChannelRequest (Maybe Text)
acrPrivateKey = lens _acrPrivateKey (\ s a -> s{_acrPrivateKey = a})
acrEnabled :: Lens' APNSChannelRequest (Maybe Bool)
acrEnabled = lens _acrEnabled (\ s a -> s{_acrEnabled = a})
acrTeamId :: Lens' APNSChannelRequest (Maybe Text)
acrTeamId = lens _acrTeamId (\ s a -> s{_acrTeamId = a})
acrBundleId :: Lens' APNSChannelRequest (Maybe Text)
acrBundleId = lens _acrBundleId (\ s a -> s{_acrBundleId = a})
acrDefaultAuthenticationMethod :: Lens' APNSChannelRequest (Maybe Text)
acrDefaultAuthenticationMethod = lens _acrDefaultAuthenticationMethod (\ s a -> s{_acrDefaultAuthenticationMethod = a})
acrCertificate :: Lens' APNSChannelRequest (Maybe Text)
acrCertificate = lens _acrCertificate (\ s a -> s{_acrCertificate = a})
acrTokenKeyId :: Lens' APNSChannelRequest (Maybe Text)
acrTokenKeyId = lens _acrTokenKeyId (\ s a -> s{_acrTokenKeyId = a})
instance Hashable APNSChannelRequest where
instance NFData APNSChannelRequest where
instance ToJSON APNSChannelRequest where
toJSON APNSChannelRequest'{..}
= object
(catMaybes
[("TokenKey" .=) <$> _acrTokenKey,
("PrivateKey" .=) <$> _acrPrivateKey,
("Enabled" .=) <$> _acrEnabled,
("TeamId" .=) <$> _acrTeamId,
("BundleId" .=) <$> _acrBundleId,
("DefaultAuthenticationMethod" .=) <$>
_acrDefaultAuthenticationMethod,
("Certificate" .=) <$> _acrCertificate,
("TokenKeyId" .=) <$> _acrTokenKeyId])
data APNSChannelResponse = APNSChannelResponse'
{ _acPlatform :: !(Maybe Text)
, _acLastModifiedDate :: !(Maybe Text)
, _acEnabled :: !(Maybe Bool)
, _acHasTokenKey :: !(Maybe Bool)
, _acDefaultAuthenticationMethod :: !(Maybe Text)
, _acIsArchived :: !(Maybe Bool)
, _acApplicationId :: !(Maybe Text)
, _acVersion :: !(Maybe Int)
, _acId :: !(Maybe Text)
, _acCreationDate :: !(Maybe Text)
, _acLastModifiedBy :: !(Maybe Text)
, _acHasCredential :: !(Maybe Bool)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
apnsChannelResponse
:: APNSChannelResponse
apnsChannelResponse =
APNSChannelResponse'
{ _acPlatform = Nothing
, _acLastModifiedDate = Nothing
, _acEnabled = Nothing
, _acHasTokenKey = Nothing
, _acDefaultAuthenticationMethod = Nothing
, _acIsArchived = Nothing
, _acApplicationId = Nothing
, _acVersion = Nothing
, _acId = Nothing
, _acCreationDate = Nothing
, _acLastModifiedBy = Nothing
, _acHasCredential = Nothing
}
acPlatform :: Lens' APNSChannelResponse (Maybe Text)
acPlatform = lens _acPlatform (\ s a -> s{_acPlatform = a})
acLastModifiedDate :: Lens' APNSChannelResponse (Maybe Text)
acLastModifiedDate = lens _acLastModifiedDate (\ s a -> s{_acLastModifiedDate = a})
acEnabled :: Lens' APNSChannelResponse (Maybe Bool)
acEnabled = lens _acEnabled (\ s a -> s{_acEnabled = a})
acHasTokenKey :: Lens' APNSChannelResponse (Maybe Bool)
acHasTokenKey = lens _acHasTokenKey (\ s a -> s{_acHasTokenKey = a})
acDefaultAuthenticationMethod :: Lens' APNSChannelResponse (Maybe Text)
acDefaultAuthenticationMethod = lens _acDefaultAuthenticationMethod (\ s a -> s{_acDefaultAuthenticationMethod = a})
acIsArchived :: Lens' APNSChannelResponse (Maybe Bool)
acIsArchived = lens _acIsArchived (\ s a -> s{_acIsArchived = a})
acApplicationId :: Lens' APNSChannelResponse (Maybe Text)
acApplicationId = lens _acApplicationId (\ s a -> s{_acApplicationId = a})
acVersion :: Lens' APNSChannelResponse (Maybe Int)
acVersion = lens _acVersion (\ s a -> s{_acVersion = a})
acId :: Lens' APNSChannelResponse (Maybe Text)
acId = lens _acId (\ s a -> s{_acId = a})
acCreationDate :: Lens' APNSChannelResponse (Maybe Text)
acCreationDate = lens _acCreationDate (\ s a -> s{_acCreationDate = a})
acLastModifiedBy :: Lens' APNSChannelResponse (Maybe Text)
acLastModifiedBy = lens _acLastModifiedBy (\ s a -> s{_acLastModifiedBy = a})
acHasCredential :: Lens' APNSChannelResponse (Maybe Bool)
acHasCredential = lens _acHasCredential (\ s a -> s{_acHasCredential = a})
instance FromJSON APNSChannelResponse where
parseJSON
= withObject "APNSChannelResponse"
(\ x ->
APNSChannelResponse' <$>
(x .:? "Platform") <*> (x .:? "LastModifiedDate") <*>
(x .:? "Enabled")
<*> (x .:? "HasTokenKey")
<*> (x .:? "DefaultAuthenticationMethod")
<*> (x .:? "IsArchived")
<*> (x .:? "ApplicationId")
<*> (x .:? "Version")
<*> (x .:? "Id")
<*> (x .:? "CreationDate")
<*> (x .:? "LastModifiedBy")
<*> (x .:? "HasCredential"))
instance Hashable APNSChannelResponse where
instance NFData APNSChannelResponse where
data APNSMessage = APNSMessage'
{ _amSubstitutions :: !(Maybe (Map Text [Text]))
, _amSilentPush :: !(Maybe Bool)
, _amPriority :: !(Maybe Text)
, _amRawContent :: !(Maybe Text)
, _amData :: !(Maybe (Map Text Text))
, _amBody :: !(Maybe Text)
, _amCategory :: !(Maybe Text)
, _amTimeToLive :: !(Maybe Int)
, _amURL :: !(Maybe Text)
, _amSound :: !(Maybe Text)
, _amAction :: !(Maybe Action)
, _amMediaURL :: !(Maybe Text)
, _amPreferredAuthenticationMethod :: !(Maybe Text)
, _amBadge :: !(Maybe Int)
, _amTitle :: !(Maybe Text)
, _amThreadId :: !(Maybe Text)
, _amCollapseId :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
apnsMessage
:: APNSMessage
apnsMessage =
APNSMessage'
{ _amSubstitutions = Nothing
, _amSilentPush = Nothing
, _amPriority = Nothing
, _amRawContent = Nothing
, _amData = Nothing
, _amBody = Nothing
, _amCategory = Nothing
, _amTimeToLive = Nothing
, _amURL = Nothing
, _amSound = Nothing
, _amAction = Nothing
, _amMediaURL = Nothing
, _amPreferredAuthenticationMethod = Nothing
, _amBadge = Nothing
, _amTitle = Nothing
, _amThreadId = Nothing
, _amCollapseId = Nothing
}
amSubstitutions :: Lens' APNSMessage (HashMap Text [Text])
amSubstitutions = lens _amSubstitutions (\ s a -> s{_amSubstitutions = a}) . _Default . _Map
amSilentPush :: Lens' APNSMessage (Maybe Bool)
amSilentPush = lens _amSilentPush (\ s a -> s{_amSilentPush = a})
amPriority :: Lens' APNSMessage (Maybe Text)
amPriority = lens _amPriority (\ s a -> s{_amPriority = a})
amRawContent :: Lens' APNSMessage (Maybe Text)
amRawContent = lens _amRawContent (\ s a -> s{_amRawContent = a})
amData :: Lens' APNSMessage (HashMap Text Text)
amData = lens _amData (\ s a -> s{_amData = a}) . _Default . _Map
amBody :: Lens' APNSMessage (Maybe Text)
amBody = lens _amBody (\ s a -> s{_amBody = a})
amCategory :: Lens' APNSMessage (Maybe Text)
amCategory = lens _amCategory (\ s a -> s{_amCategory = a})
amTimeToLive :: Lens' APNSMessage (Maybe Int)
amTimeToLive = lens _amTimeToLive (\ s a -> s{_amTimeToLive = a})
amURL :: Lens' APNSMessage (Maybe Text)
amURL = lens _amURL (\ s a -> s{_amURL = a})
amSound :: Lens' APNSMessage (Maybe Text)
amSound = lens _amSound (\ s a -> s{_amSound = a})
amAction :: Lens' APNSMessage (Maybe Action)
amAction = lens _amAction (\ s a -> s{_amAction = a})
amMediaURL :: Lens' APNSMessage (Maybe Text)
amMediaURL = lens _amMediaURL (\ s a -> s{_amMediaURL = a})
amPreferredAuthenticationMethod :: Lens' APNSMessage (Maybe Text)
amPreferredAuthenticationMethod = lens _amPreferredAuthenticationMethod (\ s a -> s{_amPreferredAuthenticationMethod = a})
amBadge :: Lens' APNSMessage (Maybe Int)
amBadge = lens _amBadge (\ s a -> s{_amBadge = a})
amTitle :: Lens' APNSMessage (Maybe Text)
amTitle = lens _amTitle (\ s a -> s{_amTitle = a})
amThreadId :: Lens' APNSMessage (Maybe Text)
amThreadId = lens _amThreadId (\ s a -> s{_amThreadId = a})
amCollapseId :: Lens' APNSMessage (Maybe Text)
amCollapseId = lens _amCollapseId (\ s a -> s{_amCollapseId = a})
instance Hashable APNSMessage where
instance NFData APNSMessage where
instance ToJSON APNSMessage where
toJSON APNSMessage'{..}
= object
(catMaybes
[("Substitutions" .=) <$> _amSubstitutions,
("SilentPush" .=) <$> _amSilentPush,
("Priority" .=) <$> _amPriority,
("RawContent" .=) <$> _amRawContent,
("Data" .=) <$> _amData, ("Body" .=) <$> _amBody,
("Category" .=) <$> _amCategory,
("TimeToLive" .=) <$> _amTimeToLive,
("Url" .=) <$> _amURL, ("Sound" .=) <$> _amSound,
("Action" .=) <$> _amAction,
("MediaUrl" .=) <$> _amMediaURL,
("PreferredAuthenticationMethod" .=) <$>
_amPreferredAuthenticationMethod,
("Badge" .=) <$> _amBadge, ("Title" .=) <$> _amTitle,
("ThreadId" .=) <$> _amThreadId,
("CollapseId" .=) <$> _amCollapseId])
data APNSSandboxChannelRequest = APNSSandboxChannelRequest'
{ _ascrTokenKey :: !(Maybe Text)
, _ascrPrivateKey :: !(Maybe Text)
, _ascrEnabled :: !(Maybe Bool)
, _ascrTeamId :: !(Maybe Text)
, _ascrBundleId :: !(Maybe Text)
, _ascrDefaultAuthenticationMethod :: !(Maybe Text)
, _ascrCertificate :: !(Maybe Text)
, _ascrTokenKeyId :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
apnsSandboxChannelRequest
:: APNSSandboxChannelRequest
apnsSandboxChannelRequest =
APNSSandboxChannelRequest'
{ _ascrTokenKey = Nothing
, _ascrPrivateKey = Nothing
, _ascrEnabled = Nothing
, _ascrTeamId = Nothing
, _ascrBundleId = Nothing
, _ascrDefaultAuthenticationMethod = Nothing
, _ascrCertificate = Nothing
, _ascrTokenKeyId = Nothing
}
ascrTokenKey :: Lens' APNSSandboxChannelRequest (Maybe Text)
ascrTokenKey = lens _ascrTokenKey (\ s a -> s{_ascrTokenKey = a})
ascrPrivateKey :: Lens' APNSSandboxChannelRequest (Maybe Text)
ascrPrivateKey = lens _ascrPrivateKey (\ s a -> s{_ascrPrivateKey = a})
ascrEnabled :: Lens' APNSSandboxChannelRequest (Maybe Bool)
ascrEnabled = lens _ascrEnabled (\ s a -> s{_ascrEnabled = a})
ascrTeamId :: Lens' APNSSandboxChannelRequest (Maybe Text)
ascrTeamId = lens _ascrTeamId (\ s a -> s{_ascrTeamId = a})
ascrBundleId :: Lens' APNSSandboxChannelRequest (Maybe Text)
ascrBundleId = lens _ascrBundleId (\ s a -> s{_ascrBundleId = a})
ascrDefaultAuthenticationMethod :: Lens' APNSSandboxChannelRequest (Maybe Text)
ascrDefaultAuthenticationMethod = lens _ascrDefaultAuthenticationMethod (\ s a -> s{_ascrDefaultAuthenticationMethod = a})
ascrCertificate :: Lens' APNSSandboxChannelRequest (Maybe Text)
ascrCertificate = lens _ascrCertificate (\ s a -> s{_ascrCertificate = a})
ascrTokenKeyId :: Lens' APNSSandboxChannelRequest (Maybe Text)
ascrTokenKeyId = lens _ascrTokenKeyId (\ s a -> s{_ascrTokenKeyId = a})
instance Hashable APNSSandboxChannelRequest where
instance NFData APNSSandboxChannelRequest where
instance ToJSON APNSSandboxChannelRequest where
toJSON APNSSandboxChannelRequest'{..}
= object
(catMaybes
[("TokenKey" .=) <$> _ascrTokenKey,
("PrivateKey" .=) <$> _ascrPrivateKey,
("Enabled" .=) <$> _ascrEnabled,
("TeamId" .=) <$> _ascrTeamId,
("BundleId" .=) <$> _ascrBundleId,
("DefaultAuthenticationMethod" .=) <$>
_ascrDefaultAuthenticationMethod,
("Certificate" .=) <$> _ascrCertificate,
("TokenKeyId" .=) <$> _ascrTokenKeyId])
data APNSSandboxChannelResponse = APNSSandboxChannelResponse'
{ _ascPlatform :: !(Maybe Text)
, _ascLastModifiedDate :: !(Maybe Text)
, _ascEnabled :: !(Maybe Bool)
, _ascHasTokenKey :: !(Maybe Bool)
, _ascDefaultAuthenticationMethod :: !(Maybe Text)
, _ascIsArchived :: !(Maybe Bool)
, _ascApplicationId :: !(Maybe Text)
, _ascVersion :: !(Maybe Int)
, _ascId :: !(Maybe Text)
, _ascCreationDate :: !(Maybe Text)
, _ascLastModifiedBy :: !(Maybe Text)
, _ascHasCredential :: !(Maybe Bool)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
apnsSandboxChannelResponse
:: APNSSandboxChannelResponse
apnsSandboxChannelResponse =
APNSSandboxChannelResponse'
{ _ascPlatform = Nothing
, _ascLastModifiedDate = Nothing
, _ascEnabled = Nothing
, _ascHasTokenKey = Nothing
, _ascDefaultAuthenticationMethod = Nothing
, _ascIsArchived = Nothing
, _ascApplicationId = Nothing
, _ascVersion = Nothing
, _ascId = Nothing
, _ascCreationDate = Nothing
, _ascLastModifiedBy = Nothing
, _ascHasCredential = Nothing
}
ascPlatform :: Lens' APNSSandboxChannelResponse (Maybe Text)
ascPlatform = lens _ascPlatform (\ s a -> s{_ascPlatform = a})
ascLastModifiedDate :: Lens' APNSSandboxChannelResponse (Maybe Text)
ascLastModifiedDate = lens _ascLastModifiedDate (\ s a -> s{_ascLastModifiedDate = a})
ascEnabled :: Lens' APNSSandboxChannelResponse (Maybe Bool)
ascEnabled = lens _ascEnabled (\ s a -> s{_ascEnabled = a})
ascHasTokenKey :: Lens' APNSSandboxChannelResponse (Maybe Bool)
ascHasTokenKey = lens _ascHasTokenKey (\ s a -> s{_ascHasTokenKey = a})
ascDefaultAuthenticationMethod :: Lens' APNSSandboxChannelResponse (Maybe Text)
ascDefaultAuthenticationMethod = lens _ascDefaultAuthenticationMethod (\ s a -> s{_ascDefaultAuthenticationMethod = a})
ascIsArchived :: Lens' APNSSandboxChannelResponse (Maybe Bool)
ascIsArchived = lens _ascIsArchived (\ s a -> s{_ascIsArchived = a})
ascApplicationId :: Lens' APNSSandboxChannelResponse (Maybe Text)
ascApplicationId = lens _ascApplicationId (\ s a -> s{_ascApplicationId = a})
ascVersion :: Lens' APNSSandboxChannelResponse (Maybe Int)
ascVersion = lens _ascVersion (\ s a -> s{_ascVersion = a})
ascId :: Lens' APNSSandboxChannelResponse (Maybe Text)
ascId = lens _ascId (\ s a -> s{_ascId = a})
ascCreationDate :: Lens' APNSSandboxChannelResponse (Maybe Text)
ascCreationDate = lens _ascCreationDate (\ s a -> s{_ascCreationDate = a})
ascLastModifiedBy :: Lens' APNSSandboxChannelResponse (Maybe Text)
ascLastModifiedBy = lens _ascLastModifiedBy (\ s a -> s{_ascLastModifiedBy = a})
ascHasCredential :: Lens' APNSSandboxChannelResponse (Maybe Bool)
ascHasCredential = lens _ascHasCredential (\ s a -> s{_ascHasCredential = a})
instance FromJSON APNSSandboxChannelResponse where
parseJSON
= withObject "APNSSandboxChannelResponse"
(\ x ->
APNSSandboxChannelResponse' <$>
(x .:? "Platform") <*> (x .:? "LastModifiedDate") <*>
(x .:? "Enabled")
<*> (x .:? "HasTokenKey")
<*> (x .:? "DefaultAuthenticationMethod")
<*> (x .:? "IsArchived")
<*> (x .:? "ApplicationId")
<*> (x .:? "Version")
<*> (x .:? "Id")
<*> (x .:? "CreationDate")
<*> (x .:? "LastModifiedBy")
<*> (x .:? "HasCredential"))
instance Hashable APNSSandboxChannelResponse where
instance NFData APNSSandboxChannelResponse where
data APNSVoipChannelRequest = APNSVoipChannelRequest'
{ _avcrTokenKey :: !(Maybe Text)
, _avcrPrivateKey :: !(Maybe Text)
, _avcrEnabled :: !(Maybe Bool)
, _avcrTeamId :: !(Maybe Text)
, _avcrBundleId :: !(Maybe Text)
, _avcrDefaultAuthenticationMethod :: !(Maybe Text)
, _avcrCertificate :: !(Maybe Text)
, _avcrTokenKeyId :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
apnsVoipChannelRequest
:: APNSVoipChannelRequest
apnsVoipChannelRequest =
APNSVoipChannelRequest'
{ _avcrTokenKey = Nothing
, _avcrPrivateKey = Nothing
, _avcrEnabled = Nothing
, _avcrTeamId = Nothing
, _avcrBundleId = Nothing
, _avcrDefaultAuthenticationMethod = Nothing
, _avcrCertificate = Nothing
, _avcrTokenKeyId = Nothing
}
avcrTokenKey :: Lens' APNSVoipChannelRequest (Maybe Text)
avcrTokenKey = lens _avcrTokenKey (\ s a -> s{_avcrTokenKey = a})
avcrPrivateKey :: Lens' APNSVoipChannelRequest (Maybe Text)
avcrPrivateKey = lens _avcrPrivateKey (\ s a -> s{_avcrPrivateKey = a})
avcrEnabled :: Lens' APNSVoipChannelRequest (Maybe Bool)
avcrEnabled = lens _avcrEnabled (\ s a -> s{_avcrEnabled = a})
avcrTeamId :: Lens' APNSVoipChannelRequest (Maybe Text)
avcrTeamId = lens _avcrTeamId (\ s a -> s{_avcrTeamId = a})
avcrBundleId :: Lens' APNSVoipChannelRequest (Maybe Text)
avcrBundleId = lens _avcrBundleId (\ s a -> s{_avcrBundleId = a})
avcrDefaultAuthenticationMethod :: Lens' APNSVoipChannelRequest (Maybe Text)
avcrDefaultAuthenticationMethod = lens _avcrDefaultAuthenticationMethod (\ s a -> s{_avcrDefaultAuthenticationMethod = a})
avcrCertificate :: Lens' APNSVoipChannelRequest (Maybe Text)
avcrCertificate = lens _avcrCertificate (\ s a -> s{_avcrCertificate = a})
avcrTokenKeyId :: Lens' APNSVoipChannelRequest (Maybe Text)
avcrTokenKeyId = lens _avcrTokenKeyId (\ s a -> s{_avcrTokenKeyId = a})
instance Hashable APNSVoipChannelRequest where
instance NFData APNSVoipChannelRequest where
instance ToJSON APNSVoipChannelRequest where
toJSON APNSVoipChannelRequest'{..}
= object
(catMaybes
[("TokenKey" .=) <$> _avcrTokenKey,
("PrivateKey" .=) <$> _avcrPrivateKey,
("Enabled" .=) <$> _avcrEnabled,
("TeamId" .=) <$> _avcrTeamId,
("BundleId" .=) <$> _avcrBundleId,
("DefaultAuthenticationMethod" .=) <$>
_avcrDefaultAuthenticationMethod,
("Certificate" .=) <$> _avcrCertificate,
("TokenKeyId" .=) <$> _avcrTokenKeyId])
data APNSVoipChannelResponse = APNSVoipChannelResponse'
{ _avcPlatform :: !(Maybe Text)
, _avcLastModifiedDate :: !(Maybe Text)
, _avcEnabled :: !(Maybe Bool)
, _avcHasTokenKey :: !(Maybe Bool)
, _avcDefaultAuthenticationMethod :: !(Maybe Text)
, _avcIsArchived :: !(Maybe Bool)
, _avcApplicationId :: !(Maybe Text)
, _avcVersion :: !(Maybe Int)
, _avcId :: !(Maybe Text)
, _avcCreationDate :: !(Maybe Text)
, _avcLastModifiedBy :: !(Maybe Text)
, _avcHasCredential :: !(Maybe Bool)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
apnsVoipChannelResponse
:: APNSVoipChannelResponse
apnsVoipChannelResponse =
APNSVoipChannelResponse'
{ _avcPlatform = Nothing
, _avcLastModifiedDate = Nothing
, _avcEnabled = Nothing
, _avcHasTokenKey = Nothing
, _avcDefaultAuthenticationMethod = Nothing
, _avcIsArchived = Nothing
, _avcApplicationId = Nothing
, _avcVersion = Nothing
, _avcId = Nothing
, _avcCreationDate = Nothing
, _avcLastModifiedBy = Nothing
, _avcHasCredential = Nothing
}
avcPlatform :: Lens' APNSVoipChannelResponse (Maybe Text)
avcPlatform = lens _avcPlatform (\ s a -> s{_avcPlatform = a})
avcLastModifiedDate :: Lens' APNSVoipChannelResponse (Maybe Text)
avcLastModifiedDate = lens _avcLastModifiedDate (\ s a -> s{_avcLastModifiedDate = a})
avcEnabled :: Lens' APNSVoipChannelResponse (Maybe Bool)
avcEnabled = lens _avcEnabled (\ s a -> s{_avcEnabled = a})
avcHasTokenKey :: Lens' APNSVoipChannelResponse (Maybe Bool)
avcHasTokenKey = lens _avcHasTokenKey (\ s a -> s{_avcHasTokenKey = a})
avcDefaultAuthenticationMethod :: Lens' APNSVoipChannelResponse (Maybe Text)
avcDefaultAuthenticationMethod = lens _avcDefaultAuthenticationMethod (\ s a -> s{_avcDefaultAuthenticationMethod = a})
avcIsArchived :: Lens' APNSVoipChannelResponse (Maybe Bool)
avcIsArchived = lens _avcIsArchived (\ s a -> s{_avcIsArchived = a})
avcApplicationId :: Lens' APNSVoipChannelResponse (Maybe Text)
avcApplicationId = lens _avcApplicationId (\ s a -> s{_avcApplicationId = a})
avcVersion :: Lens' APNSVoipChannelResponse (Maybe Int)
avcVersion = lens _avcVersion (\ s a -> s{_avcVersion = a})
avcId :: Lens' APNSVoipChannelResponse (Maybe Text)
avcId = lens _avcId (\ s a -> s{_avcId = a})
avcCreationDate :: Lens' APNSVoipChannelResponse (Maybe Text)
avcCreationDate = lens _avcCreationDate (\ s a -> s{_avcCreationDate = a})
avcLastModifiedBy :: Lens' APNSVoipChannelResponse (Maybe Text)
avcLastModifiedBy = lens _avcLastModifiedBy (\ s a -> s{_avcLastModifiedBy = a})
avcHasCredential :: Lens' APNSVoipChannelResponse (Maybe Bool)
avcHasCredential = lens _avcHasCredential (\ s a -> s{_avcHasCredential = a})
instance FromJSON APNSVoipChannelResponse where
parseJSON
= withObject "APNSVoipChannelResponse"
(\ x ->
APNSVoipChannelResponse' <$>
(x .:? "Platform") <*> (x .:? "LastModifiedDate") <*>
(x .:? "Enabled")
<*> (x .:? "HasTokenKey")
<*> (x .:? "DefaultAuthenticationMethod")
<*> (x .:? "IsArchived")
<*> (x .:? "ApplicationId")
<*> (x .:? "Version")
<*> (x .:? "Id")
<*> (x .:? "CreationDate")
<*> (x .:? "LastModifiedBy")
<*> (x .:? "HasCredential"))
instance Hashable APNSVoipChannelResponse where
instance NFData APNSVoipChannelResponse where
data APNSVoipSandboxChannelRequest = APNSVoipSandboxChannelRequest'
{ _avscrTokenKey :: !(Maybe Text)
, _avscrPrivateKey :: !(Maybe Text)
, _avscrEnabled :: !(Maybe Bool)
, _avscrTeamId :: !(Maybe Text)
, _avscrBundleId :: !(Maybe Text)
, _avscrDefaultAuthenticationMethod :: !(Maybe Text)
, _avscrCertificate :: !(Maybe Text)
, _avscrTokenKeyId :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
apnsVoipSandboxChannelRequest
:: APNSVoipSandboxChannelRequest
apnsVoipSandboxChannelRequest =
APNSVoipSandboxChannelRequest'
{ _avscrTokenKey = Nothing
, _avscrPrivateKey = Nothing
, _avscrEnabled = Nothing
, _avscrTeamId = Nothing
, _avscrBundleId = Nothing
, _avscrDefaultAuthenticationMethod = Nothing
, _avscrCertificate = Nothing
, _avscrTokenKeyId = Nothing
}
avscrTokenKey :: Lens' APNSVoipSandboxChannelRequest (Maybe Text)
avscrTokenKey = lens _avscrTokenKey (\ s a -> s{_avscrTokenKey = a})
avscrPrivateKey :: Lens' APNSVoipSandboxChannelRequest (Maybe Text)
avscrPrivateKey = lens _avscrPrivateKey (\ s a -> s{_avscrPrivateKey = a})
avscrEnabled :: Lens' APNSVoipSandboxChannelRequest (Maybe Bool)
avscrEnabled = lens _avscrEnabled (\ s a -> s{_avscrEnabled = a})
avscrTeamId :: Lens' APNSVoipSandboxChannelRequest (Maybe Text)
avscrTeamId = lens _avscrTeamId (\ s a -> s{_avscrTeamId = a})
avscrBundleId :: Lens' APNSVoipSandboxChannelRequest (Maybe Text)
avscrBundleId = lens _avscrBundleId (\ s a -> s{_avscrBundleId = a})
avscrDefaultAuthenticationMethod :: Lens' APNSVoipSandboxChannelRequest (Maybe Text)
avscrDefaultAuthenticationMethod = lens _avscrDefaultAuthenticationMethod (\ s a -> s{_avscrDefaultAuthenticationMethod = a})
avscrCertificate :: Lens' APNSVoipSandboxChannelRequest (Maybe Text)
avscrCertificate = lens _avscrCertificate (\ s a -> s{_avscrCertificate = a})
avscrTokenKeyId :: Lens' APNSVoipSandboxChannelRequest (Maybe Text)
avscrTokenKeyId = lens _avscrTokenKeyId (\ s a -> s{_avscrTokenKeyId = a})
instance Hashable APNSVoipSandboxChannelRequest where
instance NFData APNSVoipSandboxChannelRequest where
instance ToJSON APNSVoipSandboxChannelRequest where
toJSON APNSVoipSandboxChannelRequest'{..}
= object
(catMaybes
[("TokenKey" .=) <$> _avscrTokenKey,
("PrivateKey" .=) <$> _avscrPrivateKey,
("Enabled" .=) <$> _avscrEnabled,
("TeamId" .=) <$> _avscrTeamId,
("BundleId" .=) <$> _avscrBundleId,
("DefaultAuthenticationMethod" .=) <$>
_avscrDefaultAuthenticationMethod,
("Certificate" .=) <$> _avscrCertificate,
("TokenKeyId" .=) <$> _avscrTokenKeyId])
data APNSVoipSandboxChannelResponse = APNSVoipSandboxChannelResponse'
{ _avscPlatform :: !(Maybe Text)
, _avscLastModifiedDate :: !(Maybe Text)
, _avscEnabled :: !(Maybe Bool)
, _avscHasTokenKey :: !(Maybe Bool)
, _avscDefaultAuthenticationMethod :: !(Maybe Text)
, _avscIsArchived :: !(Maybe Bool)
, _avscApplicationId :: !(Maybe Text)
, _avscVersion :: !(Maybe Int)
, _avscId :: !(Maybe Text)
, _avscCreationDate :: !(Maybe Text)
, _avscLastModifiedBy :: !(Maybe Text)
, _avscHasCredential :: !(Maybe Bool)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
apnsVoipSandboxChannelResponse
:: APNSVoipSandboxChannelResponse
apnsVoipSandboxChannelResponse =
APNSVoipSandboxChannelResponse'
{ _avscPlatform = Nothing
, _avscLastModifiedDate = Nothing
, _avscEnabled = Nothing
, _avscHasTokenKey = Nothing
, _avscDefaultAuthenticationMethod = Nothing
, _avscIsArchived = Nothing
, _avscApplicationId = Nothing
, _avscVersion = Nothing
, _avscId = Nothing
, _avscCreationDate = Nothing
, _avscLastModifiedBy = Nothing
, _avscHasCredential = Nothing
}
avscPlatform :: Lens' APNSVoipSandboxChannelResponse (Maybe Text)
avscPlatform = lens _avscPlatform (\ s a -> s{_avscPlatform = a})
avscLastModifiedDate :: Lens' APNSVoipSandboxChannelResponse (Maybe Text)
avscLastModifiedDate = lens _avscLastModifiedDate (\ s a -> s{_avscLastModifiedDate = a})
avscEnabled :: Lens' APNSVoipSandboxChannelResponse (Maybe Bool)
avscEnabled = lens _avscEnabled (\ s a -> s{_avscEnabled = a})
avscHasTokenKey :: Lens' APNSVoipSandboxChannelResponse (Maybe Bool)
avscHasTokenKey = lens _avscHasTokenKey (\ s a -> s{_avscHasTokenKey = a})
avscDefaultAuthenticationMethod :: Lens' APNSVoipSandboxChannelResponse (Maybe Text)
avscDefaultAuthenticationMethod = lens _avscDefaultAuthenticationMethod (\ s a -> s{_avscDefaultAuthenticationMethod = a})
avscIsArchived :: Lens' APNSVoipSandboxChannelResponse (Maybe Bool)
avscIsArchived = lens _avscIsArchived (\ s a -> s{_avscIsArchived = a})
avscApplicationId :: Lens' APNSVoipSandboxChannelResponse (Maybe Text)
avscApplicationId = lens _avscApplicationId (\ s a -> s{_avscApplicationId = a})
avscVersion :: Lens' APNSVoipSandboxChannelResponse (Maybe Int)
avscVersion = lens _avscVersion (\ s a -> s{_avscVersion = a})
avscId :: Lens' APNSVoipSandboxChannelResponse (Maybe Text)
avscId = lens _avscId (\ s a -> s{_avscId = a})
avscCreationDate :: Lens' APNSVoipSandboxChannelResponse (Maybe Text)
avscCreationDate = lens _avscCreationDate (\ s a -> s{_avscCreationDate = a})
avscLastModifiedBy :: Lens' APNSVoipSandboxChannelResponse (Maybe Text)
avscLastModifiedBy = lens _avscLastModifiedBy (\ s a -> s{_avscLastModifiedBy = a})
avscHasCredential :: Lens' APNSVoipSandboxChannelResponse (Maybe Bool)
avscHasCredential = lens _avscHasCredential (\ s a -> s{_avscHasCredential = a})
instance FromJSON APNSVoipSandboxChannelResponse
where
parseJSON
= withObject "APNSVoipSandboxChannelResponse"
(\ x ->
APNSVoipSandboxChannelResponse' <$>
(x .:? "Platform") <*> (x .:? "LastModifiedDate") <*>
(x .:? "Enabled")
<*> (x .:? "HasTokenKey")
<*> (x .:? "DefaultAuthenticationMethod")
<*> (x .:? "IsArchived")
<*> (x .:? "ApplicationId")
<*> (x .:? "Version")
<*> (x .:? "Id")
<*> (x .:? "CreationDate")
<*> (x .:? "LastModifiedBy")
<*> (x .:? "HasCredential"))
instance Hashable APNSVoipSandboxChannelResponse
where
instance NFData APNSVoipSandboxChannelResponse where
newtype ActivitiesResponse = ActivitiesResponse'
{ _aItem :: Maybe [ActivityResponse]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
activitiesResponse
:: ActivitiesResponse
activitiesResponse = ActivitiesResponse' {_aItem = Nothing}
aItem :: Lens' ActivitiesResponse [ActivityResponse]
aItem = lens _aItem (\ s a -> s{_aItem = a}) . _Default . _Coerce
instance FromJSON ActivitiesResponse where
parseJSON
= withObject "ActivitiesResponse"
(\ x ->
ActivitiesResponse' <$> (x .:? "Item" .!= mempty))
instance Hashable ActivitiesResponse where
instance NFData ActivitiesResponse where
data ActivityResponse = ActivityResponse'
{ _aState :: !(Maybe Text)
, _aStart :: !(Maybe Text)
, _aCampaignId :: !(Maybe Text)
, _aTimezonesCompletedCount :: !(Maybe Int)
, _aTimezonesTotalCount :: !(Maybe Int)
, _aResult :: !(Maybe Text)
, _aTreatmentId :: !(Maybe Text)
, _aSuccessfulEndpointCount :: !(Maybe Int)
, _aEnd :: !(Maybe Text)
, _aApplicationId :: !(Maybe Text)
, _aTotalEndpointCount :: !(Maybe Int)
, _aId :: !(Maybe Text)
, _aScheduledStart :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
activityResponse
:: ActivityResponse
activityResponse =
ActivityResponse'
{ _aState = Nothing
, _aStart = Nothing
, _aCampaignId = Nothing
, _aTimezonesCompletedCount = Nothing
, _aTimezonesTotalCount = Nothing
, _aResult = Nothing
, _aTreatmentId = Nothing
, _aSuccessfulEndpointCount = Nothing
, _aEnd = Nothing
, _aApplicationId = Nothing
, _aTotalEndpointCount = Nothing
, _aId = Nothing
, _aScheduledStart = Nothing
}
aState :: Lens' ActivityResponse (Maybe Text)
aState = lens _aState (\ s a -> s{_aState = a})
aStart :: Lens' ActivityResponse (Maybe Text)
aStart = lens _aStart (\ s a -> s{_aStart = a})
aCampaignId :: Lens' ActivityResponse (Maybe Text)
aCampaignId = lens _aCampaignId (\ s a -> s{_aCampaignId = a})
aTimezonesCompletedCount :: Lens' ActivityResponse (Maybe Int)
aTimezonesCompletedCount = lens _aTimezonesCompletedCount (\ s a -> s{_aTimezonesCompletedCount = a})
aTimezonesTotalCount :: Lens' ActivityResponse (Maybe Int)
aTimezonesTotalCount = lens _aTimezonesTotalCount (\ s a -> s{_aTimezonesTotalCount = a})
aResult :: Lens' ActivityResponse (Maybe Text)
aResult = lens _aResult (\ s a -> s{_aResult = a})
aTreatmentId :: Lens' ActivityResponse (Maybe Text)
aTreatmentId = lens _aTreatmentId (\ s a -> s{_aTreatmentId = a})
aSuccessfulEndpointCount :: Lens' ActivityResponse (Maybe Int)
aSuccessfulEndpointCount = lens _aSuccessfulEndpointCount (\ s a -> s{_aSuccessfulEndpointCount = a})
aEnd :: Lens' ActivityResponse (Maybe Text)
aEnd = lens _aEnd (\ s a -> s{_aEnd = a})
aApplicationId :: Lens' ActivityResponse (Maybe Text)
aApplicationId = lens _aApplicationId (\ s a -> s{_aApplicationId = a})
aTotalEndpointCount :: Lens' ActivityResponse (Maybe Int)
aTotalEndpointCount = lens _aTotalEndpointCount (\ s a -> s{_aTotalEndpointCount = a})
aId :: Lens' ActivityResponse (Maybe Text)
aId = lens _aId (\ s a -> s{_aId = a})
aScheduledStart :: Lens' ActivityResponse (Maybe Text)
aScheduledStart = lens _aScheduledStart (\ s a -> s{_aScheduledStart = a})
instance FromJSON ActivityResponse where
parseJSON
= withObject "ActivityResponse"
(\ x ->
ActivityResponse' <$>
(x .:? "State") <*> (x .:? "Start") <*>
(x .:? "CampaignId")
<*> (x .:? "TimezonesCompletedCount")
<*> (x .:? "TimezonesTotalCount")
<*> (x .:? "Result")
<*> (x .:? "TreatmentId")
<*> (x .:? "SuccessfulEndpointCount")
<*> (x .:? "End")
<*> (x .:? "ApplicationId")
<*> (x .:? "TotalEndpointCount")
<*> (x .:? "Id")
<*> (x .:? "ScheduledStart"))
instance Hashable ActivityResponse where
instance NFData ActivityResponse where
data AddressConfiguration = AddressConfiguration'
{ _acSubstitutions :: !(Maybe (Map Text [Text]))
, _acTitleOverride :: !(Maybe Text)
, _acContext :: !(Maybe (Map Text Text))
, _acRawContent :: !(Maybe Text)
, _acBodyOverride :: !(Maybe Text)
, _acChannelType :: !(Maybe ChannelType)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
addressConfiguration
:: AddressConfiguration
addressConfiguration =
AddressConfiguration'
{ _acSubstitutions = Nothing
, _acTitleOverride = Nothing
, _acContext = Nothing
, _acRawContent = Nothing
, _acBodyOverride = Nothing
, _acChannelType = Nothing
}
acSubstitutions :: Lens' AddressConfiguration (HashMap Text [Text])
acSubstitutions = lens _acSubstitutions (\ s a -> s{_acSubstitutions = a}) . _Default . _Map
acTitleOverride :: Lens' AddressConfiguration (Maybe Text)
acTitleOverride = lens _acTitleOverride (\ s a -> s{_acTitleOverride = a})
acContext :: Lens' AddressConfiguration (HashMap Text Text)
acContext = lens _acContext (\ s a -> s{_acContext = a}) . _Default . _Map
acRawContent :: Lens' AddressConfiguration (Maybe Text)
acRawContent = lens _acRawContent (\ s a -> s{_acRawContent = a})
acBodyOverride :: Lens' AddressConfiguration (Maybe Text)
acBodyOverride = lens _acBodyOverride (\ s a -> s{_acBodyOverride = a})
acChannelType :: Lens' AddressConfiguration (Maybe ChannelType)
acChannelType = lens _acChannelType (\ s a -> s{_acChannelType = a})
instance Hashable AddressConfiguration where
instance NFData AddressConfiguration where
instance ToJSON AddressConfiguration where
toJSON AddressConfiguration'{..}
= object
(catMaybes
[("Substitutions" .=) <$> _acSubstitutions,
("TitleOverride" .=) <$> _acTitleOverride,
("Context" .=) <$> _acContext,
("RawContent" .=) <$> _acRawContent,
("BodyOverride" .=) <$> _acBodyOverride,
("ChannelType" .=) <$> _acChannelType])
data ApplicationResponse = ApplicationResponse'
{ _appName :: !(Maybe Text)
, _appId :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
applicationResponse
:: ApplicationResponse
applicationResponse =
ApplicationResponse' {_appName = Nothing, _appId = Nothing}
appName :: Lens' ApplicationResponse (Maybe Text)
appName = lens _appName (\ s a -> s{_appName = a})
appId :: Lens' ApplicationResponse (Maybe Text)
appId = lens _appId (\ s a -> s{_appId = a})
instance FromJSON ApplicationResponse where
parseJSON
= withObject "ApplicationResponse"
(\ x ->
ApplicationResponse' <$>
(x .:? "Name") <*> (x .:? "Id"))
instance Hashable ApplicationResponse where
instance NFData ApplicationResponse where
data ApplicationSettingsResource = ApplicationSettingsResource'
{ _asrLastModifiedDate :: !(Maybe Text)
, _asrLimits :: !(Maybe CampaignLimits)
, _asrQuietTime :: !(Maybe QuietTime)
, _asrApplicationId :: !(Maybe Text)
, _asrCampaignHook :: !(Maybe CampaignHook)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
applicationSettingsResource
:: ApplicationSettingsResource
applicationSettingsResource =
ApplicationSettingsResource'
{ _asrLastModifiedDate = Nothing
, _asrLimits = Nothing
, _asrQuietTime = Nothing
, _asrApplicationId = Nothing
, _asrCampaignHook = Nothing
}
asrLastModifiedDate :: Lens' ApplicationSettingsResource (Maybe Text)
asrLastModifiedDate = lens _asrLastModifiedDate (\ s a -> s{_asrLastModifiedDate = a})
asrLimits :: Lens' ApplicationSettingsResource (Maybe CampaignLimits)
asrLimits = lens _asrLimits (\ s a -> s{_asrLimits = a})
asrQuietTime :: Lens' ApplicationSettingsResource (Maybe QuietTime)
asrQuietTime = lens _asrQuietTime (\ s a -> s{_asrQuietTime = a})
asrApplicationId :: Lens' ApplicationSettingsResource (Maybe Text)
asrApplicationId = lens _asrApplicationId (\ s a -> s{_asrApplicationId = a})
asrCampaignHook :: Lens' ApplicationSettingsResource (Maybe CampaignHook)
asrCampaignHook = lens _asrCampaignHook (\ s a -> s{_asrCampaignHook = a})
instance FromJSON ApplicationSettingsResource where
parseJSON
= withObject "ApplicationSettingsResource"
(\ x ->
ApplicationSettingsResource' <$>
(x .:? "LastModifiedDate") <*> (x .:? "Limits") <*>
(x .:? "QuietTime")
<*> (x .:? "ApplicationId")
<*> (x .:? "CampaignHook"))
instance Hashable ApplicationSettingsResource where
instance NFData ApplicationSettingsResource where
data ApplicationsResponse = ApplicationsResponse'
{ _appNextToken :: !(Maybe Text)
, _appItem :: !(Maybe [ApplicationResponse])
} deriving (Eq, Read, Show, Data, Typeable, Generic)
applicationsResponse
:: ApplicationsResponse
applicationsResponse =
ApplicationsResponse' {_appNextToken = Nothing, _appItem = Nothing}
appNextToken :: Lens' ApplicationsResponse (Maybe Text)
appNextToken = lens _appNextToken (\ s a -> s{_appNextToken = a})
appItem :: Lens' ApplicationsResponse [ApplicationResponse]
appItem = lens _appItem (\ s a -> s{_appItem = a}) . _Default . _Coerce
instance FromJSON ApplicationsResponse where
parseJSON
= withObject "ApplicationsResponse"
(\ x ->
ApplicationsResponse' <$>
(x .:? "NextToken") <*> (x .:? "Item" .!= mempty))
instance Hashable ApplicationsResponse where
instance NFData ApplicationsResponse where
data AttributeDimension = AttributeDimension'
{ _adValues :: !(Maybe [Text])
, _adAttributeType :: !(Maybe AttributeType)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
attributeDimension
:: AttributeDimension
attributeDimension =
AttributeDimension' {_adValues = Nothing, _adAttributeType = Nothing}
adValues :: Lens' AttributeDimension [Text]
adValues = lens _adValues (\ s a -> s{_adValues = a}) . _Default . _Coerce
adAttributeType :: Lens' AttributeDimension (Maybe AttributeType)
adAttributeType = lens _adAttributeType (\ s a -> s{_adAttributeType = a})
instance FromJSON AttributeDimension where
parseJSON
= withObject "AttributeDimension"
(\ x ->
AttributeDimension' <$>
(x .:? "Values" .!= mempty) <*>
(x .:? "AttributeType"))
instance Hashable AttributeDimension where
instance NFData AttributeDimension where
instance ToJSON AttributeDimension where
toJSON AttributeDimension'{..}
= object
(catMaybes
[("Values" .=) <$> _adValues,
("AttributeType" .=) <$> _adAttributeType])
data BaiduChannelRequest = BaiduChannelRequest'
{ _bcrAPIKey :: !(Maybe Text)
, _bcrEnabled :: !(Maybe Bool)
, _bcrSecretKey :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
baiduChannelRequest
:: BaiduChannelRequest
baiduChannelRequest =
BaiduChannelRequest'
{_bcrAPIKey = Nothing, _bcrEnabled = Nothing, _bcrSecretKey = Nothing}
bcrAPIKey :: Lens' BaiduChannelRequest (Maybe Text)
bcrAPIKey = lens _bcrAPIKey (\ s a -> s{_bcrAPIKey = a})
bcrEnabled :: Lens' BaiduChannelRequest (Maybe Bool)
bcrEnabled = lens _bcrEnabled (\ s a -> s{_bcrEnabled = a})
bcrSecretKey :: Lens' BaiduChannelRequest (Maybe Text)
bcrSecretKey = lens _bcrSecretKey (\ s a -> s{_bcrSecretKey = a})
instance Hashable BaiduChannelRequest where
instance NFData BaiduChannelRequest where
instance ToJSON BaiduChannelRequest where
toJSON BaiduChannelRequest'{..}
= object
(catMaybes
[("ApiKey" .=) <$> _bcrAPIKey,
("Enabled" .=) <$> _bcrEnabled,
("SecretKey" .=) <$> _bcrSecretKey])
data BaiduChannelResponse = BaiduChannelResponse'
{ _bcPlatform :: !(Maybe Text)
, _bcLastModifiedDate :: !(Maybe Text)
, _bcEnabled :: !(Maybe Bool)
, _bcCredential :: !(Maybe Text)
, _bcIsArchived :: !(Maybe Bool)
, _bcApplicationId :: !(Maybe Text)
, _bcVersion :: !(Maybe Int)
, _bcId :: !(Maybe Text)
, _bcCreationDate :: !(Maybe Text)
, _bcLastModifiedBy :: !(Maybe Text)
, _bcHasCredential :: !(Maybe Bool)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
baiduChannelResponse
:: BaiduChannelResponse
baiduChannelResponse =
BaiduChannelResponse'
{ _bcPlatform = Nothing
, _bcLastModifiedDate = Nothing
, _bcEnabled = Nothing
, _bcCredential = Nothing
, _bcIsArchived = Nothing
, _bcApplicationId = Nothing
, _bcVersion = Nothing
, _bcId = Nothing
, _bcCreationDate = Nothing
, _bcLastModifiedBy = Nothing
, _bcHasCredential = Nothing
}
bcPlatform :: Lens' BaiduChannelResponse (Maybe Text)
bcPlatform = lens _bcPlatform (\ s a -> s{_bcPlatform = a})
bcLastModifiedDate :: Lens' BaiduChannelResponse (Maybe Text)
bcLastModifiedDate = lens _bcLastModifiedDate (\ s a -> s{_bcLastModifiedDate = a})
bcEnabled :: Lens' BaiduChannelResponse (Maybe Bool)
bcEnabled = lens _bcEnabled (\ s a -> s{_bcEnabled = a})
bcCredential :: Lens' BaiduChannelResponse (Maybe Text)
bcCredential = lens _bcCredential (\ s a -> s{_bcCredential = a})
bcIsArchived :: Lens' BaiduChannelResponse (Maybe Bool)
bcIsArchived = lens _bcIsArchived (\ s a -> s{_bcIsArchived = a})
bcApplicationId :: Lens' BaiduChannelResponse (Maybe Text)
bcApplicationId = lens _bcApplicationId (\ s a -> s{_bcApplicationId = a})
bcVersion :: Lens' BaiduChannelResponse (Maybe Int)
bcVersion = lens _bcVersion (\ s a -> s{_bcVersion = a})
bcId :: Lens' BaiduChannelResponse (Maybe Text)
bcId = lens _bcId (\ s a -> s{_bcId = a})
bcCreationDate :: Lens' BaiduChannelResponse (Maybe Text)
bcCreationDate = lens _bcCreationDate (\ s a -> s{_bcCreationDate = a})
bcLastModifiedBy :: Lens' BaiduChannelResponse (Maybe Text)
bcLastModifiedBy = lens _bcLastModifiedBy (\ s a -> s{_bcLastModifiedBy = a})
bcHasCredential :: Lens' BaiduChannelResponse (Maybe Bool)
bcHasCredential = lens _bcHasCredential (\ s a -> s{_bcHasCredential = a})
instance FromJSON BaiduChannelResponse where
parseJSON
= withObject "BaiduChannelResponse"
(\ x ->
BaiduChannelResponse' <$>
(x .:? "Platform") <*> (x .:? "LastModifiedDate") <*>
(x .:? "Enabled")
<*> (x .:? "Credential")
<*> (x .:? "IsArchived")
<*> (x .:? "ApplicationId")
<*> (x .:? "Version")
<*> (x .:? "Id")
<*> (x .:? "CreationDate")
<*> (x .:? "LastModifiedBy")
<*> (x .:? "HasCredential"))
instance Hashable BaiduChannelResponse where
instance NFData BaiduChannelResponse where
data BaiduMessage = BaiduMessage'
{ _bmSubstitutions :: !(Maybe (Map Text [Text]))
, _bmSilentPush :: !(Maybe Bool)
, _bmImageIconURL :: !(Maybe Text)
, _bmRawContent :: !(Maybe Text)
, _bmData :: !(Maybe (Map Text Text))
, _bmSmallImageIconURL :: !(Maybe Text)
, _bmBody :: !(Maybe Text)
, _bmURL :: !(Maybe Text)
, _bmSound :: !(Maybe Text)
, _bmAction :: !(Maybe Action)
, _bmImageURL :: !(Maybe Text)
, _bmTitle :: !(Maybe Text)
, _bmIconReference :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
baiduMessage
:: BaiduMessage
baiduMessage =
BaiduMessage'
{ _bmSubstitutions = Nothing
, _bmSilentPush = Nothing
, _bmImageIconURL = Nothing
, _bmRawContent = Nothing
, _bmData = Nothing
, _bmSmallImageIconURL = Nothing
, _bmBody = Nothing
, _bmURL = Nothing
, _bmSound = Nothing
, _bmAction = Nothing
, _bmImageURL = Nothing
, _bmTitle = Nothing
, _bmIconReference = Nothing
}
bmSubstitutions :: Lens' BaiduMessage (HashMap Text [Text])
bmSubstitutions = lens _bmSubstitutions (\ s a -> s{_bmSubstitutions = a}) . _Default . _Map
bmSilentPush :: Lens' BaiduMessage (Maybe Bool)
bmSilentPush = lens _bmSilentPush (\ s a -> s{_bmSilentPush = a})
bmImageIconURL :: Lens' BaiduMessage (Maybe Text)
bmImageIconURL = lens _bmImageIconURL (\ s a -> s{_bmImageIconURL = a})
bmRawContent :: Lens' BaiduMessage (Maybe Text)
bmRawContent = lens _bmRawContent (\ s a -> s{_bmRawContent = a})
bmData :: Lens' BaiduMessage (HashMap Text Text)
bmData = lens _bmData (\ s a -> s{_bmData = a}) . _Default . _Map
bmSmallImageIconURL :: Lens' BaiduMessage (Maybe Text)
bmSmallImageIconURL = lens _bmSmallImageIconURL (\ s a -> s{_bmSmallImageIconURL = a})
bmBody :: Lens' BaiduMessage (Maybe Text)
bmBody = lens _bmBody (\ s a -> s{_bmBody = a})
bmURL :: Lens' BaiduMessage (Maybe Text)
bmURL = lens _bmURL (\ s a -> s{_bmURL = a})
bmSound :: Lens' BaiduMessage (Maybe Text)
bmSound = lens _bmSound (\ s a -> s{_bmSound = a})
bmAction :: Lens' BaiduMessage (Maybe Action)
bmAction = lens _bmAction (\ s a -> s{_bmAction = a})
bmImageURL :: Lens' BaiduMessage (Maybe Text)
bmImageURL = lens _bmImageURL (\ s a -> s{_bmImageURL = a})
bmTitle :: Lens' BaiduMessage (Maybe Text)
bmTitle = lens _bmTitle (\ s a -> s{_bmTitle = a})
bmIconReference :: Lens' BaiduMessage (Maybe Text)
bmIconReference = lens _bmIconReference (\ s a -> s{_bmIconReference = a})
instance Hashable BaiduMessage where
instance NFData BaiduMessage where
instance ToJSON BaiduMessage where
toJSON BaiduMessage'{..}
= object
(catMaybes
[("Substitutions" .=) <$> _bmSubstitutions,
("SilentPush" .=) <$> _bmSilentPush,
("ImageIconUrl" .=) <$> _bmImageIconURL,
("RawContent" .=) <$> _bmRawContent,
("Data" .=) <$> _bmData,
("SmallImageIconUrl" .=) <$> _bmSmallImageIconURL,
("Body" .=) <$> _bmBody, ("Url" .=) <$> _bmURL,
("Sound" .=) <$> _bmSound,
("Action" .=) <$> _bmAction,
("ImageUrl" .=) <$> _bmImageURL,
("Title" .=) <$> _bmTitle,
("IconReference" .=) <$> _bmIconReference])
data CampaignEmailMessage = CampaignEmailMessage'
{ _cemBody :: !(Maybe Text)
, _cemFromAddress :: !(Maybe Text)
, _cemHTMLBody :: !(Maybe Text)
, _cemTitle :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
campaignEmailMessage
:: CampaignEmailMessage
campaignEmailMessage =
CampaignEmailMessage'
{ _cemBody = Nothing
, _cemFromAddress = Nothing
, _cemHTMLBody = Nothing
, _cemTitle = Nothing
}
cemBody :: Lens' CampaignEmailMessage (Maybe Text)
cemBody = lens _cemBody (\ s a -> s{_cemBody = a})
cemFromAddress :: Lens' CampaignEmailMessage (Maybe Text)
cemFromAddress = lens _cemFromAddress (\ s a -> s{_cemFromAddress = a})
cemHTMLBody :: Lens' CampaignEmailMessage (Maybe Text)
cemHTMLBody = lens _cemHTMLBody (\ s a -> s{_cemHTMLBody = a})
cemTitle :: Lens' CampaignEmailMessage (Maybe Text)
cemTitle = lens _cemTitle (\ s a -> s{_cemTitle = a})
instance FromJSON CampaignEmailMessage where
parseJSON
= withObject "CampaignEmailMessage"
(\ x ->
CampaignEmailMessage' <$>
(x .:? "Body") <*> (x .:? "FromAddress") <*>
(x .:? "HtmlBody")
<*> (x .:? "Title"))
instance Hashable CampaignEmailMessage where
instance NFData CampaignEmailMessage where
instance ToJSON CampaignEmailMessage where
toJSON CampaignEmailMessage'{..}
= object
(catMaybes
[("Body" .=) <$> _cemBody,
("FromAddress" .=) <$> _cemFromAddress,
("HtmlBody" .=) <$> _cemHTMLBody,
("Title" .=) <$> _cemTitle])
data CampaignHook = CampaignHook'
{ _chLambdaFunctionName :: !(Maybe Text)
, _chMode :: !(Maybe Mode)
, _chWebURL :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
campaignHook
:: CampaignHook
campaignHook =
CampaignHook'
{_chLambdaFunctionName = Nothing, _chMode = Nothing, _chWebURL = Nothing}
chLambdaFunctionName :: Lens' CampaignHook (Maybe Text)
chLambdaFunctionName = lens _chLambdaFunctionName (\ s a -> s{_chLambdaFunctionName = a})
chMode :: Lens' CampaignHook (Maybe Mode)
chMode = lens _chMode (\ s a -> s{_chMode = a})
chWebURL :: Lens' CampaignHook (Maybe Text)
chWebURL = lens _chWebURL (\ s a -> s{_chWebURL = a})
instance FromJSON CampaignHook where
parseJSON
= withObject "CampaignHook"
(\ x ->
CampaignHook' <$>
(x .:? "LambdaFunctionName") <*> (x .:? "Mode") <*>
(x .:? "WebUrl"))
instance Hashable CampaignHook where
instance NFData CampaignHook where
instance ToJSON CampaignHook where
toJSON CampaignHook'{..}
= object
(catMaybes
[("LambdaFunctionName" .=) <$> _chLambdaFunctionName,
("Mode" .=) <$> _chMode,
("WebUrl" .=) <$> _chWebURL])
data CampaignLimits = CampaignLimits'
{ _clMessagesPerSecond :: !(Maybe Int)
, _clDaily :: !(Maybe Int)
, _clTotal :: !(Maybe Int)
, _clMaximumDuration :: !(Maybe Int)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
campaignLimits
:: CampaignLimits
campaignLimits =
CampaignLimits'
{ _clMessagesPerSecond = Nothing
, _clDaily = Nothing
, _clTotal = Nothing
, _clMaximumDuration = Nothing
}
clMessagesPerSecond :: Lens' CampaignLimits (Maybe Int)
clMessagesPerSecond = lens _clMessagesPerSecond (\ s a -> s{_clMessagesPerSecond = a})
clDaily :: Lens' CampaignLimits (Maybe Int)
clDaily = lens _clDaily (\ s a -> s{_clDaily = a})
clTotal :: Lens' CampaignLimits (Maybe Int)
clTotal = lens _clTotal (\ s a -> s{_clTotal = a})
clMaximumDuration :: Lens' CampaignLimits (Maybe Int)
clMaximumDuration = lens _clMaximumDuration (\ s a -> s{_clMaximumDuration = a})
instance FromJSON CampaignLimits where
parseJSON
= withObject "CampaignLimits"
(\ x ->
CampaignLimits' <$>
(x .:? "MessagesPerSecond") <*> (x .:? "Daily") <*>
(x .:? "Total")
<*> (x .:? "MaximumDuration"))
instance Hashable CampaignLimits where
instance NFData CampaignLimits where
instance ToJSON CampaignLimits where
toJSON CampaignLimits'{..}
= object
(catMaybes
[("MessagesPerSecond" .=) <$> _clMessagesPerSecond,
("Daily" .=) <$> _clDaily, ("Total" .=) <$> _clTotal,
("MaximumDuration" .=) <$> _clMaximumDuration])
data CampaignResponse = CampaignResponse'
{ _cState :: !(Maybe CampaignState)
, _cLastModifiedDate :: !(Maybe Text)
, _cSchedule :: !(Maybe Schedule)
, _cHook :: !(Maybe CampaignHook)
, _cTreatmentName :: !(Maybe Text)
, _cLimits :: !(Maybe CampaignLimits)
, _cIsPaused :: !(Maybe Bool)
, _cDefaultState :: !(Maybe CampaignState)
, _cApplicationId :: !(Maybe Text)
, _cName :: !(Maybe Text)
, _cVersion :: !(Maybe Int)
, _cHoldoutPercent :: !(Maybe Int)
, _cTreatmentDescription :: !(Maybe Text)
, _cId :: !(Maybe Text)
, _cCreationDate :: !(Maybe Text)
, _cMessageConfiguration :: !(Maybe MessageConfiguration)
, _cDescription :: !(Maybe Text)
, _cSegmentId :: !(Maybe Text)
, _cAdditionalTreatments :: !(Maybe [TreatmentResource])
, _cSegmentVersion :: !(Maybe Int)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
campaignResponse
:: CampaignResponse
campaignResponse =
CampaignResponse'
{ _cState = Nothing
, _cLastModifiedDate = Nothing
, _cSchedule = Nothing
, _cHook = Nothing
, _cTreatmentName = Nothing
, _cLimits = Nothing
, _cIsPaused = Nothing
, _cDefaultState = Nothing
, _cApplicationId = Nothing
, _cName = Nothing
, _cVersion = Nothing
, _cHoldoutPercent = Nothing
, _cTreatmentDescription = Nothing
, _cId = Nothing
, _cCreationDate = Nothing
, _cMessageConfiguration = Nothing
, _cDescription = Nothing
, _cSegmentId = Nothing
, _cAdditionalTreatments = Nothing
, _cSegmentVersion = Nothing
}
cState :: Lens' CampaignResponse (Maybe CampaignState)
cState = lens _cState (\ s a -> s{_cState = a})
cLastModifiedDate :: Lens' CampaignResponse (Maybe Text)
cLastModifiedDate = lens _cLastModifiedDate (\ s a -> s{_cLastModifiedDate = a})
cSchedule :: Lens' CampaignResponse (Maybe Schedule)
cSchedule = lens _cSchedule (\ s a -> s{_cSchedule = a})
cHook :: Lens' CampaignResponse (Maybe CampaignHook)
cHook = lens _cHook (\ s a -> s{_cHook = a})
cTreatmentName :: Lens' CampaignResponse (Maybe Text)
cTreatmentName = lens _cTreatmentName (\ s a -> s{_cTreatmentName = a})
cLimits :: Lens' CampaignResponse (Maybe CampaignLimits)
cLimits = lens _cLimits (\ s a -> s{_cLimits = a})
cIsPaused :: Lens' CampaignResponse (Maybe Bool)
cIsPaused = lens _cIsPaused (\ s a -> s{_cIsPaused = a})
cDefaultState :: Lens' CampaignResponse (Maybe CampaignState)
cDefaultState = lens _cDefaultState (\ s a -> s{_cDefaultState = a})
cApplicationId :: Lens' CampaignResponse (Maybe Text)
cApplicationId = lens _cApplicationId (\ s a -> s{_cApplicationId = a})
cName :: Lens' CampaignResponse (Maybe Text)
cName = lens _cName (\ s a -> s{_cName = a})
cVersion :: Lens' CampaignResponse (Maybe Int)
cVersion = lens _cVersion (\ s a -> s{_cVersion = a})
cHoldoutPercent :: Lens' CampaignResponse (Maybe Int)
cHoldoutPercent = lens _cHoldoutPercent (\ s a -> s{_cHoldoutPercent = a})
cTreatmentDescription :: Lens' CampaignResponse (Maybe Text)
cTreatmentDescription = lens _cTreatmentDescription (\ s a -> s{_cTreatmentDescription = a})
cId :: Lens' CampaignResponse (Maybe Text)
cId = lens _cId (\ s a -> s{_cId = a})
cCreationDate :: Lens' CampaignResponse (Maybe Text)
cCreationDate = lens _cCreationDate (\ s a -> s{_cCreationDate = a})
cMessageConfiguration :: Lens' CampaignResponse (Maybe MessageConfiguration)
cMessageConfiguration = lens _cMessageConfiguration (\ s a -> s{_cMessageConfiguration = a})
cDescription :: Lens' CampaignResponse (Maybe Text)
cDescription = lens _cDescription (\ s a -> s{_cDescription = a})
cSegmentId :: Lens' CampaignResponse (Maybe Text)
cSegmentId = lens _cSegmentId (\ s a -> s{_cSegmentId = a})
cAdditionalTreatments :: Lens' CampaignResponse [TreatmentResource]
cAdditionalTreatments = lens _cAdditionalTreatments (\ s a -> s{_cAdditionalTreatments = a}) . _Default . _Coerce
cSegmentVersion :: Lens' CampaignResponse (Maybe Int)
cSegmentVersion = lens _cSegmentVersion (\ s a -> s{_cSegmentVersion = a})
instance FromJSON CampaignResponse where
parseJSON
= withObject "CampaignResponse"
(\ x ->
CampaignResponse' <$>
(x .:? "State") <*> (x .:? "LastModifiedDate") <*>
(x .:? "Schedule")
<*> (x .:? "Hook")
<*> (x .:? "TreatmentName")
<*> (x .:? "Limits")
<*> (x .:? "IsPaused")
<*> (x .:? "DefaultState")
<*> (x .:? "ApplicationId")
<*> (x .:? "Name")
<*> (x .:? "Version")
<*> (x .:? "HoldoutPercent")
<*> (x .:? "TreatmentDescription")
<*> (x .:? "Id")
<*> (x .:? "CreationDate")
<*> (x .:? "MessageConfiguration")
<*> (x .:? "Description")
<*> (x .:? "SegmentId")
<*> (x .:? "AdditionalTreatments" .!= mempty)
<*> (x .:? "SegmentVersion"))
instance Hashable CampaignResponse where
instance NFData CampaignResponse where
data CampaignSmsMessage = CampaignSmsMessage'
{ _csmBody :: !(Maybe Text)
, _csmMessageType :: !(Maybe MessageType)
, _csmSenderId :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
campaignSmsMessage
:: CampaignSmsMessage
campaignSmsMessage =
CampaignSmsMessage'
{_csmBody = Nothing, _csmMessageType = Nothing, _csmSenderId = Nothing}
csmBody :: Lens' CampaignSmsMessage (Maybe Text)
csmBody = lens _csmBody (\ s a -> s{_csmBody = a})
csmMessageType :: Lens' CampaignSmsMessage (Maybe MessageType)
csmMessageType = lens _csmMessageType (\ s a -> s{_csmMessageType = a})
csmSenderId :: Lens' CampaignSmsMessage (Maybe Text)
csmSenderId = lens _csmSenderId (\ s a -> s{_csmSenderId = a})
instance FromJSON CampaignSmsMessage where
parseJSON
= withObject "CampaignSmsMessage"
(\ x ->
CampaignSmsMessage' <$>
(x .:? "Body") <*> (x .:? "MessageType") <*>
(x .:? "SenderId"))
instance Hashable CampaignSmsMessage where
instance NFData CampaignSmsMessage where
instance ToJSON CampaignSmsMessage where
toJSON CampaignSmsMessage'{..}
= object
(catMaybes
[("Body" .=) <$> _csmBody,
("MessageType" .=) <$> _csmMessageType,
("SenderId" .=) <$> _csmSenderId])
newtype CampaignState = CampaignState'
{ _csCampaignStatus :: Maybe CampaignStatus
} deriving (Eq, Read, Show, Data, Typeable, Generic)
campaignState
:: CampaignState
campaignState = CampaignState' {_csCampaignStatus = Nothing}
csCampaignStatus :: Lens' CampaignState (Maybe CampaignStatus)
csCampaignStatus = lens _csCampaignStatus (\ s a -> s{_csCampaignStatus = a})
instance FromJSON CampaignState where
parseJSON
= withObject "CampaignState"
(\ x -> CampaignState' <$> (x .:? "CampaignStatus"))
instance Hashable CampaignState where
instance NFData CampaignState where
data CampaignsResponse = CampaignsResponse'
{ _cNextToken :: !(Maybe Text)
, _cItem :: !(Maybe [CampaignResponse])
} deriving (Eq, Read, Show, Data, Typeable, Generic)
campaignsResponse
:: CampaignsResponse
campaignsResponse = CampaignsResponse' {_cNextToken = Nothing, _cItem = Nothing}
cNextToken :: Lens' CampaignsResponse (Maybe Text)
cNextToken = lens _cNextToken (\ s a -> s{_cNextToken = a})
cItem :: Lens' CampaignsResponse [CampaignResponse]
cItem = lens _cItem (\ s a -> s{_cItem = a}) . _Default . _Coerce
instance FromJSON CampaignsResponse where
parseJSON
= withObject "CampaignsResponse"
(\ x ->
CampaignsResponse' <$>
(x .:? "NextToken") <*> (x .:? "Item" .!= mempty))
instance Hashable CampaignsResponse where
instance NFData CampaignsResponse where
newtype CreateApplicationRequest = CreateApplicationRequest'
{ _carName :: Maybe Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
createApplicationRequest
:: CreateApplicationRequest
createApplicationRequest = CreateApplicationRequest' {_carName = Nothing}
carName :: Lens' CreateApplicationRequest (Maybe Text)
carName = lens _carName (\ s a -> s{_carName = a})
instance Hashable CreateApplicationRequest where
instance NFData CreateApplicationRequest where
instance ToJSON CreateApplicationRequest where
toJSON CreateApplicationRequest'{..}
= object (catMaybes [("Name" .=) <$> _carName])
data DefaultMessage = DefaultMessage'
{ _dmSubstitutions :: !(Maybe (Map Text [Text]))
, _dmBody :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
defaultMessage
:: DefaultMessage
defaultMessage = DefaultMessage' {_dmSubstitutions = Nothing, _dmBody = Nothing}
dmSubstitutions :: Lens' DefaultMessage (HashMap Text [Text])
dmSubstitutions = lens _dmSubstitutions (\ s a -> s{_dmSubstitutions = a}) . _Default . _Map
dmBody :: Lens' DefaultMessage (Maybe Text)
dmBody = lens _dmBody (\ s a -> s{_dmBody = a})
instance Hashable DefaultMessage where
instance NFData DefaultMessage where
instance ToJSON DefaultMessage where
toJSON DefaultMessage'{..}
= object
(catMaybes
[("Substitutions" .=) <$> _dmSubstitutions,
("Body" .=) <$> _dmBody])
data DefaultPushNotificationMessage = DefaultPushNotificationMessage'
{ _dpnmSubstitutions :: !(Maybe (Map Text [Text]))
, _dpnmSilentPush :: !(Maybe Bool)
, _dpnmData :: !(Maybe (Map Text Text))
, _dpnmBody :: !(Maybe Text)
, _dpnmURL :: !(Maybe Text)
, _dpnmAction :: !(Maybe Action)
, _dpnmTitle :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
defaultPushNotificationMessage
:: DefaultPushNotificationMessage
defaultPushNotificationMessage =
DefaultPushNotificationMessage'
{ _dpnmSubstitutions = Nothing
, _dpnmSilentPush = Nothing
, _dpnmData = Nothing
, _dpnmBody = Nothing
, _dpnmURL = Nothing
, _dpnmAction = Nothing
, _dpnmTitle = Nothing
}
dpnmSubstitutions :: Lens' DefaultPushNotificationMessage (HashMap Text [Text])
dpnmSubstitutions = lens _dpnmSubstitutions (\ s a -> s{_dpnmSubstitutions = a}) . _Default . _Map
dpnmSilentPush :: Lens' DefaultPushNotificationMessage (Maybe Bool)
dpnmSilentPush = lens _dpnmSilentPush (\ s a -> s{_dpnmSilentPush = a})
dpnmData :: Lens' DefaultPushNotificationMessage (HashMap Text Text)
dpnmData = lens _dpnmData (\ s a -> s{_dpnmData = a}) . _Default . _Map
dpnmBody :: Lens' DefaultPushNotificationMessage (Maybe Text)
dpnmBody = lens _dpnmBody (\ s a -> s{_dpnmBody = a})
dpnmURL :: Lens' DefaultPushNotificationMessage (Maybe Text)
dpnmURL = lens _dpnmURL (\ s a -> s{_dpnmURL = a})
dpnmAction :: Lens' DefaultPushNotificationMessage (Maybe Action)
dpnmAction = lens _dpnmAction (\ s a -> s{_dpnmAction = a})
dpnmTitle :: Lens' DefaultPushNotificationMessage (Maybe Text)
dpnmTitle = lens _dpnmTitle (\ s a -> s{_dpnmTitle = a})
instance Hashable DefaultPushNotificationMessage
where
instance NFData DefaultPushNotificationMessage where
instance ToJSON DefaultPushNotificationMessage where
toJSON DefaultPushNotificationMessage'{..}
= object
(catMaybes
[("Substitutions" .=) <$> _dpnmSubstitutions,
("SilentPush" .=) <$> _dpnmSilentPush,
("Data" .=) <$> _dpnmData, ("Body" .=) <$> _dpnmBody,
("Url" .=) <$> _dpnmURL,
("Action" .=) <$> _dpnmAction,
("Title" .=) <$> _dpnmTitle])
data DirectMessageConfiguration = DirectMessageConfiguration'
{ _dmcAPNSMessage :: !(Maybe APNSMessage)
, _dmcGCMMessage :: !(Maybe GCMMessage)
, _dmcDefaultMessage :: !(Maybe DefaultMessage)
, _dmcADMMessage :: !(Maybe ADMMessage)
, _dmcSMSMessage :: !(Maybe SMSMessage)
, _dmcBaiduMessage :: !(Maybe BaiduMessage)
, _dmcDefaultPushNotificationMessage :: !(Maybe DefaultPushNotificationMessage)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
directMessageConfiguration
:: DirectMessageConfiguration
directMessageConfiguration =
DirectMessageConfiguration'
{ _dmcAPNSMessage = Nothing
, _dmcGCMMessage = Nothing
, _dmcDefaultMessage = Nothing
, _dmcADMMessage = Nothing
, _dmcSMSMessage = Nothing
, _dmcBaiduMessage = Nothing
, _dmcDefaultPushNotificationMessage = Nothing
}
dmcAPNSMessage :: Lens' DirectMessageConfiguration (Maybe APNSMessage)
dmcAPNSMessage = lens _dmcAPNSMessage (\ s a -> s{_dmcAPNSMessage = a})
dmcGCMMessage :: Lens' DirectMessageConfiguration (Maybe GCMMessage)
dmcGCMMessage = lens _dmcGCMMessage (\ s a -> s{_dmcGCMMessage = a})
dmcDefaultMessage :: Lens' DirectMessageConfiguration (Maybe DefaultMessage)
dmcDefaultMessage = lens _dmcDefaultMessage (\ s a -> s{_dmcDefaultMessage = a})
dmcADMMessage :: Lens' DirectMessageConfiguration (Maybe ADMMessage)
dmcADMMessage = lens _dmcADMMessage (\ s a -> s{_dmcADMMessage = a})
dmcSMSMessage :: Lens' DirectMessageConfiguration (Maybe SMSMessage)
dmcSMSMessage = lens _dmcSMSMessage (\ s a -> s{_dmcSMSMessage = a})
dmcBaiduMessage :: Lens' DirectMessageConfiguration (Maybe BaiduMessage)
dmcBaiduMessage = lens _dmcBaiduMessage (\ s a -> s{_dmcBaiduMessage = a})
dmcDefaultPushNotificationMessage :: Lens' DirectMessageConfiguration (Maybe DefaultPushNotificationMessage)
dmcDefaultPushNotificationMessage = lens _dmcDefaultPushNotificationMessage (\ s a -> s{_dmcDefaultPushNotificationMessage = a})
instance Hashable DirectMessageConfiguration where
instance NFData DirectMessageConfiguration where
instance ToJSON DirectMessageConfiguration where
toJSON DirectMessageConfiguration'{..}
= object
(catMaybes
[("APNSMessage" .=) <$> _dmcAPNSMessage,
("GCMMessage" .=) <$> _dmcGCMMessage,
("DefaultMessage" .=) <$> _dmcDefaultMessage,
("ADMMessage" .=) <$> _dmcADMMessage,
("SMSMessage" .=) <$> _dmcSMSMessage,
("BaiduMessage" .=) <$> _dmcBaiduMessage,
("DefaultPushNotificationMessage" .=) <$>
_dmcDefaultPushNotificationMessage])
data EmailChannelRequest = EmailChannelRequest'
{ _ecrEnabled :: !(Maybe Bool)
, _ecrFromAddress :: !(Maybe Text)
, _ecrIdentity :: !(Maybe Text)
, _ecrRoleARN :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
emailChannelRequest
:: EmailChannelRequest
emailChannelRequest =
EmailChannelRequest'
{ _ecrEnabled = Nothing
, _ecrFromAddress = Nothing
, _ecrIdentity = Nothing
, _ecrRoleARN = Nothing
}
ecrEnabled :: Lens' EmailChannelRequest (Maybe Bool)
ecrEnabled = lens _ecrEnabled (\ s a -> s{_ecrEnabled = a})
ecrFromAddress :: Lens' EmailChannelRequest (Maybe Text)
ecrFromAddress = lens _ecrFromAddress (\ s a -> s{_ecrFromAddress = a})
ecrIdentity :: Lens' EmailChannelRequest (Maybe Text)
ecrIdentity = lens _ecrIdentity (\ s a -> s{_ecrIdentity = a})
ecrRoleARN :: Lens' EmailChannelRequest (Maybe Text)
ecrRoleARN = lens _ecrRoleARN (\ s a -> s{_ecrRoleARN = a})
instance Hashable EmailChannelRequest where
instance NFData EmailChannelRequest where
instance ToJSON EmailChannelRequest where
toJSON EmailChannelRequest'{..}
= object
(catMaybes
[("Enabled" .=) <$> _ecrEnabled,
("FromAddress" .=) <$> _ecrFromAddress,
("Identity" .=) <$> _ecrIdentity,
("RoleArn" .=) <$> _ecrRoleARN])
data EmailChannelResponse = EmailChannelResponse'
{ _ecPlatform :: !(Maybe Text)
, _ecLastModifiedDate :: !(Maybe Text)
, _ecEnabled :: !(Maybe Bool)
, _ecFromAddress :: !(Maybe Text)
, _ecIsArchived :: !(Maybe Bool)
, _ecApplicationId :: !(Maybe Text)
, _ecVersion :: !(Maybe Int)
, _ecId :: !(Maybe Text)
, _ecCreationDate :: !(Maybe Text)
, _ecLastModifiedBy :: !(Maybe Text)
, _ecIdentity :: !(Maybe Text)
, _ecHasCredential :: !(Maybe Bool)
, _ecRoleARN :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
emailChannelResponse
:: EmailChannelResponse
emailChannelResponse =
EmailChannelResponse'
{ _ecPlatform = Nothing
, _ecLastModifiedDate = Nothing
, _ecEnabled = Nothing
, _ecFromAddress = Nothing
, _ecIsArchived = Nothing
, _ecApplicationId = Nothing
, _ecVersion = Nothing
, _ecId = Nothing
, _ecCreationDate = Nothing
, _ecLastModifiedBy = Nothing
, _ecIdentity = Nothing
, _ecHasCredential = Nothing
, _ecRoleARN = Nothing
}
ecPlatform :: Lens' EmailChannelResponse (Maybe Text)
ecPlatform = lens _ecPlatform (\ s a -> s{_ecPlatform = a})
ecLastModifiedDate :: Lens' EmailChannelResponse (Maybe Text)
ecLastModifiedDate = lens _ecLastModifiedDate (\ s a -> s{_ecLastModifiedDate = a})
ecEnabled :: Lens' EmailChannelResponse (Maybe Bool)
ecEnabled = lens _ecEnabled (\ s a -> s{_ecEnabled = a})
ecFromAddress :: Lens' EmailChannelResponse (Maybe Text)
ecFromAddress = lens _ecFromAddress (\ s a -> s{_ecFromAddress = a})
ecIsArchived :: Lens' EmailChannelResponse (Maybe Bool)
ecIsArchived = lens _ecIsArchived (\ s a -> s{_ecIsArchived = a})
ecApplicationId :: Lens' EmailChannelResponse (Maybe Text)
ecApplicationId = lens _ecApplicationId (\ s a -> s{_ecApplicationId = a})
ecVersion :: Lens' EmailChannelResponse (Maybe Int)
ecVersion = lens _ecVersion (\ s a -> s{_ecVersion = a})
ecId :: Lens' EmailChannelResponse (Maybe Text)
ecId = lens _ecId (\ s a -> s{_ecId = a})
ecCreationDate :: Lens' EmailChannelResponse (Maybe Text)
ecCreationDate = lens _ecCreationDate (\ s a -> s{_ecCreationDate = a})
ecLastModifiedBy :: Lens' EmailChannelResponse (Maybe Text)
ecLastModifiedBy = lens _ecLastModifiedBy (\ s a -> s{_ecLastModifiedBy = a})
ecIdentity :: Lens' EmailChannelResponse (Maybe Text)
ecIdentity = lens _ecIdentity (\ s a -> s{_ecIdentity = a})
ecHasCredential :: Lens' EmailChannelResponse (Maybe Bool)
ecHasCredential = lens _ecHasCredential (\ s a -> s{_ecHasCredential = a})
ecRoleARN :: Lens' EmailChannelResponse (Maybe Text)
ecRoleARN = lens _ecRoleARN (\ s a -> s{_ecRoleARN = a})
instance FromJSON EmailChannelResponse where
parseJSON
= withObject "EmailChannelResponse"
(\ x ->
EmailChannelResponse' <$>
(x .:? "Platform") <*> (x .:? "LastModifiedDate") <*>
(x .:? "Enabled")
<*> (x .:? "FromAddress")
<*> (x .:? "IsArchived")
<*> (x .:? "ApplicationId")
<*> (x .:? "Version")
<*> (x .:? "Id")
<*> (x .:? "CreationDate")
<*> (x .:? "LastModifiedBy")
<*> (x .:? "Identity")
<*> (x .:? "HasCredential")
<*> (x .:? "RoleArn"))
instance Hashable EmailChannelResponse where
instance NFData EmailChannelResponse where
data EndpointBatchItem = EndpointBatchItem'
{ _ebiRequestId :: !(Maybe Text)
, _ebiMetrics :: !(Maybe (Map Text Double))
, _ebiLocation :: !(Maybe EndpointLocation)
, _ebiDemographic :: !(Maybe EndpointDemographic)
, _ebiAddress :: !(Maybe Text)
, _ebiEffectiveDate :: !(Maybe Text)
, _ebiUser :: !(Maybe EndpointUser)
, _ebiAttributes :: !(Maybe (Map Text [Text]))
, _ebiEndpointStatus :: !(Maybe Text)
, _ebiOptOut :: !(Maybe Text)
, _ebiId :: !(Maybe Text)
, _ebiChannelType :: !(Maybe ChannelType)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
endpointBatchItem
:: EndpointBatchItem
endpointBatchItem =
EndpointBatchItem'
{ _ebiRequestId = Nothing
, _ebiMetrics = Nothing
, _ebiLocation = Nothing
, _ebiDemographic = Nothing
, _ebiAddress = Nothing
, _ebiEffectiveDate = Nothing
, _ebiUser = Nothing
, _ebiAttributes = Nothing
, _ebiEndpointStatus = Nothing
, _ebiOptOut = Nothing
, _ebiId = Nothing
, _ebiChannelType = Nothing
}
ebiRequestId :: Lens' EndpointBatchItem (Maybe Text)
ebiRequestId = lens _ebiRequestId (\ s a -> s{_ebiRequestId = a})
ebiMetrics :: Lens' EndpointBatchItem (HashMap Text Double)
ebiMetrics = lens _ebiMetrics (\ s a -> s{_ebiMetrics = a}) . _Default . _Map
ebiLocation :: Lens' EndpointBatchItem (Maybe EndpointLocation)
ebiLocation = lens _ebiLocation (\ s a -> s{_ebiLocation = a})
ebiDemographic :: Lens' EndpointBatchItem (Maybe EndpointDemographic)
ebiDemographic = lens _ebiDemographic (\ s a -> s{_ebiDemographic = a})
ebiAddress :: Lens' EndpointBatchItem (Maybe Text)
ebiAddress = lens _ebiAddress (\ s a -> s{_ebiAddress = a})
ebiEffectiveDate :: Lens' EndpointBatchItem (Maybe Text)
ebiEffectiveDate = lens _ebiEffectiveDate (\ s a -> s{_ebiEffectiveDate = a})
ebiUser :: Lens' EndpointBatchItem (Maybe EndpointUser)
ebiUser = lens _ebiUser (\ s a -> s{_ebiUser = a})
ebiAttributes :: Lens' EndpointBatchItem (HashMap Text [Text])
ebiAttributes = lens _ebiAttributes (\ s a -> s{_ebiAttributes = a}) . _Default . _Map
ebiEndpointStatus :: Lens' EndpointBatchItem (Maybe Text)
ebiEndpointStatus = lens _ebiEndpointStatus (\ s a -> s{_ebiEndpointStatus = a})
ebiOptOut :: Lens' EndpointBatchItem (Maybe Text)
ebiOptOut = lens _ebiOptOut (\ s a -> s{_ebiOptOut = a})
ebiId :: Lens' EndpointBatchItem (Maybe Text)
ebiId = lens _ebiId (\ s a -> s{_ebiId = a})
ebiChannelType :: Lens' EndpointBatchItem (Maybe ChannelType)
ebiChannelType = lens _ebiChannelType (\ s a -> s{_ebiChannelType = a})
instance Hashable EndpointBatchItem where
instance NFData EndpointBatchItem where
instance ToJSON EndpointBatchItem where
toJSON EndpointBatchItem'{..}
= object
(catMaybes
[("RequestId" .=) <$> _ebiRequestId,
("Metrics" .=) <$> _ebiMetrics,
("Location" .=) <$> _ebiLocation,
("Demographic" .=) <$> _ebiDemographic,
("Address" .=) <$> _ebiAddress,
("EffectiveDate" .=) <$> _ebiEffectiveDate,
("User" .=) <$> _ebiUser,
("Attributes" .=) <$> _ebiAttributes,
("EndpointStatus" .=) <$> _ebiEndpointStatus,
("OptOut" .=) <$> _ebiOptOut, ("Id" .=) <$> _ebiId,
("ChannelType" .=) <$> _ebiChannelType])
newtype EndpointBatchRequest = EndpointBatchRequest'
{ _ebrItem :: Maybe [EndpointBatchItem]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
endpointBatchRequest
:: EndpointBatchRequest
endpointBatchRequest = EndpointBatchRequest' {_ebrItem = Nothing}
ebrItem :: Lens' EndpointBatchRequest [EndpointBatchItem]
ebrItem = lens _ebrItem (\ s a -> s{_ebrItem = a}) . _Default . _Coerce
instance Hashable EndpointBatchRequest where
instance NFData EndpointBatchRequest where
instance ToJSON EndpointBatchRequest where
toJSON EndpointBatchRequest'{..}
= object (catMaybes [("Item" .=) <$> _ebrItem])
data EndpointDemographic = EndpointDemographic'
{ _edPlatform :: !(Maybe Text)
, _edPlatformVersion :: !(Maybe Text)
, _edLocale :: !(Maybe Text)
, _edAppVersion :: !(Maybe Text)
, _edModel :: !(Maybe Text)
, _edMake :: !(Maybe Text)
, _edModelVersion :: !(Maybe Text)
, _edTimezone :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
endpointDemographic
:: EndpointDemographic
endpointDemographic =
EndpointDemographic'
{ _edPlatform = Nothing
, _edPlatformVersion = Nothing
, _edLocale = Nothing
, _edAppVersion = Nothing
, _edModel = Nothing
, _edMake = Nothing
, _edModelVersion = Nothing
, _edTimezone = Nothing
}
edPlatform :: Lens' EndpointDemographic (Maybe Text)
edPlatform = lens _edPlatform (\ s a -> s{_edPlatform = a})
edPlatformVersion :: Lens' EndpointDemographic (Maybe Text)
edPlatformVersion = lens _edPlatformVersion (\ s a -> s{_edPlatformVersion = a})
edLocale :: Lens' EndpointDemographic (Maybe Text)
edLocale = lens _edLocale (\ s a -> s{_edLocale = a})
edAppVersion :: Lens' EndpointDemographic (Maybe Text)
edAppVersion = lens _edAppVersion (\ s a -> s{_edAppVersion = a})
edModel :: Lens' EndpointDemographic (Maybe Text)
edModel = lens _edModel (\ s a -> s{_edModel = a})
edMake :: Lens' EndpointDemographic (Maybe Text)
edMake = lens _edMake (\ s a -> s{_edMake = a})
edModelVersion :: Lens' EndpointDemographic (Maybe Text)
edModelVersion = lens _edModelVersion (\ s a -> s{_edModelVersion = a})
edTimezone :: Lens' EndpointDemographic (Maybe Text)
edTimezone = lens _edTimezone (\ s a -> s{_edTimezone = a})
instance FromJSON EndpointDemographic where
parseJSON
= withObject "EndpointDemographic"
(\ x ->
EndpointDemographic' <$>
(x .:? "Platform") <*> (x .:? "PlatformVersion") <*>
(x .:? "Locale")
<*> (x .:? "AppVersion")
<*> (x .:? "Model")
<*> (x .:? "Make")
<*> (x .:? "ModelVersion")
<*> (x .:? "Timezone"))
instance Hashable EndpointDemographic where
instance NFData EndpointDemographic where
instance ToJSON EndpointDemographic where
toJSON EndpointDemographic'{..}
= object
(catMaybes
[("Platform" .=) <$> _edPlatform,
("PlatformVersion" .=) <$> _edPlatformVersion,
("Locale" .=) <$> _edLocale,
("AppVersion" .=) <$> _edAppVersion,
("Model" .=) <$> _edModel, ("Make" .=) <$> _edMake,
("ModelVersion" .=) <$> _edModelVersion,
("Timezone" .=) <$> _edTimezone])
data EndpointLocation = EndpointLocation'
{ _elPostalCode :: !(Maybe Text)
, _elLatitude :: !(Maybe Double)
, _elCountry :: !(Maybe Text)
, _elCity :: !(Maybe Text)
, _elRegion :: !(Maybe Text)
, _elLongitude :: !(Maybe Double)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
endpointLocation
:: EndpointLocation
endpointLocation =
EndpointLocation'
{ _elPostalCode = Nothing
, _elLatitude = Nothing
, _elCountry = Nothing
, _elCity = Nothing
, _elRegion = Nothing
, _elLongitude = Nothing
}
elPostalCode :: Lens' EndpointLocation (Maybe Text)
elPostalCode = lens _elPostalCode (\ s a -> s{_elPostalCode = a})
elLatitude :: Lens' EndpointLocation (Maybe Double)
elLatitude = lens _elLatitude (\ s a -> s{_elLatitude = a})
elCountry :: Lens' EndpointLocation (Maybe Text)
elCountry = lens _elCountry (\ s a -> s{_elCountry = a})
elCity :: Lens' EndpointLocation (Maybe Text)
elCity = lens _elCity (\ s a -> s{_elCity = a})
elRegion :: Lens' EndpointLocation (Maybe Text)
elRegion = lens _elRegion (\ s a -> s{_elRegion = a})
elLongitude :: Lens' EndpointLocation (Maybe Double)
elLongitude = lens _elLongitude (\ s a -> s{_elLongitude = a})
instance FromJSON EndpointLocation where
parseJSON
= withObject "EndpointLocation"
(\ x ->
EndpointLocation' <$>
(x .:? "PostalCode") <*> (x .:? "Latitude") <*>
(x .:? "Country")
<*> (x .:? "City")
<*> (x .:? "Region")
<*> (x .:? "Longitude"))
instance Hashable EndpointLocation where
instance NFData EndpointLocation where
instance ToJSON EndpointLocation where
toJSON EndpointLocation'{..}
= object
(catMaybes
[("PostalCode" .=) <$> _elPostalCode,
("Latitude" .=) <$> _elLatitude,
("Country" .=) <$> _elCountry,
("City" .=) <$> _elCity, ("Region" .=) <$> _elRegion,
("Longitude" .=) <$> _elLongitude])
data EndpointMessageResult = EndpointMessageResult'
{ _emrDeliveryStatus :: !(Maybe DeliveryStatus)
, _emrAddress :: !(Maybe Text)
, _emrStatusMessage :: !(Maybe Text)
, _emrUpdatedToken :: !(Maybe Text)
, _emrStatusCode :: !(Maybe Int)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
endpointMessageResult
:: EndpointMessageResult
endpointMessageResult =
EndpointMessageResult'
{ _emrDeliveryStatus = Nothing
, _emrAddress = Nothing
, _emrStatusMessage = Nothing
, _emrUpdatedToken = Nothing
, _emrStatusCode = Nothing
}
emrDeliveryStatus :: Lens' EndpointMessageResult (Maybe DeliveryStatus)
emrDeliveryStatus = lens _emrDeliveryStatus (\ s a -> s{_emrDeliveryStatus = a})
emrAddress :: Lens' EndpointMessageResult (Maybe Text)
emrAddress = lens _emrAddress (\ s a -> s{_emrAddress = a})
emrStatusMessage :: Lens' EndpointMessageResult (Maybe Text)
emrStatusMessage = lens _emrStatusMessage (\ s a -> s{_emrStatusMessage = a})
emrUpdatedToken :: Lens' EndpointMessageResult (Maybe Text)
emrUpdatedToken = lens _emrUpdatedToken (\ s a -> s{_emrUpdatedToken = a})
emrStatusCode :: Lens' EndpointMessageResult (Maybe Int)
emrStatusCode = lens _emrStatusCode (\ s a -> s{_emrStatusCode = a})
instance FromJSON EndpointMessageResult where
parseJSON
= withObject "EndpointMessageResult"
(\ x ->
EndpointMessageResult' <$>
(x .:? "DeliveryStatus") <*> (x .:? "Address") <*>
(x .:? "StatusMessage")
<*> (x .:? "UpdatedToken")
<*> (x .:? "StatusCode"))
instance Hashable EndpointMessageResult where
instance NFData EndpointMessageResult where
data EndpointRequest = EndpointRequest'
{ _erRequestId :: !(Maybe Text)
, _erMetrics :: !(Maybe (Map Text Double))
, _erLocation :: !(Maybe EndpointLocation)
, _erDemographic :: !(Maybe EndpointDemographic)
, _erAddress :: !(Maybe Text)
, _erEffectiveDate :: !(Maybe Text)
, _erUser :: !(Maybe EndpointUser)
, _erAttributes :: !(Maybe (Map Text [Text]))
, _erEndpointStatus :: !(Maybe Text)
, _erOptOut :: !(Maybe Text)
, _erChannelType :: !(Maybe ChannelType)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
endpointRequest
:: EndpointRequest
endpointRequest =
EndpointRequest'
{ _erRequestId = Nothing
, _erMetrics = Nothing
, _erLocation = Nothing
, _erDemographic = Nothing
, _erAddress = Nothing
, _erEffectiveDate = Nothing
, _erUser = Nothing
, _erAttributes = Nothing
, _erEndpointStatus = Nothing
, _erOptOut = Nothing
, _erChannelType = Nothing
}
erRequestId :: Lens' EndpointRequest (Maybe Text)
erRequestId = lens _erRequestId (\ s a -> s{_erRequestId = a})
erMetrics :: Lens' EndpointRequest (HashMap Text Double)
erMetrics = lens _erMetrics (\ s a -> s{_erMetrics = a}) . _Default . _Map
erLocation :: Lens' EndpointRequest (Maybe EndpointLocation)
erLocation = lens _erLocation (\ s a -> s{_erLocation = a})
erDemographic :: Lens' EndpointRequest (Maybe EndpointDemographic)
erDemographic = lens _erDemographic (\ s a -> s{_erDemographic = a})
erAddress :: Lens' EndpointRequest (Maybe Text)
erAddress = lens _erAddress (\ s a -> s{_erAddress = a})
erEffectiveDate :: Lens' EndpointRequest (Maybe Text)
erEffectiveDate = lens _erEffectiveDate (\ s a -> s{_erEffectiveDate = a})
erUser :: Lens' EndpointRequest (Maybe EndpointUser)
erUser = lens _erUser (\ s a -> s{_erUser = a})
erAttributes :: Lens' EndpointRequest (HashMap Text [Text])
erAttributes = lens _erAttributes (\ s a -> s{_erAttributes = a}) . _Default . _Map
erEndpointStatus :: Lens' EndpointRequest (Maybe Text)
erEndpointStatus = lens _erEndpointStatus (\ s a -> s{_erEndpointStatus = a})
erOptOut :: Lens' EndpointRequest (Maybe Text)
erOptOut = lens _erOptOut (\ s a -> s{_erOptOut = a})
erChannelType :: Lens' EndpointRequest (Maybe ChannelType)
erChannelType = lens _erChannelType (\ s a -> s{_erChannelType = a})
instance Hashable EndpointRequest where
instance NFData EndpointRequest where
instance ToJSON EndpointRequest where
toJSON EndpointRequest'{..}
= object
(catMaybes
[("RequestId" .=) <$> _erRequestId,
("Metrics" .=) <$> _erMetrics,
("Location" .=) <$> _erLocation,
("Demographic" .=) <$> _erDemographic,
("Address" .=) <$> _erAddress,
("EffectiveDate" .=) <$> _erEffectiveDate,
("User" .=) <$> _erUser,
("Attributes" .=) <$> _erAttributes,
("EndpointStatus" .=) <$> _erEndpointStatus,
("OptOut" .=) <$> _erOptOut,
("ChannelType" .=) <$> _erChannelType])
data EndpointResponse = EndpointResponse'
{ _eRequestId :: !(Maybe Text)
, _eMetrics :: !(Maybe (Map Text Double))
, _eLocation :: !(Maybe EndpointLocation)
, _eDemographic :: !(Maybe EndpointDemographic)
, _eCohortId :: !(Maybe Text)
, _eAddress :: !(Maybe Text)
, _eEffectiveDate :: !(Maybe Text)
, _eUser :: !(Maybe EndpointUser)
, _eApplicationId :: !(Maybe Text)
, _eAttributes :: !(Maybe (Map Text [Text]))
, _eEndpointStatus :: !(Maybe Text)
, _eOptOut :: !(Maybe Text)
, _eId :: !(Maybe Text)
, _eCreationDate :: !(Maybe Text)
, _eChannelType :: !(Maybe ChannelType)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
endpointResponse
:: EndpointResponse
endpointResponse =
EndpointResponse'
{ _eRequestId = Nothing
, _eMetrics = Nothing
, _eLocation = Nothing
, _eDemographic = Nothing
, _eCohortId = Nothing
, _eAddress = Nothing
, _eEffectiveDate = Nothing
, _eUser = Nothing
, _eApplicationId = Nothing
, _eAttributes = Nothing
, _eEndpointStatus = Nothing
, _eOptOut = Nothing
, _eId = Nothing
, _eCreationDate = Nothing
, _eChannelType = Nothing
}
eRequestId :: Lens' EndpointResponse (Maybe Text)
eRequestId = lens _eRequestId (\ s a -> s{_eRequestId = a})
eMetrics :: Lens' EndpointResponse (HashMap Text Double)
eMetrics = lens _eMetrics (\ s a -> s{_eMetrics = a}) . _Default . _Map
eLocation :: Lens' EndpointResponse (Maybe EndpointLocation)
eLocation = lens _eLocation (\ s a -> s{_eLocation = a})
eDemographic :: Lens' EndpointResponse (Maybe EndpointDemographic)
eDemographic = lens _eDemographic (\ s a -> s{_eDemographic = a})
eCohortId :: Lens' EndpointResponse (Maybe Text)
eCohortId = lens _eCohortId (\ s a -> s{_eCohortId = a})
eAddress :: Lens' EndpointResponse (Maybe Text)
eAddress = lens _eAddress (\ s a -> s{_eAddress = a})
eEffectiveDate :: Lens' EndpointResponse (Maybe Text)
eEffectiveDate = lens _eEffectiveDate (\ s a -> s{_eEffectiveDate = a})
eUser :: Lens' EndpointResponse (Maybe EndpointUser)
eUser = lens _eUser (\ s a -> s{_eUser = a})
eApplicationId :: Lens' EndpointResponse (Maybe Text)
eApplicationId = lens _eApplicationId (\ s a -> s{_eApplicationId = a})
eAttributes :: Lens' EndpointResponse (HashMap Text [Text])
eAttributes = lens _eAttributes (\ s a -> s{_eAttributes = a}) . _Default . _Map
eEndpointStatus :: Lens' EndpointResponse (Maybe Text)
eEndpointStatus = lens _eEndpointStatus (\ s a -> s{_eEndpointStatus = a})
eOptOut :: Lens' EndpointResponse (Maybe Text)
eOptOut = lens _eOptOut (\ s a -> s{_eOptOut = a})
eId :: Lens' EndpointResponse (Maybe Text)
eId = lens _eId (\ s a -> s{_eId = a})
eCreationDate :: Lens' EndpointResponse (Maybe Text)
eCreationDate = lens _eCreationDate (\ s a -> s{_eCreationDate = a})
eChannelType :: Lens' EndpointResponse (Maybe ChannelType)
eChannelType = lens _eChannelType (\ s a -> s{_eChannelType = a})
instance FromJSON EndpointResponse where
parseJSON
= withObject "EndpointResponse"
(\ x ->
EndpointResponse' <$>
(x .:? "RequestId") <*> (x .:? "Metrics" .!= mempty)
<*> (x .:? "Location")
<*> (x .:? "Demographic")
<*> (x .:? "CohortId")
<*> (x .:? "Address")
<*> (x .:? "EffectiveDate")
<*> (x .:? "User")
<*> (x .:? "ApplicationId")
<*> (x .:? "Attributes" .!= mempty)
<*> (x .:? "EndpointStatus")
<*> (x .:? "OptOut")
<*> (x .:? "Id")
<*> (x .:? "CreationDate")
<*> (x .:? "ChannelType"))
instance Hashable EndpointResponse where
instance NFData EndpointResponse where
data EndpointSendConfiguration = EndpointSendConfiguration'
{ _escSubstitutions :: !(Maybe (Map Text [Text]))
, _escTitleOverride :: !(Maybe Text)
, _escContext :: !(Maybe (Map Text Text))
, _escRawContent :: !(Maybe Text)
, _escBodyOverride :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
endpointSendConfiguration
:: EndpointSendConfiguration
endpointSendConfiguration =
EndpointSendConfiguration'
{ _escSubstitutions = Nothing
, _escTitleOverride = Nothing
, _escContext = Nothing
, _escRawContent = Nothing
, _escBodyOverride = Nothing
}
escSubstitutions :: Lens' EndpointSendConfiguration (HashMap Text [Text])
escSubstitutions = lens _escSubstitutions (\ s a -> s{_escSubstitutions = a}) . _Default . _Map
escTitleOverride :: Lens' EndpointSendConfiguration (Maybe Text)
escTitleOverride = lens _escTitleOverride (\ s a -> s{_escTitleOverride = a})
escContext :: Lens' EndpointSendConfiguration (HashMap Text Text)
escContext = lens _escContext (\ s a -> s{_escContext = a}) . _Default . _Map
escRawContent :: Lens' EndpointSendConfiguration (Maybe Text)
escRawContent = lens _escRawContent (\ s a -> s{_escRawContent = a})
escBodyOverride :: Lens' EndpointSendConfiguration (Maybe Text)
escBodyOverride = lens _escBodyOverride (\ s a -> s{_escBodyOverride = a})
instance Hashable EndpointSendConfiguration where
instance NFData EndpointSendConfiguration where
instance ToJSON EndpointSendConfiguration where
toJSON EndpointSendConfiguration'{..}
= object
(catMaybes
[("Substitutions" .=) <$> _escSubstitutions,
("TitleOverride" .=) <$> _escTitleOverride,
("Context" .=) <$> _escContext,
("RawContent" .=) <$> _escRawContent,
("BodyOverride" .=) <$> _escBodyOverride])
data EndpointUser = EndpointUser'
{ _euUserAttributes :: !(Maybe (Map Text [Text]))
, _euUserId :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
endpointUser
:: EndpointUser
endpointUser = EndpointUser' {_euUserAttributes = Nothing, _euUserId = Nothing}
euUserAttributes :: Lens' EndpointUser (HashMap Text [Text])
euUserAttributes = lens _euUserAttributes (\ s a -> s{_euUserAttributes = a}) . _Default . _Map
euUserId :: Lens' EndpointUser (Maybe Text)
euUserId = lens _euUserId (\ s a -> s{_euUserId = a})
instance FromJSON EndpointUser where
parseJSON
= withObject "EndpointUser"
(\ x ->
EndpointUser' <$>
(x .:? "UserAttributes" .!= mempty) <*>
(x .:? "UserId"))
instance Hashable EndpointUser where
instance NFData EndpointUser where
instance ToJSON EndpointUser where
toJSON EndpointUser'{..}
= object
(catMaybes
[("UserAttributes" .=) <$> _euUserAttributes,
("UserId" .=) <$> _euUserId])
data EventStream = EventStream'
{ _esLastUpdatedBy :: !(Maybe Text)
, _esLastModifiedDate :: !(Maybe Text)
, _esDestinationStreamARN :: !(Maybe Text)
, _esApplicationId :: !(Maybe Text)
, _esExternalId :: !(Maybe Text)
, _esRoleARN :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
eventStream
:: EventStream
eventStream =
EventStream'
{ _esLastUpdatedBy = Nothing
, _esLastModifiedDate = Nothing
, _esDestinationStreamARN = Nothing
, _esApplicationId = Nothing
, _esExternalId = Nothing
, _esRoleARN = Nothing
}
esLastUpdatedBy :: Lens' EventStream (Maybe Text)
esLastUpdatedBy = lens _esLastUpdatedBy (\ s a -> s{_esLastUpdatedBy = a})
esLastModifiedDate :: Lens' EventStream (Maybe Text)
esLastModifiedDate = lens _esLastModifiedDate (\ s a -> s{_esLastModifiedDate = a})
esDestinationStreamARN :: Lens' EventStream (Maybe Text)
esDestinationStreamARN = lens _esDestinationStreamARN (\ s a -> s{_esDestinationStreamARN = a})
esApplicationId :: Lens' EventStream (Maybe Text)
esApplicationId = lens _esApplicationId (\ s a -> s{_esApplicationId = a})
esExternalId :: Lens' EventStream (Maybe Text)
esExternalId = lens _esExternalId (\ s a -> s{_esExternalId = a})
esRoleARN :: Lens' EventStream (Maybe Text)
esRoleARN = lens _esRoleARN (\ s a -> s{_esRoleARN = a})
instance FromJSON EventStream where
parseJSON
= withObject "EventStream"
(\ x ->
EventStream' <$>
(x .:? "LastUpdatedBy") <*>
(x .:? "LastModifiedDate")
<*> (x .:? "DestinationStreamArn")
<*> (x .:? "ApplicationId")
<*> (x .:? "ExternalId")
<*> (x .:? "RoleArn"))
instance Hashable EventStream where
instance NFData EventStream where
data ExportJobRequest = ExportJobRequest'
{ _eS3URLPrefix :: !(Maybe Text)
, _eSegmentId :: !(Maybe Text)
, _eRoleARN :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
exportJobRequest
:: ExportJobRequest
exportJobRequest =
ExportJobRequest'
{_eS3URLPrefix = Nothing, _eSegmentId = Nothing, _eRoleARN = Nothing}
eS3URLPrefix :: Lens' ExportJobRequest (Maybe Text)
eS3URLPrefix = lens _eS3URLPrefix (\ s a -> s{_eS3URLPrefix = a})
eSegmentId :: Lens' ExportJobRequest (Maybe Text)
eSegmentId = lens _eSegmentId (\ s a -> s{_eSegmentId = a})
eRoleARN :: Lens' ExportJobRequest (Maybe Text)
eRoleARN = lens _eRoleARN (\ s a -> s{_eRoleARN = a})
instance Hashable ExportJobRequest where
instance NFData ExportJobRequest where
instance ToJSON ExportJobRequest where
toJSON ExportJobRequest'{..}
= object
(catMaybes
[("S3UrlPrefix" .=) <$> _eS3URLPrefix,
("SegmentId" .=) <$> _eSegmentId,
("RoleArn" .=) <$> _eRoleARN])
data ExportJobResource = ExportJobResource'
{ _ejrS3URLPrefix :: !(Maybe Text)
, _ejrSegmentId :: !(Maybe Text)
, _ejrRoleARN :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
exportJobResource
:: ExportJobResource
exportJobResource =
ExportJobResource'
{_ejrS3URLPrefix = Nothing, _ejrSegmentId = Nothing, _ejrRoleARN = Nothing}
ejrS3URLPrefix :: Lens' ExportJobResource (Maybe Text)
ejrS3URLPrefix = lens _ejrS3URLPrefix (\ s a -> s{_ejrS3URLPrefix = a})
ejrSegmentId :: Lens' ExportJobResource (Maybe Text)
ejrSegmentId = lens _ejrSegmentId (\ s a -> s{_ejrSegmentId = a})
ejrRoleARN :: Lens' ExportJobResource (Maybe Text)
ejrRoleARN = lens _ejrRoleARN (\ s a -> s{_ejrRoleARN = a})
instance FromJSON ExportJobResource where
parseJSON
= withObject "ExportJobResource"
(\ x ->
ExportJobResource' <$>
(x .:? "S3UrlPrefix") <*> (x .:? "SegmentId") <*>
(x .:? "RoleArn"))
instance Hashable ExportJobResource where
instance NFData ExportJobResource where
data ExportJobResponse = ExportJobResponse'
{ _ejCompletedPieces :: !(Maybe Int)
, _ejFailedPieces :: !(Maybe Int)
, _ejDefinition :: !(Maybe ExportJobResource)
, _ejTotalProcessed :: !(Maybe Int)
, _ejFailures :: !(Maybe [Text])
, _ejTotalPieces :: !(Maybe Int)
, _ejApplicationId :: !(Maybe Text)
, _ejId :: !(Maybe Text)
, _ejCreationDate :: !(Maybe Text)
, _ejType :: !(Maybe Text)
, _ejCompletionDate :: !(Maybe Text)
, _ejJobStatus :: !(Maybe JobStatus)
, _ejTotalFailures :: !(Maybe Int)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
exportJobResponse
:: ExportJobResponse
exportJobResponse =
ExportJobResponse'
{ _ejCompletedPieces = Nothing
, _ejFailedPieces = Nothing
, _ejDefinition = Nothing
, _ejTotalProcessed = Nothing
, _ejFailures = Nothing
, _ejTotalPieces = Nothing
, _ejApplicationId = Nothing
, _ejId = Nothing
, _ejCreationDate = Nothing
, _ejType = Nothing
, _ejCompletionDate = Nothing
, _ejJobStatus = Nothing
, _ejTotalFailures = Nothing
}
ejCompletedPieces :: Lens' ExportJobResponse (Maybe Int)
ejCompletedPieces = lens _ejCompletedPieces (\ s a -> s{_ejCompletedPieces = a})
ejFailedPieces :: Lens' ExportJobResponse (Maybe Int)
ejFailedPieces = lens _ejFailedPieces (\ s a -> s{_ejFailedPieces = a})
ejDefinition :: Lens' ExportJobResponse (Maybe ExportJobResource)
ejDefinition = lens _ejDefinition (\ s a -> s{_ejDefinition = a})
ejTotalProcessed :: Lens' ExportJobResponse (Maybe Int)
ejTotalProcessed = lens _ejTotalProcessed (\ s a -> s{_ejTotalProcessed = a})
ejFailures :: Lens' ExportJobResponse [Text]
ejFailures = lens _ejFailures (\ s a -> s{_ejFailures = a}) . _Default . _Coerce
ejTotalPieces :: Lens' ExportJobResponse (Maybe Int)
ejTotalPieces = lens _ejTotalPieces (\ s a -> s{_ejTotalPieces = a})
ejApplicationId :: Lens' ExportJobResponse (Maybe Text)
ejApplicationId = lens _ejApplicationId (\ s a -> s{_ejApplicationId = a})
ejId :: Lens' ExportJobResponse (Maybe Text)
ejId = lens _ejId (\ s a -> s{_ejId = a})
ejCreationDate :: Lens' ExportJobResponse (Maybe Text)
ejCreationDate = lens _ejCreationDate (\ s a -> s{_ejCreationDate = a})
ejType :: Lens' ExportJobResponse (Maybe Text)
ejType = lens _ejType (\ s a -> s{_ejType = a})
ejCompletionDate :: Lens' ExportJobResponse (Maybe Text)
ejCompletionDate = lens _ejCompletionDate (\ s a -> s{_ejCompletionDate = a})
ejJobStatus :: Lens' ExportJobResponse (Maybe JobStatus)
ejJobStatus = lens _ejJobStatus (\ s a -> s{_ejJobStatus = a})
ejTotalFailures :: Lens' ExportJobResponse (Maybe Int)
ejTotalFailures = lens _ejTotalFailures (\ s a -> s{_ejTotalFailures = a})
instance FromJSON ExportJobResponse where
parseJSON
= withObject "ExportJobResponse"
(\ x ->
ExportJobResponse' <$>
(x .:? "CompletedPieces") <*> (x .:? "FailedPieces")
<*> (x .:? "Definition")
<*> (x .:? "TotalProcessed")
<*> (x .:? "Failures" .!= mempty)
<*> (x .:? "TotalPieces")
<*> (x .:? "ApplicationId")
<*> (x .:? "Id")
<*> (x .:? "CreationDate")
<*> (x .:? "Type")
<*> (x .:? "CompletionDate")
<*> (x .:? "JobStatus")
<*> (x .:? "TotalFailures"))
instance Hashable ExportJobResponse where
instance NFData ExportJobResponse where
data ExportJobsResponse = ExportJobsResponse'
{ _ejNextToken :: !(Maybe Text)
, _ejItem :: !(Maybe [ExportJobResponse])
} deriving (Eq, Read, Show, Data, Typeable, Generic)
exportJobsResponse
:: ExportJobsResponse
exportJobsResponse =
ExportJobsResponse' {_ejNextToken = Nothing, _ejItem = Nothing}
ejNextToken :: Lens' ExportJobsResponse (Maybe Text)
ejNextToken = lens _ejNextToken (\ s a -> s{_ejNextToken = a})
ejItem :: Lens' ExportJobsResponse [ExportJobResponse]
ejItem = lens _ejItem (\ s a -> s{_ejItem = a}) . _Default . _Coerce
instance FromJSON ExportJobsResponse where
parseJSON
= withObject "ExportJobsResponse"
(\ x ->
ExportJobsResponse' <$>
(x .:? "NextToken") <*> (x .:? "Item" .!= mempty))
instance Hashable ExportJobsResponse where
instance NFData ExportJobsResponse where
data GCMChannelRequest = GCMChannelRequest'
{ _gcrAPIKey :: !(Maybe Text)
, _gcrEnabled :: !(Maybe Bool)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
gcmChannelRequest
:: GCMChannelRequest
gcmChannelRequest =
GCMChannelRequest' {_gcrAPIKey = Nothing, _gcrEnabled = Nothing}
gcrAPIKey :: Lens' GCMChannelRequest (Maybe Text)
gcrAPIKey = lens _gcrAPIKey (\ s a -> s{_gcrAPIKey = a})
gcrEnabled :: Lens' GCMChannelRequest (Maybe Bool)
gcrEnabled = lens _gcrEnabled (\ s a -> s{_gcrEnabled = a})
instance Hashable GCMChannelRequest where
instance NFData GCMChannelRequest where
instance ToJSON GCMChannelRequest where
toJSON GCMChannelRequest'{..}
= object
(catMaybes
[("ApiKey" .=) <$> _gcrAPIKey,
("Enabled" .=) <$> _gcrEnabled])
data GCMChannelResponse = GCMChannelResponse'
{ _gcPlatform :: !(Maybe Text)
, _gcLastModifiedDate :: !(Maybe Text)
, _gcEnabled :: !(Maybe Bool)
, _gcCredential :: !(Maybe Text)
, _gcIsArchived :: !(Maybe Bool)
, _gcApplicationId :: !(Maybe Text)
, _gcVersion :: !(Maybe Int)
, _gcId :: !(Maybe Text)
, _gcCreationDate :: !(Maybe Text)
, _gcLastModifiedBy :: !(Maybe Text)
, _gcHasCredential :: !(Maybe Bool)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
gcmChannelResponse
:: GCMChannelResponse
gcmChannelResponse =
GCMChannelResponse'
{ _gcPlatform = Nothing
, _gcLastModifiedDate = Nothing
, _gcEnabled = Nothing
, _gcCredential = Nothing
, _gcIsArchived = Nothing
, _gcApplicationId = Nothing
, _gcVersion = Nothing
, _gcId = Nothing
, _gcCreationDate = Nothing
, _gcLastModifiedBy = Nothing
, _gcHasCredential = Nothing
}
gcPlatform :: Lens' GCMChannelResponse (Maybe Text)
gcPlatform = lens _gcPlatform (\ s a -> s{_gcPlatform = a})
gcLastModifiedDate :: Lens' GCMChannelResponse (Maybe Text)
gcLastModifiedDate = lens _gcLastModifiedDate (\ s a -> s{_gcLastModifiedDate = a})
gcEnabled :: Lens' GCMChannelResponse (Maybe Bool)
gcEnabled = lens _gcEnabled (\ s a -> s{_gcEnabled = a})
gcCredential :: Lens' GCMChannelResponse (Maybe Text)
gcCredential = lens _gcCredential (\ s a -> s{_gcCredential = a})
gcIsArchived :: Lens' GCMChannelResponse (Maybe Bool)
gcIsArchived = lens _gcIsArchived (\ s a -> s{_gcIsArchived = a})
gcApplicationId :: Lens' GCMChannelResponse (Maybe Text)
gcApplicationId = lens _gcApplicationId (\ s a -> s{_gcApplicationId = a})
gcVersion :: Lens' GCMChannelResponse (Maybe Int)
gcVersion = lens _gcVersion (\ s a -> s{_gcVersion = a})
gcId :: Lens' GCMChannelResponse (Maybe Text)
gcId = lens _gcId (\ s a -> s{_gcId = a})
gcCreationDate :: Lens' GCMChannelResponse (Maybe Text)
gcCreationDate = lens _gcCreationDate (\ s a -> s{_gcCreationDate = a})
gcLastModifiedBy :: Lens' GCMChannelResponse (Maybe Text)
gcLastModifiedBy = lens _gcLastModifiedBy (\ s a -> s{_gcLastModifiedBy = a})
gcHasCredential :: Lens' GCMChannelResponse (Maybe Bool)
gcHasCredential = lens _gcHasCredential (\ s a -> s{_gcHasCredential = a})
instance FromJSON GCMChannelResponse where
parseJSON
= withObject "GCMChannelResponse"
(\ x ->
GCMChannelResponse' <$>
(x .:? "Platform") <*> (x .:? "LastModifiedDate") <*>
(x .:? "Enabled")
<*> (x .:? "Credential")
<*> (x .:? "IsArchived")
<*> (x .:? "ApplicationId")
<*> (x .:? "Version")
<*> (x .:? "Id")
<*> (x .:? "CreationDate")
<*> (x .:? "LastModifiedBy")
<*> (x .:? "HasCredential"))
instance Hashable GCMChannelResponse where
instance NFData GCMChannelResponse where
data GCMMessage = GCMMessage'
{ _gmSubstitutions :: !(Maybe (Map Text [Text]))
, _gmSilentPush :: !(Maybe Bool)
, _gmImageIconURL :: !(Maybe Text)
, _gmPriority :: !(Maybe Text)
, _gmRawContent :: !(Maybe Text)
, _gmData :: !(Maybe (Map Text Text))
, _gmRestrictedPackageName :: !(Maybe Text)
, _gmSmallImageIconURL :: !(Maybe Text)
, _gmBody :: !(Maybe Text)
, _gmTimeToLive :: !(Maybe Int)
, _gmURL :: !(Maybe Text)
, _gmSound :: !(Maybe Text)
, _gmAction :: !(Maybe Action)
, _gmCollapseKey :: !(Maybe Text)
, _gmImageURL :: !(Maybe Text)
, _gmTitle :: !(Maybe Text)
, _gmIconReference :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
gcmMessage
:: GCMMessage
gcmMessage =
GCMMessage'
{ _gmSubstitutions = Nothing
, _gmSilentPush = Nothing
, _gmImageIconURL = Nothing
, _gmPriority = Nothing
, _gmRawContent = Nothing
, _gmData = Nothing
, _gmRestrictedPackageName = Nothing
, _gmSmallImageIconURL = Nothing
, _gmBody = Nothing
, _gmTimeToLive = Nothing
, _gmURL = Nothing
, _gmSound = Nothing
, _gmAction = Nothing
, _gmCollapseKey = Nothing
, _gmImageURL = Nothing
, _gmTitle = Nothing
, _gmIconReference = Nothing
}
gmSubstitutions :: Lens' GCMMessage (HashMap Text [Text])
gmSubstitutions = lens _gmSubstitutions (\ s a -> s{_gmSubstitutions = a}) . _Default . _Map
gmSilentPush :: Lens' GCMMessage (Maybe Bool)
gmSilentPush = lens _gmSilentPush (\ s a -> s{_gmSilentPush = a})
gmImageIconURL :: Lens' GCMMessage (Maybe Text)
gmImageIconURL = lens _gmImageIconURL (\ s a -> s{_gmImageIconURL = a})
gmPriority :: Lens' GCMMessage (Maybe Text)
gmPriority = lens _gmPriority (\ s a -> s{_gmPriority = a})
gmRawContent :: Lens' GCMMessage (Maybe Text)
gmRawContent = lens _gmRawContent (\ s a -> s{_gmRawContent = a})
gmData :: Lens' GCMMessage (HashMap Text Text)
gmData = lens _gmData (\ s a -> s{_gmData = a}) . _Default . _Map
gmRestrictedPackageName :: Lens' GCMMessage (Maybe Text)
gmRestrictedPackageName = lens _gmRestrictedPackageName (\ s a -> s{_gmRestrictedPackageName = a})
gmSmallImageIconURL :: Lens' GCMMessage (Maybe Text)
gmSmallImageIconURL = lens _gmSmallImageIconURL (\ s a -> s{_gmSmallImageIconURL = a})
gmBody :: Lens' GCMMessage (Maybe Text)
gmBody = lens _gmBody (\ s a -> s{_gmBody = a})
gmTimeToLive :: Lens' GCMMessage (Maybe Int)
gmTimeToLive = lens _gmTimeToLive (\ s a -> s{_gmTimeToLive = a})
gmURL :: Lens' GCMMessage (Maybe Text)
gmURL = lens _gmURL (\ s a -> s{_gmURL = a})
gmSound :: Lens' GCMMessage (Maybe Text)
gmSound = lens _gmSound (\ s a -> s{_gmSound = a})
gmAction :: Lens' GCMMessage (Maybe Action)
gmAction = lens _gmAction (\ s a -> s{_gmAction = a})
gmCollapseKey :: Lens' GCMMessage (Maybe Text)
gmCollapseKey = lens _gmCollapseKey (\ s a -> s{_gmCollapseKey = a})
gmImageURL :: Lens' GCMMessage (Maybe Text)
gmImageURL = lens _gmImageURL (\ s a -> s{_gmImageURL = a})
gmTitle :: Lens' GCMMessage (Maybe Text)
gmTitle = lens _gmTitle (\ s a -> s{_gmTitle = a})
gmIconReference :: Lens' GCMMessage (Maybe Text)
gmIconReference = lens _gmIconReference (\ s a -> s{_gmIconReference = a})
instance Hashable GCMMessage where
instance NFData GCMMessage where
instance ToJSON GCMMessage where
toJSON GCMMessage'{..}
= object
(catMaybes
[("Substitutions" .=) <$> _gmSubstitutions,
("SilentPush" .=) <$> _gmSilentPush,
("ImageIconUrl" .=) <$> _gmImageIconURL,
("Priority" .=) <$> _gmPriority,
("RawContent" .=) <$> _gmRawContent,
("Data" .=) <$> _gmData,
("RestrictedPackageName" .=) <$>
_gmRestrictedPackageName,
("SmallImageIconUrl" .=) <$> _gmSmallImageIconURL,
("Body" .=) <$> _gmBody,
("TimeToLive" .=) <$> _gmTimeToLive,
("Url" .=) <$> _gmURL, ("Sound" .=) <$> _gmSound,
("Action" .=) <$> _gmAction,
("CollapseKey" .=) <$> _gmCollapseKey,
("ImageUrl" .=) <$> _gmImageURL,
("Title" .=) <$> _gmTitle,
("IconReference" .=) <$> _gmIconReference])
data ImportJobRequest = ImportJobRequest'
{ _iSegmentName :: !(Maybe Text)
, _iFormat :: !(Maybe DefinitionFormat)
, _iDefineSegment :: !(Maybe Bool)
, _iRegisterEndpoints :: !(Maybe Bool)
, _iExternalId :: !(Maybe Text)
, _iS3URL :: !(Maybe Text)
, _iSegmentId :: !(Maybe Text)
, _iRoleARN :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
importJobRequest
:: ImportJobRequest
importJobRequest =
ImportJobRequest'
{ _iSegmentName = Nothing
, _iFormat = Nothing
, _iDefineSegment = Nothing
, _iRegisterEndpoints = Nothing
, _iExternalId = Nothing
, _iS3URL = Nothing
, _iSegmentId = Nothing
, _iRoleARN = Nothing
}
iSegmentName :: Lens' ImportJobRequest (Maybe Text)
iSegmentName = lens _iSegmentName (\ s a -> s{_iSegmentName = a})
iFormat :: Lens' ImportJobRequest (Maybe DefinitionFormat)
iFormat = lens _iFormat (\ s a -> s{_iFormat = a})
iDefineSegment :: Lens' ImportJobRequest (Maybe Bool)
iDefineSegment = lens _iDefineSegment (\ s a -> s{_iDefineSegment = a})
iRegisterEndpoints :: Lens' ImportJobRequest (Maybe Bool)
iRegisterEndpoints = lens _iRegisterEndpoints (\ s a -> s{_iRegisterEndpoints = a})
iExternalId :: Lens' ImportJobRequest (Maybe Text)
iExternalId = lens _iExternalId (\ s a -> s{_iExternalId = a})
iS3URL :: Lens' ImportJobRequest (Maybe Text)
iS3URL = lens _iS3URL (\ s a -> s{_iS3URL = a})
iSegmentId :: Lens' ImportJobRequest (Maybe Text)
iSegmentId = lens _iSegmentId (\ s a -> s{_iSegmentId = a})
iRoleARN :: Lens' ImportJobRequest (Maybe Text)
iRoleARN = lens _iRoleARN (\ s a -> s{_iRoleARN = a})
instance Hashable ImportJobRequest where
instance NFData ImportJobRequest where
instance ToJSON ImportJobRequest where
toJSON ImportJobRequest'{..}
= object
(catMaybes
[("SegmentName" .=) <$> _iSegmentName,
("Format" .=) <$> _iFormat,
("DefineSegment" .=) <$> _iDefineSegment,
("RegisterEndpoints" .=) <$> _iRegisterEndpoints,
("ExternalId" .=) <$> _iExternalId,
("S3Url" .=) <$> _iS3URL,
("SegmentId" .=) <$> _iSegmentId,
("RoleArn" .=) <$> _iRoleARN])
data ImportJobResource = ImportJobResource'
{ _ijrSegmentName :: !(Maybe Text)
, _ijrFormat :: !(Maybe DefinitionFormat)
, _ijrDefineSegment :: !(Maybe Bool)
, _ijrRegisterEndpoints :: !(Maybe Bool)
, _ijrExternalId :: !(Maybe Text)
, _ijrS3URL :: !(Maybe Text)
, _ijrSegmentId :: !(Maybe Text)
, _ijrRoleARN :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
importJobResource
:: ImportJobResource
importJobResource =
ImportJobResource'
{ _ijrSegmentName = Nothing
, _ijrFormat = Nothing
, _ijrDefineSegment = Nothing
, _ijrRegisterEndpoints = Nothing
, _ijrExternalId = Nothing
, _ijrS3URL = Nothing
, _ijrSegmentId = Nothing
, _ijrRoleARN = Nothing
}
ijrSegmentName :: Lens' ImportJobResource (Maybe Text)
ijrSegmentName = lens _ijrSegmentName (\ s a -> s{_ijrSegmentName = a})
ijrFormat :: Lens' ImportJobResource (Maybe DefinitionFormat)
ijrFormat = lens _ijrFormat (\ s a -> s{_ijrFormat = a})
ijrDefineSegment :: Lens' ImportJobResource (Maybe Bool)
ijrDefineSegment = lens _ijrDefineSegment (\ s a -> s{_ijrDefineSegment = a})
ijrRegisterEndpoints :: Lens' ImportJobResource (Maybe Bool)
ijrRegisterEndpoints = lens _ijrRegisterEndpoints (\ s a -> s{_ijrRegisterEndpoints = a})
ijrExternalId :: Lens' ImportJobResource (Maybe Text)
ijrExternalId = lens _ijrExternalId (\ s a -> s{_ijrExternalId = a})
ijrS3URL :: Lens' ImportJobResource (Maybe Text)
ijrS3URL = lens _ijrS3URL (\ s a -> s{_ijrS3URL = a})
ijrSegmentId :: Lens' ImportJobResource (Maybe Text)
ijrSegmentId = lens _ijrSegmentId (\ s a -> s{_ijrSegmentId = a})
ijrRoleARN :: Lens' ImportJobResource (Maybe Text)
ijrRoleARN = lens _ijrRoleARN (\ s a -> s{_ijrRoleARN = a})
instance FromJSON ImportJobResource where
parseJSON
= withObject "ImportJobResource"
(\ x ->
ImportJobResource' <$>
(x .:? "SegmentName") <*> (x .:? "Format") <*>
(x .:? "DefineSegment")
<*> (x .:? "RegisterEndpoints")
<*> (x .:? "ExternalId")
<*> (x .:? "S3Url")
<*> (x .:? "SegmentId")
<*> (x .:? "RoleArn"))
instance Hashable ImportJobResource where
instance NFData ImportJobResource where
data ImportJobResponse = ImportJobResponse'
{ _ijCompletedPieces :: !(Maybe Int)
, _ijFailedPieces :: !(Maybe Int)
, _ijDefinition :: !(Maybe ImportJobResource)
, _ijTotalProcessed :: !(Maybe Int)
, _ijFailures :: !(Maybe [Text])
, _ijTotalPieces :: !(Maybe Int)
, _ijApplicationId :: !(Maybe Text)
, _ijId :: !(Maybe Text)
, _ijCreationDate :: !(Maybe Text)
, _ijType :: !(Maybe Text)
, _ijCompletionDate :: !(Maybe Text)
, _ijJobStatus :: !(Maybe JobStatus)
, _ijTotalFailures :: !(Maybe Int)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
importJobResponse
:: ImportJobResponse
importJobResponse =
ImportJobResponse'
{ _ijCompletedPieces = Nothing
, _ijFailedPieces = Nothing
, _ijDefinition = Nothing
, _ijTotalProcessed = Nothing
, _ijFailures = Nothing
, _ijTotalPieces = Nothing
, _ijApplicationId = Nothing
, _ijId = Nothing
, _ijCreationDate = Nothing
, _ijType = Nothing
, _ijCompletionDate = Nothing
, _ijJobStatus = Nothing
, _ijTotalFailures = Nothing
}
ijCompletedPieces :: Lens' ImportJobResponse (Maybe Int)
ijCompletedPieces = lens _ijCompletedPieces (\ s a -> s{_ijCompletedPieces = a})
ijFailedPieces :: Lens' ImportJobResponse (Maybe Int)
ijFailedPieces = lens _ijFailedPieces (\ s a -> s{_ijFailedPieces = a})
ijDefinition :: Lens' ImportJobResponse (Maybe ImportJobResource)
ijDefinition = lens _ijDefinition (\ s a -> s{_ijDefinition = a})
ijTotalProcessed :: Lens' ImportJobResponse (Maybe Int)
ijTotalProcessed = lens _ijTotalProcessed (\ s a -> s{_ijTotalProcessed = a})
ijFailures :: Lens' ImportJobResponse [Text]
ijFailures = lens _ijFailures (\ s a -> s{_ijFailures = a}) . _Default . _Coerce
ijTotalPieces :: Lens' ImportJobResponse (Maybe Int)
ijTotalPieces = lens _ijTotalPieces (\ s a -> s{_ijTotalPieces = a})
ijApplicationId :: Lens' ImportJobResponse (Maybe Text)
ijApplicationId = lens _ijApplicationId (\ s a -> s{_ijApplicationId = a})
ijId :: Lens' ImportJobResponse (Maybe Text)
ijId = lens _ijId (\ s a -> s{_ijId = a})
ijCreationDate :: Lens' ImportJobResponse (Maybe Text)
ijCreationDate = lens _ijCreationDate (\ s a -> s{_ijCreationDate = a})
ijType :: Lens' ImportJobResponse (Maybe Text)
ijType = lens _ijType (\ s a -> s{_ijType = a})
ijCompletionDate :: Lens' ImportJobResponse (Maybe Text)
ijCompletionDate = lens _ijCompletionDate (\ s a -> s{_ijCompletionDate = a})
ijJobStatus :: Lens' ImportJobResponse (Maybe JobStatus)
ijJobStatus = lens _ijJobStatus (\ s a -> s{_ijJobStatus = a})
ijTotalFailures :: Lens' ImportJobResponse (Maybe Int)
ijTotalFailures = lens _ijTotalFailures (\ s a -> s{_ijTotalFailures = a})
instance FromJSON ImportJobResponse where
parseJSON
= withObject "ImportJobResponse"
(\ x ->
ImportJobResponse' <$>
(x .:? "CompletedPieces") <*> (x .:? "FailedPieces")
<*> (x .:? "Definition")
<*> (x .:? "TotalProcessed")
<*> (x .:? "Failures" .!= mempty)
<*> (x .:? "TotalPieces")
<*> (x .:? "ApplicationId")
<*> (x .:? "Id")
<*> (x .:? "CreationDate")
<*> (x .:? "Type")
<*> (x .:? "CompletionDate")
<*> (x .:? "JobStatus")
<*> (x .:? "TotalFailures"))
instance Hashable ImportJobResponse where
instance NFData ImportJobResponse where
data ImportJobsResponse = ImportJobsResponse'
{ _ijNextToken :: !(Maybe Text)
, _ijItem :: !(Maybe [ImportJobResponse])
} deriving (Eq, Read, Show, Data, Typeable, Generic)
importJobsResponse
:: ImportJobsResponse
importJobsResponse =
ImportJobsResponse' {_ijNextToken = Nothing, _ijItem = Nothing}
ijNextToken :: Lens' ImportJobsResponse (Maybe Text)
ijNextToken = lens _ijNextToken (\ s a -> s{_ijNextToken = a})
ijItem :: Lens' ImportJobsResponse [ImportJobResponse]
ijItem = lens _ijItem (\ s a -> s{_ijItem = a}) . _Default . _Coerce
instance FromJSON ImportJobsResponse where
parseJSON
= withObject "ImportJobsResponse"
(\ x ->
ImportJobsResponse' <$>
(x .:? "NextToken") <*> (x .:? "Item" .!= mempty))
instance Hashable ImportJobsResponse where
instance NFData ImportJobsResponse where
data Message = Message'
{ _mSilentPush :: !(Maybe Bool)
, _mImageIconURL :: !(Maybe Text)
, _mRawContent :: !(Maybe Text)
, _mBody :: !(Maybe Text)
, _mImageSmallIconURL :: !(Maybe Text)
, _mJSONBody :: !(Maybe Text)
, _mURL :: !(Maybe Text)
, _mAction :: !(Maybe Action)
, _mImageURL :: !(Maybe Text)
, _mMediaURL :: !(Maybe Text)
, _mTitle :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
message
:: Message
message =
Message'
{ _mSilentPush = Nothing
, _mImageIconURL = Nothing
, _mRawContent = Nothing
, _mBody = Nothing
, _mImageSmallIconURL = Nothing
, _mJSONBody = Nothing
, _mURL = Nothing
, _mAction = Nothing
, _mImageURL = Nothing
, _mMediaURL = Nothing
, _mTitle = Nothing
}
mSilentPush :: Lens' Message (Maybe Bool)
mSilentPush = lens _mSilentPush (\ s a -> s{_mSilentPush = a})
mImageIconURL :: Lens' Message (Maybe Text)
mImageIconURL = lens _mImageIconURL (\ s a -> s{_mImageIconURL = a})
mRawContent :: Lens' Message (Maybe Text)
mRawContent = lens _mRawContent (\ s a -> s{_mRawContent = a})
mBody :: Lens' Message (Maybe Text)
mBody = lens _mBody (\ s a -> s{_mBody = a})
mImageSmallIconURL :: Lens' Message (Maybe Text)
mImageSmallIconURL = lens _mImageSmallIconURL (\ s a -> s{_mImageSmallIconURL = a})
mJSONBody :: Lens' Message (Maybe Text)
mJSONBody = lens _mJSONBody (\ s a -> s{_mJSONBody = a})
mURL :: Lens' Message (Maybe Text)
mURL = lens _mURL (\ s a -> s{_mURL = a})
mAction :: Lens' Message (Maybe Action)
mAction = lens _mAction (\ s a -> s{_mAction = a})
mImageURL :: Lens' Message (Maybe Text)
mImageURL = lens _mImageURL (\ s a -> s{_mImageURL = a})
mMediaURL :: Lens' Message (Maybe Text)
mMediaURL = lens _mMediaURL (\ s a -> s{_mMediaURL = a})
mTitle :: Lens' Message (Maybe Text)
mTitle = lens _mTitle (\ s a -> s{_mTitle = a})
instance FromJSON Message where
parseJSON
= withObject "Message"
(\ x ->
Message' <$>
(x .:? "SilentPush") <*> (x .:? "ImageIconUrl") <*>
(x .:? "RawContent")
<*> (x .:? "Body")
<*> (x .:? "ImageSmallIconUrl")
<*> (x .:? "JsonBody")
<*> (x .:? "Url")
<*> (x .:? "Action")
<*> (x .:? "ImageUrl")
<*> (x .:? "MediaUrl")
<*> (x .:? "Title"))
instance Hashable Message where
instance NFData Message where
instance ToJSON Message where
toJSON Message'{..}
= object
(catMaybes
[("SilentPush" .=) <$> _mSilentPush,
("ImageIconUrl" .=) <$> _mImageIconURL,
("RawContent" .=) <$> _mRawContent,
("Body" .=) <$> _mBody,
("ImageSmallIconUrl" .=) <$> _mImageSmallIconURL,
("JsonBody" .=) <$> _mJSONBody, ("Url" .=) <$> _mURL,
("Action" .=) <$> _mAction,
("ImageUrl" .=) <$> _mImageURL,
("MediaUrl" .=) <$> _mMediaURL,
("Title" .=) <$> _mTitle])
data MessageBody = MessageBody'
{ _mbRequestId :: !(Maybe Text)
, _mbMessage :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
messageBody
:: MessageBody
messageBody = MessageBody' {_mbRequestId = Nothing, _mbMessage = Nothing}
mbRequestId :: Lens' MessageBody (Maybe Text)
mbRequestId = lens _mbRequestId (\ s a -> s{_mbRequestId = a})
mbMessage :: Lens' MessageBody (Maybe Text)
mbMessage = lens _mbMessage (\ s a -> s{_mbMessage = a})
instance FromJSON MessageBody where
parseJSON
= withObject "MessageBody"
(\ x ->
MessageBody' <$>
(x .:? "RequestID") <*> (x .:? "Message"))
instance Hashable MessageBody where
instance NFData MessageBody where
data MessageConfiguration = MessageConfiguration'
{ _mcAPNSMessage :: !(Maybe Message)
, _mcGCMMessage :: !(Maybe Message)
, _mcDefaultMessage :: !(Maybe Message)
, _mcADMMessage :: !(Maybe Message)
, _mcSMSMessage :: !(Maybe CampaignSmsMessage)
, _mcEmailMessage :: !(Maybe CampaignEmailMessage)
, _mcBaiduMessage :: !(Maybe Message)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
messageConfiguration
:: MessageConfiguration
messageConfiguration =
MessageConfiguration'
{ _mcAPNSMessage = Nothing
, _mcGCMMessage = Nothing
, _mcDefaultMessage = Nothing
, _mcADMMessage = Nothing
, _mcSMSMessage = Nothing
, _mcEmailMessage = Nothing
, _mcBaiduMessage = Nothing
}
mcAPNSMessage :: Lens' MessageConfiguration (Maybe Message)
mcAPNSMessage = lens _mcAPNSMessage (\ s a -> s{_mcAPNSMessage = a})
mcGCMMessage :: Lens' MessageConfiguration (Maybe Message)
mcGCMMessage = lens _mcGCMMessage (\ s a -> s{_mcGCMMessage = a})
mcDefaultMessage :: Lens' MessageConfiguration (Maybe Message)
mcDefaultMessage = lens _mcDefaultMessage (\ s a -> s{_mcDefaultMessage = a})
mcADMMessage :: Lens' MessageConfiguration (Maybe Message)
mcADMMessage = lens _mcADMMessage (\ s a -> s{_mcADMMessage = a})
mcSMSMessage :: Lens' MessageConfiguration (Maybe CampaignSmsMessage)
mcSMSMessage = lens _mcSMSMessage (\ s a -> s{_mcSMSMessage = a})
mcEmailMessage :: Lens' MessageConfiguration (Maybe CampaignEmailMessage)
mcEmailMessage = lens _mcEmailMessage (\ s a -> s{_mcEmailMessage = a})
mcBaiduMessage :: Lens' MessageConfiguration (Maybe Message)
mcBaiduMessage = lens _mcBaiduMessage (\ s a -> s{_mcBaiduMessage = a})
instance FromJSON MessageConfiguration where
parseJSON
= withObject "MessageConfiguration"
(\ x ->
MessageConfiguration' <$>
(x .:? "APNSMessage") <*> (x .:? "GCMMessage") <*>
(x .:? "DefaultMessage")
<*> (x .:? "ADMMessage")
<*> (x .:? "SMSMessage")
<*> (x .:? "EmailMessage")
<*> (x .:? "BaiduMessage"))
instance Hashable MessageConfiguration where
instance NFData MessageConfiguration where
instance ToJSON MessageConfiguration where
toJSON MessageConfiguration'{..}
= object
(catMaybes
[("APNSMessage" .=) <$> _mcAPNSMessage,
("GCMMessage" .=) <$> _mcGCMMessage,
("DefaultMessage" .=) <$> _mcDefaultMessage,
("ADMMessage" .=) <$> _mcADMMessage,
("SMSMessage" .=) <$> _mcSMSMessage,
("EmailMessage" .=) <$> _mcEmailMessage,
("BaiduMessage" .=) <$> _mcBaiduMessage])
data MessageRequest = MessageRequest'
{ _mrContext :: !(Maybe (Map Text Text))
, _mrAddresses :: !(Maybe (Map Text AddressConfiguration))
, _mrEndpoints :: !(Maybe (Map Text EndpointSendConfiguration))
, _mrMessageConfiguration :: !(Maybe DirectMessageConfiguration)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
messageRequest
:: MessageRequest
messageRequest =
MessageRequest'
{ _mrContext = Nothing
, _mrAddresses = Nothing
, _mrEndpoints = Nothing
, _mrMessageConfiguration = Nothing
}
mrContext :: Lens' MessageRequest (HashMap Text Text)
mrContext = lens _mrContext (\ s a -> s{_mrContext = a}) . _Default . _Map
mrAddresses :: Lens' MessageRequest (HashMap Text AddressConfiguration)
mrAddresses = lens _mrAddresses (\ s a -> s{_mrAddresses = a}) . _Default . _Map
mrEndpoints :: Lens' MessageRequest (HashMap Text EndpointSendConfiguration)
mrEndpoints = lens _mrEndpoints (\ s a -> s{_mrEndpoints = a}) . _Default . _Map
mrMessageConfiguration :: Lens' MessageRequest (Maybe DirectMessageConfiguration)
mrMessageConfiguration = lens _mrMessageConfiguration (\ s a -> s{_mrMessageConfiguration = a})
instance Hashable MessageRequest where
instance NFData MessageRequest where
instance ToJSON MessageRequest where
toJSON MessageRequest'{..}
= object
(catMaybes
[("Context" .=) <$> _mrContext,
("Addresses" .=) <$> _mrAddresses,
("Endpoints" .=) <$> _mrEndpoints,
("MessageConfiguration" .=) <$>
_mrMessageConfiguration])
data MessageResponse = MessageResponse'
{ _mRequestId :: !(Maybe Text)
, _mResult :: !(Maybe (Map Text MessageResult))
, _mApplicationId :: !(Maybe Text)
, _mEndpointResult :: !(Maybe (Map Text EndpointMessageResult))
} deriving (Eq, Read, Show, Data, Typeable, Generic)
messageResponse
:: MessageResponse
messageResponse =
MessageResponse'
{ _mRequestId = Nothing
, _mResult = Nothing
, _mApplicationId = Nothing
, _mEndpointResult = Nothing
}
mRequestId :: Lens' MessageResponse (Maybe Text)
mRequestId = lens _mRequestId (\ s a -> s{_mRequestId = a})
mResult :: Lens' MessageResponse (HashMap Text MessageResult)
mResult = lens _mResult (\ s a -> s{_mResult = a}) . _Default . _Map
mApplicationId :: Lens' MessageResponse (Maybe Text)
mApplicationId = lens _mApplicationId (\ s a -> s{_mApplicationId = a})
mEndpointResult :: Lens' MessageResponse (HashMap Text EndpointMessageResult)
mEndpointResult = lens _mEndpointResult (\ s a -> s{_mEndpointResult = a}) . _Default . _Map
instance FromJSON MessageResponse where
parseJSON
= withObject "MessageResponse"
(\ x ->
MessageResponse' <$>
(x .:? "RequestId") <*> (x .:? "Result" .!= mempty)
<*> (x .:? "ApplicationId")
<*> (x .:? "EndpointResult" .!= mempty))
instance Hashable MessageResponse where
instance NFData MessageResponse where
data MessageResult = MessageResult'
{ _mrDeliveryStatus :: !(Maybe DeliveryStatus)
, _mrStatusMessage :: !(Maybe Text)
, _mrUpdatedToken :: !(Maybe Text)
, _mrStatusCode :: !(Maybe Int)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
messageResult
:: MessageResult
messageResult =
MessageResult'
{ _mrDeliveryStatus = Nothing
, _mrStatusMessage = Nothing
, _mrUpdatedToken = Nothing
, _mrStatusCode = Nothing
}
mrDeliveryStatus :: Lens' MessageResult (Maybe DeliveryStatus)
mrDeliveryStatus = lens _mrDeliveryStatus (\ s a -> s{_mrDeliveryStatus = a})
mrStatusMessage :: Lens' MessageResult (Maybe Text)
mrStatusMessage = lens _mrStatusMessage (\ s a -> s{_mrStatusMessage = a})
mrUpdatedToken :: Lens' MessageResult (Maybe Text)
mrUpdatedToken = lens _mrUpdatedToken (\ s a -> s{_mrUpdatedToken = a})
mrStatusCode :: Lens' MessageResult (Maybe Int)
mrStatusCode = lens _mrStatusCode (\ s a -> s{_mrStatusCode = a})
instance FromJSON MessageResult where
parseJSON
= withObject "MessageResult"
(\ x ->
MessageResult' <$>
(x .:? "DeliveryStatus") <*> (x .:? "StatusMessage")
<*> (x .:? "UpdatedToken")
<*> (x .:? "StatusCode"))
instance Hashable MessageResult where
instance NFData MessageResult where
data QuietTime = QuietTime'
{ _qtStart :: !(Maybe Text)
, _qtEnd :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
quietTime
:: QuietTime
quietTime = QuietTime' {_qtStart = Nothing, _qtEnd = Nothing}
qtStart :: Lens' QuietTime (Maybe Text)
qtStart = lens _qtStart (\ s a -> s{_qtStart = a})
qtEnd :: Lens' QuietTime (Maybe Text)
qtEnd = lens _qtEnd (\ s a -> s{_qtEnd = a})
instance FromJSON QuietTime where
parseJSON
= withObject "QuietTime"
(\ x ->
QuietTime' <$> (x .:? "Start") <*> (x .:? "End"))
instance Hashable QuietTime where
instance NFData QuietTime where
instance ToJSON QuietTime where
toJSON QuietTime'{..}
= object
(catMaybes
[("Start" .=) <$> _qtStart, ("End" .=) <$> _qtEnd])
data RecencyDimension = RecencyDimension'
{ _rdRecencyType :: !(Maybe RecencyType)
, _rdDuration :: !(Maybe Duration)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
recencyDimension
:: RecencyDimension
recencyDimension =
RecencyDimension' {_rdRecencyType = Nothing, _rdDuration = Nothing}
rdRecencyType :: Lens' RecencyDimension (Maybe RecencyType)
rdRecencyType = lens _rdRecencyType (\ s a -> s{_rdRecencyType = a})
rdDuration :: Lens' RecencyDimension (Maybe Duration)
rdDuration = lens _rdDuration (\ s a -> s{_rdDuration = a})
instance FromJSON RecencyDimension where
parseJSON
= withObject "RecencyDimension"
(\ x ->
RecencyDimension' <$>
(x .:? "RecencyType") <*> (x .:? "Duration"))
instance Hashable RecencyDimension where
instance NFData RecencyDimension where
instance ToJSON RecencyDimension where
toJSON RecencyDimension'{..}
= object
(catMaybes
[("RecencyType" .=) <$> _rdRecencyType,
("Duration" .=) <$> _rdDuration])
data SMSChannelRequest = SMSChannelRequest'
{ _smscrShortCode :: !(Maybe Text)
, _smscrEnabled :: !(Maybe Bool)
, _smscrSenderId :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
sMSChannelRequest
:: SMSChannelRequest
sMSChannelRequest =
SMSChannelRequest'
{ _smscrShortCode = Nothing
, _smscrEnabled = Nothing
, _smscrSenderId = Nothing
}
smscrShortCode :: Lens' SMSChannelRequest (Maybe Text)
smscrShortCode = lens _smscrShortCode (\ s a -> s{_smscrShortCode = a})
smscrEnabled :: Lens' SMSChannelRequest (Maybe Bool)
smscrEnabled = lens _smscrEnabled (\ s a -> s{_smscrEnabled = a})
smscrSenderId :: Lens' SMSChannelRequest (Maybe Text)
smscrSenderId = lens _smscrSenderId (\ s a -> s{_smscrSenderId = a})
instance Hashable SMSChannelRequest where
instance NFData SMSChannelRequest where
instance ToJSON SMSChannelRequest where
toJSON SMSChannelRequest'{..}
= object
(catMaybes
[("ShortCode" .=) <$> _smscrShortCode,
("Enabled" .=) <$> _smscrEnabled,
("SenderId" .=) <$> _smscrSenderId])
data SMSChannelResponse = SMSChannelResponse'
{ _smscPlatform :: !(Maybe Text)
, _smscShortCode :: !(Maybe Text)
, _smscLastModifiedDate :: !(Maybe Text)
, _smscEnabled :: !(Maybe Bool)
, _smscSenderId :: !(Maybe Text)
, _smscIsArchived :: !(Maybe Bool)
, _smscApplicationId :: !(Maybe Text)
, _smscVersion :: !(Maybe Int)
, _smscId :: !(Maybe Text)
, _smscCreationDate :: !(Maybe Text)
, _smscLastModifiedBy :: !(Maybe Text)
, _smscHasCredential :: !(Maybe Bool)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
sMSChannelResponse
:: SMSChannelResponse
sMSChannelResponse =
SMSChannelResponse'
{ _smscPlatform = Nothing
, _smscShortCode = Nothing
, _smscLastModifiedDate = Nothing
, _smscEnabled = Nothing
, _smscSenderId = Nothing
, _smscIsArchived = Nothing
, _smscApplicationId = Nothing
, _smscVersion = Nothing
, _smscId = Nothing
, _smscCreationDate = Nothing
, _smscLastModifiedBy = Nothing
, _smscHasCredential = Nothing
}
smscPlatform :: Lens' SMSChannelResponse (Maybe Text)
smscPlatform = lens _smscPlatform (\ s a -> s{_smscPlatform = a})
smscShortCode :: Lens' SMSChannelResponse (Maybe Text)
smscShortCode = lens _smscShortCode (\ s a -> s{_smscShortCode = a})
smscLastModifiedDate :: Lens' SMSChannelResponse (Maybe Text)
smscLastModifiedDate = lens _smscLastModifiedDate (\ s a -> s{_smscLastModifiedDate = a})
smscEnabled :: Lens' SMSChannelResponse (Maybe Bool)
smscEnabled = lens _smscEnabled (\ s a -> s{_smscEnabled = a})
smscSenderId :: Lens' SMSChannelResponse (Maybe Text)
smscSenderId = lens _smscSenderId (\ s a -> s{_smscSenderId = a})
smscIsArchived :: Lens' SMSChannelResponse (Maybe Bool)
smscIsArchived = lens _smscIsArchived (\ s a -> s{_smscIsArchived = a})
smscApplicationId :: Lens' SMSChannelResponse (Maybe Text)
smscApplicationId = lens _smscApplicationId (\ s a -> s{_smscApplicationId = a})
smscVersion :: Lens' SMSChannelResponse (Maybe Int)
smscVersion = lens _smscVersion (\ s a -> s{_smscVersion = a})
smscId :: Lens' SMSChannelResponse (Maybe Text)
smscId = lens _smscId (\ s a -> s{_smscId = a})
smscCreationDate :: Lens' SMSChannelResponse (Maybe Text)
smscCreationDate = lens _smscCreationDate (\ s a -> s{_smscCreationDate = a})
smscLastModifiedBy :: Lens' SMSChannelResponse (Maybe Text)
smscLastModifiedBy = lens _smscLastModifiedBy (\ s a -> s{_smscLastModifiedBy = a})
smscHasCredential :: Lens' SMSChannelResponse (Maybe Bool)
smscHasCredential = lens _smscHasCredential (\ s a -> s{_smscHasCredential = a})
instance FromJSON SMSChannelResponse where
parseJSON
= withObject "SMSChannelResponse"
(\ x ->
SMSChannelResponse' <$>
(x .:? "Platform") <*> (x .:? "ShortCode") <*>
(x .:? "LastModifiedDate")
<*> (x .:? "Enabled")
<*> (x .:? "SenderId")
<*> (x .:? "IsArchived")
<*> (x .:? "ApplicationId")
<*> (x .:? "Version")
<*> (x .:? "Id")
<*> (x .:? "CreationDate")
<*> (x .:? "LastModifiedBy")
<*> (x .:? "HasCredential"))
instance Hashable SMSChannelResponse where
instance NFData SMSChannelResponse where
data SMSMessage = SMSMessage'
{ _smsmSubstitutions :: !(Maybe (Map Text [Text]))
, _smsmOriginationNumber :: !(Maybe Text)
, _smsmBody :: !(Maybe Text)
, _smsmMessageType :: !(Maybe MessageType)
, _smsmSenderId :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
sMSMessage
:: SMSMessage
sMSMessage =
SMSMessage'
{ _smsmSubstitutions = Nothing
, _smsmOriginationNumber = Nothing
, _smsmBody = Nothing
, _smsmMessageType = Nothing
, _smsmSenderId = Nothing
}
smsmSubstitutions :: Lens' SMSMessage (HashMap Text [Text])
smsmSubstitutions = lens _smsmSubstitutions (\ s a -> s{_smsmSubstitutions = a}) . _Default . _Map
smsmOriginationNumber :: Lens' SMSMessage (Maybe Text)
smsmOriginationNumber = lens _smsmOriginationNumber (\ s a -> s{_smsmOriginationNumber = a})
smsmBody :: Lens' SMSMessage (Maybe Text)
smsmBody = lens _smsmBody (\ s a -> s{_smsmBody = a})
smsmMessageType :: Lens' SMSMessage (Maybe MessageType)
smsmMessageType = lens _smsmMessageType (\ s a -> s{_smsmMessageType = a})
smsmSenderId :: Lens' SMSMessage (Maybe Text)
smsmSenderId = lens _smsmSenderId (\ s a -> s{_smsmSenderId = a})
instance Hashable SMSMessage where
instance NFData SMSMessage where
instance ToJSON SMSMessage where
toJSON SMSMessage'{..}
= object
(catMaybes
[("Substitutions" .=) <$> _smsmSubstitutions,
("OriginationNumber" .=) <$> _smsmOriginationNumber,
("Body" .=) <$> _smsmBody,
("MessageType" .=) <$> _smsmMessageType,
("SenderId" .=) <$> _smsmSenderId])
data Schedule = Schedule'
{ _sFrequency :: !(Maybe Frequency)
, _sStartTime :: !(Maybe Text)
, _sQuietTime :: !(Maybe QuietTime)
, _sIsLocalTime :: !(Maybe Bool)
, _sEndTime :: !(Maybe Text)
, _sTimezone :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
schedule
:: Schedule
schedule =
Schedule'
{ _sFrequency = Nothing
, _sStartTime = Nothing
, _sQuietTime = Nothing
, _sIsLocalTime = Nothing
, _sEndTime = Nothing
, _sTimezone = Nothing
}
sFrequency :: Lens' Schedule (Maybe Frequency)
sFrequency = lens _sFrequency (\ s a -> s{_sFrequency = a})
sStartTime :: Lens' Schedule (Maybe Text)
sStartTime = lens _sStartTime (\ s a -> s{_sStartTime = a})
sQuietTime :: Lens' Schedule (Maybe QuietTime)
sQuietTime = lens _sQuietTime (\ s a -> s{_sQuietTime = a})
sIsLocalTime :: Lens' Schedule (Maybe Bool)
sIsLocalTime = lens _sIsLocalTime (\ s a -> s{_sIsLocalTime = a})
sEndTime :: Lens' Schedule (Maybe Text)
sEndTime = lens _sEndTime (\ s a -> s{_sEndTime = a})
sTimezone :: Lens' Schedule (Maybe Text)
sTimezone = lens _sTimezone (\ s a -> s{_sTimezone = a})
instance FromJSON Schedule where
parseJSON
= withObject "Schedule"
(\ x ->
Schedule' <$>
(x .:? "Frequency") <*> (x .:? "StartTime") <*>
(x .:? "QuietTime")
<*> (x .:? "IsLocalTime")
<*> (x .:? "EndTime")
<*> (x .:? "Timezone"))
instance Hashable Schedule where
instance NFData Schedule where
instance ToJSON Schedule where
toJSON Schedule'{..}
= object
(catMaybes
[("Frequency" .=) <$> _sFrequency,
("StartTime" .=) <$> _sStartTime,
("QuietTime" .=) <$> _sQuietTime,
("IsLocalTime" .=) <$> _sIsLocalTime,
("EndTime" .=) <$> _sEndTime,
("Timezone" .=) <$> _sTimezone])
newtype SegmentBehaviors = SegmentBehaviors'
{ _sbRecency :: Maybe RecencyDimension
} deriving (Eq, Read, Show, Data, Typeable, Generic)
segmentBehaviors
:: SegmentBehaviors
segmentBehaviors = SegmentBehaviors' {_sbRecency = Nothing}
sbRecency :: Lens' SegmentBehaviors (Maybe RecencyDimension)
sbRecency = lens _sbRecency (\ s a -> s{_sbRecency = a})
instance FromJSON SegmentBehaviors where
parseJSON
= withObject "SegmentBehaviors"
(\ x -> SegmentBehaviors' <$> (x .:? "Recency"))
instance Hashable SegmentBehaviors where
instance NFData SegmentBehaviors where
instance ToJSON SegmentBehaviors where
toJSON SegmentBehaviors'{..}
= object (catMaybes [("Recency" .=) <$> _sbRecency])
data SegmentDemographics = SegmentDemographics'
{ _sdPlatform :: !(Maybe SetDimension)
, _sdAppVersion :: !(Maybe SetDimension)
, _sdChannel :: !(Maybe SetDimension)
, _sdModel :: !(Maybe SetDimension)
, _sdMake :: !(Maybe SetDimension)
, _sdDeviceType :: !(Maybe SetDimension)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
segmentDemographics
:: SegmentDemographics
segmentDemographics =
SegmentDemographics'
{ _sdPlatform = Nothing
, _sdAppVersion = Nothing
, _sdChannel = Nothing
, _sdModel = Nothing
, _sdMake = Nothing
, _sdDeviceType = Nothing
}
sdPlatform :: Lens' SegmentDemographics (Maybe SetDimension)
sdPlatform = lens _sdPlatform (\ s a -> s{_sdPlatform = a})
sdAppVersion :: Lens' SegmentDemographics (Maybe SetDimension)
sdAppVersion = lens _sdAppVersion (\ s a -> s{_sdAppVersion = a})
sdChannel :: Lens' SegmentDemographics (Maybe SetDimension)
sdChannel = lens _sdChannel (\ s a -> s{_sdChannel = a})
sdModel :: Lens' SegmentDemographics (Maybe SetDimension)
sdModel = lens _sdModel (\ s a -> s{_sdModel = a})
sdMake :: Lens' SegmentDemographics (Maybe SetDimension)
sdMake = lens _sdMake (\ s a -> s{_sdMake = a})
sdDeviceType :: Lens' SegmentDemographics (Maybe SetDimension)
sdDeviceType = lens _sdDeviceType (\ s a -> s{_sdDeviceType = a})
instance FromJSON SegmentDemographics where
parseJSON
= withObject "SegmentDemographics"
(\ x ->
SegmentDemographics' <$>
(x .:? "Platform") <*> (x .:? "AppVersion") <*>
(x .:? "Channel")
<*> (x .:? "Model")
<*> (x .:? "Make")
<*> (x .:? "DeviceType"))
instance Hashable SegmentDemographics where
instance NFData SegmentDemographics where
instance ToJSON SegmentDemographics where
toJSON SegmentDemographics'{..}
= object
(catMaybes
[("Platform" .=) <$> _sdPlatform,
("AppVersion" .=) <$> _sdAppVersion,
("Channel" .=) <$> _sdChannel,
("Model" .=) <$> _sdModel, ("Make" .=) <$> _sdMake,
("DeviceType" .=) <$> _sdDeviceType])
data SegmentDimensions = SegmentDimensions'
{ _sdLocation :: !(Maybe SegmentLocation)
, _sdDemographic :: !(Maybe SegmentDemographics)
, _sdUserAttributes :: !(Maybe (Map Text AttributeDimension))
, _sdBehavior :: !(Maybe SegmentBehaviors)
, _sdAttributes :: !(Maybe (Map Text AttributeDimension))
} deriving (Eq, Read, Show, Data, Typeable, Generic)
segmentDimensions
:: SegmentDimensions
segmentDimensions =
SegmentDimensions'
{ _sdLocation = Nothing
, _sdDemographic = Nothing
, _sdUserAttributes = Nothing
, _sdBehavior = Nothing
, _sdAttributes = Nothing
}
sdLocation :: Lens' SegmentDimensions (Maybe SegmentLocation)
sdLocation = lens _sdLocation (\ s a -> s{_sdLocation = a})
sdDemographic :: Lens' SegmentDimensions (Maybe SegmentDemographics)
sdDemographic = lens _sdDemographic (\ s a -> s{_sdDemographic = a})
sdUserAttributes :: Lens' SegmentDimensions (HashMap Text AttributeDimension)
sdUserAttributes = lens _sdUserAttributes (\ s a -> s{_sdUserAttributes = a}) . _Default . _Map
sdBehavior :: Lens' SegmentDimensions (Maybe SegmentBehaviors)
sdBehavior = lens _sdBehavior (\ s a -> s{_sdBehavior = a})
sdAttributes :: Lens' SegmentDimensions (HashMap Text AttributeDimension)
sdAttributes = lens _sdAttributes (\ s a -> s{_sdAttributes = a}) . _Default . _Map
instance FromJSON SegmentDimensions where
parseJSON
= withObject "SegmentDimensions"
(\ x ->
SegmentDimensions' <$>
(x .:? "Location") <*> (x .:? "Demographic") <*>
(x .:? "UserAttributes" .!= mempty)
<*> (x .:? "Behavior")
<*> (x .:? "Attributes" .!= mempty))
instance Hashable SegmentDimensions where
instance NFData SegmentDimensions where
instance ToJSON SegmentDimensions where
toJSON SegmentDimensions'{..}
= object
(catMaybes
[("Location" .=) <$> _sdLocation,
("Demographic" .=) <$> _sdDemographic,
("UserAttributes" .=) <$> _sdUserAttributes,
("Behavior" .=) <$> _sdBehavior,
("Attributes" .=) <$> _sdAttributes])
data SegmentImportResource = SegmentImportResource'
{ _sirSize :: !(Maybe Int)
, _sirFormat :: !(Maybe DefinitionFormat)
, _sirChannelCounts :: !(Maybe (Map Text Int))
, _sirExternalId :: !(Maybe Text)
, _sirS3URL :: !(Maybe Text)
, _sirRoleARN :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
segmentImportResource
:: SegmentImportResource
segmentImportResource =
SegmentImportResource'
{ _sirSize = Nothing
, _sirFormat = Nothing
, _sirChannelCounts = Nothing
, _sirExternalId = Nothing
, _sirS3URL = Nothing
, _sirRoleARN = Nothing
}
sirSize :: Lens' SegmentImportResource (Maybe Int)
sirSize = lens _sirSize (\ s a -> s{_sirSize = a})
sirFormat :: Lens' SegmentImportResource (Maybe DefinitionFormat)
sirFormat = lens _sirFormat (\ s a -> s{_sirFormat = a})
sirChannelCounts :: Lens' SegmentImportResource (HashMap Text Int)
sirChannelCounts = lens _sirChannelCounts (\ s a -> s{_sirChannelCounts = a}) . _Default . _Map
sirExternalId :: Lens' SegmentImportResource (Maybe Text)
sirExternalId = lens _sirExternalId (\ s a -> s{_sirExternalId = a})
sirS3URL :: Lens' SegmentImportResource (Maybe Text)
sirS3URL = lens _sirS3URL (\ s a -> s{_sirS3URL = a})
sirRoleARN :: Lens' SegmentImportResource (Maybe Text)
sirRoleARN = lens _sirRoleARN (\ s a -> s{_sirRoleARN = a})
instance FromJSON SegmentImportResource where
parseJSON
= withObject "SegmentImportResource"
(\ x ->
SegmentImportResource' <$>
(x .:? "Size") <*> (x .:? "Format") <*>
(x .:? "ChannelCounts" .!= mempty)
<*> (x .:? "ExternalId")
<*> (x .:? "S3Url")
<*> (x .:? "RoleArn"))
instance Hashable SegmentImportResource where
instance NFData SegmentImportResource where
newtype SegmentLocation = SegmentLocation'
{ _slCountry :: Maybe SetDimension
} deriving (Eq, Read, Show, Data, Typeable, Generic)
segmentLocation
:: SegmentLocation
segmentLocation = SegmentLocation' {_slCountry = Nothing}
slCountry :: Lens' SegmentLocation (Maybe SetDimension)
slCountry = lens _slCountry (\ s a -> s{_slCountry = a})
instance FromJSON SegmentLocation where
parseJSON
= withObject "SegmentLocation"
(\ x -> SegmentLocation' <$> (x .:? "Country"))
instance Hashable SegmentLocation where
instance NFData SegmentLocation where
instance ToJSON SegmentLocation where
toJSON SegmentLocation'{..}
= object (catMaybes [("Country" .=) <$> _slCountry])
data SegmentResponse = SegmentResponse'
{ _sLastModifiedDate :: !(Maybe Text)
, _sSegmentType :: !(Maybe SegmentType)
, _sApplicationId :: !(Maybe Text)
, _sName :: !(Maybe Text)
, _sVersion :: !(Maybe Int)
, _sId :: !(Maybe Text)
, _sCreationDate :: !(Maybe Text)
, _sImportDefinition :: !(Maybe SegmentImportResource)
, _sDimensions :: !(Maybe SegmentDimensions)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
segmentResponse
:: SegmentResponse
segmentResponse =
SegmentResponse'
{ _sLastModifiedDate = Nothing
, _sSegmentType = Nothing
, _sApplicationId = Nothing
, _sName = Nothing
, _sVersion = Nothing
, _sId = Nothing
, _sCreationDate = Nothing
, _sImportDefinition = Nothing
, _sDimensions = Nothing
}
sLastModifiedDate :: Lens' SegmentResponse (Maybe Text)
sLastModifiedDate = lens _sLastModifiedDate (\ s a -> s{_sLastModifiedDate = a})
sSegmentType :: Lens' SegmentResponse (Maybe SegmentType)
sSegmentType = lens _sSegmentType (\ s a -> s{_sSegmentType = a})
sApplicationId :: Lens' SegmentResponse (Maybe Text)
sApplicationId = lens _sApplicationId (\ s a -> s{_sApplicationId = a})
sName :: Lens' SegmentResponse (Maybe Text)
sName = lens _sName (\ s a -> s{_sName = a})
sVersion :: Lens' SegmentResponse (Maybe Int)
sVersion = lens _sVersion (\ s a -> s{_sVersion = a})
sId :: Lens' SegmentResponse (Maybe Text)
sId = lens _sId (\ s a -> s{_sId = a})
sCreationDate :: Lens' SegmentResponse (Maybe Text)
sCreationDate = lens _sCreationDate (\ s a -> s{_sCreationDate = a})
sImportDefinition :: Lens' SegmentResponse (Maybe SegmentImportResource)
sImportDefinition = lens _sImportDefinition (\ s a -> s{_sImportDefinition = a})
sDimensions :: Lens' SegmentResponse (Maybe SegmentDimensions)
sDimensions = lens _sDimensions (\ s a -> s{_sDimensions = a})
instance FromJSON SegmentResponse where
parseJSON
= withObject "SegmentResponse"
(\ x ->
SegmentResponse' <$>
(x .:? "LastModifiedDate") <*> (x .:? "SegmentType")
<*> (x .:? "ApplicationId")
<*> (x .:? "Name")
<*> (x .:? "Version")
<*> (x .:? "Id")
<*> (x .:? "CreationDate")
<*> (x .:? "ImportDefinition")
<*> (x .:? "Dimensions"))
instance Hashable SegmentResponse where
instance NFData SegmentResponse where
data SegmentsResponse = SegmentsResponse'
{ _sNextToken :: !(Maybe Text)
, _sItem :: !(Maybe [SegmentResponse])
} deriving (Eq, Read, Show, Data, Typeable, Generic)
segmentsResponse
:: SegmentsResponse
segmentsResponse = SegmentsResponse' {_sNextToken = Nothing, _sItem = Nothing}
sNextToken :: Lens' SegmentsResponse (Maybe Text)
sNextToken = lens _sNextToken (\ s a -> s{_sNextToken = a})
sItem :: Lens' SegmentsResponse [SegmentResponse]
sItem = lens _sItem (\ s a -> s{_sItem = a}) . _Default . _Coerce
instance FromJSON SegmentsResponse where
parseJSON
= withObject "SegmentsResponse"
(\ x ->
SegmentsResponse' <$>
(x .:? "NextToken") <*> (x .:? "Item" .!= mempty))
instance Hashable SegmentsResponse where
instance NFData SegmentsResponse where
data SendUsersMessageRequest = SendUsersMessageRequest'
{ _sumrContext :: !(Maybe (Map Text Text))
, _sumrUsers :: !(Maybe (Map Text EndpointSendConfiguration))
, _sumrMessageConfiguration :: !(Maybe DirectMessageConfiguration)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
sendUsersMessageRequest
:: SendUsersMessageRequest
sendUsersMessageRequest =
SendUsersMessageRequest'
{ _sumrContext = Nothing
, _sumrUsers = Nothing
, _sumrMessageConfiguration = Nothing
}
sumrContext :: Lens' SendUsersMessageRequest (HashMap Text Text)
sumrContext = lens _sumrContext (\ s a -> s{_sumrContext = a}) . _Default . _Map
sumrUsers :: Lens' SendUsersMessageRequest (HashMap Text EndpointSendConfiguration)
sumrUsers = lens _sumrUsers (\ s a -> s{_sumrUsers = a}) . _Default . _Map
sumrMessageConfiguration :: Lens' SendUsersMessageRequest (Maybe DirectMessageConfiguration)
sumrMessageConfiguration = lens _sumrMessageConfiguration (\ s a -> s{_sumrMessageConfiguration = a})
instance Hashable SendUsersMessageRequest where
instance NFData SendUsersMessageRequest where
instance ToJSON SendUsersMessageRequest where
toJSON SendUsersMessageRequest'{..}
= object
(catMaybes
[("Context" .=) <$> _sumrContext,
("Users" .=) <$> _sumrUsers,
("MessageConfiguration" .=) <$>
_sumrMessageConfiguration])
data SendUsersMessageResponse = SendUsersMessageResponse'
{ _sumRequestId :: !(Maybe Text)
, _sumResult :: !(Maybe (Map Text (Map Text EndpointMessageResult)))
, _sumApplicationId :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
sendUsersMessageResponse
:: SendUsersMessageResponse
sendUsersMessageResponse =
SendUsersMessageResponse'
{_sumRequestId = Nothing, _sumResult = Nothing, _sumApplicationId = Nothing}
sumRequestId :: Lens' SendUsersMessageResponse (Maybe Text)
sumRequestId = lens _sumRequestId (\ s a -> s{_sumRequestId = a})
sumResult :: Lens' SendUsersMessageResponse (HashMap Text (HashMap Text EndpointMessageResult))
sumResult = lens _sumResult (\ s a -> s{_sumResult = a}) . _Default . _Map
sumApplicationId :: Lens' SendUsersMessageResponse (Maybe Text)
sumApplicationId = lens _sumApplicationId (\ s a -> s{_sumApplicationId = a})
instance FromJSON SendUsersMessageResponse where
parseJSON
= withObject "SendUsersMessageResponse"
(\ x ->
SendUsersMessageResponse' <$>
(x .:? "RequestId") <*> (x .:? "Result" .!= mempty)
<*> (x .:? "ApplicationId"))
instance Hashable SendUsersMessageResponse where
instance NFData SendUsersMessageResponse where
data SetDimension = SetDimension'
{ _sdValues :: !(Maybe [Text])
, _sdDimensionType :: !(Maybe DimensionType)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
setDimension
:: SetDimension
setDimension = SetDimension' {_sdValues = Nothing, _sdDimensionType = Nothing}
sdValues :: Lens' SetDimension [Text]
sdValues = lens _sdValues (\ s a -> s{_sdValues = a}) . _Default . _Coerce
sdDimensionType :: Lens' SetDimension (Maybe DimensionType)
sdDimensionType = lens _sdDimensionType (\ s a -> s{_sdDimensionType = a})
instance FromJSON SetDimension where
parseJSON
= withObject "SetDimension"
(\ x ->
SetDimension' <$>
(x .:? "Values" .!= mempty) <*>
(x .:? "DimensionType"))
instance Hashable SetDimension where
instance NFData SetDimension where
instance ToJSON SetDimension where
toJSON SetDimension'{..}
= object
(catMaybes
[("Values" .=) <$> _sdValues,
("DimensionType" .=) <$> _sdDimensionType])
data TreatmentResource = TreatmentResource'
{ _trState :: !(Maybe CampaignState)
, _trSchedule :: !(Maybe Schedule)
, _trTreatmentName :: !(Maybe Text)
, _trSizePercent :: !(Maybe Int)
, _trTreatmentDescription :: !(Maybe Text)
, _trId :: !(Maybe Text)
, _trMessageConfiguration :: !(Maybe MessageConfiguration)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
treatmentResource
:: TreatmentResource
treatmentResource =
TreatmentResource'
{ _trState = Nothing
, _trSchedule = Nothing
, _trTreatmentName = Nothing
, _trSizePercent = Nothing
, _trTreatmentDescription = Nothing
, _trId = Nothing
, _trMessageConfiguration = Nothing
}
trState :: Lens' TreatmentResource (Maybe CampaignState)
trState = lens _trState (\ s a -> s{_trState = a})
trSchedule :: Lens' TreatmentResource (Maybe Schedule)
trSchedule = lens _trSchedule (\ s a -> s{_trSchedule = a})
trTreatmentName :: Lens' TreatmentResource (Maybe Text)
trTreatmentName = lens _trTreatmentName (\ s a -> s{_trTreatmentName = a})
trSizePercent :: Lens' TreatmentResource (Maybe Int)
trSizePercent = lens _trSizePercent (\ s a -> s{_trSizePercent = a})
trTreatmentDescription :: Lens' TreatmentResource (Maybe Text)
trTreatmentDescription = lens _trTreatmentDescription (\ s a -> s{_trTreatmentDescription = a})
trId :: Lens' TreatmentResource (Maybe Text)
trId = lens _trId (\ s a -> s{_trId = a})
trMessageConfiguration :: Lens' TreatmentResource (Maybe MessageConfiguration)
trMessageConfiguration = lens _trMessageConfiguration (\ s a -> s{_trMessageConfiguration = a})
instance FromJSON TreatmentResource where
parseJSON
= withObject "TreatmentResource"
(\ x ->
TreatmentResource' <$>
(x .:? "State") <*> (x .:? "Schedule") <*>
(x .:? "TreatmentName")
<*> (x .:? "SizePercent")
<*> (x .:? "TreatmentDescription")
<*> (x .:? "Id")
<*> (x .:? "MessageConfiguration"))
instance Hashable TreatmentResource where
instance NFData TreatmentResource where
data WriteApplicationSettingsRequest = WriteApplicationSettingsRequest'
{ _wasrLimits :: !(Maybe CampaignLimits)
, _wasrQuietTime :: !(Maybe QuietTime)
, _wasrCampaignHook :: !(Maybe CampaignHook)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
writeApplicationSettingsRequest
:: WriteApplicationSettingsRequest
writeApplicationSettingsRequest =
WriteApplicationSettingsRequest'
{ _wasrLimits = Nothing
, _wasrQuietTime = Nothing
, _wasrCampaignHook = Nothing
}
wasrLimits :: Lens' WriteApplicationSettingsRequest (Maybe CampaignLimits)
wasrLimits = lens _wasrLimits (\ s a -> s{_wasrLimits = a})
wasrQuietTime :: Lens' WriteApplicationSettingsRequest (Maybe QuietTime)
wasrQuietTime = lens _wasrQuietTime (\ s a -> s{_wasrQuietTime = a})
wasrCampaignHook :: Lens' WriteApplicationSettingsRequest (Maybe CampaignHook)
wasrCampaignHook = lens _wasrCampaignHook (\ s a -> s{_wasrCampaignHook = a})
instance Hashable WriteApplicationSettingsRequest
where
instance NFData WriteApplicationSettingsRequest where
instance ToJSON WriteApplicationSettingsRequest where
toJSON WriteApplicationSettingsRequest'{..}
= object
(catMaybes
[("Limits" .=) <$> _wasrLimits,
("QuietTime" .=) <$> _wasrQuietTime,
("CampaignHook" .=) <$> _wasrCampaignHook])
data WriteCampaignRequest = WriteCampaignRequest'
{ _wcrSchedule :: !(Maybe Schedule)
, _wcrHook :: !(Maybe CampaignHook)
, _wcrTreatmentName :: !(Maybe Text)
, _wcrLimits :: !(Maybe CampaignLimits)
, _wcrIsPaused :: !(Maybe Bool)
, _wcrName :: !(Maybe Text)
, _wcrHoldoutPercent :: !(Maybe Int)
, _wcrTreatmentDescription :: !(Maybe Text)
, _wcrMessageConfiguration :: !(Maybe MessageConfiguration)
, _wcrDescription :: !(Maybe Text)
, _wcrSegmentId :: !(Maybe Text)
, _wcrAdditionalTreatments :: !(Maybe [WriteTreatmentResource])
, _wcrSegmentVersion :: !(Maybe Int)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
writeCampaignRequest
:: WriteCampaignRequest
writeCampaignRequest =
WriteCampaignRequest'
{ _wcrSchedule = Nothing
, _wcrHook = Nothing
, _wcrTreatmentName = Nothing
, _wcrLimits = Nothing
, _wcrIsPaused = Nothing
, _wcrName = Nothing
, _wcrHoldoutPercent = Nothing
, _wcrTreatmentDescription = Nothing
, _wcrMessageConfiguration = Nothing
, _wcrDescription = Nothing
, _wcrSegmentId = Nothing
, _wcrAdditionalTreatments = Nothing
, _wcrSegmentVersion = Nothing
}
wcrSchedule :: Lens' WriteCampaignRequest (Maybe Schedule)
wcrSchedule = lens _wcrSchedule (\ s a -> s{_wcrSchedule = a})
wcrHook :: Lens' WriteCampaignRequest (Maybe CampaignHook)
wcrHook = lens _wcrHook (\ s a -> s{_wcrHook = a})
wcrTreatmentName :: Lens' WriteCampaignRequest (Maybe Text)
wcrTreatmentName = lens _wcrTreatmentName (\ s a -> s{_wcrTreatmentName = a})
wcrLimits :: Lens' WriteCampaignRequest (Maybe CampaignLimits)
wcrLimits = lens _wcrLimits (\ s a -> s{_wcrLimits = a})
wcrIsPaused :: Lens' WriteCampaignRequest (Maybe Bool)
wcrIsPaused = lens _wcrIsPaused (\ s a -> s{_wcrIsPaused = a})
wcrName :: Lens' WriteCampaignRequest (Maybe Text)
wcrName = lens _wcrName (\ s a -> s{_wcrName = a})
wcrHoldoutPercent :: Lens' WriteCampaignRequest (Maybe Int)
wcrHoldoutPercent = lens _wcrHoldoutPercent (\ s a -> s{_wcrHoldoutPercent = a})
wcrTreatmentDescription :: Lens' WriteCampaignRequest (Maybe Text)
wcrTreatmentDescription = lens _wcrTreatmentDescription (\ s a -> s{_wcrTreatmentDescription = a})
wcrMessageConfiguration :: Lens' WriteCampaignRequest (Maybe MessageConfiguration)
wcrMessageConfiguration = lens _wcrMessageConfiguration (\ s a -> s{_wcrMessageConfiguration = a})
wcrDescription :: Lens' WriteCampaignRequest (Maybe Text)
wcrDescription = lens _wcrDescription (\ s a -> s{_wcrDescription = a})
wcrSegmentId :: Lens' WriteCampaignRequest (Maybe Text)
wcrSegmentId = lens _wcrSegmentId (\ s a -> s{_wcrSegmentId = a})
wcrAdditionalTreatments :: Lens' WriteCampaignRequest [WriteTreatmentResource]
wcrAdditionalTreatments = lens _wcrAdditionalTreatments (\ s a -> s{_wcrAdditionalTreatments = a}) . _Default . _Coerce
wcrSegmentVersion :: Lens' WriteCampaignRequest (Maybe Int)
wcrSegmentVersion = lens _wcrSegmentVersion (\ s a -> s{_wcrSegmentVersion = a})
instance Hashable WriteCampaignRequest where
instance NFData WriteCampaignRequest where
instance ToJSON WriteCampaignRequest where
toJSON WriteCampaignRequest'{..}
= object
(catMaybes
[("Schedule" .=) <$> _wcrSchedule,
("Hook" .=) <$> _wcrHook,
("TreatmentName" .=) <$> _wcrTreatmentName,
("Limits" .=) <$> _wcrLimits,
("IsPaused" .=) <$> _wcrIsPaused,
("Name" .=) <$> _wcrName,
("HoldoutPercent" .=) <$> _wcrHoldoutPercent,
("TreatmentDescription" .=) <$>
_wcrTreatmentDescription,
("MessageConfiguration" .=) <$>
_wcrMessageConfiguration,
("Description" .=) <$> _wcrDescription,
("SegmentId" .=) <$> _wcrSegmentId,
("AdditionalTreatments" .=) <$>
_wcrAdditionalTreatments,
("SegmentVersion" .=) <$> _wcrSegmentVersion])
data WriteEventStream = WriteEventStream'
{ _wesDestinationStreamARN :: !(Maybe Text)
, _wesRoleARN :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
writeEventStream
:: WriteEventStream
writeEventStream =
WriteEventStream' {_wesDestinationStreamARN = Nothing, _wesRoleARN = Nothing}
wesDestinationStreamARN :: Lens' WriteEventStream (Maybe Text)
wesDestinationStreamARN = lens _wesDestinationStreamARN (\ s a -> s{_wesDestinationStreamARN = a})
wesRoleARN :: Lens' WriteEventStream (Maybe Text)
wesRoleARN = lens _wesRoleARN (\ s a -> s{_wesRoleARN = a})
instance Hashable WriteEventStream where
instance NFData WriteEventStream where
instance ToJSON WriteEventStream where
toJSON WriteEventStream'{..}
= object
(catMaybes
[("DestinationStreamArn" .=) <$>
_wesDestinationStreamARN,
("RoleArn" .=) <$> _wesRoleARN])
data WriteSegmentRequest = WriteSegmentRequest'
{ _wsrName :: !(Maybe Text)
, _wsrDimensions :: !(Maybe SegmentDimensions)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
writeSegmentRequest
:: WriteSegmentRequest
writeSegmentRequest =
WriteSegmentRequest' {_wsrName = Nothing, _wsrDimensions = Nothing}
wsrName :: Lens' WriteSegmentRequest (Maybe Text)
wsrName = lens _wsrName (\ s a -> s{_wsrName = a})
wsrDimensions :: Lens' WriteSegmentRequest (Maybe SegmentDimensions)
wsrDimensions = lens _wsrDimensions (\ s a -> s{_wsrDimensions = a})
instance Hashable WriteSegmentRequest where
instance NFData WriteSegmentRequest where
instance ToJSON WriteSegmentRequest where
toJSON WriteSegmentRequest'{..}
= object
(catMaybes
[("Name" .=) <$> _wsrName,
("Dimensions" .=) <$> _wsrDimensions])
data WriteTreatmentResource = WriteTreatmentResource'
{ _wtrSchedule :: !(Maybe Schedule)
, _wtrTreatmentName :: !(Maybe Text)
, _wtrSizePercent :: !(Maybe Int)
, _wtrTreatmentDescription :: !(Maybe Text)
, _wtrMessageConfiguration :: !(Maybe MessageConfiguration)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
writeTreatmentResource
:: WriteTreatmentResource
writeTreatmentResource =
WriteTreatmentResource'
{ _wtrSchedule = Nothing
, _wtrTreatmentName = Nothing
, _wtrSizePercent = Nothing
, _wtrTreatmentDescription = Nothing
, _wtrMessageConfiguration = Nothing
}
wtrSchedule :: Lens' WriteTreatmentResource (Maybe Schedule)
wtrSchedule = lens _wtrSchedule (\ s a -> s{_wtrSchedule = a})
wtrTreatmentName :: Lens' WriteTreatmentResource (Maybe Text)
wtrTreatmentName = lens _wtrTreatmentName (\ s a -> s{_wtrTreatmentName = a})
wtrSizePercent :: Lens' WriteTreatmentResource (Maybe Int)
wtrSizePercent = lens _wtrSizePercent (\ s a -> s{_wtrSizePercent = a})
wtrTreatmentDescription :: Lens' WriteTreatmentResource (Maybe Text)
wtrTreatmentDescription = lens _wtrTreatmentDescription (\ s a -> s{_wtrTreatmentDescription = a})
wtrMessageConfiguration :: Lens' WriteTreatmentResource (Maybe MessageConfiguration)
wtrMessageConfiguration = lens _wtrMessageConfiguration (\ s a -> s{_wtrMessageConfiguration = a})
instance Hashable WriteTreatmentResource where
instance NFData WriteTreatmentResource where
instance ToJSON WriteTreatmentResource where
toJSON WriteTreatmentResource'{..}
= object
(catMaybes
[("Schedule" .=) <$> _wtrSchedule,
("TreatmentName" .=) <$> _wtrTreatmentName,
("SizePercent" .=) <$> _wtrSizePercent,
("TreatmentDescription" .=) <$>
_wtrTreatmentDescription,
("MessageConfiguration" .=) <$>
_wtrMessageConfiguration])