module Stratosphere.Connect.PredefinedAttribute (
        module Exports, PredefinedAttribute(..), mkPredefinedAttribute
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Connect.PredefinedAttribute.AttributeConfigurationProperty as Exports
import {-# SOURCE #-} Stratosphere.Connect.PredefinedAttribute.ValuesProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PredefinedAttribute
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-predefinedattribute.html>
    PredefinedAttribute {PredefinedAttribute -> ()
haddock_workaround_ :: (),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-predefinedattribute.html#cfn-connect-predefinedattribute-attributeconfiguration>
                         PredefinedAttribute -> Maybe AttributeConfigurationProperty
attributeConfiguration :: (Prelude.Maybe AttributeConfigurationProperty),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-predefinedattribute.html#cfn-connect-predefinedattribute-instancearn>
                         PredefinedAttribute -> Value Text
instanceArn :: (Value Prelude.Text),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-predefinedattribute.html#cfn-connect-predefinedattribute-name>
                         PredefinedAttribute -> Value Text
name :: (Value Prelude.Text),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-predefinedattribute.html#cfn-connect-predefinedattribute-purposes>
                         PredefinedAttribute -> Maybe (ValueList Text)
purposes :: (Prelude.Maybe (ValueList Prelude.Text)),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-connect-predefinedattribute.html#cfn-connect-predefinedattribute-values>
                         PredefinedAttribute -> Maybe ValuesProperty
values :: (Prelude.Maybe ValuesProperty)}
  deriving stock (PredefinedAttribute -> PredefinedAttribute -> Bool
(PredefinedAttribute -> PredefinedAttribute -> Bool)
-> (PredefinedAttribute -> PredefinedAttribute -> Bool)
-> Eq PredefinedAttribute
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PredefinedAttribute -> PredefinedAttribute -> Bool
== :: PredefinedAttribute -> PredefinedAttribute -> Bool
$c/= :: PredefinedAttribute -> PredefinedAttribute -> Bool
/= :: PredefinedAttribute -> PredefinedAttribute -> Bool
Prelude.Eq, Int -> PredefinedAttribute -> ShowS
[PredefinedAttribute] -> ShowS
PredefinedAttribute -> String
(Int -> PredefinedAttribute -> ShowS)
-> (PredefinedAttribute -> String)
-> ([PredefinedAttribute] -> ShowS)
-> Show PredefinedAttribute
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PredefinedAttribute -> ShowS
showsPrec :: Int -> PredefinedAttribute -> ShowS
$cshow :: PredefinedAttribute -> String
show :: PredefinedAttribute -> String
$cshowList :: [PredefinedAttribute] -> ShowS
showList :: [PredefinedAttribute] -> ShowS
Prelude.Show)
mkPredefinedAttribute ::
  Value Prelude.Text -> Value Prelude.Text -> PredefinedAttribute
mkPredefinedAttribute :: Value Text -> Value Text -> PredefinedAttribute
mkPredefinedAttribute Value Text
instanceArn Value Text
name
  = PredefinedAttribute
      {haddock_workaround_ :: ()
haddock_workaround_ = (), instanceArn :: Value Text
instanceArn = Value Text
instanceArn, name :: Value Text
name = Value Text
name,
       attributeConfiguration :: Maybe AttributeConfigurationProperty
attributeConfiguration = Maybe AttributeConfigurationProperty
forall a. Maybe a
Prelude.Nothing,
       purposes :: Maybe (ValueList Text)
purposes = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing, values :: Maybe ValuesProperty
values = Maybe ValuesProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PredefinedAttribute where
  toResourceProperties :: PredefinedAttribute -> ResourceProperties
toResourceProperties PredefinedAttribute {Maybe (ValueList Text)
Maybe AttributeConfigurationProperty
Maybe ValuesProperty
()
Value Text
haddock_workaround_ :: PredefinedAttribute -> ()
attributeConfiguration :: PredefinedAttribute -> Maybe AttributeConfigurationProperty
instanceArn :: PredefinedAttribute -> Value Text
name :: PredefinedAttribute -> Value Text
purposes :: PredefinedAttribute -> Maybe (ValueList Text)
values :: PredefinedAttribute -> Maybe ValuesProperty
haddock_workaround_ :: ()
attributeConfiguration :: Maybe AttributeConfigurationProperty
instanceArn :: Value Text
name :: Value Text
purposes :: Maybe (ValueList Text)
values :: Maybe ValuesProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Connect::PredefinedAttribute",
         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
"InstanceArn" 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
instanceArn, 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 -> AttributeConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AttributeConfiguration"
                                 (AttributeConfigurationProperty -> (Key, Value))
-> Maybe AttributeConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AttributeConfigurationProperty
attributeConfiguration,
                               Key -> ValueList 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
"Purposes" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
purposes,
                               Key -> ValuesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Values" (ValuesProperty -> (Key, Value))
-> Maybe ValuesProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ValuesProperty
values]))}
instance JSON.ToJSON PredefinedAttribute where
  toJSON :: PredefinedAttribute -> Value
