{-# 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.ImageBuilder.Types.ComponentSummary
-- 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.ImageBuilder.Types.ComponentSummary where

import qualified Amazonka.Core as Core
import Amazonka.ImageBuilder.Types.ComponentState
import Amazonka.ImageBuilder.Types.ComponentType
import Amazonka.ImageBuilder.Types.Platform
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | A high-level summary of a component.
--
-- /See:/ 'newComponentSummary' smart constructor.
data ComponentSummary = ComponentSummary'
  { -- | Describes the current status of the component.
    ComponentSummary -> Maybe ComponentState
state :: Prelude.Maybe ComponentState,
    -- | The platform of the component.
    ComponentSummary -> Maybe Platform
platform :: Prelude.Maybe Platform,
    -- | The Amazon Resource Name (ARN) of the component.
    ComponentSummary -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The operating system (OS) version supported by the component. If the OS
    -- information is available, a prefix match is performed against the base
    -- image OS version during image recipe creation.
    ComponentSummary -> Maybe (NonEmpty Text)
supportedOsVersions :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | The owner of the component.
    ComponentSummary -> Maybe Text
owner :: Prelude.Maybe Prelude.Text,
    -- | The date that the component was created.
    ComponentSummary -> Maybe Text
dateCreated :: Prelude.Maybe Prelude.Text,
    -- | The name of the component.
    ComponentSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The version of the component.
    ComponentSummary -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | The change description of the component.
    ComponentSummary -> Maybe Text
changeDescription :: Prelude.Maybe Prelude.Text,
    -- | The type of the component denotes whether the component is used to build
    -- the image or only to test it.
    ComponentSummary -> Maybe ComponentType
type' :: Prelude.Maybe ComponentType,
    -- | The description of the component.
    ComponentSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The tags associated with the component.
    ComponentSummary -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
  }
  deriving (ComponentSummary -> ComponentSummary -> Bool
(ComponentSummary -> ComponentSummary -> Bool)
-> (ComponentSummary -> ComponentSummary -> Bool)
-> Eq ComponentSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ComponentSummary -> ComponentSummary -> Bool
$c/= :: ComponentSummary -> ComponentSummary -> Bool
== :: ComponentSummary -> ComponentSummary -> Bool
$c== :: ComponentSummary -> ComponentSummary -> Bool
Prelude.Eq, ReadPrec [ComponentSummary]
ReadPrec ComponentSummary
Int -> ReadS ComponentSummary
ReadS [ComponentSummary]
(Int -> ReadS ComponentSummary)
-> ReadS [ComponentSummary]
-> ReadPrec ComponentSummary
-> ReadPrec [ComponentSummary]
-> Read ComponentSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ComponentSummary]
$creadListPrec :: ReadPrec [ComponentSummary]
readPrec :: ReadPrec ComponentSummary
$creadPrec :: ReadPrec ComponentSummary
readList :: ReadS [ComponentSummary]
$creadList :: ReadS [ComponentSummary]
readsPrec :: Int -> ReadS ComponentSummary
$creadsPrec :: Int -> ReadS ComponentSummary
Prelude.Read, Int -> ComponentSummary -> ShowS
[ComponentSummary] -> ShowS
ComponentSummary -> String
(Int -> ComponentSummary -> ShowS)
-> (ComponentSummary -> String)
-> ([ComponentSummary] -> ShowS)
-> Show ComponentSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ComponentSummary] -> ShowS
$cshowList :: [ComponentSummary] -> ShowS
show :: ComponentSummary -> String
$cshow :: ComponentSummary -> String
showsPrec :: Int -> ComponentSummary -> ShowS
$cshowsPrec :: Int -> ComponentSummary -> ShowS
Prelude.Show, (forall x. ComponentSummary -> Rep ComponentSummary x)
-> (forall x. Rep ComponentSummary x -> ComponentSummary)
-> Generic ComponentSummary
forall x. Rep ComponentSummary x -> ComponentSummary
forall x. ComponentSummary -> Rep ComponentSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ComponentSummary x -> ComponentSummary
$cfrom :: forall x. ComponentSummary -> Rep ComponentSummary x
Prelude.Generic)

