module Stratosphere.DataSync.LocationSMB.MountOptionsProperty (
        MountOptionsProperty(..), mkMountOptionsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data MountOptionsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-locationsmb-mountoptions.html>
    MountOptionsProperty {MountOptionsProperty -> ()
haddock_workaround_ :: (),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datasync-locationsmb-mountoptions.html#cfn-datasync-locationsmb-mountoptions-version>
                          MountOptionsProperty -> Maybe (Value Text)
version :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (MountOptionsProperty -> MountOptionsProperty -> Bool
(MountOptionsProperty -> MountOptionsProperty -> Bool)
-> (MountOptionsProperty -> MountOptionsProperty -> Bool)
-> Eq MountOptionsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MountOptionsProperty -> MountOptionsProperty -> Bool
== :: MountOptionsProperty -> MountOptionsProperty -> Bool
$c/= :: MountOptionsProperty -> MountOptionsProperty -> Bool
/= :: MountOptionsProperty -> MountOptionsProperty -> Bool
Prelude.Eq, Int -> MountOptionsProperty -> ShowS
[MountOptionsProperty] -> ShowS
MountOptionsProperty -> String
(Int -> MountOptionsProperty -> ShowS)
-> (MountOptionsProperty -> String)
-> ([MountOptionsProperty] -> ShowS)
-> Show MountOptionsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MountOptionsProperty -> ShowS
showsPrec :: Int -> MountOptionsProperty -> ShowS
$cshow :: MountOptionsProperty -> String
show :: MountOptionsProperty -> String
$cshowList :: [MountOptionsProperty] -> ShowS
showList :: [MountOptionsProperty] -> ShowS
Prelude.Show)
mkMountOptionsProperty :: MountOptionsProperty
mkMountOptionsProperty :: MountOptionsProperty
mkMountOptionsProperty
  = MountOptionsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), version :: Maybe (Value Text)
version = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties MountOptionsProperty where
  toResourceProperties :: MountOptionsProperty -> ResourceProperties
toResourceProperties MountOptionsProperty {Maybe (Value Text)
()
haddock_workaround_ :: MountOptionsProperty -> ()
version :: MountOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
version :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::DataSync::LocationSMB.MountOptions",
         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 -> 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
"Version" (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)
version])}
instance JSON.ToJSON MountOptionsProperty where
  toJSON :: MountOptionsProperty -> Value
toJSON MountOptionsProperty {Maybe (Value Text)
()
haddock_workaround_ :: MountOptionsProperty -> ()
version :: MountOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
version :: 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 -> 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
"Version" (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)
version]))
instance Property "Version" MountOptionsProperty where
  type PropertyType "Version" MountOptionsProperty = Value Prelude.Text
  set :: PropertyType "Version" MountOptionsProperty
-> MountOptionsProperty -> MountOptionsProperty
set PropertyType "Version" MountOptionsProperty
newValue MountOptionsProperty {Maybe (Value Text)
()
haddock_workaround_ :: MountOptionsProperty -> ()
version :: MountOptionsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
version :: Maybe (Value Text)
..}
    = MountOptionsProperty {version :: Maybe (Value Text)
version = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Version" MountOptionsProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}