module Stratosphere.Lightsail.Container.PortInfoProperty (
        PortInfoProperty(..), mkPortInfoProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PortInfoProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-portinfo.html>
    PortInfoProperty {PortInfoProperty -> ()
haddock_workaround_ :: (),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-portinfo.html#cfn-lightsail-container-portinfo-port>
                      PortInfoProperty -> Maybe (Value Text)
port :: (Prelude.Maybe (Value Prelude.Text)),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-container-portinfo.html#cfn-lightsail-container-portinfo-protocol>
                      PortInfoProperty -> Maybe (Value Text)
protocol :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (PortInfoProperty -> PortInfoProperty -> Bool
(PortInfoProperty -> PortInfoProperty -> Bool)
-> (PortInfoProperty -> PortInfoProperty -> Bool)
-> Eq PortInfoProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PortInfoProperty -> PortInfoProperty -> Bool
== :: PortInfoProperty -> PortInfoProperty -> Bool
$c/= :: PortInfoProperty -> PortInfoProperty -> Bool
/= :: PortInfoProperty -> PortInfoProperty -> Bool
Prelude.Eq, Int -> PortInfoProperty -> ShowS
[PortInfoProperty] -> ShowS
PortInfoProperty -> String
(Int -> PortInfoProperty -> ShowS)
-> (PortInfoProperty -> String)
-> ([PortInfoProperty] -> ShowS)
-> Show PortInfoProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PortInfoProperty -> ShowS
showsPrec :: Int -> PortInfoProperty -> ShowS
$cshow :: PortInfoProperty -> String
show :: PortInfoProperty -> String
$cshowList :: [PortInfoProperty] -> ShowS
showList :: [PortInfoProperty] -> ShowS
Prelude.Show)
mkPortInfoProperty :: PortInfoProperty
mkPortInfoProperty :: PortInfoProperty
mkPortInfoProperty
  = PortInfoProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), port :: Maybe (Value Text)
port = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       protocol :: Maybe (Value Text)
protocol = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties PortInfoProperty where
  toResourceProperties :: PortInfoProperty -> ResourceProperties
toResourceProperties PortInfoProperty {Maybe (Value Text)
()
haddock_workaround_ :: PortInfoProperty -> ()
port :: PortInfoProperty -> Maybe (Value Text)
protocol :: PortInfoProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
port :: Maybe (Value Text)
protocol :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Lightsail::Container.PortInfo",
         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
"Port" (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)
port,
                            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
"Protocol" (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)
protocol])}
instance JSON.ToJSON PortInfoProperty where
  toJSON :: PortInfoProperty -> Value
toJSON PortInfoProperty {Maybe (Value Text)
()
haddock_workaround_ :: PortInfoProperty -> ()
port :: PortInfoProperty -> Maybe (Value Text)
protocol :: PortInfoProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
port :: Maybe (Value Text)
protocol :: Maybe (Value Text)
..}
    = [(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
"Port" (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)
port,
               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
"Protocol" (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)
protocol]))
instance Property "Port" PortInfoProperty where
  type PropertyType "Port" PortInfoProperty = Value Prelude.Text
  set :: PropertyType "Port" PortInfoProperty
-> PortInfoProperty -> PortInfoProperty
set PropertyType "Port" PortInfoProperty
newValue PortInfoProperty {Maybe (Value Text)
()
haddock_workaround_ :: PortInfoProperty -> ()
port :: PortInfoProperty -> Maybe (Value Text)
protocol :: PortInfoProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
port :: Maybe (Value Text)
protocol :: Maybe (Value Text)
..}
    = PortInfoProperty {port :: Maybe (Value Text)
port = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Port" PortInfoProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
protocol :: Maybe (Value Text)
haddock_workaround_ :: ()
protocol :: Maybe (Value Text)
..}
instance Property "Protocol" PortInfoProperty where
  type PropertyType "Protocol" PortInfoProperty = Value Prelude.Text
  set :: PropertyType "Protocol" PortInfoProperty
-> PortInfoProperty -> PortInfoProperty
set PropertyType "Protocol" PortInfoProperty
newValue PortInfoProperty {Maybe (Value Text)
()
haddock_workaround_ :: PortInfoProperty -> ()
port :: PortInfoProperty -> Maybe (Value Text)
protocol :: PortInfoProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
port :: Maybe (Value Text)
protocol :: Maybe (Value Text)
..}
    = PortInfoProperty {protocol :: Maybe (Value Text)
protocol = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Protocol" PortInfoProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
port :: Maybe (Value Text)
haddock_workaround_ :: ()
port :: Maybe (Value Text)
..}