module Network.AWS.ElastiCache.Types
(
ElastiCache
, RESTError
, ns
, NodeSnapshot
, nodeSnapshot
, nsCacheNodeCreateTime
, nsCacheNodeId
, nsCacheSize
, nsSnapshotCreateTime
, Snapshot
, snapshot
, sAutoMinorVersionUpgrade
, sCacheClusterCreateTime
, sCacheClusterId
, sCacheNodeType
, sCacheParameterGroupName
, sCacheSubnetGroupName
, sEngine
, sEngineVersion
, sNodeSnapshots
, sNumCacheNodes
, sPort
, sPreferredAvailabilityZone
, sPreferredMaintenanceWindow
, sSnapshotName
, sSnapshotRetentionLimit
, sSnapshotSource
, sSnapshotStatus
, sSnapshotWindow
, sTopicArn
, sVpcId
, Event
, event
, eDate
, eMessage
, eSourceIdentifier
, eSourceType
, NodeGroup
, nodeGroup
, ngNodeGroupId
, ngNodeGroupMembers
, ngPrimaryEndpoint
, ngStatus
, CacheNodeTypeSpecificValue
, cacheNodeTypeSpecificValue
, cntsvCacheNodeType
, cntsvValue
, PendingAutomaticFailoverStatus (..)
, NotificationConfiguration
, notificationConfiguration
, ncTopicArn
, ncTopicStatus
, ReplicationGroupPendingModifiedValues
, replicationGroupPendingModifiedValues
, rgpmvAutomaticFailoverStatus
, rgpmvPrimaryClusterId
, EC2SecurityGroup
, ec2SecurityGroup
, ecsgEC2SecurityGroupName
, ecsgEC2SecurityGroupOwnerId
, ecsgStatus
, ParameterNameValue
, parameterNameValue
, pnvParameterName
, pnvParameterValue
, SourceType (..)
, CacheSubnetGroup
, cacheSubnetGroup
, csgCacheSubnetGroupDescription
, csgCacheSubnetGroupName
, csgSubnets
, csgVpcId
, ReservedCacheNode
, reservedCacheNode
, rcnCacheNodeCount
, rcnCacheNodeType
, rcnDuration
, rcnFixedPrice
, rcnOfferingType
, rcnProductDescription
, rcnRecurringCharges
, rcnReservedCacheNodeId
, rcnReservedCacheNodesOfferingId
, rcnStartTime
, rcnState
, rcnUsagePrice
, Subnet
, subnet
, sSubnetAvailabilityZone
, sSubnetIdentifier
, SecurityGroupMembership
, securityGroupMembership
, sgmSecurityGroupId
, sgmStatus
, CacheCluster
, cacheCluster
, ccAutoMinorVersionUpgrade
, ccCacheClusterCreateTime
, ccCacheClusterId
, ccCacheClusterStatus
, ccCacheNodeType
, ccCacheNodes
, ccCacheParameterGroup
, ccCacheSecurityGroups
, ccCacheSubnetGroupName
, ccClientDownloadLandingPage
, ccConfigurationEndpoint
, ccEngine
, ccEngineVersion
, ccNotificationConfiguration
, ccNumCacheNodes
, ccPendingModifiedValues
, ccPreferredAvailabilityZone
, ccPreferredMaintenanceWindow
, ccReplicationGroupId
, ccSecurityGroups
, ccSnapshotRetentionLimit
, ccSnapshotWindow
, EngineDefaults
, engineDefaults
, edCacheNodeTypeSpecificParameters
, edCacheParameterGroupFamily
, edMarker
, edParameters
, CacheParameterGroupStatus
, cacheParameterGroupStatus
, cpgsCacheNodeIdsToReboot
, cpgsCacheParameterGroupName
, cpgsParameterApplyStatus
, CacheNode
, cacheNode
, cnCacheNodeCreateTime
, cnCacheNodeId
, cnCacheNodeStatus
, cnCustomerAvailabilityZone
, cnEndpoint
, cnParameterGroupStatus
, cnSourceCacheNodeId
, CacheSecurityGroupMembership
, cacheSecurityGroupMembership
, csgmCacheSecurityGroupName
, csgmStatus
, AvailabilityZone
, availabilityZone
, azName
, NodeGroupMember
, nodeGroupMember
, ngmCacheClusterId
, ngmCacheNodeId
, ngmCurrentRole
, ngmPreferredAvailabilityZone
, ngmReadEndpoint
, CacheParameterGroup
, cacheParameterGroup
, cpgCacheParameterGroupFamily
, cpgCacheParameterGroupName
, cpgDescription
, AutomaticFailoverStatus (..)
, CacheSecurityGroup
, cacheSecurityGroup
, csgCacheSecurityGroupName
, csgDescription
, csgEC2SecurityGroups
, csgOwnerId
, CacheNodeTypeSpecificParameter
, cacheNodeTypeSpecificParameter
, cntspAllowedValues
, cntspCacheNodeTypeSpecificValues
, cntspDataType
, cntspDescription
, cntspIsModifiable
, cntspMinimumEngineVersion
, cntspParameterName
, cntspSource
, AZMode (..)
, CacheEngineVersion
, cacheEngineVersion
, cevCacheEngineDescription
, cevCacheEngineVersionDescription
, cevCacheParameterGroupFamily
, cevEngine
, cevEngineVersion
, ReplicationGroup
, replicationGroup
, rgAutomaticFailover
, rgDescription
, rgMemberClusters
, rgNodeGroups
, rgPendingModifiedValues
, rgReplicationGroupId
, rgSnapshottingClusterId
, rgStatus
, RecurringCharge
, recurringCharge
, rcRecurringChargeAmount
, rcRecurringChargeFrequency
, ReservedCacheNodesOffering
, reservedCacheNodesOffering
, rcnoCacheNodeType
, rcnoDuration
, rcnoFixedPrice
, rcnoOfferingType
, rcnoProductDescription
, rcnoRecurringCharges
, rcnoReservedCacheNodesOfferingId
, rcnoUsagePrice
, Endpoint
, endpoint
, eAddress
, ePort
, PendingModifiedValues
, pendingModifiedValues
, pmvCacheNodeIdsToRemove
, pmvEngineVersion
, pmvNumCacheNodes
, CacheParameterGroupNameMessage
, cacheParameterGroupNameMessage
, cpgnmCacheParameterGroupName
, Parameter
, parameter
, pAllowedValues
, pDataType
, pDescription
, pIsModifiable
, pMinimumEngineVersion
, pParameterName
, pParameterValue
, pSource
) where
import Network.AWS.Error
import Network.AWS.Prelude
import Network.AWS.Signing
import qualified GHC.Exts
data ElastiCache
instance AWSService ElastiCache where
type Sg ElastiCache = V4
type Er ElastiCache = RESTError
service = Service
{ _svcAbbrev = "ElastiCache"
, _svcPrefix = "elasticache"
, _svcVersion = "2014-09-30"
, _svcTargetPrefix = Nothing
, _svcJSONVersion = Nothing
}
handle = restError statusSuccess
ns :: Text
ns = "http://elasticache.amazonaws.com/doc/2014-09-30/"
data NodeSnapshot = NodeSnapshot
{ _nsCacheNodeCreateTime :: Maybe ISO8601
, _nsCacheNodeId :: Maybe Text
, _nsCacheSize :: Maybe Text
, _nsSnapshotCreateTime :: Maybe ISO8601
} deriving (Eq, Ord, Show)
nodeSnapshot :: NodeSnapshot
nodeSnapshot = NodeSnapshot
{ _nsCacheNodeId = Nothing
, _nsCacheSize = Nothing
, _nsCacheNodeCreateTime = Nothing
, _nsSnapshotCreateTime = Nothing
}
nsCacheNodeCreateTime :: Lens' NodeSnapshot (Maybe UTCTime)
nsCacheNodeCreateTime =
lens _nsCacheNodeCreateTime (\s a -> s { _nsCacheNodeCreateTime = a })
. mapping _Time
nsCacheNodeId :: Lens' NodeSnapshot (Maybe Text)
nsCacheNodeId = lens _nsCacheNodeId (\s a -> s { _nsCacheNodeId = a })
nsCacheSize :: Lens' NodeSnapshot (Maybe Text)
nsCacheSize = lens _nsCacheSize (\s a -> s { _nsCacheSize = a })
nsSnapshotCreateTime :: Lens' NodeSnapshot (Maybe UTCTime)
nsSnapshotCreateTime =
lens _nsSnapshotCreateTime (\s a -> s { _nsSnapshotCreateTime = a })
. mapping _Time
instance FromXML NodeSnapshot where
parseXML x = NodeSnapshot
<$> x .@? "CacheNodeCreateTime"
<*> x .@? "CacheNodeId"
<*> x .@? "CacheSize"
<*> x .@? "SnapshotCreateTime"
instance ToQuery NodeSnapshot where
toQuery NodeSnapshot{..} = mconcat
[ "CacheNodeCreateTime" =? _nsCacheNodeCreateTime
, "CacheNodeId" =? _nsCacheNodeId
, "CacheSize" =? _nsCacheSize
, "SnapshotCreateTime" =? _nsSnapshotCreateTime
]
data Snapshot = Snapshot
{ _sAutoMinorVersionUpgrade :: Maybe Bool
, _sCacheClusterCreateTime :: Maybe ISO8601
, _sCacheClusterId :: Maybe Text
, _sCacheNodeType :: Maybe Text
, _sCacheParameterGroupName :: Maybe Text
, _sCacheSubnetGroupName :: Maybe Text
, _sEngine :: Maybe Text
, _sEngineVersion :: Maybe Text
, _sNodeSnapshots :: List "member" NodeSnapshot
, _sNumCacheNodes :: Maybe Int
, _sPort :: Maybe Int
, _sPreferredAvailabilityZone :: Maybe Text
, _sPreferredMaintenanceWindow :: Maybe Text
, _sSnapshotName :: Maybe Text
, _sSnapshotRetentionLimit :: Maybe Int
, _sSnapshotSource :: Maybe Text
, _sSnapshotStatus :: Maybe Text
, _sSnapshotWindow :: Maybe Text
, _sTopicArn :: Maybe Text
, _sVpcId :: Maybe Text
} deriving (Eq, Show)
snapshot :: Snapshot
snapshot = Snapshot
{ _sSnapshotName = Nothing
, _sCacheClusterId = Nothing
, _sSnapshotStatus = Nothing
, _sSnapshotSource = Nothing
, _sCacheNodeType = Nothing
, _sEngine = Nothing
, _sEngineVersion = Nothing
, _sNumCacheNodes = Nothing
, _sPreferredAvailabilityZone = Nothing
, _sCacheClusterCreateTime = Nothing
, _sPreferredMaintenanceWindow = Nothing
, _sTopicArn = Nothing
, _sPort = Nothing
, _sCacheParameterGroupName = Nothing
, _sCacheSubnetGroupName = Nothing
, _sVpcId = Nothing
, _sAutoMinorVersionUpgrade = Nothing
, _sSnapshotRetentionLimit = Nothing
, _sSnapshotWindow = Nothing
, _sNodeSnapshots = mempty
}
sAutoMinorVersionUpgrade :: Lens' Snapshot (Maybe Bool)
sAutoMinorVersionUpgrade =
lens _sAutoMinorVersionUpgrade
(\s a -> s { _sAutoMinorVersionUpgrade = a })
sCacheClusterCreateTime :: Lens' Snapshot (Maybe UTCTime)
sCacheClusterCreateTime =
lens _sCacheClusterCreateTime (\s a -> s { _sCacheClusterCreateTime = a })
. mapping _Time
sCacheClusterId :: Lens' Snapshot (Maybe Text)
sCacheClusterId = lens _sCacheClusterId (\s a -> s { _sCacheClusterId = a })
sCacheNodeType :: Lens' Snapshot (Maybe Text)
sCacheNodeType = lens _sCacheNodeType (\s a -> s { _sCacheNodeType = a })
sCacheParameterGroupName :: Lens' Snapshot (Maybe Text)
sCacheParameterGroupName =
lens _sCacheParameterGroupName
(\s a -> s { _sCacheParameterGroupName = a })
sCacheSubnetGroupName :: Lens' Snapshot (Maybe Text)
sCacheSubnetGroupName =
lens _sCacheSubnetGroupName (\s a -> s { _sCacheSubnetGroupName = a })
sEngine :: Lens' Snapshot (Maybe Text)
sEngine = lens _sEngine (\s a -> s { _sEngine = a })
sEngineVersion :: Lens' Snapshot (Maybe Text)
sEngineVersion = lens _sEngineVersion (\s a -> s { _sEngineVersion = a })
sNodeSnapshots :: Lens' Snapshot [NodeSnapshot]
sNodeSnapshots = lens _sNodeSnapshots (\s a -> s { _sNodeSnapshots = a }) . _List
sNumCacheNodes :: Lens' Snapshot (Maybe Int)
sNumCacheNodes = lens _sNumCacheNodes (\s a -> s { _sNumCacheNodes = a })
sPort :: Lens' Snapshot (Maybe Int)
sPort = lens _sPort (\s a -> s { _sPort = a })
sPreferredAvailabilityZone :: Lens' Snapshot (Maybe Text)
sPreferredAvailabilityZone =
lens _sPreferredAvailabilityZone
(\s a -> s { _sPreferredAvailabilityZone = a })
sPreferredMaintenanceWindow :: Lens' Snapshot (Maybe Text)
sPreferredMaintenanceWindow =
lens _sPreferredMaintenanceWindow
(\s a -> s { _sPreferredMaintenanceWindow = a })
sSnapshotName :: Lens' Snapshot (Maybe Text)
sSnapshotName = lens _sSnapshotName (\s a -> s { _sSnapshotName = a })
sSnapshotRetentionLimit :: Lens' Snapshot (Maybe Int)
sSnapshotRetentionLimit =
lens _sSnapshotRetentionLimit (\s a -> s { _sSnapshotRetentionLimit = a })
sSnapshotSource :: Lens' Snapshot (Maybe Text)
sSnapshotSource = lens _sSnapshotSource (\s a -> s { _sSnapshotSource = a })
sSnapshotStatus :: Lens' Snapshot (Maybe Text)
sSnapshotStatus = lens _sSnapshotStatus (\s a -> s { _sSnapshotStatus = a })
sSnapshotWindow :: Lens' Snapshot (Maybe Text)
sSnapshotWindow = lens _sSnapshotWindow (\s a -> s { _sSnapshotWindow = a })
sTopicArn :: Lens' Snapshot (Maybe Text)
sTopicArn = lens _sTopicArn (\s a -> s { _sTopicArn = a })
sVpcId :: Lens' Snapshot (Maybe Text)
sVpcId = lens _sVpcId (\s a -> s { _sVpcId = a })
instance FromXML Snapshot where
parseXML x = Snapshot
<$> x .@? "AutoMinorVersionUpgrade"
<*> x .@? "CacheClusterCreateTime"
<*> x .@? "CacheClusterId"
<*> x .@? "CacheNodeType"
<*> x .@? "CacheParameterGroupName"
<*> x .@? "CacheSubnetGroupName"
<*> x .@? "Engine"
<*> x .@? "EngineVersion"
<*> x .@? "NodeSnapshots" .!@ mempty
<*> x .@? "NumCacheNodes"
<*> x .@? "Port"
<*> x .@? "PreferredAvailabilityZone"
<*> x .@? "PreferredMaintenanceWindow"
<*> x .@? "SnapshotName"
<*> x .@? "SnapshotRetentionLimit"
<*> x .@? "SnapshotSource"
<*> x .@? "SnapshotStatus"
<*> x .@? "SnapshotWindow"
<*> x .@? "TopicArn"
<*> x .@? "VpcId"
instance ToQuery Snapshot where
toQuery Snapshot{..} = mconcat
[ "AutoMinorVersionUpgrade" =? _sAutoMinorVersionUpgrade
, "CacheClusterCreateTime" =? _sCacheClusterCreateTime
, "CacheClusterId" =? _sCacheClusterId
, "CacheNodeType" =? _sCacheNodeType
, "CacheParameterGroupName" =? _sCacheParameterGroupName
, "CacheSubnetGroupName" =? _sCacheSubnetGroupName
, "Engine" =? _sEngine
, "EngineVersion" =? _sEngineVersion
, "NodeSnapshots" =? _sNodeSnapshots
, "NumCacheNodes" =? _sNumCacheNodes
, "Port" =? _sPort
, "PreferredAvailabilityZone" =? _sPreferredAvailabilityZone
, "PreferredMaintenanceWindow" =? _sPreferredMaintenanceWindow
, "SnapshotName" =? _sSnapshotName
, "SnapshotRetentionLimit" =? _sSnapshotRetentionLimit
, "SnapshotSource" =? _sSnapshotSource
, "SnapshotStatus" =? _sSnapshotStatus
, "SnapshotWindow" =? _sSnapshotWindow
, "TopicArn" =? _sTopicArn
, "VpcId" =? _sVpcId
]
data Event = Event
{ _eDate :: Maybe ISO8601
, _eMessage :: Maybe Text
, _eSourceIdentifier :: Maybe Text
, _eSourceType :: Maybe SourceType
} deriving (Eq, Show)
event :: Event
event = Event
{ _eSourceIdentifier = Nothing
, _eSourceType = Nothing
, _eMessage = Nothing
, _eDate = Nothing
}
eDate :: Lens' Event (Maybe UTCTime)
eDate = lens _eDate (\s a -> s { _eDate = a }) . mapping _Time
eMessage :: Lens' Event (Maybe Text)
eMessage = lens _eMessage (\s a -> s { _eMessage = a })
eSourceIdentifier :: Lens' Event (Maybe Text)
eSourceIdentifier =
lens _eSourceIdentifier (\s a -> s { _eSourceIdentifier = a })
eSourceType :: Lens' Event (Maybe SourceType)
eSourceType = lens _eSourceType (\s a -> s { _eSourceType = a })
instance FromXML Event where
parseXML x = Event
<$> x .@? "Date"
<*> x .@? "Message"
<*> x .@? "SourceIdentifier"
<*> x .@? "SourceType"
instance ToQuery Event where
toQuery Event{..} = mconcat
[ "Date" =? _eDate
, "Message" =? _eMessage
, "SourceIdentifier" =? _eSourceIdentifier
, "SourceType" =? _eSourceType
]
data NodeGroup = NodeGroup
{ _ngNodeGroupId :: Maybe Text
, _ngNodeGroupMembers :: List "member" NodeGroupMember
, _ngPrimaryEndpoint :: Maybe Endpoint
, _ngStatus :: Maybe Text
} deriving (Eq, Show)
nodeGroup :: NodeGroup
nodeGroup = NodeGroup
{ _ngNodeGroupId = Nothing
, _ngStatus = Nothing
, _ngPrimaryEndpoint = Nothing
, _ngNodeGroupMembers = mempty
}
ngNodeGroupId :: Lens' NodeGroup (Maybe Text)
ngNodeGroupId = lens _ngNodeGroupId (\s a -> s { _ngNodeGroupId = a })
ngNodeGroupMembers :: Lens' NodeGroup [NodeGroupMember]
ngNodeGroupMembers =
lens _ngNodeGroupMembers (\s a -> s { _ngNodeGroupMembers = a })
. _List
ngPrimaryEndpoint :: Lens' NodeGroup (Maybe Endpoint)
ngPrimaryEndpoint =
lens _ngPrimaryEndpoint (\s a -> s { _ngPrimaryEndpoint = a })
ngStatus :: Lens' NodeGroup (Maybe Text)
ngStatus = lens _ngStatus (\s a -> s { _ngStatus = a })
instance FromXML NodeGroup where
parseXML x = NodeGroup
<$> x .@? "NodeGroupId"
<*> x .@? "NodeGroupMembers" .!@ mempty
<*> x .@? "PrimaryEndpoint"
<*> x .@? "Status"
instance ToQuery NodeGroup where
toQuery NodeGroup{..} = mconcat
[ "NodeGroupId" =? _ngNodeGroupId
, "NodeGroupMembers" =? _ngNodeGroupMembers
, "PrimaryEndpoint" =? _ngPrimaryEndpoint
, "Status" =? _ngStatus
]
data CacheNodeTypeSpecificValue = CacheNodeTypeSpecificValue
{ _cntsvCacheNodeType :: Maybe Text
, _cntsvValue :: Maybe Text
} deriving (Eq, Ord, Show)
cacheNodeTypeSpecificValue :: CacheNodeTypeSpecificValue
cacheNodeTypeSpecificValue = CacheNodeTypeSpecificValue
{ _cntsvCacheNodeType = Nothing
, _cntsvValue = Nothing
}
cntsvCacheNodeType :: Lens' CacheNodeTypeSpecificValue (Maybe Text)
cntsvCacheNodeType =
lens _cntsvCacheNodeType (\s a -> s { _cntsvCacheNodeType = a })
cntsvValue :: Lens' CacheNodeTypeSpecificValue (Maybe Text)
cntsvValue = lens _cntsvValue (\s a -> s { _cntsvValue = a })
instance FromXML CacheNodeTypeSpecificValue where
parseXML x = CacheNodeTypeSpecificValue
<$> x .@? "CacheNodeType"
<*> x .@? "Value"
instance ToQuery CacheNodeTypeSpecificValue where
toQuery CacheNodeTypeSpecificValue{..} = mconcat
[ "CacheNodeType" =? _cntsvCacheNodeType
, "Value" =? _cntsvValue
]
data PendingAutomaticFailoverStatus
= Disabled
| Enabled
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable PendingAutomaticFailoverStatus
instance FromText PendingAutomaticFailoverStatus where
parser = takeText >>= \case
"disabled" -> pure Disabled
"enabled" -> pure Enabled
e -> fail $
"Failure parsing PendingAutomaticFailoverStatus from " ++ show e
instance ToText PendingAutomaticFailoverStatus where
toText = \case
Disabled -> "disabled"
Enabled -> "enabled"
instance ToByteString PendingAutomaticFailoverStatus
instance ToHeader PendingAutomaticFailoverStatus
instance ToQuery PendingAutomaticFailoverStatus
instance FromXML PendingAutomaticFailoverStatus where
parseXML = parseXMLText "PendingAutomaticFailoverStatus"
data NotificationConfiguration = NotificationConfiguration
{ _ncTopicArn :: Maybe Text
, _ncTopicStatus :: Maybe Text
} deriving (Eq, Ord, Show)
notificationConfiguration :: NotificationConfiguration
notificationConfiguration = NotificationConfiguration
{ _ncTopicArn = Nothing
, _ncTopicStatus = Nothing
}
ncTopicArn :: Lens' NotificationConfiguration (Maybe Text)
ncTopicArn = lens _ncTopicArn (\s a -> s { _ncTopicArn = a })
ncTopicStatus :: Lens' NotificationConfiguration (Maybe Text)
ncTopicStatus = lens _ncTopicStatus (\s a -> s { _ncTopicStatus = a })
instance FromXML NotificationConfiguration where
parseXML x = NotificationConfiguration
<$> x .@? "TopicArn"
<*> x .@? "TopicStatus"
instance ToQuery NotificationConfiguration where
toQuery NotificationConfiguration{..} = mconcat
[ "TopicArn" =? _ncTopicArn
, "TopicStatus" =? _ncTopicStatus
]
data ReplicationGroupPendingModifiedValues = ReplicationGroupPendingModifiedValues
{ _rgpmvAutomaticFailoverStatus :: Maybe PendingAutomaticFailoverStatus
, _rgpmvPrimaryClusterId :: Maybe Text
} deriving (Eq, Show)
replicationGroupPendingModifiedValues :: ReplicationGroupPendingModifiedValues
replicationGroupPendingModifiedValues = ReplicationGroupPendingModifiedValues
{ _rgpmvPrimaryClusterId = Nothing
, _rgpmvAutomaticFailoverStatus = Nothing
}
rgpmvAutomaticFailoverStatus :: Lens' ReplicationGroupPendingModifiedValues (Maybe PendingAutomaticFailoverStatus)
rgpmvAutomaticFailoverStatus =
lens _rgpmvAutomaticFailoverStatus
(\s a -> s { _rgpmvAutomaticFailoverStatus = a })
rgpmvPrimaryClusterId :: Lens' ReplicationGroupPendingModifiedValues (Maybe Text)
rgpmvPrimaryClusterId =
lens _rgpmvPrimaryClusterId (\s a -> s { _rgpmvPrimaryClusterId = a })
instance FromXML ReplicationGroupPendingModifiedValues where
parseXML x = ReplicationGroupPendingModifiedValues
<$> x .@? "AutomaticFailoverStatus"
<*> x .@? "PrimaryClusterId"
instance ToQuery ReplicationGroupPendingModifiedValues where
toQuery ReplicationGroupPendingModifiedValues{..} = mconcat
[ "AutomaticFailoverStatus" =? _rgpmvAutomaticFailoverStatus
, "PrimaryClusterId" =? _rgpmvPrimaryClusterId
]
data EC2SecurityGroup = EC2SecurityGroup
{ _ecsgEC2SecurityGroupName :: Maybe Text
, _ecsgEC2SecurityGroupOwnerId :: Maybe Text
, _ecsgStatus :: Maybe Text
} deriving (Eq, Ord, Show)
ec2SecurityGroup :: EC2SecurityGroup
ec2SecurityGroup = EC2SecurityGroup
{ _ecsgStatus = Nothing
, _ecsgEC2SecurityGroupName = Nothing
, _ecsgEC2SecurityGroupOwnerId = Nothing
}
ecsgEC2SecurityGroupName :: Lens' EC2SecurityGroup (Maybe Text)
ecsgEC2SecurityGroupName =
lens _ecsgEC2SecurityGroupName
(\s a -> s { _ecsgEC2SecurityGroupName = a })
ecsgEC2SecurityGroupOwnerId :: Lens' EC2SecurityGroup (Maybe Text)
ecsgEC2SecurityGroupOwnerId =
lens _ecsgEC2SecurityGroupOwnerId
(\s a -> s { _ecsgEC2SecurityGroupOwnerId = a })
ecsgStatus :: Lens' EC2SecurityGroup (Maybe Text)
ecsgStatus = lens _ecsgStatus (\s a -> s { _ecsgStatus = a })
instance FromXML EC2SecurityGroup where
parseXML x = EC2SecurityGroup
<$> x .@? "EC2SecurityGroupName"
<*> x .@? "EC2SecurityGroupOwnerId"
<*> x .@? "Status"
instance ToQuery EC2SecurityGroup where
toQuery EC2SecurityGroup{..} = mconcat
[ "EC2SecurityGroupName" =? _ecsgEC2SecurityGroupName
, "EC2SecurityGroupOwnerId" =? _ecsgEC2SecurityGroupOwnerId
, "Status" =? _ecsgStatus
]
data ParameterNameValue = ParameterNameValue
{ _pnvParameterName :: Maybe Text
, _pnvParameterValue :: Maybe Text
} deriving (Eq, Ord, Show)
parameterNameValue :: ParameterNameValue
parameterNameValue = ParameterNameValue
{ _pnvParameterName = Nothing
, _pnvParameterValue = Nothing
}
pnvParameterName :: Lens' ParameterNameValue (Maybe Text)
pnvParameterName = lens _pnvParameterName (\s a -> s { _pnvParameterName = a })
pnvParameterValue :: Lens' ParameterNameValue (Maybe Text)
pnvParameterValue =
lens _pnvParameterValue (\s a -> s { _pnvParameterValue = a })
instance FromXML ParameterNameValue where
parseXML x = ParameterNameValue
<$> x .@? "ParameterName"
<*> x .@? "ParameterValue"
instance ToQuery ParameterNameValue where
toQuery ParameterNameValue{..} = mconcat
[ "ParameterName" =? _pnvParameterName
, "ParameterValue" =? _pnvParameterValue
]
data SourceType
= STCacheCluster
| STCacheParameterGroup
| STCacheSecurityGroup
| STCacheSubnetGroup
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable SourceType
instance FromText SourceType where
parser = takeText >>= \case
"cache-cluster" -> pure STCacheCluster
"cache-parameter-group" -> pure STCacheParameterGroup
"cache-security-group" -> pure STCacheSecurityGroup
"cache-subnet-group" -> pure STCacheSubnetGroup
e -> fail $
"Failure parsing SourceType from " ++ show e
instance ToText SourceType where
toText = \case
STCacheCluster -> "cache-cluster"
STCacheParameterGroup -> "cache-parameter-group"
STCacheSecurityGroup -> "cache-security-group"
STCacheSubnetGroup -> "cache-subnet-group"
instance ToByteString SourceType
instance ToHeader SourceType
instance ToQuery SourceType
instance FromXML SourceType where
parseXML = parseXMLText "SourceType"
data CacheSubnetGroup = CacheSubnetGroup
{ _csgCacheSubnetGroupDescription :: Maybe Text
, _csgCacheSubnetGroupName :: Maybe Text
, _csgSubnets :: List "member" Subnet
, _csgVpcId :: Maybe Text
} deriving (Eq, Show)
cacheSubnetGroup :: CacheSubnetGroup
cacheSubnetGroup = CacheSubnetGroup
{ _csgCacheSubnetGroupName = Nothing
, _csgCacheSubnetGroupDescription = Nothing
, _csgVpcId = Nothing
, _csgSubnets = mempty
}
csgCacheSubnetGroupDescription :: Lens' CacheSubnetGroup (Maybe Text)
csgCacheSubnetGroupDescription =
lens _csgCacheSubnetGroupDescription
(\s a -> s { _csgCacheSubnetGroupDescription = a })
csgCacheSubnetGroupName :: Lens' CacheSubnetGroup (Maybe Text)
csgCacheSubnetGroupName =
lens _csgCacheSubnetGroupName (\s a -> s { _csgCacheSubnetGroupName = a })
csgSubnets :: Lens' CacheSubnetGroup [Subnet]
csgSubnets = lens _csgSubnets (\s a -> s { _csgSubnets = a }) . _List
csgVpcId :: Lens' CacheSubnetGroup (Maybe Text)
csgVpcId = lens _csgVpcId (\s a -> s { _csgVpcId = a })
instance FromXML CacheSubnetGroup where
parseXML x = CacheSubnetGroup
<$> x .@? "CacheSubnetGroupDescription"
<*> x .@? "CacheSubnetGroupName"
<*> x .@? "Subnets" .!@ mempty
<*> x .@? "VpcId"
instance ToQuery CacheSubnetGroup where
toQuery CacheSubnetGroup{..} = mconcat
[ "CacheSubnetGroupDescription" =? _csgCacheSubnetGroupDescription
, "CacheSubnetGroupName" =? _csgCacheSubnetGroupName
, "Subnets" =? _csgSubnets
, "VpcId" =? _csgVpcId
]
data ReservedCacheNode = ReservedCacheNode
{ _rcnCacheNodeCount :: Maybe Int
, _rcnCacheNodeType :: Maybe Text
, _rcnDuration :: Maybe Int
, _rcnFixedPrice :: Maybe Double
, _rcnOfferingType :: Maybe Text
, _rcnProductDescription :: Maybe Text
, _rcnRecurringCharges :: List "member" RecurringCharge
, _rcnReservedCacheNodeId :: Maybe Text
, _rcnReservedCacheNodesOfferingId :: Maybe Text
, _rcnStartTime :: Maybe ISO8601
, _rcnState :: Maybe Text
, _rcnUsagePrice :: Maybe Double
} deriving (Eq, Show)
reservedCacheNode :: ReservedCacheNode
reservedCacheNode = ReservedCacheNode
{ _rcnReservedCacheNodeId = Nothing
, _rcnReservedCacheNodesOfferingId = Nothing
, _rcnCacheNodeType = Nothing
, _rcnStartTime = Nothing
, _rcnDuration = Nothing
, _rcnFixedPrice = Nothing
, _rcnUsagePrice = Nothing
, _rcnCacheNodeCount = Nothing
, _rcnProductDescription = Nothing
, _rcnOfferingType = Nothing
, _rcnState = Nothing
, _rcnRecurringCharges = mempty
}
rcnCacheNodeCount :: Lens' ReservedCacheNode (Maybe Int)
rcnCacheNodeCount =
lens _rcnCacheNodeCount (\s a -> s { _rcnCacheNodeCount = a })
rcnCacheNodeType :: Lens' ReservedCacheNode (Maybe Text)
rcnCacheNodeType = lens _rcnCacheNodeType (\s a -> s { _rcnCacheNodeType = a })
rcnDuration :: Lens' ReservedCacheNode (Maybe Int)
rcnDuration = lens _rcnDuration (\s a -> s { _rcnDuration = a })
rcnFixedPrice :: Lens' ReservedCacheNode (Maybe Double)
rcnFixedPrice = lens _rcnFixedPrice (\s a -> s { _rcnFixedPrice = a })
rcnOfferingType :: Lens' ReservedCacheNode (Maybe Text)
rcnOfferingType = lens _rcnOfferingType (\s a -> s { _rcnOfferingType = a })
rcnProductDescription :: Lens' ReservedCacheNode (Maybe Text)
rcnProductDescription =
lens _rcnProductDescription (\s a -> s { _rcnProductDescription = a })
rcnRecurringCharges :: Lens' ReservedCacheNode [RecurringCharge]
rcnRecurringCharges =
lens _rcnRecurringCharges (\s a -> s { _rcnRecurringCharges = a })
. _List
rcnReservedCacheNodeId :: Lens' ReservedCacheNode (Maybe Text)
rcnReservedCacheNodeId =
lens _rcnReservedCacheNodeId (\s a -> s { _rcnReservedCacheNodeId = a })
rcnReservedCacheNodesOfferingId :: Lens' ReservedCacheNode (Maybe Text)
rcnReservedCacheNodesOfferingId =
lens _rcnReservedCacheNodesOfferingId
(\s a -> s { _rcnReservedCacheNodesOfferingId = a })
rcnStartTime :: Lens' ReservedCacheNode (Maybe UTCTime)
rcnStartTime = lens _rcnStartTime (\s a -> s { _rcnStartTime = a }) . mapping _Time
rcnState :: Lens' ReservedCacheNode (Maybe Text)
rcnState = lens _rcnState (\s a -> s { _rcnState = a })
rcnUsagePrice :: Lens' ReservedCacheNode (Maybe Double)
rcnUsagePrice = lens _rcnUsagePrice (\s a -> s { _rcnUsagePrice = a })
instance FromXML ReservedCacheNode where
parseXML x = ReservedCacheNode
<$> x .@? "CacheNodeCount"
<*> x .@? "CacheNodeType"
<*> x .@? "Duration"
<*> x .@? "FixedPrice"
<*> x .@? "OfferingType"
<*> x .@? "ProductDescription"
<*> x .@? "RecurringCharges" .!@ mempty
<*> x .@? "ReservedCacheNodeId"
<*> x .@? "ReservedCacheNodesOfferingId"
<*> x .@? "StartTime"
<*> x .@? "State"
<*> x .@? "UsagePrice"
instance ToQuery ReservedCacheNode where
toQuery ReservedCacheNode{..} = mconcat
[ "CacheNodeCount" =? _rcnCacheNodeCount
, "CacheNodeType" =? _rcnCacheNodeType
, "Duration" =? _rcnDuration
, "FixedPrice" =? _rcnFixedPrice
, "OfferingType" =? _rcnOfferingType
, "ProductDescription" =? _rcnProductDescription
, "RecurringCharges" =? _rcnRecurringCharges
, "ReservedCacheNodeId" =? _rcnReservedCacheNodeId
, "ReservedCacheNodesOfferingId" =? _rcnReservedCacheNodesOfferingId
, "StartTime" =? _rcnStartTime
, "State" =? _rcnState
, "UsagePrice" =? _rcnUsagePrice
]
data Subnet = Subnet
{ _sSubnetAvailabilityZone :: Maybe AvailabilityZone
, _sSubnetIdentifier :: Maybe Text
} deriving (Eq, Show)
subnet :: Subnet
subnet = Subnet
{ _sSubnetIdentifier = Nothing
, _sSubnetAvailabilityZone = Nothing
}
sSubnetAvailabilityZone :: Lens' Subnet (Maybe AvailabilityZone)
sSubnetAvailabilityZone =
lens _sSubnetAvailabilityZone (\s a -> s { _sSubnetAvailabilityZone = a })
sSubnetIdentifier :: Lens' Subnet (Maybe Text)
sSubnetIdentifier =
lens _sSubnetIdentifier (\s a -> s { _sSubnetIdentifier = a })
instance FromXML Subnet where
parseXML x = Subnet
<$> x .@? "SubnetAvailabilityZone"
<*> x .@? "SubnetIdentifier"
instance ToQuery Subnet where
toQuery Subnet{..} = mconcat
[ "SubnetAvailabilityZone" =? _sSubnetAvailabilityZone
, "SubnetIdentifier" =? _sSubnetIdentifier
]
data SecurityGroupMembership = SecurityGroupMembership
{ _sgmSecurityGroupId :: Maybe Text
, _sgmStatus :: Maybe Text
} deriving (Eq, Ord, Show)
securityGroupMembership :: SecurityGroupMembership
securityGroupMembership = SecurityGroupMembership
{ _sgmSecurityGroupId = Nothing
, _sgmStatus = Nothing
}
sgmSecurityGroupId :: Lens' SecurityGroupMembership (Maybe Text)
sgmSecurityGroupId =
lens _sgmSecurityGroupId (\s a -> s { _sgmSecurityGroupId = a })
sgmStatus :: Lens' SecurityGroupMembership (Maybe Text)
sgmStatus = lens _sgmStatus (\s a -> s { _sgmStatus = a })
instance FromXML SecurityGroupMembership where
parseXML x = SecurityGroupMembership
<$> x .@? "SecurityGroupId"
<*> x .@? "Status"
instance ToQuery SecurityGroupMembership where
toQuery SecurityGroupMembership{..} = mconcat
[ "SecurityGroupId" =? _sgmSecurityGroupId
, "Status" =? _sgmStatus
]
data CacheCluster = CacheCluster
{ _ccAutoMinorVersionUpgrade :: Maybe Bool
, _ccCacheClusterCreateTime :: Maybe ISO8601
, _ccCacheClusterId :: Maybe Text
, _ccCacheClusterStatus :: Maybe Text
, _ccCacheNodeType :: Maybe Text
, _ccCacheNodes :: List "member" CacheNode
, _ccCacheParameterGroup :: Maybe CacheParameterGroupStatus
, _ccCacheSecurityGroups :: List "member" CacheSecurityGroupMembership
, _ccCacheSubnetGroupName :: Maybe Text
, _ccClientDownloadLandingPage :: Maybe Text
, _ccConfigurationEndpoint :: Maybe Endpoint
, _ccEngine :: Maybe Text
, _ccEngineVersion :: Maybe Text
, _ccNotificationConfiguration :: Maybe NotificationConfiguration
, _ccNumCacheNodes :: Maybe Int
, _ccPendingModifiedValues :: Maybe PendingModifiedValues
, _ccPreferredAvailabilityZone :: Maybe Text
, _ccPreferredMaintenanceWindow :: Maybe Text
, _ccReplicationGroupId :: Maybe Text
, _ccSecurityGroups :: List "member" SecurityGroupMembership
, _ccSnapshotRetentionLimit :: Maybe Int
, _ccSnapshotWindow :: Maybe Text
} deriving (Eq, Show)
cacheCluster :: CacheCluster
cacheCluster = CacheCluster
{ _ccCacheClusterId = Nothing
, _ccConfigurationEndpoint = Nothing
, _ccClientDownloadLandingPage = Nothing
, _ccCacheNodeType = Nothing
, _ccEngine = Nothing
, _ccEngineVersion = Nothing
, _ccCacheClusterStatus = Nothing
, _ccNumCacheNodes = Nothing
, _ccPreferredAvailabilityZone = Nothing
, _ccCacheClusterCreateTime = Nothing
, _ccPreferredMaintenanceWindow = Nothing
, _ccPendingModifiedValues = Nothing
, _ccNotificationConfiguration = Nothing
, _ccCacheSecurityGroups = mempty
, _ccCacheParameterGroup = Nothing
, _ccCacheSubnetGroupName = Nothing
, _ccCacheNodes = mempty
, _ccAutoMinorVersionUpgrade = Nothing
, _ccSecurityGroups = mempty
, _ccReplicationGroupId = Nothing
, _ccSnapshotRetentionLimit = Nothing
, _ccSnapshotWindow = Nothing
}
ccAutoMinorVersionUpgrade :: Lens' CacheCluster (Maybe Bool)
ccAutoMinorVersionUpgrade =
lens _ccAutoMinorVersionUpgrade
(\s a -> s { _ccAutoMinorVersionUpgrade = a })
ccCacheClusterCreateTime :: Lens' CacheCluster (Maybe UTCTime)
ccCacheClusterCreateTime =
lens _ccCacheClusterCreateTime
(\s a -> s { _ccCacheClusterCreateTime = a })
. mapping _Time
ccCacheClusterId :: Lens' CacheCluster (Maybe Text)
ccCacheClusterId = lens _ccCacheClusterId (\s a -> s { _ccCacheClusterId = a })
ccCacheClusterStatus :: Lens' CacheCluster (Maybe Text)
ccCacheClusterStatus =
lens _ccCacheClusterStatus (\s a -> s { _ccCacheClusterStatus = a })
ccCacheNodeType :: Lens' CacheCluster (Maybe Text)
ccCacheNodeType = lens _ccCacheNodeType (\s a -> s { _ccCacheNodeType = a })
ccCacheNodes :: Lens' CacheCluster [CacheNode]
ccCacheNodes = lens _ccCacheNodes (\s a -> s { _ccCacheNodes = a }) . _List
ccCacheParameterGroup :: Lens' CacheCluster (Maybe CacheParameterGroupStatus)
ccCacheParameterGroup =
lens _ccCacheParameterGroup (\s a -> s { _ccCacheParameterGroup = a })
ccCacheSecurityGroups :: Lens' CacheCluster [CacheSecurityGroupMembership]
ccCacheSecurityGroups =
lens _ccCacheSecurityGroups (\s a -> s { _ccCacheSecurityGroups = a })
. _List
ccCacheSubnetGroupName :: Lens' CacheCluster (Maybe Text)
ccCacheSubnetGroupName =
lens _ccCacheSubnetGroupName (\s a -> s { _ccCacheSubnetGroupName = a })
ccClientDownloadLandingPage :: Lens' CacheCluster (Maybe Text)
ccClientDownloadLandingPage =
lens _ccClientDownloadLandingPage
(\s a -> s { _ccClientDownloadLandingPage = a })
ccConfigurationEndpoint :: Lens' CacheCluster (Maybe Endpoint)
ccConfigurationEndpoint =
lens _ccConfigurationEndpoint (\s a -> s { _ccConfigurationEndpoint = a })
ccEngine :: Lens' CacheCluster (Maybe Text)
ccEngine = lens _ccEngine (\s a -> s { _ccEngine = a })
ccEngineVersion :: Lens' CacheCluster (Maybe Text)
ccEngineVersion = lens _ccEngineVersion (\s a -> s { _ccEngineVersion = a })
ccNotificationConfiguration :: Lens' CacheCluster (Maybe NotificationConfiguration)
ccNotificationConfiguration =
lens _ccNotificationConfiguration
(\s a -> s { _ccNotificationConfiguration = a })
ccNumCacheNodes :: Lens' CacheCluster (Maybe Int)
ccNumCacheNodes = lens _ccNumCacheNodes (\s a -> s { _ccNumCacheNodes = a })
ccPendingModifiedValues :: Lens' CacheCluster (Maybe PendingModifiedValues)
ccPendingModifiedValues =
lens _ccPendingModifiedValues (\s a -> s { _ccPendingModifiedValues = a })
ccPreferredAvailabilityZone :: Lens' CacheCluster (Maybe Text)
ccPreferredAvailabilityZone =
lens _ccPreferredAvailabilityZone
(\s a -> s { _ccPreferredAvailabilityZone = a })
ccPreferredMaintenanceWindow :: Lens' CacheCluster (Maybe Text)
ccPreferredMaintenanceWindow =
lens _ccPreferredMaintenanceWindow
(\s a -> s { _ccPreferredMaintenanceWindow = a })
ccReplicationGroupId :: Lens' CacheCluster (Maybe Text)
ccReplicationGroupId =
lens _ccReplicationGroupId (\s a -> s { _ccReplicationGroupId = a })
ccSecurityGroups :: Lens' CacheCluster [SecurityGroupMembership]
ccSecurityGroups = lens _ccSecurityGroups (\s a -> s { _ccSecurityGroups = a }) . _List
ccSnapshotRetentionLimit :: Lens' CacheCluster (Maybe Int)
ccSnapshotRetentionLimit =
lens _ccSnapshotRetentionLimit
(\s a -> s { _ccSnapshotRetentionLimit = a })
ccSnapshotWindow :: Lens' CacheCluster (Maybe Text)
ccSnapshotWindow = lens _ccSnapshotWindow (\s a -> s { _ccSnapshotWindow = a })
instance FromXML CacheCluster where
parseXML x = CacheCluster
<$> x .@? "AutoMinorVersionUpgrade"
<*> x .@? "CacheClusterCreateTime"
<*> x .@? "CacheClusterId"
<*> x .@? "CacheClusterStatus"
<*> x .@? "CacheNodeType"
<*> x .@? "CacheNodes" .!@ mempty
<*> x .@? "CacheParameterGroup"
<*> x .@? "CacheSecurityGroups" .!@ mempty
<*> x .@? "CacheSubnetGroupName"
<*> x .@? "ClientDownloadLandingPage"
<*> x .@? "ConfigurationEndpoint"
<*> x .@? "Engine"
<*> x .@? "EngineVersion"
<*> x .@? "NotificationConfiguration"
<*> x .@? "NumCacheNodes"
<*> x .@? "PendingModifiedValues"
<*> x .@? "PreferredAvailabilityZone"
<*> x .@? "PreferredMaintenanceWindow"
<*> x .@? "ReplicationGroupId"
<*> x .@? "SecurityGroups" .!@ mempty
<*> x .@? "SnapshotRetentionLimit"
<*> x .@? "SnapshotWindow"
instance ToQuery CacheCluster where
toQuery CacheCluster{..} = mconcat
[ "AutoMinorVersionUpgrade" =? _ccAutoMinorVersionUpgrade
, "CacheClusterCreateTime" =? _ccCacheClusterCreateTime
, "CacheClusterId" =? _ccCacheClusterId
, "CacheClusterStatus" =? _ccCacheClusterStatus
, "CacheNodeType" =? _ccCacheNodeType
, "CacheNodes" =? _ccCacheNodes
, "CacheParameterGroup" =? _ccCacheParameterGroup
, "CacheSecurityGroups" =? _ccCacheSecurityGroups
, "CacheSubnetGroupName" =? _ccCacheSubnetGroupName
, "ClientDownloadLandingPage" =? _ccClientDownloadLandingPage
, "ConfigurationEndpoint" =? _ccConfigurationEndpoint
, "Engine" =? _ccEngine
, "EngineVersion" =? _ccEngineVersion
, "NotificationConfiguration" =? _ccNotificationConfiguration
, "NumCacheNodes" =? _ccNumCacheNodes
, "PendingModifiedValues" =? _ccPendingModifiedValues
, "PreferredAvailabilityZone" =? _ccPreferredAvailabilityZone
, "PreferredMaintenanceWindow" =? _ccPreferredMaintenanceWindow
, "ReplicationGroupId" =? _ccReplicationGroupId
, "SecurityGroups" =? _ccSecurityGroups
, "SnapshotRetentionLimit" =? _ccSnapshotRetentionLimit
, "SnapshotWindow" =? _ccSnapshotWindow
]
data EngineDefaults = EngineDefaults
{ _edCacheNodeTypeSpecificParameters :: List "member" CacheNodeTypeSpecificParameter
, _edCacheParameterGroupFamily :: Maybe Text
, _edMarker :: Maybe Text
, _edParameters :: List "member" Parameter
} deriving (Eq, Show)
engineDefaults :: EngineDefaults
engineDefaults = EngineDefaults
{ _edCacheParameterGroupFamily = Nothing
, _edMarker = Nothing
, _edParameters = mempty
, _edCacheNodeTypeSpecificParameters = mempty
}
edCacheNodeTypeSpecificParameters :: Lens' EngineDefaults [CacheNodeTypeSpecificParameter]
edCacheNodeTypeSpecificParameters =
lens _edCacheNodeTypeSpecificParameters
(\s a -> s { _edCacheNodeTypeSpecificParameters = a })
. _List
edCacheParameterGroupFamily :: Lens' EngineDefaults (Maybe Text)
edCacheParameterGroupFamily =
lens _edCacheParameterGroupFamily
(\s a -> s { _edCacheParameterGroupFamily = a })
edMarker :: Lens' EngineDefaults (Maybe Text)
edMarker = lens _edMarker (\s a -> s { _edMarker = a })
edParameters :: Lens' EngineDefaults [Parameter]
edParameters = lens _edParameters (\s a -> s { _edParameters = a }) . _List
instance FromXML EngineDefaults where
parseXML x = EngineDefaults
<$> x .@? "CacheNodeTypeSpecificParameters" .!@ mempty
<*> x .@? "CacheParameterGroupFamily"
<*> x .@? "Marker"
<*> x .@? "Parameters" .!@ mempty
instance ToQuery EngineDefaults where
toQuery EngineDefaults{..} = mconcat
[ "CacheNodeTypeSpecificParameters" =? _edCacheNodeTypeSpecificParameters
, "CacheParameterGroupFamily" =? _edCacheParameterGroupFamily
, "Marker" =? _edMarker
, "Parameters" =? _edParameters
]
data CacheParameterGroupStatus = CacheParameterGroupStatus
{ _cpgsCacheNodeIdsToReboot :: List "member" Text
, _cpgsCacheParameterGroupName :: Maybe Text
, _cpgsParameterApplyStatus :: Maybe Text
} deriving (Eq, Ord, Show)
cacheParameterGroupStatus :: CacheParameterGroupStatus
cacheParameterGroupStatus = CacheParameterGroupStatus
{ _cpgsCacheParameterGroupName = Nothing
, _cpgsParameterApplyStatus = Nothing
, _cpgsCacheNodeIdsToReboot = mempty
}
cpgsCacheNodeIdsToReboot :: Lens' CacheParameterGroupStatus [Text]
cpgsCacheNodeIdsToReboot =
lens _cpgsCacheNodeIdsToReboot
(\s a -> s { _cpgsCacheNodeIdsToReboot = a })
. _List
cpgsCacheParameterGroupName :: Lens' CacheParameterGroupStatus (Maybe Text)
cpgsCacheParameterGroupName =
lens _cpgsCacheParameterGroupName
(\s a -> s { _cpgsCacheParameterGroupName = a })
cpgsParameterApplyStatus :: Lens' CacheParameterGroupStatus (Maybe Text)
cpgsParameterApplyStatus =
lens _cpgsParameterApplyStatus
(\s a -> s { _cpgsParameterApplyStatus = a })
instance FromXML CacheParameterGroupStatus where
parseXML x = CacheParameterGroupStatus
<$> x .@? "CacheNodeIdsToReboot" .!@ mempty
<*> x .@? "CacheParameterGroupName"
<*> x .@? "ParameterApplyStatus"
instance ToQuery CacheParameterGroupStatus where
toQuery CacheParameterGroupStatus{..} = mconcat
[ "CacheNodeIdsToReboot" =? _cpgsCacheNodeIdsToReboot
, "CacheParameterGroupName" =? _cpgsCacheParameterGroupName
, "ParameterApplyStatus" =? _cpgsParameterApplyStatus
]
data CacheNode = CacheNode
{ _cnCacheNodeCreateTime :: Maybe ISO8601
, _cnCacheNodeId :: Maybe Text
, _cnCacheNodeStatus :: Maybe Text
, _cnCustomerAvailabilityZone :: Maybe Text
, _cnEndpoint :: Maybe Endpoint
, _cnParameterGroupStatus :: Maybe Text
, _cnSourceCacheNodeId :: Maybe Text
} deriving (Eq, Show)
cacheNode :: CacheNode
cacheNode = CacheNode
{ _cnCacheNodeId = Nothing
, _cnCacheNodeStatus = Nothing
, _cnCacheNodeCreateTime = Nothing
, _cnEndpoint = Nothing
, _cnParameterGroupStatus = Nothing
, _cnSourceCacheNodeId = Nothing
, _cnCustomerAvailabilityZone = Nothing
}
cnCacheNodeCreateTime :: Lens' CacheNode (Maybe UTCTime)
cnCacheNodeCreateTime =
lens _cnCacheNodeCreateTime (\s a -> s { _cnCacheNodeCreateTime = a })
. mapping _Time
cnCacheNodeId :: Lens' CacheNode (Maybe Text)
cnCacheNodeId = lens _cnCacheNodeId (\s a -> s { _cnCacheNodeId = a })
cnCacheNodeStatus :: Lens' CacheNode (Maybe Text)
cnCacheNodeStatus =
lens _cnCacheNodeStatus (\s a -> s { _cnCacheNodeStatus = a })
cnCustomerAvailabilityZone :: Lens' CacheNode (Maybe Text)
cnCustomerAvailabilityZone =
lens _cnCustomerAvailabilityZone
(\s a -> s { _cnCustomerAvailabilityZone = a })
cnEndpoint :: Lens' CacheNode (Maybe Endpoint)
cnEndpoint = lens _cnEndpoint (\s a -> s { _cnEndpoint = a })
cnParameterGroupStatus :: Lens' CacheNode (Maybe Text)
cnParameterGroupStatus =
lens _cnParameterGroupStatus (\s a -> s { _cnParameterGroupStatus = a })
cnSourceCacheNodeId :: Lens' CacheNode (Maybe Text)
cnSourceCacheNodeId =
lens _cnSourceCacheNodeId (\s a -> s { _cnSourceCacheNodeId = a })
instance FromXML CacheNode where
parseXML x = CacheNode
<$> x .@? "CacheNodeCreateTime"
<*> x .@? "CacheNodeId"
<*> x .@? "CacheNodeStatus"
<*> x .@? "CustomerAvailabilityZone"
<*> x .@? "Endpoint"
<*> x .@? "ParameterGroupStatus"
<*> x .@? "SourceCacheNodeId"
instance ToQuery CacheNode where
toQuery CacheNode{..} = mconcat
[ "CacheNodeCreateTime" =? _cnCacheNodeCreateTime
, "CacheNodeId" =? _cnCacheNodeId
, "CacheNodeStatus" =? _cnCacheNodeStatus
, "CustomerAvailabilityZone" =? _cnCustomerAvailabilityZone
, "Endpoint" =? _cnEndpoint
, "ParameterGroupStatus" =? _cnParameterGroupStatus
, "SourceCacheNodeId" =? _cnSourceCacheNodeId
]
data CacheSecurityGroupMembership = CacheSecurityGroupMembership
{ _csgmCacheSecurityGroupName :: Maybe Text
, _csgmStatus :: Maybe Text
} deriving (Eq, Ord, Show)
cacheSecurityGroupMembership :: CacheSecurityGroupMembership
cacheSecurityGroupMembership = CacheSecurityGroupMembership
{ _csgmCacheSecurityGroupName = Nothing
, _csgmStatus = Nothing
}
csgmCacheSecurityGroupName :: Lens' CacheSecurityGroupMembership (Maybe Text)
csgmCacheSecurityGroupName =
lens _csgmCacheSecurityGroupName
(\s a -> s { _csgmCacheSecurityGroupName = a })
csgmStatus :: Lens' CacheSecurityGroupMembership (Maybe Text)
csgmStatus = lens _csgmStatus (\s a -> s { _csgmStatus = a })
instance FromXML CacheSecurityGroupMembership where
parseXML x = CacheSecurityGroupMembership
<$> x .@? "CacheSecurityGroupName"
<*> x .@? "Status"
instance ToQuery CacheSecurityGroupMembership where
toQuery CacheSecurityGroupMembership{..} = mconcat
[ "CacheSecurityGroupName" =? _csgmCacheSecurityGroupName
, "Status" =? _csgmStatus
]
newtype AvailabilityZone = AvailabilityZone
{ _azName :: Maybe Text
} deriving (Eq, Ord, Show, Monoid)
availabilityZone :: AvailabilityZone
availabilityZone = AvailabilityZone
{ _azName = Nothing
}
azName :: Lens' AvailabilityZone (Maybe Text)
azName = lens _azName (\s a -> s { _azName = a })
instance FromXML AvailabilityZone where
parseXML x = AvailabilityZone
<$> x .@? "Name"
instance ToQuery AvailabilityZone where
toQuery AvailabilityZone{..} = mconcat
[ "Name" =? _azName
]
data NodeGroupMember = NodeGroupMember
{ _ngmCacheClusterId :: Maybe Text
, _ngmCacheNodeId :: Maybe Text
, _ngmCurrentRole :: Maybe Text
, _ngmPreferredAvailabilityZone :: Maybe Text
, _ngmReadEndpoint :: Maybe Endpoint
} deriving (Eq, Show)
nodeGroupMember :: NodeGroupMember
nodeGroupMember = NodeGroupMember
{ _ngmCacheClusterId = Nothing
, _ngmCacheNodeId = Nothing
, _ngmReadEndpoint = Nothing
, _ngmPreferredAvailabilityZone = Nothing
, _ngmCurrentRole = Nothing
}
ngmCacheClusterId :: Lens' NodeGroupMember (Maybe Text)
ngmCacheClusterId =
lens _ngmCacheClusterId (\s a -> s { _ngmCacheClusterId = a })
ngmCacheNodeId :: Lens' NodeGroupMember (Maybe Text)
ngmCacheNodeId = lens _ngmCacheNodeId (\s a -> s { _ngmCacheNodeId = a })
ngmCurrentRole :: Lens' NodeGroupMember (Maybe Text)
ngmCurrentRole = lens _ngmCurrentRole (\s a -> s { _ngmCurrentRole = a })
ngmPreferredAvailabilityZone :: Lens' NodeGroupMember (Maybe Text)
ngmPreferredAvailabilityZone =
lens _ngmPreferredAvailabilityZone
(\s a -> s { _ngmPreferredAvailabilityZone = a })
ngmReadEndpoint :: Lens' NodeGroupMember (Maybe Endpoint)
ngmReadEndpoint = lens _ngmReadEndpoint (\s a -> s { _ngmReadEndpoint = a })
instance FromXML NodeGroupMember where
parseXML x = NodeGroupMember
<$> x .@? "CacheClusterId"
<*> x .@? "CacheNodeId"
<*> x .@? "CurrentRole"
<*> x .@? "PreferredAvailabilityZone"
<*> x .@? "ReadEndpoint"
instance ToQuery NodeGroupMember where
toQuery NodeGroupMember{..} = mconcat
[ "CacheClusterId" =? _ngmCacheClusterId
, "CacheNodeId" =? _ngmCacheNodeId
, "CurrentRole" =? _ngmCurrentRole
, "PreferredAvailabilityZone" =? _ngmPreferredAvailabilityZone
, "ReadEndpoint" =? _ngmReadEndpoint
]
data CacheParameterGroup = CacheParameterGroup
{ _cpgCacheParameterGroupFamily :: Maybe Text
, _cpgCacheParameterGroupName :: Maybe Text
, _cpgDescription :: Maybe Text
} deriving (Eq, Ord, Show)
cacheParameterGroup :: CacheParameterGroup
cacheParameterGroup = CacheParameterGroup
{ _cpgCacheParameterGroupName = Nothing
, _cpgCacheParameterGroupFamily = Nothing
, _cpgDescription = Nothing
}
cpgCacheParameterGroupFamily :: Lens' CacheParameterGroup (Maybe Text)
cpgCacheParameterGroupFamily =
lens _cpgCacheParameterGroupFamily
(\s a -> s { _cpgCacheParameterGroupFamily = a })
cpgCacheParameterGroupName :: Lens' CacheParameterGroup (Maybe Text)
cpgCacheParameterGroupName =
lens _cpgCacheParameterGroupName
(\s a -> s { _cpgCacheParameterGroupName = a })
cpgDescription :: Lens' CacheParameterGroup (Maybe Text)
cpgDescription = lens _cpgDescription (\s a -> s { _cpgDescription = a })
instance FromXML CacheParameterGroup where
parseXML x = CacheParameterGroup
<$> x .@? "CacheParameterGroupFamily"
<*> x .@? "CacheParameterGroupName"
<*> x .@? "Description"
instance ToQuery CacheParameterGroup where
toQuery CacheParameterGroup{..} = mconcat
[ "CacheParameterGroupFamily" =? _cpgCacheParameterGroupFamily
, "CacheParameterGroupName" =? _cpgCacheParameterGroupName
, "Description" =? _cpgDescription
]
data AutomaticFailoverStatus
= AFSDisabled
| AFSDisabling
| AFSEnabled
| AFSEnabling
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable AutomaticFailoverStatus
instance FromText AutomaticFailoverStatus where
parser = takeText >>= \case
"disabled" -> pure AFSDisabled
"disabling" -> pure AFSDisabling
"enabled" -> pure AFSEnabled
"enabling" -> pure AFSEnabling
e -> fail $
"Failure parsing AutomaticFailoverStatus from " ++ show e
instance ToText AutomaticFailoverStatus where
toText = \case
AFSDisabled -> "disabled"
AFSDisabling -> "disabling"
AFSEnabled -> "enabled"
AFSEnabling -> "enabling"
instance ToByteString AutomaticFailoverStatus
instance ToHeader AutomaticFailoverStatus
instance ToQuery AutomaticFailoverStatus
instance FromXML AutomaticFailoverStatus where
parseXML = parseXMLText "AutomaticFailoverStatus"
data CacheSecurityGroup = CacheSecurityGroup
{ _csgCacheSecurityGroupName :: Maybe Text
, _csgDescription :: Maybe Text
, _csgEC2SecurityGroups :: List "member" EC2SecurityGroup
, _csgOwnerId :: Maybe Text
} deriving (Eq, Show)
cacheSecurityGroup :: CacheSecurityGroup
cacheSecurityGroup = CacheSecurityGroup
{ _csgOwnerId = Nothing
, _csgCacheSecurityGroupName = Nothing
, _csgDescription = Nothing
, _csgEC2SecurityGroups = mempty
}
csgCacheSecurityGroupName :: Lens' CacheSecurityGroup (Maybe Text)
csgCacheSecurityGroupName =
lens _csgCacheSecurityGroupName
(\s a -> s { _csgCacheSecurityGroupName = a })
csgDescription :: Lens' CacheSecurityGroup (Maybe Text)
csgDescription = lens _csgDescription (\s a -> s { _csgDescription = a })
csgEC2SecurityGroups :: Lens' CacheSecurityGroup [EC2SecurityGroup]
csgEC2SecurityGroups =
lens _csgEC2SecurityGroups (\s a -> s { _csgEC2SecurityGroups = a })
. _List
csgOwnerId :: Lens' CacheSecurityGroup (Maybe Text)
csgOwnerId = lens _csgOwnerId (\s a -> s { _csgOwnerId = a })
instance FromXML CacheSecurityGroup where
parseXML x = CacheSecurityGroup
<$> x .@? "CacheSecurityGroupName"
<*> x .@? "Description"
<*> x .@? "EC2SecurityGroups" .!@ mempty
<*> x .@? "OwnerId"
instance ToQuery CacheSecurityGroup where
toQuery CacheSecurityGroup{..} = mconcat
[ "CacheSecurityGroupName" =? _csgCacheSecurityGroupName
, "Description" =? _csgDescription
, "EC2SecurityGroups" =? _csgEC2SecurityGroups
, "OwnerId" =? _csgOwnerId
]
data CacheNodeTypeSpecificParameter = CacheNodeTypeSpecificParameter
{ _cntspAllowedValues :: Maybe Text
, _cntspCacheNodeTypeSpecificValues :: List "member" CacheNodeTypeSpecificValue
, _cntspDataType :: Maybe Text
, _cntspDescription :: Maybe Text
, _cntspIsModifiable :: Maybe Bool
, _cntspMinimumEngineVersion :: Maybe Text
, _cntspParameterName :: Maybe Text
, _cntspSource :: Maybe Text
} deriving (Eq, Show)
cacheNodeTypeSpecificParameter :: CacheNodeTypeSpecificParameter
cacheNodeTypeSpecificParameter = CacheNodeTypeSpecificParameter
{ _cntspParameterName = Nothing
, _cntspDescription = Nothing
, _cntspSource = Nothing
, _cntspDataType = Nothing
, _cntspAllowedValues = Nothing
, _cntspIsModifiable = Nothing
, _cntspMinimumEngineVersion = Nothing
, _cntspCacheNodeTypeSpecificValues = mempty
}
cntspAllowedValues :: Lens' CacheNodeTypeSpecificParameter (Maybe Text)
cntspAllowedValues =
lens _cntspAllowedValues (\s a -> s { _cntspAllowedValues = a })
cntspCacheNodeTypeSpecificValues :: Lens' CacheNodeTypeSpecificParameter [CacheNodeTypeSpecificValue]
cntspCacheNodeTypeSpecificValues =
lens _cntspCacheNodeTypeSpecificValues
(\s a -> s { _cntspCacheNodeTypeSpecificValues = a })
. _List
cntspDataType :: Lens' CacheNodeTypeSpecificParameter (Maybe Text)
cntspDataType = lens _cntspDataType (\s a -> s { _cntspDataType = a })
cntspDescription :: Lens' CacheNodeTypeSpecificParameter (Maybe Text)
cntspDescription = lens _cntspDescription (\s a -> s { _cntspDescription = a })
cntspIsModifiable :: Lens' CacheNodeTypeSpecificParameter (Maybe Bool)
cntspIsModifiable =
lens _cntspIsModifiable (\s a -> s { _cntspIsModifiable = a })
cntspMinimumEngineVersion :: Lens' CacheNodeTypeSpecificParameter (Maybe Text)
cntspMinimumEngineVersion =
lens _cntspMinimumEngineVersion
(\s a -> s { _cntspMinimumEngineVersion = a })
cntspParameterName :: Lens' CacheNodeTypeSpecificParameter (Maybe Text)
cntspParameterName =
lens _cntspParameterName (\s a -> s { _cntspParameterName = a })
cntspSource :: Lens' CacheNodeTypeSpecificParameter (Maybe Text)
cntspSource = lens _cntspSource (\s a -> s { _cntspSource = a })
instance FromXML CacheNodeTypeSpecificParameter where
parseXML x = CacheNodeTypeSpecificParameter
<$> x .@? "AllowedValues"
<*> x .@? "CacheNodeTypeSpecificValues" .!@ mempty
<*> x .@? "DataType"
<*> x .@? "Description"
<*> x .@? "IsModifiable"
<*> x .@? "MinimumEngineVersion"
<*> x .@? "ParameterName"
<*> x .@? "Source"
instance ToQuery CacheNodeTypeSpecificParameter where
toQuery CacheNodeTypeSpecificParameter{..} = mconcat
[ "AllowedValues" =? _cntspAllowedValues
, "CacheNodeTypeSpecificValues" =? _cntspCacheNodeTypeSpecificValues
, "DataType" =? _cntspDataType
, "Description" =? _cntspDescription
, "IsModifiable" =? _cntspIsModifiable
, "MinimumEngineVersion" =? _cntspMinimumEngineVersion
, "ParameterName" =? _cntspParameterName
, "Source" =? _cntspSource
]
data AZMode
= CrossAz
| SingleAz
deriving (Eq, Ord, Show, Generic, Enum)
instance Hashable AZMode
instance FromText AZMode where
parser = takeText >>= \case
"cross-az" -> pure CrossAz
"single-az" -> pure SingleAz
e -> fail $
"Failure parsing AZMode from " ++ show e
instance ToText AZMode where
toText = \case
CrossAz -> "cross-az"
SingleAz -> "single-az"
instance ToByteString AZMode
instance ToHeader AZMode
instance ToQuery AZMode
instance FromXML AZMode where
parseXML = parseXMLText "AZMode"
data CacheEngineVersion = CacheEngineVersion
{ _cevCacheEngineDescription :: Maybe Text
, _cevCacheEngineVersionDescription :: Maybe Text
, _cevCacheParameterGroupFamily :: Maybe Text
, _cevEngine :: Maybe Text
, _cevEngineVersion :: Maybe Text
} deriving (Eq, Ord, Show)
cacheEngineVersion :: CacheEngineVersion
cacheEngineVersion = CacheEngineVersion
{ _cevEngine = Nothing
, _cevEngineVersion = Nothing
, _cevCacheParameterGroupFamily = Nothing
, _cevCacheEngineDescription = Nothing
, _cevCacheEngineVersionDescription = Nothing
}
cevCacheEngineDescription :: Lens' CacheEngineVersion (Maybe Text)
cevCacheEngineDescription =
lens _cevCacheEngineDescription
(\s a -> s { _cevCacheEngineDescription = a })
cevCacheEngineVersionDescription :: Lens' CacheEngineVersion (Maybe Text)
cevCacheEngineVersionDescription =
lens _cevCacheEngineVersionDescription
(\s a -> s { _cevCacheEngineVersionDescription = a })
cevCacheParameterGroupFamily :: Lens' CacheEngineVersion (Maybe Text)
cevCacheParameterGroupFamily =
lens _cevCacheParameterGroupFamily
(\s a -> s { _cevCacheParameterGroupFamily = a })
cevEngine :: Lens' CacheEngineVersion (Maybe Text)
cevEngine = lens _cevEngine (\s a -> s { _cevEngine = a })
cevEngineVersion :: Lens' CacheEngineVersion (Maybe Text)
cevEngineVersion = lens _cevEngineVersion (\s a -> s { _cevEngineVersion = a })
instance FromXML CacheEngineVersion where
parseXML x = CacheEngineVersion
<$> x .@? "CacheEngineDescription"
<*> x .@? "CacheEngineVersionDescription"
<*> x .@? "CacheParameterGroupFamily"
<*> x .@? "Engine"
<*> x .@? "EngineVersion"
instance ToQuery CacheEngineVersion where
toQuery CacheEngineVersion{..} = mconcat
[ "CacheEngineDescription" =? _cevCacheEngineDescription
, "CacheEngineVersionDescription" =? _cevCacheEngineVersionDescription
, "CacheParameterGroupFamily" =? _cevCacheParameterGroupFamily
, "Engine" =? _cevEngine
, "EngineVersion" =? _cevEngineVersion
]
data ReplicationGroup = ReplicationGroup
{ _rgAutomaticFailover :: Maybe AutomaticFailoverStatus
, _rgDescription :: Maybe Text
, _rgMemberClusters :: List "member" Text
, _rgNodeGroups :: List "member" NodeGroup
, _rgPendingModifiedValues :: Maybe ReplicationGroupPendingModifiedValues
, _rgReplicationGroupId :: Maybe Text
, _rgSnapshottingClusterId :: Maybe Text
, _rgStatus :: Maybe Text
} deriving (Eq, Show)
replicationGroup :: ReplicationGroup
replicationGroup = ReplicationGroup
{ _rgReplicationGroupId = Nothing
, _rgDescription = Nothing
, _rgStatus = Nothing
, _rgPendingModifiedValues = Nothing
, _rgMemberClusters = mempty
, _rgNodeGroups = mempty
, _rgSnapshottingClusterId = Nothing
, _rgAutomaticFailover = Nothing
}
rgAutomaticFailover :: Lens' ReplicationGroup (Maybe AutomaticFailoverStatus)
rgAutomaticFailover =
lens _rgAutomaticFailover (\s a -> s { _rgAutomaticFailover = a })
rgDescription :: Lens' ReplicationGroup (Maybe Text)
rgDescription = lens _rgDescription (\s a -> s { _rgDescription = a })
rgMemberClusters :: Lens' ReplicationGroup [Text]
rgMemberClusters = lens _rgMemberClusters (\s a -> s { _rgMemberClusters = a }) . _List
rgNodeGroups :: Lens' ReplicationGroup [NodeGroup]
rgNodeGroups = lens _rgNodeGroups (\s a -> s { _rgNodeGroups = a }) . _List
rgPendingModifiedValues :: Lens' ReplicationGroup (Maybe ReplicationGroupPendingModifiedValues)
rgPendingModifiedValues =
lens _rgPendingModifiedValues (\s a -> s { _rgPendingModifiedValues = a })
rgReplicationGroupId :: Lens' ReplicationGroup (Maybe Text)
rgReplicationGroupId =
lens _rgReplicationGroupId (\s a -> s { _rgReplicationGroupId = a })
rgSnapshottingClusterId :: Lens' ReplicationGroup (Maybe Text)
rgSnapshottingClusterId =
lens _rgSnapshottingClusterId (\s a -> s { _rgSnapshottingClusterId = a })
rgStatus :: Lens' ReplicationGroup (Maybe Text)
rgStatus = lens _rgStatus (\s a -> s { _rgStatus = a })
instance FromXML ReplicationGroup where
parseXML x = ReplicationGroup
<$> x .@? "AutomaticFailover"
<*> x .@? "Description"
<*> x .@? "MemberClusters" .!@ mempty
<*> x .@? "NodeGroups" .!@ mempty
<*> x .@? "PendingModifiedValues"
<*> x .@? "ReplicationGroupId"
<*> x .@? "SnapshottingClusterId"
<*> x .@? "Status"
instance ToQuery ReplicationGroup where
toQuery ReplicationGroup{..} = mconcat
[ "AutomaticFailover" =? _rgAutomaticFailover
, "Description" =? _rgDescription
, "MemberClusters" =? _rgMemberClusters
, "NodeGroups" =? _rgNodeGroups
, "PendingModifiedValues" =? _rgPendingModifiedValues
, "ReplicationGroupId" =? _rgReplicationGroupId
, "SnapshottingClusterId" =? _rgSnapshottingClusterId
, "Status" =? _rgStatus
]
data RecurringCharge = RecurringCharge
{ _rcRecurringChargeAmount :: Maybe Double
, _rcRecurringChargeFrequency :: Maybe Text
} deriving (Eq, Ord, Show)
recurringCharge :: RecurringCharge
recurringCharge = RecurringCharge
{ _rcRecurringChargeAmount = Nothing
, _rcRecurringChargeFrequency = Nothing
}
rcRecurringChargeAmount :: Lens' RecurringCharge (Maybe Double)
rcRecurringChargeAmount =
lens _rcRecurringChargeAmount (\s a -> s { _rcRecurringChargeAmount = a })
rcRecurringChargeFrequency :: Lens' RecurringCharge (Maybe Text)
rcRecurringChargeFrequency =
lens _rcRecurringChargeFrequency
(\s a -> s { _rcRecurringChargeFrequency = a })
instance FromXML RecurringCharge where
parseXML x = RecurringCharge
<$> x .@? "RecurringChargeAmount"
<*> x .@? "RecurringChargeFrequency"
instance ToQuery RecurringCharge where
toQuery RecurringCharge{..} = mconcat
[ "RecurringChargeAmount" =? _rcRecurringChargeAmount
, "RecurringChargeFrequency" =? _rcRecurringChargeFrequency
]
data ReservedCacheNodesOffering = ReservedCacheNodesOffering
{ _rcnoCacheNodeType :: Maybe Text
, _rcnoDuration :: Maybe Int
, _rcnoFixedPrice :: Maybe Double
, _rcnoOfferingType :: Maybe Text
, _rcnoProductDescription :: Maybe Text
, _rcnoRecurringCharges :: List "member" RecurringCharge
, _rcnoReservedCacheNodesOfferingId :: Maybe Text
, _rcnoUsagePrice :: Maybe Double
} deriving (Eq, Show)
reservedCacheNodesOffering :: ReservedCacheNodesOffering
reservedCacheNodesOffering = ReservedCacheNodesOffering
{ _rcnoReservedCacheNodesOfferingId = Nothing
, _rcnoCacheNodeType = Nothing
, _rcnoDuration = Nothing
, _rcnoFixedPrice = Nothing
, _rcnoUsagePrice = Nothing
, _rcnoProductDescription = Nothing
, _rcnoOfferingType = Nothing
, _rcnoRecurringCharges = mempty
}
rcnoCacheNodeType :: Lens' ReservedCacheNodesOffering (Maybe Text)
rcnoCacheNodeType =
lens _rcnoCacheNodeType (\s a -> s { _rcnoCacheNodeType = a })
rcnoDuration :: Lens' ReservedCacheNodesOffering (Maybe Int)
rcnoDuration = lens _rcnoDuration (\s a -> s { _rcnoDuration = a })
rcnoFixedPrice :: Lens' ReservedCacheNodesOffering (Maybe Double)
rcnoFixedPrice = lens _rcnoFixedPrice (\s a -> s { _rcnoFixedPrice = a })
rcnoOfferingType :: Lens' ReservedCacheNodesOffering (Maybe Text)
rcnoOfferingType = lens _rcnoOfferingType (\s a -> s { _rcnoOfferingType = a })
rcnoProductDescription :: Lens' ReservedCacheNodesOffering (Maybe Text)
rcnoProductDescription =
lens _rcnoProductDescription (\s a -> s { _rcnoProductDescription = a })
rcnoRecurringCharges :: Lens' ReservedCacheNodesOffering [RecurringCharge]
rcnoRecurringCharges =
lens _rcnoRecurringCharges (\s a -> s { _rcnoRecurringCharges = a })
. _List
rcnoReservedCacheNodesOfferingId :: Lens' ReservedCacheNodesOffering (Maybe Text)
rcnoReservedCacheNodesOfferingId =
lens _rcnoReservedCacheNodesOfferingId
(\s a -> s { _rcnoReservedCacheNodesOfferingId = a })
rcnoUsagePrice :: Lens' ReservedCacheNodesOffering (Maybe Double)
rcnoUsagePrice = lens _rcnoUsagePrice (\s a -> s { _rcnoUsagePrice = a })
instance FromXML ReservedCacheNodesOffering where
parseXML x = ReservedCacheNodesOffering
<$> x .@? "CacheNodeType"
<*> x .@? "Duration"
<*> x .@? "FixedPrice"
<*> x .@? "OfferingType"
<*> x .@? "ProductDescription"
<*> x .@? "RecurringCharges" .!@ mempty
<*> x .@? "ReservedCacheNodesOfferingId"
<*> x .@? "UsagePrice"
instance ToQuery ReservedCacheNodesOffering where
toQuery ReservedCacheNodesOffering{..} = mconcat
[ "CacheNodeType" =? _rcnoCacheNodeType
, "Duration" =? _rcnoDuration
, "FixedPrice" =? _rcnoFixedPrice
, "OfferingType" =? _rcnoOfferingType
, "ProductDescription" =? _rcnoProductDescription
, "RecurringCharges" =? _rcnoRecurringCharges
, "ReservedCacheNodesOfferingId" =? _rcnoReservedCacheNodesOfferingId
, "UsagePrice" =? _rcnoUsagePrice
]
data Endpoint = Endpoint
{ _eAddress :: Maybe Text
, _ePort :: Maybe Int
} deriving (Eq, Ord, Show)
endpoint :: Endpoint
endpoint = Endpoint
{ _eAddress = Nothing
, _ePort = Nothing
}
eAddress :: Lens' Endpoint (Maybe Text)
eAddress = lens _eAddress (\s a -> s { _eAddress = a })
ePort :: Lens' Endpoint (Maybe Int)
ePort = lens _ePort (\s a -> s { _ePort = a })
instance FromXML Endpoint where
parseXML x = Endpoint
<$> x .@? "Address"
<*> x .@? "Port"
instance ToQuery Endpoint where
toQuery Endpoint{..} = mconcat
[ "Address" =? _eAddress
, "Port" =? _ePort
]
data PendingModifiedValues = PendingModifiedValues
{ _pmvCacheNodeIdsToRemove :: List "member" Text
, _pmvEngineVersion :: Maybe Text
, _pmvNumCacheNodes :: Maybe Int
} deriving (Eq, Ord, Show)
pendingModifiedValues :: PendingModifiedValues
pendingModifiedValues = PendingModifiedValues
{ _pmvNumCacheNodes = Nothing
, _pmvCacheNodeIdsToRemove = mempty
, _pmvEngineVersion = Nothing
}
pmvCacheNodeIdsToRemove :: Lens' PendingModifiedValues [Text]
pmvCacheNodeIdsToRemove =
lens _pmvCacheNodeIdsToRemove (\s a -> s { _pmvCacheNodeIdsToRemove = a })
. _List
pmvEngineVersion :: Lens' PendingModifiedValues (Maybe Text)
pmvEngineVersion = lens _pmvEngineVersion (\s a -> s { _pmvEngineVersion = a })
pmvNumCacheNodes :: Lens' PendingModifiedValues (Maybe Int)
pmvNumCacheNodes = lens _pmvNumCacheNodes (\s a -> s { _pmvNumCacheNodes = a })
instance FromXML PendingModifiedValues where
parseXML x = PendingModifiedValues
<$> x .@? "CacheNodeIdsToRemove" .!@ mempty
<*> x .@? "EngineVersion"
<*> x .@? "NumCacheNodes"
instance ToQuery PendingModifiedValues where
toQuery PendingModifiedValues{..} = mconcat
[ "CacheNodeIdsToRemove" =? _pmvCacheNodeIdsToRemove
, "EngineVersion" =? _pmvEngineVersion
, "NumCacheNodes" =? _pmvNumCacheNodes
]
newtype CacheParameterGroupNameMessage = CacheParameterGroupNameMessage
{ _cpgnmCacheParameterGroupName :: Maybe Text
} deriving (Eq, Ord, Show, Monoid)
cacheParameterGroupNameMessage :: CacheParameterGroupNameMessage
cacheParameterGroupNameMessage = CacheParameterGroupNameMessage
{ _cpgnmCacheParameterGroupName = Nothing
}
cpgnmCacheParameterGroupName :: Lens' CacheParameterGroupNameMessage (Maybe Text)
cpgnmCacheParameterGroupName =
lens _cpgnmCacheParameterGroupName
(\s a -> s { _cpgnmCacheParameterGroupName = a })
instance FromXML CacheParameterGroupNameMessage where
parseXML x = CacheParameterGroupNameMessage
<$> x .@? "CacheParameterGroupName"
instance ToQuery CacheParameterGroupNameMessage where
toQuery CacheParameterGroupNameMessage{..} = mconcat
[ "CacheParameterGroupName" =? _cpgnmCacheParameterGroupName
]
data Parameter = Parameter
{ _pAllowedValues :: Maybe Text
, _pDataType :: Maybe Text
, _pDescription :: Maybe Text
, _pIsModifiable :: Maybe Bool
, _pMinimumEngineVersion :: Maybe Text
, _pParameterName :: Maybe Text
, _pParameterValue :: Maybe Text
, _pSource :: Maybe Text
} deriving (Eq, Ord, Show)
parameter :: Parameter
parameter = Parameter
{ _pParameterName = Nothing
, _pParameterValue = Nothing
, _pDescription = Nothing
, _pSource = Nothing
, _pDataType = Nothing
, _pAllowedValues = Nothing
, _pIsModifiable = Nothing
, _pMinimumEngineVersion = Nothing
}
pAllowedValues :: Lens' Parameter (Maybe Text)
pAllowedValues = lens _pAllowedValues (\s a -> s { _pAllowedValues = a })
pDataType :: Lens' Parameter (Maybe Text)
pDataType = lens _pDataType (\s a -> s { _pDataType = a })
pDescription :: Lens' Parameter (Maybe Text)
pDescription = lens _pDescription (\s a -> s { _pDescription = a })
pIsModifiable :: Lens' Parameter (Maybe Bool)
pIsModifiable = lens _pIsModifiable (\s a -> s { _pIsModifiable = a })
pMinimumEngineVersion :: Lens' Parameter (Maybe Text)
pMinimumEngineVersion =
lens _pMinimumEngineVersion (\s a -> s { _pMinimumEngineVersion = a })
pParameterName :: Lens' Parameter (Maybe Text)
pParameterName = lens _pParameterName (\s a -> s { _pParameterName = a })
pParameterValue :: Lens' Parameter (Maybe Text)
pParameterValue = lens _pParameterValue (\s a -> s { _pParameterValue = a })
pSource :: Lens' Parameter (Maybe Text)
pSource = lens _pSource (\s a -> s { _pSource = a })
instance FromXML Parameter where
parseXML x = Parameter
<$> x .@? "AllowedValues"
<*> x .@? "DataType"
<*> x .@? "Description"
<*> x .@? "IsModifiable"
<*> x .@? "MinimumEngineVersion"
<*> x .@? "ParameterName"
<*> x .@? "ParameterValue"
<*> x .@? "Source"
instance ToQuery Parameter where
toQuery Parameter{..} = mconcat
[ "AllowedValues" =? _pAllowedValues
, "DataType" =? _pDataType
, "Description" =? _pDescription
, "IsModifiable" =? _pIsModifiable
, "MinimumEngineVersion" =? _pMinimumEngineVersion
, "ParameterName" =? _pParameterName
, "ParameterValue" =? _pParameterValue
, "Source" =? _pSource
]