{-# 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.ResourceExplorer2.Types.SupportedResourceType 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 SupportedResourceType = SupportedResourceType'
{
SupportedResourceType -> Maybe Text
resourceType :: Prelude.Maybe Prelude.Text,
SupportedResourceType -> Maybe Text
service :: Prelude.Maybe Prelude.Text
}
deriving (SupportedResourceType -> SupportedResourceType -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SupportedResourceType -> SupportedResourceType -> Bool
$c/= :: SupportedResourceType -> SupportedResourceType -> Bool
== :: SupportedResourceType -> SupportedResourceType -> Bool
$c== :: SupportedResourceType -> SupportedResourceType -> Bool
Prelude.Eq, ReadPrec [SupportedResourceType]
ReadPrec SupportedResourceType
Int -> ReadS SupportedResourceType
ReadS [SupportedResourceType]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SupportedResourceType]
$creadListPrec :: ReadPrec [SupportedResourceType]
readPrec :: ReadPrec SupportedResourceType
$creadPrec :: ReadPrec SupportedResourceType
readList :: ReadS [SupportedResourceType]
$creadList :: ReadS [SupportedResourceType]
readsPrec :: Int -> ReadS SupportedResourceType
$creadsPrec :: Int -> ReadS SupportedResourceType
Prelude.Read, Int -> SupportedResourceType -> ShowS
[SupportedResourceType] -> ShowS
SupportedResourceType -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SupportedResourceType] -> ShowS
$cshowList :: [SupportedResourceType] -> ShowS
show :: SupportedResourceType -> String
$cshow :: SupportedResourceType -> String
showsPrec :: Int -> SupportedResourceType -> ShowS
$cshowsPrec :: Int -> SupportedResourceType -> ShowS
Prelude.Show, forall x. Rep SupportedResourceType x -> SupportedResourceType
forall x. SupportedResourceType -> Rep SupportedResourceType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SupportedResourceType x -> SupportedResourceType
$cfrom :: forall x. SupportedResourceType -> Rep SupportedResourceType x
Prelude.Generic)
newSupportedResourceType ::
SupportedResourceType
newSupportedResourceType :: SupportedResourceType
newSupportedResourceType =
SupportedResourceType'
{ $sel:resourceType:SupportedResourceType' :: Maybe Text
resourceType =
forall a. Maybe a
Prelude.Nothing,
$sel:service:SupportedResourceType' :: Maybe Text
service = forall a. Maybe a
Prelude.Nothing
}
supportedResourceType_resourceType :: Lens.Lens' SupportedResourceType (Prelude.Maybe Prelude.Text)
supportedResourceType_resourceType :: Lens' SupportedResourceType (Maybe Text)
supportedResourceType_resourceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SupportedResourceType' {Maybe Text
resourceType :: Maybe Text
$sel:resourceType:SupportedResourceType' :: SupportedResourceType -> Maybe Text
resourceType} -> Maybe Text
resourceType) (\s :: SupportedResourceType
s@SupportedResourceType' {} Maybe Text
a -> SupportedResourceType
s {$sel:resourceType:SupportedResourceType' :: Maybe Text
resourceType = Maybe Text
a} :: SupportedResourceType)
supportedResourceType_service :: Lens.Lens' SupportedResourceType (Prelude.Maybe Prelude.Text)
supportedResourceType_service :: Lens' SupportedResourceType (Maybe Text)
supportedResourceType_service = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SupportedResourceType' {Maybe Text
service :: Maybe Text
$sel:service:SupportedResourceType' :: SupportedResourceType -> Maybe Text
service} -> Maybe Text
service) (\s :: SupportedResourceType
s@SupportedResourceType' {} Maybe Text
a -> SupportedResourceType
s {$sel:service:SupportedResourceType' :: Maybe Text
service = Maybe Text
a} :: SupportedResourceType)
instance Data.FromJSON SupportedResourceType where
parseJSON :: Value -> Parser SupportedResourceType
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"SupportedResourceType"
( \Object
x ->
Maybe Text -> Maybe Text -> SupportedResourceType
SupportedResourceType'
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
"ResourceType")
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
"Service")
)
instance Prelude.Hashable SupportedResourceType where
hashWithSalt :: Int -> SupportedResourceType -> Int
hashWithSalt Int
_salt SupportedResourceType' {Maybe Text
service :: Maybe Text
resourceType :: Maybe Text
$sel:service:SupportedResourceType' :: SupportedResourceType -> Maybe Text
$sel:resourceType:SupportedResourceType' :: SupportedResourceType -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
resourceType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
service
instance Prelude.NFData SupportedResourceType where
rnf :: SupportedResourceType -> ()
rnf SupportedResourceType' {Maybe Text
service :: Maybe Text
resourceType :: Maybe Text
$sel:service:SupportedResourceType' :: SupportedResourceType -> Maybe Text
$sel:resourceType:SupportedResourceType' :: SupportedResourceType -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
resourceType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
service