module Stratosphere.EFS.AccessPoint.PosixUserProperty (
        PosixUserProperty(..), mkPosixUserProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PosixUserProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-efs-accesspoint-posixuser.html>
    PosixUserProperty {PosixUserProperty -> ()
haddock_workaround_ :: (),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-efs-accesspoint-posixuser.html#cfn-efs-accesspoint-posixuser-gid>
                       PosixUserProperty -> Value Text
gid :: (Value Prelude.Text),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-efs-accesspoint-posixuser.html#cfn-efs-accesspoint-posixuser-secondarygids>
                       PosixUserProperty -> Maybe (ValueList Text)
secondaryGids :: (Prelude.Maybe (ValueList Prelude.Text)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-efs-accesspoint-posixuser.html#cfn-efs-accesspoint-posixuser-uid>
                       PosixUserProperty -> Value Text
uid :: (Value Prelude.Text)}
  deriving stock (PosixUserProperty -> PosixUserProperty -> Bool
(PosixUserProperty -> PosixUserProperty -> Bool)
-> (PosixUserProperty -> PosixUserProperty -> Bool)
-> Eq PosixUserProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PosixUserProperty -> PosixUserProperty -> Bool
== :: PosixUserProperty -> PosixUserProperty -> Bool
$c/= :: PosixUserProperty -> PosixUserProperty -> Bool
/= :: PosixUserProperty -> PosixUserProperty -> Bool
Prelude.Eq, Int -> PosixUserProperty -> ShowS
[PosixUserProperty] -> ShowS
PosixUserProperty -> String
(Int -> PosixUserProperty -> ShowS)
-> (PosixUserProperty -> String)
-> ([PosixUserProperty] -> ShowS)
-> Show PosixUserProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PosixUserProperty -> ShowS
showsPrec :: Int -> PosixUserProperty -> ShowS
$cshow :: PosixUserProperty -> String
show :: PosixUserProperty -> String
$cshowList :: [PosixUserProperty] -> ShowS
showList :: [PosixUserProperty] -> ShowS
Prelude.Show)
mkPosixUserProperty ::
  Value Prelude.Text -> Value Prelude.Text -> PosixUserProperty
mkPosixUserProperty :: Value Text -> Value Text -> PosixUserProperty
mkPosixUserProperty Value Text
gid Value Text
uid
  = PosixUserProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), gid :: Value Text
gid = Value Text
gid, uid :: Value Text
uid = Value Text
uid,
       secondaryGids :: Maybe (ValueList Text)
secondaryGids = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PosixUserProperty where
  toResourceProperties :: PosixUserProperty -> ResourceProperties
toResourceProperties PosixUserProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: PosixUserProperty -> ()
gid :: PosixUserProperty -> Value Text
secondaryGids :: PosixUserProperty -> Maybe (ValueList Text)
uid :: PosixUserProperty -> Value Text
haddock_workaround_ :: ()
gid :: Value Text
secondaryGids :: Maybe (ValueList Text)
uid :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EFS::AccessPoint.PosixUser",
         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
"Gid" 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
gid, Key
"Uid" 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
uid]
                           ([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
"SecondaryGids" (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)
secondaryGids]))}
instance JSON.ToJSON PosixUserProperty where
  toJSON :: PosixUserProperty -> Value
toJSON PosixUserProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: PosixUserProperty -> ()
gid :: PosixUserProperty -> Value Text
secondaryGids :: PosixUserProperty -> Maybe (ValueList Text)
uid :: PosixUserProperty -> Value Text
haddock_workaround_ :: ()
gid :: Value Text
secondaryGids :: Maybe (ValueList Text)
uid :: 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
"Gid" 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
gid, Key
"Uid" 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
uid]
              ([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
"SecondaryGids" (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)
secondaryGids])))
instance Property "Gid" PosixUserProperty where
  type PropertyType "Gid" PosixUserProperty = Value Prelude.Text
  set :: PropertyType "Gid" PosixUserProperty
-> PosixUserProperty -> PosixUserProperty
set PropertyType "Gid" PosixUserProperty
newValue PosixUserProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: PosixUserProperty -> ()
gid :: PosixUserProperty -> Value Text
secondaryGids :: PosixUserProperty -> Maybe (ValueList Text)
uid :: PosixUserProperty -> Value Text
haddock_workaround_ :: ()
gid :: Value Text
secondaryGids :: Maybe (ValueList Text)
uid :: Value Text
..}
    = PosixUserProperty {gid :: Value Text
gid = PropertyType "Gid" PosixUserProperty
Value Text
newValue, Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
secondaryGids :: Maybe (ValueList Text)
uid :: Value Text
haddock_workaround_ :: ()
secondaryGids :: Maybe (ValueList Text)
uid :: Value Text
..}
instance Property "SecondaryGids" PosixUserProperty where
  type PropertyType "SecondaryGids" PosixUserProperty = ValueList Prelude.Text
  set :: PropertyType "SecondaryGids" PosixUserProperty
-> PosixUserProperty -> PosixUserProperty
set PropertyType "SecondaryGids" PosixUserProperty
newValue PosixUserProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: PosixUserProperty -> ()
gid :: PosixUserProperty -> Value Text
secondaryGids :: PosixUserProperty -> Maybe (ValueList Text)
uid :: PosixUserProperty -> Value Text
haddock_workaround_ :: ()
gid :: Value Text
secondaryGids :: Maybe (ValueList Text)
uid :: Value Text
..}
    = PosixUserProperty {secondaryGids :: Maybe (ValueList Text)
secondaryGids = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SecondaryGids" PosixUserProperty
ValueList Text
newValue, ()
Value Text
haddock_workaround_ :: ()
gid :: Value Text
uid :: Value Text
haddock_workaround_ :: ()
gid :: Value Text
uid :: Value Text
..}
instance Property "Uid" PosixUserProperty where
  type PropertyType "Uid" PosixUserProperty = Value Prelude.Text
  set :: PropertyType "Uid" PosixUserProperty
-> PosixUserProperty -> PosixUserProperty
set PropertyType "Uid" PosixUserProperty
newValue PosixUserProperty {Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: PosixUserProperty -> ()
gid :: PosixUserProperty -> Value Text
secondaryGids :: PosixUserProperty -> Maybe (ValueList Text)
uid :: PosixUserProperty -> Value Text
haddock_workaround_ :: ()
gid :: Value Text
secondaryGids :: Maybe (ValueList Text)
uid :: Value Text
..}
    = PosixUserProperty {uid :: Value Text
uid = PropertyType "Uid" PosixUserProperty
Value Text
newValue, Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
gid :: Value Text
secondaryGids :: Maybe (ValueList Text)
haddock_workaround_ :: ()
gid :: Value Text
secondaryGids :: Maybe (ValueList Text)
..}