{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.IoTSiteWise.CreateAssetModel
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates an asset model from specified property and hierarchy
-- definitions. You create assets from asset models. With asset models, you
-- can easily create assets of the same type that have standardized
-- definitions. Each asset created from a model inherits the asset model\'s
-- property and hierarchy definitions. For more information, see
-- <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/define-models.html Defining asset models>
-- in the /IoT SiteWise User Guide/.
module Amazonka.IoTSiteWise.CreateAssetModel
  ( -- * Creating a Request
    CreateAssetModel (..),
    newCreateAssetModel,

    -- * Request Lenses
    createAssetModel_clientToken,
    createAssetModel_assetModelDescription,
    createAssetModel_assetModelProperties,
    createAssetModel_assetModelCompositeModels,
    createAssetModel_assetModelHierarchies,
    createAssetModel_tags,
    createAssetModel_assetModelName,

    -- * Destructuring the Response
    CreateAssetModelResponse (..),
    newCreateAssetModelResponse,

    -- * Response Lenses
    createAssetModelResponse_httpStatus,
    createAssetModelResponse_assetModelId,
    createAssetModelResponse_assetModelArn,
    createAssetModelResponse_assetModelStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IoTSiteWise.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newCreateAssetModel' smart constructor.
data CreateAssetModel = CreateAssetModel'
  { -- | A unique case-sensitive identifier that you can provide to ensure the
    -- idempotency of the request. Don\'t reuse this client token if a new
    -- idempotent request is required.
    CreateAssetModel -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | A description for the asset model.
    CreateAssetModel -> Maybe Text
assetModelDescription :: Prelude.Maybe Prelude.Text,
    -- | The property definitions of the asset model. For more information, see
    -- <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/asset-properties.html Asset properties>
    -- in the /IoT SiteWise User Guide/.
    --
    -- You can specify up to 200 properties per asset model. For more
    -- information, see
    -- <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/quotas.html Quotas>
    -- in the /IoT SiteWise User Guide/.
    CreateAssetModel -> Maybe [AssetModelPropertyDefinition]
assetModelProperties :: Prelude.Maybe [AssetModelPropertyDefinition],
    -- | The composite asset models that are part of this asset model. Composite
    -- asset models are asset models that contain specific properties. Each
    -- composite model has a type that defines the properties that the
    -- composite model supports. Use composite asset models to define alarms on
    -- this asset model.
    CreateAssetModel -> Maybe [AssetModelCompositeModelDefinition]
assetModelCompositeModels :: Prelude.Maybe [AssetModelCompositeModelDefinition],
    -- | The hierarchy definitions of the asset model. Each hierarchy specifies
    -- an asset model whose assets can be children of any other assets created
    -- from this asset model. For more information, see
    -- <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/asset-hierarchies.html Asset hierarchies>
    -- in the /IoT SiteWise User Guide/.
    --
    -- You can specify up to 10 hierarchies per asset model. For more
    -- information, see
    -- <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/quotas.html Quotas>
    -- in the /IoT SiteWise User Guide/.
    CreateAssetModel -> Maybe [AssetModelHierarchyDefinition]
assetModelHierarchies :: Prelude.Maybe [AssetModelHierarchyDefinition],
    -- | A list of key-value pairs that contain metadata for the asset model. For
    -- more information, see
    -- <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/tag-resources.html Tagging your IoT SiteWise resources>
    -- in the /IoT SiteWise User Guide/.
    CreateAssetModel -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | A unique, friendly name for the asset model.
    CreateAssetModel -> Text
assetModelName :: Prelude.Text
  }
  deriving (CreateAssetModel -> CreateAssetModel -> Bool
(CreateAssetModel -> CreateAssetModel -> Bool)
-> (CreateAssetModel -> CreateAssetModel -> Bool)
-> Eq CreateAssetModel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAssetModel -> CreateAssetModel -> Bool
$c/= :: CreateAssetModel -> CreateAssetModel -> Bool
== :: CreateAssetModel -> CreateAssetModel -> Bool
$c== :: CreateAssetModel -> CreateAssetModel -> Bool
Prelude.Eq, ReadPrec [CreateAssetModel]
ReadPrec CreateAssetModel
Int -> ReadS CreateAssetModel
ReadS [CreateAssetModel]
(Int -> ReadS CreateAssetModel)
-> ReadS [CreateAssetModel]
-> ReadPrec CreateAssetModel
-> ReadPrec [CreateAssetModel]
-> Read CreateAssetModel
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAssetModel]
$creadListPrec :: ReadPrec [CreateAssetModel]
readPrec :: ReadPrec CreateAssetModel
$creadPrec :: ReadPrec CreateAssetModel
readList :: ReadS [CreateAssetModel]
$creadList :: ReadS [CreateAssetModel]
readsPrec :: Int -> ReadS CreateAssetModel
$creadsPrec :: Int -> ReadS CreateAssetModel
Prelude.Read, Int -> CreateAssetModel -> ShowS
[CreateAssetModel] -> ShowS
CreateAssetModel -> String
(Int -> CreateAssetModel -> ShowS)
-> (CreateAssetModel -> String)
-> ([CreateAssetModel] -> ShowS)
-> Show CreateAssetModel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAssetModel] -> ShowS
$cshowList :: [CreateAssetModel] -> ShowS
show :: CreateAssetModel -> String
$cshow :: CreateAssetModel -> String
showsPrec :: Int -> CreateAssetModel -> ShowS
$cshowsPrec :: Int -> CreateAssetModel -> ShowS
Prelude.Show, (forall x. CreateAssetModel -> Rep CreateAssetModel x)
-> (forall x. Rep CreateAssetModel x -> CreateAssetModel)
-> Generic CreateAssetModel
forall x. Rep CreateAssetModel x -> CreateAssetModel
forall x. CreateAssetModel -> Rep CreateAssetModel x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateAssetModel x -> CreateAssetModel
$cfrom :: forall x. CreateAssetModel -> Rep CreateAssetModel x
Prelude.Generic)

