module Stratosphere.DataSync.Agent (
        Agent(..), mkAgent
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data Agent
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datasync-agent.html>
    Agent {Agent -> ()
haddock_workaround_ :: (),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datasync-agent.html#cfn-datasync-agent-activationkey>
           Agent -> Maybe (Value Text)
activationKey :: (Prelude.Maybe (Value Prelude.Text)),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datasync-agent.html#cfn-datasync-agent-agentname>
           Agent -> Maybe (Value Text)
agentName :: (Prelude.Maybe (Value Prelude.Text)),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datasync-agent.html#cfn-datasync-agent-securitygrouparns>
           Agent -> Maybe (ValueList Text)
securityGroupArns :: (Prelude.Maybe (ValueList Prelude.Text)),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datasync-agent.html#cfn-datasync-agent-subnetarns>
           Agent -> Maybe (ValueList Text)
subnetArns :: (Prelude.Maybe (ValueList Prelude.Text)),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datasync-agent.html#cfn-datasync-agent-tags>
           Agent -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag]),
           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-datasync-agent.html#cfn-datasync-agent-vpcendpointid>
           Agent -> Maybe (Value Text)
vpcEndpointId :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (Agent -> Agent -> Bool
(Agent -> Agent -> Bool) -> (Agent -> Agent -> Bool) -> Eq Agent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Agent -> Agent -> Bool
== :: Agent -> Agent -> Bool
$c/= :: Agent -> Agent -> Bool
/= :: Agent -> Agent -> Bool
Prelude.Eq, Int -> Agent -> ShowS
[Agent] -> ShowS
Agent -> String
(Int -> Agent -> ShowS)
-> (Agent -> String) -> ([Agent] -> ShowS) -> Show Agent
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Agent -> ShowS
showsPrec :: Int -> Agent -> ShowS
$cshow :: Agent -> String
show :: Agent -> String
$cshowList :: [Agent] -> ShowS
showList :: [Agent] -> ShowS
Prelude.Show)
mkAgent :: Agent
mkAgent :: Agent
mkAgent
  = Agent
      {haddock_workaround_ :: ()
haddock_workaround_ = (), activationKey :: Maybe (Value Text)
activationKey = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       agentName :: Maybe (Value Text)
agentName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, securityGroupArns :: Maybe (ValueList Text)
securityGroupArns = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
       subnetArns :: Maybe (ValueList Text)
subnetArns = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing, tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
       vpcEndpointId :: Maybe (Value Text)
vpcEndpointId = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties Agent where
  toResourceProperties :: Agent -> ResourceProperties
toResourceProperties Agent {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: Agent -> ()
activationKey :: Agent -> Maybe (Value Text)
agentName :: Agent -> Maybe (Value Text)
securityGroupArns :: Agent -> Maybe (ValueList Text)
subnetArns :: Agent -> Maybe (ValueList Text)
tags :: Agent -> Maybe [Tag]
vpcEndpointId :: Agent -> Maybe (Value Text)
haddock_workaround_ :: ()
activationKey :: Maybe (Value Text)
agentName :: Maybe (Value Text)
securityGroupArns :: Maybe (ValueList Text)
subnetArns :: Maybe (ValueList Text)
tags :: Maybe [Tag]
vpcEndpointId :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::DataSync::Agent", supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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
"ActivationKey" (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)
activationKey,
                            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
"AgentName" (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)
agentName,
                            Key -> ValueList 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
"SecurityGroupArns" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
securityGroupArns,
                            Key -> ValueList 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
"SubnetArns" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
subnetArns,
                            Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
                            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
"VpcEndpointId" (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)
vpcEndpointId])}
instance JSON.ToJSON Agent where
  toJSON :: Agent -> Value
toJSON Agent {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: Agent -> ()
activationKey :: Agent -> Maybe (Value Text)
agentName :: Agent -> Maybe (Value Text)
securityGroupArns :: Agent -> Maybe (ValueList Text)
subnetArns :: Agent -> Maybe (ValueList Text)
tags :: Agent -> Maybe [Tag]
vpcEndpointId :: Agent -> Maybe (Value Text)
haddock_workaround_ :: ()
activationKey :: Maybe (Value Text)
agentName :: Maybe (Value Text)
securityGroupArns :: Maybe (ValueList Text)
subnetArns :: Maybe (ValueList Text)
tags :: Maybe [Tag]
vpcEndpointId :: 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
"ActivationKey" (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)
activationKey,
               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
"AgentName" (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)
agentName,
               Key -> ValueList 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
"SecurityGroupArns" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
securityGroupArns,
               Key -> ValueList 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
"SubnetArns" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
subnetArns,
               Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
               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
"VpcEndpointId" (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)
vpcEndpointId]))
instance Property "ActivationKey" Agent where
  type PropertyType "ActivationKey" Agent = Value Prelude.Text
  set :: PropertyType "ActivationKey" Agent -> Agent -> Agent
