module Stratosphere.ServiceCatalog.PortfolioShare (
        PortfolioShare(..), mkPortfolioShare
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PortfolioShare
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-portfolioshare.html>
    PortfolioShare {PortfolioShare -> ()
haddock_workaround_ :: (),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-portfolioshare.html#cfn-servicecatalog-portfolioshare-acceptlanguage>
                    PortfolioShare -> Maybe (Value Text)
acceptLanguage :: (Prelude.Maybe (Value Prelude.Text)),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-portfolioshare.html#cfn-servicecatalog-portfolioshare-accountid>
                    PortfolioShare -> Value Text
accountId :: (Value Prelude.Text),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-portfolioshare.html#cfn-servicecatalog-portfolioshare-portfolioid>
                    PortfolioShare -> Value Text
portfolioId :: (Value Prelude.Text),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-portfolioshare.html#cfn-servicecatalog-portfolioshare-sharetagoptions>
                    PortfolioShare -> Maybe (Value Bool)
shareTagOptions :: (Prelude.Maybe (Value Prelude.Bool))}
  deriving stock (PortfolioShare -> PortfolioShare -> Bool
(PortfolioShare -> PortfolioShare -> Bool)
-> (PortfolioShare -> PortfolioShare -> Bool) -> Eq PortfolioShare
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PortfolioShare -> PortfolioShare -> Bool
== :: PortfolioShare -> PortfolioShare -> Bool
$c/= :: PortfolioShare -> PortfolioShare -> Bool
/= :: PortfolioShare -> PortfolioShare -> Bool
Prelude.Eq, Int -> PortfolioShare -> ShowS
[PortfolioShare] -> ShowS
PortfolioShare -> String
(Int -> PortfolioShare -> ShowS)
-> (PortfolioShare -> String)
-> ([PortfolioShare] -> ShowS)
-> Show PortfolioShare
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PortfolioShare -> ShowS
showsPrec :: Int -> PortfolioShare -> ShowS
$cshow :: PortfolioShare -> String
show :: PortfolioShare -> String
$cshowList :: [PortfolioShare] -> ShowS
showList :: [PortfolioShare] -> ShowS
Prelude.Show)
mkPortfolioShare ::
  Value Prelude.Text -> Value Prelude.Text -> PortfolioShare
mkPortfolioShare :: Value Text -> Value Text -> PortfolioShare
mkPortfolioShare Value Text
accountId Value Text
portfolioId
  = PortfolioShare
      {haddock_workaround_ :: ()
haddock_workaround_ = (), accountId :: Value Text
accountId = Value Text
accountId,
       portfolioId :: Value Text
portfolioId = Value Text
portfolioId, acceptLanguage :: Maybe (Value Text)
acceptLanguage = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       shareTagOptions :: Maybe (Value Bool)
shareTagOptions = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PortfolioShare where
  toResourceProperties :: PortfolioShare -> ResourceProperties
toResourceProperties PortfolioShare {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PortfolioShare -> ()
acceptLanguage :: PortfolioShare -> Maybe (Value Text)
accountId :: PortfolioShare -> Value Text
portfolioId :: PortfolioShare -> Value Text
shareTagOptions :: PortfolioShare -> Maybe (Value Bool)
haddock_workaround_ :: ()
acceptLanguage :: Maybe (Value Text)
accountId :: Value Text
portfolioId :: Value Text
shareTagOptions :: Maybe (Value Bool)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ServiceCatalog::PortfolioShare",
         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
"AccountId" 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
accountId, Key
"PortfolioId" 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
portfolioId]
                           ([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
"AcceptLanguage" (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)
acceptLanguage,
                               Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ShareTagOptions" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
shareTagOptions]))}
instance JSON.ToJSON PortfolioShare where
  toJSON :: PortfolioShare -> Value
toJSON PortfolioShare {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PortfolioShare -> ()
acceptLanguage :: PortfolioShare -> Maybe (Value Text)
accountId :: PortfolioShare -> Value Text
portfolioId :: PortfolioShare -> Value Text
shareTagOptions :: PortfolioShare -> Maybe (Value Bool)
haddock_workaround_ :: ()
acceptLanguage :: Maybe (Value Text)
accountId :: Value Text
portfolioId :: Value Text
shareTagOptions :: Maybe (Value Bool)
..}
    = [(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
"AccountId" 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
accountId, Key
"PortfolioId" 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
portfolioId]
              ([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
"AcceptLanguage" (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)
acceptLanguage,
                  Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ShareTagOptions" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
shareTagOptions])))
instance Property "AcceptLanguage" PortfolioShare where
  type PropertyType "AcceptLanguage" PortfolioShare = Value Prelude.Text
  set :: PropertyType "AcceptLanguage" PortfolioShare