-- |
-- Create a value of 'CreateAssetModel' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'clientToken', 'createAssetModel_clientToken' - A unique case-sensitive identifier that you can provide to ensure the
-- idempotency of the request. Don\'t reuse this client token if a new
-- idempotent request is required.
--
-- 'assetModelDescription', 'createAssetModel_assetModelDescription' - A description for the asset model.
--
-- 'assetModelProperties', 'createAssetModel_assetModelProperties' - The property definitions of the asset model. For more information, see
-- <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/asset-properties.html Asset properties>
-- in the /IoT SiteWise User Guide/.
--
-- You can specify up to 200 properties per asset model. For more
-- information, see
-- <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/quotas.html Quotas>
-- in the /IoT SiteWise User Guide/.
--
-- 'assetModelCompositeModels', 'createAssetModel_assetModelCompositeModels' - The composite asset models that are part of this asset model. Composite
-- asset models are asset models that contain specific properties. Each
-- composite model has a type that defines the properties that the
-- composite model supports. Use composite asset models to define alarms on
-- this asset model.
--
-- 'assetModelHierarchies', 'createAssetModel_assetModelHierarchies' - The hierarchy definitions of the asset model. Each hierarchy specifies
-- an asset model whose assets can be children of any other assets created
-- from this asset model. For more information, see
-- <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/asset-hierarchies.html Asset hierarchies>
-- in the /IoT SiteWise User Guide/.
--
-- You can specify up to 10 hierarchies per asset model. For more
-- information, see
-- <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/quotas.html Quotas>
-- in the /IoT SiteWise User Guide/.
--
-- 'tags', 'createAssetModel_tags' - A list of key-value pairs that contain metadata for the asset model. For
-- more information, see
-- <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/tag-resources.html Tagging your IoT SiteWise resources>
-- in the /IoT SiteWise User Guide/.
--
-- 'assetModelName', 'createAssetModel_assetModelName' - A unique, friendly name for the asset model.
newCreateAssetModel ::
  -- | 'assetModelName'
  Prelude.Text ->
  CreateAssetModel
newCreateAssetModel :: Text -> CreateAssetModel
newCreateAssetModel Text
pAssetModelName_ =
  CreateAssetModel' :: Maybe Text
-> Maybe Text
-> Maybe [AssetModelPropertyDefinition]
-> Maybe [AssetModelCompositeModelDefinition]
-> Maybe [AssetModelHierarchyDefinition]
-> Maybe (HashMap Text Text)
-> Text
-> CreateAssetModel
CreateAssetModel'
    { $sel:clientToken:CreateAssetModel' :: Maybe Text
clientToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:assetModelDescription:CreateAssetModel' :: Maybe Text
assetModelDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:assetModelProperties:CreateAssetModel' :: Maybe [AssetModelPropertyDefinition]
assetModelProperties = Maybe [AssetModelPropertyDefinition]
forall a. Maybe a
Prelude.Nothing,
      $sel:assetModelCompositeModels:CreateAssetModel' :: Maybe [AssetModelCompositeModelDefinition]
assetModelCompositeModels = Maybe [AssetModelCompositeModelDefinition]
forall a. Maybe a
Prelude.Nothing,
      $sel:assetModelHierarchies:CreateAssetModel' :: Maybe [AssetModelHierarchyDefinition]
assetModelHierarchies = Maybe [AssetModelHierarchyDefinition]
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateAssetModel' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:assetModelName:CreateAssetModel' :: Text
assetModelName = Text
pAssetModelName_
    }

