module Network.AWS.Glacier.Types.Product where
import Network.AWS.Glacier.Types.Sum
import Network.AWS.Prelude
data ArchiveCreationOutput = ArchiveCreationOutput'
{ _acoArchiveId :: !(Maybe Text)
, _acoChecksum :: !(Maybe Text)
, _acoLocation :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
archiveCreationOutput
:: ArchiveCreationOutput
archiveCreationOutput =
ArchiveCreationOutput'
{ _acoArchiveId = Nothing
, _acoChecksum = Nothing
, _acoLocation = Nothing
}
acoArchiveId :: Lens' ArchiveCreationOutput (Maybe Text)
acoArchiveId = lens _acoArchiveId (\ s a -> s{_acoArchiveId = a});
acoChecksum :: Lens' ArchiveCreationOutput (Maybe Text)
acoChecksum = lens _acoChecksum (\ s a -> s{_acoChecksum = a});
acoLocation :: Lens' ArchiveCreationOutput (Maybe Text)
acoLocation = lens _acoLocation (\ s a -> s{_acoLocation = a});
instance FromJSON ArchiveCreationOutput where
parseJSON
= withObject "ArchiveCreationOutput"
(\ x ->
ArchiveCreationOutput' <$>
(x .:? "x-amz-archive-id") <*>
(x .:? "x-amz-sha256-tree-hash")
<*> (x .:? "Location"))
newtype DataRetrievalPolicy = DataRetrievalPolicy'
{ _drpRules :: Maybe [DataRetrievalRule]
} deriving (Eq,Read,Show,Data,Typeable,Generic)
dataRetrievalPolicy
:: DataRetrievalPolicy
dataRetrievalPolicy =
DataRetrievalPolicy'
{ _drpRules = Nothing
}
drpRules :: Lens' DataRetrievalPolicy [DataRetrievalRule]
drpRules = lens _drpRules (\ s a -> s{_drpRules = a}) . _Default . _Coerce;
instance FromJSON DataRetrievalPolicy where
parseJSON
= withObject "DataRetrievalPolicy"
(\ x ->
DataRetrievalPolicy' <$> (x .:? "Rules" .!= mempty))
instance ToJSON DataRetrievalPolicy where
toJSON DataRetrievalPolicy'{..}
= object (catMaybes [("Rules" .=) <$> _drpRules])
data DataRetrievalRule = DataRetrievalRule'
{ _drrStrategy :: !(Maybe Text)
, _drrBytesPerHour :: !(Maybe Integer)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
dataRetrievalRule
:: DataRetrievalRule
dataRetrievalRule =
DataRetrievalRule'
{ _drrStrategy = Nothing
, _drrBytesPerHour = Nothing
}
drrStrategy :: Lens' DataRetrievalRule (Maybe Text)
drrStrategy = lens _drrStrategy (\ s a -> s{_drrStrategy = a});
drrBytesPerHour :: Lens' DataRetrievalRule (Maybe Integer)
drrBytesPerHour = lens _drrBytesPerHour (\ s a -> s{_drrBytesPerHour = a});
instance FromJSON DataRetrievalRule where
parseJSON
= withObject "DataRetrievalRule"
(\ x ->
DataRetrievalRule' <$>
(x .:? "Strategy") <*> (x .:? "BytesPerHour"))
instance ToJSON DataRetrievalRule where
toJSON DataRetrievalRule'{..}
= object
(catMaybes
[("Strategy" .=) <$> _drrStrategy,
("BytesPerHour" .=) <$> _drrBytesPerHour])
data DescribeVaultOutput = DescribeVaultOutput'
{ _dvoVaultName :: !(Maybe Text)
, _dvoSizeInBytes :: !(Maybe Integer)
, _dvoLastInventoryDate :: !(Maybe Text)
, _dvoVaultARN :: !(Maybe Text)
, _dvoCreationDate :: !(Maybe Text)
, _dvoNumberOfArchives :: !(Maybe Integer)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeVaultOutput
:: DescribeVaultOutput
describeVaultOutput =
DescribeVaultOutput'
{ _dvoVaultName = Nothing
, _dvoSizeInBytes = Nothing
, _dvoLastInventoryDate = Nothing
, _dvoVaultARN = Nothing
, _dvoCreationDate = Nothing
, _dvoNumberOfArchives = Nothing
}
dvoVaultName :: Lens' DescribeVaultOutput (Maybe Text)
dvoVaultName = lens _dvoVaultName (\ s a -> s{_dvoVaultName = a});
dvoSizeInBytes :: Lens' DescribeVaultOutput (Maybe Integer)
dvoSizeInBytes = lens _dvoSizeInBytes (\ s a -> s{_dvoSizeInBytes = a});
dvoLastInventoryDate :: Lens' DescribeVaultOutput (Maybe Text)
dvoLastInventoryDate = lens _dvoLastInventoryDate (\ s a -> s{_dvoLastInventoryDate = a});
dvoVaultARN :: Lens' DescribeVaultOutput (Maybe Text)
dvoVaultARN = lens _dvoVaultARN (\ s a -> s{_dvoVaultARN = a});
dvoCreationDate :: Lens' DescribeVaultOutput (Maybe Text)
dvoCreationDate = lens _dvoCreationDate (\ s a -> s{_dvoCreationDate = a});
dvoNumberOfArchives :: Lens' DescribeVaultOutput (Maybe Integer)
dvoNumberOfArchives = lens _dvoNumberOfArchives (\ s a -> s{_dvoNumberOfArchives = a});
instance FromJSON DescribeVaultOutput where
parseJSON
= withObject "DescribeVaultOutput"
(\ x ->
DescribeVaultOutput' <$>
(x .:? "VaultName") <*> (x .:? "SizeInBytes") <*>
(x .:? "LastInventoryDate")
<*> (x .:? "VaultARN")
<*> (x .:? "CreationDate")
<*> (x .:? "NumberOfArchives"))
data GlacierJobDescription = GlacierJobDescription'
{ _gjdSHA256TreeHash :: !(Maybe Text)
, _gjdArchiveId :: !(Maybe Text)
, _gjdJobId :: !(Maybe Text)
, _gjdRetrievalByteRange :: !(Maybe Text)
, _gjdInventoryRetrievalParameters :: !(Maybe InventoryRetrievalJobDescription)
, _gjdAction :: !(Maybe ActionCode)
, _gjdJobDescription :: !(Maybe Text)
, _gjdSNSTopic :: !(Maybe Text)
, _gjdStatusMessage :: !(Maybe Text)
, _gjdVaultARN :: !(Maybe Text)
, _gjdArchiveSHA256TreeHash :: !(Maybe Text)
, _gjdCreationDate :: !(Maybe Text)
, _gjdCompleted :: !(Maybe Bool)
, _gjdCompletionDate :: !(Maybe Text)
, _gjdInventorySizeInBytes :: !(Maybe Integer)
, _gjdArchiveSizeInBytes :: !(Maybe Integer)
, _gjdStatusCode :: !(Maybe StatusCode)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
glacierJobDescription
:: GlacierJobDescription
glacierJobDescription =
GlacierJobDescription'
{ _gjdSHA256TreeHash = Nothing
, _gjdArchiveId = Nothing
, _gjdJobId = Nothing
, _gjdRetrievalByteRange = Nothing
, _gjdInventoryRetrievalParameters = Nothing
, _gjdAction = Nothing
, _gjdJobDescription = Nothing
, _gjdSNSTopic = Nothing
, _gjdStatusMessage = Nothing
, _gjdVaultARN = Nothing
, _gjdArchiveSHA256TreeHash = Nothing
, _gjdCreationDate = Nothing
, _gjdCompleted = Nothing
, _gjdCompletionDate = Nothing
, _gjdInventorySizeInBytes = Nothing
, _gjdArchiveSizeInBytes = Nothing
, _gjdStatusCode = Nothing
}
gjdSHA256TreeHash :: Lens' GlacierJobDescription (Maybe Text)
gjdSHA256TreeHash = lens _gjdSHA256TreeHash (\ s a -> s{_gjdSHA256TreeHash = a});
gjdArchiveId :: Lens' GlacierJobDescription (Maybe Text)
gjdArchiveId = lens _gjdArchiveId (\ s a -> s{_gjdArchiveId = a});
gjdJobId :: Lens' GlacierJobDescription (Maybe Text)
gjdJobId = lens _gjdJobId (\ s a -> s{_gjdJobId = a});
gjdRetrievalByteRange :: Lens' GlacierJobDescription (Maybe Text)
gjdRetrievalByteRange = lens _gjdRetrievalByteRange (\ s a -> s{_gjdRetrievalByteRange = a});
gjdInventoryRetrievalParameters :: Lens' GlacierJobDescription (Maybe InventoryRetrievalJobDescription)
gjdInventoryRetrievalParameters = lens _gjdInventoryRetrievalParameters (\ s a -> s{_gjdInventoryRetrievalParameters = a});
gjdAction :: Lens' GlacierJobDescription (Maybe ActionCode)
gjdAction = lens _gjdAction (\ s a -> s{_gjdAction = a});
gjdJobDescription :: Lens' GlacierJobDescription (Maybe Text)
gjdJobDescription = lens _gjdJobDescription (\ s a -> s{_gjdJobDescription = a});
gjdSNSTopic :: Lens' GlacierJobDescription (Maybe Text)
gjdSNSTopic = lens _gjdSNSTopic (\ s a -> s{_gjdSNSTopic = a});
gjdStatusMessage :: Lens' GlacierJobDescription (Maybe Text)
gjdStatusMessage = lens _gjdStatusMessage (\ s a -> s{_gjdStatusMessage = a});
gjdVaultARN :: Lens' GlacierJobDescription (Maybe Text)
gjdVaultARN = lens _gjdVaultARN (\ s a -> s{_gjdVaultARN = a});
gjdArchiveSHA256TreeHash :: Lens' GlacierJobDescription (Maybe Text)
gjdArchiveSHA256TreeHash = lens _gjdArchiveSHA256TreeHash (\ s a -> s{_gjdArchiveSHA256TreeHash = a});
gjdCreationDate :: Lens' GlacierJobDescription (Maybe Text)
gjdCreationDate = lens _gjdCreationDate (\ s a -> s{_gjdCreationDate = a});
gjdCompleted :: Lens' GlacierJobDescription (Maybe Bool)
gjdCompleted = lens _gjdCompleted (\ s a -> s{_gjdCompleted = a});
gjdCompletionDate :: Lens' GlacierJobDescription (Maybe Text)
gjdCompletionDate = lens _gjdCompletionDate (\ s a -> s{_gjdCompletionDate = a});
gjdInventorySizeInBytes :: Lens' GlacierJobDescription (Maybe Integer)
gjdInventorySizeInBytes = lens _gjdInventorySizeInBytes (\ s a -> s{_gjdInventorySizeInBytes = a});
gjdArchiveSizeInBytes :: Lens' GlacierJobDescription (Maybe Integer)
gjdArchiveSizeInBytes = lens _gjdArchiveSizeInBytes (\ s a -> s{_gjdArchiveSizeInBytes = a});
gjdStatusCode :: Lens' GlacierJobDescription (Maybe StatusCode)
gjdStatusCode = lens _gjdStatusCode (\ s a -> s{_gjdStatusCode = a});
instance FromJSON GlacierJobDescription where
parseJSON
= withObject "GlacierJobDescription"
(\ x ->
GlacierJobDescription' <$>
(x .:? "SHA256TreeHash") <*> (x .:? "ArchiveId") <*>
(x .:? "JobId")
<*> (x .:? "RetrievalByteRange")
<*> (x .:? "InventoryRetrievalParameters")
<*> (x .:? "Action")
<*> (x .:? "JobDescription")
<*> (x .:? "SNSTopic")
<*> (x .:? "StatusMessage")
<*> (x .:? "VaultARN")
<*> (x .:? "ArchiveSHA256TreeHash")
<*> (x .:? "CreationDate")
<*> (x .:? "Completed")
<*> (x .:? "CompletionDate")
<*> (x .:? "InventorySizeInBytes")
<*> (x .:? "ArchiveSizeInBytes")
<*> (x .:? "StatusCode"))
data InventoryRetrievalJobDescription = InventoryRetrievalJobDescription'
{ _irjdFormat :: !(Maybe Text)
, _irjdEndDate :: !(Maybe Text)
, _irjdStartDate :: !(Maybe Text)
, _irjdMarker :: !(Maybe Text)
, _irjdLimit :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
inventoryRetrievalJobDescription
:: InventoryRetrievalJobDescription
inventoryRetrievalJobDescription =
InventoryRetrievalJobDescription'
{ _irjdFormat = Nothing
, _irjdEndDate = Nothing
, _irjdStartDate = Nothing
, _irjdMarker = Nothing
, _irjdLimit = Nothing
}
irjdFormat :: Lens' InventoryRetrievalJobDescription (Maybe Text)
irjdFormat = lens _irjdFormat (\ s a -> s{_irjdFormat = a});
irjdEndDate :: Lens' InventoryRetrievalJobDescription (Maybe Text)
irjdEndDate = lens _irjdEndDate (\ s a -> s{_irjdEndDate = a});
irjdStartDate :: Lens' InventoryRetrievalJobDescription (Maybe Text)
irjdStartDate = lens _irjdStartDate (\ s a -> s{_irjdStartDate = a});
irjdMarker :: Lens' InventoryRetrievalJobDescription (Maybe Text)
irjdMarker = lens _irjdMarker (\ s a -> s{_irjdMarker = a});
irjdLimit :: Lens' InventoryRetrievalJobDescription (Maybe Text)
irjdLimit = lens _irjdLimit (\ s a -> s{_irjdLimit = a});
instance FromJSON InventoryRetrievalJobDescription
where
parseJSON
= withObject "InventoryRetrievalJobDescription"
(\ x ->
InventoryRetrievalJobDescription' <$>
(x .:? "Format") <*> (x .:? "EndDate") <*>
(x .:? "StartDate")
<*> (x .:? "Marker")
<*> (x .:? "Limit"))
data InventoryRetrievalJobInput = InventoryRetrievalJobInput'
{ _irjiEndDate :: !(Maybe Text)
, _irjiStartDate :: !(Maybe Text)
, _irjiMarker :: !(Maybe Text)
, _irjiLimit :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
inventoryRetrievalJobInput
:: InventoryRetrievalJobInput
inventoryRetrievalJobInput =
InventoryRetrievalJobInput'
{ _irjiEndDate = Nothing
, _irjiStartDate = Nothing
, _irjiMarker = Nothing
, _irjiLimit = Nothing
}
irjiEndDate :: Lens' InventoryRetrievalJobInput (Maybe Text)
irjiEndDate = lens _irjiEndDate (\ s a -> s{_irjiEndDate = a});
irjiStartDate :: Lens' InventoryRetrievalJobInput (Maybe Text)
irjiStartDate = lens _irjiStartDate (\ s a -> s{_irjiStartDate = a});
irjiMarker :: Lens' InventoryRetrievalJobInput (Maybe Text)
irjiMarker = lens _irjiMarker (\ s a -> s{_irjiMarker = a});
irjiLimit :: Lens' InventoryRetrievalJobInput (Maybe Text)
irjiLimit = lens _irjiLimit (\ s a -> s{_irjiLimit = a});
instance ToJSON InventoryRetrievalJobInput where
toJSON InventoryRetrievalJobInput'{..}
= object
(catMaybes
[("EndDate" .=) <$> _irjiEndDate,
("StartDate" .=) <$> _irjiStartDate,
("Marker" .=) <$> _irjiMarker,
("Limit" .=) <$> _irjiLimit])
data JobParameters = JobParameters'
{ _jpArchiveId :: !(Maybe Text)
, _jpFormat :: !(Maybe Text)
, _jpRetrievalByteRange :: !(Maybe Text)
, _jpInventoryRetrievalParameters :: !(Maybe InventoryRetrievalJobInput)
, _jpSNSTopic :: !(Maybe Text)
, _jpType :: !(Maybe Text)
, _jpDescription :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
jobParameters
:: JobParameters
jobParameters =
JobParameters'
{ _jpArchiveId = Nothing
, _jpFormat = Nothing
, _jpRetrievalByteRange = Nothing
, _jpInventoryRetrievalParameters = Nothing
, _jpSNSTopic = Nothing
, _jpType = Nothing
, _jpDescription = Nothing
}
jpArchiveId :: Lens' JobParameters (Maybe Text)
jpArchiveId = lens _jpArchiveId (\ s a -> s{_jpArchiveId = a});
jpFormat :: Lens' JobParameters (Maybe Text)
jpFormat = lens _jpFormat (\ s a -> s{_jpFormat = a});
jpRetrievalByteRange :: Lens' JobParameters (Maybe Text)
jpRetrievalByteRange = lens _jpRetrievalByteRange (\ s a -> s{_jpRetrievalByteRange = a});
jpInventoryRetrievalParameters :: Lens' JobParameters (Maybe InventoryRetrievalJobInput)
jpInventoryRetrievalParameters = lens _jpInventoryRetrievalParameters (\ s a -> s{_jpInventoryRetrievalParameters = a});
jpSNSTopic :: Lens' JobParameters (Maybe Text)
jpSNSTopic = lens _jpSNSTopic (\ s a -> s{_jpSNSTopic = a});
jpType :: Lens' JobParameters (Maybe Text)
jpType = lens _jpType (\ s a -> s{_jpType = a});
jpDescription :: Lens' JobParameters (Maybe Text)
jpDescription = lens _jpDescription (\ s a -> s{_jpDescription = a});
instance ToJSON JobParameters where
toJSON JobParameters'{..}
= object
(catMaybes
[("ArchiveId" .=) <$> _jpArchiveId,
("Format" .=) <$> _jpFormat,
("RetrievalByteRange" .=) <$> _jpRetrievalByteRange,
("InventoryRetrievalParameters" .=) <$>
_jpInventoryRetrievalParameters,
("SNSTopic" .=) <$> _jpSNSTopic,
("Type" .=) <$> _jpType,
("Description" .=) <$> _jpDescription])
data PartListElement = PartListElement'
{ _pleSHA256TreeHash :: !(Maybe Text)
, _pleRangeInBytes :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
partListElement
:: PartListElement
partListElement =
PartListElement'
{ _pleSHA256TreeHash = Nothing
, _pleRangeInBytes = Nothing
}
pleSHA256TreeHash :: Lens' PartListElement (Maybe Text)
pleSHA256TreeHash = lens _pleSHA256TreeHash (\ s a -> s{_pleSHA256TreeHash = a});
pleRangeInBytes :: Lens' PartListElement (Maybe Text)
pleRangeInBytes = lens _pleRangeInBytes (\ s a -> s{_pleRangeInBytes = a});
instance FromJSON PartListElement where
parseJSON
= withObject "PartListElement"
(\ x ->
PartListElement' <$>
(x .:? "SHA256TreeHash") <*> (x .:? "RangeInBytes"))
data UploadListElement = UploadListElement'
{ _uleMultipartUploadId :: !(Maybe Text)
, _ulePartSizeInBytes :: !(Maybe Integer)
, _uleArchiveDescription :: !(Maybe Text)
, _uleVaultARN :: !(Maybe Text)
, _uleCreationDate :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
uploadListElement
:: UploadListElement
uploadListElement =
UploadListElement'
{ _uleMultipartUploadId = Nothing
, _ulePartSizeInBytes = Nothing
, _uleArchiveDescription = Nothing
, _uleVaultARN = Nothing
, _uleCreationDate = Nothing
}
uleMultipartUploadId :: Lens' UploadListElement (Maybe Text)
uleMultipartUploadId = lens _uleMultipartUploadId (\ s a -> s{_uleMultipartUploadId = a});
ulePartSizeInBytes :: Lens' UploadListElement (Maybe Integer)
ulePartSizeInBytes = lens _ulePartSizeInBytes (\ s a -> s{_ulePartSizeInBytes = a});
uleArchiveDescription :: Lens' UploadListElement (Maybe Text)
uleArchiveDescription = lens _uleArchiveDescription (\ s a -> s{_uleArchiveDescription = a});
uleVaultARN :: Lens' UploadListElement (Maybe Text)
uleVaultARN = lens _uleVaultARN (\ s a -> s{_uleVaultARN = a});
uleCreationDate :: Lens' UploadListElement (Maybe Text)
uleCreationDate = lens _uleCreationDate (\ s a -> s{_uleCreationDate = a});
instance FromJSON UploadListElement where
parseJSON
= withObject "UploadListElement"
(\ x ->
UploadListElement' <$>
(x .:? "MultipartUploadId") <*>
(x .:? "PartSizeInBytes")
<*> (x .:? "ArchiveDescription")
<*> (x .:? "VaultARN")
<*> (x .:? "CreationDate"))
newtype VaultAccessPolicy = VaultAccessPolicy'
{ _vapPolicy :: Maybe Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
vaultAccessPolicy
:: VaultAccessPolicy
vaultAccessPolicy =
VaultAccessPolicy'
{ _vapPolicy = Nothing
}
vapPolicy :: Lens' VaultAccessPolicy (Maybe Text)
vapPolicy = lens _vapPolicy (\ s a -> s{_vapPolicy = a});
instance FromJSON VaultAccessPolicy where
parseJSON
= withObject "VaultAccessPolicy"
(\ x -> VaultAccessPolicy' <$> (x .:? "Policy"))
instance ToJSON VaultAccessPolicy where
toJSON VaultAccessPolicy'{..}
= object (catMaybes [("Policy" .=) <$> _vapPolicy])
newtype VaultLockPolicy = VaultLockPolicy'
{ _vlpPolicy :: Maybe Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
vaultLockPolicy
:: VaultLockPolicy
vaultLockPolicy =
VaultLockPolicy'
{ _vlpPolicy = Nothing
}
vlpPolicy :: Lens' VaultLockPolicy (Maybe Text)
vlpPolicy = lens _vlpPolicy (\ s a -> s{_vlpPolicy = a});
instance ToJSON VaultLockPolicy where
toJSON VaultLockPolicy'{..}
= object (catMaybes [("Policy" .=) <$> _vlpPolicy])
data VaultNotificationConfig = VaultNotificationConfig'
{ _vncSNSTopic :: !(Maybe Text)
, _vncEvents :: !(Maybe [Text])
} deriving (Eq,Read,Show,Data,Typeable,Generic)
vaultNotificationConfig
:: VaultNotificationConfig
vaultNotificationConfig =
VaultNotificationConfig'
{ _vncSNSTopic = Nothing
, _vncEvents = Nothing
}
vncSNSTopic :: Lens' VaultNotificationConfig (Maybe Text)
vncSNSTopic = lens _vncSNSTopic (\ s a -> s{_vncSNSTopic = a});
vncEvents :: Lens' VaultNotificationConfig [Text]
vncEvents = lens _vncEvents (\ s a -> s{_vncEvents = a}) . _Default . _Coerce;
instance FromJSON VaultNotificationConfig where
parseJSON
= withObject "VaultNotificationConfig"
(\ x ->
VaultNotificationConfig' <$>
(x .:? "SNSTopic") <*> (x .:? "Events" .!= mempty))
instance ToJSON VaultNotificationConfig where
toJSON VaultNotificationConfig'{..}
= object
(catMaybes
[("SNSTopic" .=) <$> _vncSNSTopic,
("Events" .=) <$> _vncEvents])