Cleanup generated async logic
Return Future<void> when there is no return value
using async functions
etc
diff --git a/generated/googleapis/lib/gamesconfiguration/v1configuration.dart b/generated/googleapis/lib/gamesconfiguration/v1configuration.dart
index 916c085..b015651 100644
--- a/generated/googleapis/lib/gamesconfiguration/v1configuration.dart
+++ b/generated/googleapis/lib/gamesconfiguration/v1configuration.dart
@@ -92,10 +92,10 @@
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
- async.Future delete(
+ async.Future<void> delete(
core.String achievementId, {
core.String $fields,
- }) {
+ }) async {
core.String _url;
final _queryParams = <core.String, core.List<core.String>>{};
commons.Media _uploadMedia;
@@ -115,7 +115,7 @@
_url = 'games/v1configuration/achievements/' +
commons.Escaper.ecapeVariable('$achievementId');
- final _response = _requester.request(
+ await _requester.request(
_url,
'DELETE',
body: _body,
@@ -124,9 +124,6 @@
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions,
);
- return _response.then(
- (data) => null,
- );
}
/// Retrieves the metadata of the achievement configuration with the given ID.
@@ -148,7 +145,7 @@
async.Future<AchievementConfiguration> get(
core.String achievementId, {
core.String $fields,
- }) {
+ }) async {
core.String _url;
final _queryParams = <core.String, core.List<core.String>>{};
commons.Media _uploadMedia;
@@ -166,7 +163,7 @@
_url = 'games/v1configuration/achievements/' +
commons.Escaper.ecapeVariable('$achievementId');
- final _response = _requester.request(
+ final _response = await _requester.request(
_url,
'GET',
body: _body,
@@ -175,10 +172,8 @@
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions,
);
- return _response.then(
- (data) => AchievementConfiguration.fromJson(
- data as core.Map<core.String, core.dynamic>),
- );
+ return AchievementConfiguration.fromJson(
+ _response as core.Map<core.String, core.dynamic>);
}
/// Insert a new achievement configuration in this application.
@@ -204,7 +199,7 @@
AchievementConfiguration request,
core.String applicationId, {
core.String $fields,
- }) {
+ }) async {
core.String _url;
final _queryParams = <core.String, core.List<core.String>>{};
commons.Media _uploadMedia;
@@ -226,7 +221,7 @@
commons.Escaper.ecapeVariable('$applicationId') +
'/achievements';
- final _response = _requester.request(
+ final _response = await _requester.request(
_url,
'POST',
body: _body,
@@ -235,10 +230,8 @@
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions,
);
- return _response.then(
- (data) => AchievementConfiguration.fromJson(
- data as core.Map<core.String, core.dynamic>),
- );
+ return AchievementConfiguration.fromJson(
+ _response as core.Map<core.String, core.dynamic>);
}
/// Returns a list of the achievement configurations in this application.
@@ -269,7 +262,7 @@
core.int maxResults,
core.String pageToken,
core.String $fields,
- }) {
+ }) async {
core.String _url;
final _queryParams = <core.String, core.List<core.String>>{};
commons.Media _uploadMedia;
@@ -294,7 +287,7 @@
commons.Escaper.ecapeVariable('$applicationId') +
'/achievements';
- final _response = _requester.request(
+ final _response = await _requester.request(
_url,
'GET',
body: _body,
@@ -303,10 +296,8 @@
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions,
);
- return _response.then(
- (data) => AchievementConfigurationListResponse.fromJson(
- data as core.Map<core.String, core.dynamic>),
- );
+ return AchievementConfigurationListResponse.fromJson(
+ _response as core.Map<core.String, core.dynamic>);
}
/// Update the metadata of the achievement configuration with the given ID.
@@ -331,7 +322,7 @@
AchievementConfiguration request,
core.String achievementId, {
core.String $fields,
- }) {
+ }) async {
core.String _url;
final _queryParams = <core.String, core.List<core.String>>{};
commons.Media _uploadMedia;
@@ -352,7 +343,7 @@
_url = 'games/v1configuration/achievements/' +
commons.Escaper.ecapeVariable('$achievementId');
- final _response = _requester.request(
+ final _response = await _requester.request(
_url,
'PUT',
body: _body,
@@ -361,10 +352,8 @@
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions,
);
- return _response.then(
- (data) => AchievementConfiguration.fromJson(
- data as core.Map<core.String, core.dynamic>),
- );
+ return AchievementConfiguration.fromJson(
+ _response as core.Map<core.String, core.dynamic>);
}
}
@@ -403,7 +392,7 @@
core.String imageType, {
core.String $fields,
commons.Media uploadMedia,
- }) {
+ }) async {
core.String _url;
final _queryParams = <core.String, core.List<core.String>>{};
commons.Media _uploadMedia;
@@ -436,7 +425,7 @@
commons.Escaper.ecapeVariable('$imageType');
}
- final _response = _requester.request(
+ final _response = await _requester.request(
_url,
'POST',
body: _body,
@@ -445,10 +434,8 @@
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions,
);
- return _response.then(
- (data) => ImageConfiguration.fromJson(
- data as core.Map<core.String, core.dynamic>),
- );
+ return ImageConfiguration.fromJson(
+ _response as core.Map<core.String, core.dynamic>);
}
}
@@ -472,10 +459,10 @@
///
/// If the used [http.Client] completes with an error when making a REST call,
/// this method will complete with the same error.
- async.Future delete(
+ async.Future<void> delete(
core.String leaderboardId, {
core.String $fields,
- }) {
+ }) async {
core.String _url;
final _queryParams = <core.String, core.List<core.String>>{};
commons.Media _uploadMedia;
@@ -495,7 +482,7 @@
_url = 'games/v1configuration/leaderboards/' +
commons.Escaper.ecapeVariable('$leaderboardId');
- final _response = _requester.request(
+ await _requester.request(
_url,
'DELETE',
body: _body,
@@ -504,9 +491,6 @@
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions,
);
- return _response.then(
- (data) => null,
- );
}
/// Retrieves the metadata of the leaderboard configuration with the given ID.
@@ -528,7 +512,7 @@
async.Future<LeaderboardConfiguration> get(
core.String leaderboardId, {
core.String $fields,
- }) {
+ }) async {
core.String _url;
final _queryParams = <core.String, core.List<core.String>>{};
commons.Media _uploadMedia;
@@ -546,7 +530,7 @@
_url = 'games/v1configuration/leaderboards/' +
commons.Escaper.ecapeVariable('$leaderboardId');
- final _response = _requester.request(
+ final _response = await _requester.request(
_url,
'GET',
body: _body,
@@ -555,10 +539,8 @@
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions,
);
- return _response.then(
- (data) => LeaderboardConfiguration.fromJson(
- data as core.Map<core.String, core.dynamic>),
- );
+ return LeaderboardConfiguration.fromJson(
+ _response as core.Map<core.String, core.dynamic>);
}
/// Insert a new leaderboard configuration in this application.
@@ -584,7 +566,7 @@
LeaderboardConfiguration request,
core.String applicationId, {
core.String $fields,
- }) {
+ }) async {
core.String _url;
final _queryParams = <core.String, core.List<core.String>>{};
commons.Media _uploadMedia;
@@ -606,7 +588,7 @@
commons.Escaper.ecapeVariable('$applicationId') +
'/leaderboards';
- final _response = _requester.request(
+ final _response = await _requester.request(
_url,
'POST',
body: _body,
@@ -615,10 +597,8 @@
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions,
);
- return _response.then(
- (data) => LeaderboardConfiguration.fromJson(
- data as core.Map<core.String, core.dynamic>),
- );
+ return LeaderboardConfiguration.fromJson(
+ _response as core.Map<core.String, core.dynamic>);
}
/// Returns a list of the leaderboard configurations in this application.
@@ -649,7 +629,7 @@
core.int maxResults,
core.String pageToken,
core.String $fields,
- }) {
+ }) async {
core.String _url;
final _queryParams = <core.String, core.List<core.String>>{};
commons.Media _uploadMedia;
@@ -674,7 +654,7 @@
commons.Escaper.ecapeVariable('$applicationId') +
'/leaderboards';
- final _response = _requester.request(
+ final _response = await _requester.request(
_url,
'GET',
body: _body,
@@ -683,10 +663,8 @@
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions,
);
- return _response.then(
- (data) => LeaderboardConfigurationListResponse.fromJson(
- data as core.Map<core.String, core.dynamic>),
- );
+ return LeaderboardConfigurationListResponse.fromJson(
+ _response as core.Map<core.String, core.dynamic>);
}
/// Update the metadata of the leaderboard configuration with the given ID.
@@ -711,7 +689,7 @@
LeaderboardConfiguration request,
core.String leaderboardId, {
core.String $fields,
- }) {
+ }) async {
core.String _url;
final _queryParams = <core.String, core.List<core.String>>{};
commons.Media _uploadMedia;
@@ -732,7 +710,7 @@
_url = 'games/v1configuration/leaderboards/' +
commons.Escaper.ecapeVariable('$leaderboardId');
- final _response = _requester.request(
+ final _response = await _requester.request(
_url,
'PUT',
body: _body,
@@ -741,10 +719,8 @@
uploadMedia: _uploadMedia,
downloadOptions: _downloadOptions,
);
- return _response.then(
- (data) => LeaderboardConfiguration.fromJson(
- data as core.Map<core.String, core.dynamic>),
- );
+ return LeaderboardConfiguration.fromJson(
+ _response as core.Map<core.String, core.dynamic>);
}
}