module Stratosphere.OpenSearchServerless.VpcEndpoint (
        VpcEndpoint(..), mkVpcEndpoint
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data VpcEndpoint
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchserverless-vpcendpoint.html>
    VpcEndpoint {VpcEndpoint -> ()
haddock_workaround_ :: (),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchserverless-vpcendpoint.html#cfn-opensearchserverless-vpcendpoint-name>
                 VpcEndpoint -> Value Text
name :: (Value Prelude.Text),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchserverless-vpcendpoint.html#cfn-opensearchserverless-vpcendpoint-securitygroupids>
                 VpcEndpoint -> Maybe (ValueList Text)
securityGroupIds :: (Prelude.Maybe (ValueList Prelude.Text)),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchserverless-vpcendpoint.html#cfn-opensearchserverless-vpcendpoint-subnetids>
                 VpcEndpoint -> ValueList Text
subnetIds :: (ValueList Prelude.Text),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchserverless-vpcendpoint.html#cfn-opensearchserverless-vpcendpoint-vpcid>
                 VpcEndpoint -> Value Text
vpcId :: (Value Prelude.Text)}
  deriving stock (VpcEndpoint -> VpcEndpoint -> Bool
(VpcEndpoint -> VpcEndpoint -> Bool)
-> (VpcEndpoint -> VpcEndpoint -> Bool) -> Eq VpcEndpoint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: VpcEndpoint -> VpcEndpoint -> Bool
== :: VpcEndpoint -> VpcEndpoint -> Bool
$c/= :: VpcEndpoint -> VpcEndpoint -> Bool
/= :: VpcEndpoint -> VpcEndpoint -> Bool
Prelude.Eq, Int -> VpcEndpoint -> ShowS
[VpcEndpoint] -> ShowS
VpcEndpoint -> String
(Int -> VpcEndpoint -> ShowS)
-> (VpcEndpoint -> String)
-> ([VpcEndpoint] -> ShowS)
-> Show VpcEndpoint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> VpcEndpoint -> ShowS
showsPrec :: Int -> VpcEndpoint -> ShowS
$cshow :: VpcEndpoint -> String
show :: VpcEndpoint -> String
$cshowList :: [VpcEndpoint] -> ShowS
showList :: [VpcEndpoint] -> ShowS
Prelude.Show)
mkVpcEndpoint ::
  Value Prelude.Text
  -> ValueList Prelude.Text -> Value Prelude.Text -> VpcEndpoint
mkVpcEndpoint :: Value Text -> ValueList Text -> Value Text -> VpcEndpoint
mkVpcEndpoint Value Text
name ValueList Text
subnetIds Value Text
vpcId
  = VpcEndpoint
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name, subnetIds :: ValueList Text
subnetIds = ValueList Text
subnetIds,
       vpcId :: Value Text
vpcId = Value Text
vpcId, securityGroupIds :: Maybe (ValueList Text)
securityGroupIds = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties VpcEndpoint where
  toResourceProperties :: VpcEndpoint -> ResourceProperties
toResourceProperties VpcEndpoint {Maybe (ValueList Text)
()
ValueList Text
Value Text
haddock_workaround_ :: VpcEndpoint -> ()
name :: VpcEndpoint -> Value Text
securityGroupIds :: VpcEndpoint -> Maybe (ValueList Text)
subnetIds :: VpcEndpoint -> ValueList Text
vpcId :: VpcEndpoint -> Value Text
haddock_workaround_ :: ()
name :: Value Text
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: ValueList Text
vpcId :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::OpenSearchServerless::VpcEndpoint",
         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
"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
"SubnetIds" 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..= ValueList Text
subnetIds,
                            Key
"VpcId" 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
vpcId]
                           ([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
"SecurityGroupIds" (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)
securityGroupIds]))}
instance JSON.ToJSON VpcEndpoint where
  toJSON :: VpcEndpoint -> Value
toJSON VpcEndpoint {Maybe (ValueList Text)
()
ValueList Text
Value Text
haddock_workaround_ :: VpcEndpoint -> ()
name :: VpcEndpoint -> Value Text
securityGroupIds :: VpcEndpoint -> Maybe (ValueList Text)
subnetIds :: VpcEndpoint -> ValueList Text
vpcId :: VpcEndpoint -> Value Text
haddock_workaround_ :: ()
name :: Value Text
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: ValueList Text
vpcId :: 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
"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
"SubnetIds" 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..= ValueList Text
subnetIds,
               Key
"VpcId" 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
vpcId]
              ([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
"SecurityGroupIds" (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)
securityGroupIds])))
instance Property "Name" VpcEndpoint where
  type PropertyType "Name" VpcEndpoint = Value Prelude.Text
  set :: PropertyType "Name" VpcEndpoint -> VpcEndpoint -> VpcEndpoint
