{-# 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.IoT.Types.DomainConfigurationSummary where
import qualified Amazonka.Core as Core
import Amazonka.IoT.Types.ServiceType
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DomainConfigurationSummary = DomainConfigurationSummary'
{
DomainConfigurationSummary -> Maybe Text
domainConfigurationName :: Prelude.Maybe Prelude.Text,
DomainConfigurationSummary -> Maybe Text
domainConfigurationArn :: Prelude.Maybe Prelude.Text,
DomainConfigurationSummary -> Maybe ServiceType
serviceType :: Prelude.Maybe ServiceType
}
deriving (DomainConfigurationSummary -> DomainConfigurationSummary -> Bool
(DomainConfigurationSummary -> DomainConfigurationSummary -> Bool)
-> (DomainConfigurationSummary
-> DomainConfigurationSummary -> Bool)
-> Eq DomainConfigurationSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DomainConfigurationSummary -> DomainConfigurationSummary -> Bool
$c/= :: DomainConfigurationSummary -> DomainConfigurationSummary -> Bool
== :: DomainConfigurationSummary -> DomainConfigurationSummary -> Bool
$c== :: DomainConfigurationSummary -> DomainConfigurationSummary -> Bool
Prelude.Eq, ReadPrec [DomainConfigurationSummary]
ReadPrec DomainConfigurationSummary
Int -> ReadS DomainConfigurationSummary
ReadS [DomainConfigurationSummary]
(Int -> ReadS DomainConfigurationSummary)
-> ReadS [DomainConfigurationSummary]
-> ReadPrec DomainConfigurationSummary
-> ReadPrec [DomainConfigurationSummary]
-> Read DomainConfigurationSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DomainConfigurationSummary]
$creadListPrec :: ReadPrec [DomainConfigurationSummary]
readPrec :: ReadPrec DomainConfigurationSummary
$creadPrec :: ReadPrec DomainConfigurationSummary
readList :: ReadS [DomainConfigurationSummary]
$creadList :: ReadS [DomainConfigurationSummary]
readsPrec :: Int -> ReadS DomainConfigurationSummary
$creadsPrec :: Int -> ReadS DomainConfigurationSummary
Prelude.Read, Int -> DomainConfigurationSummary -> ShowS
[DomainConfigurationSummary] -> ShowS
DomainConfigurationSummary -> String
(Int -> DomainConfigurationSummary -> ShowS)
-> (DomainConfigurationSummary -> String)
-> ([DomainConfigurationSummary] -> ShowS)
-> Show DomainConfigurationSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DomainConfigurationSummary] -> ShowS
$cshowList :: [DomainConfigurationSummary] -> ShowS
show :: DomainConfigurationSummary -> String
$cshow :: DomainConfigurationSummary -> String
showsPrec :: Int -> DomainConfigurationSummary -> ShowS
$cshowsPrec :: Int -> DomainConfigurationSummary -> ShowS
Prelude.Show, (forall x.
DomainConfigurationSummary -> Rep DomainConfigurationSummary x)
-> (forall x.
Rep DomainConfigurationSummary x -> DomainConfigurationSummary)
-> Generic DomainConfigurationSummary
forall x.
Rep DomainConfigurationSummary x -> DomainConfigurationSummary
forall x.
DomainConfigurationSummary -> Rep DomainConfigurationSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DomainConfigurationSummary x -> DomainConfigurationSummary
$cfrom :: forall x.
DomainConfigurationSummary -> Rep DomainConfigurationSummary x
Prelude.Generic)
newDomainConfigurationSummary ::
DomainConfigurationSummary
newDomainConfigurationSummary :: DomainConfigurationSummary
newDomainConfigurationSummary =
DomainConfigurationSummary' :: Maybe Text
-> Maybe Text -> Maybe ServiceType -> DomainConfigurationSummary
DomainConfigurationSummary'
{ $sel:domainConfigurationName:DomainConfigurationSummary' :: Maybe Text
domainConfigurationName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:domainConfigurationArn:DomainConfigurationSummary' :: Maybe Text
domainConfigurationArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:serviceType:DomainConfigurationSummary' :: Maybe ServiceType
serviceType = Maybe ServiceType
forall a. Maybe a
Prelude.Nothing
}
domainConfigurationSummary_domainConfigurationName :: Lens.Lens' DomainConfigurationSummary (Prelude.Maybe Prelude.Text)
domainConfigurationSummary_domainConfigurationName :: (Maybe Text -> f (Maybe Text))
-> DomainConfigurationSummary -> f DomainConfigurationSummary
domainConfigurationSummary_domainConfigurationName = (DomainConfigurationSummary -> Maybe Text)
-> (DomainConfigurationSummary
-> Maybe Text -> DomainConfigurationSummary)
-> Lens
DomainConfigurationSummary
DomainConfigurationSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainConfigurationSummary' {Maybe Text
domainConfigurationName :: Maybe Text
$sel:domainConfigurationName:DomainConfigurationSummary' :: DomainConfigurationSummary -> Maybe Text
domainConfigurationName} -> Maybe Text
domainConfigurationName) (\s :: DomainConfigurationSummary
s@DomainConfigurationSummary' {} Maybe Text
a -> DomainConfigurationSummary
s {$sel:domainConfigurationName:DomainConfigurationSummary' :: Maybe Text
domainConfigurationName = Maybe Text
a} :: DomainConfigurationSummary)
domainConfigurationSummary_domainConfigurationArn :: Lens.Lens' DomainConfigurationSummary (Prelude.Maybe Prelude.Text)
domainConfigurationSummary_domainConfigurationArn :: (Maybe Text -> f (Maybe Text))
-> DomainConfigurationSummary -> f DomainConfigurationSummary
domainConfigurationSummary_domainConfigurationArn = (DomainConfigurationSummary -> Maybe Text)
-> (DomainConfigurationSummary
-> Maybe Text -> DomainConfigurationSummary)
-> Lens
DomainConfigurationSummary
DomainConfigurationSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainConfigurationSummary' {Maybe Text
domainConfigurationArn :: Maybe Text
$sel:domainConfigurationArn:DomainConfigurationSummary' :: DomainConfigurationSummary -> Maybe Text
domainConfigurationArn} -> Maybe Text
domainConfigurationArn) (\s :: DomainConfigurationSummary
s@DomainConfigurationSummary' {} Maybe Text
a -> DomainConfigurationSummary
s {$sel:domainConfigurationArn:DomainConfigurationSummary' :: Maybe Text
domainConfigurationArn = Maybe Text
a} :: DomainConfigurationSummary)
domainConfigurationSummary_serviceType :: Lens.Lens' DomainConfigurationSummary (Prelude.Maybe ServiceType)
domainConfigurationSummary_serviceType :: (Maybe ServiceType -> f (Maybe ServiceType))
-> DomainConfigurationSummary -> f DomainConfigurationSummary
domainConfigurationSummary_serviceType = (DomainConfigurationSummary -> Maybe ServiceType)
-> (DomainConfigurationSummary
-> Maybe ServiceType -> DomainConfigurationSummary)
-> Lens
DomainConfigurationSummary
DomainConfigurationSummary
(Maybe ServiceType)
(Maybe ServiceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainConfigurationSummary' {Maybe ServiceType
serviceType :: Maybe ServiceType
$sel:serviceType:DomainConfigurationSummary' :: DomainConfigurationSummary -> Maybe ServiceType
serviceType} -> Maybe ServiceType
serviceType) (\s :: DomainConfigurationSummary
s@DomainConfigurationSummary' {} Maybe ServiceType
a -> DomainConfigurationSummary
s {$sel:serviceType:DomainConfigurationSummary' :: Maybe ServiceType
serviceType = Maybe ServiceType
a} :: DomainConfigurationSummary)
instance Core.FromJSON DomainConfigurationSummary where
parseJSON :: Value -> Parser DomainConfigurationSummary
parseJSON =
String
-> (Object -> Parser DomainConfigurationSummary)
-> Value
-> Parser DomainConfigurationSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DomainConfigurationSummary"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe ServiceType -> DomainConfigurationSummary
DomainConfigurationSummary'
(Maybe Text
-> Maybe Text -> Maybe ServiceType -> DomainConfigurationSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe ServiceType -> DomainConfigurationSummary)
forall (f :: * -> *) a b. Functor 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
"domainConfigurationName")
Parser
(Maybe Text -> Maybe ServiceType -> DomainConfigurationSummary)
-> Parser (Maybe Text)
-> Parser (Maybe ServiceType -> DomainConfigurationSummary)
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
"domainConfigurationArn")
Parser (Maybe ServiceType -> DomainConfigurationSummary)
-> Parser (Maybe ServiceType) -> Parser DomainConfigurationSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ServiceType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"serviceType")
)
instance Prelude.Hashable DomainConfigurationSummary
instance Prelude.NFData DomainConfigurationSummary