Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: generated/googleapis/lib/playcustomapp/v1.dart

Issue 3006323002: Api-Roll 54: 2017-09-11 (Closed)
Patch Set: use 2.0.0-dev.infinity sdk constraint in pubspecs Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // This is a generated file (see the discoveryapis_generator project). 1 // This is a generated file (see the discoveryapis_generator project).
2 2
3 library googleapis.playcustomapp.v1; 3 library googleapis.playcustomapp.v1;
4 4
5 import 'dart:core' as core; 5 import 'dart:core' as core;
6 import 'dart:async' as async; 6 import 'dart:async' as async;
7 import 'dart:convert' as convert; 7 import 'dart:convert' as convert;
8 8
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
10 import 'package:http/http.dart' as http; 10 import 'package:http/http.dart' as http;
11 11
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart'
13 ApiRequestError, DetailedApiRequestError, Media, UploadOptions, 13 show
14 ResumableUploadOptions, DownloadOptions, PartialDownloadOptions, 14 ApiRequestError,
15 ByteRange; 15 DetailedApiRequestError,
16 Media,
17 UploadOptions,
18 ResumableUploadOptions,
19 DownloadOptions,
20 PartialDownloadOptions,
21 ByteRange;
16 22
17 const core.String USER_AGENT = 'dart-api-client playcustomapp/v1'; 23 const core.String USER_AGENT = 'dart-api-client playcustomapp/v1';
18 24
19 /** An API to publish custom Android apps. */ 25 /// An API to publish custom Android apps.
20 class PlaycustomappApi { 26 class PlaycustomappApi {
21 /** View and manage your Google Play Developer account */ 27 /// View and manage your Google Play Developer account
22 static const AndroidpublisherScope = "https://www.googleapis.com/auth/androidp ublisher"; 28 static const AndroidpublisherScope =
23 29 "https://www.googleapis.com/auth/androidpublisher";
24 30
25 final commons.ApiRequester _requester; 31 final commons.ApiRequester _requester;
26 32
27 AccountsResourceApi get accounts => new AccountsResourceApi(_requester); 33 AccountsResourceApi get accounts => new AccountsResourceApi(_requester);
28 34
29 PlaycustomappApi(http.Client client, {core.String rootUrl: "https://www.google apis.com/", core.String servicePath: "playcustomapp/v1/accounts/"}) : 35 PlaycustomappApi(http.Client client,
30 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT); 36 {core.String rootUrl: "https://www.googleapis.com/",
37 core.String servicePath: "playcustomapp/v1/accounts/"})
38 : _requester =
39 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT);
31 } 40 }
32 41
33
34 class AccountsResourceApi { 42 class AccountsResourceApi {
35 final commons.ApiRequester _requester; 43 final commons.ApiRequester _requester;
36 44
37 AccountsCustomAppsResourceApi get customApps => new AccountsCustomAppsResource Api(_requester); 45 AccountsCustomAppsResourceApi get customApps =>
46 new AccountsCustomAppsResourceApi(_requester);
38 47
39 AccountsResourceApi(commons.ApiRequester client) : 48 AccountsResourceApi(commons.ApiRequester client) : _requester = client;
40 _requester = client;
41 } 49 }
42 50
43
44 class AccountsCustomAppsResourceApi { 51 class AccountsCustomAppsResourceApi {
45 final commons.ApiRequester _requester; 52 final commons.ApiRequester _requester;
46 53
47 AccountsCustomAppsResourceApi(commons.ApiRequester client) : 54 AccountsCustomAppsResourceApi(commons.ApiRequester client)
48 _requester = client; 55 : _requester = client;
49 56
50 /** 57 /// Create and publish a new custom app.
51 * Create and publish a new custom app. 58 ///
52 * 59 /// [request] - The metadata request object.
53 * [request] - The metadata request object. 60 ///
54 * 61 /// Request parameters:
55 * Request parameters: 62 ///
56 * 63 /// [account] - Developer account ID.
57 * [account] - Developer account ID. 64 ///
58 * 65 /// [uploadMedia] - The media to upload.
59 * [uploadMedia] - The media to upload. 66 ///
60 * 67 /// [uploadOptions] - Options for the media upload. Streaming Media without
61 * [uploadOptions] - Options for the media upload. Streaming Media without the 68 /// the length being known ahead of time is only supported via resumable
62 * length being known ahead of time is only supported via resumable uploads. 69 /// uploads.
63 * 70 ///
64 * Completes with a [CustomApp]. 71 /// Completes with a [CustomApp].
65 * 72 ///
66 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 73 /// Completes with a [commons.ApiRequestError] if the API endpoint returned
67 * error. 74 /// an error.
68 * 75 ///
69 * If the used [http.Client] completes with an error when making a REST call, 76 /// If the used [http.Client] completes with an error when making a REST
70 * this method will complete with the same error. 77 /// call, this method will complete with the same error.
71 */ 78 async.Future<CustomApp> create(CustomApp request, core.String account,
72 async.Future<CustomApp> create(CustomApp request, core.String account, {common s.UploadOptions uploadOptions : commons.UploadOptions.Default, commons.Media upl oadMedia}) { 79 {commons.UploadOptions uploadOptions: commons.UploadOptions.Default,
80 commons.Media uploadMedia}) {
73 var _url = null; 81 var _url = null;
74 var _queryParams = new core.Map(); 82 var _queryParams = new core.Map();
75 var _uploadMedia = null; 83 var _uploadMedia = null;
76 var _uploadOptions = null; 84 var _uploadOptions = null;
77 var _downloadOptions = commons.DownloadOptions.Metadata; 85 var _downloadOptions = commons.DownloadOptions.Metadata;
78 var _body = null; 86 var _body = null;
79 87
80 if (request != null) { 88 if (request != null) {
81 _body = convert.JSON.encode((request).toJson()); 89 _body = convert.JSON.encode((request).toJson());
82 } 90 }
83 if (account == null) { 91 if (account == null) {
84 throw new core.ArgumentError("Parameter account is required."); 92 throw new core.ArgumentError("Parameter account is required.");
85 } 93 }
86 94
87 _uploadMedia = uploadMedia; 95 _uploadMedia = uploadMedia;
88 _uploadOptions = uploadOptions; 96 _uploadOptions = uploadOptions;
89 97
90 if (_uploadMedia == null) { 98 if (_uploadMedia == null) {
91 _url = commons.Escaper.ecapeVariable('$account') + '/customApps'; 99 _url = commons.Escaper.ecapeVariable('$account') + '/customApps';
92 } else if (_uploadOptions is commons.ResumableUploadOptions) { 100 } else if (_uploadOptions is commons.ResumableUploadOptions) {
93 _url = '/resumable/upload/playcustomapp/v1/accounts/' + commons.Escaper.ec apeVariable('$account') + '/customApps'; 101 _url = '/resumable/upload/playcustomapp/v1/accounts/' +
102 commons.Escaper.ecapeVariable('$account') +
103 '/customApps';
94 } else { 104 } else {
95 _url = '/upload/playcustomapp/v1/accounts/' + commons.Escaper.ecapeVariabl e('$account') + '/customApps'; 105 _url = '/upload/playcustomapp/v1/accounts/' +
106 commons.Escaper.ecapeVariable('$account') +
107 '/customApps';
96 } 108 }
97 109
98 110 var _response = _requester.request(_url, "POST",
99 var _response = _requester.request(_url, 111 body: _body,
100 "POST", 112 queryParams: _queryParams,
101 body: _body, 113 uploadOptions: _uploadOptions,
102 queryParams: _queryParams, 114 uploadMedia: _uploadMedia,
103 uploadOptions: _uploadOptions, 115 downloadOptions: _downloadOptions);
104 uploadMedia: _uploadMedia,
105 downloadOptions: _downloadOptions);
106 return _response.then((data) => new CustomApp.fromJson(data)); 116 return _response.then((data) => new CustomApp.fromJson(data));
107 } 117 }
108
109 } 118 }
110 119
120 /// This resource represents a custom app.
121 class CustomApp {
122 /// Default listing language in BCP 47 format.
123 core.String languageCode;
111 124
112 125 /// Title for the Android app.
113 /** This resource represents a custom app. */
114 class CustomApp {
115 /** Default listing language in BCP 47 format. */
116 core.String languageCode;
117 /** Title for the Android app. */
118 core.String title; 126 core.String title;
119 127
120 CustomApp(); 128 CustomApp();
121 129
122 CustomApp.fromJson(core.Map _json) { 130 CustomApp.fromJson(core.Map _json) {
123 if (_json.containsKey("languageCode")) { 131 if (_json.containsKey("languageCode")) {
124 languageCode = _json["languageCode"]; 132 languageCode = _json["languageCode"];
125 } 133 }
126 if (_json.containsKey("title")) { 134 if (_json.containsKey("title")) {
127 title = _json["title"]; 135 title = _json["title"];
128 } 136 }
129 } 137 }
130 138
131 core.Map<core.String, core.Object> toJson() { 139 core.Map<core.String, core.Object> toJson() {
132 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c ore.Object>(); 140 final core.Map<core.String, core.Object> _json =
141 new core.Map<core.String, core.Object>();
133 if (languageCode != null) { 142 if (languageCode != null) {
134 _json["languageCode"] = languageCode; 143 _json["languageCode"] = languageCode;
135 } 144 }
136 if (title != null) { 145 if (title != null) {
137 _json["title"] = title; 146 _json["title"] = title;
138 } 147 }
139 return _json; 148 return _json;
140 } 149 }
141 } 150 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/people/v1.dart ('k') | generated/googleapis/lib/playmoviespartner/v1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698