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