set PropertyType "ActivationKey" Agent
newValue Agent {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: Agent -> ()
activationKey :: Agent -> Maybe (Value Text)
agentName :: Agent -> Maybe (Value Text)
securityGroupArns :: Agent -> Maybe (ValueList Text)
subnetArns :: Agent -> Maybe (ValueList Text)
tags :: Agent -> Maybe [Tag]
vpcEndpointId :: Agent -> Maybe (Value Text)
haddock_workaround_ :: ()
activationKey :: Maybe (Value Text)
agentName :: Maybe (Value Text)
securityGroupArns :: Maybe (ValueList Text)
subnetArns :: Maybe (ValueList Text)
tags :: Maybe [Tag]
vpcEndpointId :: Maybe (Value Text)
..}
    = Agent {activationKey :: Maybe (Value Text)
activationKey = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ActivationKey" Agent
Value Text
newValue, Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
agentName :: Maybe (Value Text)
securityGroupArns :: Maybe (ValueList Text)
subnetArns :: Maybe (ValueList Text)
tags :: Maybe [Tag]
vpcEndpointId :: Maybe (Value Text)
haddock_workaround_ :: ()
agentName :: Maybe (Value Text)
securityGroupArns :: Maybe (ValueList Text)
subnetArns :: Maybe (ValueList Text)
tags :: Maybe [Tag]
vpcEndpointId :: Maybe (Value Text)
..}
instance Property "AgentName" Agent where
  type PropertyType "AgentName" Agent = Value Prelude.Text
  set :: PropertyType "AgentName" Agent -> Agent -> Agent
set PropertyType "AgentName" Agent
newValue Agent {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: Agent -> ()
activationKey :: Agent -> Maybe (Value Text)
agentName :: Agent -> Maybe (Value Text)
securityGroupArns :: Agent -> Maybe (ValueList Text)
subnetArns :: Agent -> Maybe (ValueList Text)
tags :: Agent -> Maybe [Tag]
vpcEndpointId :: Agent -> Maybe (Value Text)
haddock_workaround_ :: ()
activationKey :: Maybe (Value Text)
agentName :: Maybe (Value Text)
securityGroupArns :: Maybe (ValueList Text)
subnetArns :: Maybe (ValueList Text)
tags :: Maybe [Tag]
vpcEndpointId :: Maybe (Value Text)
..}
    = Agent {agentName :: Maybe (Value Text)
agentName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AgentName" Agent
Value Text
newValue, Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
activationKey :: Maybe (Value Text)
securityGroupArns :: Maybe (ValueList Text)
subnetArns :: Maybe (ValueList Text)
tags :: Maybe [Tag]
vpcEndpointId :: Maybe (Value Text)
haddock_workaround_ :: ()
activationKey :: Maybe (Value Text)
securityGroupArns :: Maybe (ValueList Text)
subnetArns :: Maybe (ValueList Text)
tags :: Maybe [Tag]
vpcEndpointId :: Maybe (Value Text)
..}
instance Property "SecurityGroupArns" Agent where
  type PropertyType "SecurityGroupArns" Agent = ValueList Prelude.Text
  set :: PropertyType "SecurityGroupArns" Agent -> Agent -> Agent
set PropertyType "SecurityGroupArns" Agent
newValue Agent {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: Agent -> ()
activationKey :: Agent -> Maybe (Value Text)
agentName :: Agent -> Maybe (Value Text)
securityGroupArns :: Agent -> Maybe (ValueList Text)
subnetArns :: Agent -> Maybe (ValueList Text)
tags :: Agent -> Maybe [Tag]
vpcEndpointId :: Agent -> Maybe (Value Text)
haddock_workaround_ :: ()
activationKey :: Maybe (Value Text)
agentName :: Maybe (Value Text)
securityGroupArns :: Maybe (ValueList Text)
subnetArns :: Maybe (ValueList Text)
tags :: Maybe [Tag]
vpcEndpointId :: Maybe (Value Text)
..}
    = Agent {securityGroupArns :: Maybe (ValueList Text)
securityGroupArns = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SecurityGroupArns" Agent
ValueList Text
newValue, Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
activationKey :: Maybe (Value Text)
agentName :: Maybe (Value Text)
subnetArns :: Maybe (ValueList Text)
tags :: Maybe [Tag]
vpcEndpointId :: Maybe (Value Text)
haddock_workaround_ :: ()
activationKey :: Maybe (Value Text)
agentName :: Maybe (Value Text)
subnetArns :: Maybe (ValueList Text)
tags :: Maybe [Tag]
vpcEndpointId :: Maybe (Value Text)
..}
instance Property "SubnetArns" Agent where
  type PropertyType "SubnetArns" Agent = ValueList Prelude.Text
  set :: PropertyType "SubnetArns" Agent -> Agent -> Agent
