{-# 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.ConfigurationProfile where
import Amazonka.AppConfig.Types.Validator
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ConfigurationProfile = ConfigurationProfile'
{
ConfigurationProfile -> Maybe Text
retrievalRoleArn :: Prelude.Maybe Prelude.Text,
ConfigurationProfile -> Maybe [Validator]
validators :: Prelude.Maybe [Validator],
ConfigurationProfile -> Maybe Text
locationUri :: Prelude.Maybe Prelude.Text,
ConfigurationProfile -> Maybe Text
applicationId :: Prelude.Maybe Prelude.Text,
ConfigurationProfile -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
ConfigurationProfile -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
ConfigurationProfile -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (ConfigurationProfile -> ConfigurationProfile -> Bool
(ConfigurationProfile -> ConfigurationProfile -> Bool)
-> (ConfigurationProfile -> ConfigurationProfile -> Bool)
-> Eq ConfigurationProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConfigurationProfile -> ConfigurationProfile -> Bool
$c/= :: ConfigurationProfile -> ConfigurationProfile -> Bool
== :: ConfigurationProfile -> ConfigurationProfile -> Bool
$c== :: ConfigurationProfile -> ConfigurationProfile -> Bool
Prelude.Eq, Int -> ConfigurationProfile -> ShowS
[ConfigurationProfile] -> ShowS
ConfigurationProfile -> String
(Int -> ConfigurationProfile -> ShowS)
-> (ConfigurationProfile -> String)
-> ([ConfigurationProfile] -> ShowS)
-> Show ConfigurationProfile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConfigurationProfile] -> ShowS
$cshowList :: [ConfigurationProfile] -> ShowS
show :: ConfigurationProfile -> String
$cshow :: ConfigurationProfile -> String
showsPrec :: Int -> ConfigurationProfile -> ShowS
$cshowsPrec :: Int -> ConfigurationProfile -> ShowS
Prelude.Show, (forall x. ConfigurationProfile -> Rep ConfigurationProfile x)
-> (forall x. Rep ConfigurationProfile x -> ConfigurationProfile)
-> Generic ConfigurationProfile
forall x. Rep ConfigurationProfile x -> ConfigurationProfile
forall x. ConfigurationProfile -> Rep ConfigurationProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ConfigurationProfile x -> ConfigurationProfile
$cfrom :: forall x. ConfigurationProfile -> Rep ConfigurationProfile x
Prelude.Generic)
newConfigurationProfile ::
ConfigurationProfile
newConfigurationProfile :: ConfigurationProfile
newConfigurationProfile =
ConfigurationProfile' :: Maybe Text
-> Maybe [Validator]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ConfigurationProfile
ConfigurationProfile'
{ $sel:retrievalRoleArn:ConfigurationProfile' :: Maybe Text
retrievalRoleArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:validators:ConfigurationProfile' :: Maybe [Validator]
validators = Maybe [Validator]
forall a. Maybe a
Prelude.Nothing,
$sel:locationUri:ConfigurationProfile' :: Maybe Text
locationUri = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:applicationId:ConfigurationProfile' :: Maybe Text
applicationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:ConfigurationProfile' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:ConfigurationProfile' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:ConfigurationProfile' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
configurationProfile_retrievalRoleArn :: Lens.Lens' ConfigurationProfile (Prelude.Maybe Prelude.Text)
configurationProfile_retrievalRoleArn :: (Maybe Text -> f (Maybe Text))
-> ConfigurationProfile -> f ConfigurationProfile
configurationProfile_retrievalRoleArn = (ConfigurationProfile -> Maybe Text)
-> (ConfigurationProfile -> Maybe Text -> ConfigurationProfile)
-> Lens
ConfigurationProfile ConfigurationProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationProfile' {Maybe Text
retrievalRoleArn :: Maybe Text
$sel:retrievalRoleArn:ConfigurationProfile' :: ConfigurationProfile -> Maybe Text
retrievalRoleArn} -> Maybe Text
retrievalRoleArn) (\s :: ConfigurationProfile
s@ConfigurationProfile' {} Maybe Text
a -> ConfigurationProfile
s {$sel:retrievalRoleArn:ConfigurationProfile' :: Maybe Text
retrievalRoleArn = Maybe Text
a} :: ConfigurationProfile)
configurationProfile_validators :: Lens.Lens' ConfigurationProfile (Prelude.Maybe [Validator])
configurationProfile_validators :: (Maybe [Validator] -> f (Maybe [Validator]))
-> ConfigurationProfile -> f ConfigurationProfile
configurationProfile_validators = (ConfigurationProfile -> Maybe [Validator])
-> (ConfigurationProfile
-> Maybe [Validator] -> ConfigurationProfile)
-> Lens
ConfigurationProfile
ConfigurationProfile
(Maybe [Validator])
(Maybe [Validator])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationProfile' {Maybe [Validator]
validators :: Maybe [Validator]
$sel:validators:ConfigurationProfile' :: ConfigurationProfile -> Maybe [Validator]
validators} -> Maybe [Validator]
validators) (\s :: ConfigurationProfile
s@ConfigurationProfile' {} Maybe [Validator]
a -> ConfigurationProfile
s {$sel:validators:ConfigurationProfile' :: Maybe [Validator]
validators = Maybe [Validator]
a} :: ConfigurationProfile) ((Maybe [Validator] -> f (Maybe [Validator]))
-> ConfigurationProfile -> f ConfigurationProfile)
-> ((Maybe [Validator] -> f (Maybe [Validator]))
-> Maybe [Validator] -> f (Maybe [Validator]))
-> (Maybe [Validator] -> f (Maybe [Validator]))
-> ConfigurationProfile
-> f ConfigurationProfile
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Validator] [Validator] [Validator] [Validator]
-> Iso
(Maybe [Validator])
(Maybe [Validator])
(Maybe [Validator])
(Maybe [Validator])
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 [Validator] [Validator] [Validator] [Validator]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
configurationProfile_locationUri :: Lens.Lens' ConfigurationProfile (Prelude.Maybe Prelude.Text)
configurationProfile_locationUri :: (Maybe Text -> f (Maybe Text))
-> ConfigurationProfile -> f ConfigurationProfile
configurationProfile_locationUri = (ConfigurationProfile -> Maybe Text)
-> (ConfigurationProfile -> Maybe Text -> ConfigurationProfile)
-> Lens
ConfigurationProfile ConfigurationProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationProfile' {Maybe Text
locationUri :: Maybe Text
$sel:locationUri:ConfigurationProfile' :: ConfigurationProfile -> Maybe Text
locationUri} -> Maybe Text
locationUri) (\s :: ConfigurationProfile
s@ConfigurationProfile' {} Maybe Text
a -> ConfigurationProfile
s {$sel:locationUri:ConfigurationProfile' :: Maybe Text
locationUri = Maybe Text
a} :: ConfigurationProfile)
configurationProfile_applicationId :: Lens.Lens' ConfigurationProfile (Prelude.Maybe Prelude.Text)
configurationProfile_applicationId :: (Maybe Text -> f (Maybe Text))
-> ConfigurationProfile -> f ConfigurationProfile
configurationProfile_applicationId = (ConfigurationProfile -> Maybe Text)
-> (ConfigurationProfile -> Maybe Text -> ConfigurationProfile)
-> Lens
ConfigurationProfile ConfigurationProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationProfile' {Maybe Text
applicationId :: Maybe Text
$sel:applicationId:ConfigurationProfile' :: ConfigurationProfile -> Maybe Text
applicationId} -> Maybe Text
applicationId) (\s :: ConfigurationProfile
s@ConfigurationProfile' {} Maybe Text
a -> ConfigurationProfile
s {$sel:applicationId:ConfigurationProfile' :: Maybe Text
applicationId = Maybe Text
a} :: ConfigurationProfile)
configurationProfile_name :: Lens.Lens' ConfigurationProfile (Prelude.Maybe Prelude.Text)
configurationProfile_name :: (Maybe Text -> f (Maybe Text))
-> ConfigurationProfile -> f ConfigurationProfile
configurationProfile_name = (ConfigurationProfile -> Maybe Text)
-> (ConfigurationProfile -> Maybe Text -> ConfigurationProfile)
-> Lens
ConfigurationProfile ConfigurationProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationProfile' {Maybe Text
name :: Maybe Text
$sel:name:ConfigurationProfile' :: ConfigurationProfile -> Maybe Text
name} -> Maybe Text
name) (\s :: ConfigurationProfile
s@ConfigurationProfile' {} Maybe Text
a -> ConfigurationProfile
s {$sel:name:ConfigurationProfile' :: Maybe Text
name = Maybe Text
a} :: ConfigurationProfile)
configurationProfile_id :: Lens.Lens' ConfigurationProfile (Prelude.Maybe Prelude.Text)
configurationProfile_id :: (Maybe Text -> f (Maybe Text))
-> ConfigurationProfile -> f ConfigurationProfile
configurationProfile_id = (ConfigurationProfile -> Maybe Text)
-> (ConfigurationProfile -> Maybe Text -> ConfigurationProfile)
-> Lens
ConfigurationProfile ConfigurationProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationProfile' {Maybe Text
id :: Maybe Text
$sel:id:ConfigurationProfile' :: ConfigurationProfile -> Maybe Text
id} -> Maybe Text
id) (\s :: ConfigurationProfile
s@ConfigurationProfile' {} Maybe Text
a -> ConfigurationProfile
s {$sel:id:ConfigurationProfile' :: Maybe Text
id = Maybe Text
a} :: ConfigurationProfile)
configurationProfile_description :: Lens.Lens' ConfigurationProfile (Prelude.Maybe Prelude.Text)
configurationProfile_description :: (Maybe Text -> f (Maybe Text))
-> ConfigurationProfile -> f ConfigurationProfile
configurationProfile_description = (ConfigurationProfile -> Maybe Text)
-> (ConfigurationProfile -> Maybe Text -> ConfigurationProfile)
-> Lens
ConfigurationProfile ConfigurationProfile (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationProfile' {Maybe Text
description :: Maybe Text
$sel:description:ConfigurationProfile' :: ConfigurationProfile -> Maybe Text
description} -> Maybe Text
description) (\s :: ConfigurationProfile
s@ConfigurationProfile' {} Maybe Text
a -> ConfigurationProfile
s {$sel:description:ConfigurationProfile' :: Maybe Text
description = Maybe Text
a} :: ConfigurationProfile)
instance Core.FromJSON ConfigurationProfile where
parseJSON :: Value -> Parser ConfigurationProfile
parseJSON =
String
-> (Object -> Parser ConfigurationProfile)
-> Value
-> Parser ConfigurationProfile
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ConfigurationProfile"
( \Object
x ->
Maybe Text
-> Maybe [Validator]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ConfigurationProfile
ConfigurationProfile'
(Maybe Text
-> Maybe [Validator]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ConfigurationProfile)
-> Parser (Maybe Text)
-> Parser
(Maybe [Validator]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ConfigurationProfile)
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
"RetrievalRoleArn")
Parser
(Maybe [Validator]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ConfigurationProfile)
-> Parser (Maybe [Validator])
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ConfigurationProfile)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Validator]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Validators" Parser (Maybe (Maybe [Validator]))
-> Maybe [Validator] -> Parser (Maybe [Validator])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Validator]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ConfigurationProfile)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> ConfigurationProfile)
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
"LocationUri")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> ConfigurationProfile)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> ConfigurationProfile)
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 Text -> ConfigurationProfile)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> ConfigurationProfile)
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 Text -> ConfigurationProfile)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> ConfigurationProfile)
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 Text -> ConfigurationProfile)
-> Parser (Maybe Text) -> Parser ConfigurationProfile
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
"Description")
)
instance Prelude.Hashable ConfigurationProfile
instance Prelude.NFData ConfigurationProfile