module Network.AWS.CodeDeploy.Types.Product where
import Network.AWS.CodeDeploy.Types.Sum
import Network.AWS.Prelude
data ApplicationInfo = ApplicationInfo'
{ _aiLinkedToGitHub :: !(Maybe Bool)
, _aiApplicationId :: !(Maybe Text)
, _aiApplicationName :: !(Maybe Text)
, _aiCreateTime :: !(Maybe POSIX)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
applicationInfo
:: ApplicationInfo
applicationInfo =
ApplicationInfo'
{ _aiLinkedToGitHub = Nothing
, _aiApplicationId = Nothing
, _aiApplicationName = Nothing
, _aiCreateTime = Nothing
}
aiLinkedToGitHub :: Lens' ApplicationInfo (Maybe Bool)
aiLinkedToGitHub = lens _aiLinkedToGitHub (\ s a -> s{_aiLinkedToGitHub = a});
aiApplicationId :: Lens' ApplicationInfo (Maybe Text)
aiApplicationId = lens _aiApplicationId (\ s a -> s{_aiApplicationId = a});
aiApplicationName :: Lens' ApplicationInfo (Maybe Text)
aiApplicationName = lens _aiApplicationName (\ s a -> s{_aiApplicationName = a});
aiCreateTime :: Lens' ApplicationInfo (Maybe UTCTime)
aiCreateTime = lens _aiCreateTime (\ s a -> s{_aiCreateTime = a}) . mapping _Time;
instance FromJSON ApplicationInfo where
parseJSON
= withObject "ApplicationInfo"
(\ x ->
ApplicationInfo' <$>
(x .:? "linkedToGitHub") <*> (x .:? "applicationId")
<*> (x .:? "applicationName")
<*> (x .:? "createTime"))
data AutoScalingGroup = AutoScalingGroup'
{ _asgHook :: !(Maybe Text)
, _asgName :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
autoScalingGroup
:: AutoScalingGroup
autoScalingGroup =
AutoScalingGroup'
{ _asgHook = Nothing
, _asgName = Nothing
}
asgHook :: Lens' AutoScalingGroup (Maybe Text)
asgHook = lens _asgHook (\ s a -> s{_asgHook = a});
asgName :: Lens' AutoScalingGroup (Maybe Text)
asgName = lens _asgName (\ s a -> s{_asgName = a});
instance FromJSON AutoScalingGroup where
parseJSON
= withObject "AutoScalingGroup"
(\ x ->
AutoScalingGroup' <$>
(x .:? "hook") <*> (x .:? "name"))
data DeploymentConfigInfo = DeploymentConfigInfo'
{ _dciDeploymentConfigName :: !(Maybe Text)
, _dciMinimumHealthyHosts :: !(Maybe MinimumHealthyHosts)
, _dciDeploymentConfigId :: !(Maybe Text)
, _dciCreateTime :: !(Maybe POSIX)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deploymentConfigInfo
:: DeploymentConfigInfo
deploymentConfigInfo =
DeploymentConfigInfo'
{ _dciDeploymentConfigName = Nothing
, _dciMinimumHealthyHosts = Nothing
, _dciDeploymentConfigId = Nothing
, _dciCreateTime = Nothing
}
dciDeploymentConfigName :: Lens' DeploymentConfigInfo (Maybe Text)
dciDeploymentConfigName = lens _dciDeploymentConfigName (\ s a -> s{_dciDeploymentConfigName = a});
dciMinimumHealthyHosts :: Lens' DeploymentConfigInfo (Maybe MinimumHealthyHosts)
dciMinimumHealthyHosts = lens _dciMinimumHealthyHosts (\ s a -> s{_dciMinimumHealthyHosts = a});
dciDeploymentConfigId :: Lens' DeploymentConfigInfo (Maybe Text)
dciDeploymentConfigId = lens _dciDeploymentConfigId (\ s a -> s{_dciDeploymentConfigId = a});
dciCreateTime :: Lens' DeploymentConfigInfo (Maybe UTCTime)
dciCreateTime = lens _dciCreateTime (\ s a -> s{_dciCreateTime = a}) . mapping _Time;
instance FromJSON DeploymentConfigInfo where
parseJSON
= withObject "DeploymentConfigInfo"
(\ x ->
DeploymentConfigInfo' <$>
(x .:? "deploymentConfigName") <*>
(x .:? "minimumHealthyHosts")
<*> (x .:? "deploymentConfigId")
<*> (x .:? "createTime"))
data DeploymentGroupInfo = DeploymentGroupInfo'
{ _dgiServiceRoleARN :: !(Maybe Text)
, _dgiDeploymentConfigName :: !(Maybe Text)
, _dgiTargetRevision :: !(Maybe RevisionLocation)
, _dgiEc2TagFilters :: !(Maybe [EC2TagFilter])
, _dgiOnPremisesInstanceTagFilters :: !(Maybe [TagFilter])
, _dgiApplicationName :: !(Maybe Text)
, _dgiDeploymentGroupId :: !(Maybe Text)
, _dgiAutoScalingGroups :: !(Maybe [AutoScalingGroup])
, _dgiDeploymentGroupName :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deploymentGroupInfo
:: DeploymentGroupInfo
deploymentGroupInfo =
DeploymentGroupInfo'
{ _dgiServiceRoleARN = Nothing
, _dgiDeploymentConfigName = Nothing
, _dgiTargetRevision = Nothing
, _dgiEc2TagFilters = Nothing
, _dgiOnPremisesInstanceTagFilters = Nothing
, _dgiApplicationName = Nothing
, _dgiDeploymentGroupId = Nothing
, _dgiAutoScalingGroups = Nothing
, _dgiDeploymentGroupName = Nothing
}
dgiServiceRoleARN :: Lens' DeploymentGroupInfo (Maybe Text)
dgiServiceRoleARN = lens _dgiServiceRoleARN (\ s a -> s{_dgiServiceRoleARN = a});
dgiDeploymentConfigName :: Lens' DeploymentGroupInfo (Maybe Text)
dgiDeploymentConfigName = lens _dgiDeploymentConfigName (\ s a -> s{_dgiDeploymentConfigName = a});
dgiTargetRevision :: Lens' DeploymentGroupInfo (Maybe RevisionLocation)
dgiTargetRevision = lens _dgiTargetRevision (\ s a -> s{_dgiTargetRevision = a});
dgiEc2TagFilters :: Lens' DeploymentGroupInfo [EC2TagFilter]
dgiEc2TagFilters = lens _dgiEc2TagFilters (\ s a -> s{_dgiEc2TagFilters = a}) . _Default . _Coerce;
dgiOnPremisesInstanceTagFilters :: Lens' DeploymentGroupInfo [TagFilter]
dgiOnPremisesInstanceTagFilters = lens _dgiOnPremisesInstanceTagFilters (\ s a -> s{_dgiOnPremisesInstanceTagFilters = a}) . _Default . _Coerce;
dgiApplicationName :: Lens' DeploymentGroupInfo (Maybe Text)
dgiApplicationName = lens _dgiApplicationName (\ s a -> s{_dgiApplicationName = a});
dgiDeploymentGroupId :: Lens' DeploymentGroupInfo (Maybe Text)
dgiDeploymentGroupId = lens _dgiDeploymentGroupId (\ s a -> s{_dgiDeploymentGroupId = a});
dgiAutoScalingGroups :: Lens' DeploymentGroupInfo [AutoScalingGroup]
dgiAutoScalingGroups = lens _dgiAutoScalingGroups (\ s a -> s{_dgiAutoScalingGroups = a}) . _Default . _Coerce;
dgiDeploymentGroupName :: Lens' DeploymentGroupInfo (Maybe Text)
dgiDeploymentGroupName = lens _dgiDeploymentGroupName (\ s a -> s{_dgiDeploymentGroupName = a});
instance FromJSON DeploymentGroupInfo where
parseJSON
= withObject "DeploymentGroupInfo"
(\ x ->
DeploymentGroupInfo' <$>
(x .:? "serviceRoleArn") <*>
(x .:? "deploymentConfigName")
<*> (x .:? "targetRevision")
<*> (x .:? "ec2TagFilters" .!= mempty)
<*> (x .:? "onPremisesInstanceTagFilters" .!= mempty)
<*> (x .:? "applicationName")
<*> (x .:? "deploymentGroupId")
<*> (x .:? "autoScalingGroups" .!= mempty)
<*> (x .:? "deploymentGroupName"))
data DeploymentInfo = DeploymentInfo'
{ _diCreator :: !(Maybe DeploymentCreator)
, _diStatus :: !(Maybe DeploymentStatus)
, _diDeploymentId :: !(Maybe Text)
, _diDeploymentConfigName :: !(Maybe Text)
, _diStartTime :: !(Maybe POSIX)
, _diCompleteTime :: !(Maybe POSIX)
, _diErrorInformation :: !(Maybe ErrorInformation)
, _diDeploymentOverview :: !(Maybe DeploymentOverview)
, _diApplicationName :: !(Maybe Text)
, _diRevision :: !(Maybe RevisionLocation)
, _diDescription :: !(Maybe Text)
, _diCreateTime :: !(Maybe POSIX)
, _diDeploymentGroupName :: !(Maybe Text)
, _diIgnoreApplicationStopFailures :: !(Maybe Bool)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deploymentInfo
:: DeploymentInfo
deploymentInfo =
DeploymentInfo'
{ _diCreator = Nothing
, _diStatus = Nothing
, _diDeploymentId = Nothing
, _diDeploymentConfigName = Nothing
, _diStartTime = Nothing
, _diCompleteTime = Nothing
, _diErrorInformation = Nothing
, _diDeploymentOverview = Nothing
, _diApplicationName = Nothing
, _diRevision = Nothing
, _diDescription = Nothing
, _diCreateTime = Nothing
, _diDeploymentGroupName = Nothing
, _diIgnoreApplicationStopFailures = Nothing
}
diCreator :: Lens' DeploymentInfo (Maybe DeploymentCreator)
diCreator = lens _diCreator (\ s a -> s{_diCreator = a});
diStatus :: Lens' DeploymentInfo (Maybe DeploymentStatus)
diStatus = lens _diStatus (\ s a -> s{_diStatus = a});
diDeploymentId :: Lens' DeploymentInfo (Maybe Text)
diDeploymentId = lens _diDeploymentId (\ s a -> s{_diDeploymentId = a});
diDeploymentConfigName :: Lens' DeploymentInfo (Maybe Text)
diDeploymentConfigName = lens _diDeploymentConfigName (\ s a -> s{_diDeploymentConfigName = a});
diStartTime :: Lens' DeploymentInfo (Maybe UTCTime)
diStartTime = lens _diStartTime (\ s a -> s{_diStartTime = a}) . mapping _Time;
diCompleteTime :: Lens' DeploymentInfo (Maybe UTCTime)
diCompleteTime = lens _diCompleteTime (\ s a -> s{_diCompleteTime = a}) . mapping _Time;
diErrorInformation :: Lens' DeploymentInfo (Maybe ErrorInformation)
diErrorInformation = lens _diErrorInformation (\ s a -> s{_diErrorInformation = a});
diDeploymentOverview :: Lens' DeploymentInfo (Maybe DeploymentOverview)
diDeploymentOverview = lens _diDeploymentOverview (\ s a -> s{_diDeploymentOverview = a});
diApplicationName :: Lens' DeploymentInfo (Maybe Text)
diApplicationName = lens _diApplicationName (\ s a -> s{_diApplicationName = a});
diRevision :: Lens' DeploymentInfo (Maybe RevisionLocation)
diRevision = lens _diRevision (\ s a -> s{_diRevision = a});
diDescription :: Lens' DeploymentInfo (Maybe Text)
diDescription = lens _diDescription (\ s a -> s{_diDescription = a});
diCreateTime :: Lens' DeploymentInfo (Maybe UTCTime)
diCreateTime = lens _diCreateTime (\ s a -> s{_diCreateTime = a}) . mapping _Time;
diDeploymentGroupName :: Lens' DeploymentInfo (Maybe Text)
diDeploymentGroupName = lens _diDeploymentGroupName (\ s a -> s{_diDeploymentGroupName = a});
diIgnoreApplicationStopFailures :: Lens' DeploymentInfo (Maybe Bool)
diIgnoreApplicationStopFailures = lens _diIgnoreApplicationStopFailures (\ s a -> s{_diIgnoreApplicationStopFailures = a});
instance FromJSON DeploymentInfo where
parseJSON
= withObject "DeploymentInfo"
(\ x ->
DeploymentInfo' <$>
(x .:? "creator") <*> (x .:? "status") <*>
(x .:? "deploymentId")
<*> (x .:? "deploymentConfigName")
<*> (x .:? "startTime")
<*> (x .:? "completeTime")
<*> (x .:? "errorInformation")
<*> (x .:? "deploymentOverview")
<*> (x .:? "applicationName")
<*> (x .:? "revision")
<*> (x .:? "description")
<*> (x .:? "createTime")
<*> (x .:? "deploymentGroupName")
<*> (x .:? "ignoreApplicationStopFailures"))
data DeploymentOverview = DeploymentOverview'
{ _doPending :: !(Maybe Integer)
, _doSkipped :: !(Maybe Integer)
, _doInProgress :: !(Maybe Integer)
, _doSucceeded :: !(Maybe Integer)
, _doFailed :: !(Maybe Integer)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deploymentOverview
:: DeploymentOverview
deploymentOverview =
DeploymentOverview'
{ _doPending = Nothing
, _doSkipped = Nothing
, _doInProgress = Nothing
, _doSucceeded = Nothing
, _doFailed = Nothing
}
doPending :: Lens' DeploymentOverview (Maybe Integer)
doPending = lens _doPending (\ s a -> s{_doPending = a});
doSkipped :: Lens' DeploymentOverview (Maybe Integer)
doSkipped = lens _doSkipped (\ s a -> s{_doSkipped = a});
doInProgress :: Lens' DeploymentOverview (Maybe Integer)
doInProgress = lens _doInProgress (\ s a -> s{_doInProgress = a});
doSucceeded :: Lens' DeploymentOverview (Maybe Integer)
doSucceeded = lens _doSucceeded (\ s a -> s{_doSucceeded = a});
doFailed :: Lens' DeploymentOverview (Maybe Integer)
doFailed = lens _doFailed (\ s a -> s{_doFailed = a});
instance FromJSON DeploymentOverview where
parseJSON
= withObject "DeploymentOverview"
(\ x ->
DeploymentOverview' <$>
(x .:? "Pending") <*> (x .:? "Skipped") <*>
(x .:? "InProgress")
<*> (x .:? "Succeeded")
<*> (x .:? "Failed"))
data Diagnostics = Diagnostics'
{ _dLogTail :: !(Maybe Text)
, _dErrorCode :: !(Maybe LifecycleErrorCode)
, _dScriptName :: !(Maybe Text)
, _dMessage :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
diagnostics
:: Diagnostics
diagnostics =
Diagnostics'
{ _dLogTail = Nothing
, _dErrorCode = Nothing
, _dScriptName = Nothing
, _dMessage = Nothing
}
dLogTail :: Lens' Diagnostics (Maybe Text)
dLogTail = lens _dLogTail (\ s a -> s{_dLogTail = a});
dErrorCode :: Lens' Diagnostics (Maybe LifecycleErrorCode)
dErrorCode = lens _dErrorCode (\ s a -> s{_dErrorCode = a});
dScriptName :: Lens' Diagnostics (Maybe Text)
dScriptName = lens _dScriptName (\ s a -> s{_dScriptName = a});
dMessage :: Lens' Diagnostics (Maybe Text)
dMessage = lens _dMessage (\ s a -> s{_dMessage = a});
instance FromJSON Diagnostics where
parseJSON
= withObject "Diagnostics"
(\ x ->
Diagnostics' <$>
(x .:? "logTail") <*> (x .:? "errorCode") <*>
(x .:? "scriptName")
<*> (x .:? "message"))
data EC2TagFilter = EC2TagFilter'
{ _etfValue :: !(Maybe Text)
, _etfKey :: !(Maybe Text)
, _etfType :: !(Maybe EC2TagFilterType)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
ec2TagFilter
:: EC2TagFilter
ec2TagFilter =
EC2TagFilter'
{ _etfValue = Nothing
, _etfKey = Nothing
, _etfType = Nothing
}
etfValue :: Lens' EC2TagFilter (Maybe Text)
etfValue = lens _etfValue (\ s a -> s{_etfValue = a});
etfKey :: Lens' EC2TagFilter (Maybe Text)
etfKey = lens _etfKey (\ s a -> s{_etfKey = a});
etfType :: Lens' EC2TagFilter (Maybe EC2TagFilterType)
etfType = lens _etfType (\ s a -> s{_etfType = a});
instance FromJSON EC2TagFilter where
parseJSON
= withObject "EC2TagFilter"
(\ x ->
EC2TagFilter' <$>
(x .:? "Value") <*> (x .:? "Key") <*> (x .:? "Type"))
instance ToJSON EC2TagFilter where
toJSON EC2TagFilter'{..}
= object
(catMaybes
[("Value" .=) <$> _etfValue, ("Key" .=) <$> _etfKey,
("Type" .=) <$> _etfType])
data ErrorInformation = ErrorInformation'
{ _eiCode :: !(Maybe DeployErrorCode)
, _eiMessage :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
errorInformation
:: ErrorInformation
errorInformation =
ErrorInformation'
{ _eiCode = Nothing
, _eiMessage = Nothing
}
eiCode :: Lens' ErrorInformation (Maybe DeployErrorCode)
eiCode = lens _eiCode (\ s a -> s{_eiCode = a});
eiMessage :: Lens' ErrorInformation (Maybe Text)
eiMessage = lens _eiMessage (\ s a -> s{_eiMessage = a});
instance FromJSON ErrorInformation where
parseJSON
= withObject "ErrorInformation"
(\ x ->
ErrorInformation' <$>
(x .:? "code") <*> (x .:? "message"))
data GenericRevisionInfo = GenericRevisionInfo'
{ _griRegisterTime :: !(Maybe POSIX)
, _griFirstUsedTime :: !(Maybe POSIX)
, _griDeploymentGroups :: !(Maybe [Text])
, _griLastUsedTime :: !(Maybe POSIX)
, _griDescription :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
genericRevisionInfo
:: GenericRevisionInfo
genericRevisionInfo =
GenericRevisionInfo'
{ _griRegisterTime = Nothing
, _griFirstUsedTime = Nothing
, _griDeploymentGroups = Nothing
, _griLastUsedTime = Nothing
, _griDescription = Nothing
}
griRegisterTime :: Lens' GenericRevisionInfo (Maybe UTCTime)
griRegisterTime = lens _griRegisterTime (\ s a -> s{_griRegisterTime = a}) . mapping _Time;
griFirstUsedTime :: Lens' GenericRevisionInfo (Maybe UTCTime)
griFirstUsedTime = lens _griFirstUsedTime (\ s a -> s{_griFirstUsedTime = a}) . mapping _Time;
griDeploymentGroups :: Lens' GenericRevisionInfo [Text]
griDeploymentGroups = lens _griDeploymentGroups (\ s a -> s{_griDeploymentGroups = a}) . _Default . _Coerce;
griLastUsedTime :: Lens' GenericRevisionInfo (Maybe UTCTime)
griLastUsedTime = lens _griLastUsedTime (\ s a -> s{_griLastUsedTime = a}) . mapping _Time;
griDescription :: Lens' GenericRevisionInfo (Maybe Text)
griDescription = lens _griDescription (\ s a -> s{_griDescription = a});
instance FromJSON GenericRevisionInfo where
parseJSON
= withObject "GenericRevisionInfo"
(\ x ->
GenericRevisionInfo' <$>
(x .:? "registerTime") <*> (x .:? "firstUsedTime")
<*> (x .:? "deploymentGroups" .!= mempty)
<*> (x .:? "lastUsedTime")
<*> (x .:? "description"))
data GitHubLocation = GitHubLocation'
{ _ghlCommitId :: !(Maybe Text)
, _ghlRepository :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
gitHubLocation
:: GitHubLocation
gitHubLocation =
GitHubLocation'
{ _ghlCommitId = Nothing
, _ghlRepository = Nothing
}
ghlCommitId :: Lens' GitHubLocation (Maybe Text)
ghlCommitId = lens _ghlCommitId (\ s a -> s{_ghlCommitId = a});
ghlRepository :: Lens' GitHubLocation (Maybe Text)
ghlRepository = lens _ghlRepository (\ s a -> s{_ghlRepository = a});
instance FromJSON GitHubLocation where
parseJSON
= withObject "GitHubLocation"
(\ x ->
GitHubLocation' <$>
(x .:? "commitId") <*> (x .:? "repository"))
instance ToJSON GitHubLocation where
toJSON GitHubLocation'{..}
= object
(catMaybes
[("commitId" .=) <$> _ghlCommitId,
("repository" .=) <$> _ghlRepository])
data InstanceInfo = InstanceInfo'
{ _iiRegisterTime :: !(Maybe POSIX)
, _iiInstanceARN :: !(Maybe Text)
, _iiDeregisterTime :: !(Maybe POSIX)
, _iiIamUserARN :: !(Maybe Text)
, _iiInstanceName :: !(Maybe Text)
, _iiTags :: !(Maybe [Tag])
} deriving (Eq,Read,Show,Data,Typeable,Generic)
instanceInfo
:: InstanceInfo
instanceInfo =
InstanceInfo'
{ _iiRegisterTime = Nothing
, _iiInstanceARN = Nothing
, _iiDeregisterTime = Nothing
, _iiIamUserARN = Nothing
, _iiInstanceName = Nothing
, _iiTags = Nothing
}
iiRegisterTime :: Lens' InstanceInfo (Maybe UTCTime)
iiRegisterTime = lens _iiRegisterTime (\ s a -> s{_iiRegisterTime = a}) . mapping _Time;
iiInstanceARN :: Lens' InstanceInfo (Maybe Text)
iiInstanceARN = lens _iiInstanceARN (\ s a -> s{_iiInstanceARN = a});
iiDeregisterTime :: Lens' InstanceInfo (Maybe UTCTime)
iiDeregisterTime = lens _iiDeregisterTime (\ s a -> s{_iiDeregisterTime = a}) . mapping _Time;
iiIamUserARN :: Lens' InstanceInfo (Maybe Text)
iiIamUserARN = lens _iiIamUserARN (\ s a -> s{_iiIamUserARN = a});
iiInstanceName :: Lens' InstanceInfo (Maybe Text)
iiInstanceName = lens _iiInstanceName (\ s a -> s{_iiInstanceName = a});
iiTags :: Lens' InstanceInfo [Tag]
iiTags = lens _iiTags (\ s a -> s{_iiTags = a}) . _Default . _Coerce;
instance FromJSON InstanceInfo where
parseJSON
= withObject "InstanceInfo"
(\ x ->
InstanceInfo' <$>
(x .:? "registerTime") <*> (x .:? "instanceArn") <*>
(x .:? "deregisterTime")
<*> (x .:? "iamUserArn")
<*> (x .:? "instanceName")
<*> (x .:? "tags" .!= mempty))
data InstanceSummary = InstanceSummary'
{ _isInstanceId :: !(Maybe Text)
, _isStatus :: !(Maybe InstanceStatus)
, _isDeploymentId :: !(Maybe Text)
, _isLastUpdatedAt :: !(Maybe POSIX)
, _isLifecycleEvents :: !(Maybe [LifecycleEvent])
} deriving (Eq,Read,Show,Data,Typeable,Generic)
instanceSummary
:: InstanceSummary
instanceSummary =
InstanceSummary'
{ _isInstanceId = Nothing
, _isStatus = Nothing
, _isDeploymentId = Nothing
, _isLastUpdatedAt = Nothing
, _isLifecycleEvents = Nothing
}
isInstanceId :: Lens' InstanceSummary (Maybe Text)
isInstanceId = lens _isInstanceId (\ s a -> s{_isInstanceId = a});
isStatus :: Lens' InstanceSummary (Maybe InstanceStatus)
isStatus = lens _isStatus (\ s a -> s{_isStatus = a});
isDeploymentId :: Lens' InstanceSummary (Maybe Text)
isDeploymentId = lens _isDeploymentId (\ s a -> s{_isDeploymentId = a});
isLastUpdatedAt :: Lens' InstanceSummary (Maybe UTCTime)
isLastUpdatedAt = lens _isLastUpdatedAt (\ s a -> s{_isLastUpdatedAt = a}) . mapping _Time;
isLifecycleEvents :: Lens' InstanceSummary [LifecycleEvent]
isLifecycleEvents = lens _isLifecycleEvents (\ s a -> s{_isLifecycleEvents = a}) . _Default . _Coerce;
instance FromJSON InstanceSummary where
parseJSON
= withObject "InstanceSummary"
(\ x ->
InstanceSummary' <$>
(x .:? "instanceId") <*> (x .:? "status") <*>
(x .:? "deploymentId")
<*> (x .:? "lastUpdatedAt")
<*> (x .:? "lifecycleEvents" .!= mempty))
data LifecycleEvent = LifecycleEvent'
{ _leStatus :: !(Maybe LifecycleEventStatus)
, _leLifecycleEventName :: !(Maybe Text)
, _leStartTime :: !(Maybe POSIX)
, _leDiagnostics :: !(Maybe Diagnostics)
, _leEndTime :: !(Maybe POSIX)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
lifecycleEvent
:: LifecycleEvent
lifecycleEvent =
LifecycleEvent'
{ _leStatus = Nothing
, _leLifecycleEventName = Nothing
, _leStartTime = Nothing
, _leDiagnostics = Nothing
, _leEndTime = Nothing
}
leStatus :: Lens' LifecycleEvent (Maybe LifecycleEventStatus)
leStatus = lens _leStatus (\ s a -> s{_leStatus = a});
leLifecycleEventName :: Lens' LifecycleEvent (Maybe Text)
leLifecycleEventName = lens _leLifecycleEventName (\ s a -> s{_leLifecycleEventName = a});
leStartTime :: Lens' LifecycleEvent (Maybe UTCTime)
leStartTime = lens _leStartTime (\ s a -> s{_leStartTime = a}) . mapping _Time;
leDiagnostics :: Lens' LifecycleEvent (Maybe Diagnostics)
leDiagnostics = lens _leDiagnostics (\ s a -> s{_leDiagnostics = a});
leEndTime :: Lens' LifecycleEvent (Maybe UTCTime)
leEndTime = lens _leEndTime (\ s a -> s{_leEndTime = a}) . mapping _Time;
instance FromJSON LifecycleEvent where
parseJSON
= withObject "LifecycleEvent"
(\ x ->
LifecycleEvent' <$>
(x .:? "status") <*> (x .:? "lifecycleEventName") <*>
(x .:? "startTime")
<*> (x .:? "diagnostics")
<*> (x .:? "endTime"))
data MinimumHealthyHosts = MinimumHealthyHosts'
{ _mhhValue :: !(Maybe Int)
, _mhhType :: !(Maybe MinimumHealthyHostsType)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
minimumHealthyHosts
:: MinimumHealthyHosts
minimumHealthyHosts =
MinimumHealthyHosts'
{ _mhhValue = Nothing
, _mhhType = Nothing
}
mhhValue :: Lens' MinimumHealthyHosts (Maybe Int)
mhhValue = lens _mhhValue (\ s a -> s{_mhhValue = a});
mhhType :: Lens' MinimumHealthyHosts (Maybe MinimumHealthyHostsType)
mhhType = lens _mhhType (\ s a -> s{_mhhType = a});
instance FromJSON MinimumHealthyHosts where
parseJSON
= withObject "MinimumHealthyHosts"
(\ x ->
MinimumHealthyHosts' <$>
(x .:? "value") <*> (x .:? "type"))
instance ToJSON MinimumHealthyHosts where
toJSON MinimumHealthyHosts'{..}
= object
(catMaybes
[("value" .=) <$> _mhhValue,
("type" .=) <$> _mhhType])
data RevisionLocation = RevisionLocation'
{ _rlRevisionType :: !(Maybe RevisionLocationType)
, _rlS3Location :: !(Maybe S3Location)
, _rlGitHubLocation :: !(Maybe GitHubLocation)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
revisionLocation
:: RevisionLocation
revisionLocation =
RevisionLocation'
{ _rlRevisionType = Nothing
, _rlS3Location = Nothing
, _rlGitHubLocation = Nothing
}
rlRevisionType :: Lens' RevisionLocation (Maybe RevisionLocationType)
rlRevisionType = lens _rlRevisionType (\ s a -> s{_rlRevisionType = a});
rlS3Location :: Lens' RevisionLocation (Maybe S3Location)
rlS3Location = lens _rlS3Location (\ s a -> s{_rlS3Location = a});
rlGitHubLocation :: Lens' RevisionLocation (Maybe GitHubLocation)
rlGitHubLocation = lens _rlGitHubLocation (\ s a -> s{_rlGitHubLocation = a});
instance FromJSON RevisionLocation where
parseJSON
= withObject "RevisionLocation"
(\ x ->
RevisionLocation' <$>
(x .:? "revisionType") <*> (x .:? "s3Location") <*>
(x .:? "gitHubLocation"))
instance ToJSON RevisionLocation where
toJSON RevisionLocation'{..}
= object
(catMaybes
[("revisionType" .=) <$> _rlRevisionType,
("s3Location" .=) <$> _rlS3Location,
("gitHubLocation" .=) <$> _rlGitHubLocation])
data S3Location = S3Location'
{ _slBundleType :: !(Maybe BundleType)
, _slETag :: !(Maybe Text)
, _slBucket :: !(Maybe Text)
, _slKey :: !(Maybe Text)
, _slVersion :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
s3Location
:: S3Location
s3Location =
S3Location'
{ _slBundleType = Nothing
, _slETag = Nothing
, _slBucket = Nothing
, _slKey = Nothing
, _slVersion = Nothing
}
slBundleType :: Lens' S3Location (Maybe BundleType)
slBundleType = lens _slBundleType (\ s a -> s{_slBundleType = a});
slETag :: Lens' S3Location (Maybe Text)
slETag = lens _slETag (\ s a -> s{_slETag = a});
slBucket :: Lens' S3Location (Maybe Text)
slBucket = lens _slBucket (\ s a -> s{_slBucket = a});
slKey :: Lens' S3Location (Maybe Text)
slKey = lens _slKey (\ s a -> s{_slKey = a});
slVersion :: Lens' S3Location (Maybe Text)
slVersion = lens _slVersion (\ s a -> s{_slVersion = a});
instance FromJSON S3Location where
parseJSON
= withObject "S3Location"
(\ x ->
S3Location' <$>
(x .:? "bundleType") <*> (x .:? "eTag") <*>
(x .:? "bucket")
<*> (x .:? "key")
<*> (x .:? "version"))
instance ToJSON S3Location where
toJSON S3Location'{..}
= object
(catMaybes
[("bundleType" .=) <$> _slBundleType,
("eTag" .=) <$> _slETag, ("bucket" .=) <$> _slBucket,
("key" .=) <$> _slKey,
("version" .=) <$> _slVersion])
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 FromJSON Tag where
parseJSON
= withObject "Tag"
(\ x -> Tag' <$> (x .:? "Value") <*> (x .:? "Key"))
instance ToJSON Tag where
toJSON Tag'{..}
= object
(catMaybes
[("Value" .=) <$> _tagValue, ("Key" .=) <$> _tagKey])
data TagFilter = TagFilter'
{ _tfValue :: !(Maybe Text)
, _tfKey :: !(Maybe Text)
, _tfType :: !(Maybe TagFilterType)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
tagFilter
:: TagFilter
tagFilter =
TagFilter'
{ _tfValue = Nothing
, _tfKey = Nothing
, _tfType = Nothing
}
tfValue :: Lens' TagFilter (Maybe Text)
tfValue = lens _tfValue (\ s a -> s{_tfValue = a});
tfKey :: Lens' TagFilter (Maybe Text)
tfKey = lens _tfKey (\ s a -> s{_tfKey = a});
tfType :: Lens' TagFilter (Maybe TagFilterType)
tfType = lens _tfType (\ s a -> s{_tfType = a});
instance FromJSON TagFilter where
parseJSON
= withObject "TagFilter"
(\ x ->
TagFilter' <$>
(x .:? "Value") <*> (x .:? "Key") <*> (x .:? "Type"))
instance ToJSON TagFilter where
toJSON TagFilter'{..}
= object
(catMaybes
[("Value" .=) <$> _tfValue, ("Key" .=) <$> _tfKey,
("Type" .=) <$> _tfType])
data TimeRange = TimeRange'
{ _trStart :: !(Maybe POSIX)
, _trEnd :: !(Maybe POSIX)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
timeRange
:: TimeRange
timeRange =
TimeRange'
{ _trStart = Nothing
, _trEnd = Nothing
}
trStart :: Lens' TimeRange (Maybe UTCTime)
trStart = lens _trStart (\ s a -> s{_trStart = a}) . mapping _Time;
trEnd :: Lens' TimeRange (Maybe UTCTime)
trEnd = lens _trEnd (\ s a -> s{_trEnd = a}) . mapping _Time;
instance ToJSON TimeRange where
toJSON TimeRange'{..}
= object
(catMaybes
[("start" .=) <$> _trStart, ("end" .=) <$> _trEnd])