{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SageMaker.GetDeviceFleetReport
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Describes a fleet.
module Amazonka.SageMaker.GetDeviceFleetReport
  ( -- * Creating a Request
    GetDeviceFleetReport (..),
    newGetDeviceFleetReport,

    -- * Request Lenses
    getDeviceFleetReport_deviceFleetName,

    -- * Destructuring the Response
    GetDeviceFleetReportResponse (..),
    newGetDeviceFleetReportResponse,

    -- * Response Lenses
    getDeviceFleetReportResponse_agentVersions,
    getDeviceFleetReportResponse_reportGenerated,
    getDeviceFleetReportResponse_deviceStats,
    getDeviceFleetReportResponse_outputConfig,
    getDeviceFleetReportResponse_description,
    getDeviceFleetReportResponse_modelStats,
    getDeviceFleetReportResponse_httpStatus,
    getDeviceFleetReportResponse_deviceFleetArn,
    getDeviceFleetReportResponse_deviceFleetName,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SageMaker.Types

-- | /See:/ 'newGetDeviceFleetReport' smart constructor.
data GetDeviceFleetReport = GetDeviceFleetReport'
  { -- | The name of the fleet.
    GetDeviceFleetReport -> Text
deviceFleetName :: Prelude.Text
  }
  deriving (GetDeviceFleetReport -> GetDeviceFleetReport -> Bool
(GetDeviceFleetReport -> GetDeviceFleetReport -> Bool)
-> (GetDeviceFleetReport -> GetDeviceFleetReport -> Bool)
-> Eq GetDeviceFleetReport
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDeviceFleetReport -> GetDeviceFleetReport -> Bool
$c/= :: GetDeviceFleetReport -> GetDeviceFleetReport -> Bool
== :: GetDeviceFleetReport -> GetDeviceFleetReport -> Bool
$c== :: GetDeviceFleetReport -> GetDeviceFleetReport -> Bool
Prelude.Eq, ReadPrec [GetDeviceFleetReport]
ReadPrec GetDeviceFleetReport
Int -> ReadS GetDeviceFleetReport
ReadS [GetDeviceFleetReport]
(Int -> ReadS GetDeviceFleetReport)
-> ReadS [GetDeviceFleetReport]
-> ReadPrec GetDeviceFleetReport
-> ReadPrec [GetDeviceFleetReport]
-> Read GetDeviceFleetReport
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDeviceFleetReport]
$creadListPrec :: ReadPrec [GetDeviceFleetReport]
readPrec :: ReadPrec GetDeviceFleetReport
$creadPrec :: ReadPrec GetDeviceFleetReport
readList :: ReadS [GetDeviceFleetReport]
$creadList :: ReadS [GetDeviceFleetReport]
readsPrec :: Int -> ReadS GetDeviceFleetReport
$creadsPrec :: Int -> ReadS GetDeviceFleetReport
Prelude.Read, Int -> GetDeviceFleetReport -> ShowS
[GetDeviceFleetReport] -> ShowS
GetDeviceFleetReport -> String
(Int -> GetDeviceFleetReport -> ShowS)
-> (GetDeviceFleetReport -> String)
-> ([GetDeviceFleetReport] -> ShowS)
-> Show GetDeviceFleetReport
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDeviceFleetReport] -> ShowS
$cshowList :: [GetDeviceFleetReport] -> ShowS
show :: GetDeviceFleetReport -> String
$cshow :: GetDeviceFleetReport -> String
showsPrec :: Int -> GetDeviceFleetReport -> ShowS
$cshowsPrec :: Int -> GetDeviceFleetReport -> ShowS
Prelude.Show, (forall x. GetDeviceFleetReport -> Rep GetDeviceFleetReport x)
-> (forall x. Rep GetDeviceFleetReport x -> GetDeviceFleetReport)
-> Generic GetDeviceFleetReport
forall x. Rep GetDeviceFleetReport x -> GetDeviceFleetReport
forall x. GetDeviceFleetReport -> Rep GetDeviceFleetReport x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetDeviceFleetReport x -> GetDeviceFleetReport
$cfrom :: forall x. GetDeviceFleetReport -> Rep GetDeviceFleetReport x
Prelude.Generic)

