{-# 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.Transfer.Types.DescribedProfile 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.Transfer.Types.ProfileType
import Amazonka.Transfer.Types.Tag
data DescribedProfile = DescribedProfile'
{
DescribedProfile -> Maybe Text
as2Id :: Prelude.Maybe Prelude.Text,
DescribedProfile -> Maybe [Text]
certificateIds :: Prelude.Maybe [Prelude.Text],
DescribedProfile -> Maybe Text
profileId :: Prelude.Maybe Prelude.Text,
DescribedProfile -> Maybe ProfileType
profileType :: Prelude.Maybe ProfileType,
DescribedProfile -> Maybe (NonEmpty Tag)
tags :: Prelude.Maybe (Prelude.NonEmpty Tag),
DescribedProfile -> Text
arn :: Prelude.Text
}
deriving (DescribedProfile -> DescribedProfile -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribedProfile -> DescribedProfile -> Bool
$c/= :: DescribedProfile -> DescribedProfile -> Bool
== :: DescribedProfile -> DescribedProfile -> Bool
$c== :: DescribedProfile -> DescribedProfile -> Bool
Prelude.Eq, ReadPrec [DescribedProfile]
ReadPrec DescribedProfile
Int -> ReadS DescribedProfile
ReadS [DescribedProfile]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribedProfile]
$creadListPrec :: ReadPrec [DescribedProfile]
readPrec :: ReadPrec DescribedProfile
$creadPrec :: ReadPrec DescribedProfile
readList :: ReadS [DescribedProfile]
$creadList :: ReadS [DescribedProfile]
readsPrec :: Int -> ReadS DescribedProfile
$creadsPrec :: Int -> ReadS DescribedProfile
Prelude.Read, Int -> DescribedProfile -> ShowS
[DescribedProfile] -> ShowS
DescribedProfile -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribedProfile] -> ShowS
$cshowList :: [DescribedProfile] -> ShowS
show :: DescribedProfile -> String
$cshow :: DescribedProfile -> String
showsPrec :: Int -> DescribedProfile -> ShowS
$cshowsPrec :: Int -> DescribedProfile -> ShowS
Prelude.Show, forall x. Rep DescribedProfile x -> DescribedProfile
forall x. DescribedProfile -> Rep DescribedProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribedProfile x -> DescribedProfile
$cfrom :: forall x. DescribedProfile -> Rep DescribedProfile x
Prelude.Generic)
newDescribedProfile ::
Prelude.Text ->
DescribedProfile
newDescribedProfile :: Text -> DescribedProfile
newDescribedProfile Text
pArn_ =
DescribedProfile'
{ $sel:as2Id:DescribedProfile' :: Maybe Text
as2Id = forall a. Maybe a
Prelude.Nothing,
$sel:certificateIds:DescribedProfile' :: Maybe [Text]
certificateIds = forall a. Maybe a
Prelude.Nothing,
$sel:profileId:DescribedProfile' :: Maybe Text
profileId = forall a. Maybe a
Prelude.Nothing,
$sel:profileType:DescribedProfile' :: Maybe ProfileType
profileType = forall a. Maybe a
Prelude.Nothing,
$sel:tags:DescribedProfile' :: Maybe (NonEmpty Tag)
tags = forall a. Maybe a
Prelude.Nothing,
$sel:arn:DescribedProfile' :: Text
arn = Text
pArn_
}
describedProfile_as2Id :: Lens.Lens' DescribedProfile (Prelude.Maybe Prelude.Text)
describedProfile_as2Id :: Lens' DescribedProfile (Maybe Text)
describedProfile_as2Id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedProfile' {Maybe Text
as2Id :: Maybe Text
$sel:as2Id:DescribedProfile' :: DescribedProfile -> Maybe Text
as2Id} -> Maybe Text
as2Id) (\s :: DescribedProfile
s@DescribedProfile' {} Maybe Text
a -> DescribedProfile
s {$sel:as2Id:DescribedProfile' :: Maybe Text
as2Id = Maybe Text
a} :: DescribedProfile)
describedProfile_certificateIds :: Lens.Lens' DescribedProfile (Prelude.Maybe [Prelude.Text])
describedProfile_certificateIds :: Lens' DescribedProfile (Maybe [Text])
describedProfile_certificateIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedProfile' {Maybe [Text]
certificateIds :: Maybe [Text]
$sel:certificateIds:DescribedProfile' :: DescribedProfile -> Maybe [Text]
certificateIds} -> Maybe [Text]
certificateIds) (\s :: DescribedProfile
s@DescribedProfile' {} Maybe [Text]
a -> DescribedProfile
s {$sel:certificateIds:DescribedProfile' :: Maybe [Text]
certificateIds = Maybe [Text]
a} :: DescribedProfile) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describedProfile_profileId :: Lens.Lens' DescribedProfile (Prelude.Maybe Prelude.Text)
describedProfile_profileId :: Lens' DescribedProfile (Maybe Text)
describedProfile_profileId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedProfile' {Maybe Text
profileId :: Maybe Text
$sel:profileId:DescribedProfile' :: DescribedProfile -> Maybe Text
profileId} -> Maybe Text
profileId) (\s :: DescribedProfile
s@DescribedProfile' {} Maybe Text
a -> DescribedProfile
s {$sel:profileId:DescribedProfile' :: Maybe Text
profileId = Maybe Text
a} :: DescribedProfile)
describedProfile_profileType :: Lens.Lens' DescribedProfile (Prelude.Maybe ProfileType)
describedProfile_profileType :: Lens' DescribedProfile (Maybe ProfileType)
describedProfile_profileType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedProfile' {Maybe ProfileType
profileType :: Maybe ProfileType
$sel:profileType:DescribedProfile' :: DescribedProfile -> Maybe ProfileType
profileType} -> Maybe ProfileType
profileType) (\s :: DescribedProfile
s@DescribedProfile' {} Maybe ProfileType
a -> DescribedProfile
s {$sel:profileType:DescribedProfile' :: Maybe ProfileType
profileType = Maybe ProfileType
a} :: DescribedProfile)
describedProfile_tags :: Lens.Lens' DescribedProfile (Prelude.Maybe (Prelude.NonEmpty Tag))
describedProfile_tags :: Lens' DescribedProfile (Maybe (NonEmpty Tag))
describedProfile_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedProfile' {Maybe (NonEmpty Tag)
tags :: Maybe (NonEmpty Tag)
$sel:tags:DescribedProfile' :: DescribedProfile -> Maybe (NonEmpty Tag)
tags} -> Maybe (NonEmpty Tag)
tags) (\s :: DescribedProfile
s@DescribedProfile' {} Maybe (NonEmpty Tag)
a -> DescribedProfile
s {$sel:tags:DescribedProfile' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
a} :: DescribedProfile) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describedProfile_arn :: Lens.Lens' DescribedProfile Prelude.Text
describedProfile_arn :: Lens' DescribedProfile Text
describedProfile_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribedProfile' {Text
arn :: Text
$sel:arn:DescribedProfile' :: DescribedProfile -> Text
arn} -> Text
arn) (\s :: DescribedProfile
s@DescribedProfile' {} Text
a -> DescribedProfile
s {$sel:arn:DescribedProfile' :: Text
arn = Text
a} :: DescribedProfile)
instance Data.FromJSON DescribedProfile where
parseJSON :: Value -> Parser DescribedProfile
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DescribedProfile"
( \Object
x ->
Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe ProfileType
-> Maybe (NonEmpty Tag)
-> Text
-> DescribedProfile
DescribedProfile'
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
"As2Id")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CertificateIds" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ProfileId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ProfileType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Tags")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Arn")
)
instance Prelude.Hashable DescribedProfile where
hashWithSalt :: Int -> DescribedProfile -> Int
hashWithSalt Int
_salt DescribedProfile' {Maybe [Text]
Maybe (NonEmpty Tag)
Maybe Text
Maybe ProfileType
Text
arn :: Text
tags :: Maybe (NonEmpty Tag)
profileType :: Maybe ProfileType
profileId :: Maybe Text
certificateIds :: Maybe [Text]
as2Id :: Maybe Text
$sel:arn:DescribedProfile' :: DescribedProfile -> Text
$sel:tags:DescribedProfile' :: DescribedProfile -> Maybe (NonEmpty Tag)
$sel:profileType:DescribedProfile' :: DescribedProfile -> Maybe ProfileType
$sel:profileId:DescribedProfile' :: DescribedProfile -> Maybe Text
$sel:certificateIds:DescribedProfile' :: DescribedProfile -> Maybe [Text]
$sel:as2Id:DescribedProfile' :: DescribedProfile -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
as2Id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
certificateIds
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
profileId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProfileType
profileType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Tag)
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
instance Prelude.NFData DescribedProfile where
rnf :: DescribedProfile -> ()
rnf DescribedProfile' {Maybe [Text]
Maybe (NonEmpty Tag)
Maybe Text
Maybe ProfileType
Text
arn :: Text
tags :: Maybe (NonEmpty Tag)
profileType :: Maybe ProfileType
profileId :: Maybe Text
certificateIds :: Maybe [Text]
as2Id :: Maybe Text
$sel:arn:DescribedProfile' :: DescribedProfile -> Text
$sel:tags:DescribedProfile' :: DescribedProfile -> Maybe (NonEmpty Tag)
$sel:profileType:DescribedProfile' :: DescribedProfile -> Maybe ProfileType
$sel:profileId:DescribedProfile' :: DescribedProfile -> Maybe Text
$sel:certificateIds:DescribedProfile' :: DescribedProfile -> Maybe [Text]
$sel:as2Id:DescribedProfile' :: DescribedProfile -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
as2Id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
certificateIds
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
profileId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProfileType
profileType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Tag)
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
arn