module Stratosphere.Lightsail.Container.PublicEndpointProperty (
module Exports, PublicEndpointProperty(..),
mkPublicEndpointProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Lightsail.Container.HealthCheckConfigProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PublicEndpointProperty
=
PublicEndpointProperty {PublicEndpointProperty -> ()
haddock_workaround_ :: (),
PublicEndpointProperty -> Maybe (Value Text)
containerName :: (Prelude.Maybe (Value Prelude.Text)),
PublicEndpointProperty -> Maybe (Value Integer)
containerPort :: (Prelude.Maybe (Value Prelude.Integer)),
PublicEndpointProperty -> Maybe HealthCheckConfigProperty
healthCheckConfig :: (Prelude.Maybe HealthCheckConfigProperty)}
deriving stock (PublicEndpointProperty -> PublicEndpointProperty -> Bool
(PublicEndpointProperty -> PublicEndpointProperty -> Bool)
-> (PublicEndpointProperty -> PublicEndpointProperty -> Bool)
-> Eq PublicEndpointProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PublicEndpointProperty -> PublicEndpointProperty -> Bool
== :: PublicEndpointProperty -> PublicEndpointProperty -> Bool
$c/= :: PublicEndpointProperty -> PublicEndpointProperty -> Bool
/= :: PublicEndpointProperty -> PublicEndpointProperty -> Bool
Prelude.Eq, Int -> PublicEndpointProperty -> ShowS
[PublicEndpointProperty] -> ShowS
PublicEndpointProperty -> String
(Int -> PublicEndpointProperty -> ShowS)
-> (PublicEndpointProperty -> String)
-> ([PublicEndpointProperty] -> ShowS)
-> Show PublicEndpointProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PublicEndpointProperty -> ShowS
showsPrec :: Int -> PublicEndpointProperty -> ShowS
$cshow :: PublicEndpointProperty -> String
show :: PublicEndpointProperty -> String
$cshowList :: [PublicEndpointProperty] -> ShowS
showList :: [PublicEndpointProperty] -> ShowS
Prelude.Show)
mkPublicEndpointProperty :: PublicEndpointProperty
mkPublicEndpointProperty :: PublicEndpointProperty
mkPublicEndpointProperty
= PublicEndpointProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), containerName :: Maybe (Value Text)
containerName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
containerPort :: Maybe (Value Integer)
containerPort = Maybe (Value Integer)
forall a. Maybe a
Prelude.Nothing,
healthCheckConfig :: Maybe HealthCheckConfigProperty
healthCheckConfig = Maybe HealthCheckConfigProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PublicEndpointProperty where
toResourceProperties :: PublicEndpointProperty -> ResourceProperties
toResourceProperties PublicEndpointProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe HealthCheckConfigProperty
()
haddock_workaround_ :: PublicEndpointProperty -> ()
containerName :: PublicEndpointProperty -> Maybe (Value Text)
containerPort :: PublicEndpointProperty -> Maybe (Value Integer)
healthCheckConfig :: PublicEndpointProperty -> Maybe HealthCheckConfigProperty
haddock_workaround_ :: ()
containerName :: Maybe (Value Text)
containerPort :: Maybe (Value Integer)
healthCheckConfig :: Maybe HealthCheckConfigProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Lightsail::Container.PublicEndpoint",
supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ContainerName" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
containerName,
Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ContainerPort" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
containerPort,
Key -> HealthCheckConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"HealthCheckConfig" (HealthCheckConfigProperty -> (Key, Value))
-> Maybe HealthCheckConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HealthCheckConfigProperty
healthCheckConfig])}
instance JSON.ToJSON PublicEndpointProperty where
toJSON :: PublicEndpointProperty -> Value
toJSON PublicEndpointProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe HealthCheckConfigProperty
()
haddock_workaround_ :: PublicEndpointProperty -> ()
containerName :: PublicEndpointProperty -> Maybe (Value Text)
containerPort :: PublicEndpointProperty -> Maybe (Value Integer)
healthCheckConfig :: PublicEndpointProperty -> Maybe HealthCheckConfigProperty
haddock_workaround_ :: ()
containerName :: Maybe (Value Text)
containerPort :: Maybe (Value Integer)
healthCheckConfig :: Maybe HealthCheckConfigProperty
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ContainerName" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
containerName,
Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ContainerPort" (Value Integer -> (Key, Value))
-> Maybe (Value Integer) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Integer)
containerPort,
Key -> HealthCheckConfigProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"HealthCheckConfig" (HealthCheckConfigProperty -> (Key, Value))
-> Maybe HealthCheckConfigProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HealthCheckConfigProperty
healthCheckConfig]))
instance Property "ContainerName" PublicEndpointProperty where
type PropertyType "ContainerName" PublicEndpointProperty = Value Prelude.Text
set :: PropertyType "ContainerName" PublicEndpointProperty
-> PublicEndpointProperty -> PublicEndpointProperty
set PropertyType "ContainerName" PublicEndpointProperty
newValue PublicEndpointProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe HealthCheckConfigProperty
()
haddock_workaround_ :: PublicEndpointProperty -> ()
containerName :: PublicEndpointProperty -> Maybe (Value Text)
containerPort :: PublicEndpointProperty -> Maybe (Value Integer)
healthCheckConfig :: PublicEndpointProperty -> Maybe HealthCheckConfigProperty
haddock_workaround_ :: ()
containerName :: Maybe (Value Text)
containerPort :: Maybe (Value Integer)
healthCheckConfig :: Maybe HealthCheckConfigProperty
..}
= PublicEndpointProperty
{containerName :: Maybe (Value Text)
containerName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ContainerName" PublicEndpointProperty
Value Text
newValue, Maybe (Value Integer)
Maybe HealthCheckConfigProperty
()
haddock_workaround_ :: ()
containerPort :: Maybe (Value Integer)
healthCheckConfig :: Maybe HealthCheckConfigProperty
haddock_workaround_ :: ()
containerPort :: Maybe (Value Integer)
healthCheckConfig :: Maybe HealthCheckConfigProperty
..}
instance Property "ContainerPort" PublicEndpointProperty where
type PropertyType "ContainerPort" PublicEndpointProperty = Value Prelude.Integer
set :: PropertyType "ContainerPort" PublicEndpointProperty
-> PublicEndpointProperty -> PublicEndpointProperty
set PropertyType "ContainerPort" PublicEndpointProperty
newValue PublicEndpointProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe HealthCheckConfigProperty
()
haddock_workaround_ :: PublicEndpointProperty -> ()
containerName :: PublicEndpointProperty -> Maybe (Value Text)
containerPort :: PublicEndpointProperty -> Maybe (Value Integer)
healthCheckConfig :: PublicEndpointProperty -> Maybe HealthCheckConfigProperty
haddock_workaround_ :: ()
containerName :: Maybe (Value Text)
containerPort :: Maybe (Value Integer)
healthCheckConfig :: Maybe HealthCheckConfigProperty
..}
= PublicEndpointProperty
{containerPort :: Maybe (Value Integer)
containerPort = Value Integer -> Maybe (Value Integer)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ContainerPort" PublicEndpointProperty
Value Integer
newValue, Maybe (Value Text)
Maybe HealthCheckConfigProperty
()
haddock_workaround_ :: ()
containerName :: Maybe (Value Text)
healthCheckConfig :: Maybe HealthCheckConfigProperty
haddock_workaround_ :: ()
containerName :: Maybe (Value Text)
healthCheckConfig :: Maybe HealthCheckConfigProperty
..}
instance Property "HealthCheckConfig" PublicEndpointProperty where
type PropertyType "HealthCheckConfig" PublicEndpointProperty = HealthCheckConfigProperty
set :: PropertyType "HealthCheckConfig" PublicEndpointProperty
-> PublicEndpointProperty -> PublicEndpointProperty
set PropertyType "HealthCheckConfig" PublicEndpointProperty
newValue PublicEndpointProperty {Maybe (Value Integer)
Maybe (Value Text)
Maybe HealthCheckConfigProperty
()
haddock_workaround_ :: PublicEndpointProperty -> ()
containerName :: PublicEndpointProperty -> Maybe (Value Text)
containerPort :: PublicEndpointProperty -> Maybe (Value Integer)
healthCheckConfig :: PublicEndpointProperty -> Maybe HealthCheckConfigProperty
haddock_workaround_ :: ()
containerName :: Maybe (Value Text)
containerPort :: Maybe (Value Integer)
healthCheckConfig :: Maybe HealthCheckConfigProperty
..}
= PublicEndpointProperty
{healthCheckConfig :: Maybe HealthCheckConfigProperty
healthCheckConfig = HealthCheckConfigProperty -> Maybe HealthCheckConfigProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "HealthCheckConfig" PublicEndpointProperty
HealthCheckConfigProperty
newValue, Maybe (Value Integer)
Maybe (Value Text)
()
haddock_workaround_ :: ()
containerName :: Maybe (Value Text)
containerPort :: Maybe (Value Integer)
haddock_workaround_ :: ()
containerName :: Maybe (Value Text)
containerPort :: Maybe (Value Integer)
..}