{-# 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.WorkSpaces.Types.ConnectionAliasAssociation where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.WorkSpaces.Types.AssociationStatus
data ConnectionAliasAssociation = ConnectionAliasAssociation'
{
ConnectionAliasAssociation -> Maybe Text
associatedAccountId :: Prelude.Maybe Prelude.Text,
ConnectionAliasAssociation -> Maybe Text
resourceId :: Prelude.Maybe Prelude.Text,
ConnectionAliasAssociation -> Maybe AssociationStatus
associationStatus :: Prelude.Maybe AssociationStatus,
ConnectionAliasAssociation -> Maybe Text
connectionIdentifier :: Prelude.Maybe Prelude.Text
}
deriving (ConnectionAliasAssociation -> ConnectionAliasAssociation -> Bool
(ConnectionAliasAssociation -> ConnectionAliasAssociation -> Bool)
-> (ConnectionAliasAssociation
-> ConnectionAliasAssociation -> Bool)
-> Eq ConnectionAliasAssociation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConnectionAliasAssociation -> ConnectionAliasAssociation -> Bool
$c/= :: ConnectionAliasAssociation -> ConnectionAliasAssociation -> Bool
== :: ConnectionAliasAssociation -> ConnectionAliasAssociation -> Bool
$c== :: ConnectionAliasAssociation -> ConnectionAliasAssociation -> Bool
Prelude.Eq, ReadPrec [ConnectionAliasAssociation]
ReadPrec ConnectionAliasAssociation
Int -> ReadS ConnectionAliasAssociation
ReadS [ConnectionAliasAssociation]
(Int -> ReadS ConnectionAliasAssociation)
-> ReadS [ConnectionAliasAssociation]
-> ReadPrec ConnectionAliasAssociation
-> ReadPrec [ConnectionAliasAssociation]
-> Read ConnectionAliasAssociation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConnectionAliasAssociation]
$creadListPrec :: ReadPrec [ConnectionAliasAssociation]
readPrec :: ReadPrec ConnectionAliasAssociation
$creadPrec :: ReadPrec ConnectionAliasAssociation
readList :: ReadS [ConnectionAliasAssociation]
$creadList :: ReadS [ConnectionAliasAssociation]
readsPrec :: Int -> ReadS ConnectionAliasAssociation
$creadsPrec :: Int -> ReadS ConnectionAliasAssociation
Prelude.Read, Int -> ConnectionAliasAssociation -> ShowS
[ConnectionAliasAssociation] -> ShowS
ConnectionAliasAssociation -> String
(Int -> ConnectionAliasAssociation -> ShowS)
-> (ConnectionAliasAssociation -> String)
-> ([ConnectionAliasAssociation] -> ShowS)
-> Show ConnectionAliasAssociation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConnectionAliasAssociation] -> ShowS
$cshowList :: [ConnectionAliasAssociation] -> ShowS
show :: ConnectionAliasAssociation -> String
$cshow :: ConnectionAliasAssociation -> String
showsPrec :: Int -> ConnectionAliasAssociation -> ShowS
$cshowsPrec :: Int -> ConnectionAliasAssociation -> ShowS
Prelude.Show, (forall x.
ConnectionAliasAssociation -> Rep ConnectionAliasAssociation x)
-> (forall x.
Rep ConnectionAliasAssociation x -> ConnectionAliasAssociation)
-> Generic ConnectionAliasAssociation
forall x.
Rep ConnectionAliasAssociation x -> ConnectionAliasAssociation
forall x.
ConnectionAliasAssociation -> Rep ConnectionAliasAssociation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ConnectionAliasAssociation x -> ConnectionAliasAssociation
$cfrom :: forall x.
ConnectionAliasAssociation -> Rep ConnectionAliasAssociation x
Prelude.Generic)
newConnectionAliasAssociation ::
ConnectionAliasAssociation
newConnectionAliasAssociation :: ConnectionAliasAssociation
newConnectionAliasAssociation =
ConnectionAliasAssociation' :: Maybe Text
-> Maybe Text
-> Maybe AssociationStatus
-> Maybe Text
-> ConnectionAliasAssociation
ConnectionAliasAssociation'
{ $sel:associatedAccountId:ConnectionAliasAssociation' :: Maybe Text
associatedAccountId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resourceId:ConnectionAliasAssociation' :: Maybe Text
resourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:associationStatus:ConnectionAliasAssociation' :: Maybe AssociationStatus
associationStatus = Maybe AssociationStatus
forall a. Maybe a
Prelude.Nothing,
$sel:connectionIdentifier:ConnectionAliasAssociation' :: Maybe Text
connectionIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
connectionAliasAssociation_associatedAccountId :: Lens.Lens' ConnectionAliasAssociation (Prelude.Maybe Prelude.Text)
connectionAliasAssociation_associatedAccountId :: (Maybe Text -> f (Maybe Text))
-> ConnectionAliasAssociation -> f ConnectionAliasAssociation
connectionAliasAssociation_associatedAccountId = (ConnectionAliasAssociation -> Maybe Text)
-> (ConnectionAliasAssociation
-> Maybe Text -> ConnectionAliasAssociation)
-> Lens
ConnectionAliasAssociation
ConnectionAliasAssociation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectionAliasAssociation' {Maybe Text
associatedAccountId :: Maybe Text
$sel:associatedAccountId:ConnectionAliasAssociation' :: ConnectionAliasAssociation -> Maybe Text
associatedAccountId} -> Maybe Text
associatedAccountId) (\s :: ConnectionAliasAssociation
s@ConnectionAliasAssociation' {} Maybe Text
a -> ConnectionAliasAssociation
s {$sel:associatedAccountId:ConnectionAliasAssociation' :: Maybe Text
associatedAccountId = Maybe Text
a} :: ConnectionAliasAssociation)
connectionAliasAssociation_resourceId :: Lens.Lens' ConnectionAliasAssociation (Prelude.Maybe Prelude.Text)
connectionAliasAssociation_resourceId :: (Maybe Text -> f (Maybe Text))
-> ConnectionAliasAssociation -> f ConnectionAliasAssociation
connectionAliasAssociation_resourceId = (ConnectionAliasAssociation -> Maybe Text)
-> (ConnectionAliasAssociation
-> Maybe Text -> ConnectionAliasAssociation)
-> Lens
ConnectionAliasAssociation
ConnectionAliasAssociation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectionAliasAssociation' {Maybe Text
resourceId :: Maybe Text
$sel:resourceId:ConnectionAliasAssociation' :: ConnectionAliasAssociation -> Maybe Text
resourceId} -> Maybe Text
resourceId) (\s :: ConnectionAliasAssociation
s@ConnectionAliasAssociation' {} Maybe Text
a -> ConnectionAliasAssociation
s {$sel:resourceId:ConnectionAliasAssociation' :: Maybe Text
resourceId = Maybe Text
a} :: ConnectionAliasAssociation)
connectionAliasAssociation_associationStatus :: Lens.Lens' ConnectionAliasAssociation (Prelude.Maybe AssociationStatus)
connectionAliasAssociation_associationStatus :: (Maybe AssociationStatus -> f (Maybe AssociationStatus))
-> ConnectionAliasAssociation -> f ConnectionAliasAssociation
connectionAliasAssociation_associationStatus = (ConnectionAliasAssociation -> Maybe AssociationStatus)
-> (ConnectionAliasAssociation
-> Maybe AssociationStatus -> ConnectionAliasAssociation)
-> Lens
ConnectionAliasAssociation
ConnectionAliasAssociation
(Maybe AssociationStatus)
(Maybe AssociationStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectionAliasAssociation' {Maybe AssociationStatus
associationStatus :: Maybe AssociationStatus
$sel:associationStatus:ConnectionAliasAssociation' :: ConnectionAliasAssociation -> Maybe AssociationStatus
associationStatus} -> Maybe AssociationStatus
associationStatus) (\s :: ConnectionAliasAssociation
s@ConnectionAliasAssociation' {} Maybe AssociationStatus
a -> ConnectionAliasAssociation
s {$sel:associationStatus:ConnectionAliasAssociation' :: Maybe AssociationStatus
associationStatus = Maybe AssociationStatus
a} :: ConnectionAliasAssociation)
connectionAliasAssociation_connectionIdentifier :: Lens.Lens' ConnectionAliasAssociation (Prelude.Maybe Prelude.Text)
connectionAliasAssociation_connectionIdentifier :: (Maybe Text -> f (Maybe Text))
-> ConnectionAliasAssociation -> f ConnectionAliasAssociation
connectionAliasAssociation_connectionIdentifier = (ConnectionAliasAssociation -> Maybe Text)
-> (ConnectionAliasAssociation
-> Maybe Text -> ConnectionAliasAssociation)
-> Lens
ConnectionAliasAssociation
ConnectionAliasAssociation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConnectionAliasAssociation' {Maybe Text
connectionIdentifier :: Maybe Text
$sel:connectionIdentifier:ConnectionAliasAssociation' :: ConnectionAliasAssociation -> Maybe Text
connectionIdentifier} -> Maybe Text
connectionIdentifier) (\s :: ConnectionAliasAssociation
s@ConnectionAliasAssociation' {} Maybe Text
a -> ConnectionAliasAssociation
s {$sel:connectionIdentifier:ConnectionAliasAssociation' :: Maybe Text
connectionIdentifier = Maybe Text
a} :: ConnectionAliasAssociation)
instance Core.FromJSON ConnectionAliasAssociation where
parseJSON :: Value -> Parser ConnectionAliasAssociation
parseJSON =
String
-> (Object -> Parser ConnectionAliasAssociation)
-> Value
-> Parser ConnectionAliasAssociation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ConnectionAliasAssociation"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe AssociationStatus
-> Maybe Text
-> ConnectionAliasAssociation
ConnectionAliasAssociation'
(Maybe Text
-> Maybe Text
-> Maybe AssociationStatus
-> Maybe Text
-> ConnectionAliasAssociation)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe AssociationStatus
-> Maybe Text
-> ConnectionAliasAssociation)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AssociatedAccountId")
Parser
(Maybe Text
-> Maybe AssociationStatus
-> Maybe Text
-> ConnectionAliasAssociation)
-> Parser (Maybe Text)
-> Parser
(Maybe AssociationStatus
-> Maybe Text -> ConnectionAliasAssociation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ResourceId")
Parser
(Maybe AssociationStatus
-> Maybe Text -> ConnectionAliasAssociation)
-> Parser (Maybe AssociationStatus)
-> Parser (Maybe Text -> ConnectionAliasAssociation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AssociationStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AssociationStatus")
Parser (Maybe Text -> ConnectionAliasAssociation)
-> Parser (Maybe Text) -> Parser ConnectionAliasAssociation
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ConnectionIdentifier")
)
instance Prelude.Hashable ConnectionAliasAssociation
instance Prelude.NFData ConnectionAliasAssociation