module Stratosphere.OpenSearchServerless.Collection (
        Collection(..), mkCollection
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Collection
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchserverless-collection.html>
    Collection {Collection -> ()
haddock_workaround_ :: (),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchserverless-collection.html#cfn-opensearchserverless-collection-description>
                Collection -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchserverless-collection.html#cfn-opensearchserverless-collection-name>
                Collection -> Value Text
name :: (Value Prelude.Text),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchserverless-collection.html#cfn-opensearchserverless-collection-standbyreplicas>
                Collection -> Maybe (Value Text)
standbyReplicas :: (Prelude.Maybe (Value Prelude.Text)),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchserverless-collection.html#cfn-opensearchserverless-collection-tags>
                Collection -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag]),
                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchserverless-collection.html#cfn-opensearchserverless-collection-type>
                Collection -> Maybe (Value Text)
type' :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (Collection -> Collection -> Bool
(Collection -> Collection -> Bool)
-> (Collection -> Collection -> Bool) -> Eq Collection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Collection -> Collection -> Bool
== :: Collection -> Collection -> Bool
$c/= :: Collection -> Collection -> Bool
/= :: Collection -> Collection -> Bool
Prelude.Eq, Int -> Collection -> ShowS
[Collection] -> ShowS
Collection -> String
(Int -> Collection -> ShowS)
-> (Collection -> String)
-> ([Collection] -> ShowS)
-> Show Collection
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Collection -> ShowS
showsPrec :: Int -> Collection -> ShowS
$cshow :: Collection -> String
show :: Collection -> String
$cshowList :: [Collection] -> ShowS
showList :: [Collection] -> ShowS
Prelude.Show)
mkCollection :: Value Prelude.Text -> Collection
mkCollection :: Value Text -> Collection
mkCollection Value Text
name
  = Collection
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name,
       description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, standbyReplicas :: Maybe (Value Text)
standbyReplicas = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing, type' :: Maybe (Value Text)
type' = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Collection where
  toResourceProperties :: Collection -> ResourceProperties
toResourceProperties Collection {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Collection -> ()
description :: Collection -> Maybe (Value Text)
name :: Collection -> Value Text
standbyReplicas :: Collection -> Maybe (Value Text)
tags :: Collection -> Maybe [Tag]
type' :: Collection -> Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
standbyReplicas :: Maybe (Value Text)
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::OpenSearchServerless::Collection",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [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..=) Key
"Description" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
description,
                               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..=) Key
"StandbyReplicas" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
standbyReplicas,
                               Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
                               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..=) Key
"Type" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
type']))}
instance JSON.ToJSON Collection where
  toJSON :: Collection -> Value
toJSON Collection {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Collection -> ()
description :: Collection -> Maybe (Value Text)
name :: Collection -> Value Text
standbyReplicas :: Collection -> Maybe (Value Text)
tags :: Collection -> Maybe [Tag]
type' :: Collection -> Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
standbyReplicas :: Maybe (Value Text)
tags :: Maybe [Tag]
type' :: Maybe (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]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [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..=) Key
"Description" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
description,
                  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..=) Key
"StandbyReplicas" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
standbyReplicas,
                  Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
                  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..=) Key
"Type" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
type'])))
instance Property "Description" Collection where
  type PropertyType "Description" Collection = Value Prelude.Text
  set :: PropertyType "Description" Collection -> Collection -> Collection
set PropertyType "Description" Collection
newValue Collection {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Collection -> ()
description :: Collection -> Maybe (Value Text)
name :: Collection -> Value Text
standbyReplicas :: Collection -> Maybe (Value Text)
tags :: Collection -> Maybe [Tag]
type' :: Collection -> Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
standbyReplicas :: Maybe (Value Text)
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
..}
    = Collection {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" Collection
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
standbyReplicas :: Maybe (Value Text)
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
haddock_workaround_ :: ()
name :: Value Text
standbyReplicas :: Maybe (Value Text)
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
..}
instance Property "Name" Collection where
  type PropertyType "Name" Collection = Value Prelude.Text
  set :: PropertyType "Name" Collection -> Collection -> Collection
set PropertyType "Name" Collection
newValue Collection {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Collection -> ()
description :: Collection -> Maybe (Value Text)
name :: Collection -> Value Text
standbyReplicas :: Collection -> Maybe (Value Text)
tags :: Collection -> Maybe [Tag]
type' :: Collection -> Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
standbyReplicas :: Maybe (Value Text)
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
..} = Collection {name :: Value Text
name = PropertyType "Name" Collection
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
description :: Maybe (Value Text)
standbyReplicas :: Maybe (Value Text)
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
standbyReplicas :: Maybe (Value Text)
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
..}
instance Property "StandbyReplicas" Collection where
  type PropertyType "StandbyReplicas" Collection = Value Prelude.Text
  set :: PropertyType "StandbyReplicas" Collection
-> Collection -> Collection
set PropertyType "StandbyReplicas" Collection
newValue Collection {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Collection -> ()
description :: Collection -> Maybe (Value Text)
name :: Collection -> Value Text
standbyReplicas :: Collection -> Maybe (Value Text)
tags :: Collection -> Maybe [Tag]
type' :: Collection -> Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
standbyReplicas :: Maybe (Value Text)
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
..}
    = Collection {standbyReplicas :: Maybe (Value Text)
standbyReplicas = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "StandbyReplicas" Collection
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
..}
instance Property "Tags" Collection where
  type PropertyType "Tags" Collection = [Tag]
  set :: PropertyType "Tags" Collection -> Collection -> Collection
set PropertyType "Tags" Collection
newValue Collection {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Collection -> ()
description :: Collection -> Maybe (Value Text)
name :: Collection -> Value Text
standbyReplicas :: Collection -> Maybe (Value Text)
tags :: Collection -> Maybe [Tag]
type' :: Collection -> Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
standbyReplicas :: Maybe (Value Text)
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
..}
    = Collection {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" Collection
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
standbyReplicas :: Maybe (Value Text)
type' :: Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
standbyReplicas :: Maybe (Value Text)
type' :: Maybe (Value Text)
..}
instance Property "Type" Collection where
  type PropertyType "Type" Collection = Value Prelude.Text
  set :: PropertyType "Type" Collection -> Collection -> Collection
set PropertyType "Type" Collection
newValue Collection {Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: Collection -> ()
description :: Collection -> Maybe (Value Text)
name :: Collection -> Value Text
standbyReplicas :: Collection -> Maybe (Value Text)
tags :: Collection -> Maybe [Tag]
type' :: Collection -> Maybe (Value Text)
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
standbyReplicas :: Maybe (Value Text)
tags :: Maybe [Tag]
type' :: Maybe (Value Text)
..}
    = Collection {type' :: Maybe (Value Text)
type' = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Type" Collection
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
standbyReplicas :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
name :: Value Text
standbyReplicas :: Maybe (Value Text)
tags :: Maybe [Tag]
..}