module Stratosphere.S3Express.AccessPoint.ScopeProperty (
        ScopeProperty(..), mkScopeProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ScopeProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3express-accesspoint-scope.html>
    ScopeProperty {ScopeProperty -> ()
haddock_workaround_ :: (),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3express-accesspoint-scope.html#cfn-s3express-accesspoint-scope-permissions>
                   ScopeProperty -> Maybe (ValueList Text)
permissions :: (Prelude.Maybe (ValueList Prelude.Text)),
                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3express-accesspoint-scope.html#cfn-s3express-accesspoint-scope-prefixes>
                   ScopeProperty -> Maybe (ValueList Text)
prefixes :: (Prelude.Maybe (ValueList Prelude.Text))}
  deriving stock (ScopeProperty -> ScopeProperty -> Bool
(ScopeProperty -> ScopeProperty -> Bool)
-> (ScopeProperty -> ScopeProperty -> Bool) -> Eq ScopeProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ScopeProperty -> ScopeProperty -> Bool
== :: ScopeProperty -> ScopeProperty -> Bool
$c/= :: ScopeProperty -> ScopeProperty -> Bool
/= :: ScopeProperty -> ScopeProperty -> Bool
Prelude.Eq, Int -> ScopeProperty -> ShowS
[ScopeProperty] -> ShowS
ScopeProperty -> String
(Int -> ScopeProperty -> ShowS)
-> (ScopeProperty -> String)
-> ([ScopeProperty] -> ShowS)
-> Show ScopeProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ScopeProperty -> ShowS
showsPrec :: Int -> ScopeProperty -> ShowS
$cshow :: ScopeProperty -> String
show :: ScopeProperty -> String
$cshowList :: [ScopeProperty] -> ShowS
showList :: [ScopeProperty] -> ShowS
Prelude.Show)
mkScopeProperty :: ScopeProperty
mkScopeProperty :: ScopeProperty
mkScopeProperty
  = ScopeProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), permissions :: Maybe (ValueList Text)
permissions = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
       prefixes :: Maybe (ValueList Text)
prefixes = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ScopeProperty where
  toResourceProperties :: ScopeProperty -> ResourceProperties
toResourceProperties ScopeProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: ScopeProperty -> ()
permissions :: ScopeProperty -> Maybe (ValueList Text)
prefixes :: ScopeProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
permissions :: Maybe (ValueList Text)
prefixes :: Maybe (ValueList Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::S3Express::AccessPoint.Scope",
         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 -> ValueList 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
"Permissions" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
permissions,
                            Key -> ValueList 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
"Prefixes" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
prefixes])}
instance JSON.ToJSON ScopeProperty where
  toJSON :: ScopeProperty -> Value
toJSON ScopeProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: ScopeProperty -> ()
permissions :: ScopeProperty -> Maybe (ValueList Text)
prefixes :: ScopeProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
permissions :: Maybe (ValueList Text)
prefixes :: Maybe (ValueList 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 -> ValueList 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
"Permissions" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
permissions,
               Key -> ValueList 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
"Prefixes" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
prefixes]))
instance Property "Permissions" ScopeProperty where
  type PropertyType "Permissions" ScopeProperty = ValueList Prelude.Text
  set :: PropertyType "Permissions" ScopeProperty
-> ScopeProperty -> ScopeProperty
set PropertyType "Permissions" ScopeProperty
newValue ScopeProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: ScopeProperty -> ()
permissions :: ScopeProperty -> Maybe (ValueList Text)
prefixes :: ScopeProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
permissions :: Maybe (ValueList Text)
prefixes :: Maybe (ValueList Text)
..}
    = ScopeProperty {permissions :: Maybe (ValueList Text)
permissions = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Permissions" ScopeProperty
ValueList Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
prefixes :: Maybe (ValueList Text)
haddock_workaround_ :: ()
prefixes :: Maybe (ValueList Text)
..}
instance Property "Prefixes" ScopeProperty where
  type PropertyType "Prefixes" ScopeProperty = ValueList Prelude.Text
  set :: PropertyType "Prefixes" ScopeProperty
-> ScopeProperty -> ScopeProperty
set PropertyType "Prefixes" ScopeProperty
newValue ScopeProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: ScopeProperty -> ()
permissions :: ScopeProperty -> Maybe (ValueList Text)
prefixes :: ScopeProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
permissions :: Maybe (ValueList Text)
prefixes :: Maybe (ValueList Text)
..}
    = ScopeProperty {prefixes :: Maybe (ValueList Text)
prefixes = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Prefixes" ScopeProperty
ValueList Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
permissions :: Maybe (ValueList Text)
haddock_workaround_ :: ()
permissions :: Maybe (ValueList Text)
..}