-- |
-- Create a value of 'GetDeviceFleetReport' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'deviceFleetName', 'getDeviceFleetReport_deviceFleetName' - The name of the fleet.
newGetDeviceFleetReport ::
  -- | 'deviceFleetName'
  Prelude.Text ->
  GetDeviceFleetReport
newGetDeviceFleetReport :: Text -> GetDeviceFleetReport
newGetDeviceFleetReport Text
pDeviceFleetName_ =
  GetDeviceFleetReport' :: Text -> GetDeviceFleetReport
GetDeviceFleetReport'
    { $sel:deviceFleetName:GetDeviceFleetReport' :: Text
deviceFleetName =
        Text
pDeviceFleetName_
    }

-- | The name of the fleet.
getDeviceFleetReport_deviceFleetName :: Lens.Lens' GetDeviceFleetReport Prelude.Text
getDeviceFleetReport_deviceFleetName :: (Text -> f Text) -> GetDeviceFleetReport -> f GetDeviceFleetReport
getDeviceFleetReport_deviceFleetName = (GetDeviceFleetReport -> Text)
-> (GetDeviceFleetReport -> Text -> GetDeviceFleetReport)
-> Lens GetDeviceFleetReport GetDeviceFleetReport Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeviceFleetReport' {Text
deviceFleetName :: Text
$sel:deviceFleetName:GetDeviceFleetReport' :: GetDeviceFleetReport -> Text
deviceFleetName} -> Text
deviceFleetName) (\s :: GetDeviceFleetReport
s@GetDeviceFleetReport' {} Text
a -> GetDeviceFleetReport
s {$sel:deviceFleetName:GetDeviceFleetReport' :: Text
deviceFleetName = Text
a} :: GetDeviceFleetReport)

instance Core.AWSRequest GetDeviceFleetReport where
  type
    AWSResponse GetDeviceFleetReport =
      GetDeviceFleetReportResponse
  request :: GetDeviceFleetReport -> Request GetDeviceFleetReport
request = Service -> GetDeviceFleetReport -> Request GetDeviceFleetReport
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetDeviceFleetReport
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetDeviceFleetReport)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetDeviceFleetReport))
-> Logger
-> Service
-> Proxy GetDeviceFleetReport
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetDeviceFleetReport)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [AgentVersion]
-> Maybe POSIX
-> Maybe DeviceStats
-> Maybe EdgeOutputConfig
-> Maybe Text
-> Maybe [EdgeModelStat]
-> Int
-> Text
-> Text
-> GetDeviceFleetReportResponse
GetDeviceFleetReportResponse'
            (Maybe [AgentVersion]
 -> Maybe POSIX
 -> Maybe DeviceStats
 -> Maybe EdgeOutputConfig
 -> Maybe Text
 -> Maybe [EdgeModelStat]
 -> Int
 -> Text
 -> Text
 -> GetDeviceFleetReportResponse)
