| OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 |
| 1 library googleapis.groupssettings.v1; | 3 library googleapis.groupssettings.v1; |
| 2 | 4 |
| 3 import "dart:core" as core; | 5 import 'dart:core' as core; |
| 4 import "dart:collection" as collection; | 6 import 'dart:collection' as collection; |
| 5 import "dart:async" as async; | 7 import 'dart:async' as async; |
| 6 import "dart:convert" as convert; | 8 import 'dart:convert' as convert; |
| 7 | 9 |
| 8 import "package:crypto/crypto.dart" as crypto; | 10 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 11 import 'package:crypto/crypto.dart' as crypto; |
| 9 import 'package:http/http.dart' as http; | 12 import 'package:http/http.dart' as http; |
| 10 import '../src/common_internal.dart' as common_internal; | |
| 11 import '../common/common.dart' as common; | |
| 12 | 13 |
| 13 export '../common/common.dart' show ApiRequestError; | 14 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
| 14 export '../common/common.dart' show DetailedApiRequestError; | 15 ApiRequestError, DetailedApiRequestError; |
| 16 |
| 17 const core.String USER_AGENT = 'dart-api-client groupssettings/v1'; |
| 15 | 18 |
| 16 /** Lets you manage permission levels and related settings of a group. */ | 19 /** Lets you manage permission levels and related settings of a group. */ |
| 17 class GroupssettingsApi { | 20 class GroupssettingsApi { |
| 18 /** View and manage the settings of a Google Apps Group */ | 21 /** View and manage the settings of a Google Apps Group */ |
| 19 static const AppsGroupsSettingsScope = "https://www.googleapis.com/auth/apps.g
roups.settings"; | 22 static const AppsGroupsSettingsScope = "https://www.googleapis.com/auth/apps.g
roups.settings"; |
| 20 | 23 |
| 21 | 24 |
| 22 final common_internal.ApiRequester _requester; | 25 final commons.ApiRequester _requester; |
| 23 | 26 |
| 24 GroupsResourceApi get groups => new GroupsResourceApi(_requester); | 27 GroupsResourceApi get groups => new GroupsResourceApi(_requester); |
| 25 | 28 |
| 26 GroupssettingsApi(http.Client client, {core.String rootUrl: "https://www.googl
eapis.com/", core.String servicePath: "groups/v1/groups/"}) : | 29 GroupssettingsApi(http.Client client, {core.String rootUrl: "https://www.googl
eapis.com/", core.String servicePath: "groups/v1/groups/"}) : |
| 27 _requester = new common_internal.ApiRequester(client, rootUrl, servicePath
); | 30 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
| 28 } | 31 } |
| 29 | 32 |
| 30 | 33 |
| 31 /** Not documented yet. */ | |
| 32 class GroupsResourceApi { | 34 class GroupsResourceApi { |
| 33 final common_internal.ApiRequester _requester; | 35 final commons.ApiRequester _requester; |
| 34 | 36 |
| 35 GroupsResourceApi(common_internal.ApiRequester client) : | 37 GroupsResourceApi(commons.ApiRequester client) : |
| 36 _requester = client; | 38 _requester = client; |
| 37 | 39 |
| 38 /** | 40 /** |
| 39 * Gets one resource by id. | 41 * Gets one resource by id. |
| 40 * | 42 * |
| 41 * Request parameters: | 43 * Request parameters: |
| 42 * | 44 * |
| 43 * [groupUniqueId] - The resource ID | 45 * [groupUniqueId] - The resource ID |
| 44 * | 46 * |
| 45 * Completes with a [Groups]. | 47 * Completes with a [Groups]. |
| 46 * | 48 * |
| 47 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 49 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 48 * error. | 50 * error. |
| 49 * | 51 * |
| 50 * If the used [http.Client] completes with an error when making a REST call, | 52 * If the used [http.Client] completes with an error when making a REST call, |
| 51 * this method will complete with the same error. | 53 * this method will complete with the same error. |
| 52 */ | 54 */ |
| 53 async.Future<Groups> get(core.String groupUniqueId) { | 55 async.Future<Groups> get(core.String groupUniqueId) { |
| 54 var _url = null; | 56 var _url = null; |
| 55 var _queryParams = new core.Map(); | 57 var _queryParams = new core.Map(); |
| 56 var _uploadMedia = null; | 58 var _uploadMedia = null; |
| 57 var _uploadOptions = null; | 59 var _uploadOptions = null; |
| 58 var _downloadOptions = common.DownloadOptions.Metadata; | 60 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 59 var _body = null; | 61 var _body = null; |
| 60 | 62 |
| 61 if (groupUniqueId == null) { | 63 if (groupUniqueId == null) { |
| 62 throw new core.ArgumentError("Parameter groupUniqueId is required."); | 64 throw new core.ArgumentError("Parameter groupUniqueId is required."); |
| 63 } | 65 } |
| 64 | 66 |
| 65 | 67 |
| 66 _url = common_internal.Escaper.ecapeVariable('$groupUniqueId'); | 68 _url = commons.Escaper.ecapeVariable('$groupUniqueId'); |
| 67 | 69 |
| 68 var _response = _requester.request(_url, | 70 var _response = _requester.request(_url, |
| 69 "GET", | 71 "GET", |
| 70 body: _body, | 72 body: _body, |
| 71 queryParams: _queryParams, | 73 queryParams: _queryParams, |
| 72 uploadOptions: _uploadOptions, | 74 uploadOptions: _uploadOptions, |
| 73 uploadMedia: _uploadMedia, | 75 uploadMedia: _uploadMedia, |
| 74 downloadOptions: _downloadOptions); | 76 downloadOptions: _downloadOptions); |
| 75 return _response.then((data) => new Groups.fromJson(data)); | 77 return _response.then((data) => new Groups.fromJson(data)); |
| 76 } | 78 } |
| 77 | 79 |
| 78 /** | 80 /** |
| 79 * Updates an existing resource. This method supports patch semantics. | 81 * Updates an existing resource. This method supports patch semantics. |
| 80 * | 82 * |
| 81 * [request] - The metadata request object. | 83 * [request] - The metadata request object. |
| 82 * | 84 * |
| 83 * Request parameters: | 85 * Request parameters: |
| 84 * | 86 * |
| 85 * [groupUniqueId] - The resource ID | 87 * [groupUniqueId] - The resource ID |
| 86 * | 88 * |
| 87 * Completes with a [Groups]. | 89 * Completes with a [Groups]. |
| 88 * | 90 * |
| 89 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 91 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 90 * error. | 92 * error. |
| 91 * | 93 * |
| 92 * If the used [http.Client] completes with an error when making a REST call, | 94 * If the used [http.Client] completes with an error when making a REST call, |
| 93 * this method will complete with the same error. | 95 * this method will complete with the same error. |
| 94 */ | 96 */ |
| 95 async.Future<Groups> patch(Groups request, core.String groupUniqueId) { | 97 async.Future<Groups> patch(Groups request, core.String groupUniqueId) { |
| 96 var _url = null; | 98 var _url = null; |
| 97 var _queryParams = new core.Map(); | 99 var _queryParams = new core.Map(); |
| 98 var _uploadMedia = null; | 100 var _uploadMedia = null; |
| 99 var _uploadOptions = null; | 101 var _uploadOptions = null; |
| 100 var _downloadOptions = common.DownloadOptions.Metadata; | 102 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 101 var _body = null; | 103 var _body = null; |
| 102 | 104 |
| 103 if (request != null) { | 105 if (request != null) { |
| 104 _body = convert.JSON.encode((request).toJson()); | 106 _body = convert.JSON.encode((request).toJson()); |
| 105 } | 107 } |
| 106 if (groupUniqueId == null) { | 108 if (groupUniqueId == null) { |
| 107 throw new core.ArgumentError("Parameter groupUniqueId is required."); | 109 throw new core.ArgumentError("Parameter groupUniqueId is required."); |
| 108 } | 110 } |
| 109 | 111 |
| 110 | 112 |
| 111 _url = common_internal.Escaper.ecapeVariable('$groupUniqueId'); | 113 _url = commons.Escaper.ecapeVariable('$groupUniqueId'); |
| 112 | 114 |
| 113 var _response = _requester.request(_url, | 115 var _response = _requester.request(_url, |
| 114 "PATCH", | 116 "PATCH", |
| 115 body: _body, | 117 body: _body, |
| 116 queryParams: _queryParams, | 118 queryParams: _queryParams, |
| 117 uploadOptions: _uploadOptions, | 119 uploadOptions: _uploadOptions, |
| 118 uploadMedia: _uploadMedia, | 120 uploadMedia: _uploadMedia, |
| 119 downloadOptions: _downloadOptions); | 121 downloadOptions: _downloadOptions); |
| 120 return _response.then((data) => new Groups.fromJson(data)); | 122 return _response.then((data) => new Groups.fromJson(data)); |
| 121 } | 123 } |
| 122 | 124 |
| 123 /** | 125 /** |
| 124 * Updates an existing resource. | 126 * Updates an existing resource. |
| 125 * | 127 * |
| 126 * [request] - The metadata request object. | 128 * [request] - The metadata request object. |
| 127 * | 129 * |
| 128 * Request parameters: | 130 * Request parameters: |
| 129 * | 131 * |
| 130 * [groupUniqueId] - The resource ID | 132 * [groupUniqueId] - The resource ID |
| 131 * | 133 * |
| 132 * Completes with a [Groups]. | 134 * Completes with a [Groups]. |
| 133 * | 135 * |
| 134 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 136 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 135 * error. | 137 * error. |
| 136 * | 138 * |
| 137 * If the used [http.Client] completes with an error when making a REST call, | 139 * If the used [http.Client] completes with an error when making a REST call, |
| 138 * this method will complete with the same error. | 140 * this method will complete with the same error. |
| 139 */ | 141 */ |
| 140 async.Future<Groups> update(Groups request, core.String groupUniqueId) { | 142 async.Future<Groups> update(Groups request, core.String groupUniqueId) { |
| 141 var _url = null; | 143 var _url = null; |
| 142 var _queryParams = new core.Map(); | 144 var _queryParams = new core.Map(); |
| 143 var _uploadMedia = null; | 145 var _uploadMedia = null; |
| 144 var _uploadOptions = null; | 146 var _uploadOptions = null; |
| 145 var _downloadOptions = common.DownloadOptions.Metadata; | 147 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 146 var _body = null; | 148 var _body = null; |
| 147 | 149 |
| 148 if (request != null) { | 150 if (request != null) { |
| 149 _body = convert.JSON.encode((request).toJson()); | 151 _body = convert.JSON.encode((request).toJson()); |
| 150 } | 152 } |
| 151 if (groupUniqueId == null) { | 153 if (groupUniqueId == null) { |
| 152 throw new core.ArgumentError("Parameter groupUniqueId is required."); | 154 throw new core.ArgumentError("Parameter groupUniqueId is required."); |
| 153 } | 155 } |
| 154 | 156 |
| 155 | 157 |
| 156 _url = common_internal.Escaper.ecapeVariable('$groupUniqueId'); | 158 _url = commons.Escaper.ecapeVariable('$groupUniqueId'); |
| 157 | 159 |
| 158 var _response = _requester.request(_url, | 160 var _response = _requester.request(_url, |
| 159 "PUT", | 161 "PUT", |
| 160 body: _body, | 162 body: _body, |
| 161 queryParams: _queryParams, | 163 queryParams: _queryParams, |
| 162 uploadOptions: _uploadOptions, | 164 uploadOptions: _uploadOptions, |
| 163 uploadMedia: _uploadMedia, | 165 uploadMedia: _uploadMedia, |
| 164 downloadOptions: _downloadOptions); | 166 downloadOptions: _downloadOptions); |
| 165 return _response.then((data) => new Groups.fromJson(data)); | 167 return _response.then((data) => new Groups.fromJson(data)); |
| 166 } | 168 } |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 } | 465 } |
| 464 if (whoCanViewGroup != null) { | 466 if (whoCanViewGroup != null) { |
| 465 _json["whoCanViewGroup"] = whoCanViewGroup; | 467 _json["whoCanViewGroup"] = whoCanViewGroup; |
| 466 } | 468 } |
| 467 if (whoCanViewMembership != null) { | 469 if (whoCanViewMembership != null) { |
| 468 _json["whoCanViewMembership"] = whoCanViewMembership; | 470 _json["whoCanViewMembership"] = whoCanViewMembership; |
| 469 } | 471 } |
| 470 return _json; | 472 return _json; |
| 471 } | 473 } |
| 472 } | 474 } |
| 473 | |
| 474 | |
| OLD | NEW |