module Network.AWS.Lightsail.Types.Product where
import Network.AWS.Lens
import Network.AWS.Lightsail.Types.Sum
import Network.AWS.Prelude
data AvailabilityZone = AvailabilityZone'
{ _azState :: !(Maybe Text)
, _azZoneName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
availabilityZone
:: AvailabilityZone
availabilityZone = AvailabilityZone' {_azState = Nothing, _azZoneName = Nothing}
azState :: Lens' AvailabilityZone (Maybe Text)
azState = lens _azState (\ s a -> s{_azState = a});
azZoneName :: Lens' AvailabilityZone (Maybe Text)
azZoneName = lens _azZoneName (\ s a -> s{_azZoneName = a});
instance FromJSON AvailabilityZone where
parseJSON
= withObject "AvailabilityZone"
(\ x ->
AvailabilityZone' <$>
(x .:? "state") <*> (x .:? "zoneName"))
instance Hashable AvailabilityZone where
instance NFData AvailabilityZone where
data Blueprint = Blueprint'
{ _bVersionCode :: !(Maybe Text)
, _bPlatform :: !(Maybe InstancePlatform)
, _bGroup :: !(Maybe Text)
, _bMinPower :: !(Maybe Int)
, _bProductURL :: !(Maybe Text)
, _bLicenseURL :: !(Maybe Text)
, _bName :: !(Maybe Text)
, _bVersion :: !(Maybe Text)
, _bBlueprintId :: !(Maybe Text)
, _bType :: !(Maybe BlueprintType)
, _bIsActive :: !(Maybe Bool)
, _bDescription :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
blueprint
:: Blueprint
blueprint =
Blueprint'
{ _bVersionCode = Nothing
, _bPlatform = Nothing
, _bGroup = Nothing
, _bMinPower = Nothing
, _bProductURL = Nothing
, _bLicenseURL = Nothing
, _bName = Nothing
, _bVersion = Nothing
, _bBlueprintId = Nothing
, _bType = Nothing
, _bIsActive = Nothing
, _bDescription = Nothing
}
bVersionCode :: Lens' Blueprint (Maybe Text)
bVersionCode = lens _bVersionCode (\ s a -> s{_bVersionCode = a});
bPlatform :: Lens' Blueprint (Maybe InstancePlatform)
bPlatform = lens _bPlatform (\ s a -> s{_bPlatform = a});
bGroup :: Lens' Blueprint (Maybe Text)
bGroup = lens _bGroup (\ s a -> s{_bGroup = a});
bMinPower :: Lens' Blueprint (Maybe Int)
bMinPower = lens _bMinPower (\ s a -> s{_bMinPower = a});
bProductURL :: Lens' Blueprint (Maybe Text)
bProductURL = lens _bProductURL (\ s a -> s{_bProductURL = a});
bLicenseURL :: Lens' Blueprint (Maybe Text)
bLicenseURL = lens _bLicenseURL (\ s a -> s{_bLicenseURL = a});
bName :: Lens' Blueprint (Maybe Text)
bName = lens _bName (\ s a -> s{_bName = a});
bVersion :: Lens' Blueprint (Maybe Text)
bVersion = lens _bVersion (\ s a -> s{_bVersion = a});
bBlueprintId :: Lens' Blueprint (Maybe Text)
bBlueprintId = lens _bBlueprintId (\ s a -> s{_bBlueprintId = a});
bType :: Lens' Blueprint (Maybe BlueprintType)
bType = lens _bType (\ s a -> s{_bType = a});
bIsActive :: Lens' Blueprint (Maybe Bool)
bIsActive = lens _bIsActive (\ s a -> s{_bIsActive = a});
bDescription :: Lens' Blueprint (Maybe Text)
bDescription = lens _bDescription (\ s a -> s{_bDescription = a});
instance FromJSON Blueprint where
parseJSON
= withObject "Blueprint"
(\ x ->
Blueprint' <$>
(x .:? "versionCode") <*> (x .:? "platform") <*>
(x .:? "group")
<*> (x .:? "minPower")
<*> (x .:? "productUrl")
<*> (x .:? "licenseUrl")
<*> (x .:? "name")
<*> (x .:? "version")
<*> (x .:? "blueprintId")
<*> (x .:? "type")
<*> (x .:? "isActive")
<*> (x .:? "description"))
instance Hashable Blueprint where
instance NFData Blueprint where
data Bundle = Bundle'
{ _bunCpuCount :: !(Maybe Int)
, _bunTransferPerMonthInGb :: !(Maybe Int)
, _bunBundleId :: !(Maybe Text)
, _bunInstanceType :: !(Maybe Text)
, _bunName :: !(Maybe Text)
, _bunPower :: !(Maybe Int)
, _bunDiskSizeInGb :: !(Maybe Int)
, _bunSupportedPlatforms :: !(Maybe [InstancePlatform])
, _bunPrice :: !(Maybe Double)
, _bunIsActive :: !(Maybe Bool)
, _bunRamSizeInGb :: !(Maybe Double)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
bundle
:: Bundle
bundle =
Bundle'
{ _bunCpuCount = Nothing
, _bunTransferPerMonthInGb = Nothing
, _bunBundleId = Nothing
, _bunInstanceType = Nothing
, _bunName = Nothing
, _bunPower = Nothing
, _bunDiskSizeInGb = Nothing
, _bunSupportedPlatforms = Nothing
, _bunPrice = Nothing
, _bunIsActive = Nothing
, _bunRamSizeInGb = Nothing
}
bunCpuCount :: Lens' Bundle (Maybe Int)
bunCpuCount = lens _bunCpuCount (\ s a -> s{_bunCpuCount = a});
bunTransferPerMonthInGb :: Lens' Bundle (Maybe Int)
bunTransferPerMonthInGb = lens _bunTransferPerMonthInGb (\ s a -> s{_bunTransferPerMonthInGb = a});
bunBundleId :: Lens' Bundle (Maybe Text)
bunBundleId = lens _bunBundleId (\ s a -> s{_bunBundleId = a});
bunInstanceType :: Lens' Bundle (Maybe Text)
bunInstanceType = lens _bunInstanceType (\ s a -> s{_bunInstanceType = a});
bunName :: Lens' Bundle (Maybe Text)
bunName = lens _bunName (\ s a -> s{_bunName = a});
bunPower :: Lens' Bundle (Maybe Int)
bunPower = lens _bunPower (\ s a -> s{_bunPower = a});
bunDiskSizeInGb :: Lens' Bundle (Maybe Int)
bunDiskSizeInGb = lens _bunDiskSizeInGb (\ s a -> s{_bunDiskSizeInGb = a});
bunSupportedPlatforms :: Lens' Bundle [InstancePlatform]
bunSupportedPlatforms = lens _bunSupportedPlatforms (\ s a -> s{_bunSupportedPlatforms = a}) . _Default . _Coerce;
bunPrice :: Lens' Bundle (Maybe Double)
bunPrice = lens _bunPrice (\ s a -> s{_bunPrice = a});
bunIsActive :: Lens' Bundle (Maybe Bool)
bunIsActive = lens _bunIsActive (\ s a -> s{_bunIsActive = a});
bunRamSizeInGb :: Lens' Bundle (Maybe Double)
bunRamSizeInGb = lens _bunRamSizeInGb (\ s a -> s{_bunRamSizeInGb = a});
instance FromJSON Bundle where
parseJSON
= withObject "Bundle"
(\ x ->
Bundle' <$>
(x .:? "cpuCount") <*> (x .:? "transferPerMonthInGb")
<*> (x .:? "bundleId")
<*> (x .:? "instanceType")
<*> (x .:? "name")
<*> (x .:? "power")
<*> (x .:? "diskSizeInGb")
<*> (x .:? "supportedPlatforms" .!= mempty)
<*> (x .:? "price")
<*> (x .:? "isActive")
<*> (x .:? "ramSizeInGb"))
instance Hashable Bundle where
instance NFData Bundle where
data Disk = Disk'
{ _dResourceType :: !(Maybe ResourceType)
, _dArn :: !(Maybe Text)
, _dPath :: !(Maybe Text)
, _dCreatedAt :: !(Maybe POSIX)
, _dLocation :: !(Maybe ResourceLocation)
, _dIops :: !(Maybe Int)
, _dIsAttached :: !(Maybe Bool)
, _dAttachmentState :: !(Maybe Text)
, _dName :: !(Maybe Text)
, _dSizeInGb :: !(Maybe Int)
, _dSupportCode :: !(Maybe Text)
, _dIsSystemDisk :: !(Maybe Bool)
, _dAttachedTo :: !(Maybe Text)
, _dGbInUse :: !(Maybe Int)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
disk
:: Disk
disk =
Disk'
{ _dResourceType = Nothing
, _dArn = Nothing
, _dPath = Nothing
, _dCreatedAt = Nothing
, _dLocation = Nothing
, _dIops = Nothing
, _dIsAttached = Nothing
, _dAttachmentState = Nothing
, _dName = Nothing
, _dSizeInGb = Nothing
, _dSupportCode = Nothing
, _dIsSystemDisk = Nothing
, _dAttachedTo = Nothing
, _dGbInUse = Nothing
}
dResourceType :: Lens' Disk (Maybe ResourceType)
dResourceType = lens _dResourceType (\ s a -> s{_dResourceType = a});
dArn :: Lens' Disk (Maybe Text)
dArn = lens _dArn (\ s a -> s{_dArn = a});
dPath :: Lens' Disk (Maybe Text)
dPath = lens _dPath (\ s a -> s{_dPath = a});
dCreatedAt :: Lens' Disk (Maybe UTCTime)
dCreatedAt = lens _dCreatedAt (\ s a -> s{_dCreatedAt = a}) . mapping _Time;
dLocation :: Lens' Disk (Maybe ResourceLocation)
dLocation = lens _dLocation (\ s a -> s{_dLocation = a});
dIops :: Lens' Disk (Maybe Int)
dIops = lens _dIops (\ s a -> s{_dIops = a});
dIsAttached :: Lens' Disk (Maybe Bool)
dIsAttached = lens _dIsAttached (\ s a -> s{_dIsAttached = a});
dAttachmentState :: Lens' Disk (Maybe Text)
dAttachmentState = lens _dAttachmentState (\ s a -> s{_dAttachmentState = a});
dName :: Lens' Disk (Maybe Text)
dName = lens _dName (\ s a -> s{_dName = a});
dSizeInGb :: Lens' Disk (Maybe Int)
dSizeInGb = lens _dSizeInGb (\ s a -> s{_dSizeInGb = a});
dSupportCode :: Lens' Disk (Maybe Text)
dSupportCode = lens _dSupportCode (\ s a -> s{_dSupportCode = a});
dIsSystemDisk :: Lens' Disk (Maybe Bool)
dIsSystemDisk = lens _dIsSystemDisk (\ s a -> s{_dIsSystemDisk = a});
dAttachedTo :: Lens' Disk (Maybe Text)
dAttachedTo = lens _dAttachedTo (\ s a -> s{_dAttachedTo = a});
dGbInUse :: Lens' Disk (Maybe Int)
dGbInUse = lens _dGbInUse (\ s a -> s{_dGbInUse = a});
instance FromJSON Disk where
parseJSON
= withObject "Disk"
(\ x ->
Disk' <$>
(x .:? "resourceType") <*> (x .:? "arn") <*>
(x .:? "path")
<*> (x .:? "createdAt")
<*> (x .:? "location")
<*> (x .:? "iops")
<*> (x .:? "isAttached")
<*> (x .:? "attachmentState")
<*> (x .:? "name")
<*> (x .:? "sizeInGb")
<*> (x .:? "supportCode")
<*> (x .:? "isSystemDisk")
<*> (x .:? "attachedTo")
<*> (x .:? "gbInUse"))
instance Hashable Disk where
instance NFData Disk where
data Domain = Domain'
{ _domResourceType :: !(Maybe ResourceType)
, _domDomainEntries :: !(Maybe [DomainEntry])
, _domArn :: !(Maybe Text)
, _domCreatedAt :: !(Maybe POSIX)
, _domLocation :: !(Maybe ResourceLocation)
, _domName :: !(Maybe Text)
, _domSupportCode :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
domain
:: Domain
domain =
Domain'
{ _domResourceType = Nothing
, _domDomainEntries = Nothing
, _domArn = Nothing
, _domCreatedAt = Nothing
, _domLocation = Nothing
, _domName = Nothing
, _domSupportCode = Nothing
}
domResourceType :: Lens' Domain (Maybe ResourceType)
domResourceType = lens _domResourceType (\ s a -> s{_domResourceType = a});
domDomainEntries :: Lens' Domain [DomainEntry]
domDomainEntries = lens _domDomainEntries (\ s a -> s{_domDomainEntries = a}) . _Default . _Coerce;
domArn :: Lens' Domain (Maybe Text)
domArn = lens _domArn (\ s a -> s{_domArn = a});
domCreatedAt :: Lens' Domain (Maybe UTCTime)
domCreatedAt = lens _domCreatedAt (\ s a -> s{_domCreatedAt = a}) . mapping _Time;
domLocation :: Lens' Domain (Maybe ResourceLocation)
domLocation = lens _domLocation (\ s a -> s{_domLocation = a});
domName :: Lens' Domain (Maybe Text)
domName = lens _domName (\ s a -> s{_domName = a});
domSupportCode :: Lens' Domain (Maybe Text)
domSupportCode = lens _domSupportCode (\ s a -> s{_domSupportCode = a});
instance FromJSON Domain where
parseJSON
= withObject "Domain"
(\ x ->
Domain' <$>
(x .:? "resourceType") <*>
(x .:? "domainEntries" .!= mempty)
<*> (x .:? "arn")
<*> (x .:? "createdAt")
<*> (x .:? "location")
<*> (x .:? "name")
<*> (x .:? "supportCode"))
instance Hashable Domain where
instance NFData Domain where
data DomainEntry = DomainEntry'
{ _deName :: !(Maybe Text)
, _deId :: !(Maybe Text)
, _deOptions :: !(Maybe (Map Text Text))
, _deType :: !(Maybe Text)
, _deTarget :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
domainEntry
:: DomainEntry
domainEntry =
DomainEntry'
{ _deName = Nothing
, _deId = Nothing
, _deOptions = Nothing
, _deType = Nothing
, _deTarget = Nothing
}
deName :: Lens' DomainEntry (Maybe Text)
deName = lens _deName (\ s a -> s{_deName = a});
deId :: Lens' DomainEntry (Maybe Text)
deId = lens _deId (\ s a -> s{_deId = a});
deOptions :: Lens' DomainEntry (HashMap Text Text)
deOptions = lens _deOptions (\ s a -> s{_deOptions = a}) . _Default . _Map;
deType :: Lens' DomainEntry (Maybe Text)
deType = lens _deType (\ s a -> s{_deType = a});
deTarget :: Lens' DomainEntry (Maybe Text)
deTarget = lens _deTarget (\ s a -> s{_deTarget = a});
instance FromJSON DomainEntry where
parseJSON
= withObject "DomainEntry"
(\ x ->
DomainEntry' <$>
(x .:? "name") <*> (x .:? "id") <*>
(x .:? "options" .!= mempty)
<*> (x .:? "type")
<*> (x .:? "target"))
instance Hashable DomainEntry where
instance NFData DomainEntry where
instance ToJSON DomainEntry where
toJSON DomainEntry'{..}
= object
(catMaybes
[("name" .=) <$> _deName, ("id" .=) <$> _deId,
("options" .=) <$> _deOptions,
("type" .=) <$> _deType,
("target" .=) <$> _deTarget])
data Instance = Instance'
{ _iState :: !(Maybe InstanceState)
, _iIpv6Address :: !(Maybe Text)
, _iResourceType :: !(Maybe ResourceType)
, _iArn :: !(Maybe Text)
, _iCreatedAt :: !(Maybe POSIX)
, _iLocation :: !(Maybe ResourceLocation)
, _iSshKeyName :: !(Maybe Text)
, _iUsername :: !(Maybe Text)
, _iNetworking :: !(Maybe InstanceNetworking)
, _iBundleId :: !(Maybe Text)
, _iName :: !(Maybe Text)
, _iSupportCode :: !(Maybe Text)
, _iBlueprintId :: !(Maybe Text)
, _iPrivateIPAddress :: !(Maybe Text)
, _iBlueprintName :: !(Maybe Text)
, _iIsStaticIP :: !(Maybe Bool)
, _iPublicIPAddress :: !(Maybe Text)
, _iHardware :: !(Maybe InstanceHardware)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
instance'
:: Instance
instance' =
Instance'
{ _iState = Nothing
, _iIpv6Address = Nothing
, _iResourceType = Nothing
, _iArn = Nothing
, _iCreatedAt = Nothing
, _iLocation = Nothing
, _iSshKeyName = Nothing
, _iUsername = Nothing
, _iNetworking = Nothing
, _iBundleId = Nothing
, _iName = Nothing
, _iSupportCode = Nothing
, _iBlueprintId = Nothing
, _iPrivateIPAddress = Nothing
, _iBlueprintName = Nothing
, _iIsStaticIP = Nothing
, _iPublicIPAddress = Nothing
, _iHardware = Nothing
}
iState :: Lens' Instance (Maybe InstanceState)
iState = lens _iState (\ s a -> s{_iState = a});
iIpv6Address :: Lens' Instance (Maybe Text)
iIpv6Address = lens _iIpv6Address (\ s a -> s{_iIpv6Address = a});
iResourceType :: Lens' Instance (Maybe ResourceType)
iResourceType = lens _iResourceType (\ s a -> s{_iResourceType = a});
iArn :: Lens' Instance (Maybe Text)
iArn = lens _iArn (\ s a -> s{_iArn = a});
iCreatedAt :: Lens' Instance (Maybe UTCTime)
iCreatedAt = lens _iCreatedAt (\ s a -> s{_iCreatedAt = a}) . mapping _Time;
iLocation :: Lens' Instance (Maybe ResourceLocation)
iLocation = lens _iLocation (\ s a -> s{_iLocation = a});
iSshKeyName :: Lens' Instance (Maybe Text)
iSshKeyName = lens _iSshKeyName (\ s a -> s{_iSshKeyName = a});
iUsername :: Lens' Instance (Maybe Text)
iUsername = lens _iUsername (\ s a -> s{_iUsername = a});
iNetworking :: Lens' Instance (Maybe InstanceNetworking)
iNetworking = lens _iNetworking (\ s a -> s{_iNetworking = a});
iBundleId :: Lens' Instance (Maybe Text)
iBundleId = lens _iBundleId (\ s a -> s{_iBundleId = a});
iName :: Lens' Instance (Maybe Text)
iName = lens _iName (\ s a -> s{_iName = a});
iSupportCode :: Lens' Instance (Maybe Text)
iSupportCode = lens _iSupportCode (\ s a -> s{_iSupportCode = a});
iBlueprintId :: Lens' Instance (Maybe Text)
iBlueprintId = lens _iBlueprintId (\ s a -> s{_iBlueprintId = a});
iPrivateIPAddress :: Lens' Instance (Maybe Text)
iPrivateIPAddress = lens _iPrivateIPAddress (\ s a -> s{_iPrivateIPAddress = a});
iBlueprintName :: Lens' Instance (Maybe Text)
iBlueprintName = lens _iBlueprintName (\ s a -> s{_iBlueprintName = a});
iIsStaticIP :: Lens' Instance (Maybe Bool)
iIsStaticIP = lens _iIsStaticIP (\ s a -> s{_iIsStaticIP = a});
iPublicIPAddress :: Lens' Instance (Maybe Text)
iPublicIPAddress = lens _iPublicIPAddress (\ s a -> s{_iPublicIPAddress = a});
iHardware :: Lens' Instance (Maybe InstanceHardware)
iHardware = lens _iHardware (\ s a -> s{_iHardware = a});
instance FromJSON Instance where
parseJSON
= withObject "Instance"
(\ x ->
Instance' <$>
(x .:? "state") <*> (x .:? "ipv6Address") <*>
(x .:? "resourceType")
<*> (x .:? "arn")
<*> (x .:? "createdAt")
<*> (x .:? "location")
<*> (x .:? "sshKeyName")
<*> (x .:? "username")
<*> (x .:? "networking")
<*> (x .:? "bundleId")
<*> (x .:? "name")
<*> (x .:? "supportCode")
<*> (x .:? "blueprintId")
<*> (x .:? "privateIpAddress")
<*> (x .:? "blueprintName")
<*> (x .:? "isStaticIp")
<*> (x .:? "publicIpAddress")
<*> (x .:? "hardware"))
instance Hashable Instance where
instance NFData Instance where
data InstanceAccessDetails = InstanceAccessDetails'
{ _iadCertKey :: !(Maybe Text)
, _iadIpAddress :: !(Maybe Text)
, _iadPrivateKey :: !(Maybe Text)
, _iadExpiresAt :: !(Maybe POSIX)
, _iadUsername :: !(Maybe Text)
, _iadProtocol :: !(Maybe InstanceAccessProtocol)
, _iadPasswordData :: !(Maybe PasswordData)
, _iadPassword :: !(Maybe Text)
, _iadInstanceName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
instanceAccessDetails
:: InstanceAccessDetails
instanceAccessDetails =
InstanceAccessDetails'
{ _iadCertKey = Nothing
, _iadIpAddress = Nothing
, _iadPrivateKey = Nothing
, _iadExpiresAt = Nothing
, _iadUsername = Nothing
, _iadProtocol = Nothing
, _iadPasswordData = Nothing
, _iadPassword = Nothing
, _iadInstanceName = Nothing
}
iadCertKey :: Lens' InstanceAccessDetails (Maybe Text)
iadCertKey = lens _iadCertKey (\ s a -> s{_iadCertKey = a});
iadIpAddress :: Lens' InstanceAccessDetails (Maybe Text)
iadIpAddress = lens _iadIpAddress (\ s a -> s{_iadIpAddress = a});
iadPrivateKey :: Lens' InstanceAccessDetails (Maybe Text)
iadPrivateKey = lens _iadPrivateKey (\ s a -> s{_iadPrivateKey = a});
iadExpiresAt :: Lens' InstanceAccessDetails (Maybe UTCTime)
iadExpiresAt = lens _iadExpiresAt (\ s a -> s{_iadExpiresAt = a}) . mapping _Time;
iadUsername :: Lens' InstanceAccessDetails (Maybe Text)
iadUsername = lens _iadUsername (\ s a -> s{_iadUsername = a});
iadProtocol :: Lens' InstanceAccessDetails (Maybe InstanceAccessProtocol)
iadProtocol = lens _iadProtocol (\ s a -> s{_iadProtocol = a});
iadPasswordData :: Lens' InstanceAccessDetails (Maybe PasswordData)
iadPasswordData = lens _iadPasswordData (\ s a -> s{_iadPasswordData = a});
iadPassword :: Lens' InstanceAccessDetails (Maybe Text)
iadPassword = lens _iadPassword (\ s a -> s{_iadPassword = a});
iadInstanceName :: Lens' InstanceAccessDetails (Maybe Text)
iadInstanceName = lens _iadInstanceName (\ s a -> s{_iadInstanceName = a});
instance FromJSON InstanceAccessDetails where
parseJSON
= withObject "InstanceAccessDetails"
(\ x ->
InstanceAccessDetails' <$>
(x .:? "certKey") <*> (x .:? "ipAddress") <*>
(x .:? "privateKey")
<*> (x .:? "expiresAt")
<*> (x .:? "username")
<*> (x .:? "protocol")
<*> (x .:? "passwordData")
<*> (x .:? "password")
<*> (x .:? "instanceName"))
instance Hashable InstanceAccessDetails where
instance NFData InstanceAccessDetails where
data InstanceHardware = InstanceHardware'
{ _ihCpuCount :: !(Maybe Int)
, _ihDisks :: !(Maybe [Disk])
, _ihRamSizeInGb :: !(Maybe Double)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
instanceHardware
:: InstanceHardware
instanceHardware =
InstanceHardware'
{_ihCpuCount = Nothing, _ihDisks = Nothing, _ihRamSizeInGb = Nothing}
ihCpuCount :: Lens' InstanceHardware (Maybe Int)
ihCpuCount = lens _ihCpuCount (\ s a -> s{_ihCpuCount = a});
ihDisks :: Lens' InstanceHardware [Disk]
ihDisks = lens _ihDisks (\ s a -> s{_ihDisks = a}) . _Default . _Coerce;
ihRamSizeInGb :: Lens' InstanceHardware (Maybe Double)
ihRamSizeInGb = lens _ihRamSizeInGb (\ s a -> s{_ihRamSizeInGb = a});
instance FromJSON InstanceHardware where
parseJSON
= withObject "InstanceHardware"
(\ x ->
InstanceHardware' <$>
(x .:? "cpuCount") <*> (x .:? "disks" .!= mempty) <*>
(x .:? "ramSizeInGb"))
instance Hashable InstanceHardware where
instance NFData InstanceHardware where
data InstanceNetworking = InstanceNetworking'
{ _inMonthlyTransfer :: !(Maybe MonthlyTransfer)
, _inPorts :: !(Maybe [InstancePortInfo])
} deriving (Eq, Read, Show, Data, Typeable, Generic)
instanceNetworking
:: InstanceNetworking
instanceNetworking =
InstanceNetworking' {_inMonthlyTransfer = Nothing, _inPorts = Nothing}
inMonthlyTransfer :: Lens' InstanceNetworking (Maybe MonthlyTransfer)
inMonthlyTransfer = lens _inMonthlyTransfer (\ s a -> s{_inMonthlyTransfer = a});
inPorts :: Lens' InstanceNetworking [InstancePortInfo]
inPorts = lens _inPorts (\ s a -> s{_inPorts = a}) . _Default . _Coerce;
instance FromJSON InstanceNetworking where
parseJSON
= withObject "InstanceNetworking"
(\ x ->
InstanceNetworking' <$>
(x .:? "monthlyTransfer") <*>
(x .:? "ports" .!= mempty))
instance Hashable InstanceNetworking where
instance NFData InstanceNetworking where
data InstancePortInfo = InstancePortInfo'
{ _ipiFromPort :: !(Maybe Nat)
, _ipiCommonName :: !(Maybe Text)
, _ipiProtocol :: !(Maybe NetworkProtocol)
, _ipiAccessDirection :: !(Maybe AccessDirection)
, _ipiAccessType :: !(Maybe PortAccessType)
, _ipiToPort :: !(Maybe Nat)
, _ipiAccessFrom :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
instancePortInfo
:: InstancePortInfo
instancePortInfo =
InstancePortInfo'
{ _ipiFromPort = Nothing
, _ipiCommonName = Nothing
, _ipiProtocol = Nothing
, _ipiAccessDirection = Nothing
, _ipiAccessType = Nothing
, _ipiToPort = Nothing
, _ipiAccessFrom = Nothing
}
ipiFromPort :: Lens' InstancePortInfo (Maybe Natural)
ipiFromPort = lens _ipiFromPort (\ s a -> s{_ipiFromPort = a}) . mapping _Nat;
ipiCommonName :: Lens' InstancePortInfo (Maybe Text)
ipiCommonName = lens _ipiCommonName (\ s a -> s{_ipiCommonName = a});
ipiProtocol :: Lens' InstancePortInfo (Maybe NetworkProtocol)
ipiProtocol = lens _ipiProtocol (\ s a -> s{_ipiProtocol = a});
ipiAccessDirection :: Lens' InstancePortInfo (Maybe AccessDirection)
ipiAccessDirection = lens _ipiAccessDirection (\ s a -> s{_ipiAccessDirection = a});
ipiAccessType :: Lens' InstancePortInfo (Maybe PortAccessType)
ipiAccessType = lens _ipiAccessType (\ s a -> s{_ipiAccessType = a});
ipiToPort :: Lens' InstancePortInfo (Maybe Natural)
ipiToPort = lens _ipiToPort (\ s a -> s{_ipiToPort = a}) . mapping _Nat;
ipiAccessFrom :: Lens' InstancePortInfo (Maybe Text)
ipiAccessFrom = lens _ipiAccessFrom (\ s a -> s{_ipiAccessFrom = a});
instance FromJSON InstancePortInfo where
parseJSON
= withObject "InstancePortInfo"
(\ x ->
InstancePortInfo' <$>
(x .:? "fromPort") <*> (x .:? "commonName") <*>
(x .:? "protocol")
<*> (x .:? "accessDirection")
<*> (x .:? "accessType")
<*> (x .:? "toPort")
<*> (x .:? "accessFrom"))
instance Hashable InstancePortInfo where
instance NFData InstancePortInfo where
data InstancePortState = InstancePortState'
{ _ipsFromPort :: !(Maybe Nat)
, _ipsState :: !(Maybe PortState)
, _ipsProtocol :: !(Maybe NetworkProtocol)
, _ipsToPort :: !(Maybe Nat)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
instancePortState
:: InstancePortState
instancePortState =
InstancePortState'
{ _ipsFromPort = Nothing
, _ipsState = Nothing
, _ipsProtocol = Nothing
, _ipsToPort = Nothing
}
ipsFromPort :: Lens' InstancePortState (Maybe Natural)
ipsFromPort = lens _ipsFromPort (\ s a -> s{_ipsFromPort = a}) . mapping _Nat;
ipsState :: Lens' InstancePortState (Maybe PortState)
ipsState = lens _ipsState (\ s a -> s{_ipsState = a});
ipsProtocol :: Lens' InstancePortState (Maybe NetworkProtocol)
ipsProtocol = lens _ipsProtocol (\ s a -> s{_ipsProtocol = a});
ipsToPort :: Lens' InstancePortState (Maybe Natural)
ipsToPort = lens _ipsToPort (\ s a -> s{_ipsToPort = a}) . mapping _Nat;
instance FromJSON InstancePortState where
parseJSON
= withObject "InstancePortState"
(\ x ->
InstancePortState' <$>
(x .:? "fromPort") <*> (x .:? "state") <*>
(x .:? "protocol")
<*> (x .:? "toPort"))
instance Hashable InstancePortState where
instance NFData InstancePortState where
data InstanceSnapshot = InstanceSnapshot'
{ _insFromBlueprintId :: !(Maybe Text)
, _insState :: !(Maybe InstanceSnapshotState)
, _insResourceType :: !(Maybe ResourceType)
, _insArn :: !(Maybe Text)
, _insCreatedAt :: !(Maybe POSIX)
, _insLocation :: !(Maybe ResourceLocation)
, _insProgress :: !(Maybe Text)
, _insName :: !(Maybe Text)
, _insFromBundleId :: !(Maybe Text)
, _insSizeInGb :: !(Maybe Int)
, _insSupportCode :: !(Maybe Text)
, _insFromInstanceARN :: !(Maybe Text)
, _insFromInstanceName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
instanceSnapshot
:: InstanceSnapshot
instanceSnapshot =
InstanceSnapshot'
{ _insFromBlueprintId = Nothing
, _insState = Nothing
, _insResourceType = Nothing
, _insArn = Nothing
, _insCreatedAt = Nothing
, _insLocation = Nothing
, _insProgress = Nothing
, _insName = Nothing
, _insFromBundleId = Nothing
, _insSizeInGb = Nothing
, _insSupportCode = Nothing
, _insFromInstanceARN = Nothing
, _insFromInstanceName = Nothing
}
insFromBlueprintId :: Lens' InstanceSnapshot (Maybe Text)
insFromBlueprintId = lens _insFromBlueprintId (\ s a -> s{_insFromBlueprintId = a});
insState :: Lens' InstanceSnapshot (Maybe InstanceSnapshotState)
insState = lens _insState (\ s a -> s{_insState = a});
insResourceType :: Lens' InstanceSnapshot (Maybe ResourceType)
insResourceType = lens _insResourceType (\ s a -> s{_insResourceType = a});
insArn :: Lens' InstanceSnapshot (Maybe Text)
insArn = lens _insArn (\ s a -> s{_insArn = a});
insCreatedAt :: Lens' InstanceSnapshot (Maybe UTCTime)
insCreatedAt = lens _insCreatedAt (\ s a -> s{_insCreatedAt = a}) . mapping _Time;
insLocation :: Lens' InstanceSnapshot (Maybe ResourceLocation)
insLocation = lens _insLocation (\ s a -> s{_insLocation = a});
insProgress :: Lens' InstanceSnapshot (Maybe Text)
insProgress = lens _insProgress (\ s a -> s{_insProgress = a});
insName :: Lens' InstanceSnapshot (Maybe Text)
insName = lens _insName (\ s a -> s{_insName = a});
insFromBundleId :: Lens' InstanceSnapshot (Maybe Text)
insFromBundleId = lens _insFromBundleId (\ s a -> s{_insFromBundleId = a});
insSizeInGb :: Lens' InstanceSnapshot (Maybe Int)
insSizeInGb = lens _insSizeInGb (\ s a -> s{_insSizeInGb = a});
insSupportCode :: Lens' InstanceSnapshot (Maybe Text)
insSupportCode = lens _insSupportCode (\ s a -> s{_insSupportCode = a});
insFromInstanceARN :: Lens' InstanceSnapshot (Maybe Text)
insFromInstanceARN = lens _insFromInstanceARN (\ s a -> s{_insFromInstanceARN = a});
insFromInstanceName :: Lens' InstanceSnapshot (Maybe Text)
insFromInstanceName = lens _insFromInstanceName (\ s a -> s{_insFromInstanceName = a});
instance FromJSON InstanceSnapshot where
parseJSON
= withObject "InstanceSnapshot"
(\ x ->
InstanceSnapshot' <$>
(x .:? "fromBlueprintId") <*> (x .:? "state") <*>
(x .:? "resourceType")
<*> (x .:? "arn")
<*> (x .:? "createdAt")
<*> (x .:? "location")
<*> (x .:? "progress")
<*> (x .:? "name")
<*> (x .:? "fromBundleId")
<*> (x .:? "sizeInGb")
<*> (x .:? "supportCode")
<*> (x .:? "fromInstanceArn")
<*> (x .:? "fromInstanceName"))
instance Hashable InstanceSnapshot where
instance NFData InstanceSnapshot where
data InstanceState = InstanceState'
{ _isName :: !(Maybe Text)
, _isCode :: !(Maybe Int)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
instanceState
:: InstanceState
instanceState = InstanceState' {_isName = Nothing, _isCode = Nothing}
isName :: Lens' InstanceState (Maybe Text)
isName = lens _isName (\ s a -> s{_isName = a});
isCode :: Lens' InstanceState (Maybe Int)
isCode = lens _isCode (\ s a -> s{_isCode = a});
instance FromJSON InstanceState where
parseJSON
= withObject "InstanceState"
(\ x ->
InstanceState' <$> (x .:? "name") <*> (x .:? "code"))
instance Hashable InstanceState where
instance NFData InstanceState where
data KeyPair = KeyPair'
{ _kpResourceType :: !(Maybe ResourceType)
, _kpArn :: !(Maybe Text)
, _kpCreatedAt :: !(Maybe POSIX)
, _kpLocation :: !(Maybe ResourceLocation)
, _kpFingerprint :: !(Maybe Text)
, _kpName :: !(Maybe Text)
, _kpSupportCode :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
keyPair
:: KeyPair
keyPair =
KeyPair'
{ _kpResourceType = Nothing
, _kpArn = Nothing
, _kpCreatedAt = Nothing
, _kpLocation = Nothing
, _kpFingerprint = Nothing
, _kpName = Nothing
, _kpSupportCode = Nothing
}
kpResourceType :: Lens' KeyPair (Maybe ResourceType)
kpResourceType = lens _kpResourceType (\ s a -> s{_kpResourceType = a});
kpArn :: Lens' KeyPair (Maybe Text)
kpArn = lens _kpArn (\ s a -> s{_kpArn = a});
kpCreatedAt :: Lens' KeyPair (Maybe UTCTime)
kpCreatedAt = lens _kpCreatedAt (\ s a -> s{_kpCreatedAt = a}) . mapping _Time;
kpLocation :: Lens' KeyPair (Maybe ResourceLocation)
kpLocation = lens _kpLocation (\ s a -> s{_kpLocation = a});
kpFingerprint :: Lens' KeyPair (Maybe Text)
kpFingerprint = lens _kpFingerprint (\ s a -> s{_kpFingerprint = a});
kpName :: Lens' KeyPair (Maybe Text)
kpName = lens _kpName (\ s a -> s{_kpName = a});
kpSupportCode :: Lens' KeyPair (Maybe Text)
kpSupportCode = lens _kpSupportCode (\ s a -> s{_kpSupportCode = a});
instance FromJSON KeyPair where
parseJSON
= withObject "KeyPair"
(\ x ->
KeyPair' <$>
(x .:? "resourceType") <*> (x .:? "arn") <*>
(x .:? "createdAt")
<*> (x .:? "location")
<*> (x .:? "fingerprint")
<*> (x .:? "name")
<*> (x .:? "supportCode"))
instance Hashable KeyPair where
instance NFData KeyPair where
data MetricDatapoint = MetricDatapoint'
{ _mdSampleCount :: !(Maybe Double)
, _mdMaximum :: !(Maybe Double)
, _mdAverage :: !(Maybe Double)
, _mdMinimum :: !(Maybe Double)
, _mdSum :: !(Maybe Double)
, _mdTimestamp :: !(Maybe POSIX)
, _mdUnit :: !(Maybe MetricUnit)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
metricDatapoint
:: MetricDatapoint
metricDatapoint =
MetricDatapoint'
{ _mdSampleCount = Nothing
, _mdMaximum = Nothing
, _mdAverage = Nothing
, _mdMinimum = Nothing
, _mdSum = Nothing
, _mdTimestamp = Nothing
, _mdUnit = Nothing
}
mdSampleCount :: Lens' MetricDatapoint (Maybe Double)
mdSampleCount = lens _mdSampleCount (\ s a -> s{_mdSampleCount = a});
mdMaximum :: Lens' MetricDatapoint (Maybe Double)
mdMaximum = lens _mdMaximum (\ s a -> s{_mdMaximum = a});
mdAverage :: Lens' MetricDatapoint (Maybe Double)
mdAverage = lens _mdAverage (\ s a -> s{_mdAverage = a});
mdMinimum :: Lens' MetricDatapoint (Maybe Double)
mdMinimum = lens _mdMinimum (\ s a -> s{_mdMinimum = a});
mdSum :: Lens' MetricDatapoint (Maybe Double)
mdSum = lens _mdSum (\ s a -> s{_mdSum = a});
mdTimestamp :: Lens' MetricDatapoint (Maybe UTCTime)
mdTimestamp = lens _mdTimestamp (\ s a -> s{_mdTimestamp = a}) . mapping _Time;
mdUnit :: Lens' MetricDatapoint (Maybe MetricUnit)
mdUnit = lens _mdUnit (\ s a -> s{_mdUnit = a});
instance FromJSON MetricDatapoint where
parseJSON
= withObject "MetricDatapoint"
(\ x ->
MetricDatapoint' <$>
(x .:? "sampleCount") <*> (x .:? "maximum") <*>
(x .:? "average")
<*> (x .:? "minimum")
<*> (x .:? "sum")
<*> (x .:? "timestamp")
<*> (x .:? "unit"))
instance Hashable MetricDatapoint where
instance NFData MetricDatapoint where
newtype MonthlyTransfer = MonthlyTransfer'
{ _mtGbPerMonthAllocated :: Maybe Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
monthlyTransfer
:: MonthlyTransfer
monthlyTransfer = MonthlyTransfer' {_mtGbPerMonthAllocated = Nothing}
mtGbPerMonthAllocated :: Lens' MonthlyTransfer (Maybe Int)
mtGbPerMonthAllocated = lens _mtGbPerMonthAllocated (\ s a -> s{_mtGbPerMonthAllocated = a});
instance FromJSON MonthlyTransfer where
parseJSON
= withObject "MonthlyTransfer"
(\ x ->
MonthlyTransfer' <$> (x .:? "gbPerMonthAllocated"))
instance Hashable MonthlyTransfer where
instance NFData MonthlyTransfer where
data Operation = Operation'
{ _oStatus :: !(Maybe OperationStatus)
, _oOperationDetails :: !(Maybe Text)
, _oResourceType :: !(Maybe ResourceType)
, _oCreatedAt :: !(Maybe POSIX)
, _oResourceName :: !(Maybe Text)
, _oLocation :: !(Maybe ResourceLocation)
, _oStatusChangedAt :: !(Maybe POSIX)
, _oErrorDetails :: !(Maybe Text)
, _oErrorCode :: !(Maybe Text)
, _oId :: !(Maybe Text)
, _oOperationType :: !(Maybe OperationType)
, _oIsTerminal :: !(Maybe Bool)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
operation
:: Operation
operation =
Operation'
{ _oStatus = Nothing
, _oOperationDetails = Nothing
, _oResourceType = Nothing
, _oCreatedAt = Nothing
, _oResourceName = Nothing
, _oLocation = Nothing
, _oStatusChangedAt = Nothing
, _oErrorDetails = Nothing
, _oErrorCode = Nothing
, _oId = Nothing
, _oOperationType = Nothing
, _oIsTerminal = Nothing
}
oStatus :: Lens' Operation (Maybe OperationStatus)
oStatus = lens _oStatus (\ s a -> s{_oStatus = a});
oOperationDetails :: Lens' Operation (Maybe Text)
oOperationDetails = lens _oOperationDetails (\ s a -> s{_oOperationDetails = a});
oResourceType :: Lens' Operation (Maybe ResourceType)
oResourceType = lens _oResourceType (\ s a -> s{_oResourceType = a});
oCreatedAt :: Lens' Operation (Maybe UTCTime)
oCreatedAt = lens _oCreatedAt (\ s a -> s{_oCreatedAt = a}) . mapping _Time;
oResourceName :: Lens' Operation (Maybe Text)
oResourceName = lens _oResourceName (\ s a -> s{_oResourceName = a});
oLocation :: Lens' Operation (Maybe ResourceLocation)
oLocation = lens _oLocation (\ s a -> s{_oLocation = a});
oStatusChangedAt :: Lens' Operation (Maybe UTCTime)
oStatusChangedAt = lens _oStatusChangedAt (\ s a -> s{_oStatusChangedAt = a}) . mapping _Time;
oErrorDetails :: Lens' Operation (Maybe Text)
oErrorDetails = lens _oErrorDetails (\ s a -> s{_oErrorDetails = a});
oErrorCode :: Lens' Operation (Maybe Text)
oErrorCode = lens _oErrorCode (\ s a -> s{_oErrorCode = a});
oId :: Lens' Operation (Maybe Text)
oId = lens _oId (\ s a -> s{_oId = a});
oOperationType :: Lens' Operation (Maybe OperationType)
oOperationType = lens _oOperationType (\ s a -> s{_oOperationType = a});
oIsTerminal :: Lens' Operation (Maybe Bool)
oIsTerminal = lens _oIsTerminal (\ s a -> s{_oIsTerminal = a});
instance FromJSON Operation where
parseJSON
= withObject "Operation"
(\ x ->
Operation' <$>
(x .:? "status") <*> (x .:? "operationDetails") <*>
(x .:? "resourceType")
<*> (x .:? "createdAt")
<*> (x .:? "resourceName")
<*> (x .:? "location")
<*> (x .:? "statusChangedAt")
<*> (x .:? "errorDetails")
<*> (x .:? "errorCode")
<*> (x .:? "id")
<*> (x .:? "operationType")
<*> (x .:? "isTerminal"))
instance Hashable Operation where
instance NFData Operation where
data PasswordData = PasswordData'
{ _pdKeyPairName :: !(Maybe Text)
, _pdCiphertext :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
passwordData
:: PasswordData
passwordData = PasswordData' {_pdKeyPairName = Nothing, _pdCiphertext = Nothing}
pdKeyPairName :: Lens' PasswordData (Maybe Text)
pdKeyPairName = lens _pdKeyPairName (\ s a -> s{_pdKeyPairName = a});
pdCiphertext :: Lens' PasswordData (Maybe Text)
pdCiphertext = lens _pdCiphertext (\ s a -> s{_pdCiphertext = a});
instance FromJSON PasswordData where
parseJSON
= withObject "PasswordData"
(\ x ->
PasswordData' <$>
(x .:? "keyPairName") <*> (x .:? "ciphertext"))
instance Hashable PasswordData where
instance NFData PasswordData where
data PortInfo = PortInfo'
{ _piFromPort :: !(Maybe Nat)
, _piProtocol :: !(Maybe NetworkProtocol)
, _piToPort :: !(Maybe Nat)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
portInfo
:: PortInfo
portInfo =
PortInfo' {_piFromPort = Nothing, _piProtocol = Nothing, _piToPort = Nothing}
piFromPort :: Lens' PortInfo (Maybe Natural)
piFromPort = lens _piFromPort (\ s a -> s{_piFromPort = a}) . mapping _Nat;
piProtocol :: Lens' PortInfo (Maybe NetworkProtocol)
piProtocol = lens _piProtocol (\ s a -> s{_piProtocol = a});
piToPort :: Lens' PortInfo (Maybe Natural)
piToPort = lens _piToPort (\ s a -> s{_piToPort = a}) . mapping _Nat;
instance Hashable PortInfo where
instance NFData PortInfo where
instance ToJSON PortInfo where
toJSON PortInfo'{..}
= object
(catMaybes
[("fromPort" .=) <$> _piFromPort,
("protocol" .=) <$> _piProtocol,
("toPort" .=) <$> _piToPort])
data RegionInfo = RegionInfo'
{ _riAvailabilityZones :: !(Maybe [AvailabilityZone])
, _riName :: !(Maybe RegionName)
, _riDisplayName :: !(Maybe Text)
, _riContinentCode :: !(Maybe Text)
, _riDescription :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
regionInfo
:: RegionInfo
regionInfo =
RegionInfo'
{ _riAvailabilityZones = Nothing
, _riName = Nothing
, _riDisplayName = Nothing
, _riContinentCode = Nothing
, _riDescription = Nothing
}
riAvailabilityZones :: Lens' RegionInfo [AvailabilityZone]
riAvailabilityZones = lens _riAvailabilityZones (\ s a -> s{_riAvailabilityZones = a}) . _Default . _Coerce;
riName :: Lens' RegionInfo (Maybe RegionName)
riName = lens _riName (\ s a -> s{_riName = a});
riDisplayName :: Lens' RegionInfo (Maybe Text)
riDisplayName = lens _riDisplayName (\ s a -> s{_riDisplayName = a});
riContinentCode :: Lens' RegionInfo (Maybe Text)
riContinentCode = lens _riContinentCode (\ s a -> s{_riContinentCode = a});
riDescription :: Lens' RegionInfo (Maybe Text)
riDescription = lens _riDescription (\ s a -> s{_riDescription = a});
instance FromJSON RegionInfo where
parseJSON
= withObject "RegionInfo"
(\ x ->
RegionInfo' <$>
(x .:? "availabilityZones" .!= mempty) <*>
(x .:? "name")
<*> (x .:? "displayName")
<*> (x .:? "continentCode")
<*> (x .:? "description"))
instance Hashable RegionInfo where
instance NFData RegionInfo where
data ResourceLocation = ResourceLocation'
{ _rlRegionName :: !(Maybe RegionName)
, _rlAvailabilityZone :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
resourceLocation
:: ResourceLocation
resourceLocation =
ResourceLocation' {_rlRegionName = Nothing, _rlAvailabilityZone = Nothing}
rlRegionName :: Lens' ResourceLocation (Maybe RegionName)
rlRegionName = lens _rlRegionName (\ s a -> s{_rlRegionName = a});
rlAvailabilityZone :: Lens' ResourceLocation (Maybe Text)
rlAvailabilityZone = lens _rlAvailabilityZone (\ s a -> s{_rlAvailabilityZone = a});
instance FromJSON ResourceLocation where
parseJSON
= withObject "ResourceLocation"
(\ x ->
ResourceLocation' <$>
(x .:? "regionName") <*> (x .:? "availabilityZone"))
instance Hashable ResourceLocation where
instance NFData ResourceLocation where
data StaticIP = StaticIP'
{ _siIpAddress :: !(Maybe Text)
, _siResourceType :: !(Maybe ResourceType)
, _siArn :: !(Maybe Text)
, _siCreatedAt :: !(Maybe POSIX)
, _siLocation :: !(Maybe ResourceLocation)
, _siIsAttached :: !(Maybe Bool)
, _siName :: !(Maybe Text)
, _siSupportCode :: !(Maybe Text)
, _siAttachedTo :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
staticIP
:: StaticIP
staticIP =
StaticIP'
{ _siIpAddress = Nothing
, _siResourceType = Nothing
, _siArn = Nothing
, _siCreatedAt = Nothing
, _siLocation = Nothing
, _siIsAttached = Nothing
, _siName = Nothing
, _siSupportCode = Nothing
, _siAttachedTo = Nothing
}
siIpAddress :: Lens' StaticIP (Maybe Text)
siIpAddress = lens _siIpAddress (\ s a -> s{_siIpAddress = a});
siResourceType :: Lens' StaticIP (Maybe ResourceType)
siResourceType = lens _siResourceType (\ s a -> s{_siResourceType = a});
siArn :: Lens' StaticIP (Maybe Text)
siArn = lens _siArn (\ s a -> s{_siArn = a});
siCreatedAt :: Lens' StaticIP (Maybe UTCTime)
siCreatedAt = lens _siCreatedAt (\ s a -> s{_siCreatedAt = a}) . mapping _Time;
siLocation :: Lens' StaticIP (Maybe ResourceLocation)
siLocation = lens _siLocation (\ s a -> s{_siLocation = a});
siIsAttached :: Lens' StaticIP (Maybe Bool)
siIsAttached = lens _siIsAttached (\ s a -> s{_siIsAttached = a});
siName :: Lens' StaticIP (Maybe Text)
siName = lens _siName (\ s a -> s{_siName = a});
siSupportCode :: Lens' StaticIP (Maybe Text)
siSupportCode = lens _siSupportCode (\ s a -> s{_siSupportCode = a});
siAttachedTo :: Lens' StaticIP (Maybe Text)
siAttachedTo = lens _siAttachedTo (\ s a -> s{_siAttachedTo = a});
instance FromJSON StaticIP where
parseJSON
= withObject "StaticIP"
(\ x ->
StaticIP' <$>
(x .:? "ipAddress") <*> (x .:? "resourceType") <*>
(x .:? "arn")
<*> (x .:? "createdAt")
<*> (x .:? "location")
<*> (x .:? "isAttached")
<*> (x .:? "name")
<*> (x .:? "supportCode")
<*> (x .:? "attachedTo"))
instance Hashable StaticIP where
instance NFData StaticIP where