{-# 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.Component
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.ImageBuilder.Types.Component where

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

-- | A detailed view of a component.
--
-- /See:/ 'newComponent' smart constructor.
data Component = Component'
  { -- | The Amazon Resource Name (ARN) of the component.
    Component -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The change description of the component.
    Component -> Maybe Text
changeDescription :: Prelude.Maybe Prelude.Text,
    -- | Component data contains the YAML document content for the component.
    Component -> Maybe Text
data' :: Prelude.Maybe Prelude.Text,
    -- | The date that the component was created.
    Component -> Maybe Text
dateCreated :: Prelude.Maybe Prelude.Text,
    -- | The description of the component.
    Component -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The encryption status of the component.
    Component -> Maybe Bool
encrypted :: Prelude.Maybe Prelude.Bool,
    -- | The KMS key identifier used to encrypt the component.
    Component -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | The name of the component.
    Component -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The owner of the component.
    Component -> Maybe Text
owner :: Prelude.Maybe Prelude.Text,
    -- | Contains parameter details for each of the parameters that are defined
    -- for the component.
    Component -> Maybe [ComponentParameterDetail]
parameters :: Prelude.Maybe [ComponentParameterDetail],
    -- | The platform of the component.
    Component -> Maybe Platform
platform :: Prelude.Maybe Platform,
    -- | Describes the current status of the component. This is used for
    -- components that are no longer active.
    Component -> Maybe ComponentState
state :: Prelude.Maybe ComponentState,
    -- | 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.
    Component -> Maybe (NonEmpty Text)
supportedOsVersions :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | The tags associated with the component.
    Component -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The type of the component denotes whether the component is used to build
    -- the image or only to test it.
    Component -> Maybe ComponentType
type' :: Prelude.Maybe ComponentType,
    -- | The version of the component.
    Component -> Maybe Text
version :: Prelude.Maybe Prelude.Text
  }
  deriving (Component -> Component -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Component -> Component -> Bool
$c/= :: Component -> Component -> Bool
== :: Component -> Component -> Bool
$c== :: Component -> Component -> Bool
Prelude.Eq, ReadPrec [Component]
ReadPrec Component
Int -> ReadS Component
ReadS [Component]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Component]
$creadListPrec :: ReadPrec [Component]
readPrec :: ReadPrec Component
$creadPrec :: ReadPrec Component
readList :: ReadS [Component]
$creadList :: ReadS [Component]
readsPrec :: Int -> ReadS Component
$creadsPrec :: Int -> ReadS Component
Prelude.Read, Int -> Component -> ShowS
[Component] -> ShowS
Component -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Component] -> ShowS
$cshowList :: [Component] -> ShowS
show :: Component -> String
$cshow :: Component -> String
showsPrec :: Int -> Component -> ShowS
$cshowsPrec :: Int -> Component -> ShowS
Prelude.Show, forall x. Rep Component x -> Component
forall x. Component -> Rep Component x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Component x -> Component
$cfrom :: forall x. Component -> Rep Component x
Prelude.Generic)

-- |
-- Create a value of 'Component' 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:
--
-- 'arn', 'component_arn' - The Amazon Resource Name (ARN) of the component.
--
-- 'changeDescription', 'component_changeDescription' - The change description of the component.
--
-- 'data'', 'component_data' - Component data contains the YAML document content for the component.
--
-- 'dateCreated', 'component_dateCreated' - The date that the component was created.
--
-- 'description', 'component_description' - The description of the component.
--
-- 'encrypted', 'component_encrypted' - The encryption status of the component.
--
-- 'kmsKeyId', 'component_kmsKeyId' - The KMS key identifier used to encrypt the component.
--
-- 'name', 'component_name' - The name of the component.
--
-- 'owner', 'component_owner' - The owner of the component.
--
-- 'parameters', 'component_parameters' - Contains parameter details for each of the parameters that are defined
-- for the component.
--
-- 'platform', 'component_platform' - The platform of the component.
--
-- 'state', 'component_state' - Describes the current status of the component. This is used for
-- components that are no longer active.
--
-- 'supportedOsVersions', 'component_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.
--
-- 'tags', 'component_tags' - The tags associated with the component.
--
-- 'type'', 'component_type' - The type of the component denotes whether the component is used to build
-- the image or only to test it.
--
-- 'version', 'component_version' - The version of the component.
newComponent ::
  Component
