module Stratosphere.S3ObjectLambda.AccessPoint (
        module Exports, AccessPoint(..), mkAccessPoint
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.S3ObjectLambda.AccessPoint.ObjectLambdaConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AccessPoint
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3objectlambda-accesspoint.html>
    AccessPoint {AccessPoint -> ()
haddock_workaround_ :: (),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3objectlambda-accesspoint.html#cfn-s3objectlambda-accesspoint-name>
                 AccessPoint -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-s3objectlambda-accesspoint.html#cfn-s3objectlambda-accesspoint-objectlambdaconfiguration>
                 AccessPoint -> ObjectLambdaConfigurationProperty
objectLambdaConfiguration :: ObjectLambdaConfigurationProperty}
  deriving stock (AccessPoint -> AccessPoint -> Bool
(AccessPoint -> AccessPoint -> Bool)
-> (AccessPoint -> AccessPoint -> Bool) -> Eq AccessPoint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AccessPoint -> AccessPoint -> Bool
== :: AccessPoint -> AccessPoint -> Bool
$c/= :: AccessPoint -> AccessPoint -> Bool
/= :: AccessPoint -> AccessPoint -> Bool
Prelude.Eq, Int -> AccessPoint -> ShowS
[AccessPoint] -> ShowS
AccessPoint -> String
(Int -> AccessPoint -> ShowS)
-> (AccessPoint -> String)
-> ([AccessPoint] -> ShowS)
-> Show AccessPoint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AccessPoint -> ShowS
showsPrec :: Int -> AccessPoint -> ShowS
$cshow :: AccessPoint -> String
show :: AccessPoint -> String
$cshowList :: [AccessPoint] -> ShowS
showList :: [AccessPoint] -> ShowS
Prelude.Show)
mkAccessPoint :: ObjectLambdaConfigurationProperty -> AccessPoint
mkAccessPoint :: ObjectLambdaConfigurationProperty -> AccessPoint
mkAccessPoint ObjectLambdaConfigurationProperty
objectLambdaConfiguration
  = AccessPoint
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       objectLambdaConfiguration :: ObjectLambdaConfigurationProperty
objectLambdaConfiguration = ObjectLambdaConfigurationProperty
objectLambdaConfiguration,
       name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AccessPoint where
  toResourceProperties :: AccessPoint -> ResourceProperties
toResourceProperties AccessPoint {Maybe (Value Text)
()
ObjectLambdaConfigurationProperty
haddock_workaround_ :: AccessPoint -> ()
name :: AccessPoint -> Maybe (Value Text)
objectLambdaConfiguration :: AccessPoint -> ObjectLambdaConfigurationProperty
haddock_workaround_ :: ()
name :: Maybe (Value Text)
objectLambdaConfiguration :: ObjectLambdaConfigurationProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::S3ObjectLambda::AccessPoint",
         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
"ObjectLambdaConfiguration" Key -> ObjectLambdaConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ObjectLambdaConfigurationProperty
objectLambdaConfiguration]
                           ([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
"Name" (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)
name]))}
instance JSON.ToJSON AccessPoint where
  toJSON :: AccessPoint -> Value
toJSON AccessPoint {Maybe (Value Text)
()
ObjectLambdaConfigurationProperty
haddock_workaround_ :: AccessPoint -> ()
name :: AccessPoint -> Maybe (Value Text)
objectLambdaConfiguration :: AccessPoint -> ObjectLambdaConfigurationProperty
haddock_workaround_ :: ()
name :: Maybe (Value Text)
objectLambdaConfiguration :: ObjectLambdaConfigurationProperty
..}
    = [(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
"ObjectLambdaConfiguration" Key -> ObjectLambdaConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= ObjectLambdaConfigurationProperty
objectLambdaConfiguration]
              ([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
"Name" (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)
name])))
instance Property "Name" AccessPoint where
  type PropertyType "Name" AccessPoint = Value Prelude.Text
  set :: PropertyType "Name" AccessPoint -> AccessPoint -> AccessPoint
set PropertyType "Name" AccessPoint
newValue AccessPoint {Maybe (Value Text)
()
ObjectLambdaConfigurationProperty
haddock_workaround_ :: AccessPoint -> ()
name :: AccessPoint -> Maybe (Value Text)
objectLambdaConfiguration :: AccessPoint -> ObjectLambdaConfigurationProperty
haddock_workaround_ :: ()
name :: Maybe (Value Text)
objectLambdaConfiguration :: ObjectLambdaConfigurationProperty
..}
    = AccessPoint {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" AccessPoint
Value Text
newValue, ()
ObjectLambdaConfigurationProperty
haddock_workaround_ :: ()
objectLambdaConfiguration :: ObjectLambdaConfigurationProperty
haddock_workaround_ :: ()
objectLambdaConfiguration :: ObjectLambdaConfigurationProperty
..}
instance Property "ObjectLambdaConfiguration" AccessPoint where
  type PropertyType "ObjectLambdaConfiguration" AccessPoint = ObjectLambdaConfigurationProperty
  set :: PropertyType "ObjectLambdaConfiguration" AccessPoint
-> AccessPoint -> AccessPoint
set PropertyType "ObjectLambdaConfiguration" AccessPoint
newValue AccessPoint {Maybe (Value Text)
()
ObjectLambdaConfigurationProperty
haddock_workaround_ :: AccessPoint -> ()
name :: AccessPoint -> Maybe (Value Text)
objectLambdaConfiguration :: AccessPoint -> ObjectLambdaConfigurationProperty
haddock_workaround_ :: ()
name :: Maybe (Value Text)
objectLambdaConfiguration :: ObjectLambdaConfigurationProperty
..}
    = AccessPoint {objectLambdaConfiguration :: ObjectLambdaConfigurationProperty
objectLambdaConfiguration = PropertyType "ObjectLambdaConfiguration" AccessPoint
ObjectLambdaConfigurationProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
name :: Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
..}