-- |
-- Create a value of 'ComponentSummary' 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:
--
-- 'state', 'componentSummary_state' - Describes the current status of the component.
--
-- 'platform', 'componentSummary_platform' - The platform of the component.
--
-- 'arn', 'componentSummary_arn' - The Amazon Resource Name (ARN) of the component.
--
-- 'supportedOsVersions', 'componentSummary_supportedOsVersions' - The operating system (OS) version supported by the component. If the OS
-- information is available, a prefix match is performed against the base
-- image OS version during image recipe creation.
--
-- 'owner', 'componentSummary_owner' - The owner of the component.
--
-- 'dateCreated', 'componentSummary_dateCreated' - The date that the component was created.
--
-- 'name', 'componentSummary_name' - The name of the component.
--
-- 'version', 'componentSummary_version' - The version of the component.
--
-- 'changeDescription', 'componentSummary_changeDescription' - The change description of the component.
--
-- 'type'', 'componentSummary_type' - The type of the component denotes whether the component is used to build
-- the image or only to test it.
--
-- 'description', 'componentSummary_description' - The description of the component.
--
-- 'tags', 'componentSummary_tags' - The tags associated with the component.
newComponentSummary ::
  ComponentSummary
newComponentSummary :: ComponentSummary
newComponentSummary =
  ComponentSummary' :: Maybe ComponentState
-> Maybe Platform
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ComponentType
-> Maybe Text
-> Maybe (HashMap Text Text)
-> ComponentSummary
ComponentSummary'
    { $sel:state:ComponentSummary' :: Maybe ComponentState
state = Maybe ComponentState
forall a. Maybe a
Prelude.Nothing,
      $sel:platform:ComponentSummary' :: Maybe Platform
platform = Maybe Platform
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:ComponentSummary' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:supportedOsVersions:ComponentSummary' :: Maybe (NonEmpty Text)
supportedOsVersions = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:owner:ComponentSummary' :: Maybe Text
owner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dateCreated:ComponentSummary' :: Maybe Text
dateCreated = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:ComponentSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:ComponentSummary' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:changeDescription:ComponentSummary' :: Maybe Text
changeDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:type':ComponentSummary' :: Maybe ComponentType
type' = Maybe ComponentType
forall a. Maybe a
Prelude.Nothing,
      $sel:description:ComponentSummary' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:ComponentSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
    }

-- | Describes the current status of the component.
componentSummary_state :: Lens.Lens' ComponentSummary (Prelude.Maybe ComponentState)
componentSummary_state :: (Maybe ComponentState -> f (Maybe ComponentState))
-> ComponentSummary -> f ComponentSummary
componentSummary_state = (ComponentSummary -> Maybe ComponentState)
-> (ComponentSummary -> Maybe ComponentState -> ComponentSummary)
-> Lens
     ComponentSummary
     ComponentSummary
     (Maybe ComponentState)
     (Maybe ComponentState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentSummary' {Maybe ComponentState
state :: Maybe ComponentState
$sel:state:ComponentSummary' :: ComponentSummary -> Maybe ComponentState
state} -> Maybe ComponentState
state) (\s :: ComponentSummary
s@ComponentSummary' {} Maybe ComponentState
a -> ComponentSummary
s {$sel:state:ComponentSummary' :: Maybe ComponentState
state = Maybe ComponentState
a} :: ComponentSummary)

-- | The platform of the component.
componentSummary_platform :: Lens.Lens' ComponentSummary (Prelude.Maybe Platform)
componentSummary_platform :: (Maybe Platform -> f (Maybe Platform))
-> ComponentSummary -> f ComponentSummary
componentSummary_platform = (ComponentSummary -> Maybe Platform)
-> (ComponentSummary -> Maybe Platform -> ComponentSummary)
-> Lens
     ComponentSummary ComponentSummary (Maybe Platform) (Maybe Platform)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentSummary' {Maybe Platform
