{-# 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.ECS.Types.RepositoryCredentials 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
data RepositoryCredentials = RepositoryCredentials'
{
RepositoryCredentials -> Text
credentialsParameter :: Prelude.Text
}
deriving (RepositoryCredentials -> RepositoryCredentials -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RepositoryCredentials -> RepositoryCredentials -> Bool
$c/= :: RepositoryCredentials -> RepositoryCredentials -> Bool
== :: RepositoryCredentials -> RepositoryCredentials -> Bool
$c== :: RepositoryCredentials -> RepositoryCredentials -> Bool
Prelude.Eq, ReadPrec [RepositoryCredentials]
ReadPrec RepositoryCredentials
Int -> ReadS RepositoryCredentials
ReadS [RepositoryCredentials]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RepositoryCredentials]
$creadListPrec :: ReadPrec [RepositoryCredentials]
readPrec :: ReadPrec RepositoryCredentials
$creadPrec :: ReadPrec RepositoryCredentials
readList :: ReadS [RepositoryCredentials]
$creadList :: ReadS [RepositoryCredentials]
readsPrec :: Int -> ReadS RepositoryCredentials
$creadsPrec :: Int -> ReadS RepositoryCredentials
Prelude.Read, Int -> RepositoryCredentials -> ShowS
[RepositoryCredentials] -> ShowS
RepositoryCredentials -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RepositoryCredentials] -> ShowS
$cshowList :: [RepositoryCredentials] -> ShowS
show :: RepositoryCredentials -> String
$cshow :: RepositoryCredentials -> String
showsPrec :: Int -> RepositoryCredentials -> ShowS
$cshowsPrec :: Int -> RepositoryCredentials -> ShowS
Prelude.Show, forall x. Rep RepositoryCredentials x -> RepositoryCredentials
forall x. RepositoryCredentials -> Rep RepositoryCredentials x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RepositoryCredentials x -> RepositoryCredentials
$cfrom :: forall x. RepositoryCredentials -> Rep RepositoryCredentials x
Prelude.Generic)
newRepositoryCredentials ::
Prelude.Text ->
RepositoryCredentials
newRepositoryCredentials :: Text -> RepositoryCredentials
newRepositoryCredentials Text
pCredentialsParameter_ =
RepositoryCredentials'
{ $sel:credentialsParameter:RepositoryCredentials' :: Text
credentialsParameter =
Text
pCredentialsParameter_
}
repositoryCredentials_credentialsParameter :: Lens.Lens' RepositoryCredentials Prelude.Text
repositoryCredentials_credentialsParameter :: Lens' RepositoryCredentials Text
repositoryCredentials_credentialsParameter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositoryCredentials' {Text
credentialsParameter :: Text
$sel:credentialsParameter:RepositoryCredentials' :: RepositoryCredentials -> Text
credentialsParameter} -> Text
credentialsParameter) (\s :: RepositoryCredentials
s@RepositoryCredentials' {} Text
a -> RepositoryCredentials
s {$sel:credentialsParameter:RepositoryCredentials' :: Text
credentialsParameter = Text
a} :: RepositoryCredentials)
instance Data.FromJSON RepositoryCredentials where
parseJSON :: Value -> Parser RepositoryCredentials
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"RepositoryCredentials"
( \Object
x ->
Text -> RepositoryCredentials
RepositoryCredentials'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"credentialsParameter")
)
instance Prelude.Hashable RepositoryCredentials where
hashWithSalt :: Int -> RepositoryCredentials -> Int
hashWithSalt Int
_salt RepositoryCredentials' {Text
credentialsParameter :: Text
$sel:credentialsParameter:RepositoryCredentials' :: RepositoryCredentials -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
credentialsParameter
instance Prelude.NFData RepositoryCredentials where
rnf :: RepositoryCredentials -> ()
rnf RepositoryCredentials' {Text
credentialsParameter :: Text
$sel:credentialsParameter:RepositoryCredentials' :: RepositoryCredentials -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
credentialsParameter
instance Data.ToJSON RepositoryCredentials where
toJSON :: RepositoryCredentials -> Value
toJSON RepositoryCredentials' {Text
credentialsParameter :: Text
$sel:credentialsParameter:RepositoryCredentials' :: RepositoryCredentials -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
( Key
"credentialsParameter"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
credentialsParameter
)
]
)