set PropertyType "SubnetArns" Agent
newValue Agent {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: Agent -> ()
activationKey :: Agent -> Maybe (Value Text)
agentName :: Agent -> Maybe (Value Text)
securityGroupArns :: Agent -> Maybe (ValueList Text)
subnetArns :: Agent -> Maybe (ValueList Text)
tags :: Agent -> Maybe [Tag]
vpcEndpointId :: Agent -> Maybe (Value Text)
haddock_workaround_ :: ()
activationKey :: Maybe (Value Text)
agentName :: Maybe (Value Text)
securityGroupArns :: Maybe (ValueList Text)
subnetArns :: Maybe (ValueList Text)
tags :: Maybe [Tag]
vpcEndpointId :: Maybe (Value Text)
..}
    = Agent {subnetArns :: Maybe (ValueList Text)
subnetArns = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SubnetArns" Agent
ValueList Text
newValue, Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
activationKey :: Maybe (Value Text)
agentName :: Maybe (Value Text)
securityGroupArns :: Maybe (ValueList Text)
tags :: Maybe [Tag]
vpcEndpointId :: Maybe (Value Text)
haddock_workaround_ :: ()
activationKey :: Maybe (Value Text)
agentName :: Maybe (Value Text)
securityGroupArns :: Maybe (ValueList Text)
tags :: Maybe [Tag]
vpcEndpointId :: Maybe (Value Text)
..}
instance Property "Tags" Agent where
  type PropertyType "Tags" Agent = [Tag]
  set :: PropertyType "Tags" Agent -> Agent -> Agent
set PropertyType "Tags" Agent
newValue Agent {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: Agent -> ()
activationKey :: Agent -> Maybe (Value Text)
agentName :: Agent -> Maybe (Value Text)
securityGroupArns :: Agent -> Maybe (ValueList Text)
subnetArns :: Agent -> Maybe (ValueList Text)
tags :: Agent -> Maybe [Tag]
vpcEndpointId :: Agent -> Maybe (Value Text)
haddock_workaround_ :: ()
activationKey :: Maybe (Value Text)
agentName :: Maybe (Value Text)
securityGroupArns :: Maybe (ValueList Text)
subnetArns :: Maybe (ValueList Text)
tags :: Maybe [Tag]
vpcEndpointId :: Maybe (Value Text)
..} = Agent {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" Agent
newValue, Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
activationKey :: Maybe (Value Text)
agentName :: Maybe (Value Text)
securityGroupArns :: Maybe (ValueList Text)
subnetArns :: Maybe (ValueList Text)
vpcEndpointId :: Maybe (Value Text)
haddock_workaround_ :: ()
activationKey :: Maybe (Value Text)
agentName :: Maybe (Value Text)
securityGroupArns :: Maybe (ValueList Text)
subnetArns :: Maybe (ValueList Text)
vpcEndpointId :: Maybe (Value Text)
..}
instance Property "VpcEndpointId" Agent where
  type PropertyType "VpcEndpointId" Agent = Value Prelude.Text
  set :: PropertyType "VpcEndpointId" Agent -> Agent -> Agent
set PropertyType "VpcEndpointId" Agent
newValue Agent {Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: Agent -> ()
activationKey :: Agent -> Maybe (Value Text)
agentName :: Agent -> Maybe (Value Text)
securityGroupArns :: Agent -> Maybe (ValueList Text)
subnetArns :: Agent -> Maybe (ValueList Text)
tags :: Agent -> Maybe [Tag]
vpcEndpointId :: Agent -> Maybe (Value Text)
haddock_workaround_ :: ()
activationKey :: Maybe (Value Text)
agentName :: Maybe (Value Text)
securityGroupArns :: Maybe (ValueList Text)
subnetArns :: Maybe (ValueList Text)
tags :: Maybe [Tag]
vpcEndpointId :: Maybe (Value Text)
..}
    = Agent {vpcEndpointId :: Maybe (Value Text)
vpcEndpointId = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "VpcEndpointId" Agent
Value Text
newValue, Maybe [Tag]
Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
activationKey :: Maybe (Value Text)
agentName :: Maybe (Value Text)
securityGroupArns :: Maybe (ValueList Text)
subnetArns :: Maybe (ValueList Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
activationKey :: Maybe (Value Text)
agentName :: Maybe (Value Text)
securityGroupArns :: Maybe (ValueList Text)
subnetArns :: Maybe (ValueList Text)
tags :: Maybe [Tag]
..}