-> Either String (Maybe [AgentVersion])
-> Either
     String
     (Maybe POSIX
      -> Maybe DeviceStats
      -> Maybe EdgeOutputConfig
      -> Maybe Text
      -> Maybe [EdgeModelStat]
      -> Int
      -> Text
      -> Text
      -> GetDeviceFleetReportResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [AgentVersion]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AgentVersions" Either String (Maybe (Maybe [AgentVersion]))
-> Maybe [AgentVersion] -> Either String (Maybe [AgentVersion])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [AgentVersion]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe POSIX
   -> Maybe DeviceStats
   -> Maybe EdgeOutputConfig
   -> Maybe Text
   -> Maybe [EdgeModelStat]
   -> Int
   -> Text
   -> Text
   -> GetDeviceFleetReportResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe DeviceStats
      -> Maybe EdgeOutputConfig
      -> Maybe Text
      -> Maybe [EdgeModelStat]
      -> Int
      -> Text
      -> Text
      -> GetDeviceFleetReportResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ReportGenerated")
            Either
  String
  (Maybe DeviceStats
   -> Maybe EdgeOutputConfig
   -> Maybe Text
   -> Maybe [EdgeModelStat]
   -> Int
   -> Text
   -> Text
   -> GetDeviceFleetReportResponse)
-> Either String (Maybe DeviceStats)
-> Either
     String
     (Maybe EdgeOutputConfig
      -> Maybe Text
      -> Maybe [EdgeModelStat]
      -> Int
      -> Text
      -> Text
      -> GetDeviceFleetReportResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe DeviceStats)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DeviceStats")
            Either
  String
  (Maybe EdgeOutputConfig
   -> Maybe Text
   -> Maybe [EdgeModelStat]
   -> Int
   -> Text
   -> Text
   -> GetDeviceFleetReportResponse)
-> Either String (Maybe EdgeOutputConfig)
-> Either
     String
     (Maybe Text
      -> Maybe [EdgeModelStat]
      -> Int
      -> Text
      -> Text
      -> GetDeviceFleetReportResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe EdgeOutputConfig)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"OutputConfig")
            Either
  String
  (Maybe Text
   -> Maybe [EdgeModelStat]
   -> Int
   -> Text
   -> Text
   -> GetDeviceFleetReportResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [EdgeModelStat]
      -> Int -> Text -> Text -> GetDeviceFleetReportResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Description")
            Either
  String
  (Maybe [EdgeModelStat]
   -> Int -> Text -> Text -> GetDeviceFleetReportResponse)
-> Either String (Maybe [EdgeModelStat])
-> Either
     String (Int -> Text -> Text -> GetDeviceFleetReportResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [EdgeModelStat]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ModelStats" Either String (Maybe (Maybe [EdgeModelStat]))
-> Maybe [EdgeModelStat] -> Either String (Maybe [EdgeModelStat])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [EdgeModelStat]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> Text -> Text -> GetDeviceFleetReportResponse)
-> Either String Int
-> Either String (Text -> Text -> GetDeviceFleetReportResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            Either String (Text -> Text -> GetDeviceFleetReportResponse)
-> Either String Text
-> Either String (Text -> GetDeviceFleetReportResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"DeviceFleetArn")
            Either String (Text -> GetDeviceFleetReportResponse)
-> Either String Text -> Either String GetDeviceFleetReportResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"DeviceFleetName")
      )

instance Prelude.Hashable GetDeviceFleetReport

instance Prelude.NFData GetDeviceFleetReport

instance Core.ToHeaders GetDeviceFleetReport where
  toHeaders :: GetDeviceFleetReport -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetDeviceFleetReport -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"SageMaker.GetDeviceFleetReport" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON GetDeviceFleetReport where
  toJSON :: GetDeviceFleetReport -> Value
toJSON GetDeviceFleetReport' {Text
deviceFleetName :: Text
$sel:deviceFleetName:GetDeviceFleetReport' :: GetDeviceFleetReport -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"DeviceFleetName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
deviceFleetName)
          ]
      )

instance Core.ToPath GetDeviceFleetReport where
  toPath :: GetDeviceFleetReport -> ByteString
toPath = ByteString -> GetDeviceFleetReport -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery GetDeviceFleetReport where
  toQuery :: GetDeviceFleetReport -> QueryString
