{-# 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.SMS.Types.SSMOutput
-- 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.SMS.Types.SSMOutput 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
import Amazonka.SMS.Types.S3Location

-- | Contains the location of validation output.
--
-- /See:/ 'newSSMOutput' smart constructor.
data SSMOutput = SSMOutput'
  { SSMOutput -> Maybe S3Location
s3Location :: Prelude.Maybe S3Location
  }
  deriving (SSMOutput -> SSMOutput -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SSMOutput -> SSMOutput -> Bool
$c/= :: SSMOutput -> SSMOutput -> Bool
== :: SSMOutput -> SSMOutput -> Bool
$c== :: SSMOutput -> SSMOutput -> Bool
Prelude.Eq, ReadPrec [SSMOutput]
ReadPrec SSMOutput
Int -> ReadS SSMOutput
ReadS [SSMOutput]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SSMOutput]
$creadListPrec :: ReadPrec [SSMOutput]
readPrec :: ReadPrec SSMOutput
$creadPrec :: ReadPrec SSMOutput
readList :: ReadS [SSMOutput]
$creadList :: ReadS [SSMOutput]
readsPrec :: Int -> ReadS SSMOutput
$creadsPrec :: Int -> ReadS SSMOutput
Prelude.Read, Int -> SSMOutput -> ShowS
[SSMOutput] -> ShowS
SSMOutput -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SSMOutput] -> ShowS
$cshowList :: [SSMOutput] -> ShowS
show :: SSMOutput -> String
$cshow :: SSMOutput -> String
showsPrec :: Int -> SSMOutput -> ShowS
$cshowsPrec :: Int -> SSMOutput -> ShowS
Prelude.Show, forall x. Rep SSMOutput x -> SSMOutput
forall x. SSMOutput -> Rep SSMOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SSMOutput x -> SSMOutput
$cfrom :: forall x. SSMOutput -> Rep SSMOutput x
Prelude.Generic)

-- |
-- Create a value of 'SSMOutput' 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:
--
-- 's3Location', 'sSMOutput_s3Location' - Undocumented member.
newSSMOutput ::
  SSMOutput
newSSMOutput :: SSMOutput
newSSMOutput =
  SSMOutput' {$sel:s3Location:SSMOutput' :: Maybe S3Location
s3Location = forall a. Maybe a
Prelude.Nothing}

-- | Undocumented member.
sSMOutput_s3Location :: Lens.Lens' SSMOutput (Prelude.Maybe S3Location)
sSMOutput_s3Location :: Lens' SSMOutput (Maybe S3Location)
sSMOutput_s3Location = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SSMOutput' {Maybe S3Location
s3Location :: Maybe S3Location
$sel:s3Location:SSMOutput' :: SSMOutput -> Maybe S3Location
s3Location} -> Maybe S3Location
s3Location) (\s :: SSMOutput
s@SSMOutput' {} Maybe S3Location
a -> SSMOutput
s {$sel:s3Location:SSMOutput' :: Maybe S3Location
s3Location = Maybe S3Location
a} :: SSMOutput)

instance Data.FromJSON SSMOutput where
  parseJSON :: Value -> Parser SSMOutput
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"SSMOutput"
      ( \Object
x ->
          Maybe S3Location -> SSMOutput
SSMOutput' forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"s3Location")
      )

instance Prelude.Hashable SSMOutput where
  hashWithSalt :: Int -> SSMOutput -> Int
hashWithSalt Int
_salt SSMOutput' {Maybe S3Location
s3Location :: Maybe S3Location
$sel:s3Location:SSMOutput' :: SSMOutput -> Maybe S3Location
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe S3Location
s3Location

instance Prelude.NFData SSMOutput where
  rnf :: SSMOutput -> ()
rnf SSMOutput' {Maybe S3Location
s3Location :: Maybe S3Location
$sel:s3Location:SSMOutput' :: SSMOutput -> Maybe S3Location
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe S3Location
s3Location