module Stratosphere.Bedrock.DataSource.ChunkingConfigurationProperty (
module Exports, ChunkingConfigurationProperty(..),
mkChunkingConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Bedrock.DataSource.FixedSizeChunkingConfigurationProperty as Exports
import {-# SOURCE #-} Stratosphere.Bedrock.DataSource.HierarchicalChunkingConfigurationProperty as Exports
import {-# SOURCE #-} Stratosphere.Bedrock.DataSource.SemanticChunkingConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ChunkingConfigurationProperty
=
ChunkingConfigurationProperty {ChunkingConfigurationProperty -> ()
haddock_workaround_ :: (),
ChunkingConfigurationProperty -> Value Text
chunkingStrategy :: (Value Prelude.Text),
ChunkingConfigurationProperty
-> Maybe FixedSizeChunkingConfigurationProperty
fixedSizeChunkingConfiguration :: (Prelude.Maybe FixedSizeChunkingConfigurationProperty),
ChunkingConfigurationProperty
-> Maybe HierarchicalChunkingConfigurationProperty
hierarchicalChunkingConfiguration :: (Prelude.Maybe HierarchicalChunkingConfigurationProperty),
ChunkingConfigurationProperty
-> Maybe SemanticChunkingConfigurationProperty
semanticChunkingConfiguration :: (Prelude.Maybe SemanticChunkingConfigurationProperty)}
deriving stock (ChunkingConfigurationProperty
-> ChunkingConfigurationProperty -> Bool
(ChunkingConfigurationProperty
-> ChunkingConfigurationProperty -> Bool)
-> (ChunkingConfigurationProperty
-> ChunkingConfigurationProperty -> Bool)
-> Eq ChunkingConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ChunkingConfigurationProperty
-> ChunkingConfigurationProperty -> Bool
== :: ChunkingConfigurationProperty
-> ChunkingConfigurationProperty -> Bool
$c/= :: ChunkingConfigurationProperty
-> ChunkingConfigurationProperty -> Bool
/= :: ChunkingConfigurationProperty
-> ChunkingConfigurationProperty -> Bool
Prelude.Eq, Int -> ChunkingConfigurationProperty -> ShowS
[ChunkingConfigurationProperty] -> ShowS
ChunkingConfigurationProperty -> String
(Int -> ChunkingConfigurationProperty -> ShowS)
-> (ChunkingConfigurationProperty -> String)
-> ([ChunkingConfigurationProperty] -> ShowS)
-> Show ChunkingConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ChunkingConfigurationProperty -> ShowS
showsPrec :: Int -> ChunkingConfigurationProperty -> ShowS
$cshow :: ChunkingConfigurationProperty -> String
show :: ChunkingConfigurationProperty -> String
$cshowList :: [ChunkingConfigurationProperty] -> ShowS
showList :: [ChunkingConfigurationProperty] -> ShowS
Prelude.Show)
mkChunkingConfigurationProperty ::
Value Prelude.Text -> ChunkingConfigurationProperty
mkChunkingConfigurationProperty :: Value Text -> ChunkingConfigurationProperty
mkChunkingConfigurationProperty Value Text
chunkingStrategy
= ChunkingConfigurationProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), chunkingStrategy :: Value Text
chunkingStrategy = Value Text
chunkingStrategy,
fixedSizeChunkingConfiguration :: Maybe FixedSizeChunkingConfigurationProperty
fixedSizeChunkingConfiguration = Maybe FixedSizeChunkingConfigurationProperty
forall a. Maybe a
Prelude.Nothing,
hierarchicalChunkingConfiguration :: Maybe HierarchicalChunkingConfigurationProperty
hierarchicalChunkingConfiguration = Maybe HierarchicalChunkingConfigurationProperty
forall a. Maybe a
Prelude.Nothing,
semanticChunkingConfiguration :: Maybe SemanticChunkingConfigurationProperty
semanticChunkingConfiguration = Maybe SemanticChunkingConfigurationProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ChunkingConfigurationProperty where
toResourceProperties :: ChunkingConfigurationProperty -> ResourceProperties
toResourceProperties ChunkingConfigurationProperty {Maybe FixedSizeChunkingConfigurationProperty
Maybe HierarchicalChunkingConfigurationProperty
Maybe SemanticChunkingConfigurationProperty
()
Value Text
haddock_workaround_ :: ChunkingConfigurationProperty -> ()
chunkingStrategy :: ChunkingConfigurationProperty -> Value Text
fixedSizeChunkingConfiguration :: ChunkingConfigurationProperty
-> Maybe FixedSizeChunkingConfigurationProperty
hierarchicalChunkingConfiguration :: ChunkingConfigurationProperty
-> Maybe HierarchicalChunkingConfigurationProperty
semanticChunkingConfiguration :: ChunkingConfigurationProperty
-> Maybe SemanticChunkingConfigurationProperty
haddock_workaround_ :: ()
chunkingStrategy :: Value Text
fixedSizeChunkingConfiguration :: Maybe FixedSizeChunkingConfigurationProperty
hierarchicalChunkingConfiguration :: Maybe HierarchicalChunkingConfigurationProperty
semanticChunkingConfiguration :: Maybe SemanticChunkingConfigurationProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Bedrock::DataSource.ChunkingConfiguration",
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
"ChunkingStrategy" 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
chunkingStrategy]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> FixedSizeChunkingConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"FixedSizeChunkingConfiguration"
(FixedSizeChunkingConfigurationProperty -> (Key, Value))
-> Maybe FixedSizeChunkingConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FixedSizeChunkingConfigurationProperty
fixedSizeChunkingConfiguration,
Key -> HierarchicalChunkingConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"HierarchicalChunkingConfiguration"
(HierarchicalChunkingConfigurationProperty -> (Key, Value))
-> Maybe HierarchicalChunkingConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HierarchicalChunkingConfigurationProperty
hierarchicalChunkingConfiguration,
Key -> SemanticChunkingConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SemanticChunkingConfiguration"
(SemanticChunkingConfigurationProperty -> (Key, Value))
-> Maybe SemanticChunkingConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SemanticChunkingConfigurationProperty
semanticChunkingConfiguration]))}
instance JSON.ToJSON ChunkingConfigurationProperty where
toJSON :: ChunkingConfigurationProperty -> Value
toJSON ChunkingConfigurationProperty {Maybe FixedSizeChunkingConfigurationProperty
Maybe HierarchicalChunkingConfigurationProperty
Maybe SemanticChunkingConfigurationProperty
()
Value Text
haddock_workaround_ :: ChunkingConfigurationProperty -> ()
chunkingStrategy :: ChunkingConfigurationProperty -> Value Text
fixedSizeChunkingConfiguration :: ChunkingConfigurationProperty
-> Maybe FixedSizeChunkingConfigurationProperty
hierarchicalChunkingConfiguration :: ChunkingConfigurationProperty
-> Maybe HierarchicalChunkingConfigurationProperty
semanticChunkingConfiguration :: ChunkingConfigurationProperty
-> Maybe SemanticChunkingConfigurationProperty
haddock_workaround_ :: ()
chunkingStrategy :: Value Text
fixedSizeChunkingConfiguration :: Maybe FixedSizeChunkingConfigurationProperty
hierarchicalChunkingConfiguration :: Maybe HierarchicalChunkingConfigurationProperty
semanticChunkingConfiguration :: Maybe SemanticChunkingConfigurationProperty
..}
= [(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
"ChunkingStrategy" 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
chunkingStrategy]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> FixedSizeChunkingConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"FixedSizeChunkingConfiguration"
(FixedSizeChunkingConfigurationProperty -> (Key, Value))
-> Maybe FixedSizeChunkingConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FixedSizeChunkingConfigurationProperty
fixedSizeChunkingConfiguration,
Key -> HierarchicalChunkingConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"HierarchicalChunkingConfiguration"
(HierarchicalChunkingConfigurationProperty -> (Key, Value))
-> Maybe HierarchicalChunkingConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HierarchicalChunkingConfigurationProperty
hierarchicalChunkingConfiguration,
Key -> SemanticChunkingConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SemanticChunkingConfiguration"
(SemanticChunkingConfigurationProperty -> (Key, Value))
-> Maybe SemanticChunkingConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SemanticChunkingConfigurationProperty
semanticChunkingConfiguration])))
instance Property "ChunkingStrategy" ChunkingConfigurationProperty where
type PropertyType "ChunkingStrategy" ChunkingConfigurationProperty = Value Prelude.Text
set :: PropertyType "ChunkingStrategy" ChunkingConfigurationProperty
-> ChunkingConfigurationProperty -> ChunkingConfigurationProperty
set PropertyType "ChunkingStrategy" ChunkingConfigurationProperty
newValue ChunkingConfigurationProperty {Maybe FixedSizeChunkingConfigurationProperty
Maybe HierarchicalChunkingConfigurationProperty
Maybe SemanticChunkingConfigurationProperty
()
Value Text
haddock_workaround_ :: ChunkingConfigurationProperty -> ()
chunkingStrategy :: ChunkingConfigurationProperty -> Value Text
fixedSizeChunkingConfiguration :: ChunkingConfigurationProperty
-> Maybe FixedSizeChunkingConfigurationProperty
hierarchicalChunkingConfiguration :: ChunkingConfigurationProperty
-> Maybe HierarchicalChunkingConfigurationProperty
semanticChunkingConfiguration :: ChunkingConfigurationProperty
-> Maybe SemanticChunkingConfigurationProperty
haddock_workaround_ :: ()
chunkingStrategy :: Value Text
fixedSizeChunkingConfiguration :: Maybe FixedSizeChunkingConfigurationProperty
hierarchicalChunkingConfiguration :: Maybe HierarchicalChunkingConfigurationProperty
semanticChunkingConfiguration :: Maybe SemanticChunkingConfigurationProperty
..}
= ChunkingConfigurationProperty {chunkingStrategy :: Value Text
chunkingStrategy = PropertyType "ChunkingStrategy" ChunkingConfigurationProperty
Value Text
newValue, Maybe FixedSizeChunkingConfigurationProperty
Maybe HierarchicalChunkingConfigurationProperty
Maybe SemanticChunkingConfigurationProperty
()
haddock_workaround_ :: ()
fixedSizeChunkingConfiguration :: Maybe FixedSizeChunkingConfigurationProperty
hierarchicalChunkingConfiguration :: Maybe HierarchicalChunkingConfigurationProperty
semanticChunkingConfiguration :: Maybe SemanticChunkingConfigurationProperty
haddock_workaround_ :: ()
fixedSizeChunkingConfiguration :: Maybe FixedSizeChunkingConfigurationProperty
hierarchicalChunkingConfiguration :: Maybe HierarchicalChunkingConfigurationProperty
semanticChunkingConfiguration :: Maybe SemanticChunkingConfigurationProperty
..}
instance Property "FixedSizeChunkingConfiguration" ChunkingConfigurationProperty where
type PropertyType "FixedSizeChunkingConfiguration" ChunkingConfigurationProperty = FixedSizeChunkingConfigurationProperty
set :: PropertyType
"FixedSizeChunkingConfiguration" ChunkingConfigurationProperty
-> ChunkingConfigurationProperty -> ChunkingConfigurationProperty
set PropertyType
"FixedSizeChunkingConfiguration" ChunkingConfigurationProperty
newValue ChunkingConfigurationProperty {Maybe FixedSizeChunkingConfigurationProperty
Maybe HierarchicalChunkingConfigurationProperty
Maybe SemanticChunkingConfigurationProperty
()
Value Text
haddock_workaround_ :: ChunkingConfigurationProperty -> ()
chunkingStrategy :: ChunkingConfigurationProperty -> Value Text
fixedSizeChunkingConfiguration :: ChunkingConfigurationProperty
-> Maybe FixedSizeChunkingConfigurationProperty
hierarchicalChunkingConfiguration :: ChunkingConfigurationProperty
-> Maybe HierarchicalChunkingConfigurationProperty
semanticChunkingConfiguration :: ChunkingConfigurationProperty
-> Maybe SemanticChunkingConfigurationProperty
haddock_workaround_ :: ()
chunkingStrategy :: Value Text
fixedSizeChunkingConfiguration :: Maybe FixedSizeChunkingConfigurationProperty
hierarchicalChunkingConfiguration :: Maybe HierarchicalChunkingConfigurationProperty
semanticChunkingConfiguration :: Maybe SemanticChunkingConfigurationProperty
..}
= ChunkingConfigurationProperty
{fixedSizeChunkingConfiguration :: Maybe FixedSizeChunkingConfigurationProperty
fixedSizeChunkingConfiguration = FixedSizeChunkingConfigurationProperty
-> Maybe FixedSizeChunkingConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"FixedSizeChunkingConfiguration" ChunkingConfigurationProperty
FixedSizeChunkingConfigurationProperty
newValue, Maybe HierarchicalChunkingConfigurationProperty
Maybe SemanticChunkingConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
chunkingStrategy :: Value Text
hierarchicalChunkingConfiguration :: Maybe HierarchicalChunkingConfigurationProperty
semanticChunkingConfiguration :: Maybe SemanticChunkingConfigurationProperty
haddock_workaround_ :: ()
chunkingStrategy :: Value Text
hierarchicalChunkingConfiguration :: Maybe HierarchicalChunkingConfigurationProperty
semanticChunkingConfiguration :: Maybe SemanticChunkingConfigurationProperty
..}
instance Property "HierarchicalChunkingConfiguration" ChunkingConfigurationProperty where
type PropertyType "HierarchicalChunkingConfiguration" ChunkingConfigurationProperty = HierarchicalChunkingConfigurationProperty
set :: PropertyType
"HierarchicalChunkingConfiguration" ChunkingConfigurationProperty
-> ChunkingConfigurationProperty -> ChunkingConfigurationProperty
set PropertyType
"HierarchicalChunkingConfiguration" ChunkingConfigurationProperty
newValue ChunkingConfigurationProperty {Maybe FixedSizeChunkingConfigurationProperty
Maybe HierarchicalChunkingConfigurationProperty
Maybe SemanticChunkingConfigurationProperty
()
Value Text
haddock_workaround_ :: ChunkingConfigurationProperty -> ()
chunkingStrategy :: ChunkingConfigurationProperty -> Value Text
fixedSizeChunkingConfiguration :: ChunkingConfigurationProperty
-> Maybe FixedSizeChunkingConfigurationProperty
hierarchicalChunkingConfiguration :: ChunkingConfigurationProperty
-> Maybe HierarchicalChunkingConfigurationProperty
semanticChunkingConfiguration :: ChunkingConfigurationProperty
-> Maybe SemanticChunkingConfigurationProperty
haddock_workaround_ :: ()
chunkingStrategy :: Value Text
fixedSizeChunkingConfiguration :: Maybe FixedSizeChunkingConfigurationProperty
hierarchicalChunkingConfiguration :: Maybe HierarchicalChunkingConfigurationProperty
semanticChunkingConfiguration :: Maybe SemanticChunkingConfigurationProperty
..}
= ChunkingConfigurationProperty
{hierarchicalChunkingConfiguration :: Maybe HierarchicalChunkingConfigurationProperty
hierarchicalChunkingConfiguration = HierarchicalChunkingConfigurationProperty
-> Maybe HierarchicalChunkingConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"HierarchicalChunkingConfiguration" ChunkingConfigurationProperty
HierarchicalChunkingConfigurationProperty
newValue, Maybe FixedSizeChunkingConfigurationProperty
Maybe SemanticChunkingConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
chunkingStrategy :: Value Text
fixedSizeChunkingConfiguration :: Maybe FixedSizeChunkingConfigurationProperty
semanticChunkingConfiguration :: Maybe SemanticChunkingConfigurationProperty
haddock_workaround_ :: ()
chunkingStrategy :: Value Text
fixedSizeChunkingConfiguration :: Maybe FixedSizeChunkingConfigurationProperty
semanticChunkingConfiguration :: Maybe SemanticChunkingConfigurationProperty
..}
instance Property "SemanticChunkingConfiguration" ChunkingConfigurationProperty where
type PropertyType "SemanticChunkingConfiguration" ChunkingConfigurationProperty = SemanticChunkingConfigurationProperty
set :: PropertyType
"SemanticChunkingConfiguration" ChunkingConfigurationProperty
-> ChunkingConfigurationProperty -> ChunkingConfigurationProperty
set PropertyType
"SemanticChunkingConfiguration" ChunkingConfigurationProperty
newValue ChunkingConfigurationProperty {Maybe FixedSizeChunkingConfigurationProperty
Maybe HierarchicalChunkingConfigurationProperty
Maybe SemanticChunkingConfigurationProperty
()
Value Text
haddock_workaround_ :: ChunkingConfigurationProperty -> ()
chunkingStrategy :: ChunkingConfigurationProperty -> Value Text
fixedSizeChunkingConfiguration :: ChunkingConfigurationProperty
-> Maybe FixedSizeChunkingConfigurationProperty
hierarchicalChunkingConfiguration :: ChunkingConfigurationProperty
-> Maybe HierarchicalChunkingConfigurationProperty
semanticChunkingConfiguration :: ChunkingConfigurationProperty
-> Maybe SemanticChunkingConfigurationProperty
haddock_workaround_ :: ()
chunkingStrategy :: Value Text
fixedSizeChunkingConfiguration :: Maybe FixedSizeChunkingConfigurationProperty
hierarchicalChunkingConfiguration :: Maybe HierarchicalChunkingConfigurationProperty
semanticChunkingConfiguration :: Maybe SemanticChunkingConfigurationProperty
..}
= ChunkingConfigurationProperty
{semanticChunkingConfiguration :: Maybe SemanticChunkingConfigurationProperty
semanticChunkingConfiguration = SemanticChunkingConfigurationProperty
-> Maybe SemanticChunkingConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"SemanticChunkingConfiguration" ChunkingConfigurationProperty
SemanticChunkingConfigurationProperty
newValue, Maybe FixedSizeChunkingConfigurationProperty
Maybe HierarchicalChunkingConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
chunkingStrategy :: Value Text
fixedSizeChunkingConfiguration :: Maybe FixedSizeChunkingConfigurationProperty
hierarchicalChunkingConfiguration :: Maybe HierarchicalChunkingConfigurationProperty
haddock_workaround_ :: ()
chunkingStrategy :: Value Text
fixedSizeChunkingConfiguration :: Maybe FixedSizeChunkingConfigurationProperty
hierarchicalChunkingConfiguration :: Maybe HierarchicalChunkingConfigurationProperty
..}