toQuery = QueryString -> GetDeviceFleetReport -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newGetDeviceFleetReportResponse' smart constructor.
data GetDeviceFleetReportResponse = GetDeviceFleetReportResponse'
  { -- | The versions of Edge Manager agent deployed on the fleet.
    GetDeviceFleetReportResponse -> Maybe [AgentVersion]
agentVersions :: Prelude.Maybe [AgentVersion],
    -- | Timestamp of when the report was generated.
    GetDeviceFleetReportResponse -> Maybe POSIX
reportGenerated :: Prelude.Maybe Core.POSIX,
    -- | Status of devices.
    GetDeviceFleetReportResponse -> Maybe DeviceStats
deviceStats :: Prelude.Maybe DeviceStats,
    -- | The output configuration for storing sample data collected by the fleet.
    GetDeviceFleetReportResponse -> Maybe EdgeOutputConfig
outputConfig :: Prelude.Maybe EdgeOutputConfig,
    -- | Description of the fleet.
    GetDeviceFleetReportResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Status of model on device.
    GetDeviceFleetReportResponse -> Maybe [EdgeModelStat]
modelStats :: Prelude.Maybe [EdgeModelStat],
    -- | The response's http status code.
    GetDeviceFleetReportResponse -> Int
httpStatus :: Prelude.Int,
    -- | The Amazon Resource Name (ARN) of the device.
    GetDeviceFleetReportResponse -> Text
deviceFleetArn :: Prelude.Text,
    -- | The name of the fleet.
    GetDeviceFleetReportResponse -> Text
deviceFleetName :: Prelude.Text
  }
  deriving (GetDeviceFleetReportResponse
-> GetDeviceFleetReportResponse -> Bool
(GetDeviceFleetReportResponse
 -> GetDeviceFleetReportResponse -> Bool)
-> (GetDeviceFleetReportResponse
    -> GetDeviceFleetReportResponse -> Bool)
-> Eq GetDeviceFleetReportResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDeviceFleetReportResponse
-> GetDeviceFleetReportResponse -> Bool
$c/= :: GetDeviceFleetReportResponse
-> GetDeviceFleetReportResponse -> Bool
== :: GetDeviceFleetReportResponse
-> GetDeviceFleetReportResponse -> Bool
$c== :: GetDeviceFleetReportResponse
-> GetDeviceFleetReportResponse -> Bool
Prelude.Eq, ReadPrec [GetDeviceFleetReportResponse]
ReadPrec GetDeviceFleetReportResponse
Int -> ReadS GetDeviceFleetReportResponse
ReadS [GetDeviceFleetReportResponse]
(Int -> ReadS GetDeviceFleetReportResponse)
-> ReadS [GetDeviceFleetReportResponse]
-> ReadPrec GetDeviceFleetReportResponse
-> ReadPrec [GetDeviceFleetReportResponse]
-> Read GetDeviceFleetReportResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDeviceFleetReportResponse]
$creadListPrec :: ReadPrec [GetDeviceFleetReportResponse]
readPrec :: ReadPrec GetDeviceFleetReportResponse
$creadPrec :: ReadPrec GetDeviceFleetReportResponse
readList :: ReadS [GetDeviceFleetReportResponse]
$creadList :: ReadS [GetDeviceFleetReportResponse]
readsPrec :: Int -> ReadS GetDeviceFleetReportResponse
$creadsPrec :: Int -> ReadS GetDeviceFleetReportResponse
Prelude.Read, Int -> GetDeviceFleetReportResponse -> ShowS
[GetDeviceFleetReportResponse] -> ShowS
GetDeviceFleetReportResponse -> String
(Int -> GetDeviceFleetReportResponse -> ShowS)
-> (GetDeviceFleetReportResponse -> String)
-> ([GetDeviceFleetReportResponse] -> ShowS)
-> Show GetDeviceFleetReportResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDeviceFleetReportResponse] -> ShowS
$cshowList :: [GetDeviceFleetReportResponse] -> ShowS
show :: GetDeviceFleetReportResponse -> String
$cshow :: GetDeviceFleetReportResponse -> String
showsPrec :: Int -> GetDeviceFleetReportResponse -> ShowS
$cshowsPrec :: Int -> GetDeviceFleetReportResponse -> ShowS
Prelude.Show, (forall x.
 GetDeviceFleetReportResponse -> Rep GetDeviceFleetReportResponse x)
-> (forall x.
    Rep GetDeviceFleetReportResponse x -> GetDeviceFleetReportResponse)
-> Generic GetDeviceFleetReportResponse
forall x.
Rep GetDeviceFleetReportResponse x -> GetDeviceFleetReportResponse
forall x.
GetDeviceFleetReportResponse -> Rep GetDeviceFleetReportResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetDeviceFleetReportResponse x -> GetDeviceFleetReportResponse
$cfrom :: forall x.
GetDeviceFleetReportResponse -> Rep GetDeviceFleetReportResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetDeviceFleetReportResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'agentVersions', 'getDeviceFleetReportResponse_agentVersions' - The versions of Edge Manager agent deployed on the fleet.
--
-- 'reportGenerated', 'getDeviceFleetReportResponse_reportGenerated' - Timestamp of when the report was generated.
--
-- 'deviceStats', 'getDeviceFleetReportResponse_deviceStats' - Status of devices.
--
-- 'outputConfig', 'getDeviceFleetReportResponse_outputConfig' - The output configuration for storing sample data collected by the fleet.
--
-- 'description', 'getDeviceFleetReportResponse_description' - Description of the fleet.
--
-- 'modelStats', 'getDeviceFleetReportResponse_modelStats' - Status of model on device.
--
-- 'httpStatus', 'getDeviceFleetReportResponse_httpStatus' - The response's http status code.
--
-- 'deviceFleetArn', 'getDeviceFleetReportResponse_deviceFleetArn' - The Amazon Resource Name (ARN) of the device.
--
-- 'deviceFleetName', 'getDeviceFleetReportResponse_deviceFleetName' - The name of the fleet.
newGetDeviceFleetReportResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'deviceFleetArn'
  Prelude.Text ->
  -- | 'deviceFleetName'
  Prelude.Text ->
  GetDeviceFleetReportResponse
