module Network.AWS.GameLift.DescribeGameSessionDetails
(
describeGameSessionDetails
, DescribeGameSessionDetails
, dgsdGameSessionId
, dgsdAliasId
, dgsdNextToken
, dgsdStatusFilter
, dgsdLimit
, dgsdFleetId
, describeGameSessionDetailsResponse
, DescribeGameSessionDetailsResponse
, dgsdrsGameSessionDetails
, dgsdrsNextToken
, dgsdrsResponseStatus
) where
import Network.AWS.GameLift.Types
import Network.AWS.GameLift.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DescribeGameSessionDetails = DescribeGameSessionDetails'
{ _dgsdGameSessionId :: !(Maybe Text)
, _dgsdAliasId :: !(Maybe Text)
, _dgsdNextToken :: !(Maybe Text)
, _dgsdStatusFilter :: !(Maybe Text)
, _dgsdLimit :: !(Maybe Nat)
, _dgsdFleetId :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeGameSessionDetails
:: DescribeGameSessionDetails
describeGameSessionDetails =
DescribeGameSessionDetails'
{ _dgsdGameSessionId = Nothing
, _dgsdAliasId = Nothing
, _dgsdNextToken = Nothing
, _dgsdStatusFilter = Nothing
, _dgsdLimit = Nothing
, _dgsdFleetId = Nothing
}
dgsdGameSessionId :: Lens' DescribeGameSessionDetails (Maybe Text)
dgsdGameSessionId = lens _dgsdGameSessionId (\ s a -> s{_dgsdGameSessionId = a});
dgsdAliasId :: Lens' DescribeGameSessionDetails (Maybe Text)
dgsdAliasId = lens _dgsdAliasId (\ s a -> s{_dgsdAliasId = a});
dgsdNextToken :: Lens' DescribeGameSessionDetails (Maybe Text)
dgsdNextToken = lens _dgsdNextToken (\ s a -> s{_dgsdNextToken = a});
dgsdStatusFilter :: Lens' DescribeGameSessionDetails (Maybe Text)
dgsdStatusFilter = lens _dgsdStatusFilter (\ s a -> s{_dgsdStatusFilter = a});
dgsdLimit :: Lens' DescribeGameSessionDetails (Maybe Natural)
dgsdLimit = lens _dgsdLimit (\ s a -> s{_dgsdLimit = a}) . mapping _Nat;
dgsdFleetId :: Lens' DescribeGameSessionDetails (Maybe Text)
dgsdFleetId = lens _dgsdFleetId (\ s a -> s{_dgsdFleetId = a});
instance AWSRequest DescribeGameSessionDetails where
type Rs DescribeGameSessionDetails =
DescribeGameSessionDetailsResponse
request = postJSON gameLift
response
= receiveJSON
(\ s h x ->
DescribeGameSessionDetailsResponse' <$>
(x .?> "GameSessionDetails" .!@ mempty) <*>
(x .?> "NextToken")
<*> (pure (fromEnum s)))
instance Hashable DescribeGameSessionDetails
instance NFData DescribeGameSessionDetails
instance ToHeaders DescribeGameSessionDetails where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("GameLift.DescribeGameSessionDetails" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DescribeGameSessionDetails where
toJSON DescribeGameSessionDetails'{..}
= object
(catMaybes
[("GameSessionId" .=) <$> _dgsdGameSessionId,
("AliasId" .=) <$> _dgsdAliasId,
("NextToken" .=) <$> _dgsdNextToken,
("StatusFilter" .=) <$> _dgsdStatusFilter,
("Limit" .=) <$> _dgsdLimit,
("FleetId" .=) <$> _dgsdFleetId])
instance ToPath DescribeGameSessionDetails where
toPath = const "/"
instance ToQuery DescribeGameSessionDetails where
toQuery = const mempty
data DescribeGameSessionDetailsResponse = DescribeGameSessionDetailsResponse'
{ _dgsdrsGameSessionDetails :: !(Maybe [GameSessionDetail])
, _dgsdrsNextToken :: !(Maybe Text)
, _dgsdrsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeGameSessionDetailsResponse
:: Int
-> DescribeGameSessionDetailsResponse
describeGameSessionDetailsResponse pResponseStatus_ =
DescribeGameSessionDetailsResponse'
{ _dgsdrsGameSessionDetails = Nothing
, _dgsdrsNextToken = Nothing
, _dgsdrsResponseStatus = pResponseStatus_
}
dgsdrsGameSessionDetails :: Lens' DescribeGameSessionDetailsResponse [GameSessionDetail]
dgsdrsGameSessionDetails = lens _dgsdrsGameSessionDetails (\ s a -> s{_dgsdrsGameSessionDetails = a}) . _Default . _Coerce;
dgsdrsNextToken :: Lens' DescribeGameSessionDetailsResponse (Maybe Text)
dgsdrsNextToken = lens _dgsdrsNextToken (\ s a -> s{_dgsdrsNextToken = a});
dgsdrsResponseStatus :: Lens' DescribeGameSessionDetailsResponse Int
dgsdrsResponseStatus = lens _dgsdrsResponseStatus (\ s a -> s{_dgsdrsResponseStatus = a});
instance NFData DescribeGameSessionDetailsResponse