{-# 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.InstanceAssociationOutputUrl
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SSM.Types.InstanceAssociationOutputUrl where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSM.Types.S3OutputUrl

-- | The URL of S3 bucket where you want to store the results of this
-- request.
--
-- /See:/ 'newInstanceAssociationOutputUrl' smart constructor.
data InstanceAssociationOutputUrl = InstanceAssociationOutputUrl'
  { -- | The URL of S3 bucket where you want to store the results of this
    -- request.
    InstanceAssociationOutputUrl -> Maybe S3OutputUrl
s3OutputUrl :: Prelude.Maybe S3OutputUrl
  }
  deriving (InstanceAssociationOutputUrl
-> InstanceAssociationOutputUrl -> Bool
(InstanceAssociationOutputUrl
 -> InstanceAssociationOutputUrl -> Bool)
-> (InstanceAssociationOutputUrl
    -> InstanceAssociationOutputUrl -> Bool)
-> Eq InstanceAssociationOutputUrl
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InstanceAssociationOutputUrl
-> InstanceAssociationOutputUrl -> Bool
$c/= :: InstanceAssociationOutputUrl
-> InstanceAssociationOutputUrl -> Bool
== :: InstanceAssociationOutputUrl
-> InstanceAssociationOutputUrl -> Bool
$c== :: InstanceAssociationOutputUrl
-> InstanceAssociationOutputUrl -> Bool
Prelude.Eq, ReadPrec [InstanceAssociationOutputUrl]
ReadPrec InstanceAssociationOutputUrl
Int -> ReadS InstanceAssociationOutputUrl
ReadS [InstanceAssociationOutputUrl]
(Int -> ReadS InstanceAssociationOutputUrl)
-> ReadS [InstanceAssociationOutputUrl]
-> ReadPrec InstanceAssociationOutputUrl
-> ReadPrec [InstanceAssociationOutputUrl]
-> Read InstanceAssociationOutputUrl
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InstanceAssociationOutputUrl]
$creadListPrec :: ReadPrec [InstanceAssociationOutputUrl]
readPrec :: ReadPrec InstanceAssociationOutputUrl
$creadPrec :: ReadPrec InstanceAssociationOutputUrl
readList :: ReadS [InstanceAssociationOutputUrl]
$creadList :: ReadS [InstanceAssociationOutputUrl]
readsPrec :: Int -> ReadS InstanceAssociationOutputUrl
$creadsPrec :: Int -> ReadS InstanceAssociationOutputUrl
Prelude.Read, Int -> InstanceAssociationOutputUrl -> ShowS
[InstanceAssociationOutputUrl] -> ShowS
InstanceAssociationOutputUrl -> String
(Int -> InstanceAssociationOutputUrl -> ShowS)
-> (InstanceAssociationOutputUrl -> String)
-> ([InstanceAssociationOutputUrl] -> ShowS)
-> Show InstanceAssociationOutputUrl
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InstanceAssociationOutputUrl] -> ShowS
$cshowList :: [InstanceAssociationOutputUrl] -> ShowS
show :: InstanceAssociationOutputUrl -> String
$cshow :: InstanceAssociationOutputUrl -> String
showsPrec :: Int -> InstanceAssociationOutputUrl -> ShowS
$cshowsPrec :: Int -> InstanceAssociationOutputUrl -> ShowS
Prelude.Show, (forall x.
 InstanceAssociationOutputUrl -> Rep InstanceAssociationOutputUrl x)
-> (forall x.
    Rep InstanceAssociationOutputUrl x -> InstanceAssociationOutputUrl)
-> Generic InstanceAssociationOutputUrl
forall x.
Rep InstanceAssociationOutputUrl x -> InstanceAssociationOutputUrl
forall x.
InstanceAssociationOutputUrl -> Rep InstanceAssociationOutputUrl x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep InstanceAssociationOutputUrl x -> InstanceAssociationOutputUrl
$cfrom :: forall x.
InstanceAssociationOutputUrl -> Rep InstanceAssociationOutputUrl x
Prelude.Generic)

-- |
-- Create a value of 'InstanceAssociationOutputUrl' 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:
--
-- 's3OutputUrl', 'instanceAssociationOutputUrl_s3OutputUrl' - The URL of S3 bucket where you want to store the results of this
-- request.
newInstanceAssociationOutputUrl ::
  InstanceAssociationOutputUrl
newInstanceAssociationOutputUrl :: InstanceAssociationOutputUrl
newInstanceAssociationOutputUrl =
  InstanceAssociationOutputUrl' :: Maybe S3OutputUrl -> InstanceAssociationOutputUrl
InstanceAssociationOutputUrl'
    { $sel:s3OutputUrl:InstanceAssociationOutputUrl' :: Maybe S3OutputUrl
s3OutputUrl =
        Maybe S3OutputUrl
forall a. Maybe a
Prelude.Nothing
    }

-- | The URL of S3 bucket where you want to store the results of this
-- request.
instanceAssociationOutputUrl_s3OutputUrl :: Lens.Lens' InstanceAssociationOutputUrl (Prelude.Maybe S3OutputUrl)
instanceAssociationOutputUrl_s3OutputUrl :: (Maybe S3OutputUrl -> f (Maybe S3OutputUrl))
-> InstanceAssociationOutputUrl -> f InstanceAssociationOutputUrl
instanceAssociationOutputUrl_s3OutputUrl = (InstanceAssociationOutputUrl -> Maybe S3OutputUrl)
-> (InstanceAssociationOutputUrl
    -> Maybe S3OutputUrl -> InstanceAssociationOutputUrl)
-> Lens
     InstanceAssociationOutputUrl
     InstanceAssociationOutputUrl
     (Maybe S3OutputUrl)
     (Maybe S3OutputUrl)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceAssociationOutputUrl' {Maybe S3OutputUrl
s3OutputUrl :: Maybe S3OutputUrl
$sel:s3OutputUrl:InstanceAssociationOutputUrl' :: InstanceAssociationOutputUrl -> Maybe S3OutputUrl
s3OutputUrl} -> Maybe S3OutputUrl
s3OutputUrl) (\s :: InstanceAssociationOutputUrl
s@InstanceAssociationOutputUrl' {} Maybe S3OutputUrl
a -> InstanceAssociationOutputUrl
s {$sel:s3OutputUrl:InstanceAssociationOutputUrl' :: Maybe S3OutputUrl
s3OutputUrl = Maybe S3OutputUrl
a} :: InstanceAssociationOutputUrl)

instance Core.FromJSON InstanceAssociationOutputUrl where
  parseJSON :: Value -> Parser InstanceAssociationOutputUrl
parseJSON =
    String
-> (Object -> Parser InstanceAssociationOutputUrl)
-> Value
-> Parser InstanceAssociationOutputUrl
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"InstanceAssociationOutputUrl"
      ( \Object
x ->
          Maybe S3OutputUrl -> InstanceAssociationOutputUrl
InstanceAssociationOutputUrl'
            (Maybe S3OutputUrl -> InstanceAssociationOutputUrl)
-> Parser (Maybe S3OutputUrl)
-> Parser InstanceAssociationOutputUrl
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe S3OutputUrl)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"S3OutputUrl")
      )

instance
  Prelude.Hashable
    InstanceAssociationOutputUrl

instance Prelude.NFData InstanceAssociationOutputUrl