{-# 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.SSM.Types.S3OutputUrl
-- 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.SSM.Types.S3OutputUrl 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 URL for the Amazon Web Services Systems Manager (Systems Manager)
-- bucket where you want to store the results of this request.
--
-- /See:/ 'newS3OutputUrl' smart constructor.
data S3OutputUrl = S3OutputUrl'
  { -- | A URL for an S3 bucket where you want to store the results of this
    -- request.
    S3OutputUrl -> Maybe Text
outputUrl :: Prelude.Maybe Prelude.Text
  }
  deriving (S3OutputUrl -> S3OutputUrl -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: S3OutputUrl -> S3OutputUrl -> Bool
$c/= :: S3OutputUrl -> S3OutputUrl -> Bool
== :: S3OutputUrl -> S3OutputUrl -> Bool
$c== :: S3OutputUrl -> S3OutputUrl -> Bool
Prelude.Eq, ReadPrec [S3OutputUrl]
ReadPrec S3OutputUrl
Int -> ReadS S3OutputUrl
ReadS [S3OutputUrl]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [S3OutputUrl]
$creadListPrec :: ReadPrec [S3OutputUrl]
readPrec :: ReadPrec S3OutputUrl
$creadPrec :: ReadPrec S3OutputUrl
readList :: ReadS [S3OutputUrl]
$creadList :: ReadS [S3OutputUrl]
readsPrec :: Int -> ReadS S3OutputUrl
$creadsPrec :: Int -> ReadS S3OutputUrl
Prelude.Read, Int -> S3OutputUrl -> ShowS
[S3OutputUrl] -> ShowS
S3OutputUrl -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [S3OutputUrl] -> ShowS
$cshowList :: [S3OutputUrl] -> ShowS
show :: S3OutputUrl -> String
$cshow :: S3OutputUrl -> String
showsPrec :: Int -> S3OutputUrl -> ShowS
$cshowsPrec :: Int -> S3OutputUrl -> ShowS
Prelude.Show, forall x. Rep S3OutputUrl x -> S3OutputUrl
forall x. S3OutputUrl -> Rep S3OutputUrl x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep S3OutputUrl x -> S3OutputUrl
$cfrom :: forall x. S3OutputUrl -> Rep S3OutputUrl x
Prelude.Generic)

-- |
-- Create a value of 'S3OutputUrl' 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:
--
-- 'outputUrl', 's3OutputUrl_outputUrl' - A URL for an S3 bucket where you want to store the results of this
-- request.
newS3OutputUrl ::
  S3OutputUrl
newS3OutputUrl :: S3OutputUrl
newS3OutputUrl =
  S3OutputUrl' {$sel:outputUrl:S3OutputUrl' :: Maybe Text
outputUrl = forall a. Maybe a
Prelude.Nothing}

-- | A URL for an S3 bucket where you want to store the results of this
-- request.
s3OutputUrl_outputUrl :: Lens.Lens' S3OutputUrl (Prelude.Maybe Prelude.Text)
s3OutputUrl_outputUrl :: Lens' S3OutputUrl (Maybe Text)
s3OutputUrl_outputUrl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\S3OutputUrl' {Maybe Text
outputUrl :: Maybe Text
$sel:outputUrl:S3OutputUrl' :: S3OutputUrl -> Maybe Text
outputUrl} -> Maybe Text
outputUrl) (\s :: S3OutputUrl
s@S3OutputUrl' {} Maybe Text
a -> S3OutputUrl
s {$sel:outputUrl:S3OutputUrl' :: Maybe Text
outputUrl = Maybe Text
a} :: S3OutputUrl)

instance Data.FromJSON S3OutputUrl where
  parseJSON :: Value -> Parser S3OutputUrl
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"S3OutputUrl"
      ( \Object
x ->
          Maybe Text -> S3OutputUrl
S3OutputUrl' 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
"OutputUrl")
      )

instance Prelude.Hashable S3OutputUrl where
  hashWithSalt :: Int -> S3OutputUrl -> Int
hashWithSalt Int
_salt S3OutputUrl' {Maybe Text
outputUrl :: Maybe Text
$sel:outputUrl:S3OutputUrl' :: S3OutputUrl -> Maybe Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
outputUrl

instance Prelude.NFData S3OutputUrl where
  rnf :: S3OutputUrl -> ()
rnf S3OutputUrl' {Maybe Text
outputUrl :: Maybe Text
$sel:outputUrl:S3OutputUrl' :: S3OutputUrl -> Maybe Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
outputUrl