{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.AWS.ECR.Types.Product where
import Network.AWS.ECR.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
data AuthorizationData = AuthorizationData'
{ _adExpiresAt :: !(Maybe POSIX)
, _adProxyEndpoint :: !(Maybe Text)
, _adAuthorizationToken :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
authorizationData
:: AuthorizationData
authorizationData =
AuthorizationData'
{ _adExpiresAt = Nothing
, _adProxyEndpoint = Nothing
, _adAuthorizationToken = Nothing
}
adExpiresAt :: Lens' AuthorizationData (Maybe UTCTime)
adExpiresAt = lens _adExpiresAt (\ s a -> s{_adExpiresAt = a}) . mapping _Time
adProxyEndpoint :: Lens' AuthorizationData (Maybe Text)
adProxyEndpoint = lens _adProxyEndpoint (\ s a -> s{_adProxyEndpoint = a})
adAuthorizationToken :: Lens' AuthorizationData (Maybe Text)
adAuthorizationToken = lens _adAuthorizationToken (\ s a -> s{_adAuthorizationToken = a})
instance FromJSON AuthorizationData where
parseJSON
= withObject "AuthorizationData"
(\ x ->
AuthorizationData' <$>
(x .:? "expiresAt") <*> (x .:? "proxyEndpoint") <*>
(x .:? "authorizationToken"))
instance Hashable AuthorizationData where
instance NFData AuthorizationData where
newtype DescribeImagesFilter = DescribeImagesFilter'
{ _difTagStatus :: Maybe TagStatus
} deriving (Eq, Read, Show, Data, Typeable, Generic)
describeImagesFilter
:: DescribeImagesFilter
describeImagesFilter = DescribeImagesFilter' {_difTagStatus = Nothing}
difTagStatus :: Lens' DescribeImagesFilter (Maybe TagStatus)
difTagStatus = lens _difTagStatus (\ s a -> s{_difTagStatus = a})
instance Hashable DescribeImagesFilter where
instance NFData DescribeImagesFilter where
instance ToJSON DescribeImagesFilter where
toJSON DescribeImagesFilter'{..}
= object
(catMaybes [("tagStatus" .=) <$> _difTagStatus])
data Image = Image'
{ _iRegistryId :: !(Maybe Text)
, _iImageId :: !(Maybe ImageIdentifier)
, _iRepositoryName :: !(Maybe Text)
, _iImageManifest :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
image
:: Image
image =
Image'
{ _iRegistryId = Nothing
, _iImageId = Nothing
, _iRepositoryName = Nothing
, _iImageManifest = Nothing
}
iRegistryId :: Lens' Image (Maybe Text)
iRegistryId = lens _iRegistryId (\ s a -> s{_iRegistryId = a})
iImageId :: Lens' Image (Maybe ImageIdentifier)
iImageId = lens _iImageId (\ s a -> s{_iImageId = a})
iRepositoryName :: Lens' Image (Maybe Text)
iRepositoryName = lens _iRepositoryName (\ s a -> s{_iRepositoryName = a})
iImageManifest :: Lens' Image (Maybe Text)
iImageManifest = lens _iImageManifest (\ s a -> s{_iImageManifest = a})
instance FromJSON Image where
parseJSON
= withObject "Image"
(\ x ->
Image' <$>
(x .:? "registryId") <*> (x .:? "imageId") <*>
(x .:? "repositoryName")
<*> (x .:? "imageManifest"))
instance Hashable Image where
instance NFData Image where
data ImageDetail = ImageDetail'
{ _idRegistryId :: !(Maybe Text)
, _idImageTags :: !(Maybe [Text])
, _idImageSizeInBytes :: !(Maybe Integer)
, _idImageDigest :: !(Maybe Text)
, _idImagePushedAt :: !(Maybe POSIX)
, _idRepositoryName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
imageDetail
:: ImageDetail
imageDetail =
ImageDetail'
{ _idRegistryId = Nothing
, _idImageTags = Nothing
, _idImageSizeInBytes = Nothing
, _idImageDigest = Nothing
, _idImagePushedAt = Nothing
, _idRepositoryName = Nothing
}
idRegistryId :: Lens' ImageDetail (Maybe Text)
idRegistryId = lens _idRegistryId (\ s a -> s{_idRegistryId = a})
idImageTags :: Lens' ImageDetail [Text]
idImageTags = lens _idImageTags (\ s a -> s{_idImageTags = a}) . _Default . _Coerce
idImageSizeInBytes :: Lens' ImageDetail (Maybe Integer)
idImageSizeInBytes = lens _idImageSizeInBytes (\ s a -> s{_idImageSizeInBytes = a})
idImageDigest :: Lens' ImageDetail (Maybe Text)
idImageDigest = lens _idImageDigest (\ s a -> s{_idImageDigest = a})
idImagePushedAt :: Lens' ImageDetail (Maybe UTCTime)
idImagePushedAt = lens _idImagePushedAt (\ s a -> s{_idImagePushedAt = a}) . mapping _Time
idRepositoryName :: Lens' ImageDetail (Maybe Text)
idRepositoryName = lens _idRepositoryName (\ s a -> s{_idRepositoryName = a})
instance FromJSON ImageDetail where
parseJSON
= withObject "ImageDetail"
(\ x ->
ImageDetail' <$>
(x .:? "registryId") <*>
(x .:? "imageTags" .!= mempty)
<*> (x .:? "imageSizeInBytes")
<*> (x .:? "imageDigest")
<*> (x .:? "imagePushedAt")
<*> (x .:? "repositoryName"))
instance Hashable ImageDetail where
instance NFData ImageDetail where
data ImageFailure = ImageFailure'
{ _ifFailureReason :: !(Maybe Text)
, _ifFailureCode :: !(Maybe ImageFailureCode)
, _ifImageId :: !(Maybe ImageIdentifier)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
imageFailure
:: ImageFailure
imageFailure =
ImageFailure'
{_ifFailureReason = Nothing, _ifFailureCode = Nothing, _ifImageId = Nothing}
ifFailureReason :: Lens' ImageFailure (Maybe Text)
ifFailureReason = lens _ifFailureReason (\ s a -> s{_ifFailureReason = a})
ifFailureCode :: Lens' ImageFailure (Maybe ImageFailureCode)
ifFailureCode = lens _ifFailureCode (\ s a -> s{_ifFailureCode = a})
ifImageId :: Lens' ImageFailure (Maybe ImageIdentifier)
ifImageId = lens _ifImageId (\ s a -> s{_ifImageId = a})
instance FromJSON ImageFailure where
parseJSON
= withObject "ImageFailure"
(\ x ->
ImageFailure' <$>
(x .:? "failureReason") <*> (x .:? "failureCode") <*>
(x .:? "imageId"))
instance Hashable ImageFailure where
instance NFData ImageFailure where
data ImageIdentifier = ImageIdentifier'
{ _iiImageDigest :: !(Maybe Text)
, _iiImageTag :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
imageIdentifier
:: ImageIdentifier
imageIdentifier =
ImageIdentifier' {_iiImageDigest = Nothing, _iiImageTag = Nothing}
iiImageDigest :: Lens' ImageIdentifier (Maybe Text)
iiImageDigest = lens _iiImageDigest (\ s a -> s{_iiImageDigest = a})
iiImageTag :: Lens' ImageIdentifier (Maybe Text)
iiImageTag = lens _iiImageTag (\ s a -> s{_iiImageTag = a})
instance FromJSON ImageIdentifier where
parseJSON
= withObject "ImageIdentifier"
(\ x ->
ImageIdentifier' <$>
(x .:? "imageDigest") <*> (x .:? "imageTag"))
instance Hashable ImageIdentifier where
instance NFData ImageIdentifier where
instance ToJSON ImageIdentifier where
toJSON ImageIdentifier'{..}
= object
(catMaybes
[("imageDigest" .=) <$> _iiImageDigest,
("imageTag" .=) <$> _iiImageTag])
data Layer = Layer'
{ _lMediaType :: !(Maybe Text)
, _lLayerDigest :: !(Maybe Text)
, _lLayerSize :: !(Maybe Integer)
, _lLayerAvailability :: !(Maybe LayerAvailability)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
layer
:: Layer
layer =
Layer'
{ _lMediaType = Nothing
, _lLayerDigest = Nothing
, _lLayerSize = Nothing
, _lLayerAvailability = Nothing
}
lMediaType :: Lens' Layer (Maybe Text)
lMediaType = lens _lMediaType (\ s a -> s{_lMediaType = a})
lLayerDigest :: Lens' Layer (Maybe Text)
lLayerDigest = lens _lLayerDigest (\ s a -> s{_lLayerDigest = a})
lLayerSize :: Lens' Layer (Maybe Integer)
lLayerSize = lens _lLayerSize (\ s a -> s{_lLayerSize = a})
lLayerAvailability :: Lens' Layer (Maybe LayerAvailability)
lLayerAvailability = lens _lLayerAvailability (\ s a -> s{_lLayerAvailability = a})
instance FromJSON Layer where
parseJSON
= withObject "Layer"
(\ x ->
Layer' <$>
(x .:? "mediaType") <*> (x .:? "layerDigest") <*>
(x .:? "layerSize")
<*> (x .:? "layerAvailability"))
instance Hashable Layer where
instance NFData Layer where
data LayerFailure = LayerFailure'
{ _lfFailureReason :: !(Maybe Text)
, _lfFailureCode :: !(Maybe LayerFailureCode)
, _lfLayerDigest :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
layerFailure
:: LayerFailure
layerFailure =
LayerFailure'
{ _lfFailureReason = Nothing
, _lfFailureCode = Nothing
, _lfLayerDigest = Nothing
}
lfFailureReason :: Lens' LayerFailure (Maybe Text)
lfFailureReason = lens _lfFailureReason (\ s a -> s{_lfFailureReason = a})
lfFailureCode :: Lens' LayerFailure (Maybe LayerFailureCode)
lfFailureCode = lens _lfFailureCode (\ s a -> s{_lfFailureCode = a})
lfLayerDigest :: Lens' LayerFailure (Maybe Text)
lfLayerDigest = lens _lfLayerDigest (\ s a -> s{_lfLayerDigest = a})
instance FromJSON LayerFailure where
parseJSON
= withObject "LayerFailure"
(\ x ->
LayerFailure' <$>
(x .:? "failureReason") <*> (x .:? "failureCode") <*>
(x .:? "layerDigest"))
instance Hashable LayerFailure where
instance NFData LayerFailure where
newtype LifecyclePolicyPreviewFilter = LifecyclePolicyPreviewFilter'
{ _lppfTagStatus :: Maybe TagStatus
} deriving (Eq, Read, Show, Data, Typeable, Generic)
lifecyclePolicyPreviewFilter
:: LifecyclePolicyPreviewFilter
lifecyclePolicyPreviewFilter =
LifecyclePolicyPreviewFilter' {_lppfTagStatus = Nothing}
lppfTagStatus :: Lens' LifecyclePolicyPreviewFilter (Maybe TagStatus)
lppfTagStatus = lens _lppfTagStatus (\ s a -> s{_lppfTagStatus = a})
instance Hashable LifecyclePolicyPreviewFilter where
instance NFData LifecyclePolicyPreviewFilter where
instance ToJSON LifecyclePolicyPreviewFilter where
toJSON LifecyclePolicyPreviewFilter'{..}
= object
(catMaybes [("tagStatus" .=) <$> _lppfTagStatus])
data LifecyclePolicyPreviewResult = LifecyclePolicyPreviewResult'
{ _lpprImageTags :: !(Maybe [Text])
, _lpprAction :: !(Maybe LifecyclePolicyRuleAction)
, _lpprImageDigest :: !(Maybe Text)
, _lpprImagePushedAt :: !(Maybe POSIX)
, _lpprAppliedRulePriority :: !(Maybe Nat)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
lifecyclePolicyPreviewResult
:: LifecyclePolicyPreviewResult
lifecyclePolicyPreviewResult =
LifecyclePolicyPreviewResult'
{ _lpprImageTags = Nothing
, _lpprAction = Nothing
, _lpprImageDigest = Nothing
, _lpprImagePushedAt = Nothing
, _lpprAppliedRulePriority = Nothing
}
lpprImageTags :: Lens' LifecyclePolicyPreviewResult [Text]
lpprImageTags = lens _lpprImageTags (\ s a -> s{_lpprImageTags = a}) . _Default . _Coerce
lpprAction :: Lens' LifecyclePolicyPreviewResult (Maybe LifecyclePolicyRuleAction)
lpprAction = lens _lpprAction (\ s a -> s{_lpprAction = a})
lpprImageDigest :: Lens' LifecyclePolicyPreviewResult (Maybe Text)
lpprImageDigest = lens _lpprImageDigest (\ s a -> s{_lpprImageDigest = a})
lpprImagePushedAt :: Lens' LifecyclePolicyPreviewResult (Maybe UTCTime)
lpprImagePushedAt = lens _lpprImagePushedAt (\ s a -> s{_lpprImagePushedAt = a}) . mapping _Time
lpprAppliedRulePriority :: Lens' LifecyclePolicyPreviewResult (Maybe Natural)
lpprAppliedRulePriority = lens _lpprAppliedRulePriority (\ s a -> s{_lpprAppliedRulePriority = a}) . mapping _Nat
instance FromJSON LifecyclePolicyPreviewResult where
parseJSON
= withObject "LifecyclePolicyPreviewResult"
(\ x ->
LifecyclePolicyPreviewResult' <$>
(x .:? "imageTags" .!= mempty) <*> (x .:? "action")
<*> (x .:? "imageDigest")
<*> (x .:? "imagePushedAt")
<*> (x .:? "appliedRulePriority"))
instance Hashable LifecyclePolicyPreviewResult where
instance NFData LifecyclePolicyPreviewResult where
newtype LifecyclePolicyPreviewSummary = LifecyclePolicyPreviewSummary'
{ _lppsExpiringImageTotalCount :: Maybe Nat
} deriving (Eq, Read, Show, Data, Typeable, Generic)
lifecyclePolicyPreviewSummary
:: LifecyclePolicyPreviewSummary
lifecyclePolicyPreviewSummary =
LifecyclePolicyPreviewSummary' {_lppsExpiringImageTotalCount = Nothing}
lppsExpiringImageTotalCount :: Lens' LifecyclePolicyPreviewSummary (Maybe Natural)
lppsExpiringImageTotalCount = lens _lppsExpiringImageTotalCount (\ s a -> s{_lppsExpiringImageTotalCount = a}) . mapping _Nat
instance FromJSON LifecyclePolicyPreviewSummary where
parseJSON
= withObject "LifecyclePolicyPreviewSummary"
(\ x ->
LifecyclePolicyPreviewSummary' <$>
(x .:? "expiringImageTotalCount"))
instance Hashable LifecyclePolicyPreviewSummary where
instance NFData LifecyclePolicyPreviewSummary where
newtype LifecyclePolicyRuleAction = LifecyclePolicyRuleAction'
{ _lpraType :: Maybe ImageActionType
} deriving (Eq, Read, Show, Data, Typeable, Generic)
lifecyclePolicyRuleAction
:: LifecyclePolicyRuleAction
lifecyclePolicyRuleAction = LifecyclePolicyRuleAction' {_lpraType = Nothing}
lpraType :: Lens' LifecyclePolicyRuleAction (Maybe ImageActionType)
lpraType = lens _lpraType (\ s a -> s{_lpraType = a})
instance FromJSON LifecyclePolicyRuleAction where
parseJSON
= withObject "LifecyclePolicyRuleAction"
(\ x ->
LifecyclePolicyRuleAction' <$> (x .:? "type"))
instance Hashable LifecyclePolicyRuleAction where
instance NFData LifecyclePolicyRuleAction where
newtype ListImagesFilter = ListImagesFilter'
{ _lifTagStatus :: Maybe TagStatus
} deriving (Eq, Read, Show, Data, Typeable, Generic)
listImagesFilter
:: ListImagesFilter
listImagesFilter = ListImagesFilter' {_lifTagStatus = Nothing}
lifTagStatus :: Lens' ListImagesFilter (Maybe TagStatus)
lifTagStatus = lens _lifTagStatus (\ s a -> s{_lifTagStatus = a})
instance Hashable ListImagesFilter where
instance NFData ListImagesFilter where
instance ToJSON ListImagesFilter where
toJSON ListImagesFilter'{..}
= object
(catMaybes [("tagStatus" .=) <$> _lifTagStatus])
data Repository = Repository'
{ _rRepositoryARN :: !(Maybe Text)
, _rCreatedAt :: !(Maybe POSIX)
, _rRegistryId :: !(Maybe Text)
, _rRepositoryURI :: !(Maybe Text)
, _rRepositoryName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
repository
:: Repository
repository =
Repository'
{ _rRepositoryARN = Nothing
, _rCreatedAt = Nothing
, _rRegistryId = Nothing
, _rRepositoryURI = Nothing
, _rRepositoryName = Nothing
}
rRepositoryARN :: Lens' Repository (Maybe Text)
rRepositoryARN = lens _rRepositoryARN (\ s a -> s{_rRepositoryARN = a})
rCreatedAt :: Lens' Repository (Maybe UTCTime)
rCreatedAt = lens _rCreatedAt (\ s a -> s{_rCreatedAt = a}) . mapping _Time
rRegistryId :: Lens' Repository (Maybe Text)
rRegistryId = lens _rRegistryId (\ s a -> s{_rRegistryId = a})
rRepositoryURI :: Lens' Repository (Maybe Text)
rRepositoryURI = lens _rRepositoryURI (\ s a -> s{_rRepositoryURI = a})
rRepositoryName :: Lens' Repository (Maybe Text)
rRepositoryName = lens _rRepositoryName (\ s a -> s{_rRepositoryName = a})
instance FromJSON Repository where
parseJSON
= withObject "Repository"
(\ x ->
Repository' <$>
(x .:? "repositoryArn") <*> (x .:? "createdAt") <*>
(x .:? "registryId")
<*> (x .:? "repositoryUri")
<*> (x .:? "repositoryName"))
instance Hashable Repository where
instance NFData Repository where