set PropertyType "Name" VpcEndpoint
newValue VpcEndpoint {Maybe (ValueList Text)
()
ValueList Text
Value Text
haddock_workaround_ :: VpcEndpoint -> ()
name :: VpcEndpoint -> Value Text
securityGroupIds :: VpcEndpoint -> Maybe (ValueList Text)
subnetIds :: VpcEndpoint -> ValueList Text
vpcId :: VpcEndpoint -> Value Text
haddock_workaround_ :: ()
name :: Value Text
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: ValueList Text
vpcId :: Value Text
..} = VpcEndpoint {name :: Value Text
name = PropertyType "Name" VpcEndpoint
Value Text
newValue, Maybe (ValueList Text)
()
ValueList Text
Value Text
haddock_workaround_ :: ()
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: ValueList Text
vpcId :: Value Text
haddock_workaround_ :: ()
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: ValueList Text
vpcId :: Value Text
..}
instance Property "SecurityGroupIds" VpcEndpoint where
  type PropertyType "SecurityGroupIds" VpcEndpoint = ValueList Prelude.Text
  set :: PropertyType "SecurityGroupIds" VpcEndpoint
-> VpcEndpoint -> VpcEndpoint
set PropertyType "SecurityGroupIds" VpcEndpoint
newValue VpcEndpoint {Maybe (ValueList Text)
()
ValueList Text
Value Text
haddock_workaround_ :: VpcEndpoint -> ()
name :: VpcEndpoint -> Value Text
securityGroupIds :: VpcEndpoint -> Maybe (ValueList Text)
subnetIds :: VpcEndpoint -> ValueList Text
vpcId :: VpcEndpoint -> Value Text
haddock_workaround_ :: ()
name :: Value Text
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: ValueList Text
vpcId :: Value Text
..}
    = VpcEndpoint {securityGroupIds :: Maybe (ValueList Text)
securityGroupIds = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SecurityGroupIds" VpcEndpoint
ValueList Text
newValue, ()
ValueList Text
Value Text
haddock_workaround_ :: ()
name :: Value Text
subnetIds :: ValueList Text
vpcId :: Value Text
haddock_workaround_ :: ()
name :: Value Text
subnetIds :: ValueList Text
vpcId :: Value Text
..}
instance Property "SubnetIds" VpcEndpoint where
  type PropertyType "SubnetIds" VpcEndpoint = ValueList Prelude.Text
  set :: PropertyType "SubnetIds" VpcEndpoint -> VpcEndpoint -> VpcEndpoint
set PropertyType "SubnetIds" VpcEndpoint
newValue VpcEndpoint {Maybe (ValueList Text)
()
ValueList Text
Value Text
haddock_workaround_ :: VpcEndpoint -> ()
name :: VpcEndpoint -> Value Text
securityGroupIds :: VpcEndpoint -> Maybe (ValueList Text)
subnetIds :: VpcEndpoint -> ValueList Text
vpcId :: VpcEndpoint -> Value Text
haddock_workaround_ :: ()
name :: Value Text
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: ValueList Text
vpcId :: Value Text
..}
    = VpcEndpoint {subnetIds :: ValueList Text
subnetIds = PropertyType "SubnetIds" VpcEndpoint
ValueList Text
newValue, Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
securityGroupIds :: Maybe (ValueList Text)
vpcId :: Value Text
haddock_workaround_ :: ()
name :: Value Text
securityGroupIds :: Maybe (ValueList Text)
vpcId :: Value Text
..}
instance Property "VpcId" VpcEndpoint where
  type PropertyType "VpcId" VpcEndpoint = Value Prelude.Text
  set :: PropertyType "VpcId" VpcEndpoint -> VpcEndpoint -> VpcEndpoint
set PropertyType "VpcId" VpcEndpoint
newValue VpcEndpoint {Maybe (ValueList Text)
()
ValueList Text
Value Text
haddock_workaround_ :: VpcEndpoint -> ()
name :: VpcEndpoint -> Value Text
securityGroupIds :: VpcEndpoint -> Maybe (ValueList Text)
subnetIds :: VpcEndpoint -> ValueList Text
vpcId :: VpcEndpoint -> Value Text
haddock_workaround_ :: ()
name :: Value Text
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: ValueList Text
vpcId :: Value Text
..} = VpcEndpoint {vpcId :: Value Text
vpcId = PropertyType "VpcId" VpcEndpoint
Value Text
newValue, Maybe (ValueList Text)
()
ValueList Text
Value Text
haddock_workaround_ :: ()
name :: Value Text
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: ValueList Text
haddock_workaround_ :: ()
name :: Value Text
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: ValueList Text
..}