{-# 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
instance NFData AuthorizationData
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
instance NFData DescribeImagesFilter
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
instance NFData Image
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
instance NFData ImageDetail
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
instance NFData ImageFailure
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
instance NFData ImageIdentifier
instance ToJSON ImageIdentifier where
toJSON ImageIdentifier'{..}
= object
(catMaybes
[("imageDigest" .=) <$> _iiImageDigest,
("imageTag" .=) <$> _iiImageTag])
data Layer = Layer'
{ _lLayerDigest :: !(Maybe Text)
, _lLayerSize :: !(Maybe Integer)
, _lLayerAvailability :: !(Maybe LayerAvailability)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
layer
:: Layer
layer =
Layer'
{ _lLayerDigest = Nothing
, _lLayerSize = Nothing
, _lLayerAvailability = Nothing
}
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 .:? "layerDigest") <*> (x .:? "layerSize") <*>
(x .:? "layerAvailability"))
instance Hashable Layer
instance NFData Layer
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
instance NFData LayerFailure
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
instance NFData ListImagesFilter
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
instance NFData Repository