OLD | NEW |
1 library googleapis_beta.pubsub.v1beta1; | 1 library googleapis_beta.pubsub.v1beta1; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
5 import "dart:async" as async; | 5 import "dart:async" as async; |
6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
7 | 7 |
8 import "package:crypto/crypto.dart" as crypto; | 8 import "package:crypto/crypto.dart" as crypto; |
9 import 'package:http/http.dart' as http; | 9 import 'package:http/http.dart' as http; |
10 import '../src/common_internal.dart' as common_internal; | 10 import '../src/common_internal.dart' as common_internal; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 uploadMedia: _uploadMedia, | 82 uploadMedia: _uploadMedia, |
83 downloadOptions: _downloadOptions); | 83 downloadOptions: _downloadOptions); |
84 return _response.then((data) => null); | 84 return _response.then((data) => null); |
85 } | 85 } |
86 | 86 |
87 /** | 87 /** |
88 * Creates a subscription on a given topic for a given subscriber. If the | 88 * Creates a subscription on a given topic for a given subscriber. If the |
89 * subscription already exists, returns ALREADY_EXISTS. If the corresponding | 89 * subscription already exists, returns ALREADY_EXISTS. If the corresponding |
90 * topic doesn't exist, returns NOT_FOUND. | 90 * topic doesn't exist, returns NOT_FOUND. |
91 * | 91 * |
| 92 * If the name is not provided in the request, the server will assign a random |
| 93 * name for this subscription on the same project as the topic. |
| 94 * |
92 * [request] - The metadata request object. | 95 * [request] - The metadata request object. |
93 * | 96 * |
94 * Request parameters: | 97 * Request parameters: |
95 * | 98 * |
96 * Completes with a [Subscription]. | 99 * Completes with a [Subscription]. |
97 * | 100 * |
98 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 101 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
99 * error. | 102 * error. |
100 * | 103 * |
101 * If the used [http.Client] completes with an error when making a REST call, | 104 * If the used [http.Client] completes with an error when making a REST call, |
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 return _json; | 858 return _json; |
856 } | 859 } |
857 } | 860 } |
858 | 861 |
859 | 862 |
860 /** Not documented yet. */ | 863 /** Not documented yet. */ |
861 class PublishRequest { | 864 class PublishRequest { |
862 /** The message to publish. */ | 865 /** The message to publish. */ |
863 PubsubMessage message; | 866 PubsubMessage message; |
864 | 867 |
865 /** The name of the topic for which the message is being added. */ | 868 /** The message in the request will be published on this topic. */ |
866 core.String topic; | 869 core.String topic; |
867 | 870 |
868 | 871 |
869 PublishRequest(); | 872 PublishRequest(); |
870 | 873 |
871 PublishRequest.fromJson(core.Map _json) { | 874 PublishRequest.fromJson(core.Map _json) { |
872 if (_json.containsKey("message")) { | 875 if (_json.containsKey("message")) { |
873 message = new PubsubMessage.fromJson(_json["message"]); | 876 message = new PubsubMessage.fromJson(_json["message"]); |
874 } | 877 } |
875 if (_json.containsKey("topic")) { | 878 if (_json.containsKey("topic")) { |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1182 core.Map toJson() { | 1185 core.Map toJson() { |
1183 var _json = new core.Map(); | 1186 var _json = new core.Map(); |
1184 if (name != null) { | 1187 if (name != null) { |
1185 _json["name"] = name; | 1188 _json["name"] = name; |
1186 } | 1189 } |
1187 return _json; | 1190 return _json; |
1188 } | 1191 } |
1189 } | 1192 } |
1190 | 1193 |
1191 | 1194 |
OLD | NEW |