module Stratosphere.Cognito.IdentityPool.PushSyncProperty (
        PushSyncProperty(..), mkPushSyncProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PushSyncProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-identitypool-pushsync.html>
    PushSyncProperty {PushSyncProperty -> ()
haddock_workaround_ :: (),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-identitypool-pushsync.html#cfn-cognito-identitypool-pushsync-applicationarns>
                      PushSyncProperty -> Maybe (ValueList Text)
applicationArns :: (Prelude.Maybe (ValueList Prelude.Text)),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-identitypool-pushsync.html#cfn-cognito-identitypool-pushsync-rolearn>
                      PushSyncProperty -> Maybe (Value Text)
roleArn :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (PushSyncProperty -> PushSyncProperty -> Bool
(PushSyncProperty -> PushSyncProperty -> Bool)
-> (PushSyncProperty -> PushSyncProperty -> Bool)
-> Eq PushSyncProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PushSyncProperty -> PushSyncProperty -> Bool
== :: PushSyncProperty -> PushSyncProperty -> Bool
$c/= :: PushSyncProperty -> PushSyncProperty -> Bool
/= :: PushSyncProperty -> PushSyncProperty -> Bool
Prelude.Eq, Int -> PushSyncProperty -> ShowS
[PushSyncProperty] -> ShowS
PushSyncProperty -> String
(Int -> PushSyncProperty -> ShowS)
-> (PushSyncProperty -> String)
-> ([PushSyncProperty] -> ShowS)
-> Show PushSyncProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PushSyncProperty -> ShowS
showsPrec :: Int -> PushSyncProperty -> ShowS
$cshow :: PushSyncProperty -> String
show :: PushSyncProperty -> String
$cshowList :: [PushSyncProperty] -> ShowS
showList :: [PushSyncProperty] -> ShowS
Prelude.Show)
mkPushSyncProperty :: PushSyncProperty
mkPushSyncProperty :: PushSyncProperty
mkPushSyncProperty
  = PushSyncProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), applicationArns :: Maybe (ValueList Text)
applicationArns = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
       roleArn :: Maybe (Value Text)
roleArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PushSyncProperty where
  toResourceProperties :: PushSyncProperty -> ResourceProperties
toResourceProperties PushSyncProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: PushSyncProperty -> ()
applicationArns :: PushSyncProperty -> Maybe (ValueList Text)
roleArn :: PushSyncProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
applicationArns :: Maybe (ValueList Text)
roleArn :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Cognito::IdentityPool.PushSync",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                           [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
"ApplicationArns" (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)
applicationArns,
                            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
"RoleArn" (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)
roleArn])}
instance JSON.ToJSON PushSyncProperty where
  toJSON :: PushSyncProperty -> Value
toJSON PushSyncProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: PushSyncProperty -> ()
applicationArns :: PushSyncProperty -> Maybe (ValueList Text)
roleArn :: PushSyncProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
applicationArns :: Maybe (ValueList Text)
roleArn :: Maybe (Value Text)
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
              [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
"ApplicationArns" (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)
applicationArns,
               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
"RoleArn" (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)
roleArn]))
instance Property "ApplicationArns" PushSyncProperty where
  type PropertyType "ApplicationArns" PushSyncProperty = ValueList Prelude.Text
  set :: PropertyType "ApplicationArns" PushSyncProperty
-> PushSyncProperty -> PushSyncProperty
set PropertyType "ApplicationArns" PushSyncProperty
newValue PushSyncProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: PushSyncProperty -> ()
applicationArns :: PushSyncProperty -> Maybe (ValueList Text)
roleArn :: PushSyncProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
applicationArns :: Maybe (ValueList Text)
roleArn :: Maybe (Value Text)
..}
    = PushSyncProperty {applicationArns :: Maybe (ValueList Text)
applicationArns = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ApplicationArns" PushSyncProperty
ValueList Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
roleArn :: Maybe (Value Text)
haddock_workaround_ :: ()
roleArn :: Maybe (Value Text)
..}
instance Property "RoleArn" PushSyncProperty where
  type PropertyType "RoleArn" PushSyncProperty = Value Prelude.Text
  set :: PropertyType "RoleArn" PushSyncProperty
-> PushSyncProperty -> PushSyncProperty
set PropertyType "RoleArn" PushSyncProperty
newValue PushSyncProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: PushSyncProperty -> ()
applicationArns :: PushSyncProperty -> Maybe (ValueList Text)
roleArn :: PushSyncProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
applicationArns :: Maybe (ValueList Text)
roleArn :: Maybe (Value Text)
..}
    = PushSyncProperty {roleArn :: Maybe (Value Text)
roleArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RoleArn" PushSyncProperty
Value Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
applicationArns :: Maybe (ValueList Text)
haddock_workaround_ :: ()
applicationArns :: Maybe (ValueList Text)
..}