{-# 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.CodeStarConnections.Types.Host where
import Amazonka.CodeStarConnections.Types.ProviderType
import Amazonka.CodeStarConnections.Types.VpcConfiguration
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 Host = Host'
{
Host -> Maybe Text
hostArn :: Prelude.Maybe Prelude.Text,
Host -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
Host -> Maybe Text
providerEndpoint :: Prelude.Maybe Prelude.Text,
Host -> Maybe ProviderType
providerType :: Prelude.Maybe ProviderType,
Host -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
Host -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
Host -> Maybe VpcConfiguration
vpcConfiguration :: Prelude.Maybe VpcConfiguration
}
deriving (Host -> Host -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Host -> Host -> Bool
$c/= :: Host -> Host -> Bool
== :: Host -> Host -> Bool
$c== :: Host -> Host -> Bool
Prelude.Eq, ReadPrec [Host]
ReadPrec Host
Int -> ReadS Host
ReadS [Host]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Host]
$creadListPrec :: ReadPrec [Host]
readPrec :: ReadPrec Host
$creadPrec :: ReadPrec Host
readList :: ReadS [Host]
$creadList :: ReadS [Host]
readsPrec :: Int -> ReadS Host
$creadsPrec :: Int -> ReadS Host
Prelude.Read, Int -> Host -> ShowS
[Host] -> ShowS
Host -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Host] -> ShowS
$cshowList :: [Host] -> ShowS
show :: Host -> String
$cshow :: Host -> String
showsPrec :: Int -> Host -> ShowS
$cshowsPrec :: Int -> Host -> ShowS
Prelude.Show, forall x. Rep Host x -> Host
forall x. Host -> Rep Host x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Host x -> Host
$cfrom :: forall x. Host -> Rep Host x
Prelude.Generic)
newHost ::
Host
newHost :: Host
newHost =
Host'
{ $sel:hostArn:Host' :: Maybe Text
hostArn = forall a. Maybe a
Prelude.Nothing,
$sel:name:Host' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:providerEndpoint:Host' :: Maybe Text
providerEndpoint = forall a. Maybe a
Prelude.Nothing,
$sel:providerType:Host' :: Maybe ProviderType
providerType = forall a. Maybe a
Prelude.Nothing,
$sel:status:Host' :: Maybe Text
status = forall a. Maybe a
Prelude.Nothing,
$sel:statusMessage:Host' :: Maybe Text
statusMessage = forall a. Maybe a
Prelude.Nothing,
$sel:vpcConfiguration:Host' :: Maybe VpcConfiguration
vpcConfiguration = forall a. Maybe a
Prelude.Nothing
}
host_hostArn :: Lens.Lens' Host (Prelude.Maybe Prelude.Text)
host_hostArn :: Lens' Host (Maybe Text)
host_hostArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Host' {Maybe Text
hostArn :: Maybe Text
$sel:hostArn:Host' :: Host -> Maybe Text
hostArn} -> Maybe Text
hostArn) (\s :: Host
s@Host' {} Maybe Text
a -> Host
s {$sel:hostArn:Host' :: Maybe Text
hostArn = Maybe Text
a} :: Host)
host_name :: Lens.Lens' Host (Prelude.Maybe Prelude.Text)
host_name :: Lens' Host (Maybe Text)
host_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Host' {Maybe Text
name :: Maybe Text
$sel:name:Host' :: Host -> Maybe Text
name} -> Maybe Text
name) (\s :: Host
s@Host' {} Maybe Text
a -> Host
s {$sel:name:Host' :: Maybe Text
name = Maybe Text
a} :: Host)
host_providerEndpoint :: Lens.Lens' Host (Prelude.Maybe Prelude.Text)
host_providerEndpoint :: Lens' Host (Maybe Text)
host_providerEndpoint = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Host' {Maybe Text
providerEndpoint :: Maybe Text
$sel:providerEndpoint:Host' :: Host -> Maybe Text
providerEndpoint} -> Maybe Text
providerEndpoint) (\s :: Host
s@Host' {} Maybe Text
a -> Host
s {$sel:providerEndpoint:Host' :: Maybe Text
providerEndpoint = Maybe Text
a} :: Host)
host_providerType :: Lens.Lens' Host (Prelude.Maybe ProviderType)
host_providerType :: Lens' Host (Maybe ProviderType)
host_providerType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Host' {Maybe ProviderType
providerType :: Maybe ProviderType
$sel:providerType:Host' :: Host -> Maybe ProviderType
providerType} -> Maybe ProviderType
providerType) (\s :: Host
s@Host' {} Maybe ProviderType
a -> Host
s {$sel:providerType:Host' :: Maybe ProviderType
providerType = Maybe ProviderType
a} :: Host)
host_status :: Lens.Lens' Host (Prelude.Maybe Prelude.Text)
host_status :: Lens' Host (Maybe Text)
host_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Host' {Maybe Text
status :: Maybe Text
$sel:status:Host' :: Host -> Maybe Text
status} -> Maybe Text
status) (\s :: Host
s@Host' {} Maybe Text
a -> Host
s {$sel:status:Host' :: Maybe Text
status = Maybe Text
a} :: Host)
host_statusMessage :: Lens.Lens' Host (Prelude.Maybe Prelude.Text)
host_statusMessage :: Lens' Host (Maybe Text)
host_statusMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Host' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:Host' :: Host -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: Host
s@Host' {} Maybe Text
a -> Host
s {$sel:statusMessage:Host' :: Maybe Text
statusMessage = Maybe Text
a} :: Host)
host_vpcConfiguration :: Lens.Lens' Host (Prelude.Maybe VpcConfiguration)
host_vpcConfiguration :: Lens' Host (Maybe VpcConfiguration)
host_vpcConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Host' {Maybe VpcConfiguration
vpcConfiguration :: Maybe VpcConfiguration
$sel:vpcConfiguration:Host' :: Host -> Maybe VpcConfiguration
vpcConfiguration} -> Maybe VpcConfiguration
vpcConfiguration) (\s :: Host
s@Host' {} Maybe VpcConfiguration
a -> Host
s {$sel:vpcConfiguration:Host' :: Maybe VpcConfiguration
vpcConfiguration = Maybe VpcConfiguration
a} :: Host)
instance Data.FromJSON Host where
parseJSON :: Value -> Parser Host
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Host"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> Maybe VpcConfiguration
-> Host
Host'
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
"HostArn")
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
"Name")
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
"ProviderEndpoint")
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
"ProviderType")
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
"Status")
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
"StatusMessage")
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
"VpcConfiguration")
)
instance Prelude.Hashable Host where
hashWithSalt :: Int -> Host -> Int
hashWithSalt Int
_salt Host' {Maybe Text
Maybe ProviderType
Maybe VpcConfiguration
vpcConfiguration :: Maybe VpcConfiguration
statusMessage :: Maybe Text
status :: Maybe Text
providerType :: Maybe ProviderType
providerEndpoint :: Maybe Text
name :: Maybe Text
hostArn :: Maybe Text
$sel:vpcConfiguration:Host' :: Host -> Maybe VpcConfiguration
$sel:statusMessage:Host' :: Host -> Maybe Text
$sel:status:Host' :: Host -> Maybe Text
$sel:providerType:Host' :: Host -> Maybe ProviderType
$sel:providerEndpoint:Host' :: Host -> Maybe Text
$sel:name:Host' :: Host -> Maybe Text
$sel:hostArn:Host' :: Host -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
hostArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
providerEndpoint
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProviderType
providerType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
statusMessage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VpcConfiguration
vpcConfiguration
instance Prelude.NFData Host where
rnf :: Host -> ()
rnf Host' {Maybe Text
Maybe ProviderType
Maybe VpcConfiguration
vpcConfiguration :: Maybe VpcConfiguration
statusMessage :: Maybe Text
status :: Maybe Text
providerType :: Maybe ProviderType
providerEndpoint :: Maybe Text
name :: Maybe Text
hostArn :: Maybe Text
$sel:vpcConfiguration:Host' :: Host -> Maybe VpcConfiguration
$sel:statusMessage:Host' :: Host -> Maybe Text
$sel:status:Host' :: Host -> Maybe Text
$sel:providerType:Host' :: Host -> Maybe ProviderType
$sel:providerEndpoint:Host' :: Host -> Maybe Text
$sel:name:Host' :: Host -> Maybe Text
$sel:hostArn:Host' :: Host -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
hostArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
providerEndpoint
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProviderType
providerType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
statusMessage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VpcConfiguration
vpcConfiguration