newGetDeviceFleetReportResponse :: Int -> Text -> Text -> GetDeviceFleetReportResponse
newGetDeviceFleetReportResponse
  Int
pHttpStatus_
  Text
pDeviceFleetArn_
  Text
pDeviceFleetName_ =
    GetDeviceFleetReportResponse' :: Maybe [AgentVersion]
-> Maybe POSIX
-> Maybe DeviceStats
-> Maybe EdgeOutputConfig
-> Maybe Text
-> Maybe [EdgeModelStat]
-> Int
-> Text
-> Text
-> GetDeviceFleetReportResponse
GetDeviceFleetReportResponse'
      { $sel:agentVersions:GetDeviceFleetReportResponse' :: Maybe [AgentVersion]
agentVersions =
          Maybe [AgentVersion]
forall a. Maybe a
Prelude.Nothing,
        $sel:reportGenerated:GetDeviceFleetReportResponse' :: Maybe POSIX
reportGenerated = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:deviceStats:GetDeviceFleetReportResponse' :: Maybe DeviceStats
deviceStats = Maybe DeviceStats
forall a. Maybe a
Prelude.Nothing,
        $sel:outputConfig:GetDeviceFleetReportResponse' :: Maybe EdgeOutputConfig
outputConfig = Maybe EdgeOutputConfig
forall a. Maybe a
Prelude.Nothing,
        $sel:description:GetDeviceFleetReportResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:modelStats:GetDeviceFleetReportResponse' :: Maybe [EdgeModelStat]
modelStats = Maybe [EdgeModelStat]
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:GetDeviceFleetReportResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:deviceFleetArn:GetDeviceFleetReportResponse' :: Text
deviceFleetArn = Text
pDeviceFleetArn_,
        $sel:deviceFleetName:GetDeviceFleetReportResponse' :: Text
deviceFleetName = Text
pDeviceFleetName_
      }

-- | The versions of Edge Manager agent deployed on the fleet.
getDeviceFleetReportResponse_agentVersions :: Lens.Lens' GetDeviceFleetReportResponse (Prelude.Maybe [AgentVersion])
getDeviceFleetReportResponse_agentVersions :: (Maybe [AgentVersion] -> f (Maybe [AgentVersion]))
-> GetDeviceFleetReportResponse -> f GetDeviceFleetReportResponse
getDeviceFleetReportResponse_agentVersions = (GetDeviceFleetReportResponse -> Maybe [AgentVersion])
-> (GetDeviceFleetReportResponse
    -> Maybe [AgentVersion] -> GetDeviceFleetReportResponse)
-> Lens
     GetDeviceFleetReportResponse
     GetDeviceFleetReportResponse
     (Maybe [AgentVersion])
     (Maybe [AgentVersion])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeviceFleetReportResponse' {Maybe [AgentVersion]
agentVersions :: Maybe [AgentVersion]
$sel:agentVersions:GetDeviceFleetReportResponse' :: GetDeviceFleetReportResponse -> Maybe [AgentVersion]
agentVersions} -> Maybe [AgentVersion]
agentVersions) (\s :: GetDeviceFleetReportResponse
s@GetDeviceFleetReportResponse' {} Maybe [AgentVersion]
a -> GetDeviceFleetReportResponse
s {$sel:agentVersions:GetDeviceFleetReportResponse' :: Maybe [AgentVersion]
agentVersions = Maybe [AgentVersion]
a} :: GetDeviceFleetReportResponse) ((Maybe [AgentVersion] -> f (Maybe [AgentVersion]))
 -> GetDeviceFleetReportResponse -> f GetDeviceFleetReportResponse)