-- | A unique case-sensitive identifier that you can provide to ensure the
-- idempotency of the request. Don\'t reuse this client token if a new
-- idempotent request is required.
createAssetModel_clientToken :: Lens.Lens' CreateAssetModel (Prelude.Maybe Prelude.Text)
createAssetModel_clientToken :: (Maybe Text -> f (Maybe Text))
-> CreateAssetModel -> f CreateAssetModel
createAssetModel_clientToken = (CreateAssetModel -> Maybe Text)
-> (CreateAssetModel -> Maybe Text -> CreateAssetModel)
-> Lens CreateAssetModel CreateAssetModel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssetModel' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateAssetModel' :: CreateAssetModel -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateAssetModel
s@CreateAssetModel' {} Maybe Text
a -> CreateAssetModel
s {$sel:clientToken:CreateAssetModel' :: Maybe Text
clientToken = Maybe Text
a} :: CreateAssetModel)

-- | A description for the asset model.
createAssetModel_assetModelDescription :: Lens.Lens' CreateAssetModel (Prelude.Maybe Prelude.Text)
createAssetModel_assetModelDescription :: (Maybe Text -> f (Maybe Text))
-> CreateAssetModel -> f CreateAssetModel
createAssetModel_assetModelDescription = (CreateAssetModel -> Maybe Text)
-> (CreateAssetModel -> Maybe Text -> CreateAssetModel)
-> Lens CreateAssetModel CreateAssetModel (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssetModel' {Maybe Text
assetModelDescription :: Maybe Text
$sel:assetModelDescription:CreateAssetModel' :: CreateAssetModel -> Maybe Text
assetModelDescription} -> Maybe Text
assetModelDescription) (\s :: CreateAssetModel
s@CreateAssetModel' {} Maybe Text
a -> CreateAssetModel
s {$sel:assetModelDescription:CreateAssetModel' :: Maybe Text
assetModelDescription = Maybe Text
a} :: CreateAssetModel)

-- | The property definitions of the asset model. For more information, see
-- <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/asset-properties.html Asset properties>
-- in the /IoT SiteWise User Guide/.
--
-- You can specify up to 200 properties per asset model. For more
-- information, see
-- <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/quotas.html Quotas>
-- in the /IoT SiteWise User Guide/.
createAssetModel_assetModelProperties :: Lens.Lens' CreateAssetModel (Prelude.Maybe [AssetModelPropertyDefinition])
createAssetModel_assetModelProperties :: (Maybe [AssetModelPropertyDefinition]
 -> f (Maybe [AssetModelPropertyDefinition]))
-> CreateAssetModel -> f CreateAssetModel
createAssetModel_assetModelProperties = (CreateAssetModel -> Maybe [AssetModelPropertyDefinition])
-> (CreateAssetModel
    -> Maybe [AssetModelPropertyDefinition] -> CreateAssetModel)
-> Lens
     CreateAssetModel
     CreateAssetModel
     (Maybe [AssetModelPropertyDefinition])
     (Maybe [AssetModelPropertyDefinition])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssetModel' {Maybe [AssetModelPropertyDefinition]
assetModelProperties :: Maybe [AssetModelPropertyDefinition]
$sel:assetModelProperties:CreateAssetModel' :: CreateAssetModel -> Maybe [AssetModelPropertyDefinition]
assetModelProperties} -> Maybe [AssetModelPropertyDefinition]
assetModelProperties) (\s :: CreateAssetModel
s@CreateAssetModel' {} Maybe [AssetModelPropertyDefinition]
a -> CreateAssetModel
s {$sel:assetModelProperties:CreateAssetModel' :: Maybe [AssetModelPropertyDefinition]
assetModelProperties = Maybe [AssetModelPropertyDefinition]
a} :: CreateAssetModel) ((Maybe [AssetModelPropertyDefinition]
  -> f (Maybe [AssetModelPropertyDefinition]))
 -> CreateAssetModel -> f CreateAssetModel)
-> ((Maybe [AssetModelPropertyDefinition]
     -> f (Maybe [AssetModelPropertyDefinition]))
    -> Maybe [AssetModelPropertyDefinition]
    -> f (Maybe [AssetModelPropertyDefinition]))
-> (Maybe [AssetModelPropertyDefinition]
    -> f (Maybe [AssetModelPropertyDefinition]))
-> CreateAssetModel
-> f CreateAssetModel
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [AssetModelPropertyDefinition]
  [AssetModelPropertyDefinition]
  [AssetModelPropertyDefinition]
  [AssetModelPropertyDefinition]