toJSON PredefinedAttribute {Maybe (ValueList Text)
Maybe AttributeConfigurationProperty
Maybe ValuesProperty
()
Value Text
haddock_workaround_ :: PredefinedAttribute -> ()
attributeConfiguration :: PredefinedAttribute -> Maybe AttributeConfigurationProperty
instanceArn :: PredefinedAttribute -> Value Text
name :: PredefinedAttribute -> Value Text
purposes :: PredefinedAttribute -> Maybe (ValueList Text)
values :: PredefinedAttribute -> Maybe ValuesProperty
haddock_workaround_ :: ()
attributeConfiguration :: Maybe AttributeConfigurationProperty
instanceArn :: Value Text
name :: Value Text
purposes :: Maybe (ValueList Text)
values :: Maybe ValuesProperty
..}
    = [(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
"InstanceArn" 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
instanceArn, 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 -> AttributeConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AttributeConfiguration"
                    (AttributeConfigurationProperty -> (Key, Value))
-> Maybe AttributeConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AttributeConfigurationProperty
attributeConfiguration,
                  Key -> ValueList 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
"Purposes" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
purposes,
                  Key -> ValuesProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Values" (ValuesProperty -> (Key, Value))
-> Maybe ValuesProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ValuesProperty
values])))
instance Property "AttributeConfiguration" PredefinedAttribute where
  type PropertyType "AttributeConfiguration" PredefinedAttribute = AttributeConfigurationProperty
  set :: PropertyType "AttributeConfiguration" PredefinedAttribute
-> PredefinedAttribute -> PredefinedAttribute
set PropertyType "AttributeConfiguration" PredefinedAttribute
newValue PredefinedAttribute {Maybe (ValueList Text)
Maybe AttributeConfigurationProperty
Maybe ValuesProperty
()
Value Text
haddock_workaround_ :: PredefinedAttribute -> ()
attributeConfiguration :: PredefinedAttribute -> Maybe AttributeConfigurationProperty
instanceArn :: PredefinedAttribute -> Value Text
name :: PredefinedAttribute -> Value Text
purposes :: PredefinedAttribute -> Maybe (ValueList Text)
values :: PredefinedAttribute -> Maybe ValuesProperty
haddock_workaround_ :: ()
attributeConfiguration :: Maybe AttributeConfigurationProperty
instanceArn :: Value Text
name :: Value Text
purposes :: Maybe (ValueList Text)
values :: Maybe ValuesProperty
..}
    = PredefinedAttribute
        {attributeConfiguration :: Maybe AttributeConfigurationProperty
attributeConfiguration = AttributeConfigurationProperty
-> Maybe AttributeConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AttributeConfiguration" PredefinedAttribute
AttributeConfigurationProperty
newValue, Maybe (ValueList Text)
Maybe ValuesProperty
()
Value Text
haddock_workaround_ :: ()
instanceArn :: Value Text
name :: Value Text
purposes :: Maybe (ValueList Text)
values :: Maybe ValuesProperty
haddock_workaround_ :: ()
instanceArn :: Value Text
name :: Value Text
purposes :: Maybe (ValueList Text)
values :: Maybe ValuesProperty
..}
instance Property "InstanceArn" PredefinedAttribute where
  type PropertyType "InstanceArn" PredefinedAttribute = Value Prelude.Text
  set :: PropertyType "InstanceArn" PredefinedAttribute
-> PredefinedAttribute -> PredefinedAttribute
set PropertyType "InstanceArn" PredefinedAttribute
newValue PredefinedAttribute {Maybe (ValueList Text)
Maybe AttributeConfigurationProperty
Maybe ValuesProperty
()
Value Text
haddock_workaround_ :: PredefinedAttribute -> ()
attributeConfiguration :: PredefinedAttribute -> Maybe AttributeConfigurationProperty
instanceArn :: PredefinedAttribute -> Value Text
name :: PredefinedAttribute -> Value Text
purposes :: PredefinedAttribute -> Maybe (ValueList Text)
values :: PredefinedAttribute -> Maybe ValuesProperty
haddock_workaround_ :: ()
attributeConfiguration :: Maybe AttributeConfigurationProperty
instanceArn :: Value Text
name :: Value Text
purposes :: Maybe (ValueList Text)
values :: Maybe ValuesProperty
..}
    = PredefinedAttribute {instanceArn :: Value Text
instanceArn = PropertyType "InstanceArn" PredefinedAttribute
Value Text
newValue, Maybe (ValueList Text)
Maybe AttributeConfigurationProperty
Maybe ValuesProperty
()
Value Text
haddock_workaround_ :: ()
attributeConfiguration :: Maybe AttributeConfigurationProperty
name :: Value Text
purposes :: Maybe (ValueList Text)
values :: Maybe ValuesProperty
haddock_workaround_ :: ()
attributeConfiguration :: Maybe AttributeConfigurationProperty
name :: Value Text
purposes :: Maybe (ValueList Text)
values :: Maybe ValuesProperty
..}
instance Property "Name" PredefinedAttribute where
  type PropertyType "Name" PredefinedAttribute = Value Prelude.Text
  set :: PropertyType "Name" PredefinedAttribute