-> PortfolioShare -> PortfolioShare
set PropertyType "AcceptLanguage" PortfolioShare
newValue PortfolioShare {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PortfolioShare -> ()
acceptLanguage :: PortfolioShare -> Maybe (Value Text)
accountId :: PortfolioShare -> Value Text
portfolioId :: PortfolioShare -> Value Text
shareTagOptions :: PortfolioShare -> Maybe (Value Bool)
haddock_workaround_ :: ()
acceptLanguage :: Maybe (Value Text)
accountId :: Value Text
portfolioId :: Value Text
shareTagOptions :: Maybe (Value Bool)
..}
    = PortfolioShare {acceptLanguage :: Maybe (Value Text)
acceptLanguage = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AcceptLanguage" PortfolioShare
Value Text
newValue, Maybe (Value Bool)
()
Value Text
haddock_workaround_ :: ()
accountId :: Value Text
portfolioId :: Value Text
shareTagOptions :: Maybe (Value Bool)
haddock_workaround_ :: ()
accountId :: Value Text
portfolioId :: Value Text
shareTagOptions :: Maybe (Value Bool)
..}
instance Property "AccountId" PortfolioShare where
  type PropertyType "AccountId" PortfolioShare = Value Prelude.Text
  set :: PropertyType "AccountId" PortfolioShare
-> PortfolioShare -> PortfolioShare
set PropertyType "AccountId" PortfolioShare
newValue PortfolioShare {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PortfolioShare -> ()
acceptLanguage :: PortfolioShare -> Maybe (Value Text)
accountId :: PortfolioShare -> Value Text
portfolioId :: PortfolioShare -> Value Text
shareTagOptions :: PortfolioShare -> Maybe (Value Bool)
haddock_workaround_ :: ()
acceptLanguage :: Maybe (Value Text)
accountId :: Value Text
portfolioId :: Value Text
shareTagOptions :: Maybe (Value Bool)
..}
    = PortfolioShare {accountId :: Value Text
accountId = PropertyType "AccountId" PortfolioShare
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
acceptLanguage :: Maybe (Value Text)
portfolioId :: Value Text
shareTagOptions :: Maybe (Value Bool)
haddock_workaround_ :: ()
acceptLanguage :: Maybe (Value Text)
portfolioId :: Value Text
shareTagOptions :: Maybe (Value Bool)
..}
instance Property "PortfolioId" PortfolioShare where
  type PropertyType "PortfolioId" PortfolioShare = Value Prelude.Text
  set :: PropertyType "PortfolioId" PortfolioShare
-> PortfolioShare -> PortfolioShare
set PropertyType "PortfolioId" PortfolioShare
newValue PortfolioShare {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PortfolioShare -> ()
acceptLanguage :: PortfolioShare -> Maybe (Value Text)
accountId :: PortfolioShare -> Value Text
portfolioId :: PortfolioShare -> Value Text
shareTagOptions :: PortfolioShare -> Maybe (Value Bool)
haddock_workaround_ :: ()
acceptLanguage :: Maybe (Value Text)
accountId :: Value Text
portfolioId :: Value Text
shareTagOptions :: Maybe (Value Bool)
..}
    = PortfolioShare {portfolioId :: Value Text
portfolioId = PropertyType "PortfolioId" PortfolioShare
Value Text
newValue, Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
acceptLanguage :: Maybe (Value Text)
accountId :: Value Text
shareTagOptions :: Maybe (Value Bool)
haddock_workaround_ :: ()
acceptLanguage :: Maybe (Value Text)
accountId :: Value Text
shareTagOptions :: Maybe (Value Bool)
..}
instance Property "ShareTagOptions" PortfolioShare where
  type PropertyType "ShareTagOptions" PortfolioShare = Value Prelude.Bool
  set :: PropertyType "ShareTagOptions" PortfolioShare
-> PortfolioShare -> PortfolioShare
set PropertyType "ShareTagOptions" PortfolioShare
newValue PortfolioShare {Maybe (Value Bool)
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: PortfolioShare -> ()
acceptLanguage :: PortfolioShare -> Maybe (Value Text)
accountId :: PortfolioShare -> Value Text
portfolioId :: PortfolioShare -> Value Text
shareTagOptions :: PortfolioShare -> Maybe (Value Bool)
haddock_workaround_ :: ()
acceptLanguage :: Maybe (Value Text)
accountId :: Value Text
portfolioId :: Value Text
shareTagOptions :: Maybe (Value Bool)
..}
    = PortfolioShare {shareTagOptions :: Maybe (Value Bool)
shareTagOptions = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ShareTagOptions" PortfolioShare
Value Bool
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
acceptLanguage :: Maybe (Value Text)
accountId :: Value Text
portfolioId :: Value Text
haddock_workaround_ :: ()
acceptLanguage :: Maybe (Value Text)
accountId :: Value Text
portfolioId :: Value Text
..}