module Stratosphere.MSK.ServerlessCluster.VpcConfigProperty ( VpcConfigProperty(..), mkVpcConfigProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value data VpcConfigProperty = -- | See: VpcConfigProperty {haddock_workaround_ :: (), -- | See: securityGroups :: (Prelude.Maybe (ValueList Prelude.Text)), -- | See: subnetIds :: (ValueList Prelude.Text)} deriving stock (Prelude.Eq, Prelude.Show) mkVpcConfigProperty :: ValueList Prelude.Text -> VpcConfigProperty mkVpcConfigProperty subnetIds = VpcConfigProperty {haddock_workaround_ = (), subnetIds = subnetIds, securityGroups = Prelude.Nothing} instance ToResourceProperties VpcConfigProperty where toResourceProperties VpcConfigProperty {..} = ResourceProperties {awsType = "AWS::MSK::ServerlessCluster.VpcConfig", supportsTags = Prelude.False, properties = Prelude.fromList ((Prelude.<>) ["SubnetIds" JSON..= subnetIds] (Prelude.catMaybes [(JSON..=) "SecurityGroups" Prelude.<$> securityGroups]))} instance JSON.ToJSON VpcConfigProperty where toJSON VpcConfigProperty {..} = JSON.object (Prelude.fromList ((Prelude.<>) ["SubnetIds" JSON..= subnetIds] (Prelude.catMaybes [(JSON..=) "SecurityGroups" Prelude.<$> securityGroups]))) instance Property "SecurityGroups" VpcConfigProperty where type PropertyType "SecurityGroups" VpcConfigProperty = ValueList Prelude.Text set newValue VpcConfigProperty {..} = VpcConfigProperty {securityGroups = Prelude.pure newValue, ..} instance Property "SubnetIds" VpcConfigProperty where type PropertyType "SubnetIds" VpcConfigProperty = ValueList Prelude.Text set newValue VpcConfigProperty {..} = VpcConfigProperty {subnetIds = newValue, ..}