module Stratosphere.Transfer.Profile (
        Profile(..), mkProfile
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Profile
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-profile.html>
    Profile {Profile -> ()
haddock_workaround_ :: (),
             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-profile.html#cfn-transfer-profile-as2id>
             Profile -> Value Text
as2Id :: (Value Prelude.Text),
             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-profile.html#cfn-transfer-profile-certificateids>
             Profile -> Maybe (ValueList Text)
certificateIds :: (Prelude.Maybe (ValueList Prelude.Text)),
             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-profile.html#cfn-transfer-profile-profiletype>
             Profile -> Value Text
profileType :: (Value Prelude.Text),
             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-transfer-profile.html#cfn-transfer-profile-tags>
             Profile -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (Profile -> Profile -> Bool
(Profile -> Profile -> Bool)
-> (Profile -> Profile -> Bool) -> Eq Profile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Profile -> Profile -> Bool
== :: Profile -> Profile -> Bool
$c/= :: Profile -> Profile -> Bool
/= :: Profile -> Profile -> Bool
Prelude.Eq, Int -> Profile -> ShowS
[Profile] -> ShowS
Profile -> String
(Int -> Profile -> ShowS)
-> (Profile -> String) -> ([Profile] -> ShowS) -> Show Profile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Profile -> ShowS
showsPrec :: Int -> Profile -> ShowS
$cshow :: Profile -> String
show :: Profile -> String
$cshowList :: [Profile] -> ShowS
showList :: [Profile] -> ShowS
Prelude.Show)
mkProfile :: Value Prelude.Text -> Value Prelude.Text -> Profile
mkProfile :: Value Text -> Value Text -> Profile
mkProfile Value Text
as2Id Value Text
profileType
  = Profile
      {haddock_workaround_ :: ()
haddock_workaround_ = (), as2Id :: Value Text
as2Id = Value Text
as2Id,
       profileType :: Value Text
profileType = Value Text
profileType, certificateIds :: Maybe (ValueList Text)
certificateIds = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
       tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Profile where
  toResourceProperties :: Profile -> ResourceProperties
toResourceProperties Profile {Maybe [Tag]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: Profile -> ()
as2Id :: Profile -> Value Text
certificateIds :: Profile -> Maybe (ValueList Text)
profileType :: Profile -> Value Text
tags :: Profile -> Maybe [Tag]
haddock_workaround_ :: ()
as2Id :: Value Text
certificateIds :: Maybe (ValueList Text)
profileType :: Value Text
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Transfer::Profile", supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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
"As2Id" 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
as2Id, Key
"ProfileType" 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
profileType]
                           ([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
"CertificateIds" (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)
certificateIds,
                               Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON Profile where
  toJSON :: Profile -> Value
toJSON Profile {Maybe [Tag]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: Profile -> ()
as2Id :: Profile -> Value Text
certificateIds :: Profile -> Maybe (ValueList Text)
profileType :: Profile -> Value Text
tags :: Profile -> Maybe [Tag]
haddock_workaround_ :: ()
as2Id :: Value Text
certificateIds :: Maybe (ValueList Text)
profileType :: Value Text
tags :: Maybe [Tag]
..}
    = [(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
"As2Id" 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
as2Id, Key
"ProfileType" 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
profileType]
              ([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
"CertificateIds" (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)
certificateIds,
                  Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "As2Id" Profile where
  type PropertyType "As2Id" Profile = Value Prelude.Text
  set :: PropertyType "As2Id" Profile -> Profile -> Profile
set PropertyType "As2Id" Profile
newValue Profile {Maybe [Tag]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: Profile -> ()
as2Id :: Profile -> Value Text
certificateIds :: Profile -> Maybe (ValueList Text)
profileType :: Profile -> Value Text
tags :: Profile -> Maybe [Tag]
haddock_workaround_ :: ()
as2Id :: Value Text
certificateIds :: Maybe (ValueList Text)
profileType :: Value Text
tags :: Maybe [Tag]
..} = Profile {as2Id :: Value Text
as2Id = PropertyType "As2Id" Profile
Value Text
newValue, Maybe [Tag]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
certificateIds :: Maybe (ValueList Text)
profileType :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
certificateIds :: Maybe (ValueList Text)
profileType :: Value Text
tags :: Maybe [Tag]
..}
instance Property "CertificateIds" Profile where
  type PropertyType "CertificateIds" Profile = ValueList Prelude.Text
  set :: PropertyType "CertificateIds" Profile -> Profile -> Profile
set PropertyType "CertificateIds" Profile
newValue Profile {Maybe [Tag]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: Profile -> ()
as2Id :: Profile -> Value Text
certificateIds :: Profile -> Maybe (ValueList Text)
profileType :: Profile -> Value Text
tags :: Profile -> Maybe [Tag]
haddock_workaround_ :: ()
as2Id :: Value Text
certificateIds :: Maybe (ValueList Text)
profileType :: Value Text
tags :: Maybe [Tag]
..}
    = Profile {certificateIds :: Maybe (ValueList Text)
certificateIds = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CertificateIds" Profile
ValueList Text
newValue, Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
as2Id :: Value Text
profileType :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
as2Id :: Value Text
profileType :: Value Text
tags :: Maybe [Tag]
..}
instance Property "ProfileType" Profile where
  type PropertyType "ProfileType" Profile = Value Prelude.Text
  set :: PropertyType "ProfileType" Profile -> Profile -> Profile
set PropertyType "ProfileType" Profile
newValue Profile {Maybe [Tag]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: Profile -> ()
as2Id :: Profile -> Value Text
certificateIds :: Profile -> Maybe (ValueList Text)
profileType :: Profile -> Value Text
tags :: Profile -> Maybe [Tag]
haddock_workaround_ :: ()
as2Id :: Value Text
certificateIds :: Maybe (ValueList Text)
profileType :: Value Text
tags :: Maybe [Tag]
..} = Profile {profileType :: Value Text
profileType = PropertyType "ProfileType" Profile
Value Text
newValue, Maybe [Tag]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
as2Id :: Value Text
certificateIds :: Maybe (ValueList Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
as2Id :: Value Text
certificateIds :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}
instance Property "Tags" Profile where
  type PropertyType "Tags" Profile = [Tag]
  set :: PropertyType "Tags" Profile -> Profile -> Profile
set PropertyType "Tags" Profile
newValue Profile {Maybe [Tag]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: Profile -> ()
as2Id :: Profile -> Value Text
certificateIds :: Profile -> Maybe (ValueList Text)
profileType :: Profile -> Value Text
tags :: Profile -> Maybe [Tag]
haddock_workaround_ :: ()
as2Id :: Value Text
certificateIds :: Maybe (ValueList Text)
profileType :: Value Text
tags :: Maybe [Tag]
..}
    = Profile {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" Profile
newValue, Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
as2Id :: Value Text
certificateIds :: Maybe (ValueList Text)
profileType :: Value Text
haddock_workaround_ :: ()
as2Id :: Value Text
certificateIds :: Maybe (ValueList Text)
profileType :: Value Text
..}