-> ((Maybe [AgentVersion] -> f (Maybe [AgentVersion]))
    -> Maybe [AgentVersion] -> f (Maybe [AgentVersion]))
-> (Maybe [AgentVersion] -> f (Maybe [AgentVersion]))
-> GetDeviceFleetReportResponse
-> f GetDeviceFleetReportResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [AgentVersion] [AgentVersion] [AgentVersion] [AgentVersion]
-> Iso
     (Maybe [AgentVersion])
     (Maybe [AgentVersion])
     (Maybe [AgentVersion])
     (Maybe [AgentVersion])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [AgentVersion] [AgentVersion] [AgentVersion] [AgentVersion]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Timestamp of when the report was generated.
getDeviceFleetReportResponse_reportGenerated :: Lens.Lens' GetDeviceFleetReportResponse (Prelude.Maybe Prelude.UTCTime)
getDeviceFleetReportResponse_reportGenerated :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetDeviceFleetReportResponse -> f GetDeviceFleetReportResponse
getDeviceFleetReportResponse_reportGenerated = (GetDeviceFleetReportResponse -> Maybe POSIX)
-> (GetDeviceFleetReportResponse
    -> Maybe POSIX -> GetDeviceFleetReportResponse)
-> Lens
     GetDeviceFleetReportResponse
     GetDeviceFleetReportResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeviceFleetReportResponse' {Maybe POSIX
reportGenerated :: Maybe POSIX
$sel:reportGenerated:GetDeviceFleetReportResponse' :: GetDeviceFleetReportResponse -> Maybe POSIX
reportGenerated} -> Maybe POSIX
reportGenerated) (\s :: GetDeviceFleetReportResponse
s@GetDeviceFleetReportResponse' {} Maybe POSIX
a -> GetDeviceFleetReportResponse
s {$sel:reportGenerated:GetDeviceFleetReportResponse' :: Maybe POSIX
reportGenerated = Maybe POSIX
a} :: GetDeviceFleetReportResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetDeviceFleetReportResponse -> f GetDeviceFleetReportResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetDeviceFleetReportResponse
-> f GetDeviceFleetReportResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Status of devices.
getDeviceFleetReportResponse_deviceStats :: Lens.Lens' GetDeviceFleetReportResponse (Prelude.Maybe DeviceStats)
getDeviceFleetReportResponse_deviceStats :: (Maybe DeviceStats -> f (Maybe DeviceStats))
-> GetDeviceFleetReportResponse -> f GetDeviceFleetReportResponse
getDeviceFleetReportResponse_deviceStats = (GetDeviceFleetReportResponse -> Maybe DeviceStats)
-> (GetDeviceFleetReportResponse
    -> Maybe DeviceStats -> GetDeviceFleetReportResponse)
-> Lens
     GetDeviceFleetReportResponse
     GetDeviceFleetReportResponse
     (Maybe DeviceStats)
     (Maybe DeviceStats)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeviceFleetReportResponse' {Maybe DeviceStats
deviceStats :: Maybe DeviceStats
$sel:deviceStats:GetDeviceFleetReportResponse' :: GetDeviceFleetReportResponse -> Maybe DeviceStats
deviceStats} -> Maybe DeviceStats
deviceStats) (\s :: GetDeviceFleetReportResponse
s@GetDeviceFleetReportResponse' {} Maybe DeviceStats
a -> GetDeviceFleetReportResponse
s {$sel:deviceStats:GetDeviceFleetReportResponse' :: Maybe DeviceStats
deviceStats = Maybe DeviceStats
a} :: GetDeviceFleetReportResponse)