-> Iso
     (Maybe [AssetModelPropertyDefinition])
     (Maybe [AssetModelPropertyDefinition])
     (Maybe [AssetModelPropertyDefinition])
     (Maybe [AssetModelPropertyDefinition])
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
  [AssetModelPropertyDefinition]
  [AssetModelPropertyDefinition]
  [AssetModelPropertyDefinition]
  [AssetModelPropertyDefinition]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The composite asset models that are part of this asset model. Composite
-- asset models are asset models that contain specific properties. Each
-- composite model has a type that defines the properties that the
-- composite model supports. Use composite asset models to define alarms on
-- this asset model.
createAssetModel_assetModelCompositeModels :: Lens.Lens' CreateAssetModel (Prelude.Maybe [AssetModelCompositeModelDefinition])
createAssetModel_assetModelCompositeModels :: (Maybe [AssetModelCompositeModelDefinition]
 -> f (Maybe [AssetModelCompositeModelDefinition]))
-> CreateAssetModel -> f CreateAssetModel
createAssetModel_assetModelCompositeModels = (CreateAssetModel -> Maybe [AssetModelCompositeModelDefinition])
-> (CreateAssetModel
    -> Maybe [AssetModelCompositeModelDefinition] -> CreateAssetModel)
-> Lens
     CreateAssetModel
     CreateAssetModel
     (Maybe [AssetModelCompositeModelDefinition])
     (Maybe [AssetModelCompositeModelDefinition])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssetModel' {Maybe [AssetModelCompositeModelDefinition]
assetModelCompositeModels :: Maybe [AssetModelCompositeModelDefinition]
$sel:assetModelCompositeModels:CreateAssetModel' :: CreateAssetModel -> Maybe [AssetModelCompositeModelDefinition]
assetModelCompositeModels} -> Maybe [AssetModelCompositeModelDefinition]
assetModelCompositeModels) (\s :: CreateAssetModel
s@CreateAssetModel' {} Maybe [AssetModelCompositeModelDefinition]
a -> CreateAssetModel
s {$sel:assetModelCompositeModels:CreateAssetModel' :: Maybe [AssetModelCompositeModelDefinition]
assetModelCompositeModels = Maybe [AssetModelCompositeModelDefinition]
a} :: CreateAssetModel) ((Maybe [AssetModelCompositeModelDefinition]
  -> f (Maybe [AssetModelCompositeModelDefinition]))
 -> CreateAssetModel -> f CreateAssetModel)
-> ((Maybe [AssetModelCompositeModelDefinition]
     -> f (Maybe [AssetModelCompositeModelDefinition]))
    -> Maybe [AssetModelCompositeModelDefinition]
    -> f (Maybe [AssetModelCompositeModelDefinition]))
-> (Maybe [AssetModelCompositeModelDefinition]
    -> f (Maybe [AssetModelCompositeModelDefinition]))
-> CreateAssetModel
-> f CreateAssetModel
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [AssetModelCompositeModelDefinition]
  [AssetModelCompositeModelDefinition]
  [AssetModelCompositeModelDefinition]
  [AssetModelCompositeModelDefinition]
-> Iso
     (Maybe [AssetModelCompositeModelDefinition])
     (Maybe [AssetModelCompositeModelDefinition])
     (Maybe [AssetModelCompositeModelDefinition])
     (Maybe [AssetModelCompositeModelDefinition])
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
  [AssetModelCompositeModelDefinition]
  [AssetModelCompositeModelDefinition]
  [AssetModelCompositeModelDefinition]
  [AssetModelCompositeModelDefinition]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The hierarchy definitions of the asset model. Each hierarchy specifies
-- an asset model whose assets can be children of any other assets created
-- from this asset model. For more information, see
-- <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/asset-hierarchies.html Asset hierarchies>
-- in the /IoT SiteWise User Guide/.
--
-- You can specify up to 10 hierarchies per asset model. For more
-- information, see
-- <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/quotas.html Quotas>
-- in the /IoT SiteWise User Guide/.
createAssetModel_assetModelHierarchies :: Lens.Lens' CreateAssetModel (Prelude.Maybe [AssetModelHierarchyDefinition])
createAssetModel_assetModelHierarchies :: (Maybe [AssetModelHierarchyDefinition]
 -> f (Maybe [AssetModelHierarchyDefinition]))
-> CreateAssetModel -> f CreateAssetModel
createAssetModel_assetModelHierarchies = (CreateAssetModel -> Maybe [AssetModelHierarchyDefinition])
-> (CreateAssetModel
    -> Maybe [AssetModelHierarchyDefinition] -> CreateAssetModel)
