module Network.AWS.GameLift.Types.Product where
import Network.AWS.GameLift.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
data AWSCredentials = AWSCredentials'
{ _acSecretAccessKey :: !(Maybe Text)
, _acSessionToken :: !(Maybe Text)
, _acAccessKeyId :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
awsCredentials
:: AWSCredentials
awsCredentials =
AWSCredentials'
{ _acSecretAccessKey = Nothing
, _acSessionToken = Nothing
, _acAccessKeyId = Nothing
}
acSecretAccessKey :: Lens' AWSCredentials (Maybe Text)
acSecretAccessKey = lens _acSecretAccessKey (\ s a -> s{_acSecretAccessKey = a});
acSessionToken :: Lens' AWSCredentials (Maybe Text)
acSessionToken = lens _acSessionToken (\ s a -> s{_acSessionToken = a});
acAccessKeyId :: Lens' AWSCredentials (Maybe Text)
acAccessKeyId = lens _acAccessKeyId (\ s a -> s{_acAccessKeyId = a});
instance FromJSON AWSCredentials where
parseJSON
= withObject "AWSCredentials"
(\ x ->
AWSCredentials' <$>
(x .:? "SecretAccessKey") <*> (x .:? "SessionToken")
<*> (x .:? "AccessKeyId"))
instance Hashable AWSCredentials
instance NFData AWSCredentials
data Alias = Alias'
{ _aCreationTime :: !(Maybe POSIX)
, _aLastUpdatedTime :: !(Maybe POSIX)
, _aAliasId :: !(Maybe Text)
, _aRoutingStrategy :: !(Maybe RoutingStrategy)
, _aName :: !(Maybe Text)
, _aDescription :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
alias
:: Alias
alias =
Alias'
{ _aCreationTime = Nothing
, _aLastUpdatedTime = Nothing
, _aAliasId = Nothing
, _aRoutingStrategy = Nothing
, _aName = Nothing
, _aDescription = Nothing
}
aCreationTime :: Lens' Alias (Maybe UTCTime)
aCreationTime = lens _aCreationTime (\ s a -> s{_aCreationTime = a}) . mapping _Time;
aLastUpdatedTime :: Lens' Alias (Maybe UTCTime)
aLastUpdatedTime = lens _aLastUpdatedTime (\ s a -> s{_aLastUpdatedTime = a}) . mapping _Time;
aAliasId :: Lens' Alias (Maybe Text)
aAliasId = lens _aAliasId (\ s a -> s{_aAliasId = a});
aRoutingStrategy :: Lens' Alias (Maybe RoutingStrategy)
aRoutingStrategy = lens _aRoutingStrategy (\ s a -> s{_aRoutingStrategy = a});
aName :: Lens' Alias (Maybe Text)
aName = lens _aName (\ s a -> s{_aName = a});
aDescription :: Lens' Alias (Maybe Text)
aDescription = lens _aDescription (\ s a -> s{_aDescription = a});
instance FromJSON Alias where
parseJSON
= withObject "Alias"
(\ x ->
Alias' <$>
(x .:? "CreationTime") <*> (x .:? "LastUpdatedTime")
<*> (x .:? "AliasId")
<*> (x .:? "RoutingStrategy")
<*> (x .:? "Name")
<*> (x .:? "Description"))
instance Hashable Alias
instance NFData Alias
data Build = Build'
{ _bCreationTime :: !(Maybe POSIX)
, _bStatus :: !(Maybe BuildStatus)
, _bBuildId :: !(Maybe Text)
, _bName :: !(Maybe Text)
, _bVersion :: !(Maybe Text)
, _bSizeOnDisk :: !(Maybe Nat)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
build
:: Build
build =
Build'
{ _bCreationTime = Nothing
, _bStatus = Nothing
, _bBuildId = Nothing
, _bName = Nothing
, _bVersion = Nothing
, _bSizeOnDisk = Nothing
}
bCreationTime :: Lens' Build (Maybe UTCTime)
bCreationTime = lens _bCreationTime (\ s a -> s{_bCreationTime = a}) . mapping _Time;
bStatus :: Lens' Build (Maybe BuildStatus)
bStatus = lens _bStatus (\ s a -> s{_bStatus = a});
bBuildId :: Lens' Build (Maybe Text)
bBuildId = lens _bBuildId (\ s a -> s{_bBuildId = a});
bName :: Lens' Build (Maybe Text)
bName = lens _bName (\ s a -> s{_bName = a});
bVersion :: Lens' Build (Maybe Text)
bVersion = lens _bVersion (\ s a -> s{_bVersion = a});
bSizeOnDisk :: Lens' Build (Maybe Natural)
bSizeOnDisk = lens _bSizeOnDisk (\ s a -> s{_bSizeOnDisk = a}) . mapping _Nat;
instance FromJSON Build where
parseJSON
= withObject "Build"
(\ x ->
Build' <$>
(x .:? "CreationTime") <*> (x .:? "Status") <*>
(x .:? "BuildId")
<*> (x .:? "Name")
<*> (x .:? "Version")
<*> (x .:? "SizeOnDisk"))
instance Hashable Build
instance NFData Build
data EC2InstanceCounts = EC2InstanceCounts'
{ _eicIdLE :: !(Maybe Nat)
, _eicTERMINATING :: !(Maybe Nat)
, _eicPENDING :: !(Maybe Nat)
, _eicMAXIMUM :: !(Maybe Nat)
, _eicDESIRED :: !(Maybe Nat)
, _eicMINIMUM :: !(Maybe Nat)
, _eicACTIVE :: !(Maybe Nat)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
ec2InstanceCounts
:: EC2InstanceCounts
ec2InstanceCounts =
EC2InstanceCounts'
{ _eicIdLE = Nothing
, _eicTERMINATING = Nothing
, _eicPENDING = Nothing
, _eicMAXIMUM = Nothing
, _eicDESIRED = Nothing
, _eicMINIMUM = Nothing
, _eicACTIVE = Nothing
}
eicIdLE :: Lens' EC2InstanceCounts (Maybe Natural)
eicIdLE = lens _eicIdLE (\ s a -> s{_eicIdLE = a}) . mapping _Nat;
eicTERMINATING :: Lens' EC2InstanceCounts (Maybe Natural)
eicTERMINATING = lens _eicTERMINATING (\ s a -> s{_eicTERMINATING = a}) . mapping _Nat;
eicPENDING :: Lens' EC2InstanceCounts (Maybe Natural)
eicPENDING = lens _eicPENDING (\ s a -> s{_eicPENDING = a}) . mapping _Nat;
eicMAXIMUM :: Lens' EC2InstanceCounts (Maybe Natural)
eicMAXIMUM = lens _eicMAXIMUM (\ s a -> s{_eicMAXIMUM = a}) . mapping _Nat;
eicDESIRED :: Lens' EC2InstanceCounts (Maybe Natural)
eicDESIRED = lens _eicDESIRED (\ s a -> s{_eicDESIRED = a}) . mapping _Nat;
eicMINIMUM :: Lens' EC2InstanceCounts (Maybe Natural)
eicMINIMUM = lens _eicMINIMUM (\ s a -> s{_eicMINIMUM = a}) . mapping _Nat;
eicACTIVE :: Lens' EC2InstanceCounts (Maybe Natural)
eicACTIVE = lens _eicACTIVE (\ s a -> s{_eicACTIVE = a}) . mapping _Nat;
instance FromJSON EC2InstanceCounts where
parseJSON
= withObject "EC2InstanceCounts"
(\ x ->
EC2InstanceCounts' <$>
(x .:? "IDLE") <*> (x .:? "TERMINATING") <*>
(x .:? "PENDING")
<*> (x .:? "MAXIMUM")
<*> (x .:? "DESIRED")
<*> (x .:? "MINIMUM")
<*> (x .:? "ACTIVE"))
instance Hashable EC2InstanceCounts
instance NFData EC2InstanceCounts
data EC2InstanceLimit = EC2InstanceLimit'
{ _eilEC2InstanceType :: !(Maybe EC2InstanceType)
, _eilCurrentInstances :: !(Maybe Nat)
, _eilInstanceLimit :: !(Maybe Nat)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
ec2InstanceLimit
:: EC2InstanceLimit
ec2InstanceLimit =
EC2InstanceLimit'
{ _eilEC2InstanceType = Nothing
, _eilCurrentInstances = Nothing
, _eilInstanceLimit = Nothing
}
eilEC2InstanceType :: Lens' EC2InstanceLimit (Maybe EC2InstanceType)
eilEC2InstanceType = lens _eilEC2InstanceType (\ s a -> s{_eilEC2InstanceType = a});
eilCurrentInstances :: Lens' EC2InstanceLimit (Maybe Natural)
eilCurrentInstances = lens _eilCurrentInstances (\ s a -> s{_eilCurrentInstances = a}) . mapping _Nat;
eilInstanceLimit :: Lens' EC2InstanceLimit (Maybe Natural)
eilInstanceLimit = lens _eilInstanceLimit (\ s a -> s{_eilInstanceLimit = a}) . mapping _Nat;
instance FromJSON EC2InstanceLimit where
parseJSON
= withObject "EC2InstanceLimit"
(\ x ->
EC2InstanceLimit' <$>
(x .:? "EC2InstanceType") <*>
(x .:? "CurrentInstances")
<*> (x .:? "InstanceLimit"))
instance Hashable EC2InstanceLimit
instance NFData EC2InstanceLimit
data Event = Event'
{ _eResourceId :: !(Maybe Text)
, _eEventTime :: !(Maybe POSIX)
, _eMessage :: !(Maybe Text)
, _eEventCode :: !(Maybe EventCode)
, _eEventId :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
event
:: Event
event =
Event'
{ _eResourceId = Nothing
, _eEventTime = Nothing
, _eMessage = Nothing
, _eEventCode = Nothing
, _eEventId = Nothing
}
eResourceId :: Lens' Event (Maybe Text)
eResourceId = lens _eResourceId (\ s a -> s{_eResourceId = a});
eEventTime :: Lens' Event (Maybe UTCTime)
eEventTime = lens _eEventTime (\ s a -> s{_eEventTime = a}) . mapping _Time;
eMessage :: Lens' Event (Maybe Text)
eMessage = lens _eMessage (\ s a -> s{_eMessage = a});
eEventCode :: Lens' Event (Maybe EventCode)
eEventCode = lens _eEventCode (\ s a -> s{_eEventCode = a});
eEventId :: Lens' Event (Maybe Text)
eEventId = lens _eEventId (\ s a -> s{_eEventId = a});
instance FromJSON Event where
parseJSON
= withObject "Event"
(\ x ->
Event' <$>
(x .:? "ResourceId") <*> (x .:? "EventTime") <*>
(x .:? "Message")
<*> (x .:? "EventCode")
<*> (x .:? "EventId"))
instance Hashable Event
instance NFData Event
data FleetAttributes = FleetAttributes'
{ _faCreationTime :: !(Maybe POSIX)
, _faStatus :: !(Maybe FleetStatus)
, _faServerLaunchParameters :: !(Maybe Text)
, _faLogPaths :: !(Maybe [Text])
, _faBuildId :: !(Maybe Text)
, _faTerminationTime :: !(Maybe POSIX)
, _faNewGameSessionProtectionPolicy :: !(Maybe ProtectionPolicy)
, _faName :: !(Maybe Text)
, _faServerLaunchPath :: !(Maybe Text)
, _faFleetId :: !(Maybe Text)
, _faDescription :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
fleetAttributes
:: FleetAttributes
fleetAttributes =
FleetAttributes'
{ _faCreationTime = Nothing
, _faStatus = Nothing
, _faServerLaunchParameters = Nothing
, _faLogPaths = Nothing
, _faBuildId = Nothing
, _faTerminationTime = Nothing
, _faNewGameSessionProtectionPolicy = Nothing
, _faName = Nothing
, _faServerLaunchPath = Nothing
, _faFleetId = Nothing
, _faDescription = Nothing
}
faCreationTime :: Lens' FleetAttributes (Maybe UTCTime)
faCreationTime = lens _faCreationTime (\ s a -> s{_faCreationTime = a}) . mapping _Time;
faStatus :: Lens' FleetAttributes (Maybe FleetStatus)
faStatus = lens _faStatus (\ s a -> s{_faStatus = a});
faServerLaunchParameters :: Lens' FleetAttributes (Maybe Text)
faServerLaunchParameters = lens _faServerLaunchParameters (\ s a -> s{_faServerLaunchParameters = a});
faLogPaths :: Lens' FleetAttributes [Text]
faLogPaths = lens _faLogPaths (\ s a -> s{_faLogPaths = a}) . _Default . _Coerce;
faBuildId :: Lens' FleetAttributes (Maybe Text)
faBuildId = lens _faBuildId (\ s a -> s{_faBuildId = a});
faTerminationTime :: Lens' FleetAttributes (Maybe UTCTime)
faTerminationTime = lens _faTerminationTime (\ s a -> s{_faTerminationTime = a}) . mapping _Time;
faNewGameSessionProtectionPolicy :: Lens' FleetAttributes (Maybe ProtectionPolicy)
faNewGameSessionProtectionPolicy = lens _faNewGameSessionProtectionPolicy (\ s a -> s{_faNewGameSessionProtectionPolicy = a});
faName :: Lens' FleetAttributes (Maybe Text)
faName = lens _faName (\ s a -> s{_faName = a});
faServerLaunchPath :: Lens' FleetAttributes (Maybe Text)
faServerLaunchPath = lens _faServerLaunchPath (\ s a -> s{_faServerLaunchPath = a});
faFleetId :: Lens' FleetAttributes (Maybe Text)
faFleetId = lens _faFleetId (\ s a -> s{_faFleetId = a});
faDescription :: Lens' FleetAttributes (Maybe Text)
faDescription = lens _faDescription (\ s a -> s{_faDescription = a});
instance FromJSON FleetAttributes where
parseJSON
= withObject "FleetAttributes"
(\ x ->
FleetAttributes' <$>
(x .:? "CreationTime") <*> (x .:? "Status") <*>
(x .:? "ServerLaunchParameters")
<*> (x .:? "LogPaths" .!= mempty)
<*> (x .:? "BuildId")
<*> (x .:? "TerminationTime")
<*> (x .:? "NewGameSessionProtectionPolicy")
<*> (x .:? "Name")
<*> (x .:? "ServerLaunchPath")
<*> (x .:? "FleetId")
<*> (x .:? "Description"))
instance Hashable FleetAttributes
instance NFData FleetAttributes
data FleetCapacity = FleetCapacity'
{ _fcInstanceType :: !(Maybe EC2InstanceType)
, _fcFleetId :: !(Maybe Text)
, _fcInstanceCounts :: !(Maybe EC2InstanceCounts)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
fleetCapacity
:: FleetCapacity
fleetCapacity =
FleetCapacity'
{ _fcInstanceType = Nothing
, _fcFleetId = Nothing
, _fcInstanceCounts = Nothing
}
fcInstanceType :: Lens' FleetCapacity (Maybe EC2InstanceType)
fcInstanceType = lens _fcInstanceType (\ s a -> s{_fcInstanceType = a});
fcFleetId :: Lens' FleetCapacity (Maybe Text)
fcFleetId = lens _fcFleetId (\ s a -> s{_fcFleetId = a});
fcInstanceCounts :: Lens' FleetCapacity (Maybe EC2InstanceCounts)
fcInstanceCounts = lens _fcInstanceCounts (\ s a -> s{_fcInstanceCounts = a});
instance FromJSON FleetCapacity where
parseJSON
= withObject "FleetCapacity"
(\ x ->
FleetCapacity' <$>
(x .:? "InstanceType") <*> (x .:? "FleetId") <*>
(x .:? "InstanceCounts"))
instance Hashable FleetCapacity
instance NFData FleetCapacity
data FleetUtilization = FleetUtilization'
{ _fuActiveGameSessionCount :: !(Maybe Nat)
, _fuMaximumPlayerSessionCount :: !(Maybe Nat)
, _fuCurrentPlayerSessionCount :: !(Maybe Nat)
, _fuFleetId :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
fleetUtilization
:: FleetUtilization
fleetUtilization =
FleetUtilization'
{ _fuActiveGameSessionCount = Nothing
, _fuMaximumPlayerSessionCount = Nothing
, _fuCurrentPlayerSessionCount = Nothing
, _fuFleetId = Nothing
}
fuActiveGameSessionCount :: Lens' FleetUtilization (Maybe Natural)
fuActiveGameSessionCount = lens _fuActiveGameSessionCount (\ s a -> s{_fuActiveGameSessionCount = a}) . mapping _Nat;
fuMaximumPlayerSessionCount :: Lens' FleetUtilization (Maybe Natural)
fuMaximumPlayerSessionCount = lens _fuMaximumPlayerSessionCount (\ s a -> s{_fuMaximumPlayerSessionCount = a}) . mapping _Nat;
fuCurrentPlayerSessionCount :: Lens' FleetUtilization (Maybe Natural)
fuCurrentPlayerSessionCount = lens _fuCurrentPlayerSessionCount (\ s a -> s{_fuCurrentPlayerSessionCount = a}) . mapping _Nat;
fuFleetId :: Lens' FleetUtilization (Maybe Text)
fuFleetId = lens _fuFleetId (\ s a -> s{_fuFleetId = a});
instance FromJSON FleetUtilization where
parseJSON
= withObject "FleetUtilization"
(\ x ->
FleetUtilization' <$>
(x .:? "ActiveGameSessionCount") <*>
(x .:? "MaximumPlayerSessionCount")
<*> (x .:? "CurrentPlayerSessionCount")
<*> (x .:? "FleetId"))
instance Hashable FleetUtilization
instance NFData FleetUtilization
data GameProperty = GameProperty'
{ _gpKey :: !Text
, _gpValue :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
gameProperty
:: Text
-> Text
-> GameProperty
gameProperty pKey_ pValue_ =
GameProperty'
{ _gpKey = pKey_
, _gpValue = pValue_
}
gpKey :: Lens' GameProperty Text
gpKey = lens _gpKey (\ s a -> s{_gpKey = a});
gpValue :: Lens' GameProperty Text
gpValue = lens _gpValue (\ s a -> s{_gpValue = a});
instance FromJSON GameProperty where
parseJSON
= withObject "GameProperty"
(\ x ->
GameProperty' <$> (x .: "Key") <*> (x .: "Value"))
instance Hashable GameProperty
instance NFData GameProperty
instance ToJSON GameProperty where
toJSON GameProperty'{..}
= object
(catMaybes
[Just ("Key" .= _gpKey), Just ("Value" .= _gpValue)])
data GameSession = GameSession'
{ _gsCreationTime :: !(Maybe POSIX)
, _gsStatus :: !(Maybe GameSessionStatus)
, _gsGameProperties :: !(Maybe [GameProperty])
, _gsIPAddress :: !(Maybe Text)
, _gsGameSessionId :: !(Maybe Text)
, _gsMaximumPlayerSessionCount :: !(Maybe Nat)
, _gsTerminationTime :: !(Maybe POSIX)
, _gsPlayerSessionCreationPolicy :: !(Maybe PlayerSessionCreationPolicy)
, _gsName :: !(Maybe Text)
, _gsCurrentPlayerSessionCount :: !(Maybe Nat)
, _gsFleetId :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
gameSession
:: GameSession
gameSession =
GameSession'
{ _gsCreationTime = Nothing
, _gsStatus = Nothing
, _gsGameProperties = Nothing
, _gsIPAddress = Nothing
, _gsGameSessionId = Nothing
, _gsMaximumPlayerSessionCount = Nothing
, _gsTerminationTime = Nothing
, _gsPlayerSessionCreationPolicy = Nothing
, _gsName = Nothing
, _gsCurrentPlayerSessionCount = Nothing
, _gsFleetId = Nothing
}
gsCreationTime :: Lens' GameSession (Maybe UTCTime)
gsCreationTime = lens _gsCreationTime (\ s a -> s{_gsCreationTime = a}) . mapping _Time;
gsStatus :: Lens' GameSession (Maybe GameSessionStatus)
gsStatus = lens _gsStatus (\ s a -> s{_gsStatus = a});
gsGameProperties :: Lens' GameSession [GameProperty]
gsGameProperties = lens _gsGameProperties (\ s a -> s{_gsGameProperties = a}) . _Default . _Coerce;
gsIPAddress :: Lens' GameSession (Maybe Text)
gsIPAddress = lens _gsIPAddress (\ s a -> s{_gsIPAddress = a});
gsGameSessionId :: Lens' GameSession (Maybe Text)
gsGameSessionId = lens _gsGameSessionId (\ s a -> s{_gsGameSessionId = a});
gsMaximumPlayerSessionCount :: Lens' GameSession (Maybe Natural)
gsMaximumPlayerSessionCount = lens _gsMaximumPlayerSessionCount (\ s a -> s{_gsMaximumPlayerSessionCount = a}) . mapping _Nat;
gsTerminationTime :: Lens' GameSession (Maybe UTCTime)
gsTerminationTime = lens _gsTerminationTime (\ s a -> s{_gsTerminationTime = a}) . mapping _Time;
gsPlayerSessionCreationPolicy :: Lens' GameSession (Maybe PlayerSessionCreationPolicy)
gsPlayerSessionCreationPolicy = lens _gsPlayerSessionCreationPolicy (\ s a -> s{_gsPlayerSessionCreationPolicy = a});
gsName :: Lens' GameSession (Maybe Text)
gsName = lens _gsName (\ s a -> s{_gsName = a});
gsCurrentPlayerSessionCount :: Lens' GameSession (Maybe Natural)
gsCurrentPlayerSessionCount = lens _gsCurrentPlayerSessionCount (\ s a -> s{_gsCurrentPlayerSessionCount = a}) . mapping _Nat;
gsFleetId :: Lens' GameSession (Maybe Text)
gsFleetId = lens _gsFleetId (\ s a -> s{_gsFleetId = a});
instance FromJSON GameSession where
parseJSON
= withObject "GameSession"
(\ x ->
GameSession' <$>
(x .:? "CreationTime") <*> (x .:? "Status") <*>
(x .:? "GameProperties" .!= mempty)
<*> (x .:? "IpAddress")
<*> (x .:? "GameSessionId")
<*> (x .:? "MaximumPlayerSessionCount")
<*> (x .:? "TerminationTime")
<*> (x .:? "PlayerSessionCreationPolicy")
<*> (x .:? "Name")
<*> (x .:? "CurrentPlayerSessionCount")
<*> (x .:? "FleetId"))
instance Hashable GameSession
instance NFData GameSession
data GameSessionDetail = GameSessionDetail'
{ _gsdGameSession :: !(Maybe GameSession)
, _gsdProtectionPolicy :: !(Maybe ProtectionPolicy)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
gameSessionDetail
:: GameSessionDetail
gameSessionDetail =
GameSessionDetail'
{ _gsdGameSession = Nothing
, _gsdProtectionPolicy = Nothing
}
gsdGameSession :: Lens' GameSessionDetail (Maybe GameSession)
gsdGameSession = lens _gsdGameSession (\ s a -> s{_gsdGameSession = a});
gsdProtectionPolicy :: Lens' GameSessionDetail (Maybe ProtectionPolicy)
gsdProtectionPolicy = lens _gsdProtectionPolicy (\ s a -> s{_gsdProtectionPolicy = a});
instance FromJSON GameSessionDetail where
parseJSON
= withObject "GameSessionDetail"
(\ x ->
GameSessionDetail' <$>
(x .:? "GameSession") <*> (x .:? "ProtectionPolicy"))
instance Hashable GameSessionDetail
instance NFData GameSessionDetail
data IPPermission = IPPermission'
{ _ipFromPort :: !Nat
, _ipToPort :: !Nat
, _ipIPRange :: !Text
, _ipProtocol :: !IPProtocol
} deriving (Eq,Read,Show,Data,Typeable,Generic)
ipPermission
:: Natural
-> Natural
-> Text
-> IPProtocol
-> IPPermission
ipPermission pFromPort_ pToPort_ pIPRange_ pProtocol_ =
IPPermission'
{ _ipFromPort = _Nat # pFromPort_
, _ipToPort = _Nat # pToPort_
, _ipIPRange = pIPRange_
, _ipProtocol = pProtocol_
}
ipFromPort :: Lens' IPPermission Natural
ipFromPort = lens _ipFromPort (\ s a -> s{_ipFromPort = a}) . _Nat;
ipToPort :: Lens' IPPermission Natural
ipToPort = lens _ipToPort (\ s a -> s{_ipToPort = a}) . _Nat;
ipIPRange :: Lens' IPPermission Text
ipIPRange = lens _ipIPRange (\ s a -> s{_ipIPRange = a});
ipProtocol :: Lens' IPPermission IPProtocol
ipProtocol = lens _ipProtocol (\ s a -> s{_ipProtocol = a});
instance FromJSON IPPermission where
parseJSON
= withObject "IPPermission"
(\ x ->
IPPermission' <$>
(x .: "FromPort") <*> (x .: "ToPort") <*>
(x .: "IpRange")
<*> (x .: "Protocol"))
instance Hashable IPPermission
instance NFData IPPermission
instance ToJSON IPPermission where
toJSON IPPermission'{..}
= object
(catMaybes
[Just ("FromPort" .= _ipFromPort),
Just ("ToPort" .= _ipToPort),
Just ("IpRange" .= _ipIPRange),
Just ("Protocol" .= _ipProtocol)])
data PlayerSession = PlayerSession'
{ _psCreationTime :: !(Maybe POSIX)
, _psStatus :: !(Maybe PlayerSessionStatus)
, _psIPAddress :: !(Maybe Text)
, _psGameSessionId :: !(Maybe Text)
, _psTerminationTime :: !(Maybe POSIX)
, _psPlayerSessionId :: !(Maybe Text)
, _psFleetId :: !(Maybe Text)
, _psPlayerId :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
playerSession
:: PlayerSession
playerSession =
PlayerSession'
{ _psCreationTime = Nothing
, _psStatus = Nothing
, _psIPAddress = Nothing
, _psGameSessionId = Nothing
, _psTerminationTime = Nothing
, _psPlayerSessionId = Nothing
, _psFleetId = Nothing
, _psPlayerId = Nothing
}
psCreationTime :: Lens' PlayerSession (Maybe UTCTime)
psCreationTime = lens _psCreationTime (\ s a -> s{_psCreationTime = a}) . mapping _Time;
psStatus :: Lens' PlayerSession (Maybe PlayerSessionStatus)
psStatus = lens _psStatus (\ s a -> s{_psStatus = a});
psIPAddress :: Lens' PlayerSession (Maybe Text)
psIPAddress = lens _psIPAddress (\ s a -> s{_psIPAddress = a});
psGameSessionId :: Lens' PlayerSession (Maybe Text)
psGameSessionId = lens _psGameSessionId (\ s a -> s{_psGameSessionId = a});
psTerminationTime :: Lens' PlayerSession (Maybe UTCTime)
psTerminationTime = lens _psTerminationTime (\ s a -> s{_psTerminationTime = a}) . mapping _Time;
psPlayerSessionId :: Lens' PlayerSession (Maybe Text)
psPlayerSessionId = lens _psPlayerSessionId (\ s a -> s{_psPlayerSessionId = a});
psFleetId :: Lens' PlayerSession (Maybe Text)
psFleetId = lens _psFleetId (\ s a -> s{_psFleetId = a});
psPlayerId :: Lens' PlayerSession (Maybe Text)
psPlayerId = lens _psPlayerId (\ s a -> s{_psPlayerId = a});
instance FromJSON PlayerSession where
parseJSON
= withObject "PlayerSession"
(\ x ->
PlayerSession' <$>
(x .:? "CreationTime") <*> (x .:? "Status") <*>
(x .:? "IpAddress")
<*> (x .:? "GameSessionId")
<*> (x .:? "TerminationTime")
<*> (x .:? "PlayerSessionId")
<*> (x .:? "FleetId")
<*> (x .:? "PlayerId"))
instance Hashable PlayerSession
instance NFData PlayerSession
data RoutingStrategy = RoutingStrategy'
{ _rsType :: !(Maybe RoutingStrategyType)
, _rsMessage :: !(Maybe Text)
, _rsFleetId :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
routingStrategy
:: RoutingStrategy
routingStrategy =
RoutingStrategy'
{ _rsType = Nothing
, _rsMessage = Nothing
, _rsFleetId = Nothing
}
rsType :: Lens' RoutingStrategy (Maybe RoutingStrategyType)
rsType = lens _rsType (\ s a -> s{_rsType = a});
rsMessage :: Lens' RoutingStrategy (Maybe Text)
rsMessage = lens _rsMessage (\ s a -> s{_rsMessage = a});
rsFleetId :: Lens' RoutingStrategy (Maybe Text)
rsFleetId = lens _rsFleetId (\ s a -> s{_rsFleetId = a});
instance FromJSON RoutingStrategy where
parseJSON
= withObject "RoutingStrategy"
(\ x ->
RoutingStrategy' <$>
(x .:? "Type") <*> (x .:? "Message") <*>
(x .:? "FleetId"))
instance Hashable RoutingStrategy
instance NFData RoutingStrategy
instance ToJSON RoutingStrategy where
toJSON RoutingStrategy'{..}
= object
(catMaybes
[("Type" .=) <$> _rsType,
("Message" .=) <$> _rsMessage,
("FleetId" .=) <$> _rsFleetId])
data S3Location = S3Location'
{ _slBucket :: !(Maybe Text)
, _slKey :: !(Maybe Text)
, _slRoleARN :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
s3Location
:: S3Location
s3Location =
S3Location'
{ _slBucket = Nothing
, _slKey = Nothing
, _slRoleARN = Nothing
}
slBucket :: Lens' S3Location (Maybe Text)
slBucket = lens _slBucket (\ s a -> s{_slBucket = a});
slKey :: Lens' S3Location (Maybe Text)
slKey = lens _slKey (\ s a -> s{_slKey = a});
slRoleARN :: Lens' S3Location (Maybe Text)
slRoleARN = lens _slRoleARN (\ s a -> s{_slRoleARN = a});
instance FromJSON S3Location where
parseJSON
= withObject "S3Location"
(\ x ->
S3Location' <$>
(x .:? "Bucket") <*> (x .:? "Key") <*>
(x .:? "RoleArn"))
instance Hashable S3Location
instance NFData S3Location
instance ToJSON S3Location where
toJSON S3Location'{..}
= object
(catMaybes
[("Bucket" .=) <$> _slBucket, ("Key" .=) <$> _slKey,
("RoleArn" .=) <$> _slRoleARN])
data ScalingPolicy = ScalingPolicy'
{ _spStatus :: !(Maybe ScalingStatusType)
, _spScalingAdjustmentType :: !(Maybe ScalingAdjustmentType)
, _spEvaluationPeriods :: !(Maybe Nat)
, _spMetricName :: !(Maybe MetricName)
, _spComparisonOperator :: !(Maybe ComparisonOperatorType)
, _spName :: !(Maybe Text)
, _spThreshold :: !(Maybe Double)
, _spScalingAdjustment :: !(Maybe Int)
, _spFleetId :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
scalingPolicy
:: ScalingPolicy
scalingPolicy =
ScalingPolicy'
{ _spStatus = Nothing
, _spScalingAdjustmentType = Nothing
, _spEvaluationPeriods = Nothing
, _spMetricName = Nothing
, _spComparisonOperator = Nothing
, _spName = Nothing
, _spThreshold = Nothing
, _spScalingAdjustment = Nothing
, _spFleetId = Nothing
}
spStatus :: Lens' ScalingPolicy (Maybe ScalingStatusType)
spStatus = lens _spStatus (\ s a -> s{_spStatus = a});
spScalingAdjustmentType :: Lens' ScalingPolicy (Maybe ScalingAdjustmentType)
spScalingAdjustmentType = lens _spScalingAdjustmentType (\ s a -> s{_spScalingAdjustmentType = a});
spEvaluationPeriods :: Lens' ScalingPolicy (Maybe Natural)
spEvaluationPeriods = lens _spEvaluationPeriods (\ s a -> s{_spEvaluationPeriods = a}) . mapping _Nat;
spMetricName :: Lens' ScalingPolicy (Maybe MetricName)
spMetricName = lens _spMetricName (\ s a -> s{_spMetricName = a});
spComparisonOperator :: Lens' ScalingPolicy (Maybe ComparisonOperatorType)
spComparisonOperator = lens _spComparisonOperator (\ s a -> s{_spComparisonOperator = a});
spName :: Lens' ScalingPolicy (Maybe Text)
spName = lens _spName (\ s a -> s{_spName = a});
spThreshold :: Lens' ScalingPolicy (Maybe Double)
spThreshold = lens _spThreshold (\ s a -> s{_spThreshold = a});
spScalingAdjustment :: Lens' ScalingPolicy (Maybe Int)
spScalingAdjustment = lens _spScalingAdjustment (\ s a -> s{_spScalingAdjustment = a});
spFleetId :: Lens' ScalingPolicy (Maybe Text)
spFleetId = lens _spFleetId (\ s a -> s{_spFleetId = a});
instance FromJSON ScalingPolicy where
parseJSON
= withObject "ScalingPolicy"
(\ x ->
ScalingPolicy' <$>
(x .:? "Status") <*> (x .:? "ScalingAdjustmentType")
<*> (x .:? "EvaluationPeriods")
<*> (x .:? "MetricName")
<*> (x .:? "ComparisonOperator")
<*> (x .:? "Name")
<*> (x .:? "Threshold")
<*> (x .:? "ScalingAdjustment")
<*> (x .:? "FleetId"))
instance Hashable ScalingPolicy
instance NFData ScalingPolicy