platform :: Maybe Platform
$sel:platform:ComponentSummary' :: ComponentSummary -> Maybe Platform
platform} -> Maybe Platform
platform) (\s :: ComponentSummary
s@ComponentSummary' {} Maybe Platform
a -> ComponentSummary
s {$sel:platform:ComponentSummary' :: Maybe Platform
platform = Maybe Platform
a} :: ComponentSummary)

-- | The Amazon Resource Name (ARN) of the component.
componentSummary_arn :: Lens.Lens' ComponentSummary (Prelude.Maybe Prelude.Text)
componentSummary_arn :: (Maybe Text -> f (Maybe Text))
-> ComponentSummary -> f ComponentSummary
componentSummary_arn = (ComponentSummary -> Maybe Text)
-> (ComponentSummary -> Maybe Text -> ComponentSummary)
-> Lens ComponentSummary ComponentSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentSummary' {Maybe Text
arn :: Maybe Text
$sel:arn:ComponentSummary' :: ComponentSummary -> Maybe Text
arn} -> Maybe Text
arn) (\s :: ComponentSummary
s@ComponentSummary' {} Maybe Text
a -> ComponentSummary
s {$sel:arn:ComponentSummary' :: Maybe Text
arn = Maybe Text
a} :: ComponentSummary)

-- | The operating system (OS) version supported by the component. If the OS
-- information is available, a prefix match is performed against the base
-- image OS version during image recipe creation.
componentSummary_supportedOsVersions :: Lens.Lens' ComponentSummary (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
componentSummary_supportedOsVersions :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> ComponentSummary -> f ComponentSummary
componentSummary_supportedOsVersions = (ComponentSummary -> Maybe (NonEmpty Text))
-> (ComponentSummary -> Maybe (NonEmpty Text) -> ComponentSummary)
-> Lens
     ComponentSummary
     ComponentSummary
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentSummary' {Maybe (NonEmpty Text)
supportedOsVersions :: Maybe (NonEmpty Text)
$sel:supportedOsVersions:ComponentSummary' :: ComponentSummary -> Maybe (NonEmpty Text)
supportedOsVersions} -> Maybe (NonEmpty Text)
supportedOsVersions) (\s :: ComponentSummary
s@ComponentSummary' {} Maybe (NonEmpty Text)
a -> ComponentSummary
s {$sel:supportedOsVersions:ComponentSummary' :: Maybe (NonEmpty Text)
supportedOsVersions = Maybe (NonEmpty Text)
a} :: ComponentSummary) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> ComponentSummary -> f ComponentSummary)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> ComponentSummary
-> f ComponentSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
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
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The owner of the component.
componentSummary_owner :: Lens.Lens' ComponentSummary (Prelude.Maybe Prelude.Text)
componentSummary_owner :: (Maybe Text -> f (Maybe Text))
-> ComponentSummary -> f ComponentSummary
componentSummary_owner = (ComponentSummary -> Maybe Text)
-> (ComponentSummary -> Maybe Text -> ComponentSummary)
-> Lens ComponentSummary ComponentSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentSummary' {Maybe Text
owner :: Maybe Text
$sel:owner:ComponentSummary' :: ComponentSummary -> Maybe Text
owner} -> Maybe Text
owner) (\s :: ComponentSummary
s@ComponentSummary' {} Maybe Text
a -> ComponentSummary
s {$sel:owner:ComponentSummary' :: Maybe Text
owner = Maybe Text
a} :: ComponentSummary)

-- | The date that the component was created.
componentSummary_dateCreated :: Lens.Lens' ComponentSummary (Prelude.Maybe Prelude.Text)
componentSummary_dateCreated :: (Maybe Text -> f (Maybe Text))
-> ComponentSummary -> f ComponentSummary
componentSummary_dateCreated = (ComponentSummary -> Maybe Text)
-> (ComponentSummary -> Maybe Text -> ComponentSummary)
-> Lens ComponentSummary ComponentSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentSummary' {Maybe Text
dateCreated :: Maybe Text
$sel:dateCreated:ComponentSummary' :: ComponentSummary -> Maybe Text
dateCreated} -> Maybe Text
dateCreated) (\s :: ComponentSummary
s@ComponentSummary' {} Maybe Text
a -> ComponentSummary
s {$sel:dateCreated:ComponentSummary' :: Maybe Text
dateCreated = Maybe Text
a} :: ComponentSummary)