-> Lens
     CreateAssetModel
     CreateAssetModel
     (Maybe [AssetModelHierarchyDefinition])
     (Maybe [AssetModelHierarchyDefinition])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssetModel' {Maybe [AssetModelHierarchyDefinition]
assetModelHierarchies :: Maybe [AssetModelHierarchyDefinition]
$sel:assetModelHierarchies:CreateAssetModel' :: CreateAssetModel -> Maybe [AssetModelHierarchyDefinition]
assetModelHierarchies} -> Maybe [AssetModelHierarchyDefinition]
assetModelHierarchies) (\s :: CreateAssetModel
s@CreateAssetModel' {} Maybe [AssetModelHierarchyDefinition]
a -> CreateAssetModel
s {$sel:assetModelHierarchies:CreateAssetModel' :: Maybe [AssetModelHierarchyDefinition]
assetModelHierarchies = Maybe [AssetModelHierarchyDefinition]
a} :: CreateAssetModel) ((Maybe [AssetModelHierarchyDefinition]
  -> f (Maybe [AssetModelHierarchyDefinition]))
 -> CreateAssetModel -> f CreateAssetModel)
-> ((Maybe [AssetModelHierarchyDefinition]
     -> f (Maybe [AssetModelHierarchyDefinition]))
    -> Maybe [AssetModelHierarchyDefinition]
    -> f (Maybe [AssetModelHierarchyDefinition]))
-> (Maybe [AssetModelHierarchyDefinition]
    -> f (Maybe [AssetModelHierarchyDefinition]))
-> CreateAssetModel
-> f CreateAssetModel
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [AssetModelHierarchyDefinition]
  [AssetModelHierarchyDefinition]
  [AssetModelHierarchyDefinition]
  [AssetModelHierarchyDefinition]
-> Iso
     (Maybe [AssetModelHierarchyDefinition])
     (Maybe [AssetModelHierarchyDefinition])
     (Maybe [AssetModelHierarchyDefinition])
     (Maybe [AssetModelHierarchyDefinition])
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
  [AssetModelHierarchyDefinition]
  [AssetModelHierarchyDefinition]
  [AssetModelHierarchyDefinition]
  [AssetModelHierarchyDefinition]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of key-value pairs that contain metadata for the asset model. For
-- more information, see
-- <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/tag-resources.html Tagging your IoT SiteWise resources>
-- in the /IoT SiteWise User Guide/.
createAssetModel_tags :: Lens.Lens' CreateAssetModel (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createAssetModel_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateAssetModel -> f CreateAssetModel
createAssetModel_tags = (CreateAssetModel -> Maybe (HashMap Text Text))
-> (CreateAssetModel
    -> Maybe (HashMap Text Text) -> CreateAssetModel)
-> Lens
     CreateAssetModel
     CreateAssetModel
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssetModel' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateAssetModel' :: CreateAssetModel -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateAssetModel
s@CreateAssetModel' {} Maybe (HashMap Text Text)
a -> CreateAssetModel
s {$sel:tags:CreateAssetModel' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateAssetModel) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateAssetModel -> f CreateAssetModel)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateAssetModel
-> f CreateAssetModel
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A unique, friendly name for the asset model.
createAssetModel_assetModelName :: Lens.Lens' CreateAssetModel Prelude.Text
createAssetModel_assetModelName :: (Text -> f Text) -> CreateAssetModel -> f CreateAssetModel
createAssetModel_assetModelName = (CreateAssetModel -> Text)
-> (CreateAssetModel -> Text -> CreateAssetModel)
-> Lens CreateAssetModel CreateAssetModel Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssetModel' {Text
assetModelName :: Text
$sel:assetModelName:CreateAssetModel' :: CreateAssetModel -> Text
assetModelName} -> Text
assetModelName) (\s :: CreateAssetModel
s@CreateAssetModel' {} Text
a -> CreateAssetModel
s {$sel:assetModelName:CreateAssetModel' :: Text
assetModelName = Text
a} :: CreateAssetModel)

instance Core.AWSRequest CreateAssetModel where
  type
    AWSResponse CreateAssetModel =
      CreateAssetModelResponse
  request :: CreateAssetModel -> Request CreateAssetModel
request = Service -> CreateAssetModel -> Request CreateAssetModel
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateAssetModel
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateAssetModel)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateAssetModel))
-> Logger
-> Service
-> Proxy CreateAssetModel
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateAssetModel)))
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 -> Text -> AssetModelStatus -> CreateAssetModelResponse
CreateAssetModelResponse'
            (Int
 -> Text -> Text -> AssetModelStatus -> CreateAssetModelResponse)