newComponent :: Component
newComponent =
  Component'
    { $sel:arn:Component' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:changeDescription:Component' :: Maybe Text
changeDescription = forall a. Maybe a
Prelude.Nothing,
      $sel:data':Component' :: Maybe Text
data' = forall a. Maybe a
Prelude.Nothing,
      $sel:dateCreated:Component' :: Maybe Text
dateCreated = forall a. Maybe a
Prelude.Nothing,
      $sel:description:Component' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:encrypted:Component' :: Maybe Bool
encrypted = forall a. Maybe a
Prelude.Nothing,
      $sel:kmsKeyId:Component' :: Maybe Text
kmsKeyId = forall a. Maybe a
Prelude.Nothing,
      $sel:name:Component' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:owner:Component' :: Maybe Text
owner = forall a. Maybe a
Prelude.Nothing,
      $sel:parameters:Component' :: Maybe [ComponentParameterDetail]
parameters = forall a. Maybe a
Prelude.Nothing,
      $sel:platform:Component' :: Maybe Platform
platform = forall a. Maybe a
Prelude.Nothing,
      $sel:state:Component' :: Maybe ComponentState
state = forall a. Maybe a
Prelude.Nothing,
      $sel:supportedOsVersions:Component' :: Maybe (NonEmpty Text)
supportedOsVersions = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:Component' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:type':Component' :: Maybe ComponentType
type' = forall a. Maybe a
Prelude.Nothing,
      $sel:version:Component' :: Maybe Text
version = forall a. Maybe a
Prelude.Nothing
    }

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

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

-- | Component data contains the YAML document content for the component.
component_data :: Lens.Lens' Component (Prelude.Maybe Prelude.Text)
component_data :: Lens' Component (Maybe Text)
component_data = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Component' {Maybe Text
data' :: Maybe Text
$sel:data':Component' :: Component -> Maybe Text
data'} -> Maybe Text
data') (\s :: Component
s@Component' {} Maybe Text
a -> Component
s {$sel:data':Component' :: Maybe Text
data' = Maybe Text
a} :: Component)

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

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

-- | The encryption status of the component.
component_encrypted :: Lens.Lens' Component (Prelude.Maybe Prelude.Bool)
component_encrypted :: Lens' Component (Maybe Bool)
component_encrypted = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Component' {Maybe Bool
encrypted :: Maybe Bool
$sel:encrypted:Component' :: Component -> Maybe Bool
encrypted} -> Maybe Bool
encrypted) (\s :: Component
s@Component' {} Maybe Bool
a -> Component
s {$sel:encrypted:Component' :: Maybe Bool
encrypted = Maybe Bool
a} :: Component)

-- | The KMS key identifier used to encrypt the component.
component_kmsKeyId :: Lens.Lens' Component (Prelude.Maybe Prelude.Text)
component_kmsKeyId :: Lens' Component (Maybe Text)
component_kmsKeyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Component' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:Component' :: Component -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: Component
s@Component' {} Maybe Text
a -> Component
s {$sel:kmsKeyId:Component' :: Maybe Text
kmsKeyId = Maybe Text
a} :: Component)

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

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

-- | Contains parameter details for each of the parameters that are defined
-- for the component.
component_parameters :: Lens.Lens' Component (Prelude.Maybe [ComponentParameterDetail])
component_parameters :: Lens' Component (Maybe [ComponentParameterDetail])
component_parameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Component' {Maybe [ComponentParameterDetail]
parameters :: Maybe [ComponentParameterDetail]
$sel:parameters:Component' :: Component -> Maybe [ComponentParameterDetail]
parameters} -> Maybe [ComponentParameterDetail]
parameters) (\s :: Component
s@Component' {} Maybe [ComponentParameterDetail]
a -> Component
s {$sel:parameters:Component' :: Maybe [ComponentParameterDetail]
parameters = Maybe [ComponentParameterDetail]
a} :: Component) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | Describes the current status of the component. This is used for
-- components that are no longer active.
component_state :: Lens.Lens' Component (Prelude.Maybe ComponentState)
component_state :: Lens' Component (Maybe ComponentState)
component_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Component' {Maybe ComponentState
state :: Maybe ComponentState
$sel:state:Component' :: Component -> Maybe ComponentState
state} -> Maybe ComponentState
state) (\s :: Component
s@Component' {} Maybe ComponentState
a -> Component
s {$sel:state:Component' :: Maybe ComponentState
state = Maybe ComponentState
a} :: Component)

-- | 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.
component_supportedOsVersions :: Lens.Lens' Component (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
component_supportedOsVersions :: Lens' Component (Maybe (NonEmpty Text))
component_supportedOsVersions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Component' {Maybe (NonEmpty Text)
supportedOsVersions :: Maybe (NonEmpty Text)
$sel:supportedOsVersions:Component' :: Component -> Maybe (NonEmpty Text)
supportedOsVersions} -> Maybe (NonEmpty Text)
supportedOsVersions) (\s :: Component
s@Component' {} Maybe (NonEmpty Text)
a -> Component
s {$sel:supportedOsVersions:Component' :: Maybe (NonEmpty Text)
supportedOsVersions = Maybe (NonEmpty Text)
a} :: Component) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

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

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

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

