module Stratosphere.FSx.FileSystem.NfsExportsProperty (
        module Exports, NfsExportsProperty(..), mkNfsExportsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.FSx.FileSystem.ClientConfigurationsProperty as Exports
import Stratosphere.ResourceProperties
data NfsExportsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration-nfsexports.html>
    NfsExportsProperty {NfsExportsProperty -> ()
haddock_workaround_ :: (),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration-nfsexports.html#cfn-fsx-filesystem-openzfsconfiguration-rootvolumeconfiguration-nfsexports-clientconfigurations>
                        NfsExportsProperty -> Maybe [ClientConfigurationsProperty]
clientConfigurations :: (Prelude.Maybe [ClientConfigurationsProperty])}
  deriving stock (NfsExportsProperty -> NfsExportsProperty -> Bool
(NfsExportsProperty -> NfsExportsProperty -> Bool)
-> (NfsExportsProperty -> NfsExportsProperty -> Bool)
-> Eq NfsExportsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: NfsExportsProperty -> NfsExportsProperty -> Bool
== :: NfsExportsProperty -> NfsExportsProperty -> Bool
$c/= :: NfsExportsProperty -> NfsExportsProperty -> Bool
/= :: NfsExportsProperty -> NfsExportsProperty -> Bool
Prelude.Eq, Int -> NfsExportsProperty -> ShowS
[NfsExportsProperty] -> ShowS
NfsExportsProperty -> String
(Int -> NfsExportsProperty -> ShowS)
-> (NfsExportsProperty -> String)
-> ([NfsExportsProperty] -> ShowS)
-> Show NfsExportsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> NfsExportsProperty -> ShowS
showsPrec :: Int -> NfsExportsProperty -> ShowS
$cshow :: NfsExportsProperty -> String
show :: NfsExportsProperty -> String
$cshowList :: [NfsExportsProperty] -> ShowS
showList :: [NfsExportsProperty] -> ShowS
Prelude.Show)
mkNfsExportsProperty :: NfsExportsProperty
mkNfsExportsProperty :: NfsExportsProperty
mkNfsExportsProperty
  = NfsExportsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), clientConfigurations :: Maybe [ClientConfigurationsProperty]
clientConfigurations = Maybe [ClientConfigurationsProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties NfsExportsProperty where
  toResourceProperties :: NfsExportsProperty -> ResourceProperties
toResourceProperties NfsExportsProperty {Maybe [ClientConfigurationsProperty]
()
haddock_workaround_ :: NfsExportsProperty -> ()
clientConfigurations :: NfsExportsProperty -> Maybe [ClientConfigurationsProperty]
haddock_workaround_ :: ()
clientConfigurations :: Maybe [ClientConfigurationsProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::FSx::FileSystem.NfsExports",
         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 -> [ClientConfigurationsProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ClientConfigurations"
                              ([ClientConfigurationsProperty] -> (Key, Value))
-> Maybe [ClientConfigurationsProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ClientConfigurationsProperty]
clientConfigurations])}
instance JSON.ToJSON NfsExportsProperty where
  toJSON :: NfsExportsProperty -> Value
toJSON NfsExportsProperty {Maybe [ClientConfigurationsProperty]
()
haddock_workaround_ :: NfsExportsProperty -> ()
clientConfigurations :: NfsExportsProperty -> Maybe [ClientConfigurationsProperty]
haddock_workaround_ :: ()
clientConfigurations :: Maybe [ClientConfigurationsProperty]
..}
    = [(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 -> [ClientConfigurationsProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ClientConfigurations"
                 ([ClientConfigurationsProperty] -> (Key, Value))
-> Maybe [ClientConfigurationsProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ClientConfigurationsProperty]
clientConfigurations]))
instance Property "ClientConfigurations" NfsExportsProperty where
  type PropertyType "ClientConfigurations" NfsExportsProperty = [ClientConfigurationsProperty]
  set :: PropertyType "ClientConfigurations" NfsExportsProperty
-> NfsExportsProperty -> NfsExportsProperty
set PropertyType "ClientConfigurations" NfsExportsProperty
newValue NfsExportsProperty {Maybe [ClientConfigurationsProperty]
()
haddock_workaround_ :: NfsExportsProperty -> ()
clientConfigurations :: NfsExportsProperty -> Maybe [ClientConfigurationsProperty]
haddock_workaround_ :: ()
clientConfigurations :: Maybe [ClientConfigurationsProperty]
..}
    = NfsExportsProperty
        {clientConfigurations :: Maybe [ClientConfigurationsProperty]
clientConfigurations = [ClientConfigurationsProperty]
-> Maybe [ClientConfigurationsProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [ClientConfigurationsProperty]
PropertyType "ClientConfigurations" NfsExportsProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}