-> Either String Int
-> Either
     String
     (Text -> Text -> AssetModelStatus -> CreateAssetModelResponse)
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 -> Text -> AssetModelStatus -> CreateAssetModelResponse)
-> Either String Text
-> Either
     String (Text -> AssetModelStatus -> CreateAssetModelResponse)
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
"assetModelId")
            Either
  String (Text -> AssetModelStatus -> CreateAssetModelResponse)
-> Either String Text
-> Either String (AssetModelStatus -> CreateAssetModelResponse)
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
"assetModelArn")
            Either String (AssetModelStatus -> CreateAssetModelResponse)
-> Either String AssetModelStatus
-> Either String CreateAssetModelResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String AssetModelStatus
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"assetModelStatus")
      )

instance Prelude.Hashable CreateAssetModel

instance Prelude.NFData CreateAssetModel

instance Core.ToHeaders CreateAssetModel where
  toHeaders :: CreateAssetModel -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateAssetModel -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ 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 CreateAssetModel where
  toJSON :: CreateAssetModel -> Value
toJSON CreateAssetModel' {Maybe [AssetModelHierarchyDefinition]
Maybe [AssetModelPropertyDefinition]
Maybe [AssetModelCompositeModelDefinition]
Maybe Text
Maybe (HashMap Text Text)
Text
assetModelName :: Text
tags :: Maybe (HashMap Text Text)
assetModelHierarchies :: Maybe [AssetModelHierarchyDefinition]
assetModelCompositeModels :: Maybe [AssetModelCompositeModelDefinition]
assetModelProperties :: Maybe [AssetModelPropertyDefinition]
assetModelDescription :: Maybe Text
clientToken :: Maybe Text
$sel:assetModelName:CreateAssetModel' :: CreateAssetModel -> Text
$sel:tags:CreateAssetModel' :: CreateAssetModel -> Maybe (HashMap Text Text)
$sel:assetModelHierarchies:CreateAssetModel' :: CreateAssetModel -> Maybe [AssetModelHierarchyDefinition]
$sel:assetModelCompositeModels:CreateAssetModel' :: CreateAssetModel -> Maybe [AssetModelCompositeModelDefinition]
$sel:assetModelProperties:CreateAssetModel' :: CreateAssetModel -> Maybe [AssetModelPropertyDefinition]
$sel:assetModelDescription:CreateAssetModel' :: CreateAssetModel -> Maybe Text
$sel:clientToken:CreateAssetModel' :: CreateAssetModel -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"clientToken" 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
clientToken,
            (Text
"assetModelDescription" 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
assetModelDescription,
            (Text
"assetModelProperties" Text -> [AssetModelPropertyDefinition] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([AssetModelPropertyDefinition] -> Pair)
-> Maybe [AssetModelPropertyDefinition] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AssetModelPropertyDefinition]
assetModelProperties,
            (Text
"assetModelCompositeModels" Text -> [AssetModelCompositeModelDefinition] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([AssetModelCompositeModelDefinition] -> Pair)
-> Maybe [AssetModelCompositeModelDefinition] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AssetModelCompositeModelDefinition]
assetModelCompositeModels,
            (Text
"assetModelHierarchies" Text -> [AssetModelHierarchyDefinition] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([AssetModelHierarchyDefinition] -> Pair)
-> Maybe [AssetModelHierarchyDefinition] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AssetModelHierarchyDefinition]
assetModelHierarchies,
            (Text
"tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"assetModelName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
assetModelName)
          ]
      )

instance Core.ToPath CreateAssetModel where
  toPath :: CreateAssetModel -> ByteString
toPath = ByteString -> CreateAssetModel -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/asset-models"

instance Core.ToQuery CreateAssetModel where
  toQuery :: CreateAssetModel -> QueryString