instance Prelude.Hashable Component where
  hashWithSalt :: Int -> Component -> Int
hashWithSalt Int
_salt Component' {Maybe Bool
Maybe [ComponentParameterDetail]
Maybe (NonEmpty Text)
Maybe Text
Maybe (HashMap Text Text)
Maybe ComponentState
Maybe ComponentType
Maybe Platform
version :: Maybe Text
type' :: Maybe ComponentType
tags :: Maybe (HashMap Text Text)
supportedOsVersions :: Maybe (NonEmpty Text)
state :: Maybe ComponentState
platform :: Maybe Platform
parameters :: Maybe [ComponentParameterDetail]
owner :: Maybe Text
name :: Maybe Text
kmsKeyId :: Maybe Text
encrypted :: Maybe Bool
description :: Maybe Text
dateCreated :: Maybe Text
data' :: Maybe Text
changeDescription :: Maybe Text
arn :: Maybe Text
$sel:version:Component' :: Component -> Maybe Text
$sel:type':Component' :: Component -> Maybe ComponentType
$sel:tags:Component' :: Component -> Maybe (HashMap Text Text)
$sel:supportedOsVersions:Component' :: Component -> Maybe (NonEmpty Text)
$sel:state:Component' :: Component -> Maybe ComponentState
$sel:platform:Component' :: Component -> Maybe Platform
$sel:parameters:Component' :: Component -> Maybe [ComponentParameterDetail]
$sel:owner:Component' :: Component -> Maybe Text
$sel:name:Component' :: Component -> Maybe Text
$sel:kmsKeyId:Component' :: Component -> Maybe Text
$sel:encrypted:Component' :: Component -> Maybe Bool
$sel:description:Component' :: Component -> Maybe Text
$sel:dateCreated:Component' :: Component -> Maybe Text
$sel:data':Component' :: Component -> Maybe Text
$sel:changeDescription:Component' :: Component -> Maybe Text
$sel:arn:Component' :: Component -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
changeDescription
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
data'
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dateCreated
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
encrypted
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
kmsKeyId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
owner
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ComponentParameterDetail]
parameters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Platform
platform
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ComponentState
state
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Text)
supportedOsVersions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ComponentType
type'
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
version

instance Prelude.NFData Component where
  rnf :: Component -> ()
rnf Component' {Maybe Bool
Maybe [ComponentParameterDetail]
Maybe (NonEmpty Text)
Maybe Text
Maybe (HashMap Text Text)
Maybe ComponentState
Maybe ComponentType
Maybe Platform
version :: Maybe Text
type' :: Maybe ComponentType
tags :: Maybe (HashMap Text Text)
supportedOsVersions :: Maybe (NonEmpty Text)
state :: Maybe ComponentState
platform :: Maybe Platform
parameters :: Maybe [ComponentParameterDetail]
owner :: Maybe Text
name :: Maybe Text
kmsKeyId :: Maybe Text
encrypted :: Maybe Bool
description :: Maybe Text
dateCreated :: Maybe Text
data' :: Maybe Text
changeDescription :: Maybe Text
arn :: Maybe Text
$sel:version:Component' :: Component -> Maybe Text
$sel:type':Component' :: Component -> Maybe ComponentType
$sel:tags:Component' :: Component -> Maybe (HashMap Text Text)
$sel:supportedOsVersions:Component' :: Component -> Maybe (NonEmpty Text)
$sel:state:Component' :: Component -> Maybe ComponentState
$sel:platform:Component' :: Component -> Maybe Platform
$sel:parameters:Component' :: Component -> Maybe [ComponentParameterDetail]
$sel:owner:Component' :: Component -> Maybe Text
$sel:name:Component' :: Component -> Maybe Text
$sel:kmsKeyId:Component' :: Component -> Maybe Text
$sel:encrypted:Component' :: Component -> Maybe Bool
$sel:description:Component' :: Component -> Maybe Text
$sel:dateCreated:Component' :: Component -> Maybe Text
$sel:data':Component' :: Component -> Maybe Text
$sel:changeDescription:Component' :: Component -> Maybe Text
$sel:arn:Component' :: Component -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
changeDescription
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
data'
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dateCreated
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
encrypted
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
kmsKeyId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
owner
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ComponentParameterDetail]
parameters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Platform
platform
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ComponentState
state
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Text)
supportedOsVersions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ComponentType
type'
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
version