{-# 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.ResourceExplorer2.Types.BatchGetViewError -- 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.ResourceExplorer2.Types.BatchGetViewError 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 -- | A collection of error messages for any views that Amazon Web Services -- Resource Explorer couldn\'t retrieve details. -- -- /See:/ 'newBatchGetViewError' smart constructor. data BatchGetViewError = BatchGetViewError' { -- | The description of the error for the specified view. errorMessage :: Prelude.Text, -- | The -- -- of the view for which Resource Explorer failed to retrieve details. viewArn :: Prelude.Text } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'BatchGetViewError' 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: -- -- 'errorMessage', 'batchGetViewError_errorMessage' - The description of the error for the specified view. -- -- 'viewArn', 'batchGetViewError_viewArn' - The -- -- of the view for which Resource Explorer failed to retrieve details. newBatchGetViewError :: -- | 'errorMessage' Prelude.Text -> -- | 'viewArn' Prelude.Text -> BatchGetViewError newBatchGetViewError pErrorMessage_ pViewArn_ = BatchGetViewError' { errorMessage = pErrorMessage_, viewArn = pViewArn_ } -- | The description of the error for the specified view. batchGetViewError_errorMessage :: Lens.Lens' BatchGetViewError Prelude.Text batchGetViewError_errorMessage = Lens.lens (\BatchGetViewError' {errorMessage} -> errorMessage) (\s@BatchGetViewError' {} a -> s {errorMessage = a} :: BatchGetViewError) -- | The -- -- of the view for which Resource Explorer failed to retrieve details. batchGetViewError_viewArn :: Lens.Lens' BatchGetViewError Prelude.Text batchGetViewError_viewArn = Lens.lens (\BatchGetViewError' {viewArn} -> viewArn) (\s@BatchGetViewError' {} a -> s {viewArn = a} :: BatchGetViewError) instance Data.FromJSON BatchGetViewError where parseJSON = Data.withObject "BatchGetViewError" ( \x -> BatchGetViewError' Prelude.<$> (x Data..: "ErrorMessage") Prelude.<*> (x Data..: "ViewArn") ) instance Prelude.Hashable BatchGetViewError where hashWithSalt _salt BatchGetViewError' {..} = _salt `Prelude.hashWithSalt` errorMessage `Prelude.hashWithSalt` viewArn instance Prelude.NFData BatchGetViewError where rnf BatchGetViewError' {..} = Prelude.rnf errorMessage `Prelude.seq` Prelude.rnf viewArn