toQuery = QueryString -> CreateAssetModel -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newCreateAssetModelResponse' smart constructor.
data CreateAssetModelResponse = CreateAssetModelResponse'
  { -- | The response's http status code.
    CreateAssetModelResponse -> Int
httpStatus :: Prelude.Int,
    -- | The ID of the asset model. You can use this ID when you call other IoT
    -- SiteWise APIs.
    CreateAssetModelResponse -> Text
assetModelId :: Prelude.Text,
    -- | The
    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html ARN>
    -- of the asset model, which has the following format.
    --
    -- @arn:${Partition}:iotsitewise:${Region}:${Account}:asset-model\/${AssetModelId}@
    CreateAssetModelResponse -> Text
assetModelArn :: Prelude.Text,
    -- | The status of the asset model, which contains a state (@CREATING@ after
    -- successfully calling this operation) and any error message.
    CreateAssetModelResponse -> AssetModelStatus
assetModelStatus :: AssetModelStatus
  }
  deriving (CreateAssetModelResponse -> CreateAssetModelResponse -> Bool
(CreateAssetModelResponse -> CreateAssetModelResponse -> Bool)
-> (CreateAssetModelResponse -> CreateAssetModelResponse -> Bool)
-> Eq CreateAssetModelResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAssetModelResponse -> CreateAssetModelResponse -> Bool
$c/= :: CreateAssetModelResponse -> CreateAssetModelResponse -> Bool
== :: CreateAssetModelResponse -> CreateAssetModelResponse -> Bool
$c== :: CreateAssetModelResponse -> CreateAssetModelResponse -> Bool
Prelude.Eq, ReadPrec [CreateAssetModelResponse]
ReadPrec CreateAssetModelResponse
Int -> ReadS CreateAssetModelResponse
ReadS [CreateAssetModelResponse]
(Int -> ReadS CreateAssetModelResponse)
-> ReadS [CreateAssetModelResponse]
-> ReadPrec CreateAssetModelResponse
-> ReadPrec [CreateAssetModelResponse]
-> Read CreateAssetModelResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAssetModelResponse]
$creadListPrec :: ReadPrec [CreateAssetModelResponse]
readPrec :: ReadPrec CreateAssetModelResponse
$creadPrec :: ReadPrec CreateAssetModelResponse
readList :: ReadS [CreateAssetModelResponse]
$creadList :: ReadS [CreateAssetModelResponse]
readsPrec :: Int -> ReadS CreateAssetModelResponse
$creadsPrec :: Int -> ReadS CreateAssetModelResponse
Prelude.Read, Int -> CreateAssetModelResponse -> ShowS
[CreateAssetModelResponse] -> ShowS
CreateAssetModelResponse -> String
(Int -> CreateAssetModelResponse -> ShowS)
-> (CreateAssetModelResponse -> String)
-> ([CreateAssetModelResponse] -> ShowS)
-> Show CreateAssetModelResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAssetModelResponse] -> ShowS
$cshowList :: [CreateAssetModelResponse] -> ShowS
show :: CreateAssetModelResponse -> String
$cshow :: CreateAssetModelResponse -> String
showsPrec :: Int -> CreateAssetModelResponse -> ShowS
$cshowsPrec :: Int -> CreateAssetModelResponse -> ShowS
Prelude.Show, (forall x.
 CreateAssetModelResponse -> Rep CreateAssetModelResponse x)
-> (forall x.
    Rep CreateAssetModelResponse x -> CreateAssetModelResponse)
-> Generic CreateAssetModelResponse
forall x.
Rep CreateAssetModelResponse x -> CreateAssetModelResponse
forall x.
CreateAssetModelResponse -> Rep CreateAssetModelResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateAssetModelResponse x -> CreateAssetModelResponse
$cfrom :: forall x.
CreateAssetModelResponse -> Rep CreateAssetModelResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateAssetModelResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'httpStatus', 'createAssetModelResponse_httpStatus' - The response's http status code.
--
-- 'assetModelId', 'createAssetModelResponse_assetModelId' - The ID of the asset model. You can use this ID when you call other IoT
-- SiteWise APIs.
--
-- 'assetModelArn', 'createAssetModelResponse_assetModelArn' - The
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html ARN>
-- of the asset model, which has the following format.
--
-- @arn:${Partition}:iotsitewise:${Region}:${Account}:asset-model\/${AssetModelId}@
--
-- 'assetModelStatus', 'createAssetModelResponse_assetModelStatus' - The status of the asset model, which contains a state (@CREATING@ after
-- successfully calling this operation) and any error message.
newCreateAssetModelResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'assetModelId'
  Prelude.Text ->
  -- | 'assetModelArn'
  Prelude.Text ->
  -- | 'assetModelStatus'
  AssetModelStatus ->
  CreateAssetModelResponse
newCreateAssetModelResponse :: Int -> Text -> Text -> AssetModelStatus -> CreateAssetModelResponse
newCreateAssetModelResponse
  Int
pHttpStatus_
  Text
pAssetModelId_
  Text
pAssetModelArn_
  AssetModelStatus
pAssetModelStatus_ =
    CreateAssetModelResponse' :: Int -> Text -> Text -> AssetModelStatus -> CreateAssetModelResponse
CreateAssetModelResponse'
      { $sel:httpStatus:CreateAssetModelResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:assetModelId:CreateAssetModelResponse' :: Text
assetModelId = Text
pAssetModelId_,
        $sel:assetModelArn:CreateAssetModelResponse' :: Text
assetModelArn = Text
pAssetModelArn_,
        $sel:assetModelStatus:CreateAssetModelResponse' :: AssetModelStatus
assetModelStatus = AssetModelStatus
pAssetModelStatus_
      }

