{-# 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.MarketplaceCatalog.Types.ChangeSummary -- 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.MarketplaceCatalog.Types.ChangeSummary where import qualified Amazonka.Core as Core import qualified Amazonka.Core.Lens.Internal as Lens import qualified Amazonka.Data as Data import Amazonka.MarketplaceCatalog.Types.Entity import Amazonka.MarketplaceCatalog.Types.ErrorDetail import qualified Amazonka.Prelude as Prelude -- | This object is a container for common summary information about the -- change. The summary doesn\'t contain the whole change structure. -- -- /See:/ 'newChangeSummary' smart constructor. data ChangeSummary = ChangeSummary' { -- | Optional name for the change. changeName :: Prelude.Maybe Prelude.Text, -- | The type of the change. changeType :: Prelude.Maybe Prelude.Text, -- | This object contains details specific to the change type of the -- requested change. details :: Prelude.Maybe Prelude.Text, -- | The entity to be changed. entity :: Prelude.Maybe Entity, -- | An array of @ErrorDetail@ objects associated with the change. errorDetailList :: Prelude.Maybe [ErrorDetail] } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'ChangeSummary' 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: -- -- 'changeName', 'changeSummary_changeName' - Optional name for the change. -- -- 'changeType', 'changeSummary_changeType' - The type of the change. -- -- 'details', 'changeSummary_details' - This object contains details specific to the change type of the -- requested change. -- -- 'entity', 'changeSummary_entity' - The entity to be changed. -- -- 'errorDetailList', 'changeSummary_errorDetailList' - An array of @ErrorDetail@ objects associated with the change. newChangeSummary :: ChangeSummary newChangeSummary = ChangeSummary' { changeName = Prelude.Nothing, changeType = Prelude.Nothing, details = Prelude.Nothing, entity = Prelude.Nothing, errorDetailList = Prelude.Nothing } -- | Optional name for the change. changeSummary_changeName :: Lens.Lens' ChangeSummary (Prelude.Maybe Prelude.Text) changeSummary_changeName = Lens.lens (\ChangeSummary' {changeName} -> changeName) (\s@ChangeSummary' {} a -> s {changeName = a} :: ChangeSummary) -- | The type of the change. changeSummary_changeType :: Lens.Lens' ChangeSummary (Prelude.Maybe Prelude.Text) changeSummary_changeType = Lens.lens (\ChangeSummary' {changeType} -> changeType) (\s@ChangeSummary' {} a -> s {changeType = a} :: ChangeSummary) -- | This object contains details specific to the change type of the -- requested change. changeSummary_details :: Lens.Lens' ChangeSummary (Prelude.Maybe Prelude.Text) changeSummary_details = Lens.lens (\ChangeSummary' {details} -> details) (\s@ChangeSummary' {} a -> s {details = a} :: ChangeSummary) -- | The entity to be changed. changeSummary_entity :: Lens.Lens' ChangeSummary (Prelude.Maybe Entity) changeSummary_entity = Lens.lens (\ChangeSummary' {entity} -> entity) (\s@ChangeSummary' {} a -> s {entity = a} :: ChangeSummary) -- | An array of @ErrorDetail@ objects associated with the change. changeSummary_errorDetailList :: Lens.Lens' ChangeSummary (Prelude.Maybe [ErrorDetail]) changeSummary_errorDetailList = Lens.lens (\ChangeSummary' {errorDetailList} -> errorDetailList) (\s@ChangeSummary' {} a -> s {errorDetailList = a} :: ChangeSummary) Prelude.. Lens.mapping Lens.coerced instance Data.FromJSON ChangeSummary where parseJSON = Data.withObject "ChangeSummary" ( \x -> ChangeSummary' Prelude.<$> (x Data..:? "ChangeName") Prelude.<*> (x Data..:? "ChangeType") Prelude.<*> (x Data..:? "Details") Prelude.<*> (x Data..:? "Entity") Prelude.<*> ( x Data..:? "ErrorDetailList" Data..!= Prelude.mempty ) ) instance Prelude.Hashable ChangeSummary where hashWithSalt _salt ChangeSummary' {..} = _salt `Prelude.hashWithSalt` changeName `Prelude.hashWithSalt` changeType `Prelude.hashWithSalt` details `Prelude.hashWithSalt` entity `Prelude.hashWithSalt` errorDetailList instance Prelude.NFData ChangeSummary where rnf ChangeSummary' {..} = Prelude.rnf changeName `Prelude.seq` Prelude.rnf changeType `Prelude.seq` Prelude.rnf details `Prelude.seq` Prelude.rnf entity `Prelude.seq` Prelude.rnf errorDetailList