{-# 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 #-}
module Amazonka.ImageBuilder.Types.ComponentVersion 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.ComponentType
import Amazonka.ImageBuilder.Types.Platform
import qualified Amazonka.Prelude as Prelude
data ComponentVersion = ComponentVersion'
{
ComponentVersion -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
ComponentVersion -> Maybe Text
dateCreated :: Prelude.Maybe Prelude.Text,
ComponentVersion -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
ComponentVersion -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
ComponentVersion -> Maybe Text
owner :: Prelude.Maybe Prelude.Text,
ComponentVersion -> Maybe Platform
platform :: Prelude.Maybe Platform,
ComponentVersion -> Maybe (NonEmpty Text)
supportedOsVersions :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
ComponentVersion -> Maybe ComponentType
type' :: Prelude.Maybe ComponentType,
ComponentVersion -> Maybe Text
version :: Prelude.Maybe Prelude.Text
}
deriving (ComponentVersion -> ComponentVersion -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ComponentVersion -> ComponentVersion -> Bool
$c/= :: ComponentVersion -> ComponentVersion -> Bool
== :: ComponentVersion -> ComponentVersion -> Bool
$c== :: ComponentVersion -> ComponentVersion -> Bool
Prelude.Eq, ReadPrec [ComponentVersion]
ReadPrec ComponentVersion
Int -> ReadS ComponentVersion
ReadS [ComponentVersion]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ComponentVersion]
$creadListPrec :: ReadPrec [ComponentVersion]
readPrec :: ReadPrec ComponentVersion
$creadPrec :: ReadPrec ComponentVersion
readList :: ReadS [ComponentVersion]
$creadList :: ReadS [ComponentVersion]
readsPrec :: Int -> ReadS ComponentVersion
$creadsPrec :: Int -> ReadS ComponentVersion
Prelude.Read, Int -> ComponentVersion -> ShowS
[ComponentVersion] -> ShowS
ComponentVersion -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ComponentVersion] -> ShowS
$cshowList :: [ComponentVersion] -> ShowS
show :: ComponentVersion -> String
$cshow :: ComponentVersion -> String
showsPrec :: Int -> ComponentVersion -> ShowS
$cshowsPrec :: Int -> ComponentVersion -> ShowS
Prelude.Show, forall x. Rep ComponentVersion x -> ComponentVersion
forall x. ComponentVersion -> Rep ComponentVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ComponentVersion x -> ComponentVersion
$cfrom :: forall x. ComponentVersion -> Rep ComponentVersion x
Prelude.Generic)
newComponentVersion ::
ComponentVersion
newComponentVersion :: ComponentVersion
newComponentVersion =
ComponentVersion'
{ $sel:arn:ComponentVersion' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:dateCreated:ComponentVersion' :: Maybe Text
dateCreated = forall a. Maybe a
Prelude.Nothing,
$sel:description:ComponentVersion' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:name:ComponentVersion' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:owner:ComponentVersion' :: Maybe Text
owner = forall a. Maybe a
Prelude.Nothing,
$sel:platform:ComponentVersion' :: Maybe Platform
platform = forall a. Maybe a
Prelude.Nothing,
$sel:supportedOsVersions:ComponentVersion' :: Maybe (NonEmpty Text)
supportedOsVersions = forall a. Maybe a
Prelude.Nothing,
$sel:type':ComponentVersion' :: Maybe ComponentType
type' = forall a. Maybe a
Prelude.Nothing,
$sel:version:ComponentVersion' :: Maybe Text
version = forall a. Maybe a
Prelude.Nothing
}
componentVersion_arn :: Lens.Lens' ComponentVersion (Prelude.Maybe Prelude.Text)
componentVersion_arn :: Lens' ComponentVersion (Maybe Text)
componentVersion_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentVersion' {Maybe Text
arn :: Maybe Text
$sel:arn:ComponentVersion' :: ComponentVersion -> Maybe Text
arn} -> Maybe Text
arn) (\s :: ComponentVersion
s@ComponentVersion' {} Maybe Text
a -> ComponentVersion
s {$sel:arn:ComponentVersion' :: Maybe Text
arn = Maybe Text
a} :: ComponentVersion)
componentVersion_dateCreated :: Lens.Lens' ComponentVersion (Prelude.Maybe Prelude.Text)
componentVersion_dateCreated :: Lens' ComponentVersion (Maybe Text)
componentVersion_dateCreated = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentVersion' {Maybe Text
dateCreated :: Maybe Text
$sel:dateCreated:ComponentVersion' :: ComponentVersion -> Maybe Text
dateCreated} -> Maybe Text
dateCreated) (\s :: ComponentVersion
s@ComponentVersion' {} Maybe Text
a -> ComponentVersion
s {$sel:dateCreated:ComponentVersion' :: Maybe Text
dateCreated = Maybe Text
a} :: ComponentVersion)
componentVersion_description :: Lens.Lens' ComponentVersion (Prelude.Maybe Prelude.Text)
componentVersion_description :: Lens' ComponentVersion (Maybe Text)
componentVersion_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentVersion' {Maybe Text
description :: Maybe Text
$sel:description:ComponentVersion' :: ComponentVersion -> Maybe Text
description} -> Maybe Text
description) (\s :: ComponentVersion
s@ComponentVersion' {} Maybe Text
a -> ComponentVersion
s {$sel:description:ComponentVersion' :: Maybe Text
description = Maybe Text
a} :: ComponentVersion)
componentVersion_name :: Lens.Lens' ComponentVersion (Prelude.Maybe Prelude.Text)
componentVersion_name :: Lens' ComponentVersion (Maybe Text)
componentVersion_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentVersion' {Maybe Text
name :: Maybe Text
$sel:name:ComponentVersion' :: ComponentVersion -> Maybe Text
name} -> Maybe Text
name) (\s :: ComponentVersion
s@ComponentVersion' {} Maybe Text
a -> ComponentVersion
s {$sel:name:ComponentVersion' :: Maybe Text
name = Maybe Text
a} :: ComponentVersion)
componentVersion_owner :: Lens.Lens' ComponentVersion (Prelude.Maybe Prelude.Text)
componentVersion_owner :: Lens' ComponentVersion (Maybe Text)
componentVersion_owner = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentVersion' {Maybe Text
owner :: Maybe Text
$sel:owner:ComponentVersion' :: ComponentVersion -> Maybe Text
owner} -> Maybe Text
owner) (\s :: ComponentVersion
s@ComponentVersion' {} Maybe Text
a -> ComponentVersion
s {$sel:owner:ComponentVersion' :: Maybe Text
owner = Maybe Text
a} :: ComponentVersion)
componentVersion_platform :: Lens.Lens' ComponentVersion (Prelude.Maybe Platform)
componentVersion_platform :: Lens' ComponentVersion (Maybe Platform)
componentVersion_platform = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentVersion' {Maybe Platform
platform :: Maybe Platform
$sel:platform:ComponentVersion' :: ComponentVersion -> Maybe Platform
platform} -> Maybe Platform
platform) (\s :: ComponentVersion
s@ComponentVersion' {} Maybe Platform
a -> ComponentVersion
s {$sel:platform:ComponentVersion' :: Maybe Platform
platform = Maybe Platform
a} :: ComponentVersion)
componentVersion_supportedOsVersions :: Lens.Lens' ComponentVersion (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
componentVersion_supportedOsVersions :: Lens' ComponentVersion (Maybe (NonEmpty Text))
componentVersion_supportedOsVersions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentVersion' {Maybe (NonEmpty Text)
supportedOsVersions :: Maybe (NonEmpty Text)
$sel:supportedOsVersions:ComponentVersion' :: ComponentVersion -> Maybe (NonEmpty Text)
supportedOsVersions} -> Maybe (NonEmpty Text)
supportedOsVersions) (\s :: ComponentVersion
s@ComponentVersion' {} Maybe (NonEmpty Text)
a -> ComponentVersion
s {$sel:supportedOsVersions:ComponentVersion' :: Maybe (NonEmpty Text)
supportedOsVersions = Maybe (NonEmpty Text)
a} :: ComponentVersion) 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
componentVersion_type :: Lens.Lens' ComponentVersion (Prelude.Maybe ComponentType)
componentVersion_type :: Lens' ComponentVersion (Maybe ComponentType)
componentVersion_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentVersion' {Maybe ComponentType
type' :: Maybe ComponentType
$sel:type':ComponentVersion' :: ComponentVersion -> Maybe ComponentType
type'} -> Maybe ComponentType
type') (\s :: ComponentVersion
s@ComponentVersion' {} Maybe ComponentType
a -> ComponentVersion
s {$sel:type':ComponentVersion' :: Maybe ComponentType
type' = Maybe ComponentType
a} :: ComponentVersion)
componentVersion_version :: Lens.Lens' ComponentVersion (Prelude.Maybe Prelude.Text)
componentVersion_version :: Lens' ComponentVersion (Maybe Text)
componentVersion_version = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComponentVersion' {Maybe Text
version :: Maybe Text
$sel:version:ComponentVersion' :: ComponentVersion -> Maybe Text
version} -> Maybe Text
version) (\s :: ComponentVersion
s@ComponentVersion' {} Maybe Text
a -> ComponentVersion
s {$sel:version:ComponentVersion' :: Maybe Text
version = Maybe Text
a} :: ComponentVersion)
instance Data.FromJSON ComponentVersion where
parseJSON :: Value -> Parser ComponentVersion
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ComponentVersion"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Platform
-> Maybe (NonEmpty Text)
-> Maybe ComponentType
-> Maybe Text
-> ComponentVersion
ComponentVersion'
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
"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
"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
"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
"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
"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 ComponentVersion where
hashWithSalt :: Int -> ComponentVersion -> Int
hashWithSalt Int
_salt ComponentVersion' {Maybe (NonEmpty Text)
Maybe Text
Maybe ComponentType
Maybe Platform
version :: Maybe Text
type' :: Maybe ComponentType
supportedOsVersions :: Maybe (NonEmpty Text)
platform :: Maybe Platform
owner :: Maybe Text
name :: Maybe Text
description :: Maybe Text
dateCreated :: Maybe Text
arn :: Maybe Text
$sel:version:ComponentVersion' :: ComponentVersion -> Maybe Text
$sel:type':ComponentVersion' :: ComponentVersion -> Maybe ComponentType
$sel:supportedOsVersions:ComponentVersion' :: ComponentVersion -> Maybe (NonEmpty Text)
$sel:platform:ComponentVersion' :: ComponentVersion -> Maybe Platform
$sel:owner:ComponentVersion' :: ComponentVersion -> Maybe Text
$sel:name:ComponentVersion' :: ComponentVersion -> Maybe Text
$sel:description:ComponentVersion' :: ComponentVersion -> Maybe Text
$sel:dateCreated:ComponentVersion' :: ComponentVersion -> Maybe Text
$sel:arn:ComponentVersion' :: ComponentVersion -> 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
dateCreated
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
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 Platform
platform
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Text)
supportedOsVersions
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 ComponentVersion where
rnf :: ComponentVersion -> ()
rnf ComponentVersion' {Maybe (NonEmpty Text)
Maybe Text
Maybe ComponentType
Maybe Platform
version :: Maybe Text
type' :: Maybe ComponentType
supportedOsVersions :: Maybe (NonEmpty Text)
platform :: Maybe Platform
owner :: Maybe Text
name :: Maybe Text
description :: Maybe Text
dateCreated :: Maybe Text
arn :: Maybe Text
$sel:version:ComponentVersion' :: ComponentVersion -> Maybe Text
$sel:type':ComponentVersion' :: ComponentVersion -> Maybe ComponentType
$sel:supportedOsVersions:ComponentVersion' :: ComponentVersion -> Maybe (NonEmpty Text)
$sel:platform:ComponentVersion' :: ComponentVersion -> Maybe Platform
$sel:owner:ComponentVersion' :: ComponentVersion -> Maybe Text
$sel:name:ComponentVersion' :: ComponentVersion -> Maybe Text
$sel:description:ComponentVersion' :: ComponentVersion -> Maybe Text
$sel:dateCreated:ComponentVersion' :: ComponentVersion -> Maybe Text
$sel:arn:ComponentVersion' :: ComponentVersion -> 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
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 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 Platform
platform
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 ComponentType
type'
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
version