{-# 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.IoT.Types.ValidationError -- 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.IoT.Types.ValidationError 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 -- | Information about an error found in a behavior specification. -- -- /See:/ 'newValidationError' smart constructor. data ValidationError = ValidationError' { -- | The description of an error found in the behaviors. errorMessage :: Prelude.Maybe Prelude.Text } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'ValidationError' 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', 'validationError_errorMessage' - The description of an error found in the behaviors. newValidationError :: ValidationError newValidationError = ValidationError' {errorMessage = Prelude.Nothing} -- | The description of an error found in the behaviors. validationError_errorMessage :: Lens.Lens' ValidationError (Prelude.Maybe Prelude.Text) validationError_errorMessage = Lens.lens (\ValidationError' {errorMessage} -> errorMessage) (\s@ValidationError' {} a -> s {errorMessage = a} :: ValidationError) instance Data.FromJSON ValidationError where parseJSON = Data.withObject "ValidationError" ( \x -> ValidationError' Prelude.<$> (x Data..:? "errorMessage") ) instance Prelude.Hashable ValidationError where hashWithSalt _salt ValidationError' {..} = _salt `Prelude.hashWithSalt` errorMessage instance Prelude.NFData ValidationError where rnf ValidationError' {..} = Prelude.rnf errorMessage