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