module Stratosphere.S3ObjectLambda.AccessPoint.AliasProperty (
        AliasProperty(..), mkAliasProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AliasProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3objectlambda-accesspoint-alias.html>
    AliasProperty {AliasProperty -> ()
haddock_workaround_ :: (),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3objectlambda-accesspoint-alias.html#cfn-s3objectlambda-accesspoint-alias-status>
                   AliasProperty -> Maybe (Value Text)
status :: (Prelude.Maybe (Value Prelude.Text)),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3objectlambda-accesspoint-alias.html#cfn-s3objectlambda-accesspoint-alias-value>
                   AliasProperty -> Value Text
value :: (Value Prelude.Text)}
  deriving stock (AliasProperty -> AliasProperty -> Bool
(AliasProperty -> AliasProperty -> Bool)
-> (AliasProperty -> AliasProperty -> Bool) -> Eq AliasProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AliasProperty -> AliasProperty -> Bool
== :: AliasProperty -> AliasProperty -> Bool
$c/= :: AliasProperty -> AliasProperty -> Bool
/= :: AliasProperty -> AliasProperty -> Bool
Prelude.Eq, Int -> AliasProperty -> ShowS
[AliasProperty] -> ShowS
AliasProperty -> String
(Int -> AliasProperty -> ShowS)
-> (AliasProperty -> String)
-> ([AliasProperty] -> ShowS)
-> Show AliasProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AliasProperty -> ShowS
showsPrec :: Int -> AliasProperty -> ShowS
$cshow :: AliasProperty -> String
show :: AliasProperty -> String
$cshowList :: [AliasProperty] -> ShowS
showList :: [AliasProperty] -> ShowS
Prelude.Show)
mkAliasProperty :: Value Prelude.Text -> AliasProperty
mkAliasProperty :: Value Text -> AliasProperty
mkAliasProperty Value Text
value
  = AliasProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), value :: Value Text
value = Value Text
value, status :: Maybe (Value Text)
status = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AliasProperty where
  toResourceProperties :: AliasProperty -> ResourceProperties
toResourceProperties AliasProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AliasProperty -> ()
status :: AliasProperty -> Maybe (Value Text)
value :: AliasProperty -> Value Text
haddock_workaround_ :: ()
status :: Maybe (Value Text)
value :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::S3ObjectLambda::AccessPoint.Alias",
         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
"Value" 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
value]
                           ([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
"Status" (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)
status]))}
instance JSON.ToJSON AliasProperty where
  toJSON :: AliasProperty -> Value
toJSON AliasProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AliasProperty -> ()
status :: AliasProperty -> Maybe (Value Text)
value :: AliasProperty -> Value Text
haddock_workaround_ :: ()
status :: Maybe (Value Text)
value :: Value Text
..}
    = [(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
"Value" 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
value]
              ([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
"Status" (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)
status])))
instance Property "Status" AliasProperty where
  type PropertyType "Status" AliasProperty = Value Prelude.Text
  set :: PropertyType "Status" AliasProperty
-> AliasProperty -> AliasProperty
set PropertyType "Status" AliasProperty
newValue AliasProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AliasProperty -> ()
status :: AliasProperty -> Maybe (Value Text)
value :: AliasProperty -> Value Text
haddock_workaround_ :: ()
status :: Maybe (Value Text)
value :: Value Text
..}
    = AliasProperty {status :: Maybe (Value Text)
status = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Status" AliasProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
value :: Value Text
haddock_workaround_ :: ()
value :: Value Text
..}
instance Property "Value" AliasProperty where
  type PropertyType "Value" AliasProperty = Value Prelude.Text
  set :: PropertyType "Value" AliasProperty
-> AliasProperty -> AliasProperty
set PropertyType "Value" AliasProperty
newValue AliasProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: AliasProperty -> ()
status :: AliasProperty -> Maybe (Value Text)
value :: AliasProperty -> Value Text
haddock_workaround_ :: ()
status :: Maybe (Value Text)
value :: Value Text
..}
    = AliasProperty {value :: Value Text
value = PropertyType "Value" AliasProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
status :: Maybe (Value Text)
haddock_workaround_ :: ()
status :: Maybe (Value Text)
..}