-- | The response's http status code.
createAssetModelResponse_httpStatus :: Lens.Lens' CreateAssetModelResponse Prelude.Int
createAssetModelResponse_httpStatus :: (Int -> f Int)
-> CreateAssetModelResponse -> f CreateAssetModelResponse
createAssetModelResponse_httpStatus = (CreateAssetModelResponse -> Int)
-> (CreateAssetModelResponse -> Int -> CreateAssetModelResponse)
-> Lens CreateAssetModelResponse CreateAssetModelResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssetModelResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateAssetModelResponse' :: CreateAssetModelResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateAssetModelResponse
s@CreateAssetModelResponse' {} Int
a -> CreateAssetModelResponse
s {$sel:httpStatus:CreateAssetModelResponse' :: Int
httpStatus = Int
a} :: CreateAssetModelResponse)

-- | The ID of the asset model. You can use this ID when you call other IoT
-- SiteWise APIs.
createAssetModelResponse_assetModelId :: Lens.Lens' CreateAssetModelResponse Prelude.Text
createAssetModelResponse_assetModelId :: (Text -> f Text)
-> CreateAssetModelResponse -> f CreateAssetModelResponse
createAssetModelResponse_assetModelId = (CreateAssetModelResponse -> Text)
-> (CreateAssetModelResponse -> Text -> CreateAssetModelResponse)
-> Lens CreateAssetModelResponse CreateAssetModelResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssetModelResponse' {Text
assetModelId :: Text
$sel:assetModelId:CreateAssetModelResponse' :: CreateAssetModelResponse -> Text
assetModelId} -> Text
assetModelId) (\s :: CreateAssetModelResponse
s@CreateAssetModelResponse' {} Text
a -> CreateAssetModelResponse
s {$sel:assetModelId:CreateAssetModelResponse' :: Text
assetModelId = Text
a} :: CreateAssetModelResponse)

-- | The
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html ARN>
-- of the asset model, which has the following format.
--
-- @arn:${Partition}:iotsitewise:${Region}:${Account}:asset-model\/${AssetModelId}@
createAssetModelResponse_assetModelArn :: Lens.Lens' CreateAssetModelResponse Prelude.Text
createAssetModelResponse_assetModelArn :: (Text -> f Text)
-> CreateAssetModelResponse -> f CreateAssetModelResponse
createAssetModelResponse_assetModelArn = (CreateAssetModelResponse -> Text)
-> (CreateAssetModelResponse -> Text -> CreateAssetModelResponse)
-> Lens CreateAssetModelResponse CreateAssetModelResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssetModelResponse' {Text
assetModelArn :: Text
$sel:assetModelArn:CreateAssetModelResponse' :: CreateAssetModelResponse -> Text
assetModelArn} -> Text
assetModelArn) (\s :: CreateAssetModelResponse
s@CreateAssetModelResponse' {} Text
a -> CreateAssetModelResponse
s {$sel:assetModelArn:CreateAssetModelResponse' :: Text
assetModelArn = Text
a} :: CreateAssetModelResponse)

-- | The status of the asset model, which contains a state (@CREATING@ after
-- successfully calling this operation) and any error message.
createAssetModelResponse_assetModelStatus :: Lens.Lens' CreateAssetModelResponse AssetModelStatus
createAssetModelResponse_assetModelStatus :: (AssetModelStatus -> f AssetModelStatus)
-> CreateAssetModelResponse -> f CreateAssetModelResponse
createAssetModelResponse_assetModelStatus = (CreateAssetModelResponse -> AssetModelStatus)
-> (CreateAssetModelResponse
    -> AssetModelStatus -> CreateAssetModelResponse)
-> Lens
     CreateAssetModelResponse
     CreateAssetModelResponse
     AssetModelStatus
     AssetModelStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAssetModelResponse' {AssetModelStatus
assetModelStatus :: AssetModelStatus
$sel:assetModelStatus:CreateAssetModelResponse' :: CreateAssetModelResponse -> AssetModelStatus
assetModelStatus} -> AssetModelStatus
assetModelStatus) (\s :: CreateAssetModelResponse
s@CreateAssetModelResponse' {} AssetModelStatus
a -> CreateAssetModelResponse
s {$sel:assetModelStatus:CreateAssetModelResponse' :: AssetModelStatus
assetModelStatus = AssetModelStatus
a} :: CreateAssetModelResponse)

instance Prelude.NFData CreateAssetModelResponse