{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ConfigurationProfile = ConfigurationProfile'
{
ConfigurationProfile -> Maybe Text
applicationId :: Prelude.Maybe Prelude.Text,
ConfigurationProfile -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
ConfigurationProfile -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
ConfigurationProfile -> Maybe Text
locationUri :: Prelude.Maybe Prelude.Text,
ConfigurationProfile -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
ConfigurationProfile -> Maybe Text
retrievalRoleArn :: Prelude.Maybe Prelude.Text,
ConfigurationProfile -> Maybe Text
type' :: Prelude.Maybe Prelude.Text,
ConfigurationProfile -> Maybe [Validator]
validators :: Prelude.Maybe [Validator]
}
deriving (ConfigurationProfile -> ConfigurationProfile -> Bool
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
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. 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'
{ $sel:applicationId:ConfigurationProfile' :: Maybe Text
applicationId =
forall a. Maybe a
Prelude.Nothing,
$sel:description:ConfigurationProfile' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:id:ConfigurationProfile' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:locationUri:ConfigurationProfile' :: Maybe Text
locationUri = forall a. Maybe a
Prelude.Nothing,
$sel:name:ConfigurationProfile' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:retrievalRoleArn:ConfigurationProfile' :: Maybe Text
retrievalRoleArn = forall a. Maybe a
Prelude.Nothing,
$sel:type':ConfigurationProfile' :: Maybe Text
type' = forall a. Maybe a
Prelude.Nothing,
$sel:validators:ConfigurationProfile' :: Maybe [Validator]
validators = forall a. Maybe a
Prelude.Nothing
}
configurationProfile_applicationId :: Lens.Lens' ConfigurationProfile (Prelude.Maybe Prelude.Text)
configurationProfile_applicationId :: Lens' ConfigurationProfile (Maybe Text)
configurationProfile_applicationId = 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_description :: Lens.Lens' ConfigurationProfile (Prelude.Maybe Prelude.Text)
configurationProfile_description :: Lens' ConfigurationProfile (Maybe Text)
configurationProfile_description = 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)
configurationProfile_id :: Lens.Lens' ConfigurationProfile (Prelude.Maybe Prelude.Text)
configurationProfile_id :: Lens' ConfigurationProfile (Maybe Text)
configurationProfile_id = 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_locationUri :: Lens.Lens' ConfigurationProfile (Prelude.Maybe Prelude.Text)
configurationProfile_locationUri :: Lens' ConfigurationProfile (Maybe Text)
configurationProfile_locationUri = 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_name :: Lens.Lens' ConfigurationProfile (Prelude.Maybe Prelude.Text)
configurationProfile_name :: Lens' ConfigurationProfile (Maybe Text)
configurationProfile_name = 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_retrievalRoleArn :: Lens.Lens' ConfigurationProfile (Prelude.Maybe Prelude.Text)
configurationProfile_retrievalRoleArn :: Lens' ConfigurationProfile (Maybe Text)
configurationProfile_retrievalRoleArn = 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_type :: Lens.Lens' ConfigurationProfile (Prelude.Maybe Prelude.Text)
configurationProfile_type :: Lens' ConfigurationProfile (Maybe Text)
configurationProfile_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfigurationProfile' {Maybe Text
type' :: Maybe Text
$sel:type':ConfigurationProfile' :: ConfigurationProfile -> Maybe Text
type'} -> Maybe Text
type') (\s :: ConfigurationProfile
s@ConfigurationProfile' {} Maybe Text
a -> ConfigurationProfile
s {$sel:type':ConfigurationProfile' :: Maybe Text
type' = Maybe Text
a} :: ConfigurationProfile)
configurationProfile_validators :: Lens.Lens' ConfigurationProfile (Prelude.Maybe [Validator])
configurationProfile_validators :: Lens' ConfigurationProfile (Maybe [Validator])
configurationProfile_validators = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON ConfigurationProfile where
parseJSON :: Value -> Parser ConfigurationProfile
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ConfigurationProfile"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Validator]
-> ConfigurationProfile
ConfigurationProfile'
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
"ApplicationId")
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
"Description")
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
"LocationUri")
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
"Name")
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
"RetrievalRoleArn")
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
"Type")
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
"Validators" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable ConfigurationProfile where
hashWithSalt :: Int -> ConfigurationProfile -> Int
hashWithSalt Int
_salt ConfigurationProfile' {Maybe [Validator]
Maybe Text
validators :: Maybe [Validator]
type' :: Maybe Text
retrievalRoleArn :: Maybe Text
name :: Maybe Text
locationUri :: Maybe Text
id :: Maybe Text
description :: Maybe Text
applicationId :: Maybe Text
$sel:validators:ConfigurationProfile' :: ConfigurationProfile -> Maybe [Validator]
$sel:type':ConfigurationProfile' :: ConfigurationProfile -> Maybe Text
$sel:retrievalRoleArn:ConfigurationProfile' :: ConfigurationProfile -> Maybe Text
$sel:name:ConfigurationProfile' :: ConfigurationProfile -> Maybe Text
$sel:locationUri:ConfigurationProfile' :: ConfigurationProfile -> Maybe Text
$sel:id:ConfigurationProfile' :: ConfigurationProfile -> Maybe Text
$sel:description:ConfigurationProfile' :: ConfigurationProfile -> Maybe Text
$sel:applicationId:ConfigurationProfile' :: ConfigurationProfile -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
applicationId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
locationUri
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
retrievalRoleArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
type'
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Validator]
validators
instance Prelude.NFData ConfigurationProfile where
rnf :: ConfigurationProfile -> ()
rnf ConfigurationProfile' {Maybe [Validator]
Maybe Text
validators :: Maybe [Validator]
type' :: Maybe Text
retrievalRoleArn :: Maybe Text
name :: Maybe Text
locationUri :: Maybe Text
id :: Maybe Text
description :: Maybe Text
applicationId :: Maybe Text
$sel:validators:ConfigurationProfile' :: ConfigurationProfile -> Maybe [Validator]
$sel:type':ConfigurationProfile' :: ConfigurationProfile -> Maybe Text
$sel:retrievalRoleArn:ConfigurationProfile' :: ConfigurationProfile -> Maybe Text
$sel:name:ConfigurationProfile' :: ConfigurationProfile -> Maybe Text
$sel:locationUri:ConfigurationProfile' :: ConfigurationProfile -> Maybe Text
$sel:id:ConfigurationProfile' :: ConfigurationProfile -> Maybe Text
$sel:description:ConfigurationProfile' :: ConfigurationProfile -> Maybe Text
$sel:applicationId:ConfigurationProfile' :: ConfigurationProfile -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
applicationId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
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
locationUri
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
retrievalRoleArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
type'
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Validator]
validators