{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.AWS.Mobile.Types.Product where
import Network.AWS.Lens
import Network.AWS.Mobile.Types.Sum
import Network.AWS.Prelude
data BundleDetails = BundleDetails'
{ _bdAvailablePlatforms :: !(Maybe [Platform])
, _bdBundleId :: !(Maybe Text)
, _bdVersion :: !(Maybe Text)
, _bdIconURL :: !(Maybe Text)
, _bdTitle :: !(Maybe Text)
, _bdDescription :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
bundleDetails
:: BundleDetails
bundleDetails =
BundleDetails'
{ _bdAvailablePlatforms = Nothing
, _bdBundleId = Nothing
, _bdVersion = Nothing
, _bdIconURL = Nothing
, _bdTitle = Nothing
, _bdDescription = Nothing
}
bdAvailablePlatforms :: Lens' BundleDetails [Platform]
bdAvailablePlatforms = lens _bdAvailablePlatforms (\ s a -> s{_bdAvailablePlatforms = a}) . _Default . _Coerce
bdBundleId :: Lens' BundleDetails (Maybe Text)
bdBundleId = lens _bdBundleId (\ s a -> s{_bdBundleId = a})
bdVersion :: Lens' BundleDetails (Maybe Text)
bdVersion = lens _bdVersion (\ s a -> s{_bdVersion = a})
bdIconURL :: Lens' BundleDetails (Maybe Text)
bdIconURL = lens _bdIconURL (\ s a -> s{_bdIconURL = a})
bdTitle :: Lens' BundleDetails (Maybe Text)
bdTitle = lens _bdTitle (\ s a -> s{_bdTitle = a})
bdDescription :: Lens' BundleDetails (Maybe Text)
bdDescription = lens _bdDescription (\ s a -> s{_bdDescription = a})
instance FromJSON BundleDetails where
parseJSON
= withObject "BundleDetails"
(\ x ->
BundleDetails' <$>
(x .:? "availablePlatforms" .!= mempty) <*>
(x .:? "bundleId")
<*> (x .:? "version")
<*> (x .:? "iconUrl")
<*> (x .:? "title")
<*> (x .:? "description"))
instance Hashable BundleDetails where
instance NFData BundleDetails where
data ProjectDetails = ProjectDetails'
{ _pdState :: !(Maybe ProjectState)
, _pdResources :: !(Maybe [Resource])
, _pdCreatedDate :: !(Maybe POSIX)
, _pdConsoleURL :: !(Maybe Text)
, _pdName :: !(Maybe Text)
, _pdRegion :: !(Maybe Text)
, _pdProjectId :: !(Maybe Text)
, _pdLastUpdatedDate :: !(Maybe POSIX)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
projectDetails
:: ProjectDetails
projectDetails =
ProjectDetails'
{ _pdState = Nothing
, _pdResources = Nothing
, _pdCreatedDate = Nothing
, _pdConsoleURL = Nothing
, _pdName = Nothing
, _pdRegion = Nothing
, _pdProjectId = Nothing
, _pdLastUpdatedDate = Nothing
}
pdState :: Lens' ProjectDetails (Maybe ProjectState)
pdState = lens _pdState (\ s a -> s{_pdState = a})
pdResources :: Lens' ProjectDetails [Resource]
pdResources = lens _pdResources (\ s a -> s{_pdResources = a}) . _Default . _Coerce
pdCreatedDate :: Lens' ProjectDetails (Maybe UTCTime)
pdCreatedDate = lens _pdCreatedDate (\ s a -> s{_pdCreatedDate = a}) . mapping _Time
pdConsoleURL :: Lens' ProjectDetails (Maybe Text)
pdConsoleURL = lens _pdConsoleURL (\ s a -> s{_pdConsoleURL = a})
pdName :: Lens' ProjectDetails (Maybe Text)
pdName = lens _pdName (\ s a -> s{_pdName = a})
pdRegion :: Lens' ProjectDetails (Maybe Text)
pdRegion = lens _pdRegion (\ s a -> s{_pdRegion = a})
pdProjectId :: Lens' ProjectDetails (Maybe Text)
pdProjectId = lens _pdProjectId (\ s a -> s{_pdProjectId = a})
pdLastUpdatedDate :: Lens' ProjectDetails (Maybe UTCTime)
pdLastUpdatedDate = lens _pdLastUpdatedDate (\ s a -> s{_pdLastUpdatedDate = a}) . mapping _Time
instance FromJSON ProjectDetails where
parseJSON
= withObject "ProjectDetails"
(\ x ->
ProjectDetails' <$>
(x .:? "state") <*> (x .:? "resources" .!= mempty)
<*> (x .:? "createdDate")
<*> (x .:? "consoleUrl")
<*> (x .:? "name")
<*> (x .:? "region")
<*> (x .:? "projectId")
<*> (x .:? "lastUpdatedDate"))
instance Hashable ProjectDetails where
instance NFData ProjectDetails where
data ProjectSummary = ProjectSummary'
{ _psName :: !(Maybe Text)
, _psProjectId :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
projectSummary
:: ProjectSummary
projectSummary = ProjectSummary' {_psName = Nothing, _psProjectId = Nothing}
psName :: Lens' ProjectSummary (Maybe Text)
psName = lens _psName (\ s a -> s{_psName = a})
psProjectId :: Lens' ProjectSummary (Maybe Text)
psProjectId = lens _psProjectId (\ s a -> s{_psProjectId = a})
instance FromJSON ProjectSummary where
parseJSON
= withObject "ProjectSummary"
(\ x ->
ProjectSummary' <$>
(x .:? "name") <*> (x .:? "projectId"))
instance Hashable ProjectSummary where
instance NFData ProjectSummary where
data Resource = Resource'
{ _rFeature :: !(Maybe Text)
, _rArn :: !(Maybe Text)
, _rName :: !(Maybe Text)
, _rAttributes :: !(Maybe (Map Text Text))
, _rType :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
resource
:: Resource
resource =
Resource'
{ _rFeature = Nothing
, _rArn = Nothing
, _rName = Nothing
, _rAttributes = Nothing
, _rType = Nothing
}
rFeature :: Lens' Resource (Maybe Text)
rFeature = lens _rFeature (\ s a -> s{_rFeature = a})
rArn :: Lens' Resource (Maybe Text)
rArn = lens _rArn (\ s a -> s{_rArn = a})
rName :: Lens' Resource (Maybe Text)
rName = lens _rName (\ s a -> s{_rName = a})
rAttributes :: Lens' Resource (HashMap Text Text)
rAttributes = lens _rAttributes (\ s a -> s{_rAttributes = a}) . _Default . _Map
rType :: Lens' Resource (Maybe Text)
rType = lens _rType (\ s a -> s{_rType = a})
instance FromJSON Resource where
parseJSON
= withObject "Resource"
(\ x ->
Resource' <$>
(x .:? "feature") <*> (x .:? "arn") <*>
(x .:? "name")
<*> (x .:? "attributes" .!= mempty)
<*> (x .:? "type"))
instance Hashable Resource where
instance NFData Resource where