-- | The name of the component.
componentSummary_name :: Lens.Lens' ComponentSummary (Prelude.Maybe Prelude.Text)
componentSummary_name :: (Maybe Text -> f (Maybe Text))
-> ComponentSummary -> f ComponentSummary
componentSummary_name = (ComponentSummary -> Maybe Text)
-> (ComponentSummary -> Maybe Text -> ComponentSummary)
-> Lens ComponentSummary ComponentSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentSummary' {Maybe Text
name :: Maybe Text
$sel:name:ComponentSummary' :: ComponentSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: ComponentSummary
s@ComponentSummary' {} Maybe Text
a -> ComponentSummary
s {$sel:name:ComponentSummary' :: Maybe Text
name = Maybe Text
a} :: ComponentSummary)

-- | The version of the component.
componentSummary_version :: Lens.Lens' ComponentSummary (Prelude.Maybe Prelude.Text)
componentSummary_version :: (Maybe Text -> f (Maybe Text))
-> ComponentSummary -> f ComponentSummary
componentSummary_version = (ComponentSummary -> Maybe Text)
-> (ComponentSummary -> Maybe Text -> ComponentSummary)
-> Lens ComponentSummary ComponentSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentSummary' {Maybe Text
version :: Maybe Text
$sel:version:ComponentSummary' :: ComponentSummary -> Maybe Text
version} -> Maybe Text
version) (\s :: ComponentSummary
s@ComponentSummary' {} Maybe Text
a -> ComponentSummary
s {$sel:version:ComponentSummary' :: Maybe Text
version = Maybe Text
a} :: ComponentSummary)

-- | The change description of the component.
componentSummary_changeDescription :: Lens.Lens' ComponentSummary (Prelude.Maybe Prelude.Text)
componentSummary_changeDescription :: (Maybe Text -> f (Maybe Text))
-> ComponentSummary -> f ComponentSummary
componentSummary_changeDescription = (ComponentSummary -> Maybe Text)
-> (ComponentSummary -> Maybe Text -> ComponentSummary)
-> Lens ComponentSummary ComponentSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentSummary' {Maybe Text
changeDescription :: Maybe Text
$sel:changeDescription:ComponentSummary' :: ComponentSummary -> Maybe Text
changeDescription} -> Maybe Text
changeDescription) (\s :: ComponentSummary
s@ComponentSummary' {} Maybe Text
a -> ComponentSummary
s {$sel:changeDescription:ComponentSummary' :: Maybe Text
changeDescription = Maybe Text
a} :: ComponentSummary)

-- | The type of the component denotes whether the component is used to build
-- the image or only to test it.
componentSummary_type :: Lens.Lens' ComponentSummary (Prelude.Maybe ComponentType)
componentSummary_type :: (Maybe ComponentType -> f (Maybe ComponentType))
-> ComponentSummary -> f ComponentSummary
componentSummary_type = (ComponentSummary -> Maybe ComponentType)
-> (ComponentSummary -> Maybe ComponentType -> ComponentSummary)
-> Lens
     ComponentSummary
     ComponentSummary
     (Maybe ComponentType)
     (Maybe ComponentType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentSummary' {Maybe ComponentType
type' :: Maybe ComponentType
$sel:type':ComponentSummary' :: ComponentSummary -> Maybe ComponentType
type'} -> Maybe ComponentType
type') (\s :: ComponentSummary
s@ComponentSummary' {} Maybe ComponentType
a -> ComponentSummary
s {$sel:type':ComponentSummary' :: Maybe ComponentType
type' = Maybe ComponentType
a} :: ComponentSummary)

