module Stratosphere.Connect.UserHierarchyStructure.LevelTwoProperty (
        LevelTwoProperty(..), mkLevelTwoProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LevelTwoProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-userhierarchystructure-leveltwo.html>
    LevelTwoProperty {LevelTwoProperty -> ()
haddock_workaround_ :: (),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-userhierarchystructure-leveltwo.html#cfn-connect-userhierarchystructure-leveltwo-hierarchylevelarn>
                      LevelTwoProperty -> Maybe (Value Text)
hierarchyLevelArn :: (Prelude.Maybe (Value Prelude.Text)),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-userhierarchystructure-leveltwo.html#cfn-connect-userhierarchystructure-leveltwo-hierarchylevelid>
                      LevelTwoProperty -> Maybe (Value Text)
hierarchyLevelId :: (Prelude.Maybe (Value Prelude.Text)),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-connect-userhierarchystructure-leveltwo.html#cfn-connect-userhierarchystructure-leveltwo-name>
                      LevelTwoProperty -> Value Text
name :: (Value Prelude.Text)}
  deriving stock (LevelTwoProperty -> LevelTwoProperty -> Bool
(LevelTwoProperty -> LevelTwoProperty -> Bool)
-> (LevelTwoProperty -> LevelTwoProperty -> Bool)
-> Eq LevelTwoProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LevelTwoProperty -> LevelTwoProperty -> Bool
== :: LevelTwoProperty -> LevelTwoProperty -> Bool
$c/= :: LevelTwoProperty -> LevelTwoProperty -> Bool
/= :: LevelTwoProperty -> LevelTwoProperty -> Bool
Prelude.Eq, Int -> LevelTwoProperty -> ShowS
[LevelTwoProperty] -> ShowS
LevelTwoProperty -> String
(Int -> LevelTwoProperty -> ShowS)
-> (LevelTwoProperty -> String)
-> ([LevelTwoProperty] -> ShowS)
-> Show LevelTwoProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LevelTwoProperty -> ShowS
showsPrec :: Int -> LevelTwoProperty -> ShowS
$cshow :: LevelTwoProperty -> String
show :: LevelTwoProperty -> String
$cshowList :: [LevelTwoProperty] -> ShowS
showList :: [LevelTwoProperty] -> ShowS
Prelude.Show)
mkLevelTwoProperty :: Value Prelude.Text -> LevelTwoProperty
mkLevelTwoProperty :: Value Text -> LevelTwoProperty
mkLevelTwoProperty Value Text
name
  = LevelTwoProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name,
       hierarchyLevelArn :: Maybe (Value Text)
hierarchyLevelArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       hierarchyLevelId :: Maybe (Value Text)
hierarchyLevelId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LevelTwoProperty where
  toResourceProperties :: LevelTwoProperty -> ResourceProperties
toResourceProperties LevelTwoProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: LevelTwoProperty -> ()
hierarchyLevelArn :: LevelTwoProperty -> Maybe (Value Text)
hierarchyLevelId :: LevelTwoProperty -> Maybe (Value Text)
name :: LevelTwoProperty -> Value Text
haddock_workaround_ :: ()
hierarchyLevelArn :: Maybe (Value Text)
hierarchyLevelId :: Maybe (Value Text)
name :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Connect::UserHierarchyStructure.LevelTwo",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"Name" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
name]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"HierarchyLevelArn" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
hierarchyLevelArn,
                               Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"HierarchyLevelId" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
hierarchyLevelId]))}
instance JSON.ToJSON LevelTwoProperty where
  toJSON :: LevelTwoProperty -> Value
toJSON LevelTwoProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: LevelTwoProperty -> ()
hierarchyLevelArn :: LevelTwoProperty -> Maybe (Value Text)
hierarchyLevelId :: LevelTwoProperty -> Maybe (Value Text)
name :: LevelTwoProperty -> Value Text
haddock_workaround_ :: ()
hierarchyLevelArn :: Maybe (Value Text)
hierarchyLevelId :: Maybe (Value Text)
name :: Value Text
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"Name" Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Text
name]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"HierarchyLevelArn" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
hierarchyLevelArn,
                  Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"HierarchyLevelId" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
hierarchyLevelId])))
instance Property "HierarchyLevelArn" LevelTwoProperty where
  type PropertyType "HierarchyLevelArn" LevelTwoProperty = Value Prelude.Text
  set :: PropertyType "HierarchyLevelArn" LevelTwoProperty
-> LevelTwoProperty -> LevelTwoProperty
set PropertyType "HierarchyLevelArn" LevelTwoProperty
newValue LevelTwoProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: LevelTwoProperty -> ()
hierarchyLevelArn :: LevelTwoProperty -> Maybe (Value Text)
hierarchyLevelId :: LevelTwoProperty -> Maybe (Value Text)
name :: LevelTwoProperty -> Value Text
haddock_workaround_ :: ()
hierarchyLevelArn :: Maybe (Value Text)
hierarchyLevelId :: Maybe (Value Text)
name :: Value Text
..}
    = LevelTwoProperty {hierarchyLevelArn :: Maybe (Value Text)
hierarchyLevelArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "HierarchyLevelArn" LevelTwoProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
hierarchyLevelId :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
hierarchyLevelId :: Maybe (Value Text)
name :: Value Text
..}
instance Property "HierarchyLevelId" LevelTwoProperty where
  type PropertyType "HierarchyLevelId" LevelTwoProperty = Value Prelude.Text
  set :: PropertyType "HierarchyLevelId" LevelTwoProperty
-> LevelTwoProperty -> LevelTwoProperty
set PropertyType "HierarchyLevelId" LevelTwoProperty
newValue LevelTwoProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: LevelTwoProperty -> ()
hierarchyLevelArn :: LevelTwoProperty -> Maybe (Value Text)
hierarchyLevelId :: LevelTwoProperty -> Maybe (Value Text)
name :: LevelTwoProperty -> Value Text
haddock_workaround_ :: ()
hierarchyLevelArn :: Maybe (Value Text)
hierarchyLevelId :: Maybe (Value Text)
name :: Value Text
..}
    = LevelTwoProperty {hierarchyLevelId :: Maybe (Value Text)
hierarchyLevelId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "HierarchyLevelId" LevelTwoProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
hierarchyLevelArn :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
hierarchyLevelArn :: Maybe (Value Text)
name :: Value Text
..}
instance Property "Name" LevelTwoProperty where
  type PropertyType "Name" LevelTwoProperty = Value Prelude.Text
  set :: PropertyType "Name" LevelTwoProperty
-> LevelTwoProperty -> LevelTwoProperty
set PropertyType "Name" LevelTwoProperty
newValue LevelTwoProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: LevelTwoProperty -> ()
hierarchyLevelArn :: LevelTwoProperty -> Maybe (Value Text)
hierarchyLevelId :: LevelTwoProperty -> Maybe (Value Text)
name :: LevelTwoProperty -> Value Text
haddock_workaround_ :: ()
hierarchyLevelArn :: Maybe (Value Text)
hierarchyLevelId :: Maybe (Value Text)
name :: Value Text
..}
    = LevelTwoProperty {name :: Value Text
name = PropertyType "Name" LevelTwoProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
hierarchyLevelArn :: Maybe (Value Text)
hierarchyLevelId :: Maybe (Value Text)
haddock_workaround_ :: ()
hierarchyLevelArn :: Maybe (Value Text)
hierarchyLevelId :: Maybe (Value Text)
..}