module Stratosphere.ECS.TaskDefinition.HostEntryProperty (
        HostEntryProperty(..), mkHostEntryProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data HostEntryProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-hostentry.html>
    HostEntryProperty {HostEntryProperty -> ()
haddock_workaround_ :: (),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-hostentry.html#cfn-ecs-taskdefinition-hostentry-hostname>
                       HostEntryProperty -> Maybe (Value Text)
hostname :: (Prelude.Maybe (Value Prelude.Text)),
                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-hostentry.html#cfn-ecs-taskdefinition-hostentry-ipaddress>
                       HostEntryProperty -> Maybe (Value Text)
ipAddress :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (HostEntryProperty -> HostEntryProperty -> Bool
(HostEntryProperty -> HostEntryProperty -> Bool)
-> (HostEntryProperty -> HostEntryProperty -> Bool)
-> Eq HostEntryProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: HostEntryProperty -> HostEntryProperty -> Bool
== :: HostEntryProperty -> HostEntryProperty -> Bool
$c/= :: HostEntryProperty -> HostEntryProperty -> Bool
/= :: HostEntryProperty -> HostEntryProperty -> Bool
Prelude.Eq, Int -> HostEntryProperty -> ShowS
[HostEntryProperty] -> ShowS
HostEntryProperty -> String
(Int -> HostEntryProperty -> ShowS)
-> (HostEntryProperty -> String)
-> ([HostEntryProperty] -> ShowS)
-> Show HostEntryProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> HostEntryProperty -> ShowS
showsPrec :: Int -> HostEntryProperty -> ShowS
$cshow :: HostEntryProperty -> String
show :: HostEntryProperty -> String
$cshowList :: [HostEntryProperty] -> ShowS
showList :: [HostEntryProperty] -> ShowS
Prelude.Show)
mkHostEntryProperty :: HostEntryProperty
mkHostEntryProperty :: HostEntryProperty
mkHostEntryProperty
  = HostEntryProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), hostname :: Maybe (Value Text)
hostname = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       ipAddress :: Maybe (Value Text)
ipAddress = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties HostEntryProperty where
  toResourceProperties :: HostEntryProperty -> ResourceProperties
toResourceProperties HostEntryProperty {Maybe (Value Text)
()
haddock_workaround_ :: HostEntryProperty -> ()
hostname :: HostEntryProperty -> Maybe (Value Text)
ipAddress :: HostEntryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
hostname :: Maybe (Value Text)
ipAddress :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ECS::TaskDefinition.HostEntry",
         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
"Hostname" (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)
hostname,
                            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
"IpAddress" (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)
ipAddress])}
instance JSON.ToJSON HostEntryProperty where
  toJSON :: HostEntryProperty -> Value
toJSON HostEntryProperty {Maybe (Value Text)
()
haddock_workaround_ :: HostEntryProperty -> ()
hostname :: HostEntryProperty -> Maybe (Value Text)
ipAddress :: HostEntryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
hostname :: Maybe (Value Text)
ipAddress :: 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
"Hostname" (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)
hostname,
               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
"IpAddress" (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)
ipAddress]))
instance Property "Hostname" HostEntryProperty where
  type PropertyType "Hostname" HostEntryProperty = Value Prelude.Text
  set :: PropertyType "Hostname" HostEntryProperty
-> HostEntryProperty -> HostEntryProperty
set PropertyType "Hostname" HostEntryProperty
newValue HostEntryProperty {Maybe (Value Text)
()
haddock_workaround_ :: HostEntryProperty -> ()
hostname :: HostEntryProperty -> Maybe (Value Text)
ipAddress :: HostEntryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
hostname :: Maybe (Value Text)
ipAddress :: Maybe (Value Text)
..}
    = HostEntryProperty {hostname :: Maybe (Value Text)
hostname = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Hostname" HostEntryProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
ipAddress :: Maybe (Value Text)
haddock_workaround_ :: ()
ipAddress :: Maybe (Value Text)
..}
instance Property "IpAddress" HostEntryProperty where
  type PropertyType "IpAddress" HostEntryProperty = Value Prelude.Text
  set :: PropertyType "IpAddress" HostEntryProperty
-> HostEntryProperty -> HostEntryProperty
set PropertyType "IpAddress" HostEntryProperty
newValue HostEntryProperty {Maybe (Value Text)
()
haddock_workaround_ :: HostEntryProperty -> ()
hostname :: HostEntryProperty -> Maybe (Value Text)
ipAddress :: HostEntryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
hostname :: Maybe (Value Text)
ipAddress :: Maybe (Value Text)
..}
    = HostEntryProperty {ipAddress :: Maybe (Value Text)
ipAddress = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "IpAddress" HostEntryProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
hostname :: Maybe (Value Text)
haddock_workaround_ :: ()
hostname :: Maybe (Value Text)
..}