{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# 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.Types.EdgeModelSummary
-- 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)
module Amazonka.SageMaker.Types.EdgeModelSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

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

-- |
-- Create a value of 'EdgeModelSummary' 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:
--
-- 'modelName', 'edgeModelSummary_modelName' - The name of the model.
--
-- 'modelVersion', 'edgeModelSummary_modelVersion' - The version model.
newEdgeModelSummary ::
  -- | 'modelName'
  Prelude.Text ->
  -- | 'modelVersion'
  Prelude.Text ->
  EdgeModelSummary
newEdgeModelSummary :: Text -> Text -> EdgeModelSummary
newEdgeModelSummary Text
pModelName_ Text
pModelVersion_ =
  EdgeModelSummary' :: Text -> Text -> EdgeModelSummary
EdgeModelSummary'
    { $sel:modelName:EdgeModelSummary' :: Text
modelName = Text
pModelName_,
      $sel:modelVersion:EdgeModelSummary' :: Text
modelVersion = Text
pModelVersion_
    }

-- | The name of the model.
edgeModelSummary_modelName :: Lens.Lens' EdgeModelSummary Prelude.Text
edgeModelSummary_modelName :: (Text -> f Text) -> EdgeModelSummary -> f EdgeModelSummary
edgeModelSummary_modelName = (EdgeModelSummary -> Text)
-> (EdgeModelSummary -> Text -> EdgeModelSummary)
-> Lens EdgeModelSummary EdgeModelSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EdgeModelSummary' {Text
modelName :: Text
$sel:modelName:EdgeModelSummary' :: EdgeModelSummary -> Text
modelName} -> Text
modelName) (\s :: EdgeModelSummary
s@EdgeModelSummary' {} Text
a -> EdgeModelSummary
s {$sel:modelName:EdgeModelSummary' :: Text
modelName = Text
a} :: EdgeModelSummary)

-- | The version model.
edgeModelSummary_modelVersion :: Lens.Lens' EdgeModelSummary Prelude.Text
edgeModelSummary_modelVersion :: (Text -> f Text) -> EdgeModelSummary -> f EdgeModelSummary
edgeModelSummary_modelVersion = (EdgeModelSummary -> Text)
-> (EdgeModelSummary -> Text -> EdgeModelSummary)
-> Lens EdgeModelSummary EdgeModelSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EdgeModelSummary' {Text
modelVersion :: Text
$sel:modelVersion:EdgeModelSummary' :: EdgeModelSummary -> Text
modelVersion} -> Text
modelVersion) (\s :: EdgeModelSummary
s@EdgeModelSummary' {} Text
a -> EdgeModelSummary
s {$sel:modelVersion:EdgeModelSummary' :: Text
modelVersion = Text
a} :: EdgeModelSummary)

instance Core.FromJSON EdgeModelSummary where
  parseJSON :: Value -> Parser EdgeModelSummary
parseJSON =
    String
-> (Object -> Parser EdgeModelSummary)
-> Value
-> Parser EdgeModelSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"EdgeModelSummary"
      ( \Object
x ->
          Text -> Text -> EdgeModelSummary
EdgeModelSummary'
            (Text -> Text -> EdgeModelSummary)
-> Parser Text -> Parser (Text -> EdgeModelSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ModelName")
            Parser (Text -> EdgeModelSummary)
-> Parser Text -> Parser EdgeModelSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ModelVersion")
      )

instance Prelude.Hashable EdgeModelSummary

instance Prelude.NFData EdgeModelSummary