{-# 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.AppConfig.Types.ConfigurationProfileSummary where
import Amazonka.AppConfig.Types.ValidatorType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ConfigurationProfileSummary = ConfigurationProfileSummary'
{
ConfigurationProfileSummary -> Maybe Text
locationUri :: Prelude.Maybe Prelude.Text,
ConfigurationProfileSummary -> Maybe Text
applicationId :: Prelude.Maybe Prelude.Text,
ConfigurationProfileSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
ConfigurationProfileSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
ConfigurationProfileSummary -> Maybe [ValidatorType]
validatorTypes :: Prelude.Maybe [ValidatorType]
}
deriving (ConfigurationProfileSummary -> ConfigurationProfileSummary -> Bool
(ConfigurationProfileSummary
-> ConfigurationProfileSummary -> Bool)
-> (ConfigurationProfileSummary
-> ConfigurationProfileSummary -> Bool)
-> Eq ConfigurationProfileSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConfigurationProfileSummary -> ConfigurationProfileSummary -> Bool
$c/= :: ConfigurationProfileSummary -> ConfigurationProfileSummary -> Bool
== :: ConfigurationProfileSummary -> ConfigurationProfileSummary -> Bool
$c== :: ConfigurationProfileSummary -> ConfigurationProfileSummary -> Bool
Prelude.Eq, ReadPrec [ConfigurationProfileSummary]
ReadPrec ConfigurationProfileSummary
Int -> ReadS ConfigurationProfileSummary
ReadS [ConfigurationProfileSummary]
(Int -> ReadS ConfigurationProfileSummary)
-> ReadS [ConfigurationProfileSummary]
-> ReadPrec ConfigurationProfileSummary
-> ReadPrec [ConfigurationProfileSummary]
-> Read ConfigurationProfileSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConfigurationProfileSummary]
$creadListPrec :: ReadPrec [ConfigurationProfileSummary]
readPrec :: ReadPrec ConfigurationProfileSummary
$creadPrec :: ReadPrec ConfigurationProfileSummary
readList :: ReadS [ConfigurationProfileSummary]
$creadList :: ReadS [ConfigurationProfileSummary]
readsPrec :: Int -> ReadS ConfigurationProfileSummary
$creadsPrec :: Int -> ReadS ConfigurationProfileSummary
Prelude.Read, Int -> ConfigurationProfileSummary -> ShowS
[ConfigurationProfileSummary] -> ShowS
ConfigurationProfileSummary -> String
(Int -> ConfigurationProfileSummary -> ShowS)
-> (ConfigurationProfileSummary -> String)
-> ([ConfigurationProfileSummary] -> ShowS)
-> Show ConfigurationProfileSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConfigurationProfileSummary] -> ShowS
$cshowList :: [ConfigurationProfileSummary] -> ShowS
show :: ConfigurationProfileSummary -> String
$cshow :: ConfigurationProfileSummary -> String
showsPrec :: Int -> ConfigurationProfileSummary -> ShowS
$cshowsPrec :: Int -> ConfigurationProfileSummary -> ShowS
Prelude.Show, (forall x.
ConfigurationProfileSummary -> Rep ConfigurationProfileSummary x)
-> (forall x.
Rep ConfigurationProfileSummary x -> ConfigurationProfileSummary)
-> Generic ConfigurationProfileSummary
forall x.
Rep ConfigurationProfileSummary x -> ConfigurationProfileSummary
forall x.
ConfigurationProfileSummary -> Rep ConfigurationProfileSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ConfigurationProfileSummary x -> ConfigurationProfileSummary
$cfrom :: forall x.
ConfigurationProfileSummary -> Rep ConfigurationProfileSummary x
Prelude.Generic)
newConfigurationProfileSummary ::
ConfigurationProfileSummary
newConfigurationProfileSummary :: ConfigurationProfileSummary
newConfigurationProfileSummary =
ConfigurationProfileSummary' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ValidatorType]
-> ConfigurationProfileSummary
ConfigurationProfileSummary'
{ $sel:locationUri:ConfigurationProfileSummary' :: Maybe Text
locationUri =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:applicationId:ConfigurationProfileSummary' :: Maybe Text
applicationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:ConfigurationProfileSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:ConfigurationProfileSummary' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:validatorTypes:ConfigurationProfileSummary' :: Maybe [ValidatorType]
validatorTypes = Maybe [ValidatorType]
forall a. Maybe a
Prelude.Nothing
}
configurationProfileSummary_locationUri :: Lens.Lens' ConfigurationProfileSummary (Prelude.Maybe Prelude.Text)
configurationProfileSummary_locationUri :: (Maybe Text -> f (Maybe Text))
-> ConfigurationProfileSummary -> f ConfigurationProfileSummary
configurationProfileSummary_locationUri = (ConfigurationProfileSummary -> Maybe Text)
-> (ConfigurationProfileSummary
-> Maybe Text -> ConfigurationProfileSummary)
-> Lens
ConfigurationProfileSummary
ConfigurationProfileSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationProfileSummary' {Maybe Text
locationUri :: Maybe Text
$sel:locationUri:ConfigurationProfileSummary' :: ConfigurationProfileSummary -> Maybe Text
locationUri} -> Maybe Text
locationUri) (\s :: ConfigurationProfileSummary
s@ConfigurationProfileSummary' {} Maybe Text
a -> ConfigurationProfileSummary
s {$sel:locationUri:ConfigurationProfileSummary' :: Maybe Text
locationUri = Maybe Text
a} :: ConfigurationProfileSummary)
configurationProfileSummary_applicationId :: Lens.Lens' ConfigurationProfileSummary (Prelude.Maybe Prelude.Text)
configurationProfileSummary_applicationId :: (Maybe Text -> f (Maybe Text))
-> ConfigurationProfileSummary -> f ConfigurationProfileSummary
configurationProfileSummary_applicationId = (ConfigurationProfileSummary -> Maybe Text)
-> (ConfigurationProfileSummary
-> Maybe Text -> ConfigurationProfileSummary)
-> Lens
ConfigurationProfileSummary
ConfigurationProfileSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationProfileSummary' {Maybe Text
applicationId :: Maybe Text
$sel:applicationId:ConfigurationProfileSummary' :: ConfigurationProfileSummary -> Maybe Text
applicationId} -> Maybe Text
applicationId) (\s :: ConfigurationProfileSummary
s@ConfigurationProfileSummary' {} Maybe Text
a -> ConfigurationProfileSummary
s {$sel:applicationId:ConfigurationProfileSummary' :: Maybe Text
applicationId = Maybe Text
a} :: ConfigurationProfileSummary)
configurationProfileSummary_name :: Lens.Lens' ConfigurationProfileSummary (Prelude.Maybe Prelude.Text)
configurationProfileSummary_name :: (Maybe Text -> f (Maybe Text))
-> ConfigurationProfileSummary -> f ConfigurationProfileSummary
configurationProfileSummary_name = (ConfigurationProfileSummary -> Maybe Text)
-> (ConfigurationProfileSummary
-> Maybe Text -> ConfigurationProfileSummary)
-> Lens
ConfigurationProfileSummary
ConfigurationProfileSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationProfileSummary' {Maybe Text
name :: Maybe Text
$sel:name:ConfigurationProfileSummary' :: ConfigurationProfileSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: ConfigurationProfileSummary
s@ConfigurationProfileSummary' {} Maybe Text
a -> ConfigurationProfileSummary
s {$sel:name:ConfigurationProfileSummary' :: Maybe Text
name = Maybe Text
a} :: ConfigurationProfileSummary)
configurationProfileSummary_id :: Lens.Lens' ConfigurationProfileSummary (Prelude.Maybe Prelude.Text)
configurationProfileSummary_id :: (Maybe Text -> f (Maybe Text))
-> ConfigurationProfileSummary -> f ConfigurationProfileSummary
configurationProfileSummary_id = (ConfigurationProfileSummary -> Maybe Text)
-> (ConfigurationProfileSummary
-> Maybe Text -> ConfigurationProfileSummary)
-> Lens
ConfigurationProfileSummary
ConfigurationProfileSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationProfileSummary' {Maybe Text
id :: Maybe Text
$sel:id:ConfigurationProfileSummary' :: ConfigurationProfileSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: ConfigurationProfileSummary
s@ConfigurationProfileSummary' {} Maybe Text
a -> ConfigurationProfileSummary
s {$sel:id:ConfigurationProfileSummary' :: Maybe Text
id = Maybe Text
a} :: ConfigurationProfileSummary)
configurationProfileSummary_validatorTypes :: Lens.Lens' ConfigurationProfileSummary (Prelude.Maybe [ValidatorType])
configurationProfileSummary_validatorTypes :: (Maybe [ValidatorType] -> f (Maybe [ValidatorType]))
-> ConfigurationProfileSummary -> f ConfigurationProfileSummary
configurationProfileSummary_validatorTypes = (ConfigurationProfileSummary -> Maybe [ValidatorType])
-> (ConfigurationProfileSummary
-> Maybe [ValidatorType] -> ConfigurationProfileSummary)
-> Lens
ConfigurationProfileSummary
ConfigurationProfileSummary
(Maybe [ValidatorType])
(Maybe [ValidatorType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationProfileSummary' {Maybe [ValidatorType]
validatorTypes :: Maybe [ValidatorType]
$sel:validatorTypes:ConfigurationProfileSummary' :: ConfigurationProfileSummary -> Maybe [ValidatorType]
validatorTypes} -> Maybe [ValidatorType]
validatorTypes) (\s :: ConfigurationProfileSummary
s@ConfigurationProfileSummary' {} Maybe [ValidatorType]
a -> ConfigurationProfileSummary
s {$sel:validatorTypes:ConfigurationProfileSummary' :: Maybe [ValidatorType]
validatorTypes = Maybe [ValidatorType]
a} :: ConfigurationProfileSummary) ((Maybe [ValidatorType] -> f (Maybe [ValidatorType]))
-> ConfigurationProfileSummary -> f ConfigurationProfileSummary)
-> ((Maybe [ValidatorType] -> f (Maybe [ValidatorType]))
-> Maybe [ValidatorType] -> f (Maybe [ValidatorType]))
-> (Maybe [ValidatorType] -> f (Maybe [ValidatorType]))
-> ConfigurationProfileSummary
-> f ConfigurationProfileSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ValidatorType] [ValidatorType] [ValidatorType] [ValidatorType]
-> Iso
(Maybe [ValidatorType])
(Maybe [ValidatorType])
(Maybe [ValidatorType])
(Maybe [ValidatorType])
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 AnIso
[ValidatorType] [ValidatorType] [ValidatorType] [ValidatorType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON ConfigurationProfileSummary where
parseJSON :: Value -> Parser ConfigurationProfileSummary
parseJSON =
String
-> (Object -> Parser ConfigurationProfileSummary)
-> Value
-> Parser ConfigurationProfileSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ConfigurationProfileSummary"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ValidatorType]
-> ConfigurationProfileSummary
ConfigurationProfileSummary'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ValidatorType]
-> ConfigurationProfileSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ValidatorType]
-> ConfigurationProfileSummary)
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
"LocationUri")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [ValidatorType]
-> ConfigurationProfileSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe [ValidatorType]
-> ConfigurationProfileSummary)
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
"ApplicationId")
Parser
(Maybe Text
-> Maybe Text
-> Maybe [ValidatorType]
-> ConfigurationProfileSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe [ValidatorType] -> ConfigurationProfileSummary)
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
"Name")
Parser
(Maybe Text
-> Maybe [ValidatorType] -> ConfigurationProfileSummary)
-> Parser (Maybe Text)
-> Parser (Maybe [ValidatorType] -> ConfigurationProfileSummary)
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
"Id")
Parser (Maybe [ValidatorType] -> ConfigurationProfileSummary)
-> Parser (Maybe [ValidatorType])
-> Parser ConfigurationProfileSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [ValidatorType]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ValidatorTypes"
Parser (Maybe (Maybe [ValidatorType]))
-> Maybe [ValidatorType] -> Parser (Maybe [ValidatorType])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ValidatorType]
forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable ConfigurationProfileSummary
instance Prelude.NFData ConfigurationProfileSummary