-> PredefinedAttribute -> PredefinedAttribute
set PropertyType "Name" PredefinedAttribute
newValue PredefinedAttribute {Maybe (ValueList Text)
Maybe AttributeConfigurationProperty
Maybe ValuesProperty
()
Value Text
haddock_workaround_ :: PredefinedAttribute -> ()
attributeConfiguration :: PredefinedAttribute -> Maybe AttributeConfigurationProperty
instanceArn :: PredefinedAttribute -> Value Text
name :: PredefinedAttribute -> Value Text
purposes :: PredefinedAttribute -> Maybe (ValueList Text)
values :: PredefinedAttribute -> Maybe ValuesProperty
haddock_workaround_ :: ()
attributeConfiguration :: Maybe AttributeConfigurationProperty
instanceArn :: Value Text
name :: Value Text
purposes :: Maybe (ValueList Text)
values :: Maybe ValuesProperty
..}
    = PredefinedAttribute {name :: Value Text
name = PropertyType "Name" PredefinedAttribute
Value Text
newValue, Maybe (ValueList Text)
Maybe AttributeConfigurationProperty
Maybe ValuesProperty
()
Value Text
haddock_workaround_ :: ()
attributeConfiguration :: Maybe AttributeConfigurationProperty
instanceArn :: Value Text
purposes :: Maybe (ValueList Text)
values :: Maybe ValuesProperty
haddock_workaround_ :: ()
attributeConfiguration :: Maybe AttributeConfigurationProperty
instanceArn :: Value Text
purposes :: Maybe (ValueList Text)
values :: Maybe ValuesProperty
..}
instance Property "Purposes" PredefinedAttribute where
  type PropertyType "Purposes" PredefinedAttribute = ValueList Prelude.Text
  set :: PropertyType "Purposes" PredefinedAttribute
-> PredefinedAttribute -> PredefinedAttribute
set PropertyType "Purposes" PredefinedAttribute
newValue PredefinedAttribute {Maybe (ValueList Text)
Maybe AttributeConfigurationProperty
Maybe ValuesProperty
()
Value Text
haddock_workaround_ :: PredefinedAttribute -> ()
attributeConfiguration :: PredefinedAttribute -> Maybe AttributeConfigurationProperty
instanceArn :: PredefinedAttribute -> Value Text
name :: PredefinedAttribute -> Value Text
purposes :: PredefinedAttribute -> Maybe (ValueList Text)
values :: PredefinedAttribute -> Maybe ValuesProperty
haddock_workaround_ :: ()
attributeConfiguration :: Maybe AttributeConfigurationProperty
instanceArn :: Value Text
name :: Value Text
purposes :: Maybe (ValueList Text)
values :: Maybe ValuesProperty
..}
    = PredefinedAttribute {purposes :: Maybe (ValueList Text)
purposes = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Purposes" PredefinedAttribute
ValueList Text
newValue, Maybe AttributeConfigurationProperty
Maybe ValuesProperty
()
Value Text
haddock_workaround_ :: ()
attributeConfiguration :: Maybe AttributeConfigurationProperty
instanceArn :: Value Text
name :: Value Text
values :: Maybe ValuesProperty
haddock_workaround_ :: ()
attributeConfiguration :: Maybe AttributeConfigurationProperty
instanceArn :: Value Text
name :: Value Text
values :: Maybe ValuesProperty
..}
instance Property "Values" PredefinedAttribute where
  type PropertyType "Values" PredefinedAttribute = ValuesProperty
  set :: PropertyType "Values" PredefinedAttribute
-> PredefinedAttribute -> PredefinedAttribute
set PropertyType "Values" PredefinedAttribute
newValue PredefinedAttribute {Maybe (ValueList Text)
Maybe AttributeConfigurationProperty
Maybe ValuesProperty
()
Value Text
haddock_workaround_ :: PredefinedAttribute -> ()
attributeConfiguration :: PredefinedAttribute -> Maybe AttributeConfigurationProperty
instanceArn :: PredefinedAttribute -> Value Text
name :: PredefinedAttribute -> Value Text
purposes :: PredefinedAttribute -> Maybe (ValueList Text)
values :: PredefinedAttribute -> Maybe ValuesProperty
haddock_workaround_ :: ()
attributeConfiguration :: Maybe AttributeConfigurationProperty
instanceArn :: Value Text
name :: Value Text
purposes :: Maybe (ValueList Text)
values :: Maybe ValuesProperty
..}
    = PredefinedAttribute {values :: Maybe ValuesProperty
values = ValuesProperty -> Maybe ValuesProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Values" PredefinedAttribute
ValuesProperty
newValue, Maybe (ValueList Text)
Maybe AttributeConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
attributeConfiguration :: Maybe AttributeConfigurationProperty
instanceArn :: Value Text
name :: Value Text
purposes :: Maybe (ValueList Text)
haddock_workaround_ :: ()
attributeConfiguration :: Maybe AttributeConfigurationProperty
instanceArn :: Value Text
name :: Value Text
purposes :: Maybe (ValueList Text)
..}