{-# 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 APNSChannelRequest = APNSChannelRequest'
{ _acrPrivateKey :: !(Maybe Text)
, _acrCertificate :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
apnsChannelRequest
:: APNSChannelRequest
apnsChannelRequest =
APNSChannelRequest'
{ _acrPrivateKey = Nothing
, _acrCertificate = Nothing
}
acrPrivateKey :: Lens' APNSChannelRequest (Maybe Text)
acrPrivateKey = lens _acrPrivateKey (\ s a -> s{_acrPrivateKey = a});
acrCertificate :: Lens' APNSChannelRequest (Maybe Text)
acrCertificate = lens _acrCertificate (\ s a -> s{_acrCertificate = a});
instance Hashable APNSChannelRequest
instance NFData APNSChannelRequest
instance ToJSON APNSChannelRequest where
toJSON APNSChannelRequest'{..}
= object
(catMaybes
[("PrivateKey" .=) <$> _acrPrivateKey,
("Certificate" .=) <$> _acrCertificate])
data APNSChannelResponse = APNSChannelResponse'
{ _acPlatform :: !(Maybe Text)
, _acLastModifiedDate :: !(Maybe Text)
, _acIsArchived :: !(Maybe Bool)
, _acApplicationId :: !(Maybe Text)
, _acVersion :: !(Maybe Int)
, _acId :: !(Maybe Text)
, _acCreationDate :: !(Maybe Text)
, _acLastModifiedBy :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
apnsChannelResponse
:: APNSChannelResponse
apnsChannelResponse =
APNSChannelResponse'
{ _acPlatform = Nothing
, _acLastModifiedDate = Nothing
, _acIsArchived = Nothing
, _acApplicationId = Nothing
, _acVersion = Nothing
, _acId = Nothing
, _acCreationDate = Nothing
, _acLastModifiedBy = 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});
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});
instance FromJSON APNSChannelResponse where
parseJSON
= withObject "APNSChannelResponse"
(\ x ->
APNSChannelResponse' <$>
(x .:? "Platform") <*> (x .:? "LastModifiedDate") <*>
(x .:? "IsArchived")
<*> (x .:? "ApplicationId")
<*> (x .:? "Version")
<*> (x .:? "Id")
<*> (x .:? "CreationDate")
<*> (x .:? "LastModifiedBy"))
instance Hashable APNSChannelResponse
instance NFData APNSChannelResponse
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
instance NFData ActivitiesResponse
data ActivityResponse = ActivityResponse'
{ _aState :: !(Maybe Text)
, _aStart :: !(Maybe Text)
, _aCampaignId :: !(Maybe Text)
, _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
, _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});
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 .:? "Result")
<*> (x .:? "TreatmentId")
<*> (x .:? "SuccessfulEndpointCount")
<*> (x .:? "End")
<*> (x .:? "ApplicationId")
<*> (x .:? "TotalEndpointCount")
<*> (x .:? "Id")
<*> (x .:? "ScheduledStart"))
instance Hashable ActivityResponse
instance NFData ActivityResponse
data ApplicationSettingsResource = ApplicationSettingsResource'
{ _asrLastModifiedDate :: !(Maybe Text)
, _asrLimits :: !(Maybe CampaignLimits)
, _asrQuietTime :: !(Maybe QuietTime)
, _asrApplicationId :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
applicationSettingsResource
:: ApplicationSettingsResource
applicationSettingsResource =
ApplicationSettingsResource'
{ _asrLastModifiedDate = Nothing
, _asrLimits = Nothing
, _asrQuietTime = Nothing
, _asrApplicationId = 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});
instance FromJSON ApplicationSettingsResource where
parseJSON
= withObject "ApplicationSettingsResource"
(\ x ->
ApplicationSettingsResource' <$>
(x .:? "LastModifiedDate") <*> (x .:? "Limits") <*>
(x .:? "QuietTime")
<*> (x .:? "ApplicationId"))
instance Hashable ApplicationSettingsResource
instance NFData ApplicationSettingsResource
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
instance NFData AttributeDimension
instance ToJSON AttributeDimension where
toJSON AttributeDimension'{..}
= object
(catMaybes
[("Values" .=) <$> _adValues,
("AttributeType" .=) <$> _adAttributeType])
data CampaignLimits = CampaignLimits'
{ _clDaily :: !(Maybe Int)
, _clTotal :: !(Maybe Int)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
campaignLimits
:: CampaignLimits
campaignLimits =
CampaignLimits'
{ _clDaily = Nothing
, _clTotal = Nothing
}
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});
instance FromJSON CampaignLimits where
parseJSON
= withObject "CampaignLimits"
(\ x ->
CampaignLimits' <$>
(x .:? "Daily") <*> (x .:? "Total"))
instance Hashable CampaignLimits
instance NFData CampaignLimits
instance ToJSON CampaignLimits where
toJSON CampaignLimits'{..}
= object
(catMaybes
[("Daily" .=) <$> _clDaily,
("Total" .=) <$> _clTotal])
data CampaignResponse = CampaignResponse'
{ _cState :: !(Maybe CampaignState)
, _cLastModifiedDate :: !(Maybe Text)
, _cSchedule :: !(Maybe Schedule)
, _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
, _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});
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 .:? "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
instance NFData CampaignResponse
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
instance NFData CampaignState
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
instance NFData CampaignsResponse
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
instance NFData EndpointBatchItem
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
instance NFData EndpointBatchRequest
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
instance NFData EndpointDemographic
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
instance NFData EndpointLocation
instance ToJSON EndpointLocation where
toJSON EndpointLocation'{..}
= object
(catMaybes
[("PostalCode" .=) <$> _elPostalCode,
("Latitude" .=) <$> _elLatitude,
("Country" .=) <$> _elCountry,
("City" .=) <$> _elCity, ("Region" .=) <$> _elRegion,
("Longitude" .=) <$> _elLongitude])
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
instance NFData EndpointRequest
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)
, _eShardId :: !(Maybe Text)
} 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
, _eShardId = 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});
eShardId :: Lens' EndpointResponse (Maybe Text)
eShardId = lens _eShardId (\ s a -> s{_eShardId = 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")
<*> (x .:? "ShardId"))
instance Hashable EndpointResponse
instance NFData EndpointResponse
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
instance NFData EndpointUser
instance ToJSON EndpointUser where
toJSON EndpointUser'{..}
= object
(catMaybes
[("UserAttributes" .=) <$> _euUserAttributes,
("UserId" .=) <$> _euUserId])
newtype GCMChannelRequest = GCMChannelRequest'
{ _gcrAPIKey :: Maybe Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
gcmChannelRequest
:: GCMChannelRequest
gcmChannelRequest =
GCMChannelRequest'
{ _gcrAPIKey = Nothing
}
gcrAPIKey :: Lens' GCMChannelRequest (Maybe Text)
gcrAPIKey = lens _gcrAPIKey (\ s a -> s{_gcrAPIKey = a});
instance Hashable GCMChannelRequest
instance NFData GCMChannelRequest
instance ToJSON GCMChannelRequest where
toJSON GCMChannelRequest'{..}
= object (catMaybes [("ApiKey" .=) <$> _gcrAPIKey])
data GCMChannelResponse = GCMChannelResponse'
{ _gcPlatform :: !(Maybe Text)
, _gcLastModifiedDate :: !(Maybe Text)
, _gcCredential :: !(Maybe Text)
, _gcIsArchived :: !(Maybe Bool)
, _gcApplicationId :: !(Maybe Text)
, _gcVersion :: !(Maybe Int)
, _gcId :: !(Maybe Text)
, _gcCreationDate :: !(Maybe Text)
, _gcLastModifiedBy :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
gcmChannelResponse
:: GCMChannelResponse
gcmChannelResponse =
GCMChannelResponse'
{ _gcPlatform = Nothing
, _gcLastModifiedDate = Nothing
, _gcCredential = Nothing
, _gcIsArchived = Nothing
, _gcApplicationId = Nothing
, _gcVersion = Nothing
, _gcId = Nothing
, _gcCreationDate = Nothing
, _gcLastModifiedBy = 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});
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});
instance FromJSON GCMChannelResponse where
parseJSON
= withObject "GCMChannelResponse"
(\ x ->
GCMChannelResponse' <$>
(x .:? "Platform") <*> (x .:? "LastModifiedDate") <*>
(x .:? "Credential")
<*> (x .:? "IsArchived")
<*> (x .:? "ApplicationId")
<*> (x .:? "Version")
<*> (x .:? "Id")
<*> (x .:? "CreationDate")
<*> (x .:? "LastModifiedBy"))
instance Hashable GCMChannelResponse
instance NFData GCMChannelResponse
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
instance NFData ImportJobRequest
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
instance NFData ImportJobResource
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
instance NFData ImportJobResponse
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
instance NFData ImportJobsResponse
data Message = Message'
{ _mSilentPush :: !(Maybe Bool)
, _mImageIconURL :: !(Maybe Text)
, _mBody :: !(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
, _mBody = 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});
mBody :: Lens' Message (Maybe Text)
mBody = lens _mBody (\ s a -> s{_mBody = 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 .:? "Body")
<*> (x .:? "JsonBody")
<*> (x .:? "Url")
<*> (x .:? "Action")
<*> (x .:? "ImageUrl")
<*> (x .:? "MediaUrl")
<*> (x .:? "Title"))
instance Hashable Message
instance NFData Message
instance ToJSON Message where
toJSON Message'{..}
= object
(catMaybes
[("SilentPush" .=) <$> _mSilentPush,
("ImageIconUrl" .=) <$> _mImageIconURL,
("Body" .=) <$> _mBody,
("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
instance NFData MessageBody
data MessageConfiguration = MessageConfiguration'
{ _mcAPNSMessage :: !(Maybe Message)
, _mcGCMMessage :: !(Maybe Message)
, _mcDefaultMessage :: !(Maybe Message)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
messageConfiguration
:: MessageConfiguration
messageConfiguration =
MessageConfiguration'
{ _mcAPNSMessage = Nothing
, _mcGCMMessage = Nothing
, _mcDefaultMessage = 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});
instance FromJSON MessageConfiguration where
parseJSON
= withObject "MessageConfiguration"
(\ x ->
MessageConfiguration' <$>
(x .:? "APNSMessage") <*> (x .:? "GCMMessage") <*>
(x .:? "DefaultMessage"))
instance Hashable MessageConfiguration
instance NFData MessageConfiguration
instance ToJSON MessageConfiguration where
toJSON MessageConfiguration'{..}
= object
(catMaybes
[("APNSMessage" .=) <$> _mcAPNSMessage,
("GCMMessage" .=) <$> _mcGCMMessage,
("DefaultMessage" .=) <$> _mcDefaultMessage])
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
instance NFData QuietTime
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
instance NFData RecencyDimension
instance ToJSON RecencyDimension where
toJSON RecencyDimension'{..}
= object
(catMaybes
[("RecencyType" .=) <$> _rdRecencyType,
("Duration" .=) <$> _rdDuration])
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
instance NFData Schedule
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
instance NFData SegmentBehaviors
instance ToJSON SegmentBehaviors where
toJSON SegmentBehaviors'{..}
= object (catMaybes [("Recency" .=) <$> _sbRecency])
data SegmentDemographics = SegmentDemographics'
{ _sdPlatform :: !(Maybe SetDimension)
, _sdAppVersion :: !(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
, _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});
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 .:? "Model")
<*> (x .:? "Make")
<*> (x .:? "DeviceType"))
instance Hashable SegmentDemographics
instance NFData SegmentDemographics
instance ToJSON SegmentDemographics where
toJSON SegmentDemographics'{..}
= object
(catMaybes
[("Platform" .=) <$> _sdPlatform,
("AppVersion" .=) <$> _sdAppVersion,
("Model" .=) <$> _sdModel, ("Make" .=) <$> _sdMake,
("DeviceType" .=) <$> _sdDeviceType])
data SegmentDimensions = SegmentDimensions'
{ _sdLocation :: !(Maybe SegmentLocation)
, _sdDemographic :: !(Maybe SegmentDemographics)
, _sdBehavior :: !(Maybe SegmentBehaviors)
, _sdAttributes :: !(Maybe (Map Text AttributeDimension))
} deriving (Eq,Read,Show,Data,Typeable,Generic)
segmentDimensions
:: SegmentDimensions
segmentDimensions =
SegmentDimensions'
{ _sdLocation = Nothing
, _sdDemographic = 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});
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 .:? "Behavior")
<*> (x .:? "Attributes" .!= mempty))
instance Hashable SegmentDimensions
instance NFData SegmentDimensions
instance ToJSON SegmentDimensions where
toJSON SegmentDimensions'{..}
= object
(catMaybes
[("Location" .=) <$> _sdLocation,
("Demographic" .=) <$> _sdDemographic,
("Behavior" .=) <$> _sdBehavior,
("Attributes" .=) <$> _sdAttributes])
data SegmentImportResource = SegmentImportResource'
{ _sirSize :: !(Maybe Int)
, _sirFormat :: !(Maybe DefinitionFormat)
, _sirExternalId :: !(Maybe Text)
, _sirS3URL :: !(Maybe Text)
, _sirRoleARN :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
segmentImportResource
:: SegmentImportResource
segmentImportResource =
SegmentImportResource'
{ _sirSize = Nothing
, _sirFormat = 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});
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 .:? "ExternalId")
<*> (x .:? "S3Url")
<*> (x .:? "RoleArn"))
instance Hashable SegmentImportResource
instance NFData SegmentImportResource
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
instance NFData SegmentLocation
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
instance NFData SegmentResponse
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
instance NFData SegmentsResponse
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
instance NFData SetDimension
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
instance NFData TreatmentResource
data WriteApplicationSettingsRequest = WriteApplicationSettingsRequest'
{ _wasrLimits :: !(Maybe CampaignLimits)
, _wasrQuietTime :: !(Maybe QuietTime)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
writeApplicationSettingsRequest
:: WriteApplicationSettingsRequest
writeApplicationSettingsRequest =
WriteApplicationSettingsRequest'
{ _wasrLimits = Nothing
, _wasrQuietTime = 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});
instance Hashable WriteApplicationSettingsRequest
instance NFData WriteApplicationSettingsRequest
instance ToJSON WriteApplicationSettingsRequest where
toJSON WriteApplicationSettingsRequest'{..}
= object
(catMaybes
[("Limits" .=) <$> _wasrLimits,
("QuietTime" .=) <$> _wasrQuietTime])
data WriteCampaignRequest = WriteCampaignRequest'
{ _wcrSchedule :: !(Maybe Schedule)
, _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
, _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});
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
instance NFData WriteCampaignRequest
instance ToJSON WriteCampaignRequest where
toJSON WriteCampaignRequest'{..}
= object
(catMaybes
[("Schedule" .=) <$> _wcrSchedule,
("TreatmentName" .=) <$> _wcrTreatmentName,
("Limits" .=) <$> _wcrLimits,
("IsPaused" .=) <$> _wcrIsPaused,
("Name" .=) <$> _wcrName,
("HoldoutPercent" .=) <$> _wcrHoldoutPercent,
("TreatmentDescription" .=) <$>
_wcrTreatmentDescription,
("MessageConfiguration" .=) <$>
_wcrMessageConfiguration,
("Description" .=) <$> _wcrDescription,
("SegmentId" .=) <$> _wcrSegmentId,
("AdditionalTreatments" .=) <$>
_wcrAdditionalTreatments,
("SegmentVersion" .=) <$> _wcrSegmentVersion])
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
instance NFData WriteSegmentRequest
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
instance NFData WriteTreatmentResource
instance ToJSON WriteTreatmentResource where
toJSON WriteTreatmentResource'{..}
= object
(catMaybes
[("Schedule" .=) <$> _wtrSchedule,
("TreatmentName" .=) <$> _wtrTreatmentName,
("SizePercent" .=) <$> _wtrSizePercent,
("TreatmentDescription" .=) <$>
_wtrTreatmentDescription,
("MessageConfiguration" .=) <$>
_wtrMessageConfiguration])