module Network.AWS.ECS.Types.Product where
import Network.AWS.ECS.Types.Sum
import Network.AWS.Prelude
data Cluster = Cluster'
{ _cStatus :: !(Maybe Text)
, _cClusterARN :: !(Maybe Text)
, _cRunningTasksCount :: !(Maybe Int)
, _cRegisteredContainerInstancesCount :: !(Maybe Int)
, _cPendingTasksCount :: !(Maybe Int)
, _cClusterName :: !(Maybe Text)
, _cActiveServicesCount :: !(Maybe Int)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
cluster
:: Cluster
cluster =
Cluster'
{ _cStatus = Nothing
, _cClusterARN = Nothing
, _cRunningTasksCount = Nothing
, _cRegisteredContainerInstancesCount = Nothing
, _cPendingTasksCount = Nothing
, _cClusterName = Nothing
, _cActiveServicesCount = Nothing
}
cStatus :: Lens' Cluster (Maybe Text)
cStatus = lens _cStatus (\ s a -> s{_cStatus = a});
cClusterARN :: Lens' Cluster (Maybe Text)
cClusterARN = lens _cClusterARN (\ s a -> s{_cClusterARN = a});
cRunningTasksCount :: Lens' Cluster (Maybe Int)
cRunningTasksCount = lens _cRunningTasksCount (\ s a -> s{_cRunningTasksCount = a});
cRegisteredContainerInstancesCount :: Lens' Cluster (Maybe Int)
cRegisteredContainerInstancesCount = lens _cRegisteredContainerInstancesCount (\ s a -> s{_cRegisteredContainerInstancesCount = a});
cPendingTasksCount :: Lens' Cluster (Maybe Int)
cPendingTasksCount = lens _cPendingTasksCount (\ s a -> s{_cPendingTasksCount = a});
cClusterName :: Lens' Cluster (Maybe Text)
cClusterName = lens _cClusterName (\ s a -> s{_cClusterName = a});
cActiveServicesCount :: Lens' Cluster (Maybe Int)
cActiveServicesCount = lens _cActiveServicesCount (\ s a -> s{_cActiveServicesCount = a});
instance FromJSON Cluster where
parseJSON
= withObject "Cluster"
(\ x ->
Cluster' <$>
(x .:? "status") <*> (x .:? "clusterArn") <*>
(x .:? "runningTasksCount")
<*> (x .:? "registeredContainerInstancesCount")
<*> (x .:? "pendingTasksCount")
<*> (x .:? "clusterName")
<*> (x .:? "activeServicesCount"))
data Container = Container'
{ _cNetworkBindings :: !(Maybe [NetworkBinding])
, _cContainerARN :: !(Maybe Text)
, _cTaskARN :: !(Maybe Text)
, _cLastStatus :: !(Maybe Text)
, _cReason :: !(Maybe Text)
, _cName :: !(Maybe Text)
, _cExitCode :: !(Maybe Int)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
container
:: Container
container =
Container'
{ _cNetworkBindings = Nothing
, _cContainerARN = Nothing
, _cTaskARN = Nothing
, _cLastStatus = Nothing
, _cReason = Nothing
, _cName = Nothing
, _cExitCode = Nothing
}
cNetworkBindings :: Lens' Container [NetworkBinding]
cNetworkBindings = lens _cNetworkBindings (\ s a -> s{_cNetworkBindings = a}) . _Default . _Coerce;
cContainerARN :: Lens' Container (Maybe Text)
cContainerARN = lens _cContainerARN (\ s a -> s{_cContainerARN = a});
cTaskARN :: Lens' Container (Maybe Text)
cTaskARN = lens _cTaskARN (\ s a -> s{_cTaskARN = a});
cLastStatus :: Lens' Container (Maybe Text)
cLastStatus = lens _cLastStatus (\ s a -> s{_cLastStatus = a});
cReason :: Lens' Container (Maybe Text)
cReason = lens _cReason (\ s a -> s{_cReason = a});
cName :: Lens' Container (Maybe Text)
cName = lens _cName (\ s a -> s{_cName = a});
cExitCode :: Lens' Container (Maybe Int)
cExitCode = lens _cExitCode (\ s a -> s{_cExitCode = a});
instance FromJSON Container where
parseJSON
= withObject "Container"
(\ x ->
Container' <$>
(x .:? "networkBindings" .!= mempty) <*>
(x .:? "containerArn")
<*> (x .:? "taskArn")
<*> (x .:? "lastStatus")
<*> (x .:? "reason")
<*> (x .:? "name")
<*> (x .:? "exitCode"))
data ContainerDefinition = ContainerDefinition'
{ _cdImage :: !(Maybe Text)
, _cdCommand :: !(Maybe [Text])
, _cdVolumesFrom :: !(Maybe [VolumeFrom])
, _cdEnvironment :: !(Maybe [KeyValuePair])
, _cdEntryPoint :: !(Maybe [Text])
, _cdPortMappings :: !(Maybe [PortMapping])
, _cdMemory :: !(Maybe Int)
, _cdName :: !(Maybe Text)
, _cdMountPoints :: !(Maybe [MountPoint])
, _cdLinks :: !(Maybe [Text])
, _cdEssential :: !(Maybe Bool)
, _cdCpu :: !(Maybe Int)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
containerDefinition
:: ContainerDefinition
containerDefinition =
ContainerDefinition'
{ _cdImage = Nothing
, _cdCommand = Nothing
, _cdVolumesFrom = Nothing
, _cdEnvironment = Nothing
, _cdEntryPoint = Nothing
, _cdPortMappings = Nothing
, _cdMemory = Nothing
, _cdName = Nothing
, _cdMountPoints = Nothing
, _cdLinks = Nothing
, _cdEssential = Nothing
, _cdCpu = Nothing
}
cdImage :: Lens' ContainerDefinition (Maybe Text)
cdImage = lens _cdImage (\ s a -> s{_cdImage = a});
cdCommand :: Lens' ContainerDefinition [Text]
cdCommand = lens _cdCommand (\ s a -> s{_cdCommand = a}) . _Default . _Coerce;
cdVolumesFrom :: Lens' ContainerDefinition [VolumeFrom]
cdVolumesFrom = lens _cdVolumesFrom (\ s a -> s{_cdVolumesFrom = a}) . _Default . _Coerce;
cdEnvironment :: Lens' ContainerDefinition [KeyValuePair]
cdEnvironment = lens _cdEnvironment (\ s a -> s{_cdEnvironment = a}) . _Default . _Coerce;
cdEntryPoint :: Lens' ContainerDefinition [Text]
cdEntryPoint = lens _cdEntryPoint (\ s a -> s{_cdEntryPoint = a}) . _Default . _Coerce;
cdPortMappings :: Lens' ContainerDefinition [PortMapping]
cdPortMappings = lens _cdPortMappings (\ s a -> s{_cdPortMappings = a}) . _Default . _Coerce;
cdMemory :: Lens' ContainerDefinition (Maybe Int)
cdMemory = lens _cdMemory (\ s a -> s{_cdMemory = a});
cdName :: Lens' ContainerDefinition (Maybe Text)
cdName = lens _cdName (\ s a -> s{_cdName = a});
cdMountPoints :: Lens' ContainerDefinition [MountPoint]
cdMountPoints = lens _cdMountPoints (\ s a -> s{_cdMountPoints = a}) . _Default . _Coerce;
cdLinks :: Lens' ContainerDefinition [Text]
cdLinks = lens _cdLinks (\ s a -> s{_cdLinks = a}) . _Default . _Coerce;
cdEssential :: Lens' ContainerDefinition (Maybe Bool)
cdEssential = lens _cdEssential (\ s a -> s{_cdEssential = a});
cdCpu :: Lens' ContainerDefinition (Maybe Int)
cdCpu = lens _cdCpu (\ s a -> s{_cdCpu = a});
instance FromJSON ContainerDefinition where
parseJSON
= withObject "ContainerDefinition"
(\ x ->
ContainerDefinition' <$>
(x .:? "image") <*> (x .:? "command" .!= mempty) <*>
(x .:? "volumesFrom" .!= mempty)
<*> (x .:? "environment" .!= mempty)
<*> (x .:? "entryPoint" .!= mempty)
<*> (x .:? "portMappings" .!= mempty)
<*> (x .:? "memory")
<*> (x .:? "name")
<*> (x .:? "mountPoints" .!= mempty)
<*> (x .:? "links" .!= mempty)
<*> (x .:? "essential")
<*> (x .:? "cpu"))
instance ToJSON ContainerDefinition where
toJSON ContainerDefinition'{..}
= object
["image" .= _cdImage, "command" .= _cdCommand,
"volumesFrom" .= _cdVolumesFrom,
"environment" .= _cdEnvironment,
"entryPoint" .= _cdEntryPoint,
"portMappings" .= _cdPortMappings,
"memory" .= _cdMemory, "name" .= _cdName,
"mountPoints" .= _cdMountPoints, "links" .= _cdLinks,
"essential" .= _cdEssential, "cpu" .= _cdCpu]
data ContainerInstance = ContainerInstance'
{ _ciStatus :: !(Maybe Text)
, _ciRunningTasksCount :: !(Maybe Int)
, _ciRemainingResources :: !(Maybe [Resource])
, _ciEc2InstanceId :: !(Maybe Text)
, _ciContainerInstanceARN :: !(Maybe Text)
, _ciAgentConnected :: !(Maybe Bool)
, _ciVersionInfo :: !(Maybe VersionInfo)
, _ciAgentUpdateStatus :: !(Maybe AgentUpdateStatus)
, _ciPendingTasksCount :: !(Maybe Int)
, _ciRegisteredResources :: !(Maybe [Resource])
} deriving (Eq,Read,Show,Data,Typeable,Generic)
containerInstance
:: ContainerInstance
containerInstance =
ContainerInstance'
{ _ciStatus = Nothing
, _ciRunningTasksCount = Nothing
, _ciRemainingResources = Nothing
, _ciEc2InstanceId = Nothing
, _ciContainerInstanceARN = Nothing
, _ciAgentConnected = Nothing
, _ciVersionInfo = Nothing
, _ciAgentUpdateStatus = Nothing
, _ciPendingTasksCount = Nothing
, _ciRegisteredResources = Nothing
}
ciStatus :: Lens' ContainerInstance (Maybe Text)
ciStatus = lens _ciStatus (\ s a -> s{_ciStatus = a});
ciRunningTasksCount :: Lens' ContainerInstance (Maybe Int)
ciRunningTasksCount = lens _ciRunningTasksCount (\ s a -> s{_ciRunningTasksCount = a});
ciRemainingResources :: Lens' ContainerInstance [Resource]
ciRemainingResources = lens _ciRemainingResources (\ s a -> s{_ciRemainingResources = a}) . _Default . _Coerce;
ciEc2InstanceId :: Lens' ContainerInstance (Maybe Text)
ciEc2InstanceId = lens _ciEc2InstanceId (\ s a -> s{_ciEc2InstanceId = a});
ciContainerInstanceARN :: Lens' ContainerInstance (Maybe Text)
ciContainerInstanceARN = lens _ciContainerInstanceARN (\ s a -> s{_ciContainerInstanceARN = a});
ciAgentConnected :: Lens' ContainerInstance (Maybe Bool)
ciAgentConnected = lens _ciAgentConnected (\ s a -> s{_ciAgentConnected = a});
ciVersionInfo :: Lens' ContainerInstance (Maybe VersionInfo)
ciVersionInfo = lens _ciVersionInfo (\ s a -> s{_ciVersionInfo = a});
ciAgentUpdateStatus :: Lens' ContainerInstance (Maybe AgentUpdateStatus)
ciAgentUpdateStatus = lens _ciAgentUpdateStatus (\ s a -> s{_ciAgentUpdateStatus = a});
ciPendingTasksCount :: Lens' ContainerInstance (Maybe Int)
ciPendingTasksCount = lens _ciPendingTasksCount (\ s a -> s{_ciPendingTasksCount = a});
ciRegisteredResources :: Lens' ContainerInstance [Resource]
ciRegisteredResources = lens _ciRegisteredResources (\ s a -> s{_ciRegisteredResources = a}) . _Default . _Coerce;
instance FromJSON ContainerInstance where
parseJSON
= withObject "ContainerInstance"
(\ x ->
ContainerInstance' <$>
(x .:? "status") <*> (x .:? "runningTasksCount") <*>
(x .:? "remainingResources" .!= mempty)
<*> (x .:? "ec2InstanceId")
<*> (x .:? "containerInstanceArn")
<*> (x .:? "agentConnected")
<*> (x .:? "versionInfo")
<*> (x .:? "agentUpdateStatus")
<*> (x .:? "pendingTasksCount")
<*> (x .:? "registeredResources" .!= mempty))
data ContainerOverride = ContainerOverride'
{ _coCommand :: !(Maybe [Text])
, _coEnvironment :: !(Maybe [KeyValuePair])
, _coName :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
containerOverride
:: ContainerOverride
containerOverride =
ContainerOverride'
{ _coCommand = Nothing
, _coEnvironment = Nothing
, _coName = Nothing
}
coCommand :: Lens' ContainerOverride [Text]
coCommand = lens _coCommand (\ s a -> s{_coCommand = a}) . _Default . _Coerce;
coEnvironment :: Lens' ContainerOverride [KeyValuePair]
coEnvironment = lens _coEnvironment (\ s a -> s{_coEnvironment = a}) . _Default . _Coerce;
coName :: Lens' ContainerOverride (Maybe Text)
coName = lens _coName (\ s a -> s{_coName = a});
instance FromJSON ContainerOverride where
parseJSON
= withObject "ContainerOverride"
(\ x ->
ContainerOverride' <$>
(x .:? "command" .!= mempty) <*>
(x .:? "environment" .!= mempty)
<*> (x .:? "name"))
instance ToJSON ContainerOverride where
toJSON ContainerOverride'{..}
= object
["command" .= _coCommand,
"environment" .= _coEnvironment, "name" .= _coName]
data ContainerService = ContainerService'
{ _csStatus :: !(Maybe Text)
, _csRunningCount :: !(Maybe Int)
, _csClusterARN :: !(Maybe Text)
, _csDesiredCount :: !(Maybe Int)
, _csLoadBalancers :: !(Maybe [LoadBalancer])
, _csPendingCount :: !(Maybe Int)
, _csEvents :: !(Maybe [ServiceEvent])
, _csServiceName :: !(Maybe Text)
, _csDeployments :: !(Maybe [Deployment])
, _csTaskDefinition :: !(Maybe Text)
, _csServiceARN :: !(Maybe Text)
, _csRoleARN :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
containerService
:: ContainerService
containerService =
ContainerService'
{ _csStatus = Nothing
, _csRunningCount = Nothing
, _csClusterARN = Nothing
, _csDesiredCount = Nothing
, _csLoadBalancers = Nothing
, _csPendingCount = Nothing
, _csEvents = Nothing
, _csServiceName = Nothing
, _csDeployments = Nothing
, _csTaskDefinition = Nothing
, _csServiceARN = Nothing
, _csRoleARN = Nothing
}
csStatus :: Lens' ContainerService (Maybe Text)
csStatus = lens _csStatus (\ s a -> s{_csStatus = a});
csRunningCount :: Lens' ContainerService (Maybe Int)
csRunningCount = lens _csRunningCount (\ s a -> s{_csRunningCount = a});
csClusterARN :: Lens' ContainerService (Maybe Text)
csClusterARN = lens _csClusterARN (\ s a -> s{_csClusterARN = a});
csDesiredCount :: Lens' ContainerService (Maybe Int)
csDesiredCount = lens _csDesiredCount (\ s a -> s{_csDesiredCount = a});
csLoadBalancers :: Lens' ContainerService [LoadBalancer]
csLoadBalancers = lens _csLoadBalancers (\ s a -> s{_csLoadBalancers = a}) . _Default . _Coerce;
csPendingCount :: Lens' ContainerService (Maybe Int)
csPendingCount = lens _csPendingCount (\ s a -> s{_csPendingCount = a});
csEvents :: Lens' ContainerService [ServiceEvent]
csEvents = lens _csEvents (\ s a -> s{_csEvents = a}) . _Default . _Coerce;
csServiceName :: Lens' ContainerService (Maybe Text)
csServiceName = lens _csServiceName (\ s a -> s{_csServiceName = a});
csDeployments :: Lens' ContainerService [Deployment]
csDeployments = lens _csDeployments (\ s a -> s{_csDeployments = a}) . _Default . _Coerce;
csTaskDefinition :: Lens' ContainerService (Maybe Text)
csTaskDefinition = lens _csTaskDefinition (\ s a -> s{_csTaskDefinition = a});
csServiceARN :: Lens' ContainerService (Maybe Text)
csServiceARN = lens _csServiceARN (\ s a -> s{_csServiceARN = a});
csRoleARN :: Lens' ContainerService (Maybe Text)
csRoleARN = lens _csRoleARN (\ s a -> s{_csRoleARN = a});
instance FromJSON ContainerService where
parseJSON
= withObject "ContainerService"
(\ x ->
ContainerService' <$>
(x .:? "status") <*> (x .:? "runningCount") <*>
(x .:? "clusterArn")
<*> (x .:? "desiredCount")
<*> (x .:? "loadBalancers" .!= mempty)
<*> (x .:? "pendingCount")
<*> (x .:? "events" .!= mempty)
<*> (x .:? "serviceName")
<*> (x .:? "deployments" .!= mempty)
<*> (x .:? "taskDefinition")
<*> (x .:? "serviceArn")
<*> (x .:? "roleArn"))
data Deployment = Deployment'
{ _dStatus :: !(Maybe Text)
, _dRunningCount :: !(Maybe Int)
, _dCreatedAt :: !(Maybe POSIX)
, _dDesiredCount :: !(Maybe Int)
, _dPendingCount :: !(Maybe Int)
, _dId :: !(Maybe Text)
, _dTaskDefinition :: !(Maybe Text)
, _dUpdatedAt :: !(Maybe POSIX)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deployment
:: Deployment
deployment =
Deployment'
{ _dStatus = Nothing
, _dRunningCount = Nothing
, _dCreatedAt = Nothing
, _dDesiredCount = Nothing
, _dPendingCount = Nothing
, _dId = Nothing
, _dTaskDefinition = Nothing
, _dUpdatedAt = Nothing
}
dStatus :: Lens' Deployment (Maybe Text)
dStatus = lens _dStatus (\ s a -> s{_dStatus = a});
dRunningCount :: Lens' Deployment (Maybe Int)
dRunningCount = lens _dRunningCount (\ s a -> s{_dRunningCount = a});
dCreatedAt :: Lens' Deployment (Maybe UTCTime)
dCreatedAt = lens _dCreatedAt (\ s a -> s{_dCreatedAt = a}) . mapping _Time;
dDesiredCount :: Lens' Deployment (Maybe Int)
dDesiredCount = lens _dDesiredCount (\ s a -> s{_dDesiredCount = a});
dPendingCount :: Lens' Deployment (Maybe Int)
dPendingCount = lens _dPendingCount (\ s a -> s{_dPendingCount = a});
dId :: Lens' Deployment (Maybe Text)
dId = lens _dId (\ s a -> s{_dId = a});
dTaskDefinition :: Lens' Deployment (Maybe Text)
dTaskDefinition = lens _dTaskDefinition (\ s a -> s{_dTaskDefinition = a});
dUpdatedAt :: Lens' Deployment (Maybe UTCTime)
dUpdatedAt = lens _dUpdatedAt (\ s a -> s{_dUpdatedAt = a}) . mapping _Time;
instance FromJSON Deployment where
parseJSON
= withObject "Deployment"
(\ x ->
Deployment' <$>
(x .:? "status") <*> (x .:? "runningCount") <*>
(x .:? "createdAt")
<*> (x .:? "desiredCount")
<*> (x .:? "pendingCount")
<*> (x .:? "id")
<*> (x .:? "taskDefinition")
<*> (x .:? "updatedAt"))
data Failure = Failure'
{ _fArn :: !(Maybe Text)
, _fReason :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
failure
:: Failure
failure =
Failure'
{ _fArn = Nothing
, _fReason = Nothing
}
fArn :: Lens' Failure (Maybe Text)
fArn = lens _fArn (\ s a -> s{_fArn = a});
fReason :: Lens' Failure (Maybe Text)
fReason = lens _fReason (\ s a -> s{_fReason = a});
instance FromJSON Failure where
parseJSON
= withObject "Failure"
(\ x ->
Failure' <$> (x .:? "arn") <*> (x .:? "reason"))
newtype HostVolumeProperties = HostVolumeProperties'
{ _hvpSourcePath :: Maybe Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
hostVolumeProperties
:: HostVolumeProperties
hostVolumeProperties =
HostVolumeProperties'
{ _hvpSourcePath = Nothing
}
hvpSourcePath :: Lens' HostVolumeProperties (Maybe Text)
hvpSourcePath = lens _hvpSourcePath (\ s a -> s{_hvpSourcePath = a});
instance FromJSON HostVolumeProperties where
parseJSON
= withObject "HostVolumeProperties"
(\ x ->
HostVolumeProperties' <$> (x .:? "sourcePath"))
instance ToJSON HostVolumeProperties where
toJSON HostVolumeProperties'{..}
= object ["sourcePath" .= _hvpSourcePath]
data KeyValuePair = KeyValuePair'
{ _kvpValue :: !(Maybe Text)
, _kvpName :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
keyValuePair
:: KeyValuePair
keyValuePair =
KeyValuePair'
{ _kvpValue = Nothing
, _kvpName = Nothing
}
kvpValue :: Lens' KeyValuePair (Maybe Text)
kvpValue = lens _kvpValue (\ s a -> s{_kvpValue = a});
kvpName :: Lens' KeyValuePair (Maybe Text)
kvpName = lens _kvpName (\ s a -> s{_kvpName = a});
instance FromJSON KeyValuePair where
parseJSON
= withObject "KeyValuePair"
(\ x ->
KeyValuePair' <$> (x .:? "value") <*> (x .:? "name"))
instance ToJSON KeyValuePair where
toJSON KeyValuePair'{..}
= object ["value" .= _kvpValue, "name" .= _kvpName]
data LoadBalancer = LoadBalancer'
{ _lbLoadBalancerName :: !(Maybe Text)
, _lbContainerName :: !(Maybe Text)
, _lbContainerPort :: !(Maybe Int)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
loadBalancer
:: LoadBalancer
loadBalancer =
LoadBalancer'
{ _lbLoadBalancerName = Nothing
, _lbContainerName = Nothing
, _lbContainerPort = Nothing
}
lbLoadBalancerName :: Lens' LoadBalancer (Maybe Text)
lbLoadBalancerName = lens _lbLoadBalancerName (\ s a -> s{_lbLoadBalancerName = a});
lbContainerName :: Lens' LoadBalancer (Maybe Text)
lbContainerName = lens _lbContainerName (\ s a -> s{_lbContainerName = a});
lbContainerPort :: Lens' LoadBalancer (Maybe Int)
lbContainerPort = lens _lbContainerPort (\ s a -> s{_lbContainerPort = a});
instance FromJSON LoadBalancer where
parseJSON
= withObject "LoadBalancer"
(\ x ->
LoadBalancer' <$>
(x .:? "loadBalancerName") <*>
(x .:? "containerName")
<*> (x .:? "containerPort"))
instance ToJSON LoadBalancer where
toJSON LoadBalancer'{..}
= object
["loadBalancerName" .= _lbLoadBalancerName,
"containerName" .= _lbContainerName,
"containerPort" .= _lbContainerPort]
data MountPoint = MountPoint'
{ _mpContainerPath :: !(Maybe Text)
, _mpSourceVolume :: !(Maybe Text)
, _mpReadOnly :: !(Maybe Bool)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
mountPoint
:: MountPoint
mountPoint =
MountPoint'
{ _mpContainerPath = Nothing
, _mpSourceVolume = Nothing
, _mpReadOnly = Nothing
}
mpContainerPath :: Lens' MountPoint (Maybe Text)
mpContainerPath = lens _mpContainerPath (\ s a -> s{_mpContainerPath = a});
mpSourceVolume :: Lens' MountPoint (Maybe Text)
mpSourceVolume = lens _mpSourceVolume (\ s a -> s{_mpSourceVolume = a});
mpReadOnly :: Lens' MountPoint (Maybe Bool)
mpReadOnly = lens _mpReadOnly (\ s a -> s{_mpReadOnly = a});
instance FromJSON MountPoint where
parseJSON
= withObject "MountPoint"
(\ x ->
MountPoint' <$>
(x .:? "containerPath") <*> (x .:? "sourceVolume")
<*> (x .:? "readOnly"))
instance ToJSON MountPoint where
toJSON MountPoint'{..}
= object
["containerPath" .= _mpContainerPath,
"sourceVolume" .= _mpSourceVolume,
"readOnly" .= _mpReadOnly]
data NetworkBinding = NetworkBinding'
{ _nbBindIP :: !(Maybe Text)
, _nbProtocol :: !(Maybe TransportProtocol)
, _nbHostPort :: !(Maybe Int)
, _nbContainerPort :: !(Maybe Int)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
networkBinding
:: NetworkBinding
networkBinding =
NetworkBinding'
{ _nbBindIP = Nothing
, _nbProtocol = Nothing
, _nbHostPort = Nothing
, _nbContainerPort = Nothing
}
nbBindIP :: Lens' NetworkBinding (Maybe Text)
nbBindIP = lens _nbBindIP (\ s a -> s{_nbBindIP = a});
nbProtocol :: Lens' NetworkBinding (Maybe TransportProtocol)
nbProtocol = lens _nbProtocol (\ s a -> s{_nbProtocol = a});
nbHostPort :: Lens' NetworkBinding (Maybe Int)
nbHostPort = lens _nbHostPort (\ s a -> s{_nbHostPort = a});
nbContainerPort :: Lens' NetworkBinding (Maybe Int)
nbContainerPort = lens _nbContainerPort (\ s a -> s{_nbContainerPort = a});
instance FromJSON NetworkBinding where
parseJSON
= withObject "NetworkBinding"
(\ x ->
NetworkBinding' <$>
(x .:? "bindIP") <*> (x .:? "protocol") <*>
(x .:? "hostPort")
<*> (x .:? "containerPort"))
instance ToJSON NetworkBinding where
toJSON NetworkBinding'{..}
= object
["bindIP" .= _nbBindIP, "protocol" .= _nbProtocol,
"hostPort" .= _nbHostPort,
"containerPort" .= _nbContainerPort]
data PortMapping = PortMapping'
{ _pmProtocol :: !(Maybe TransportProtocol)
, _pmHostPort :: !(Maybe Int)
, _pmContainerPort :: !(Maybe Int)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
portMapping
:: PortMapping
portMapping =
PortMapping'
{ _pmProtocol = Nothing
, _pmHostPort = Nothing
, _pmContainerPort = Nothing
}
pmProtocol :: Lens' PortMapping (Maybe TransportProtocol)
pmProtocol = lens _pmProtocol (\ s a -> s{_pmProtocol = a});
pmHostPort :: Lens' PortMapping (Maybe Int)
pmHostPort = lens _pmHostPort (\ s a -> s{_pmHostPort = a});
pmContainerPort :: Lens' PortMapping (Maybe Int)
pmContainerPort = lens _pmContainerPort (\ s a -> s{_pmContainerPort = a});
instance FromJSON PortMapping where
parseJSON
= withObject "PortMapping"
(\ x ->
PortMapping' <$>
(x .:? "protocol") <*> (x .:? "hostPort") <*>
(x .:? "containerPort"))
instance ToJSON PortMapping where
toJSON PortMapping'{..}
= object
["protocol" .= _pmProtocol,
"hostPort" .= _pmHostPort,
"containerPort" .= _pmContainerPort]
data Resource = Resource'
{ _rStringSetValue :: !(Maybe [Text])
, _rIntegerValue :: !(Maybe Int)
, _rDoubleValue :: !(Maybe Double)
, _rLongValue :: !(Maybe Integer)
, _rName :: !(Maybe Text)
, _rType :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
resource
:: Resource
resource =
Resource'
{ _rStringSetValue = Nothing
, _rIntegerValue = Nothing
, _rDoubleValue = Nothing
, _rLongValue = Nothing
, _rName = Nothing
, _rType = Nothing
}
rStringSetValue :: Lens' Resource [Text]
rStringSetValue = lens _rStringSetValue (\ s a -> s{_rStringSetValue = a}) . _Default . _Coerce;
rIntegerValue :: Lens' Resource (Maybe Int)
rIntegerValue = lens _rIntegerValue (\ s a -> s{_rIntegerValue = a});
rDoubleValue :: Lens' Resource (Maybe Double)
rDoubleValue = lens _rDoubleValue (\ s a -> s{_rDoubleValue = a});
rLongValue :: Lens' Resource (Maybe Integer)
rLongValue = lens _rLongValue (\ s a -> s{_rLongValue = a});
rName :: Lens' Resource (Maybe Text)
rName = lens _rName (\ s a -> s{_rName = a});
rType :: Lens' Resource (Maybe Text)
rType = lens _rType (\ s a -> s{_rType = a});
instance FromJSON Resource where
parseJSON
= withObject "Resource"
(\ x ->
Resource' <$>
(x .:? "stringSetValue" .!= mempty) <*>
(x .:? "integerValue")
<*> (x .:? "doubleValue")
<*> (x .:? "longValue")
<*> (x .:? "name")
<*> (x .:? "type"))
instance ToJSON Resource where
toJSON Resource'{..}
= object
["stringSetValue" .= _rStringSetValue,
"integerValue" .= _rIntegerValue,
"doubleValue" .= _rDoubleValue,
"longValue" .= _rLongValue, "name" .= _rName,
"type" .= _rType]
data ServiceEvent = ServiceEvent'
{ _seCreatedAt :: !(Maybe POSIX)
, _seId :: !(Maybe Text)
, _seMessage :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
serviceEvent
:: ServiceEvent
serviceEvent =
ServiceEvent'
{ _seCreatedAt = Nothing
, _seId = Nothing
, _seMessage = Nothing
}
seCreatedAt :: Lens' ServiceEvent (Maybe UTCTime)
seCreatedAt = lens _seCreatedAt (\ s a -> s{_seCreatedAt = a}) . mapping _Time;
seId :: Lens' ServiceEvent (Maybe Text)
seId = lens _seId (\ s a -> s{_seId = a});
seMessage :: Lens' ServiceEvent (Maybe Text)
seMessage = lens _seMessage (\ s a -> s{_seMessage = a});
instance FromJSON ServiceEvent where
parseJSON
= withObject "ServiceEvent"
(\ x ->
ServiceEvent' <$>
(x .:? "createdAt") <*> (x .:? "id") <*>
(x .:? "message"))
data Task = Task'
{ _tDesiredStatus :: !(Maybe Text)
, _tClusterARN :: !(Maybe Text)
, _tOverrides :: !(Maybe TaskOverride)
, _tTaskARN :: !(Maybe Text)
, _tContainerInstanceARN :: !(Maybe Text)
, _tLastStatus :: !(Maybe Text)
, _tContainers :: !(Maybe [Container])
, _tStartedBy :: !(Maybe Text)
, _tTaskDefinitionARN :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
task
:: Task
task =
Task'
{ _tDesiredStatus = Nothing
, _tClusterARN = Nothing
, _tOverrides = Nothing
, _tTaskARN = Nothing
, _tContainerInstanceARN = Nothing
, _tLastStatus = Nothing
, _tContainers = Nothing
, _tStartedBy = Nothing
, _tTaskDefinitionARN = Nothing
}
tDesiredStatus :: Lens' Task (Maybe Text)
tDesiredStatus = lens _tDesiredStatus (\ s a -> s{_tDesiredStatus = a});
tClusterARN :: Lens' Task (Maybe Text)
tClusterARN = lens _tClusterARN (\ s a -> s{_tClusterARN = a});
tOverrides :: Lens' Task (Maybe TaskOverride)
tOverrides = lens _tOverrides (\ s a -> s{_tOverrides = a});
tTaskARN :: Lens' Task (Maybe Text)
tTaskARN = lens _tTaskARN (\ s a -> s{_tTaskARN = a});
tContainerInstanceARN :: Lens' Task (Maybe Text)
tContainerInstanceARN = lens _tContainerInstanceARN (\ s a -> s{_tContainerInstanceARN = a});
tLastStatus :: Lens' Task (Maybe Text)
tLastStatus = lens _tLastStatus (\ s a -> s{_tLastStatus = a});
tContainers :: Lens' Task [Container]
tContainers = lens _tContainers (\ s a -> s{_tContainers = a}) . _Default . _Coerce;
tStartedBy :: Lens' Task (Maybe Text)
tStartedBy = lens _tStartedBy (\ s a -> s{_tStartedBy = a});
tTaskDefinitionARN :: Lens' Task (Maybe Text)
tTaskDefinitionARN = lens _tTaskDefinitionARN (\ s a -> s{_tTaskDefinitionARN = a});
instance FromJSON Task where
parseJSON
= withObject "Task"
(\ x ->
Task' <$>
(x .:? "desiredStatus") <*> (x .:? "clusterArn") <*>
(x .:? "overrides")
<*> (x .:? "taskArn")
<*> (x .:? "containerInstanceArn")
<*> (x .:? "lastStatus")
<*> (x .:? "containers" .!= mempty)
<*> (x .:? "startedBy")
<*> (x .:? "taskDefinitionArn"))
data TaskDefinition = TaskDefinition'
{ _tdStatus :: !(Maybe TaskDefinitionStatus)
, _tdFamily :: !(Maybe Text)
, _tdContainerDefinitions :: !(Maybe [ContainerDefinition])
, _tdTaskDefinitionARN :: !(Maybe Text)
, _tdRevision :: !(Maybe Int)
, _tdVolumes :: !(Maybe [Volume])
} deriving (Eq,Read,Show,Data,Typeable,Generic)
taskDefinition
:: TaskDefinition
taskDefinition =
TaskDefinition'
{ _tdStatus = Nothing
, _tdFamily = Nothing
, _tdContainerDefinitions = Nothing
, _tdTaskDefinitionARN = Nothing
, _tdRevision = Nothing
, _tdVolumes = Nothing
}
tdStatus :: Lens' TaskDefinition (Maybe TaskDefinitionStatus)
tdStatus = lens _tdStatus (\ s a -> s{_tdStatus = a});
tdFamily :: Lens' TaskDefinition (Maybe Text)
tdFamily = lens _tdFamily (\ s a -> s{_tdFamily = a});
tdContainerDefinitions :: Lens' TaskDefinition [ContainerDefinition]
tdContainerDefinitions = lens _tdContainerDefinitions (\ s a -> s{_tdContainerDefinitions = a}) . _Default . _Coerce;
tdTaskDefinitionARN :: Lens' TaskDefinition (Maybe Text)
tdTaskDefinitionARN = lens _tdTaskDefinitionARN (\ s a -> s{_tdTaskDefinitionARN = a});
tdRevision :: Lens' TaskDefinition (Maybe Int)
tdRevision = lens _tdRevision (\ s a -> s{_tdRevision = a});
tdVolumes :: Lens' TaskDefinition [Volume]
tdVolumes = lens _tdVolumes (\ s a -> s{_tdVolumes = a}) . _Default . _Coerce;
instance FromJSON TaskDefinition where
parseJSON
= withObject "TaskDefinition"
(\ x ->
TaskDefinition' <$>
(x .:? "status") <*> (x .:? "family") <*>
(x .:? "containerDefinitions" .!= mempty)
<*> (x .:? "taskDefinitionArn")
<*> (x .:? "revision")
<*> (x .:? "volumes" .!= mempty))
newtype TaskOverride = TaskOverride'
{ _toContainerOverrides :: Maybe [ContainerOverride]
} deriving (Eq,Read,Show,Data,Typeable,Generic)
taskOverride
:: TaskOverride
taskOverride =
TaskOverride'
{ _toContainerOverrides = Nothing
}
toContainerOverrides :: Lens' TaskOverride [ContainerOverride]
toContainerOverrides = lens _toContainerOverrides (\ s a -> s{_toContainerOverrides = a}) . _Default . _Coerce;
instance FromJSON TaskOverride where
parseJSON
= withObject "TaskOverride"
(\ x ->
TaskOverride' <$>
(x .:? "containerOverrides" .!= mempty))
instance ToJSON TaskOverride where
toJSON TaskOverride'{..}
= object
["containerOverrides" .= _toContainerOverrides]
data VersionInfo = VersionInfo'
{ _viAgentVersion :: !(Maybe Text)
, _viAgentHash :: !(Maybe Text)
, _viDockerVersion :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
versionInfo
:: VersionInfo
versionInfo =
VersionInfo'
{ _viAgentVersion = Nothing
, _viAgentHash = Nothing
, _viDockerVersion = Nothing
}
viAgentVersion :: Lens' VersionInfo (Maybe Text)
viAgentVersion = lens _viAgentVersion (\ s a -> s{_viAgentVersion = a});
viAgentHash :: Lens' VersionInfo (Maybe Text)
viAgentHash = lens _viAgentHash (\ s a -> s{_viAgentHash = a});
viDockerVersion :: Lens' VersionInfo (Maybe Text)
viDockerVersion = lens _viDockerVersion (\ s a -> s{_viDockerVersion = a});
instance FromJSON VersionInfo where
parseJSON
= withObject "VersionInfo"
(\ x ->
VersionInfo' <$>
(x .:? "agentVersion") <*> (x .:? "agentHash") <*>
(x .:? "dockerVersion"))
instance ToJSON VersionInfo where
toJSON VersionInfo'{..}
= object
["agentVersion" .= _viAgentVersion,
"agentHash" .= _viAgentHash,
"dockerVersion" .= _viDockerVersion]
data Volume = Volume'
{ _vName :: !(Maybe Text)
, _vHost :: !(Maybe HostVolumeProperties)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
volume
:: Volume
volume =
Volume'
{ _vName = Nothing
, _vHost = Nothing
}
vName :: Lens' Volume (Maybe Text)
vName = lens _vName (\ s a -> s{_vName = a});
vHost :: Lens' Volume (Maybe HostVolumeProperties)
vHost = lens _vHost (\ s a -> s{_vHost = a});
instance FromJSON Volume where
parseJSON
= withObject "Volume"
(\ x ->
Volume' <$> (x .:? "name") <*> (x .:? "host"))
instance ToJSON Volume where
toJSON Volume'{..}
= object ["name" .= _vName, "host" .= _vHost]
data VolumeFrom = VolumeFrom'
{ _vfSourceContainer :: !(Maybe Text)
, _vfReadOnly :: !(Maybe Bool)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
volumeFrom
:: VolumeFrom
volumeFrom =
VolumeFrom'
{ _vfSourceContainer = Nothing
, _vfReadOnly = Nothing
}
vfSourceContainer :: Lens' VolumeFrom (Maybe Text)
vfSourceContainer = lens _vfSourceContainer (\ s a -> s{_vfSourceContainer = a});
vfReadOnly :: Lens' VolumeFrom (Maybe Bool)
vfReadOnly = lens _vfReadOnly (\ s a -> s{_vfReadOnly = a});
instance FromJSON VolumeFrom where
parseJSON
= withObject "VolumeFrom"
(\ x ->
VolumeFrom' <$>
(x .:? "sourceContainer") <*> (x .:? "readOnly"))
instance ToJSON VolumeFrom where
toJSON VolumeFrom'{..}
= object
["sourceContainer" .= _vfSourceContainer,
"readOnly" .= _vfReadOnly]