{-# 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.IotTwinMaker.CreateComponentType
(
CreateComponentType (..),
newCreateComponentType,
createComponentType_componentTypeName,
createComponentType_description,
createComponentType_extendsFrom,
createComponentType_functions,
createComponentType_isSingleton,
createComponentType_propertyDefinitions,
createComponentType_propertyGroups,
createComponentType_tags,
createComponentType_workspaceId,
createComponentType_componentTypeId,
CreateComponentTypeResponse (..),
newCreateComponentTypeResponse,
createComponentTypeResponse_httpStatus,
createComponentTypeResponse_arn,
createComponentTypeResponse_creationDateTime,
createComponentTypeResponse_state,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IotTwinMaker.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateComponentType = CreateComponentType'
{
CreateComponentType -> Maybe Text
componentTypeName :: Prelude.Maybe Prelude.Text,
CreateComponentType -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateComponentType -> Maybe [Text]
extendsFrom :: Prelude.Maybe [Prelude.Text],
CreateComponentType -> Maybe (HashMap Text FunctionRequest)
functions :: Prelude.Maybe (Prelude.HashMap Prelude.Text FunctionRequest),
CreateComponentType -> Maybe Bool
isSingleton :: Prelude.Maybe Prelude.Bool,
CreateComponentType
-> Maybe (HashMap Text PropertyDefinitionRequest)
propertyDefinitions :: Prelude.Maybe (Prelude.HashMap Prelude.Text PropertyDefinitionRequest),
CreateComponentType -> Maybe (HashMap Text PropertyGroupRequest)
propertyGroups :: Prelude.Maybe (Prelude.HashMap Prelude.Text PropertyGroupRequest),
CreateComponentType -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateComponentType -> Text
workspaceId :: Prelude.Text,
CreateComponentType -> Text
componentTypeId :: Prelude.Text
}
deriving (CreateComponentType -> CreateComponentType -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateComponentType -> CreateComponentType -> Bool
$c/= :: CreateComponentType -> CreateComponentType -> Bool
== :: CreateComponentType -> CreateComponentType -> Bool
$c== :: CreateComponentType -> CreateComponentType -> Bool
Prelude.Eq, ReadPrec [CreateComponentType]
ReadPrec CreateComponentType
Int -> ReadS CreateComponentType
ReadS [CreateComponentType]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateComponentType]
$creadListPrec :: ReadPrec [CreateComponentType]
readPrec :: ReadPrec CreateComponentType
$creadPrec :: ReadPrec CreateComponentType
readList :: ReadS [CreateComponentType]
$creadList :: ReadS [CreateComponentType]
readsPrec :: Int -> ReadS CreateComponentType
$creadsPrec :: Int -> ReadS CreateComponentType
Prelude.Read, Int -> CreateComponentType -> ShowS
[CreateComponentType] -> ShowS
CreateComponentType -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateComponentType] -> ShowS
$cshowList :: [CreateComponentType] -> ShowS
show :: CreateComponentType -> String
$cshow :: CreateComponentType -> String
showsPrec :: Int -> CreateComponentType -> ShowS
$cshowsPrec :: Int -> CreateComponentType -> ShowS
Prelude.Show, forall x. Rep CreateComponentType x -> CreateComponentType
forall x. CreateComponentType -> Rep CreateComponentType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateComponentType x -> CreateComponentType
$cfrom :: forall x. CreateComponentType -> Rep CreateComponentType x
Prelude.Generic)
newCreateComponentType ::
Prelude.Text ->
Prelude.Text ->
CreateComponentType
newCreateComponentType :: Text -> Text -> CreateComponentType
newCreateComponentType
Text
pWorkspaceId_
Text
pComponentTypeId_ =
CreateComponentType'
{ $sel:componentTypeName:CreateComponentType' :: Maybe Text
componentTypeName =
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateComponentType' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:extendsFrom:CreateComponentType' :: Maybe [Text]
extendsFrom = forall a. Maybe a
Prelude.Nothing,
$sel:functions:CreateComponentType' :: Maybe (HashMap Text FunctionRequest)
functions = forall a. Maybe a
Prelude.Nothing,
$sel:isSingleton:CreateComponentType' :: Maybe Bool
isSingleton = forall a. Maybe a
Prelude.Nothing,
$sel:propertyDefinitions:CreateComponentType' :: Maybe (HashMap Text PropertyDefinitionRequest)
propertyDefinitions = forall a. Maybe a
Prelude.Nothing,
$sel:propertyGroups:CreateComponentType' :: Maybe (HashMap Text PropertyGroupRequest)
propertyGroups = forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateComponentType' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
$sel:workspaceId:CreateComponentType' :: Text
workspaceId = Text
pWorkspaceId_,
$sel:componentTypeId:CreateComponentType' :: Text
componentTypeId = Text
pComponentTypeId_
}
createComponentType_componentTypeName :: Lens.Lens' CreateComponentType (Prelude.Maybe Prelude.Text)
createComponentType_componentTypeName :: Lens' CreateComponentType (Maybe Text)
createComponentType_componentTypeName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateComponentType' {Maybe Text
componentTypeName :: Maybe Text
$sel:componentTypeName:CreateComponentType' :: CreateComponentType -> Maybe Text
componentTypeName} -> Maybe Text
componentTypeName) (\s :: CreateComponentType
s@CreateComponentType' {} Maybe Text
a -> CreateComponentType
s {$sel:componentTypeName:CreateComponentType' :: Maybe Text
componentTypeName = Maybe Text
a} :: CreateComponentType)
createComponentType_description :: Lens.Lens' CreateComponentType (Prelude.Maybe Prelude.Text)
createComponentType_description :: Lens' CreateComponentType (Maybe Text)
createComponentType_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateComponentType' {Maybe Text
description :: Maybe Text
$sel:description:CreateComponentType' :: CreateComponentType -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateComponentType
s@CreateComponentType' {} Maybe Text
a -> CreateComponentType
s {$sel:description:CreateComponentType' :: Maybe Text
description = Maybe Text
a} :: CreateComponentType)
createComponentType_extendsFrom :: Lens.Lens' CreateComponentType (Prelude.Maybe [Prelude.Text])
createComponentType_extendsFrom :: Lens' CreateComponentType (Maybe [Text])
createComponentType_extendsFrom = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateComponentType' {Maybe [Text]
extendsFrom :: Maybe [Text]
$sel:extendsFrom:CreateComponentType' :: CreateComponentType -> Maybe [Text]
extendsFrom} -> Maybe [Text]
extendsFrom) (\s :: CreateComponentType
s@CreateComponentType' {} Maybe [Text]
a -> CreateComponentType
s {$sel:extendsFrom:CreateComponentType' :: Maybe [Text]
extendsFrom = Maybe [Text]
a} :: CreateComponentType) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createComponentType_functions :: Lens.Lens' CreateComponentType (Prelude.Maybe (Prelude.HashMap Prelude.Text FunctionRequest))
createComponentType_functions :: Lens' CreateComponentType (Maybe (HashMap Text FunctionRequest))
createComponentType_functions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateComponentType' {Maybe (HashMap Text FunctionRequest)
functions :: Maybe (HashMap Text FunctionRequest)
$sel:functions:CreateComponentType' :: CreateComponentType -> Maybe (HashMap Text FunctionRequest)
functions} -> Maybe (HashMap Text FunctionRequest)
functions) (\s :: CreateComponentType
s@CreateComponentType' {} Maybe (HashMap Text FunctionRequest)
a -> CreateComponentType
s {$sel:functions:CreateComponentType' :: Maybe (HashMap Text FunctionRequest)
functions = Maybe (HashMap Text FunctionRequest)
a} :: CreateComponentType) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createComponentType_isSingleton :: Lens.Lens' CreateComponentType (Prelude.Maybe Prelude.Bool)
createComponentType_isSingleton :: Lens' CreateComponentType (Maybe Bool)
createComponentType_isSingleton = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateComponentType' {Maybe Bool
isSingleton :: Maybe Bool
$sel:isSingleton:CreateComponentType' :: CreateComponentType -> Maybe Bool
isSingleton} -> Maybe Bool
isSingleton) (\s :: CreateComponentType
s@CreateComponentType' {} Maybe Bool
a -> CreateComponentType
s {$sel:isSingleton:CreateComponentType' :: Maybe Bool
isSingleton = Maybe Bool
a} :: CreateComponentType)
createComponentType_propertyDefinitions :: Lens.Lens' CreateComponentType (Prelude.Maybe (Prelude.HashMap Prelude.Text PropertyDefinitionRequest))
createComponentType_propertyDefinitions :: Lens'
CreateComponentType
(Maybe (HashMap Text PropertyDefinitionRequest))
createComponentType_propertyDefinitions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateComponentType' {Maybe (HashMap Text PropertyDefinitionRequest)
propertyDefinitions :: Maybe (HashMap Text PropertyDefinitionRequest)
$sel:propertyDefinitions:CreateComponentType' :: CreateComponentType
-> Maybe (HashMap Text PropertyDefinitionRequest)
propertyDefinitions} -> Maybe (HashMap Text PropertyDefinitionRequest)
propertyDefinitions) (\s :: CreateComponentType
s@CreateComponentType' {} Maybe (HashMap Text PropertyDefinitionRequest)
a -> CreateComponentType
s {$sel:propertyDefinitions:CreateComponentType' :: Maybe (HashMap Text PropertyDefinitionRequest)
propertyDefinitions = Maybe (HashMap Text PropertyDefinitionRequest)
a} :: CreateComponentType) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createComponentType_propertyGroups :: Lens.Lens' CreateComponentType (Prelude.Maybe (Prelude.HashMap Prelude.Text PropertyGroupRequest))
createComponentType_propertyGroups :: Lens'
CreateComponentType (Maybe (HashMap Text PropertyGroupRequest))
createComponentType_propertyGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateComponentType' {Maybe (HashMap Text PropertyGroupRequest)
propertyGroups :: Maybe (HashMap Text PropertyGroupRequest)
$sel:propertyGroups:CreateComponentType' :: CreateComponentType -> Maybe (HashMap Text PropertyGroupRequest)
propertyGroups} -> Maybe (HashMap Text PropertyGroupRequest)
propertyGroups) (\s :: CreateComponentType
s@CreateComponentType' {} Maybe (HashMap Text PropertyGroupRequest)
a -> CreateComponentType
s {$sel:propertyGroups:CreateComponentType' :: Maybe (HashMap Text PropertyGroupRequest)
propertyGroups = Maybe (HashMap Text PropertyGroupRequest)
a} :: CreateComponentType) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createComponentType_tags :: Lens.Lens' CreateComponentType (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createComponentType_tags :: Lens' CreateComponentType (Maybe (HashMap Text Text))
createComponentType_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateComponentType' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateComponentType' :: CreateComponentType -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateComponentType
s@CreateComponentType' {} Maybe (HashMap Text Text)
a -> CreateComponentType
s {$sel:tags:CreateComponentType' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateComponentType) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createComponentType_workspaceId :: Lens.Lens' CreateComponentType Prelude.Text
createComponentType_workspaceId :: Lens' CreateComponentType Text
createComponentType_workspaceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateComponentType' {Text
workspaceId :: Text
$sel:workspaceId:CreateComponentType' :: CreateComponentType -> Text
workspaceId} -> Text
workspaceId) (\s :: CreateComponentType
s@CreateComponentType' {} Text
a -> CreateComponentType
s {$sel:workspaceId:CreateComponentType' :: Text
workspaceId = Text
a} :: CreateComponentType)
createComponentType_componentTypeId :: Lens.Lens' CreateComponentType Prelude.Text
createComponentType_componentTypeId :: Lens' CreateComponentType Text
createComponentType_componentTypeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateComponentType' {Text
componentTypeId :: Text
$sel:componentTypeId:CreateComponentType' :: CreateComponentType -> Text
componentTypeId} -> Text
componentTypeId) (\s :: CreateComponentType
s@CreateComponentType' {} Text
a -> CreateComponentType
s {$sel:componentTypeId:CreateComponentType' :: Text
componentTypeId = Text
a} :: CreateComponentType)
instance Core.AWSRequest CreateComponentType where
type
AWSResponse CreateComponentType =
CreateComponentTypeResponse
request :: (Service -> Service)
-> CreateComponentType -> Request CreateComponentType
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateComponentType
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateComponentType)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Int -> Text -> POSIX -> State -> CreateComponentTypeResponse
CreateComponentTypeResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"arn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"creationDateTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"state")
)
instance Prelude.Hashable CreateComponentType where
hashWithSalt :: Int -> CreateComponentType -> Int
hashWithSalt Int
_salt CreateComponentType' {Maybe Bool
Maybe [Text]
Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text PropertyGroupRequest)
Maybe (HashMap Text FunctionRequest)
Maybe (HashMap Text PropertyDefinitionRequest)
Text
componentTypeId :: Text
workspaceId :: Text
tags :: Maybe (HashMap Text Text)
propertyGroups :: Maybe (HashMap Text PropertyGroupRequest)
propertyDefinitions :: Maybe (HashMap Text PropertyDefinitionRequest)
isSingleton :: Maybe Bool
functions :: Maybe (HashMap Text FunctionRequest)
extendsFrom :: Maybe [Text]
description :: Maybe Text
componentTypeName :: Maybe Text
$sel:componentTypeId:CreateComponentType' :: CreateComponentType -> Text
$sel:workspaceId:CreateComponentType' :: CreateComponentType -> Text
$sel:tags:CreateComponentType' :: CreateComponentType -> Maybe (HashMap Text Text)
$sel:propertyGroups:CreateComponentType' :: CreateComponentType -> Maybe (HashMap Text PropertyGroupRequest)
$sel:propertyDefinitions:CreateComponentType' :: CreateComponentType
-> Maybe (HashMap Text PropertyDefinitionRequest)
$sel:isSingleton:CreateComponentType' :: CreateComponentType -> Maybe Bool
$sel:functions:CreateComponentType' :: CreateComponentType -> Maybe (HashMap Text FunctionRequest)
$sel:extendsFrom:CreateComponentType' :: CreateComponentType -> Maybe [Text]
$sel:description:CreateComponentType' :: CreateComponentType -> Maybe Text
$sel:componentTypeName:CreateComponentType' :: CreateComponentType -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
componentTypeName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
extendsFrom
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text FunctionRequest)
functions
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
isSingleton
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text PropertyDefinitionRequest)
propertyDefinitions
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text PropertyGroupRequest)
propertyGroups
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
workspaceId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
componentTypeId
instance Prelude.NFData CreateComponentType where
rnf :: CreateComponentType -> ()
rnf CreateComponentType' {Maybe Bool
Maybe [Text]
Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text PropertyGroupRequest)
Maybe (HashMap Text FunctionRequest)
Maybe (HashMap Text PropertyDefinitionRequest)
Text
componentTypeId :: Text
workspaceId :: Text
tags :: Maybe (HashMap Text Text)
propertyGroups :: Maybe (HashMap Text PropertyGroupRequest)
propertyDefinitions :: Maybe (HashMap Text PropertyDefinitionRequest)
isSingleton :: Maybe Bool
functions :: Maybe (HashMap Text FunctionRequest)
extendsFrom :: Maybe [Text]
description :: Maybe Text
componentTypeName :: Maybe Text
$sel:componentTypeId:CreateComponentType' :: CreateComponentType -> Text
$sel:workspaceId:CreateComponentType' :: CreateComponentType -> Text
$sel:tags:CreateComponentType' :: CreateComponentType -> Maybe (HashMap Text Text)
$sel:propertyGroups:CreateComponentType' :: CreateComponentType -> Maybe (HashMap Text PropertyGroupRequest)
$sel:propertyDefinitions:CreateComponentType' :: CreateComponentType
-> Maybe (HashMap Text PropertyDefinitionRequest)
$sel:isSingleton:CreateComponentType' :: CreateComponentType -> Maybe Bool
$sel:functions:CreateComponentType' :: CreateComponentType -> Maybe (HashMap Text FunctionRequest)
$sel:extendsFrom:CreateComponentType' :: CreateComponentType -> Maybe [Text]
$sel:description:CreateComponentType' :: CreateComponentType -> Maybe Text
$sel:componentTypeName:CreateComponentType' :: CreateComponentType -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
componentTypeName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
extendsFrom
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text FunctionRequest)
functions
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
isSingleton
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text PropertyDefinitionRequest)
propertyDefinitions
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text PropertyGroupRequest)
propertyGroups
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
workspaceId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
componentTypeId
instance Data.ToHeaders CreateComponentType where
toHeaders :: CreateComponentType -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON CreateComponentType where
toJSON :: CreateComponentType -> Value
toJSON CreateComponentType' {Maybe Bool
Maybe [Text]
Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text PropertyGroupRequest)
Maybe (HashMap Text FunctionRequest)
Maybe (HashMap Text PropertyDefinitionRequest)
Text
componentTypeId :: Text
workspaceId :: Text
tags :: Maybe (HashMap Text Text)
propertyGroups :: Maybe (HashMap Text PropertyGroupRequest)
propertyDefinitions :: Maybe (HashMap Text PropertyDefinitionRequest)
isSingleton :: Maybe Bool
functions :: Maybe (HashMap Text FunctionRequest)
extendsFrom :: Maybe [Text]
description :: Maybe Text
componentTypeName :: Maybe Text
$sel:componentTypeId:CreateComponentType' :: CreateComponentType -> Text
$sel:workspaceId:CreateComponentType' :: CreateComponentType -> Text
$sel:tags:CreateComponentType' :: CreateComponentType -> Maybe (HashMap Text Text)
$sel:propertyGroups:CreateComponentType' :: CreateComponentType -> Maybe (HashMap Text PropertyGroupRequest)
$sel:propertyDefinitions:CreateComponentType' :: CreateComponentType
-> Maybe (HashMap Text PropertyDefinitionRequest)
$sel:isSingleton:CreateComponentType' :: CreateComponentType -> Maybe Bool
$sel:functions:CreateComponentType' :: CreateComponentType -> Maybe (HashMap Text FunctionRequest)
$sel:extendsFrom:CreateComponentType' :: CreateComponentType -> Maybe [Text]
$sel:description:CreateComponentType' :: CreateComponentType -> Maybe Text
$sel:componentTypeName:CreateComponentType' :: CreateComponentType -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"componentTypeName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
componentTypeName,
(Key
"description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
(Key
"extendsFrom" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
extendsFrom,
(Key
"functions" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text FunctionRequest)
functions,
(Key
"isSingleton" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
isSingleton,
(Key
"propertyDefinitions" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text PropertyDefinitionRequest)
propertyDefinitions,
(Key
"propertyGroups" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text PropertyGroupRequest)
propertyGroups,
(Key
"tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags
]
)
instance Data.ToPath CreateComponentType where
toPath :: CreateComponentType -> ByteString
toPath CreateComponentType' {Maybe Bool
Maybe [Text]
Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text PropertyGroupRequest)
Maybe (HashMap Text FunctionRequest)
Maybe (HashMap Text PropertyDefinitionRequest)
Text
componentTypeId :: Text
workspaceId :: Text
tags :: Maybe (HashMap Text Text)
propertyGroups :: Maybe (HashMap Text PropertyGroupRequest)
propertyDefinitions :: Maybe (HashMap Text PropertyDefinitionRequest)
isSingleton :: Maybe Bool
functions :: Maybe (HashMap Text FunctionRequest)
extendsFrom :: Maybe [Text]
description :: Maybe Text
componentTypeName :: Maybe Text
$sel:componentTypeId:CreateComponentType' :: CreateComponentType -> Text
$sel:workspaceId:CreateComponentType' :: CreateComponentType -> Text
$sel:tags:CreateComponentType' :: CreateComponentType -> Maybe (HashMap Text Text)
$sel:propertyGroups:CreateComponentType' :: CreateComponentType -> Maybe (HashMap Text PropertyGroupRequest)
$sel:propertyDefinitions:CreateComponentType' :: CreateComponentType
-> Maybe (HashMap Text PropertyDefinitionRequest)
$sel:isSingleton:CreateComponentType' :: CreateComponentType -> Maybe Bool
$sel:functions:CreateComponentType' :: CreateComponentType -> Maybe (HashMap Text FunctionRequest)
$sel:extendsFrom:CreateComponentType' :: CreateComponentType -> Maybe [Text]
$sel:description:CreateComponentType' :: CreateComponentType -> Maybe Text
$sel:componentTypeName:CreateComponentType' :: CreateComponentType -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/workspaces/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
workspaceId,
ByteString
"/component-types/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
componentTypeId
]
instance Data.ToQuery CreateComponentType where
toQuery :: CreateComponentType -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data CreateComponentTypeResponse = CreateComponentTypeResponse'
{
CreateComponentTypeResponse -> Int
httpStatus :: Prelude.Int,
CreateComponentTypeResponse -> Text
arn :: Prelude.Text,
CreateComponentTypeResponse -> POSIX
creationDateTime :: Data.POSIX,
CreateComponentTypeResponse -> State
state :: State
}
deriving (CreateComponentTypeResponse -> CreateComponentTypeResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateComponentTypeResponse -> CreateComponentTypeResponse -> Bool
$c/= :: CreateComponentTypeResponse -> CreateComponentTypeResponse -> Bool
== :: CreateComponentTypeResponse -> CreateComponentTypeResponse -> Bool
$c== :: CreateComponentTypeResponse -> CreateComponentTypeResponse -> Bool
Prelude.Eq, ReadPrec [CreateComponentTypeResponse]
ReadPrec CreateComponentTypeResponse
Int -> ReadS CreateComponentTypeResponse
ReadS [CreateComponentTypeResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateComponentTypeResponse]
$creadListPrec :: ReadPrec [CreateComponentTypeResponse]
readPrec :: ReadPrec CreateComponentTypeResponse
$creadPrec :: ReadPrec CreateComponentTypeResponse
readList :: ReadS [CreateComponentTypeResponse]
$creadList :: ReadS [CreateComponentTypeResponse]
readsPrec :: Int -> ReadS CreateComponentTypeResponse
$creadsPrec :: Int -> ReadS CreateComponentTypeResponse
Prelude.Read, Int -> CreateComponentTypeResponse -> ShowS
[CreateComponentTypeResponse] -> ShowS
CreateComponentTypeResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateComponentTypeResponse] -> ShowS
$cshowList :: [CreateComponentTypeResponse] -> ShowS
show :: CreateComponentTypeResponse -> String
$cshow :: CreateComponentTypeResponse -> String
showsPrec :: Int -> CreateComponentTypeResponse -> ShowS
$cshowsPrec :: Int -> CreateComponentTypeResponse -> ShowS
Prelude.Show, forall x.
Rep CreateComponentTypeResponse x -> CreateComponentTypeResponse
forall x.
CreateComponentTypeResponse -> Rep CreateComponentTypeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateComponentTypeResponse x -> CreateComponentTypeResponse
$cfrom :: forall x.
CreateComponentTypeResponse -> Rep CreateComponentTypeResponse x
Prelude.Generic)
newCreateComponentTypeResponse ::
Prelude.Int ->
Prelude.Text ->
Prelude.UTCTime ->
State ->
CreateComponentTypeResponse
newCreateComponentTypeResponse :: Int -> Text -> UTCTime -> State -> CreateComponentTypeResponse
newCreateComponentTypeResponse
Int
pHttpStatus_
Text
pArn_
UTCTime
pCreationDateTime_
State
pState_ =
CreateComponentTypeResponse'
{ $sel:httpStatus:CreateComponentTypeResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:arn:CreateComponentTypeResponse' :: Text
arn = Text
pArn_,
$sel:creationDateTime:CreateComponentTypeResponse' :: POSIX
creationDateTime =
forall (a :: Format). Iso' (Time a) UTCTime
Data._Time forall t b. AReview t b -> b -> t
Lens.# UTCTime
pCreationDateTime_,
$sel:state:CreateComponentTypeResponse' :: State
state = State
pState_
}
createComponentTypeResponse_httpStatus :: Lens.Lens' CreateComponentTypeResponse Prelude.Int
createComponentTypeResponse_httpStatus :: Lens' CreateComponentTypeResponse Int
createComponentTypeResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateComponentTypeResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateComponentTypeResponse' :: CreateComponentTypeResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateComponentTypeResponse
s@CreateComponentTypeResponse' {} Int
a -> CreateComponentTypeResponse
s {$sel:httpStatus:CreateComponentTypeResponse' :: Int
httpStatus = Int
a} :: CreateComponentTypeResponse)
createComponentTypeResponse_arn :: Lens.Lens' CreateComponentTypeResponse Prelude.Text
createComponentTypeResponse_arn :: Lens' CreateComponentTypeResponse Text
createComponentTypeResponse_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateComponentTypeResponse' {Text
arn :: Text
$sel:arn:CreateComponentTypeResponse' :: CreateComponentTypeResponse -> Text
arn} -> Text
arn) (\s :: CreateComponentTypeResponse
s@CreateComponentTypeResponse' {} Text
a -> CreateComponentTypeResponse
s {$sel:arn:CreateComponentTypeResponse' :: Text
arn = Text
a} :: CreateComponentTypeResponse)
createComponentTypeResponse_creationDateTime :: Lens.Lens' CreateComponentTypeResponse Prelude.UTCTime
createComponentTypeResponse_creationDateTime :: Lens' CreateComponentTypeResponse UTCTime
createComponentTypeResponse_creationDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateComponentTypeResponse' {POSIX
creationDateTime :: POSIX
$sel:creationDateTime:CreateComponentTypeResponse' :: CreateComponentTypeResponse -> POSIX
creationDateTime} -> POSIX
creationDateTime) (\s :: CreateComponentTypeResponse
s@CreateComponentTypeResponse' {} POSIX
a -> CreateComponentTypeResponse
s {$sel:creationDateTime:CreateComponentTypeResponse' :: POSIX
creationDateTime = POSIX
a} :: CreateComponentTypeResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
createComponentTypeResponse_state :: Lens.Lens' CreateComponentTypeResponse State
createComponentTypeResponse_state :: Lens' CreateComponentTypeResponse State
createComponentTypeResponse_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateComponentTypeResponse' {State
state :: State
$sel:state:CreateComponentTypeResponse' :: CreateComponentTypeResponse -> State
state} -> State
state) (\s :: CreateComponentTypeResponse
s@CreateComponentTypeResponse' {} State
a -> CreateComponentTypeResponse
s {$sel:state:CreateComponentTypeResponse' :: State
state = State
a} :: CreateComponentTypeResponse)
instance Prelude.NFData CreateComponentTypeResponse where
rnf :: CreateComponentTypeResponse -> ()
rnf CreateComponentTypeResponse' {Int
Text
POSIX
State
state :: State
creationDateTime :: POSIX
arn :: Text
httpStatus :: Int
$sel:state:CreateComponentTypeResponse' :: CreateComponentTypeResponse -> State
$sel:creationDateTime:CreateComponentTypeResponse' :: CreateComponentTypeResponse -> POSIX
$sel:arn:CreateComponentTypeResponse' :: CreateComponentTypeResponse -> Text
$sel:httpStatus:CreateComponentTypeResponse' :: CreateComponentTypeResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf POSIX
creationDateTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf State
state