@@ -23,7 +23,7 @@ module Docker.Client.Types (
23 , ContainerPortInfo(..)
23 , ContainerPortInfo(..)
24 , Container(..)
24 , Container(..)
25 , ContainerState(..)
25 , ContainerState(..)
26− , Status(..)
26+ , State(..)
28 , Label(..)
28 , Label(..)
@@ -238,7 +238,7 @@ data ContainerDetails = ContainerDetails {
238 , processLabel :: Text
238 , processLabel :: Text
239 , resolveConfPath :: FilePath
239 , resolveConfPath :: FilePath
240 , restartCount :: Int
240 , restartCount :: Int
241− , state :: ContainerState
241+ , containerDetailsState :: ContainerState
242 , mounts :: [Mount]
242 , mounts :: [Mount]
244 deriving (Eq, Show, Generic)
244 deriving (Eq, Show, Generic)
@@ -281,7 +281,7 @@ data ContainerState = ContainerState {
281 , restarting :: Bool
281 , restarting :: Bool
282 , running :: Bool
282 , running :: Bool
283 , startedAt :: UTCTime
283 , startedAt :: UTCTime
284− , status :: Status
284+ , state :: State
286 deriving (Eq, Show, Generic)
286 deriving (Eq, Show, Generic)
@@ -511,7 +511,7 @@ data Container = Container
511 , containerImageId :: ImageID
511 , containerImageId :: ImageID
512 , containerCommand :: Text
512 , containerCommand :: Text
513 , containerCreatedAt :: Int
513 , containerCreatedAt :: Int
514− , containerState :: Status -- The naming here is confusing due to inconsitiencies in the Docker API.
514+ , containerState :: State
515 , containerStatus :: Maybe Text
515 , containerStatus :: Maybe Text
516 , containerPorts :: [ContainerPortInfo]
516 , containerPorts :: [ContainerPortInfo]
517 , containerLabels :: [Label]
517 , containerLabels :: [Label]
@@ -539,11 +539,11 @@ instance FromJSON Container where
539 parseNetworks _ = fail "Container NetworkSettings: Not a JSON object."
539 parseNetworks _ = fail "Container NetworkSettings: Not a JSON object."
540 parseJSON _ = fail "Container: Not a JSON object."
540 parseJSON _ = fail "Container: Not a JSON object."
542−-- | Represents the status of the container life cycle.
542+-- | Represents the state of the container life cycle.
543−data Status = Created | Restarting | Running | Paused | Exited | Dead
543+data State = Created | Restarting | Running | Paused | Exited | Dead
544 deriving (Eq, Show, Generic)
544 deriving (Eq, Show, Generic)
546−instance FromJSON Status where
546+instance FromJSON State where
547 parseJSON (JSON.String "running") = return Running
547 parseJSON (JSON.String "running") = return Running
548 parseJSON (JSON.String "created") = return Created -- Note: Guessing on the string values of these.
548 parseJSON (JSON.String "created") = return Created -- Note: Guessing on the string values of these.
549 parseJSON (JSON.String "restarting") = return Restarting
549 parseJSON (JSON.String "restarting") = return Restarting