-- | The description of the component.
componentSummary_description :: Lens.Lens' ComponentSummary (Prelude.Maybe Prelude.Text)
componentSummary_description :: (Maybe Text -> f (Maybe Text))
-> ComponentSummary -> f ComponentSummary
componentSummary_description = (ComponentSummary -> Maybe Text)
-> (ComponentSummary -> Maybe Text -> ComponentSummary)
-> Lens ComponentSummary ComponentSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentSummary' {Maybe Text
description :: Maybe Text
$sel:description:ComponentSummary' :: ComponentSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: ComponentSummary
s@ComponentSummary' {} Maybe Text
a -> ComponentSummary
s {$sel:description:ComponentSummary' :: Maybe Text
description = Maybe Text
a} :: ComponentSummary)

-- | The tags associated with the component.
componentSummary_tags :: Lens.Lens' ComponentSummary (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
componentSummary_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ComponentSummary -> f ComponentSummary
componentSummary_tags = (ComponentSummary -> Maybe (HashMap Text Text))
-> (ComponentSummary
    -> Maybe (HashMap Text Text) -> ComponentSummary)
-> Lens
     ComponentSummary
     ComponentSummary
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentSummary' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:ComponentSummary' :: ComponentSummary -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: ComponentSummary
s@ComponentSummary' {} Maybe (HashMap Text Text)
a -> ComponentSummary
s {$sel:tags:ComponentSummary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: ComponentSummary) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> ComponentSummary -> f ComponentSummary)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ComponentSummary
-> f ComponentSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON ComponentSummary where
  parseJSON :: Value -> Parser ComponentSummary
parseJSON =
    String
-> (Object -> Parser ComponentSummary)
-> Value
-> Parser ComponentSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ComponentSummary"
      ( \Object
x ->
          Maybe ComponentState
-> Maybe Platform
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ComponentType
-> Maybe Text
-> Maybe (HashMap Text Text)
-> ComponentSummary
ComponentSummary'
            (Maybe ComponentState
 -> Maybe Platform
 -> Maybe Text
 -> Maybe (NonEmpty Text)
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe ComponentType
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> ComponentSummary)
-> Parser (Maybe ComponentState)
-> Parser
     (Maybe Platform
      -> Maybe Text
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ComponentType
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ComponentSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ComponentState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"state")
            Parser
  (Maybe Platform
   -> Maybe Text
   -> Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ComponentType
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ComponentSummary)
-> Parser (Maybe Platform)
-> Parser
     (Maybe Text
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ComponentType
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ComponentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Platform)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"platform")
            Parser
  (Maybe Text
   -> Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ComponentType
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ComponentSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ComponentType
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ComponentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"arn")
            Parser
  (Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ComponentType
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ComponentSummary)
-> Parser (Maybe (NonEmpty Text))
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ComponentType
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ComponentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"supportedOsVersions")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ComponentType
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ComponentSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ComponentType
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ComponentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"owner")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ComponentType
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ComponentSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe ComponentType
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ComponentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"dateCreated")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe ComponentType
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ComponentSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe ComponentType
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ComponentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"name")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe ComponentType
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ComponentSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe ComponentType
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> ComponentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"version")
            Parser
  (Maybe Text
   -> Maybe ComponentType
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> ComponentSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe ComponentType
      -> Maybe Text -> Maybe (HashMap Text Text) -> ComponentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"changeDescription")
            Parser
  (Maybe ComponentType
   -> Maybe Text -> Maybe (HashMap Text Text) -> ComponentSummary)
-> Parser (Maybe ComponentType)
-> Parser
     (Maybe Text -> Maybe (HashMap Text Text) -> ComponentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ComponentType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"type")
            Parser
  (Maybe Text -> Maybe (HashMap Text Text) -> ComponentSummary)
-> Parser (Maybe Text)
-> Parser (Maybe (HashMap Text Text) -> ComponentSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"description")
            Parser (Maybe (HashMap Text Text) -> ComponentSummary)
-> Parser (Maybe (HashMap Text Text)) -> Parser ComponentSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable ComponentSummary

instance Prelude.NFData ComponentSummary