{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Amazonka.ResilienceHub.Types.AppComponent -- Copyright : (c) 2013-2023 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay -- Stability : auto-generated -- Portability : non-portable (GHC extensions) module Amazonka.ResilienceHub.Types.AppComponent where import qualified Amazonka.Core as Core import qualified Amazonka.Core.Lens.Internal as Lens import qualified Amazonka.Data as Data import qualified Amazonka.Prelude as Prelude -- | Defines an application component. -- -- /See:/ 'newAppComponent' smart constructor. data AppComponent = AppComponent' { -- | The name of the application component. name :: Prelude.Text, -- | The type of application component. type' :: Prelude.Text } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'AppComponent' with all optional fields omitted. -- -- Use or to modify other optional fields. -- -- The following record fields are available, with the corresponding lenses provided -- for backwards compatibility: -- -- 'name', 'appComponent_name' - The name of the application component. -- -- 'type'', 'appComponent_type' - The type of application component. newAppComponent :: -- | 'name' Prelude.Text -> -- | 'type'' Prelude.Text -> AppComponent newAppComponent pName_ pType_ = AppComponent' {name = pName_, type' = pType_} -- | The name of the application component. appComponent_name :: Lens.Lens' AppComponent Prelude.Text appComponent_name = Lens.lens (\AppComponent' {name} -> name) (\s@AppComponent' {} a -> s {name = a} :: AppComponent) -- | The type of application component. appComponent_type :: Lens.Lens' AppComponent Prelude.Text appComponent_type = Lens.lens (\AppComponent' {type'} -> type') (\s@AppComponent' {} a -> s {type' = a} :: AppComponent) instance Data.FromJSON AppComponent where parseJSON = Data.withObject "AppComponent" ( \x -> AppComponent' Prelude.<$> (x Data..: "name") Prelude.<*> (x Data..: "type") ) instance Prelude.Hashable AppComponent where hashWithSalt _salt AppComponent' {..} = _salt `Prelude.hashWithSalt` name `Prelude.hashWithSalt` type' instance Prelude.NFData AppComponent where rnf AppComponent' {..} = Prelude.rnf name `Prelude.seq` Prelude.rnf type'