{-# 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.ServiceCatalog.Types.TagOptionDetail where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data TagOptionDetail = TagOptionDetail'
{
TagOptionDetail -> Maybe Bool
active :: Prelude.Maybe Prelude.Bool,
TagOptionDetail -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
TagOptionDetail -> Maybe Text
key :: Prelude.Maybe Prelude.Text,
TagOptionDetail -> Maybe Text
owner :: Prelude.Maybe Prelude.Text,
TagOptionDetail -> Maybe Text
value :: Prelude.Maybe Prelude.Text
}
deriving (TagOptionDetail -> TagOptionDetail -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TagOptionDetail -> TagOptionDetail -> Bool
$c/= :: TagOptionDetail -> TagOptionDetail -> Bool
== :: TagOptionDetail -> TagOptionDetail -> Bool
$c== :: TagOptionDetail -> TagOptionDetail -> Bool
Prelude.Eq, ReadPrec [TagOptionDetail]
ReadPrec TagOptionDetail
Int -> ReadS TagOptionDetail
ReadS [TagOptionDetail]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TagOptionDetail]
$creadListPrec :: ReadPrec [TagOptionDetail]
readPrec :: ReadPrec TagOptionDetail
$creadPrec :: ReadPrec TagOptionDetail
readList :: ReadS [TagOptionDetail]
$creadList :: ReadS [TagOptionDetail]
readsPrec :: Int -> ReadS TagOptionDetail
$creadsPrec :: Int -> ReadS TagOptionDetail
Prelude.Read, Int -> TagOptionDetail -> ShowS
[TagOptionDetail] -> ShowS
TagOptionDetail -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TagOptionDetail] -> ShowS
$cshowList :: [TagOptionDetail] -> ShowS
show :: TagOptionDetail -> String
$cshow :: TagOptionDetail -> String
showsPrec :: Int -> TagOptionDetail -> ShowS
$cshowsPrec :: Int -> TagOptionDetail -> ShowS
Prelude.Show, forall x. Rep TagOptionDetail x -> TagOptionDetail
forall x. TagOptionDetail -> Rep TagOptionDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TagOptionDetail x -> TagOptionDetail
$cfrom :: forall x. TagOptionDetail -> Rep TagOptionDetail x
Prelude.Generic)
newTagOptionDetail ::
TagOptionDetail
newTagOptionDetail :: TagOptionDetail
newTagOptionDetail =
TagOptionDetail'
{ $sel:active:TagOptionDetail' :: Maybe Bool
active = forall a. Maybe a
Prelude.Nothing,
$sel:id:TagOptionDetail' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:key:TagOptionDetail' :: Maybe Text
key = forall a. Maybe a
Prelude.Nothing,
$sel:owner:TagOptionDetail' :: Maybe Text
owner = forall a. Maybe a
Prelude.Nothing,
$sel:value:TagOptionDetail' :: Maybe Text
value = forall a. Maybe a
Prelude.Nothing
}
tagOptionDetail_active :: Lens.Lens' TagOptionDetail (Prelude.Maybe Prelude.Bool)
tagOptionDetail_active :: Lens' TagOptionDetail (Maybe Bool)
tagOptionDetail_active = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TagOptionDetail' {Maybe Bool
active :: Maybe Bool
$sel:active:TagOptionDetail' :: TagOptionDetail -> Maybe Bool
active} -> Maybe Bool
active) (\s :: TagOptionDetail
s@TagOptionDetail' {} Maybe Bool
a -> TagOptionDetail
s {$sel:active:TagOptionDetail' :: Maybe Bool
active = Maybe Bool
a} :: TagOptionDetail)
tagOptionDetail_id :: Lens.Lens' TagOptionDetail (Prelude.Maybe Prelude.Text)
tagOptionDetail_id :: Lens' TagOptionDetail (Maybe Text)
tagOptionDetail_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TagOptionDetail' {Maybe Text
id :: Maybe Text
$sel:id:TagOptionDetail' :: TagOptionDetail -> Maybe Text
id} -> Maybe Text
id) (\s :: TagOptionDetail
s@TagOptionDetail' {} Maybe Text
a -> TagOptionDetail
s {$sel:id:TagOptionDetail' :: Maybe Text
id = Maybe Text
a} :: TagOptionDetail)
tagOptionDetail_key :: Lens.Lens' TagOptionDetail (Prelude.Maybe Prelude.Text)
tagOptionDetail_key :: Lens' TagOptionDetail (Maybe Text)
tagOptionDetail_key = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TagOptionDetail' {Maybe Text
key :: Maybe Text
$sel:key:TagOptionDetail' :: TagOptionDetail -> Maybe Text
key} -> Maybe Text
key) (\s :: TagOptionDetail
s@TagOptionDetail' {} Maybe Text
a -> TagOptionDetail
s {$sel:key:TagOptionDetail' :: Maybe Text
key = Maybe Text
a} :: TagOptionDetail)
tagOptionDetail_owner :: Lens.Lens' TagOptionDetail (Prelude.Maybe Prelude.Text)
tagOptionDetail_owner :: Lens' TagOptionDetail (Maybe Text)
tagOptionDetail_owner = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TagOptionDetail' {Maybe Text
owner :: Maybe Text
$sel:owner:TagOptionDetail' :: TagOptionDetail -> Maybe Text
owner} -> Maybe Text
owner) (\s :: TagOptionDetail
s@TagOptionDetail' {} Maybe Text
a -> TagOptionDetail
s {$sel:owner:TagOptionDetail' :: Maybe Text
owner = Maybe Text
a} :: TagOptionDetail)
tagOptionDetail_value :: Lens.Lens' TagOptionDetail (Prelude.Maybe Prelude.Text)
tagOptionDetail_value :: Lens' TagOptionDetail (Maybe Text)
tagOptionDetail_value = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TagOptionDetail' {Maybe Text
value :: Maybe Text
$sel:value:TagOptionDetail' :: TagOptionDetail -> Maybe Text
value} -> Maybe Text
value) (\s :: TagOptionDetail
s@TagOptionDetail' {} Maybe Text
a -> TagOptionDetail
s {$sel:value:TagOptionDetail' :: Maybe Text
value = Maybe Text
a} :: TagOptionDetail)
instance Data.FromJSON TagOptionDetail where
parseJSON :: Value -> Parser TagOptionDetail
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"TagOptionDetail"
( \Object
x ->
Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> TagOptionDetail
TagOptionDetail'
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
"Active")
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
"Id")
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
"Key")
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
"Value")
)
instance Prelude.Hashable TagOptionDetail where
hashWithSalt :: Int -> TagOptionDetail -> Int
hashWithSalt Int
_salt TagOptionDetail' {Maybe Bool
Maybe Text
value :: Maybe Text
owner :: Maybe Text
key :: Maybe Text
id :: Maybe Text
active :: Maybe Bool
$sel:value:TagOptionDetail' :: TagOptionDetail -> Maybe Text
$sel:owner:TagOptionDetail' :: TagOptionDetail -> Maybe Text
$sel:key:TagOptionDetail' :: TagOptionDetail -> Maybe Text
$sel:id:TagOptionDetail' :: TagOptionDetail -> Maybe Text
$sel:active:TagOptionDetail' :: TagOptionDetail -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
active
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
key
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
owner
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
value
instance Prelude.NFData TagOptionDetail where
rnf :: TagOptionDetail -> ()
rnf TagOptionDetail' {Maybe Bool
Maybe Text
value :: Maybe Text
owner :: Maybe Text
key :: Maybe Text
id :: Maybe Text
active :: Maybe Bool
$sel:value:TagOptionDetail' :: TagOptionDetail -> Maybe Text
$sel:owner:TagOptionDetail' :: TagOptionDetail -> Maybe Text
$sel:key:TagOptionDetail' :: TagOptionDetail -> Maybe Text
$sel:id:TagOptionDetail' :: TagOptionDetail -> Maybe Text
$sel:active:TagOptionDetail' :: TagOptionDetail -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
active
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
key
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 Text
value