module Stratosphere.S3Outposts.AccessPoint (
module Exports, AccessPoint(..), mkAccessPoint
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.S3Outposts.AccessPoint.VpcConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data AccessPoint
=
AccessPoint {AccessPoint -> ()
haddock_workaround_ :: (),
AccessPoint -> Value Text
bucket :: (Value Prelude.Text),
AccessPoint -> Value Text
name :: (Value Prelude.Text),
AccessPoint -> Maybe Object
policy :: (Prelude.Maybe JSON.Object),
AccessPoint -> VpcConfigurationProperty
vpcConfiguration :: VpcConfigurationProperty}
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 ::
Value Prelude.Text
-> Value Prelude.Text -> VpcConfigurationProperty -> AccessPoint
mkAccessPoint :: Value Text -> Value Text -> VpcConfigurationProperty -> AccessPoint
mkAccessPoint Value Text
bucket Value Text
name VpcConfigurationProperty
vpcConfiguration
= AccessPoint
{haddock_workaround_ :: ()
haddock_workaround_ = (), bucket :: Value Text
bucket = Value Text
bucket, name :: Value Text
name = Value Text
name,
vpcConfiguration :: VpcConfigurationProperty
vpcConfiguration = VpcConfigurationProperty
vpcConfiguration, policy :: Maybe Object
policy = Maybe Object
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties AccessPoint where
toResourceProperties :: AccessPoint -> ResourceProperties
toResourceProperties AccessPoint {Maybe Object
()
Value Text
VpcConfigurationProperty
haddock_workaround_ :: AccessPoint -> ()
bucket :: AccessPoint -> Value Text
name :: AccessPoint -> Value Text
policy :: AccessPoint -> Maybe Object
vpcConfiguration :: AccessPoint -> VpcConfigurationProperty
haddock_workaround_ :: ()
bucket :: Value Text
name :: Value Text
policy :: Maybe Object
vpcConfiguration :: VpcConfigurationProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::S3Outposts::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
"Bucket" 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
bucket, Key
"Name" 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
name,
Key
"VpcConfiguration" Key -> VpcConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= VpcConfigurationProperty
vpcConfiguration]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Policy" (Object -> (Key, Value)) -> Maybe Object -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Object
policy]))}
instance JSON.ToJSON AccessPoint where
toJSON :: AccessPoint -> Value
toJSON AccessPoint {Maybe Object
()
Value Text
VpcConfigurationProperty
haddock_workaround_ :: AccessPoint -> ()
bucket :: AccessPoint -> Value Text
name :: AccessPoint -> Value Text
policy :: AccessPoint -> Maybe Object
vpcConfiguration :: AccessPoint -> VpcConfigurationProperty
haddock_workaround_ :: ()
bucket :: Value Text
name :: Value Text
policy :: Maybe Object
vpcConfiguration :: VpcConfigurationProperty
..}
= [(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
"Bucket" 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
bucket, Key
"Name" 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
name,
Key
"VpcConfiguration" Key -> VpcConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= VpcConfigurationProperty
vpcConfiguration]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes [Key -> Object -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Policy" (Object -> (Key, Value)) -> Maybe Object -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Object
policy])))
instance Property "Bucket" AccessPoint where
type PropertyType "Bucket" AccessPoint = Value Prelude.Text
set :: PropertyType "Bucket" AccessPoint -> AccessPoint -> AccessPoint
set PropertyType "Bucket" AccessPoint
newValue AccessPoint {Maybe Object
()
Value Text
VpcConfigurationProperty
haddock_workaround_ :: AccessPoint -> ()
bucket :: AccessPoint -> Value Text
name :: AccessPoint -> Value Text
policy :: AccessPoint -> Maybe Object
vpcConfiguration :: AccessPoint -> VpcConfigurationProperty
haddock_workaround_ :: ()
bucket :: Value Text
name :: Value Text
policy :: Maybe Object
vpcConfiguration :: VpcConfigurationProperty
..} = AccessPoint {bucket :: Value Text
bucket = PropertyType "Bucket" AccessPoint
Value Text
newValue, Maybe Object
()
Value Text
VpcConfigurationProperty
haddock_workaround_ :: ()
name :: Value Text
policy :: Maybe Object
vpcConfiguration :: VpcConfigurationProperty
haddock_workaround_ :: ()
name :: Value Text
policy :: Maybe Object
vpcConfiguration :: VpcConfigurationProperty
..}
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 Object
()
Value Text
VpcConfigurationProperty
haddock_workaround_ :: AccessPoint -> ()
bucket :: AccessPoint -> Value Text
name :: AccessPoint -> Value Text
policy :: AccessPoint -> Maybe Object
vpcConfiguration :: AccessPoint -> VpcConfigurationProperty
haddock_workaround_ :: ()
bucket :: Value Text
name :: Value Text
policy :: Maybe Object
vpcConfiguration :: VpcConfigurationProperty
..} = AccessPoint {name :: Value Text
name = PropertyType "Name" AccessPoint
Value Text
newValue, Maybe Object
()
Value Text
VpcConfigurationProperty
haddock_workaround_ :: ()
bucket :: Value Text
policy :: Maybe Object
vpcConfiguration :: VpcConfigurationProperty
haddock_workaround_ :: ()
bucket :: Value Text
policy :: Maybe Object
vpcConfiguration :: VpcConfigurationProperty
..}
instance Property "Policy" AccessPoint where
type PropertyType "Policy" AccessPoint = JSON.Object
set :: PropertyType "Policy" AccessPoint -> AccessPoint -> AccessPoint
set PropertyType "Policy" AccessPoint
newValue AccessPoint {Maybe Object
()
Value Text
VpcConfigurationProperty
haddock_workaround_ :: AccessPoint -> ()
bucket :: AccessPoint -> Value Text
name :: AccessPoint -> Value Text
policy :: AccessPoint -> Maybe Object
vpcConfiguration :: AccessPoint -> VpcConfigurationProperty
haddock_workaround_ :: ()
bucket :: Value Text
name :: Value Text
policy :: Maybe Object
vpcConfiguration :: VpcConfigurationProperty
..}
= AccessPoint {policy :: Maybe Object
policy = Object -> Maybe Object
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Object
PropertyType "Policy" AccessPoint
newValue, ()
Value Text
VpcConfigurationProperty
haddock_workaround_ :: ()
bucket :: Value Text
name :: Value Text
vpcConfiguration :: VpcConfigurationProperty
haddock_workaround_ :: ()
bucket :: Value Text
name :: Value Text
vpcConfiguration :: VpcConfigurationProperty
..}
instance Property "VpcConfiguration" AccessPoint where
type PropertyType "VpcConfiguration" AccessPoint = VpcConfigurationProperty
set :: PropertyType "VpcConfiguration" AccessPoint
-> AccessPoint -> AccessPoint
set PropertyType "VpcConfiguration" AccessPoint
newValue AccessPoint {Maybe Object
()
Value Text
VpcConfigurationProperty
haddock_workaround_ :: AccessPoint -> ()
bucket :: AccessPoint -> Value Text
name :: AccessPoint -> Value Text
policy :: AccessPoint -> Maybe Object
vpcConfiguration :: AccessPoint -> VpcConfigurationProperty
haddock_workaround_ :: ()
bucket :: Value Text
name :: Value Text
policy :: Maybe Object
vpcConfiguration :: VpcConfigurationProperty
..}
= AccessPoint {vpcConfiguration :: VpcConfigurationProperty
vpcConfiguration = PropertyType "VpcConfiguration" AccessPoint
VpcConfigurationProperty
newValue, Maybe Object
()
Value Text
haddock_workaround_ :: ()
bucket :: Value Text
name :: Value Text
policy :: Maybe Object
haddock_workaround_ :: ()
bucket :: Value Text
name :: Value Text
policy :: Maybe Object
..}