module Network.AWS.Route53.Types.Product where
import Network.AWS.Prelude
import Network.AWS.Route53.Internal
import Network.AWS.Route53.Types.Sum
data AliasTarget = AliasTarget'
{ _atHostedZoneId :: !Text
, _atDNSName :: !Text
, _atEvaluateTargetHealth :: !Bool
} deriving (Eq,Read,Show,Data,Typeable,Generic)
aliasTarget
:: Text
-> Text
-> Bool
-> AliasTarget
aliasTarget pHostedZoneId_ pDNSName_ pEvaluateTargetHealth_ =
AliasTarget'
{ _atHostedZoneId = pHostedZoneId_
, _atDNSName = pDNSName_
, _atEvaluateTargetHealth = pEvaluateTargetHealth_
}
atHostedZoneId :: Lens' AliasTarget Text
atHostedZoneId = lens _atHostedZoneId (\ s a -> s{_atHostedZoneId = a});
atDNSName :: Lens' AliasTarget Text
atDNSName = lens _atDNSName (\ s a -> s{_atDNSName = a});
atEvaluateTargetHealth :: Lens' AliasTarget Bool
atEvaluateTargetHealth = lens _atEvaluateTargetHealth (\ s a -> s{_atEvaluateTargetHealth = a});
instance FromXML AliasTarget where
parseXML x
= AliasTarget' <$>
(x .@ "HostedZoneId") <*> (x .@ "DNSName") <*>
(x .@ "EvaluateTargetHealth")
instance ToXML AliasTarget where
toXML AliasTarget'{..}
= mconcat
["HostedZoneId" @= _atHostedZoneId,
"DNSName" @= _atDNSName,
"EvaluateTargetHealth" @= _atEvaluateTargetHealth]
data Change = Change'
{ _cAction :: !ChangeAction
, _cResourceRecordSet :: !ResourceRecordSet
} deriving (Eq,Read,Show,Data,Typeable,Generic)
change
:: ChangeAction
-> ResourceRecordSet
-> Change
change pAction_ pResourceRecordSet_ =
Change'
{ _cAction = pAction_
, _cResourceRecordSet = pResourceRecordSet_
}
cAction :: Lens' Change ChangeAction
cAction = lens _cAction (\ s a -> s{_cAction = a});
cResourceRecordSet :: Lens' Change ResourceRecordSet
cResourceRecordSet = lens _cResourceRecordSet (\ s a -> s{_cResourceRecordSet = a});
instance ToXML Change where
toXML Change'{..}
= mconcat
["Action" @= _cAction,
"ResourceRecordSet" @= _cResourceRecordSet]
data ChangeBatch = ChangeBatch'
{ _cbComment :: !(Maybe Text)
, _cbChanges :: !(List1 Change)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
changeBatch
:: NonEmpty Change
-> ChangeBatch
changeBatch pChanges_ =
ChangeBatch'
{ _cbComment = Nothing
, _cbChanges = _List1 # pChanges_
}
cbComment :: Lens' ChangeBatch (Maybe Text)
cbComment = lens _cbComment (\ s a -> s{_cbComment = a});
cbChanges :: Lens' ChangeBatch (NonEmpty Change)
cbChanges = lens _cbChanges (\ s a -> s{_cbChanges = a}) . _List1;
instance ToXML ChangeBatch where
toXML ChangeBatch'{..}
= mconcat
["Comment" @= _cbComment,
"Changes" @= toXMLList "Change" _cbChanges]
data ChangeInfo = ChangeInfo'
{ _ciComment :: !(Maybe Text)
, _ciId :: !Text
, _ciStatus :: !ChangeStatus
, _ciSubmittedAt :: !ISO8601
} deriving (Eq,Read,Show,Data,Typeable,Generic)
changeInfo
:: Text
-> ChangeStatus
-> UTCTime
-> ChangeInfo
changeInfo pId_ pStatus_ pSubmittedAt_ =
ChangeInfo'
{ _ciComment = Nothing
, _ciId = pId_
, _ciStatus = pStatus_
, _ciSubmittedAt = _Time # pSubmittedAt_
}
ciComment :: Lens' ChangeInfo (Maybe Text)
ciComment = lens _ciComment (\ s a -> s{_ciComment = a});
ciId :: Lens' ChangeInfo Text
ciId = lens _ciId (\ s a -> s{_ciId = a});
ciStatus :: Lens' ChangeInfo ChangeStatus
ciStatus = lens _ciStatus (\ s a -> s{_ciStatus = a});
ciSubmittedAt :: Lens' ChangeInfo UTCTime
ciSubmittedAt = lens _ciSubmittedAt (\ s a -> s{_ciSubmittedAt = a}) . _Time;
instance FromXML ChangeInfo where
parseXML x
= ChangeInfo' <$>
(x .@? "Comment") <*> (x .@ "Id") <*> (x .@ "Status")
<*> (x .@ "SubmittedAt")
data DelegationSet = DelegationSet'
{ _dsId :: !(Maybe Text)
, _dsCallerReference :: !(Maybe Text)
, _dsNameServers :: !(List1 Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
delegationSet
:: NonEmpty Text
-> DelegationSet
delegationSet pNameServers_ =
DelegationSet'
{ _dsId = Nothing
, _dsCallerReference = Nothing
, _dsNameServers = _List1 # pNameServers_
}
dsId :: Lens' DelegationSet (Maybe Text)
dsId = lens _dsId (\ s a -> s{_dsId = a});
dsCallerReference :: Lens' DelegationSet (Maybe Text)
dsCallerReference = lens _dsCallerReference (\ s a -> s{_dsCallerReference = a});
dsNameServers :: Lens' DelegationSet (NonEmpty Text)
dsNameServers = lens _dsNameServers (\ s a -> s{_dsNameServers = a}) . _List1;
instance FromXML DelegationSet where
parseXML x
= DelegationSet' <$>
(x .@? "Id") <*> (x .@? "CallerReference") <*>
(x .@? "NameServers" .!@ mempty >>=
parseXMLList1 "NameServer")
data GeoLocation = GeoLocation'
{ _glSubdivisionCode :: !(Maybe Text)
, _glCountryCode :: !(Maybe Text)
, _glContinentCode :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
geoLocation
:: GeoLocation
geoLocation =
GeoLocation'
{ _glSubdivisionCode = Nothing
, _glCountryCode = Nothing
, _glContinentCode = Nothing
}
glSubdivisionCode :: Lens' GeoLocation (Maybe Text)
glSubdivisionCode = lens _glSubdivisionCode (\ s a -> s{_glSubdivisionCode = a});
glCountryCode :: Lens' GeoLocation (Maybe Text)
glCountryCode = lens _glCountryCode (\ s a -> s{_glCountryCode = a});
glContinentCode :: Lens' GeoLocation (Maybe Text)
glContinentCode = lens _glContinentCode (\ s a -> s{_glContinentCode = a});
instance FromXML GeoLocation where
parseXML x
= GeoLocation' <$>
(x .@? "SubdivisionCode") <*> (x .@? "CountryCode")
<*> (x .@? "ContinentCode")
instance ToXML GeoLocation where
toXML GeoLocation'{..}
= mconcat
["SubdivisionCode" @= _glSubdivisionCode,
"CountryCode" @= _glCountryCode,
"ContinentCode" @= _glContinentCode]
data GeoLocationDetails = GeoLocationDetails'
{ _gldSubdivisionName :: !(Maybe Text)
, _gldSubdivisionCode :: !(Maybe Text)
, _gldCountryName :: !(Maybe Text)
, _gldCountryCode :: !(Maybe Text)
, _gldContinentCode :: !(Maybe Text)
, _gldContinentName :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
geoLocationDetails
:: GeoLocationDetails
geoLocationDetails =
GeoLocationDetails'
{ _gldSubdivisionName = Nothing
, _gldSubdivisionCode = Nothing
, _gldCountryName = Nothing
, _gldCountryCode = Nothing
, _gldContinentCode = Nothing
, _gldContinentName = Nothing
}
gldSubdivisionName :: Lens' GeoLocationDetails (Maybe Text)
gldSubdivisionName = lens _gldSubdivisionName (\ s a -> s{_gldSubdivisionName = a});
gldSubdivisionCode :: Lens' GeoLocationDetails (Maybe Text)
gldSubdivisionCode = lens _gldSubdivisionCode (\ s a -> s{_gldSubdivisionCode = a});
gldCountryName :: Lens' GeoLocationDetails (Maybe Text)
gldCountryName = lens _gldCountryName (\ s a -> s{_gldCountryName = a});
gldCountryCode :: Lens' GeoLocationDetails (Maybe Text)
gldCountryCode = lens _gldCountryCode (\ s a -> s{_gldCountryCode = a});
gldContinentCode :: Lens' GeoLocationDetails (Maybe Text)
gldContinentCode = lens _gldContinentCode (\ s a -> s{_gldContinentCode = a});
gldContinentName :: Lens' GeoLocationDetails (Maybe Text)
gldContinentName = lens _gldContinentName (\ s a -> s{_gldContinentName = a});
instance FromXML GeoLocationDetails where
parseXML x
= GeoLocationDetails' <$>
(x .@? "SubdivisionName") <*>
(x .@? "SubdivisionCode")
<*> (x .@? "CountryName")
<*> (x .@? "CountryCode")
<*> (x .@? "ContinentCode")
<*> (x .@? "ContinentName")
data HealthCheck = HealthCheck'
{ _hcId :: !Text
, _hcCallerReference :: !Text
, _hcHealthCheckConfig :: !HealthCheckConfig
, _hcHealthCheckVersion :: !Nat
} deriving (Eq,Read,Show,Data,Typeable,Generic)
healthCheck
:: Text
-> Text
-> HealthCheckConfig
-> Natural
-> HealthCheck
healthCheck pId_ pCallerReference_ pHealthCheckConfig_ pHealthCheckVersion_ =
HealthCheck'
{ _hcId = pId_
, _hcCallerReference = pCallerReference_
, _hcHealthCheckConfig = pHealthCheckConfig_
, _hcHealthCheckVersion = _Nat # pHealthCheckVersion_
}
hcId :: Lens' HealthCheck Text
hcId = lens _hcId (\ s a -> s{_hcId = a});
hcCallerReference :: Lens' HealthCheck Text
hcCallerReference = lens _hcCallerReference (\ s a -> s{_hcCallerReference = a});
hcHealthCheckConfig :: Lens' HealthCheck HealthCheckConfig
hcHealthCheckConfig = lens _hcHealthCheckConfig (\ s a -> s{_hcHealthCheckConfig = a});
hcHealthCheckVersion :: Lens' HealthCheck Natural
hcHealthCheckVersion = lens _hcHealthCheckVersion (\ s a -> s{_hcHealthCheckVersion = a}) . _Nat;
instance FromXML HealthCheck where
parseXML x
= HealthCheck' <$>
(x .@ "Id") <*> (x .@ "CallerReference") <*>
(x .@ "HealthCheckConfig")
<*> (x .@ "HealthCheckVersion")
data HealthCheckConfig = HealthCheckConfig'
{ _hccFailureThreshold :: !(Maybe Nat)
, _hccIPAddress :: !(Maybe Text)
, _hccSearchString :: !(Maybe Text)
, _hccHealthThreshold :: !(Maybe Nat)
, _hccResourcePath :: !(Maybe Text)
, _hccMeasureLatency :: !(Maybe Bool)
, _hccInverted :: !(Maybe Bool)
, _hccFullyQualifiedDomainName :: !(Maybe Text)
, _hccChildHealthChecks :: !(Maybe [Text])
, _hccRequestInterval :: !(Maybe Nat)
, _hccPort :: !(Maybe Nat)
, _hccType :: !HealthCheckType
} deriving (Eq,Read,Show,Data,Typeable,Generic)
healthCheckConfig
:: HealthCheckType
-> HealthCheckConfig
healthCheckConfig pType_ =
HealthCheckConfig'
{ _hccFailureThreshold = Nothing
, _hccIPAddress = Nothing
, _hccSearchString = Nothing
, _hccHealthThreshold = Nothing
, _hccResourcePath = Nothing
, _hccMeasureLatency = Nothing
, _hccInverted = Nothing
, _hccFullyQualifiedDomainName = Nothing
, _hccChildHealthChecks = Nothing
, _hccRequestInterval = Nothing
, _hccPort = Nothing
, _hccType = pType_
}
hccFailureThreshold :: Lens' HealthCheckConfig (Maybe Natural)
hccFailureThreshold = lens _hccFailureThreshold (\ s a -> s{_hccFailureThreshold = a}) . mapping _Nat;
hccIPAddress :: Lens' HealthCheckConfig (Maybe Text)
hccIPAddress = lens _hccIPAddress (\ s a -> s{_hccIPAddress = a});
hccSearchString :: Lens' HealthCheckConfig (Maybe Text)
hccSearchString = lens _hccSearchString (\ s a -> s{_hccSearchString = a});
hccHealthThreshold :: Lens' HealthCheckConfig (Maybe Natural)
hccHealthThreshold = lens _hccHealthThreshold (\ s a -> s{_hccHealthThreshold = a}) . mapping _Nat;
hccResourcePath :: Lens' HealthCheckConfig (Maybe Text)
hccResourcePath = lens _hccResourcePath (\ s a -> s{_hccResourcePath = a});
hccMeasureLatency :: Lens' HealthCheckConfig (Maybe Bool)
hccMeasureLatency = lens _hccMeasureLatency (\ s a -> s{_hccMeasureLatency = a});
hccInverted :: Lens' HealthCheckConfig (Maybe Bool)
hccInverted = lens _hccInverted (\ s a -> s{_hccInverted = a});
hccFullyQualifiedDomainName :: Lens' HealthCheckConfig (Maybe Text)
hccFullyQualifiedDomainName = lens _hccFullyQualifiedDomainName (\ s a -> s{_hccFullyQualifiedDomainName = a});
hccChildHealthChecks :: Lens' HealthCheckConfig [Text]
hccChildHealthChecks = lens _hccChildHealthChecks (\ s a -> s{_hccChildHealthChecks = a}) . _Default . _Coerce;
hccRequestInterval :: Lens' HealthCheckConfig (Maybe Natural)
hccRequestInterval = lens _hccRequestInterval (\ s a -> s{_hccRequestInterval = a}) . mapping _Nat;
hccPort :: Lens' HealthCheckConfig (Maybe Natural)
hccPort = lens _hccPort (\ s a -> s{_hccPort = a}) . mapping _Nat;
hccType :: Lens' HealthCheckConfig HealthCheckType
hccType = lens _hccType (\ s a -> s{_hccType = a});
instance FromXML HealthCheckConfig where
parseXML x
= HealthCheckConfig' <$>
(x .@? "FailureThreshold") <*> (x .@? "IPAddress")
<*> (x .@? "SearchString")
<*> (x .@? "HealthThreshold")
<*> (x .@? "ResourcePath")
<*> (x .@? "MeasureLatency")
<*> (x .@? "Inverted")
<*> (x .@? "FullyQualifiedDomainName")
<*>
(x .@? "ChildHealthChecks" .!@ mempty >>=
may (parseXMLList "ChildHealthCheck"))
<*> (x .@? "RequestInterval")
<*> (x .@? "Port")
<*> (x .@ "Type")
instance ToXML HealthCheckConfig where
toXML HealthCheckConfig'{..}
= mconcat
["FailureThreshold" @= _hccFailureThreshold,
"IPAddress" @= _hccIPAddress,
"SearchString" @= _hccSearchString,
"HealthThreshold" @= _hccHealthThreshold,
"ResourcePath" @= _hccResourcePath,
"MeasureLatency" @= _hccMeasureLatency,
"Inverted" @= _hccInverted,
"FullyQualifiedDomainName" @=
_hccFullyQualifiedDomainName,
"ChildHealthChecks" @=
toXML
(toXMLList "ChildHealthCheck" <$>
_hccChildHealthChecks),
"RequestInterval" @= _hccRequestInterval,
"Port" @= _hccPort, "Type" @= _hccType]
data HealthCheckObservation = HealthCheckObservation'
{ _hcoIPAddress :: !(Maybe Text)
, _hcoStatusReport :: !(Maybe StatusReport)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
healthCheckObservation
:: HealthCheckObservation
healthCheckObservation =
HealthCheckObservation'
{ _hcoIPAddress = Nothing
, _hcoStatusReport = Nothing
}
hcoIPAddress :: Lens' HealthCheckObservation (Maybe Text)
hcoIPAddress = lens _hcoIPAddress (\ s a -> s{_hcoIPAddress = a});
hcoStatusReport :: Lens' HealthCheckObservation (Maybe StatusReport)
hcoStatusReport = lens _hcoStatusReport (\ s a -> s{_hcoStatusReport = a});
instance FromXML HealthCheckObservation where
parseXML x
= HealthCheckObservation' <$>
(x .@? "IPAddress") <*> (x .@? "StatusReport")
data HostedZone = HostedZone'
{ _hzConfig :: !(Maybe HostedZoneConfig)
, _hzResourceRecordSetCount :: !(Maybe Integer)
, _hzId :: !Text
, _hzName :: !Text
, _hzCallerReference :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
hostedZone
:: Text
-> Text
-> Text
-> HostedZone
hostedZone pId_ pName_ pCallerReference_ =
HostedZone'
{ _hzConfig = Nothing
, _hzResourceRecordSetCount = Nothing
, _hzId = pId_
, _hzName = pName_
, _hzCallerReference = pCallerReference_
}
hzConfig :: Lens' HostedZone (Maybe HostedZoneConfig)
hzConfig = lens _hzConfig (\ s a -> s{_hzConfig = a});
hzResourceRecordSetCount :: Lens' HostedZone (Maybe Integer)
hzResourceRecordSetCount = lens _hzResourceRecordSetCount (\ s a -> s{_hzResourceRecordSetCount = a});
hzId :: Lens' HostedZone Text
hzId = lens _hzId (\ s a -> s{_hzId = a});
hzName :: Lens' HostedZone Text
hzName = lens _hzName (\ s a -> s{_hzName = a});
hzCallerReference :: Lens' HostedZone Text
hzCallerReference = lens _hzCallerReference (\ s a -> s{_hzCallerReference = a});
instance FromXML HostedZone where
parseXML x
= HostedZone' <$>
(x .@? "Config") <*> (x .@? "ResourceRecordSetCount")
<*> (x .@ "Id")
<*> (x .@ "Name")
<*> (x .@ "CallerReference")
data HostedZoneConfig = HostedZoneConfig'
{ _hzcPrivateZone :: !(Maybe Bool)
, _hzcComment :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
hostedZoneConfig
:: HostedZoneConfig
hostedZoneConfig =
HostedZoneConfig'
{ _hzcPrivateZone = Nothing
, _hzcComment = Nothing
}
hzcPrivateZone :: Lens' HostedZoneConfig (Maybe Bool)
hzcPrivateZone = lens _hzcPrivateZone (\ s a -> s{_hzcPrivateZone = a});
hzcComment :: Lens' HostedZoneConfig (Maybe Text)
hzcComment = lens _hzcComment (\ s a -> s{_hzcComment = a});
instance FromXML HostedZoneConfig where
parseXML x
= HostedZoneConfig' <$>
(x .@? "PrivateZone") <*> (x .@? "Comment")
instance ToXML HostedZoneConfig where
toXML HostedZoneConfig'{..}
= mconcat
["PrivateZone" @= _hzcPrivateZone,
"Comment" @= _hzcComment]
newtype ResourceRecord = ResourceRecord'
{ _rrValue :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
resourceRecord
:: Text
-> ResourceRecord
resourceRecord pValue_ =
ResourceRecord'
{ _rrValue = pValue_
}
rrValue :: Lens' ResourceRecord Text
rrValue = lens _rrValue (\ s a -> s{_rrValue = a});
instance FromXML ResourceRecord where
parseXML x = ResourceRecord' <$> (x .@ "Value")
instance ToXML ResourceRecord where
toXML ResourceRecord'{..}
= mconcat ["Value" @= _rrValue]
data ResourceRecordSet = ResourceRecordSet'
{ _rrsTTL :: !(Maybe Nat)
, _rrsResourceRecords :: !(Maybe (List1 ResourceRecord))
, _rrsAliasTarget :: !(Maybe AliasTarget)
, _rrsWeight :: !(Maybe Nat)
, _rrsSetIdentifier :: !(Maybe Text)
, _rrsFailover :: !(Maybe Failover)
, _rrsHealthCheckId :: !(Maybe Text)
, _rrsRegion :: !(Maybe Region)
, _rrsGeoLocation :: !(Maybe GeoLocation)
, _rrsName :: !Text
, _rrsType :: !RecordType
} deriving (Eq,Read,Show,Data,Typeable,Generic)
resourceRecordSet
:: Text
-> RecordType
-> ResourceRecordSet
resourceRecordSet pName_ pType_ =
ResourceRecordSet'
{ _rrsTTL = Nothing
, _rrsResourceRecords = Nothing
, _rrsAliasTarget = Nothing
, _rrsWeight = Nothing
, _rrsSetIdentifier = Nothing
, _rrsFailover = Nothing
, _rrsHealthCheckId = Nothing
, _rrsRegion = Nothing
, _rrsGeoLocation = Nothing
, _rrsName = pName_
, _rrsType = pType_
}
rrsTTL :: Lens' ResourceRecordSet (Maybe Natural)
rrsTTL = lens _rrsTTL (\ s a -> s{_rrsTTL = a}) . mapping _Nat;
rrsResourceRecords :: Lens' ResourceRecordSet (Maybe (NonEmpty ResourceRecord))
rrsResourceRecords = lens _rrsResourceRecords (\ s a -> s{_rrsResourceRecords = a}) . mapping _List1;
rrsAliasTarget :: Lens' ResourceRecordSet (Maybe AliasTarget)
rrsAliasTarget = lens _rrsAliasTarget (\ s a -> s{_rrsAliasTarget = a});
rrsWeight :: Lens' ResourceRecordSet (Maybe Natural)
rrsWeight = lens _rrsWeight (\ s a -> s{_rrsWeight = a}) . mapping _Nat;
rrsSetIdentifier :: Lens' ResourceRecordSet (Maybe Text)
rrsSetIdentifier = lens _rrsSetIdentifier (\ s a -> s{_rrsSetIdentifier = a});
rrsFailover :: Lens' ResourceRecordSet (Maybe Failover)
rrsFailover = lens _rrsFailover (\ s a -> s{_rrsFailover = a});
rrsHealthCheckId :: Lens' ResourceRecordSet (Maybe Text)
rrsHealthCheckId = lens _rrsHealthCheckId (\ s a -> s{_rrsHealthCheckId = a});
rrsRegion :: Lens' ResourceRecordSet (Maybe Region)
rrsRegion = lens _rrsRegion (\ s a -> s{_rrsRegion = a});
rrsGeoLocation :: Lens' ResourceRecordSet (Maybe GeoLocation)
rrsGeoLocation = lens _rrsGeoLocation (\ s a -> s{_rrsGeoLocation = a});
rrsName :: Lens' ResourceRecordSet Text
rrsName = lens _rrsName (\ s a -> s{_rrsName = a});
rrsType :: Lens' ResourceRecordSet RecordType
rrsType = lens _rrsType (\ s a -> s{_rrsType = a});
instance FromXML ResourceRecordSet where
parseXML x
= ResourceRecordSet' <$>
(x .@? "TTL") <*>
(x .@? "ResourceRecords" .!@ mempty >>=
may (parseXMLList1 "ResourceRecord"))
<*> (x .@? "AliasTarget")
<*> (x .@? "Weight")
<*> (x .@? "SetIdentifier")
<*> (x .@? "Failover")
<*> (x .@? "HealthCheckId")
<*> (x .@? "Region")
<*> (x .@? "GeoLocation")
<*> (x .@ "Name")
<*> (x .@ "Type")
instance ToXML ResourceRecordSet where
toXML ResourceRecordSet'{..}
= mconcat
["TTL" @= _rrsTTL,
"ResourceRecords" @=
toXML
(toXMLList "ResourceRecord" <$> _rrsResourceRecords),
"AliasTarget" @= _rrsAliasTarget,
"Weight" @= _rrsWeight,
"SetIdentifier" @= _rrsSetIdentifier,
"Failover" @= _rrsFailover,
"HealthCheckId" @= _rrsHealthCheckId,
"Region" @= _rrsRegion,
"GeoLocation" @= _rrsGeoLocation, "Name" @= _rrsName,
"Type" @= _rrsType]
data ResourceTagSet = ResourceTagSet'
{ _rtsResourceId :: !(Maybe Text)
, _rtsResourceType :: !(Maybe TagResourceType)
, _rtsTags :: !(Maybe (List1 Tag))
} deriving (Eq,Read,Show,Data,Typeable,Generic)
resourceTagSet
:: ResourceTagSet
resourceTagSet =
ResourceTagSet'
{ _rtsResourceId = Nothing
, _rtsResourceType = Nothing
, _rtsTags = Nothing
}
rtsResourceId :: Lens' ResourceTagSet (Maybe Text)
rtsResourceId = lens _rtsResourceId (\ s a -> s{_rtsResourceId = a});
rtsResourceType :: Lens' ResourceTagSet (Maybe TagResourceType)
rtsResourceType = lens _rtsResourceType (\ s a -> s{_rtsResourceType = a});
rtsTags :: Lens' ResourceTagSet (Maybe (NonEmpty Tag))
rtsTags = lens _rtsTags (\ s a -> s{_rtsTags = a}) . mapping _List1;
instance FromXML ResourceTagSet where
parseXML x
= ResourceTagSet' <$>
(x .@? "ResourceId") <*> (x .@? "ResourceType") <*>
(x .@? "Tags" .!@ mempty >>=
may (parseXMLList1 "Tag"))
data StatusReport = StatusReport'
{ _srStatus :: !(Maybe Text)
, _srCheckedTime :: !(Maybe ISO8601)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
statusReport
:: StatusReport
statusReport =
StatusReport'
{ _srStatus = Nothing
, _srCheckedTime = Nothing
}
srStatus :: Lens' StatusReport (Maybe Text)
srStatus = lens _srStatus (\ s a -> s{_srStatus = a});
srCheckedTime :: Lens' StatusReport (Maybe UTCTime)
srCheckedTime = lens _srCheckedTime (\ s a -> s{_srCheckedTime = a}) . mapping _Time;
instance FromXML StatusReport where
parseXML x
= StatusReport' <$>
(x .@? "Status") <*> (x .@? "CheckedTime")
data Tag = Tag'
{ _tagValue :: !(Maybe Text)
, _tagKey :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
tag
:: Tag
tag =
Tag'
{ _tagValue = Nothing
, _tagKey = Nothing
}
tagValue :: Lens' Tag (Maybe Text)
tagValue = lens _tagValue (\ s a -> s{_tagValue = a});
tagKey :: Lens' Tag (Maybe Text)
tagKey = lens _tagKey (\ s a -> s{_tagKey = a});
instance FromXML Tag where
parseXML x
= Tag' <$> (x .@? "Value") <*> (x .@? "Key")
instance ToXML Tag where
toXML Tag'{..}
= mconcat ["Value" @= _tagValue, "Key" @= _tagKey]
data VPC = VPC'
{ _vpcVPCRegion :: !(Maybe VPCRegion)
, _vpcVPCId :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
vpc
:: VPC
vpc =
VPC'
{ _vpcVPCRegion = Nothing
, _vpcVPCId = Nothing
}
vpcVPCRegion :: Lens' VPC (Maybe VPCRegion)
vpcVPCRegion = lens _vpcVPCRegion (\ s a -> s{_vpcVPCRegion = a});
vpcVPCId :: Lens' VPC (Maybe Text)
vpcVPCId = lens _vpcVPCId (\ s a -> s{_vpcVPCId = a});
instance FromXML VPC where
parseXML x
= VPC' <$> (x .@? "VPCRegion") <*> (x .@? "VPCId")
instance ToXML VPC where
toXML VPC'{..}
= mconcat
["VPCRegion" @= _vpcVPCRegion, "VPCId" @= _vpcVPCId]