{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.SageMaker.CreateFeatureGroup
(
CreateFeatureGroup (..),
newCreateFeatureGroup,
createFeatureGroup_offlineStoreConfig,
createFeatureGroup_onlineStoreConfig,
createFeatureGroup_description,
createFeatureGroup_tags,
createFeatureGroup_roleArn,
createFeatureGroup_featureGroupName,
createFeatureGroup_recordIdentifierFeatureName,
createFeatureGroup_eventTimeFeatureName,
createFeatureGroup_featureDefinitions,
CreateFeatureGroupResponse (..),
newCreateFeatureGroupResponse,
createFeatureGroupResponse_httpStatus,
createFeatureGroupResponse_featureGroupArn,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SageMaker.Types
data CreateFeatureGroup = CreateFeatureGroup'
{
CreateFeatureGroup -> Maybe OfflineStoreConfig
offlineStoreConfig :: Prelude.Maybe OfflineStoreConfig,
CreateFeatureGroup -> Maybe OnlineStoreConfig
onlineStoreConfig :: Prelude.Maybe OnlineStoreConfig,
CreateFeatureGroup -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateFeatureGroup -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateFeatureGroup -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text,
CreateFeatureGroup -> Text
featureGroupName :: Prelude.Text,
CreateFeatureGroup -> Text
recordIdentifierFeatureName :: Prelude.Text,
CreateFeatureGroup -> Text
eventTimeFeatureName :: Prelude.Text,
CreateFeatureGroup -> NonEmpty FeatureDefinition
featureDefinitions :: Prelude.NonEmpty FeatureDefinition
}
deriving (CreateFeatureGroup -> CreateFeatureGroup -> Bool
(CreateFeatureGroup -> CreateFeatureGroup -> Bool)
-> (CreateFeatureGroup -> CreateFeatureGroup -> Bool)
-> Eq CreateFeatureGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateFeatureGroup -> CreateFeatureGroup -> Bool
$c/= :: CreateFeatureGroup -> CreateFeatureGroup -> Bool
== :: CreateFeatureGroup -> CreateFeatureGroup -> Bool
$c== :: CreateFeatureGroup -> CreateFeatureGroup -> Bool
Prelude.Eq, ReadPrec [CreateFeatureGroup]
ReadPrec CreateFeatureGroup
Int -> ReadS CreateFeatureGroup
ReadS [CreateFeatureGroup]
(Int -> ReadS CreateFeatureGroup)
-> ReadS [CreateFeatureGroup]
-> ReadPrec CreateFeatureGroup
-> ReadPrec [CreateFeatureGroup]
-> Read CreateFeatureGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateFeatureGroup]
$creadListPrec :: ReadPrec [CreateFeatureGroup]
readPrec :: ReadPrec CreateFeatureGroup
$creadPrec :: ReadPrec CreateFeatureGroup
readList :: ReadS [CreateFeatureGroup]
$creadList :: ReadS [CreateFeatureGroup]
readsPrec :: Int -> ReadS CreateFeatureGroup
$creadsPrec :: Int -> ReadS CreateFeatureGroup
Prelude.Read, Int -> CreateFeatureGroup -> ShowS
[CreateFeatureGroup] -> ShowS
CreateFeatureGroup -> String
(Int -> CreateFeatureGroup -> ShowS)
-> (CreateFeatureGroup -> String)
-> ([CreateFeatureGroup] -> ShowS)
-> Show CreateFeatureGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateFeatureGroup] -> ShowS
$cshowList :: [CreateFeatureGroup] -> ShowS
show :: CreateFeatureGroup -> String
$cshow :: CreateFeatureGroup -> String
showsPrec :: Int -> CreateFeatureGroup -> ShowS
$cshowsPrec :: Int -> CreateFeatureGroup -> ShowS
Prelude.Show, (forall x. CreateFeatureGroup -> Rep CreateFeatureGroup x)
-> (forall x. Rep CreateFeatureGroup x -> CreateFeatureGroup)
-> Generic CreateFeatureGroup
forall x. Rep CreateFeatureGroup x -> CreateFeatureGroup
forall x. CreateFeatureGroup -> Rep CreateFeatureGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateFeatureGroup x -> CreateFeatureGroup
$cfrom :: forall x. CreateFeatureGroup -> Rep CreateFeatureGroup x
Prelude.Generic)
newCreateFeatureGroup ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.NonEmpty FeatureDefinition ->
CreateFeatureGroup
newCreateFeatureGroup :: Text
-> Text -> Text -> NonEmpty FeatureDefinition -> CreateFeatureGroup
newCreateFeatureGroup
Text
pFeatureGroupName_
Text
pRecordIdentifierFeatureName_
Text
pEventTimeFeatureName_
NonEmpty FeatureDefinition
pFeatureDefinitions_ =
CreateFeatureGroup' :: Maybe OfflineStoreConfig
-> Maybe OnlineStoreConfig
-> Maybe Text
-> Maybe [Tag]
-> Maybe Text
-> Text
-> Text
-> Text
-> NonEmpty FeatureDefinition
-> CreateFeatureGroup
CreateFeatureGroup'
{ $sel:offlineStoreConfig:CreateFeatureGroup' :: Maybe OfflineStoreConfig
offlineStoreConfig =
Maybe OfflineStoreConfig
forall a. Maybe a
Prelude.Nothing,
$sel:onlineStoreConfig:CreateFeatureGroup' :: Maybe OnlineStoreConfig
onlineStoreConfig = Maybe OnlineStoreConfig
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateFeatureGroup' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateFeatureGroup' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:roleArn:CreateFeatureGroup' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:featureGroupName:CreateFeatureGroup' :: Text
featureGroupName = Text
pFeatureGroupName_,
$sel:recordIdentifierFeatureName:CreateFeatureGroup' :: Text
recordIdentifierFeatureName =
Text
pRecordIdentifierFeatureName_,
$sel:eventTimeFeatureName:CreateFeatureGroup' :: Text
eventTimeFeatureName = Text
pEventTimeFeatureName_,
$sel:featureDefinitions:CreateFeatureGroup' :: NonEmpty FeatureDefinition
featureDefinitions =
Tagged
(NonEmpty FeatureDefinition)
(Identity (NonEmpty FeatureDefinition))
-> Tagged
(NonEmpty FeatureDefinition)
(Identity (NonEmpty FeatureDefinition))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged
(NonEmpty FeatureDefinition)
(Identity (NonEmpty FeatureDefinition))
-> Tagged
(NonEmpty FeatureDefinition)
(Identity (NonEmpty FeatureDefinition)))
-> NonEmpty FeatureDefinition -> NonEmpty FeatureDefinition
forall t b. AReview t b -> b -> t
Lens.# NonEmpty FeatureDefinition
pFeatureDefinitions_
}
createFeatureGroup_offlineStoreConfig :: Lens.Lens' CreateFeatureGroup (Prelude.Maybe OfflineStoreConfig)
createFeatureGroup_offlineStoreConfig :: (Maybe OfflineStoreConfig -> f (Maybe OfflineStoreConfig))
-> CreateFeatureGroup -> f CreateFeatureGroup
createFeatureGroup_offlineStoreConfig = (CreateFeatureGroup -> Maybe OfflineStoreConfig)
-> (CreateFeatureGroup
-> Maybe OfflineStoreConfig -> CreateFeatureGroup)
-> Lens
CreateFeatureGroup
CreateFeatureGroup
(Maybe OfflineStoreConfig)
(Maybe OfflineStoreConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFeatureGroup' {Maybe OfflineStoreConfig
offlineStoreConfig :: Maybe OfflineStoreConfig
$sel:offlineStoreConfig:CreateFeatureGroup' :: CreateFeatureGroup -> Maybe OfflineStoreConfig
offlineStoreConfig} -> Maybe OfflineStoreConfig
offlineStoreConfig) (\s :: CreateFeatureGroup
s@CreateFeatureGroup' {} Maybe OfflineStoreConfig
a -> CreateFeatureGroup
s {$sel:offlineStoreConfig:CreateFeatureGroup' :: Maybe OfflineStoreConfig
offlineStoreConfig = Maybe OfflineStoreConfig
a} :: CreateFeatureGroup)
createFeatureGroup_onlineStoreConfig :: Lens.Lens' CreateFeatureGroup (Prelude.Maybe OnlineStoreConfig)
createFeatureGroup_onlineStoreConfig :: (Maybe OnlineStoreConfig -> f (Maybe OnlineStoreConfig))
-> CreateFeatureGroup -> f CreateFeatureGroup
createFeatureGroup_onlineStoreConfig = (CreateFeatureGroup -> Maybe OnlineStoreConfig)
-> (CreateFeatureGroup
-> Maybe OnlineStoreConfig -> CreateFeatureGroup)
-> Lens
CreateFeatureGroup
CreateFeatureGroup
(Maybe OnlineStoreConfig)
(Maybe OnlineStoreConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFeatureGroup' {Maybe OnlineStoreConfig
onlineStoreConfig :: Maybe OnlineStoreConfig
$sel:onlineStoreConfig:CreateFeatureGroup' :: CreateFeatureGroup -> Maybe OnlineStoreConfig
onlineStoreConfig} -> Maybe OnlineStoreConfig
onlineStoreConfig) (\s :: CreateFeatureGroup
s@CreateFeatureGroup' {} Maybe OnlineStoreConfig
a -> CreateFeatureGroup
s {$sel:onlineStoreConfig:CreateFeatureGroup' :: Maybe OnlineStoreConfig
onlineStoreConfig = Maybe OnlineStoreConfig
a} :: CreateFeatureGroup)
createFeatureGroup_description :: Lens.Lens' CreateFeatureGroup (Prelude.Maybe Prelude.Text)
createFeatureGroup_description :: (Maybe Text -> f (Maybe Text))
-> CreateFeatureGroup -> f CreateFeatureGroup
createFeatureGroup_description = (CreateFeatureGroup -> Maybe Text)
-> (CreateFeatureGroup -> Maybe Text -> CreateFeatureGroup)
-> Lens
CreateFeatureGroup CreateFeatureGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFeatureGroup' {Maybe Text
description :: Maybe Text
$sel:description:CreateFeatureGroup' :: CreateFeatureGroup -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateFeatureGroup
s@CreateFeatureGroup' {} Maybe Text
a -> CreateFeatureGroup
s {$sel:description:CreateFeatureGroup' :: Maybe Text
description = Maybe Text
a} :: CreateFeatureGroup)
createFeatureGroup_tags :: Lens.Lens' CreateFeatureGroup (Prelude.Maybe [Tag])
createFeatureGroup_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateFeatureGroup -> f CreateFeatureGroup
createFeatureGroup_tags = (CreateFeatureGroup -> Maybe [Tag])
-> (CreateFeatureGroup -> Maybe [Tag] -> CreateFeatureGroup)
-> Lens
CreateFeatureGroup CreateFeatureGroup (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFeatureGroup' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateFeatureGroup' :: CreateFeatureGroup -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateFeatureGroup
s@CreateFeatureGroup' {} Maybe [Tag]
a -> CreateFeatureGroup
s {$sel:tags:CreateFeatureGroup' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateFeatureGroup) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateFeatureGroup -> f CreateFeatureGroup)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateFeatureGroup
-> f CreateFeatureGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createFeatureGroup_roleArn :: Lens.Lens' CreateFeatureGroup (Prelude.Maybe Prelude.Text)
createFeatureGroup_roleArn :: (Maybe Text -> f (Maybe Text))
-> CreateFeatureGroup -> f CreateFeatureGroup
createFeatureGroup_roleArn = (CreateFeatureGroup -> Maybe Text)
-> (CreateFeatureGroup -> Maybe Text -> CreateFeatureGroup)
-> Lens
CreateFeatureGroup CreateFeatureGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFeatureGroup' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:CreateFeatureGroup' :: CreateFeatureGroup -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: CreateFeatureGroup
s@CreateFeatureGroup' {} Maybe Text
a -> CreateFeatureGroup
s {$sel:roleArn:CreateFeatureGroup' :: Maybe Text
roleArn = Maybe Text
a} :: CreateFeatureGroup)
createFeatureGroup_featureGroupName :: Lens.Lens' CreateFeatureGroup Prelude.Text
createFeatureGroup_featureGroupName :: (Text -> f Text) -> CreateFeatureGroup -> f CreateFeatureGroup
createFeatureGroup_featureGroupName = (CreateFeatureGroup -> Text)
-> (CreateFeatureGroup -> Text -> CreateFeatureGroup)
-> Lens CreateFeatureGroup CreateFeatureGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFeatureGroup' {Text
featureGroupName :: Text
$sel:featureGroupName:CreateFeatureGroup' :: CreateFeatureGroup -> Text
featureGroupName} -> Text
featureGroupName) (\s :: CreateFeatureGroup
s@CreateFeatureGroup' {} Text
a -> CreateFeatureGroup
s {$sel:featureGroupName:CreateFeatureGroup' :: Text
featureGroupName = Text
a} :: CreateFeatureGroup)
createFeatureGroup_recordIdentifierFeatureName :: Lens.Lens' CreateFeatureGroup Prelude.Text
createFeatureGroup_recordIdentifierFeatureName :: (Text -> f Text) -> CreateFeatureGroup -> f CreateFeatureGroup
createFeatureGroup_recordIdentifierFeatureName = (CreateFeatureGroup -> Text)
-> (CreateFeatureGroup -> Text -> CreateFeatureGroup)
-> Lens CreateFeatureGroup CreateFeatureGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFeatureGroup' {Text
recordIdentifierFeatureName :: Text
$sel:recordIdentifierFeatureName:CreateFeatureGroup' :: CreateFeatureGroup -> Text
recordIdentifierFeatureName} -> Text
recordIdentifierFeatureName) (\s :: CreateFeatureGroup
s@CreateFeatureGroup' {} Text
a -> CreateFeatureGroup
s {$sel:recordIdentifierFeatureName:CreateFeatureGroup' :: Text
recordIdentifierFeatureName = Text
a} :: CreateFeatureGroup)
createFeatureGroup_eventTimeFeatureName :: Lens.Lens' CreateFeatureGroup Prelude.Text
createFeatureGroup_eventTimeFeatureName :: (Text -> f Text) -> CreateFeatureGroup -> f CreateFeatureGroup
createFeatureGroup_eventTimeFeatureName = (CreateFeatureGroup -> Text)
-> (CreateFeatureGroup -> Text -> CreateFeatureGroup)
-> Lens CreateFeatureGroup CreateFeatureGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFeatureGroup' {Text
eventTimeFeatureName :: Text
$sel:eventTimeFeatureName:CreateFeatureGroup' :: CreateFeatureGroup -> Text
eventTimeFeatureName} -> Text
eventTimeFeatureName) (\s :: CreateFeatureGroup
s@CreateFeatureGroup' {} Text
a -> CreateFeatureGroup
s {$sel:eventTimeFeatureName:CreateFeatureGroup' :: Text
eventTimeFeatureName = Text
a} :: CreateFeatureGroup)
createFeatureGroup_featureDefinitions :: Lens.Lens' CreateFeatureGroup (Prelude.NonEmpty FeatureDefinition)
createFeatureGroup_featureDefinitions :: (NonEmpty FeatureDefinition -> f (NonEmpty FeatureDefinition))
-> CreateFeatureGroup -> f CreateFeatureGroup
createFeatureGroup_featureDefinitions = (CreateFeatureGroup -> NonEmpty FeatureDefinition)
-> (CreateFeatureGroup
-> NonEmpty FeatureDefinition -> CreateFeatureGroup)
-> Lens
CreateFeatureGroup
CreateFeatureGroup
(NonEmpty FeatureDefinition)
(NonEmpty FeatureDefinition)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFeatureGroup' {NonEmpty FeatureDefinition
featureDefinitions :: NonEmpty FeatureDefinition
$sel:featureDefinitions:CreateFeatureGroup' :: CreateFeatureGroup -> NonEmpty FeatureDefinition
featureDefinitions} -> NonEmpty FeatureDefinition
featureDefinitions) (\s :: CreateFeatureGroup
s@CreateFeatureGroup' {} NonEmpty FeatureDefinition
a -> CreateFeatureGroup
s {$sel:featureDefinitions:CreateFeatureGroup' :: NonEmpty FeatureDefinition
featureDefinitions = NonEmpty FeatureDefinition
a} :: CreateFeatureGroup) ((NonEmpty FeatureDefinition -> f (NonEmpty FeatureDefinition))
-> CreateFeatureGroup -> f CreateFeatureGroup)
-> ((NonEmpty FeatureDefinition -> f (NonEmpty FeatureDefinition))
-> NonEmpty FeatureDefinition -> f (NonEmpty FeatureDefinition))
-> (NonEmpty FeatureDefinition -> f (NonEmpty FeatureDefinition))
-> CreateFeatureGroup
-> f CreateFeatureGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty FeatureDefinition -> f (NonEmpty FeatureDefinition))
-> NonEmpty FeatureDefinition -> f (NonEmpty FeatureDefinition)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSRequest CreateFeatureGroup where
type
AWSResponse CreateFeatureGroup =
CreateFeatureGroupResponse
request :: CreateFeatureGroup -> Request CreateFeatureGroup
request = Service -> CreateFeatureGroup -> Request CreateFeatureGroup
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateFeatureGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateFeatureGroup)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateFeatureGroup))
-> Logger
-> Service
-> Proxy CreateFeatureGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateFeatureGroup)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Int -> Text -> CreateFeatureGroupResponse
CreateFeatureGroupResponse'
(Int -> Text -> CreateFeatureGroupResponse)
-> Either String Int
-> Either String (Text -> CreateFeatureGroupResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
Either String (Text -> CreateFeatureGroupResponse)
-> Either String Text -> Either String CreateFeatureGroupResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"FeatureGroupArn")
)
instance Prelude.Hashable CreateFeatureGroup
instance Prelude.NFData CreateFeatureGroup
instance Core.ToHeaders CreateFeatureGroup where
toHeaders :: CreateFeatureGroup -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateFeatureGroup -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"SageMaker.CreateFeatureGroup" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON CreateFeatureGroup where
toJSON :: CreateFeatureGroup -> Value
toJSON CreateFeatureGroup' {Maybe [Tag]
Maybe Text
Maybe OnlineStoreConfig
Maybe OfflineStoreConfig
NonEmpty FeatureDefinition
Text
featureDefinitions :: NonEmpty FeatureDefinition
eventTimeFeatureName :: Text
recordIdentifierFeatureName :: Text
featureGroupName :: Text
roleArn :: Maybe Text
tags :: Maybe [Tag]
description :: Maybe Text
onlineStoreConfig :: Maybe OnlineStoreConfig
offlineStoreConfig :: Maybe OfflineStoreConfig
$sel:featureDefinitions:CreateFeatureGroup' :: CreateFeatureGroup -> NonEmpty FeatureDefinition
$sel:eventTimeFeatureName:CreateFeatureGroup' :: CreateFeatureGroup -> Text
$sel:recordIdentifierFeatureName:CreateFeatureGroup' :: CreateFeatureGroup -> Text
$sel:featureGroupName:CreateFeatureGroup' :: CreateFeatureGroup -> Text
$sel:roleArn:CreateFeatureGroup' :: CreateFeatureGroup -> Maybe Text
$sel:tags:CreateFeatureGroup' :: CreateFeatureGroup -> Maybe [Tag]
$sel:description:CreateFeatureGroup' :: CreateFeatureGroup -> Maybe Text
$sel:onlineStoreConfig:CreateFeatureGroup' :: CreateFeatureGroup -> Maybe OnlineStoreConfig
$sel:offlineStoreConfig:CreateFeatureGroup' :: CreateFeatureGroup -> Maybe OfflineStoreConfig
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"OfflineStoreConfig" Text -> OfflineStoreConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(OfflineStoreConfig -> Pair)
-> Maybe OfflineStoreConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OfflineStoreConfig
offlineStoreConfig,
(Text
"OnlineStoreConfig" Text -> OnlineStoreConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(OnlineStoreConfig -> Pair)
-> Maybe OnlineStoreConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OnlineStoreConfig
onlineStoreConfig,
(Text
"Description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
(Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
(Text
"RoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
roleArn,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"FeatureGroupName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
featureGroupName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"RecordIdentifierFeatureName"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
recordIdentifierFeatureName
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"EventTimeFeatureName"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
eventTimeFeatureName
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"FeatureDefinitions" Text -> NonEmpty FeatureDefinition -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty FeatureDefinition
featureDefinitions)
]
)
instance Core.ToPath CreateFeatureGroup where
toPath :: CreateFeatureGroup -> ByteString
toPath = ByteString -> CreateFeatureGroup -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateFeatureGroup where
toQuery :: CreateFeatureGroup -> QueryString
toQuery = QueryString -> CreateFeatureGroup -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateFeatureGroupResponse = CreateFeatureGroupResponse'
{
CreateFeatureGroupResponse -> Int
httpStatus :: Prelude.Int,
CreateFeatureGroupResponse -> Text
featureGroupArn :: Prelude.Text
}
deriving (CreateFeatureGroupResponse -> CreateFeatureGroupResponse -> Bool
(CreateFeatureGroupResponse -> CreateFeatureGroupResponse -> Bool)
-> (CreateFeatureGroupResponse
-> CreateFeatureGroupResponse -> Bool)
-> Eq CreateFeatureGroupResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateFeatureGroupResponse -> CreateFeatureGroupResponse -> Bool
$c/= :: CreateFeatureGroupResponse -> CreateFeatureGroupResponse -> Bool
== :: CreateFeatureGroupResponse -> CreateFeatureGroupResponse -> Bool
$c== :: CreateFeatureGroupResponse -> CreateFeatureGroupResponse -> Bool
Prelude.Eq, ReadPrec [CreateFeatureGroupResponse]
ReadPrec CreateFeatureGroupResponse
Int -> ReadS CreateFeatureGroupResponse
ReadS [CreateFeatureGroupResponse]
(Int -> ReadS CreateFeatureGroupResponse)
-> ReadS [CreateFeatureGroupResponse]
-> ReadPrec CreateFeatureGroupResponse
-> ReadPrec [CreateFeatureGroupResponse]
-> Read CreateFeatureGroupResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateFeatureGroupResponse]
$creadListPrec :: ReadPrec [CreateFeatureGroupResponse]
readPrec :: ReadPrec CreateFeatureGroupResponse
$creadPrec :: ReadPrec CreateFeatureGroupResponse
readList :: ReadS [CreateFeatureGroupResponse]
$creadList :: ReadS [CreateFeatureGroupResponse]
readsPrec :: Int -> ReadS CreateFeatureGroupResponse
$creadsPrec :: Int -> ReadS CreateFeatureGroupResponse
Prelude.Read, Int -> CreateFeatureGroupResponse -> ShowS
[CreateFeatureGroupResponse] -> ShowS
CreateFeatureGroupResponse -> String
(Int -> CreateFeatureGroupResponse -> ShowS)
-> (CreateFeatureGroupResponse -> String)
-> ([CreateFeatureGroupResponse] -> ShowS)
-> Show CreateFeatureGroupResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateFeatureGroupResponse] -> ShowS
$cshowList :: [CreateFeatureGroupResponse] -> ShowS
show :: CreateFeatureGroupResponse -> String
$cshow :: CreateFeatureGroupResponse -> String
showsPrec :: Int -> CreateFeatureGroupResponse -> ShowS
$cshowsPrec :: Int -> CreateFeatureGroupResponse -> ShowS
Prelude.Show, (forall x.
CreateFeatureGroupResponse -> Rep CreateFeatureGroupResponse x)
-> (forall x.
Rep CreateFeatureGroupResponse x -> CreateFeatureGroupResponse)
-> Generic CreateFeatureGroupResponse
forall x.
Rep CreateFeatureGroupResponse x -> CreateFeatureGroupResponse
forall x.
CreateFeatureGroupResponse -> Rep CreateFeatureGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateFeatureGroupResponse x -> CreateFeatureGroupResponse
$cfrom :: forall x.
CreateFeatureGroupResponse -> Rep CreateFeatureGroupResponse x
Prelude.Generic)
newCreateFeatureGroupResponse ::
Prelude.Int ->
Prelude.Text ->
CreateFeatureGroupResponse
newCreateFeatureGroupResponse :: Int -> Text -> CreateFeatureGroupResponse
newCreateFeatureGroupResponse
Int
pHttpStatus_
Text
pFeatureGroupArn_ =
CreateFeatureGroupResponse' :: Int -> Text -> CreateFeatureGroupResponse
CreateFeatureGroupResponse'
{ $sel:httpStatus:CreateFeatureGroupResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:featureGroupArn:CreateFeatureGroupResponse' :: Text
featureGroupArn = Text
pFeatureGroupArn_
}
createFeatureGroupResponse_httpStatus :: Lens.Lens' CreateFeatureGroupResponse Prelude.Int
createFeatureGroupResponse_httpStatus :: (Int -> f Int)
-> CreateFeatureGroupResponse -> f CreateFeatureGroupResponse
createFeatureGroupResponse_httpStatus = (CreateFeatureGroupResponse -> Int)
-> (CreateFeatureGroupResponse
-> Int -> CreateFeatureGroupResponse)
-> Lens
CreateFeatureGroupResponse CreateFeatureGroupResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFeatureGroupResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateFeatureGroupResponse' :: CreateFeatureGroupResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateFeatureGroupResponse
s@CreateFeatureGroupResponse' {} Int
a -> CreateFeatureGroupResponse
s {$sel:httpStatus:CreateFeatureGroupResponse' :: Int
httpStatus = Int
a} :: CreateFeatureGroupResponse)
createFeatureGroupResponse_featureGroupArn :: Lens.Lens' CreateFeatureGroupResponse Prelude.Text
createFeatureGroupResponse_featureGroupArn :: (Text -> f Text)
-> CreateFeatureGroupResponse -> f CreateFeatureGroupResponse
createFeatureGroupResponse_featureGroupArn = (CreateFeatureGroupResponse -> Text)
-> (CreateFeatureGroupResponse
-> Text -> CreateFeatureGroupResponse)
-> Lens
CreateFeatureGroupResponse CreateFeatureGroupResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFeatureGroupResponse' {Text
featureGroupArn :: Text
$sel:featureGroupArn:CreateFeatureGroupResponse' :: CreateFeatureGroupResponse -> Text
featureGroupArn} -> Text
featureGroupArn) (\s :: CreateFeatureGroupResponse
s@CreateFeatureGroupResponse' {} Text
a -> CreateFeatureGroupResponse
s {$sel:featureGroupArn:CreateFeatureGroupResponse' :: Text
featureGroupArn = Text
a} :: CreateFeatureGroupResponse)
instance Prelude.NFData CreateFeatureGroupResponse