-- | The output configuration for storing sample data collected by the fleet.
getDeviceFleetReportResponse_outputConfig :: Lens.Lens' GetDeviceFleetReportResponse (Prelude.Maybe EdgeOutputConfig)
getDeviceFleetReportResponse_outputConfig :: (Maybe EdgeOutputConfig -> f (Maybe EdgeOutputConfig))
-> GetDeviceFleetReportResponse -> f GetDeviceFleetReportResponse
getDeviceFleetReportResponse_outputConfig = (GetDeviceFleetReportResponse -> Maybe EdgeOutputConfig)
-> (GetDeviceFleetReportResponse
    -> Maybe EdgeOutputConfig -> GetDeviceFleetReportResponse)
-> Lens
     GetDeviceFleetReportResponse
     GetDeviceFleetReportResponse
     (Maybe EdgeOutputConfig)
     (Maybe EdgeOutputConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeviceFleetReportResponse' {Maybe EdgeOutputConfig
outputConfig :: Maybe EdgeOutputConfig
$sel:outputConfig:GetDeviceFleetReportResponse' :: GetDeviceFleetReportResponse -> Maybe EdgeOutputConfig
outputConfig} -> Maybe EdgeOutputConfig
outputConfig) (\s :: GetDeviceFleetReportResponse
s@GetDeviceFleetReportResponse' {} Maybe EdgeOutputConfig
a -> GetDeviceFleetReportResponse
s {$sel:outputConfig:GetDeviceFleetReportResponse' :: Maybe EdgeOutputConfig
outputConfig = Maybe EdgeOutputConfig
a} :: GetDeviceFleetReportResponse)

-- | Description of the fleet.
getDeviceFleetReportResponse_description :: Lens.Lens' GetDeviceFleetReportResponse (Prelude.Maybe Prelude.Text)
getDeviceFleetReportResponse_description :: (Maybe Text -> f (Maybe Text))
-> GetDeviceFleetReportResponse -> f GetDeviceFleetReportResponse
getDeviceFleetReportResponse_description = (GetDeviceFleetReportResponse -> Maybe Text)
-> (GetDeviceFleetReportResponse
    -> Maybe Text -> GetDeviceFleetReportResponse)
-> Lens
     GetDeviceFleetReportResponse
     GetDeviceFleetReportResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeviceFleetReportResponse' {Maybe Text
description :: Maybe Text
$sel:description:GetDeviceFleetReportResponse' :: GetDeviceFleetReportResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: GetDeviceFleetReportResponse
s@GetDeviceFleetReportResponse' {} Maybe Text
a -> GetDeviceFleetReportResponse
s {$sel:description:GetDeviceFleetReportResponse' :: Maybe Text
description = Maybe Text
a} :: GetDeviceFleetReportResponse)

-- | Status of model on device.
getDeviceFleetReportResponse_modelStats :: Lens.Lens' GetDeviceFleetReportResponse (Prelude.Maybe [EdgeModelStat])
getDeviceFleetReportResponse_modelStats :: (Maybe [EdgeModelStat] -> f (Maybe [EdgeModelStat]))
-> GetDeviceFleetReportResponse -> f GetDeviceFleetReportResponse
getDeviceFleetReportResponse_modelStats = (GetDeviceFleetReportResponse -> Maybe [EdgeModelStat])
-> (GetDeviceFleetReportResponse
    -> Maybe [EdgeModelStat] -> GetDeviceFleetReportResponse)
-> Lens
     GetDeviceFleetReportResponse
     GetDeviceFleetReportResponse
     (Maybe [EdgeModelStat])
     (Maybe [EdgeModelStat])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeviceFleetReportResponse' {Maybe [EdgeModelStat]
modelStats :: Maybe [EdgeModelStat]
$sel:modelStats:GetDeviceFleetReportResponse' :: GetDeviceFleetReportResponse -> Maybe [EdgeModelStat]
modelStats} -> Maybe [EdgeModelStat]
modelStats) (\s :: GetDeviceFleetReportResponse
s@GetDeviceFleetReportResponse' {} Maybe [EdgeModelStat]
a -> GetDeviceFleetReportResponse
s {$sel:modelStats:GetDeviceFleetReportResponse' :: Maybe [EdgeModelStat]
modelStats = Maybe [EdgeModelStat]
a} :: GetDeviceFleetReportResponse) ((Maybe [EdgeModelStat] -> f (Maybe [EdgeModelStat]))
 -> GetDeviceFleetReportResponse -> f GetDeviceFleetReportResponse)
