{-# 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 #-}
module Amazonka.SageMaker.Types.GitConfigForUpdate where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data GitConfigForUpdate = GitConfigForUpdate'
{
GitConfigForUpdate -> Maybe Text
secretArn :: Prelude.Maybe Prelude.Text
}
deriving (GitConfigForUpdate -> GitConfigForUpdate -> Bool
(GitConfigForUpdate -> GitConfigForUpdate -> Bool)
-> (GitConfigForUpdate -> GitConfigForUpdate -> Bool)
-> Eq GitConfigForUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GitConfigForUpdate -> GitConfigForUpdate -> Bool
$c/= :: GitConfigForUpdate -> GitConfigForUpdate -> Bool
== :: GitConfigForUpdate -> GitConfigForUpdate -> Bool
$c== :: GitConfigForUpdate -> GitConfigForUpdate -> Bool
Prelude.Eq, ReadPrec [GitConfigForUpdate]
ReadPrec GitConfigForUpdate
Int -> ReadS GitConfigForUpdate
ReadS [GitConfigForUpdate]
(Int -> ReadS GitConfigForUpdate)
-> ReadS [GitConfigForUpdate]
-> ReadPrec GitConfigForUpdate
-> ReadPrec [GitConfigForUpdate]
-> Read GitConfigForUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GitConfigForUpdate]
$creadListPrec :: ReadPrec [GitConfigForUpdate]
readPrec :: ReadPrec GitConfigForUpdate
$creadPrec :: ReadPrec GitConfigForUpdate
readList :: ReadS [GitConfigForUpdate]
$creadList :: ReadS [GitConfigForUpdate]
readsPrec :: Int -> ReadS GitConfigForUpdate
$creadsPrec :: Int -> ReadS GitConfigForUpdate
Prelude.Read, Int -> GitConfigForUpdate -> ShowS
[GitConfigForUpdate] -> ShowS
GitConfigForUpdate -> String
(Int -> GitConfigForUpdate -> ShowS)
-> (GitConfigForUpdate -> String)
-> ([GitConfigForUpdate] -> ShowS)
-> Show GitConfigForUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GitConfigForUpdate] -> ShowS
$cshowList :: [GitConfigForUpdate] -> ShowS
show :: GitConfigForUpdate -> String
$cshow :: GitConfigForUpdate -> String
showsPrec :: Int -> GitConfigForUpdate -> ShowS
$cshowsPrec :: Int -> GitConfigForUpdate -> ShowS
Prelude.Show, (forall x. GitConfigForUpdate -> Rep GitConfigForUpdate x)
-> (forall x. Rep GitConfigForUpdate x -> GitConfigForUpdate)
-> Generic GitConfigForUpdate
forall x. Rep GitConfigForUpdate x -> GitConfigForUpdate
forall x. GitConfigForUpdate -> Rep GitConfigForUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GitConfigForUpdate x -> GitConfigForUpdate
$cfrom :: forall x. GitConfigForUpdate -> Rep GitConfigForUpdate x
Prelude.Generic)
newGitConfigForUpdate ::
GitConfigForUpdate
newGitConfigForUpdate :: GitConfigForUpdate
newGitConfigForUpdate =
GitConfigForUpdate' :: Maybe Text -> GitConfigForUpdate
GitConfigForUpdate' {$sel:secretArn:GitConfigForUpdate' :: Maybe Text
secretArn = Maybe Text
forall a. Maybe a
Prelude.Nothing}
gitConfigForUpdate_secretArn :: Lens.Lens' GitConfigForUpdate (Prelude.Maybe Prelude.Text)
gitConfigForUpdate_secretArn :: (Maybe Text -> f (Maybe Text))
-> GitConfigForUpdate -> f GitConfigForUpdate
gitConfigForUpdate_secretArn = (GitConfigForUpdate -> Maybe Text)
-> (GitConfigForUpdate -> Maybe Text -> GitConfigForUpdate)
-> Lens
GitConfigForUpdate GitConfigForUpdate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GitConfigForUpdate' {Maybe Text
secretArn :: Maybe Text
$sel:secretArn:GitConfigForUpdate' :: GitConfigForUpdate -> Maybe Text
secretArn} -> Maybe Text
secretArn) (\s :: GitConfigForUpdate
s@GitConfigForUpdate' {} Maybe Text
a -> GitConfigForUpdate
s {$sel:secretArn:GitConfigForUpdate' :: Maybe Text
secretArn = Maybe Text
a} :: GitConfigForUpdate)
instance Prelude.Hashable GitConfigForUpdate
instance Prelude.NFData GitConfigForUpdate
instance Core.ToJSON GitConfigForUpdate where
toJSON :: GitConfigForUpdate -> Value
toJSON GitConfigForUpdate' {Maybe Text
secretArn :: Maybe Text
$sel:secretArn:GitConfigForUpdate' :: GitConfigForUpdate -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Text
"SecretArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
secretArn]
)