{-# 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.UpdateComponentType
(
UpdateComponentType (..),
newUpdateComponentType,
updateComponentType_componentTypeName,
updateComponentType_description,
updateComponentType_extendsFrom,
updateComponentType_functions,
updateComponentType_isSingleton,
updateComponentType_propertyDefinitions,
updateComponentType_propertyGroups,
updateComponentType_workspaceId,
updateComponentType_componentTypeId,
UpdateComponentTypeResponse (..),
newUpdateComponentTypeResponse,
updateComponentTypeResponse_httpStatus,
updateComponentTypeResponse_workspaceId,
updateComponentTypeResponse_arn,
updateComponentTypeResponse_componentTypeId,
updateComponentTypeResponse_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 UpdateComponentType = UpdateComponentType'
{
UpdateComponentType -> Maybe Text
componentTypeName :: Prelude.Maybe Prelude.Text,
UpdateComponentType -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
UpdateComponentType -> Maybe [Text]
extendsFrom :: Prelude.Maybe [Prelude.Text],
UpdateComponentType -> Maybe (HashMap Text FunctionRequest)
functions :: Prelude.Maybe (Prelude.HashMap Prelude.Text FunctionRequest),
UpdateComponentType -> Maybe Bool
isSingleton :: Prelude.Maybe Prelude.Bool,
UpdateComponentType
-> Maybe (HashMap Text PropertyDefinitionRequest)
propertyDefinitions :: Prelude.Maybe (Prelude.HashMap Prelude.Text PropertyDefinitionRequest),
UpdateComponentType -> Maybe (HashMap Text PropertyGroupRequest)
propertyGroups :: Prelude.Maybe (Prelude.HashMap Prelude.Text PropertyGroupRequest),
UpdateComponentType -> Text
workspaceId :: Prelude.Text,
UpdateComponentType -> Text
componentTypeId :: Prelude.Text
}
deriving (UpdateComponentType -> UpdateComponentType -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateComponentType -> UpdateComponentType -> Bool
$c/= :: UpdateComponentType -> UpdateComponentType -> Bool
== :: UpdateComponentType -> UpdateComponentType -> Bool
$c== :: UpdateComponentType -> UpdateComponentType -> Bool
Prelude.Eq, ReadPrec [UpdateComponentType]
ReadPrec UpdateComponentType
Int -> ReadS UpdateComponentType
ReadS [UpdateComponentType]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateComponentType]
$creadListPrec :: ReadPrec [UpdateComponentType]
readPrec :: ReadPrec UpdateComponentType
$creadPrec :: ReadPrec UpdateComponentType
readList :: ReadS [UpdateComponentType]
$creadList :: ReadS [UpdateComponentType]
readsPrec :: Int -> ReadS UpdateComponentType
$creadsPrec :: Int -> ReadS UpdateComponentType
Prelude.Read, Int -> UpdateComponentType -> ShowS
[UpdateComponentType] -> ShowS
UpdateComponentType -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateComponentType] -> ShowS
$cshowList :: [UpdateComponentType] -> ShowS
show :: UpdateComponentType -> String
$cshow :: UpdateComponentType -> String
showsPrec :: Int -> UpdateComponentType -> ShowS
$cshowsPrec :: Int -> UpdateComponentType -> ShowS
Prelude.Show, forall x. Rep UpdateComponentType x -> UpdateComponentType
forall x. UpdateComponentType -> Rep UpdateComponentType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateComponentType x -> UpdateComponentType
$cfrom :: forall x. UpdateComponentType -> Rep UpdateComponentType x
Prelude.Generic)
newUpdateComponentType ::
Prelude.Text ->
Prelude.Text ->
UpdateComponentType
newUpdateComponentType :: Text -> Text -> UpdateComponentType
newUpdateComponentType
Text
pWorkspaceId_
Text
pComponentTypeId_ =
UpdateComponentType'
{ $sel:componentTypeName:UpdateComponentType' :: Maybe Text
componentTypeName =
forall a. Maybe a
Prelude.Nothing,
$sel:description:UpdateComponentType' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:extendsFrom:UpdateComponentType' :: Maybe [Text]
extendsFrom = forall a. Maybe a
Prelude.Nothing,
$sel:functions:UpdateComponentType' :: Maybe (HashMap Text FunctionRequest)
functions = forall a. Maybe a
Prelude.Nothing,
$sel:isSingleton:UpdateComponentType' :: Maybe Bool
isSingleton = forall a. Maybe a
Prelude.Nothing,
$sel:propertyDefinitions:UpdateComponentType' :: Maybe (HashMap Text PropertyDefinitionRequest)
propertyDefinitions = forall a. Maybe a
Prelude.Nothing,
$sel:propertyGroups:UpdateComponentType' :: Maybe (HashMap Text PropertyGroupRequest)
propertyGroups = forall a. Maybe a
Prelude.Nothing,
$sel:workspaceId:UpdateComponentType' :: Text
workspaceId = Text
pWorkspaceId_,
$sel:componentTypeId:UpdateComponentType' :: Text
componentTypeId = Text
pComponentTypeId_
}
updateComponentType_componentTypeName :: Lens.Lens' UpdateComponentType (Prelude.Maybe Prelude.Text)
updateComponentType_componentTypeName :: Lens' UpdateComponentType (Maybe Text)
updateComponentType_componentTypeName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateComponentType' {Maybe Text
componentTypeName :: Maybe Text
$sel:componentTypeName:UpdateComponentType' :: UpdateComponentType -> Maybe Text
componentTypeName} -> Maybe Text
componentTypeName) (\s :: UpdateComponentType
s@UpdateComponentType' {} Maybe Text
a -> UpdateComponentType
s {$sel:componentTypeName:UpdateComponentType' :: Maybe Text
componentTypeName = Maybe Text
a} :: UpdateComponentType)
updateComponentType_description :: Lens.Lens' UpdateComponentType (Prelude.Maybe Prelude.Text)
updateComponentType_description :: Lens' UpdateComponentType (Maybe Text)
updateComponentType_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateComponentType' {Maybe Text
description :: Maybe Text
$sel:description:UpdateComponentType' :: UpdateComponentType -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateComponentType
s@UpdateComponentType' {} Maybe Text
a -> UpdateComponentType
s {$sel:description:UpdateComponentType' :: Maybe Text
description = Maybe Text
a} :: UpdateComponentType)
updateComponentType_extendsFrom :: Lens.Lens' UpdateComponentType (Prelude.Maybe [Prelude.Text])
updateComponentType_extendsFrom :: Lens' UpdateComponentType (Maybe [Text])
updateComponentType_extendsFrom = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateComponentType' {Maybe [Text]
extendsFrom :: Maybe [Text]
$sel:extendsFrom:UpdateComponentType' :: UpdateComponentType -> Maybe [Text]
extendsFrom} -> Maybe [Text]
extendsFrom) (\s :: UpdateComponentType
s@UpdateComponentType' {} Maybe [Text]
a -> UpdateComponentType
s {$sel:extendsFrom:UpdateComponentType' :: Maybe [Text]
extendsFrom = Maybe [Text]
a} :: UpdateComponentType) 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
updateComponentType_functions :: Lens.Lens' UpdateComponentType (Prelude.Maybe (Prelude.HashMap Prelude.Text FunctionRequest))
updateComponentType_functions :: Lens' UpdateComponentType (Maybe (HashMap Text FunctionRequest))
updateComponentType_functions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateComponentType' {Maybe (HashMap Text FunctionRequest)
functions :: Maybe (HashMap Text FunctionRequest)
$sel:functions:UpdateComponentType' :: UpdateComponentType -> Maybe (HashMap Text FunctionRequest)
functions} -> Maybe (HashMap Text FunctionRequest)
functions) (\s :: UpdateComponentType
s@UpdateComponentType' {} Maybe (HashMap Text FunctionRequest)
a -> UpdateComponentType
s {$sel:functions:UpdateComponentType' :: Maybe (HashMap Text FunctionRequest)
functions = Maybe (HashMap Text FunctionRequest)
a} :: UpdateComponentType) 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
updateComponentType_isSingleton :: Lens.Lens' UpdateComponentType (Prelude.Maybe Prelude.Bool)
updateComponentType_isSingleton :: Lens' UpdateComponentType (Maybe Bool)
updateComponentType_isSingleton = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateComponentType' {Maybe Bool
isSingleton :: Maybe Bool
$sel:isSingleton:UpdateComponentType' :: UpdateComponentType -> Maybe Bool
isSingleton} -> Maybe Bool
isSingleton) (\s :: UpdateComponentType
s@UpdateComponentType' {} Maybe Bool
a -> UpdateComponentType
s {$sel:isSingleton:UpdateComponentType' :: Maybe Bool
isSingleton = Maybe Bool
a} :: UpdateComponentType)
updateComponentType_propertyDefinitions :: Lens.Lens' UpdateComponentType (Prelude.Maybe (Prelude.HashMap Prelude.Text PropertyDefinitionRequest))
updateComponentType_propertyDefinitions :: Lens'
UpdateComponentType
(Maybe (HashMap Text PropertyDefinitionRequest))
updateComponentType_propertyDefinitions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateComponentType' {Maybe (HashMap Text PropertyDefinitionRequest)
propertyDefinitions :: Maybe (HashMap Text PropertyDefinitionRequest)
$sel:propertyDefinitions:UpdateComponentType' :: UpdateComponentType
-> Maybe (HashMap Text PropertyDefinitionRequest)
propertyDefinitions} -> Maybe (HashMap Text PropertyDefinitionRequest)
propertyDefinitions) (\s :: UpdateComponentType
s@UpdateComponentType' {} Maybe (HashMap Text PropertyDefinitionRequest)
a -> UpdateComponentType
s {$sel:propertyDefinitions:UpdateComponentType' :: Maybe (HashMap Text PropertyDefinitionRequest)
propertyDefinitions = Maybe (HashMap Text PropertyDefinitionRequest)
a} :: UpdateComponentType) 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
updateComponentType_propertyGroups :: Lens.Lens' UpdateComponentType (Prelude.Maybe (Prelude.HashMap Prelude.Text PropertyGroupRequest))
updateComponentType_propertyGroups :: Lens'
UpdateComponentType (Maybe (HashMap Text PropertyGroupRequest))
updateComponentType_propertyGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateComponentType' {Maybe (HashMap Text PropertyGroupRequest)
propertyGroups :: Maybe (HashMap Text PropertyGroupRequest)
$sel:propertyGroups:UpdateComponentType' :: UpdateComponentType -> Maybe (HashMap Text PropertyGroupRequest)
propertyGroups} -> Maybe (HashMap Text PropertyGroupRequest)
propertyGroups) (\s :: UpdateComponentType
s@UpdateComponentType' {} Maybe (HashMap Text PropertyGroupRequest)
a -> UpdateComponentType
s {$sel:propertyGroups:UpdateComponentType' :: Maybe (HashMap Text PropertyGroupRequest)
propertyGroups = Maybe (HashMap Text PropertyGroupRequest)
a} :: UpdateComponentType) 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
updateComponentType_workspaceId :: Lens.Lens' UpdateComponentType Prelude.Text
updateComponentType_workspaceId :: Lens' UpdateComponentType Text
updateComponentType_workspaceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateComponentType' {Text
workspaceId :: Text
$sel:workspaceId:UpdateComponentType' :: UpdateComponentType -> Text
workspaceId} -> Text
workspaceId) (\s :: UpdateComponentType
s@UpdateComponentType' {} Text
a -> UpdateComponentType
s {$sel:workspaceId:UpdateComponentType' :: Text
workspaceId = Text
a} :: UpdateComponentType)
updateComponentType_componentTypeId :: Lens.Lens' UpdateComponentType Prelude.Text
updateComponentType_componentTypeId :: Lens' UpdateComponentType Text
updateComponentType_componentTypeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateComponentType' {Text
componentTypeId :: Text
$sel:componentTypeId:UpdateComponentType' :: UpdateComponentType -> Text
componentTypeId} -> Text
componentTypeId) (\s :: UpdateComponentType
s@UpdateComponentType' {} Text
a -> UpdateComponentType
s {$sel:componentTypeId:UpdateComponentType' :: Text
componentTypeId = Text
a} :: UpdateComponentType)
instance Core.AWSRequest UpdateComponentType where
type
AWSResponse UpdateComponentType =
UpdateComponentTypeResponse
request :: (Service -> Service)
-> UpdateComponentType -> Request UpdateComponentType
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateComponentType
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateComponentType)))
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 -> Text -> Text -> State -> UpdateComponentTypeResponse
UpdateComponentTypeResponse'
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
"workspaceId")
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
"componentTypeId")
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 UpdateComponentType where
hashWithSalt :: Int -> UpdateComponentType -> Int
hashWithSalt Int
_salt UpdateComponentType' {Maybe Bool
Maybe [Text]
Maybe Text
Maybe (HashMap Text PropertyGroupRequest)
Maybe (HashMap Text FunctionRequest)
Maybe (HashMap Text PropertyDefinitionRequest)
Text
componentTypeId :: Text
workspaceId :: 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:UpdateComponentType' :: UpdateComponentType -> Text
$sel:workspaceId:UpdateComponentType' :: UpdateComponentType -> Text
$sel:propertyGroups:UpdateComponentType' :: UpdateComponentType -> Maybe (HashMap Text PropertyGroupRequest)
$sel:propertyDefinitions:UpdateComponentType' :: UpdateComponentType
-> Maybe (HashMap Text PropertyDefinitionRequest)
$sel:isSingleton:UpdateComponentType' :: UpdateComponentType -> Maybe Bool
$sel:functions:UpdateComponentType' :: UpdateComponentType -> Maybe (HashMap Text FunctionRequest)
$sel:extendsFrom:UpdateComponentType' :: UpdateComponentType -> Maybe [Text]
$sel:description:UpdateComponentType' :: UpdateComponentType -> Maybe Text
$sel:componentTypeName:UpdateComponentType' :: UpdateComponentType -> 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` Text
workspaceId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
componentTypeId
instance Prelude.NFData UpdateComponentType where
rnf :: UpdateComponentType -> ()
rnf UpdateComponentType' {Maybe Bool
Maybe [Text]
Maybe Text
Maybe (HashMap Text PropertyGroupRequest)
Maybe (HashMap Text FunctionRequest)
Maybe (HashMap Text PropertyDefinitionRequest)
Text
componentTypeId :: Text
workspaceId :: 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:UpdateComponentType' :: UpdateComponentType -> Text
$sel:workspaceId:UpdateComponentType' :: UpdateComponentType -> Text
$sel:propertyGroups:UpdateComponentType' :: UpdateComponentType -> Maybe (HashMap Text PropertyGroupRequest)
$sel:propertyDefinitions:UpdateComponentType' :: UpdateComponentType
-> Maybe (HashMap Text PropertyDefinitionRequest)
$sel:isSingleton:UpdateComponentType' :: UpdateComponentType -> Maybe Bool
$sel:functions:UpdateComponentType' :: UpdateComponentType -> Maybe (HashMap Text FunctionRequest)
$sel:extendsFrom:UpdateComponentType' :: UpdateComponentType -> Maybe [Text]
$sel:description:UpdateComponentType' :: UpdateComponentType -> Maybe Text
$sel:componentTypeName:UpdateComponentType' :: UpdateComponentType -> 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 Text
workspaceId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
componentTypeId
instance Data.ToHeaders UpdateComponentType where
toHeaders :: UpdateComponentType -> 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 UpdateComponentType where
toJSON :: UpdateComponentType -> Value
toJSON UpdateComponentType' {Maybe Bool
Maybe [Text]
Maybe Text
Maybe (HashMap Text PropertyGroupRequest)
Maybe (HashMap Text FunctionRequest)
Maybe (HashMap Text PropertyDefinitionRequest)
Text
componentTypeId :: Text
workspaceId :: 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:UpdateComponentType' :: UpdateComponentType -> Text
$sel:workspaceId:UpdateComponentType' :: UpdateComponentType -> Text
$sel:propertyGroups:UpdateComponentType' :: UpdateComponentType -> Maybe (HashMap Text PropertyGroupRequest)
$sel:propertyDefinitions:UpdateComponentType' :: UpdateComponentType
-> Maybe (HashMap Text PropertyDefinitionRequest)
$sel:isSingleton:UpdateComponentType' :: UpdateComponentType -> Maybe Bool
$sel:functions:UpdateComponentType' :: UpdateComponentType -> Maybe (HashMap Text FunctionRequest)
$sel:extendsFrom:UpdateComponentType' :: UpdateComponentType -> Maybe [Text]
$sel:description:UpdateComponentType' :: UpdateComponentType -> Maybe Text
$sel:componentTypeName:UpdateComponentType' :: UpdateComponentType -> 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
]
)
instance Data.ToPath UpdateComponentType where
toPath :: UpdateComponentType -> ByteString
toPath UpdateComponentType' {Maybe Bool
Maybe [Text]
Maybe Text
Maybe (HashMap Text PropertyGroupRequest)
Maybe (HashMap Text FunctionRequest)
Maybe (HashMap Text PropertyDefinitionRequest)
Text
componentTypeId :: Text
workspaceId :: 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:UpdateComponentType' :: UpdateComponentType -> Text
$sel:workspaceId:UpdateComponentType' :: UpdateComponentType -> Text
$sel:propertyGroups:UpdateComponentType' :: UpdateComponentType -> Maybe (HashMap Text PropertyGroupRequest)
$sel:propertyDefinitions:UpdateComponentType' :: UpdateComponentType
-> Maybe (HashMap Text PropertyDefinitionRequest)
$sel:isSingleton:UpdateComponentType' :: UpdateComponentType -> Maybe Bool
$sel:functions:UpdateComponentType' :: UpdateComponentType -> Maybe (HashMap Text FunctionRequest)
$sel:extendsFrom:UpdateComponentType' :: UpdateComponentType -> Maybe [Text]
$sel:description:UpdateComponentType' :: UpdateComponentType -> Maybe Text
$sel:componentTypeName:UpdateComponentType' :: UpdateComponentType -> 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 UpdateComponentType where
toQuery :: UpdateComponentType -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data UpdateComponentTypeResponse = UpdateComponentTypeResponse'
{
UpdateComponentTypeResponse -> Int
httpStatus :: Prelude.Int,
UpdateComponentTypeResponse -> Text
workspaceId :: Prelude.Text,
UpdateComponentTypeResponse -> Text
arn :: Prelude.Text,
UpdateComponentTypeResponse -> Text
componentTypeId :: Prelude.Text,
UpdateComponentTypeResponse -> State
state :: State
}
deriving (UpdateComponentTypeResponse -> UpdateComponentTypeResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateComponentTypeResponse -> UpdateComponentTypeResponse -> Bool
$c/= :: UpdateComponentTypeResponse -> UpdateComponentTypeResponse -> Bool
== :: UpdateComponentTypeResponse -> UpdateComponentTypeResponse -> Bool
$c== :: UpdateComponentTypeResponse -> UpdateComponentTypeResponse -> Bool
Prelude.Eq, ReadPrec [UpdateComponentTypeResponse]
ReadPrec UpdateComponentTypeResponse
Int -> ReadS UpdateComponentTypeResponse
ReadS [UpdateComponentTypeResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateComponentTypeResponse]
$creadListPrec :: ReadPrec [UpdateComponentTypeResponse]
readPrec :: ReadPrec UpdateComponentTypeResponse
$creadPrec :: ReadPrec UpdateComponentTypeResponse
readList :: ReadS [UpdateComponentTypeResponse]
$creadList :: ReadS [UpdateComponentTypeResponse]
readsPrec :: Int -> ReadS UpdateComponentTypeResponse
$creadsPrec :: Int -> ReadS UpdateComponentTypeResponse
Prelude.Read, Int -> UpdateComponentTypeResponse -> ShowS
[UpdateComponentTypeResponse] -> ShowS
UpdateComponentTypeResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateComponentTypeResponse] -> ShowS
$cshowList :: [UpdateComponentTypeResponse] -> ShowS
show :: UpdateComponentTypeResponse -> String
$cshow :: UpdateComponentTypeResponse -> String
showsPrec :: Int -> UpdateComponentTypeResponse -> ShowS
$cshowsPrec :: Int -> UpdateComponentTypeResponse -> ShowS
Prelude.Show, forall x.
Rep UpdateComponentTypeResponse x -> UpdateComponentTypeResponse
forall x.
UpdateComponentTypeResponse -> Rep UpdateComponentTypeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateComponentTypeResponse x -> UpdateComponentTypeResponse
$cfrom :: forall x.
UpdateComponentTypeResponse -> Rep UpdateComponentTypeResponse x
Prelude.Generic)
newUpdateComponentTypeResponse ::
Prelude.Int ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
State ->
UpdateComponentTypeResponse
newUpdateComponentTypeResponse :: Int -> Text -> Text -> Text -> State -> UpdateComponentTypeResponse
newUpdateComponentTypeResponse
Int
pHttpStatus_
Text
pWorkspaceId_
Text
pArn_
Text
pComponentTypeId_
State
pState_ =
UpdateComponentTypeResponse'
{ $sel:httpStatus:UpdateComponentTypeResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:workspaceId:UpdateComponentTypeResponse' :: Text
workspaceId = Text
pWorkspaceId_,
$sel:arn:UpdateComponentTypeResponse' :: Text
arn = Text
pArn_,
$sel:componentTypeId:UpdateComponentTypeResponse' :: Text
componentTypeId = Text
pComponentTypeId_,
$sel:state:UpdateComponentTypeResponse' :: State
state = State
pState_
}
updateComponentTypeResponse_httpStatus :: Lens.Lens' UpdateComponentTypeResponse Prelude.Int
updateComponentTypeResponse_httpStatus :: Lens' UpdateComponentTypeResponse Int
updateComponentTypeResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateComponentTypeResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateComponentTypeResponse' :: UpdateComponentTypeResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateComponentTypeResponse
s@UpdateComponentTypeResponse' {} Int
a -> UpdateComponentTypeResponse
s {$sel:httpStatus:UpdateComponentTypeResponse' :: Int
httpStatus = Int
a} :: UpdateComponentTypeResponse)
updateComponentTypeResponse_workspaceId :: Lens.Lens' UpdateComponentTypeResponse Prelude.Text
updateComponentTypeResponse_workspaceId :: Lens' UpdateComponentTypeResponse Text
updateComponentTypeResponse_workspaceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateComponentTypeResponse' {Text
workspaceId :: Text
$sel:workspaceId:UpdateComponentTypeResponse' :: UpdateComponentTypeResponse -> Text
workspaceId} -> Text
workspaceId) (\s :: UpdateComponentTypeResponse
s@UpdateComponentTypeResponse' {} Text
a -> UpdateComponentTypeResponse
s {$sel:workspaceId:UpdateComponentTypeResponse' :: Text
workspaceId = Text
a} :: UpdateComponentTypeResponse)
updateComponentTypeResponse_arn :: Lens.Lens' UpdateComponentTypeResponse Prelude.Text
updateComponentTypeResponse_arn :: Lens' UpdateComponentTypeResponse Text
updateComponentTypeResponse_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateComponentTypeResponse' {Text
arn :: Text
$sel:arn:UpdateComponentTypeResponse' :: UpdateComponentTypeResponse -> Text
arn} -> Text
arn) (\s :: UpdateComponentTypeResponse
s@UpdateComponentTypeResponse' {} Text
a -> UpdateComponentTypeResponse
s {$sel:arn:UpdateComponentTypeResponse' :: Text
arn = Text
a} :: UpdateComponentTypeResponse)
updateComponentTypeResponse_componentTypeId :: Lens.Lens' UpdateComponentTypeResponse Prelude.Text
updateComponentTypeResponse_componentTypeId :: Lens' UpdateComponentTypeResponse Text
updateComponentTypeResponse_componentTypeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateComponentTypeResponse' {Text
componentTypeId :: Text
$sel:componentTypeId:UpdateComponentTypeResponse' :: UpdateComponentTypeResponse -> Text
componentTypeId} -> Text
componentTypeId) (\s :: UpdateComponentTypeResponse
s@UpdateComponentTypeResponse' {} Text
a -> UpdateComponentTypeResponse
s {$sel:componentTypeId:UpdateComponentTypeResponse' :: Text
componentTypeId = Text
a} :: UpdateComponentTypeResponse)
updateComponentTypeResponse_state :: Lens.Lens' UpdateComponentTypeResponse State
updateComponentTypeResponse_state :: Lens' UpdateComponentTypeResponse State
updateComponentTypeResponse_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateComponentTypeResponse' {State
state :: State
$sel:state:UpdateComponentTypeResponse' :: UpdateComponentTypeResponse -> State
state} -> State
state) (\s :: UpdateComponentTypeResponse
s@UpdateComponentTypeResponse' {} State
a -> UpdateComponentTypeResponse
s {$sel:state:UpdateComponentTypeResponse' :: State
state = State
a} :: UpdateComponentTypeResponse)
instance Prelude.NFData UpdateComponentTypeResponse where
rnf :: UpdateComponentTypeResponse -> ()
rnf UpdateComponentTypeResponse' {Int
Text
State
state :: State
componentTypeId :: Text
arn :: Text
workspaceId :: Text
httpStatus :: Int
$sel:state:UpdateComponentTypeResponse' :: UpdateComponentTypeResponse -> State
$sel:componentTypeId:UpdateComponentTypeResponse' :: UpdateComponentTypeResponse -> Text
$sel:arn:UpdateComponentTypeResponse' :: UpdateComponentTypeResponse -> Text
$sel:workspaceId:UpdateComponentTypeResponse' :: UpdateComponentTypeResponse -> Text
$sel:httpStatus:UpdateComponentTypeResponse' :: UpdateComponentTypeResponse -> 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
workspaceId
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 Text
componentTypeId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf State
state