-> ((Maybe [EdgeModelStat] -> f (Maybe [EdgeModelStat]))
    -> Maybe [EdgeModelStat] -> f (Maybe [EdgeModelStat]))
-> (Maybe [EdgeModelStat] -> f (Maybe [EdgeModelStat]))
-> GetDeviceFleetReportResponse
-> f GetDeviceFleetReportResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [EdgeModelStat] [EdgeModelStat] [EdgeModelStat] [EdgeModelStat]
-> Iso
     (Maybe [EdgeModelStat])
     (Maybe [EdgeModelStat])
     (Maybe [EdgeModelStat])
     (Maybe [EdgeModelStat])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [EdgeModelStat] [EdgeModelStat] [EdgeModelStat] [EdgeModelStat]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
getDeviceFleetReportResponse_httpStatus :: Lens.Lens' GetDeviceFleetReportResponse Prelude.Int
getDeviceFleetReportResponse_httpStatus :: (Int -> f Int)
-> GetDeviceFleetReportResponse -> f GetDeviceFleetReportResponse
getDeviceFleetReportResponse_httpStatus = (GetDeviceFleetReportResponse -> Int)
-> (GetDeviceFleetReportResponse
    -> Int -> GetDeviceFleetReportResponse)
-> Lens
     GetDeviceFleetReportResponse GetDeviceFleetReportResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeviceFleetReportResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetDeviceFleetReportResponse' :: GetDeviceFleetReportResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetDeviceFleetReportResponse
s@GetDeviceFleetReportResponse' {} Int
a -> GetDeviceFleetReportResponse
s {$sel:httpStatus:GetDeviceFleetReportResponse' :: Int
httpStatus = Int
a} :: GetDeviceFleetReportResponse)

-- | The Amazon Resource Name (ARN) of the device.
getDeviceFleetReportResponse_deviceFleetArn :: Lens.Lens' GetDeviceFleetReportResponse Prelude.Text
getDeviceFleetReportResponse_deviceFleetArn :: (Text -> f Text)
-> GetDeviceFleetReportResponse -> f GetDeviceFleetReportResponse
getDeviceFleetReportResponse_deviceFleetArn = (GetDeviceFleetReportResponse -> Text)
-> (GetDeviceFleetReportResponse
    -> Text -> GetDeviceFleetReportResponse)
-> Lens
     GetDeviceFleetReportResponse GetDeviceFleetReportResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeviceFleetReportResponse' {Text
deviceFleetArn :: Text
$sel:deviceFleetArn:GetDeviceFleetReportResponse' :: GetDeviceFleetReportResponse -> Text
deviceFleetArn} -> Text
deviceFleetArn) (\s :: GetDeviceFleetReportResponse
s@GetDeviceFleetReportResponse' {} Text
a -> GetDeviceFleetReportResponse
s {$sel:deviceFleetArn:GetDeviceFleetReportResponse' :: Text
deviceFleetArn = Text
a} :: GetDeviceFleetReportResponse)

-- | The name of the fleet.
getDeviceFleetReportResponse_deviceFleetName :: Lens.Lens' GetDeviceFleetReportResponse Prelude.Text
getDeviceFleetReportResponse_deviceFleetName :: (Text -> f Text)
-> GetDeviceFleetReportResponse -> f GetDeviceFleetReportResponse
getDeviceFleetReportResponse_deviceFleetName = (GetDeviceFleetReportResponse -> Text)
-> (GetDeviceFleetReportResponse
    -> Text -> GetDeviceFleetReportResponse)
-> Lens
     GetDeviceFleetReportResponse GetDeviceFleetReportResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeviceFleetReportResponse' {Text
deviceFleetName :: Text
$sel:deviceFleetName:GetDeviceFleetReportResponse' :: GetDeviceFleetReportResponse -> Text
deviceFleetName} -> Text
deviceFleetName) (\s :: GetDeviceFleetReportResponse
s@GetDeviceFleetReportResponse' {} Text
a -> GetDeviceFleetReportResponse
s {$sel:deviceFleetName:GetDeviceFleetReportResponse' :: Text
deviceFleetName = Text
a} :: GetDeviceFleetReportResponse)

instance Prelude.NFData GetDeviceFleetReportResponse