module Stratosphere.ACMPCA.CertificateAuthority.AccessMethodProperty (
        AccessMethodProperty(..), mkAccessMethodProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AccessMethodProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-acmpca-certificateauthority-accessmethod.html>
    AccessMethodProperty {AccessMethodProperty -> ()
haddock_workaround_ :: (),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-acmpca-certificateauthority-accessmethod.html#cfn-acmpca-certificateauthority-accessmethod-accessmethodtype>
                          AccessMethodProperty -> Maybe (Value Text)
accessMethodType :: (Prelude.Maybe (Value Prelude.Text)),
                          -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-acmpca-certificateauthority-accessmethod.html#cfn-acmpca-certificateauthority-accessmethod-customobjectidentifier>
                          AccessMethodProperty -> Maybe (Value Text)
customObjectIdentifier :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (AccessMethodProperty -> AccessMethodProperty -> Bool
(AccessMethodProperty -> AccessMethodProperty -> Bool)
-> (AccessMethodProperty -> AccessMethodProperty -> Bool)
-> Eq AccessMethodProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccessMethodProperty -> AccessMethodProperty -> Bool
== :: AccessMethodProperty -> AccessMethodProperty -> Bool
$c/= :: AccessMethodProperty -> AccessMethodProperty -> Bool
/= :: AccessMethodProperty -> AccessMethodProperty -> Bool
Prelude.Eq, Int -> AccessMethodProperty -> ShowS
[AccessMethodProperty] -> ShowS
AccessMethodProperty -> String
(Int -> AccessMethodProperty -> ShowS)
-> (AccessMethodProperty -> String)
-> ([AccessMethodProperty] -> ShowS)
-> Show AccessMethodProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccessMethodProperty -> ShowS
showsPrec :: Int -> AccessMethodProperty -> ShowS
$cshow :: AccessMethodProperty -> String
show :: AccessMethodProperty -> String
$cshowList :: [AccessMethodProperty] -> ShowS
showList :: [AccessMethodProperty] -> ShowS
Prelude.Show)
mkAccessMethodProperty :: AccessMethodProperty
mkAccessMethodProperty :: AccessMethodProperty
mkAccessMethodProperty
  = AccessMethodProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), accessMethodType :: Maybe (Value Text)
accessMethodType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       customObjectIdentifier :: Maybe (Value Text)
customObjectIdentifier = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AccessMethodProperty where
  toResourceProperties :: AccessMethodProperty -> ResourceProperties
toResourceProperties AccessMethodProperty {Maybe (Value Text)
()
haddock_workaround_ :: AccessMethodProperty -> ()
accessMethodType :: AccessMethodProperty -> Maybe (Value Text)
customObjectIdentifier :: AccessMethodProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
accessMethodType :: Maybe (Value Text)
customObjectIdentifier :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ACMPCA::CertificateAuthority.AccessMethod",
         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
"AccessMethodType" (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)
accessMethodType,
                            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
"CustomObjectIdentifier"
                              (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)
customObjectIdentifier])}
instance JSON.ToJSON AccessMethodProperty where
  toJSON :: AccessMethodProperty -> Value
toJSON AccessMethodProperty {Maybe (Value Text)
()
haddock_workaround_ :: AccessMethodProperty -> ()
accessMethodType :: AccessMethodProperty -> Maybe (Value Text)
customObjectIdentifier :: AccessMethodProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
accessMethodType :: Maybe (Value Text)
customObjectIdentifier :: 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
"AccessMethodType" (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)
accessMethodType,
               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
"CustomObjectIdentifier"
                 (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)
customObjectIdentifier]))
instance Property "AccessMethodType" AccessMethodProperty where
  type PropertyType "AccessMethodType" AccessMethodProperty = Value Prelude.Text
  set :: PropertyType "AccessMethodType" AccessMethodProperty
-> AccessMethodProperty -> AccessMethodProperty
set PropertyType "AccessMethodType" AccessMethodProperty
newValue AccessMethodProperty {Maybe (Value Text)
()
haddock_workaround_ :: AccessMethodProperty -> ()
accessMethodType :: AccessMethodProperty -> Maybe (Value Text)
customObjectIdentifier :: AccessMethodProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
accessMethodType :: Maybe (Value Text)
customObjectIdentifier :: Maybe (Value Text)
..}
    = AccessMethodProperty
        {accessMethodType :: Maybe (Value Text)
accessMethodType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AccessMethodType" AccessMethodProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
customObjectIdentifier :: Maybe (Value Text)
haddock_workaround_ :: ()
customObjectIdentifier :: Maybe (Value Text)
..}
instance Property "CustomObjectIdentifier" AccessMethodProperty where
  type PropertyType "CustomObjectIdentifier" AccessMethodProperty = Value Prelude.Text
  set :: PropertyType "CustomObjectIdentifier" AccessMethodProperty
-> AccessMethodProperty -> AccessMethodProperty
set PropertyType "CustomObjectIdentifier" AccessMethodProperty
newValue AccessMethodProperty {Maybe (Value Text)
()
haddock_workaround_ :: AccessMethodProperty -> ()
accessMethodType :: AccessMethodProperty -> Maybe (Value Text)
customObjectIdentifier :: AccessMethodProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
accessMethodType :: Maybe (Value Text)
customObjectIdentifier :: Maybe (Value Text)
..}
    = AccessMethodProperty
        {customObjectIdentifier :: Maybe (Value Text)
customObjectIdentifier = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CustomObjectIdentifier" AccessMethodProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
accessMethodType :: Maybe (Value Text)
haddock_workaround_ :: ()
accessMethodType :: Maybe (Value Text)
..}