| OLD | NEW |
| 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_beta.pubsub.v1beta2; | 3 library googleapis_beta.pubsub.v1beta2; |
| 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:crypto/crypto.dart' as crypto; | 10 import 'package:crypto/crypto.dart' as crypto; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 * subscription already exists, returns ALREADY_EXISTS. If the corresponding | 106 * subscription already exists, returns ALREADY_EXISTS. If the corresponding |
| 107 * topic doesn't exist, returns NOT_FOUND. If the name is not provided in the | 107 * topic doesn't exist, returns NOT_FOUND. If the name is not provided in the |
| 108 * request, the server will assign a random name for this subscription on the | 108 * request, the server will assign a random name for this subscription on the |
| 109 * same project as the topic. | 109 * same project as the topic. |
| 110 * | 110 * |
| 111 * [request] - The metadata request object. | 111 * [request] - The metadata request object. |
| 112 * | 112 * |
| 113 * Request parameters: | 113 * Request parameters: |
| 114 * | 114 * |
| 115 * [name] - The name of the subscription. It must have the format | 115 * [name] - The name of the subscription. It must have the format |
| 116 * "projects/{project}/subscriptions/{subscription}" for Google Cloud Pub/Sub | 116 * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must |
| 117 * API v1 and v1beta2. {subscription} must start with a letter, and contain | 117 * start with a letter, and contain only letters (`[A-Za-z]`), numbers |
| 118 * only letters ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), | 118 * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), |
| 119 * periods (.), tildes (~), plus (+) or percent signs (%). It must be between | 119 * plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters |
| 120 * 3 and 255 characters in length, and it must not start with "goog". | 120 * in length, and it must not start with `"goog"`. |
| 121 * Value must have pattern "^projects/[^/] * / subscriptions/[^/]*$". | 121 * Value must have pattern "^projects/[^/] * / subscriptions/[^/]*$". |
| 122 * | 122 * |
| 123 * Completes with a [Subscription]. | 123 * Completes with a [Subscription]. |
| 124 * | 124 * |
| 125 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 125 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 126 * error. | 126 * error. |
| 127 * | 127 * |
| 128 * If the used [http.Client] completes with an error when making a REST call, | 128 * If the used [http.Client] completes with an error when making a REST call, |
| 129 * this method will complete with the same error. | 129 * this method will complete with the same error. |
| 130 */ | 130 */ |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 _requester = client; | 585 _requester = client; |
| 586 | 586 |
| 587 /** | 587 /** |
| 588 * Creates the given topic with the given name. | 588 * Creates the given topic with the given name. |
| 589 * | 589 * |
| 590 * [request] - The metadata request object. | 590 * [request] - The metadata request object. |
| 591 * | 591 * |
| 592 * Request parameters: | 592 * Request parameters: |
| 593 * | 593 * |
| 594 * [name] - The name of the topic. It must have the format | 594 * [name] - The name of the topic. It must have the format |
| 595 * "projects/{project}/topics/{topic}" for Google Cloud Pub/Sub API v1 and | 595 * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, |
| 596 * v1beta2. {topic} must start with a letter, and contain only letters | 596 * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), |
| 597 * ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), periods (.), | 597 * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs |
| 598 * tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 | 598 * (`%`). It must be between 3 and 255 characters in length, and it must not |
| 599 * characters in length, and it must not start with "goog". | 599 * start with `"goog"`. |
| 600 * Value must have pattern "^projects/[^/] * / topics/[^/]*$". | 600 * Value must have pattern "^projects/[^/] * / topics/[^/]*$". |
| 601 * | 601 * |
| 602 * Completes with a [Topic]. | 602 * Completes with a [Topic]. |
| 603 * | 603 * |
| 604 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 604 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 605 * error. | 605 * error. |
| 606 * | 606 * |
| 607 * If the used [http.Client] completes with an error when making a REST call, | 607 * If the used [http.Client] completes with an error when making a REST call, |
| 608 * this method will complete with the same error. | 608 * this method will complete with the same error. |
| 609 */ | 609 */ |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 body: _body, | 807 body: _body, |
| 808 queryParams: _queryParams, | 808 queryParams: _queryParams, |
| 809 uploadOptions: _uploadOptions, | 809 uploadOptions: _uploadOptions, |
| 810 uploadMedia: _uploadMedia, | 810 uploadMedia: _uploadMedia, |
| 811 downloadOptions: _downloadOptions); | 811 downloadOptions: _downloadOptions); |
| 812 return _response.then((data) => new ListTopicsResponse.fromJson(data)); | 812 return _response.then((data) => new ListTopicsResponse.fromJson(data)); |
| 813 } | 813 } |
| 814 | 814 |
| 815 /** | 815 /** |
| 816 * Adds one or more messages to the topic. Returns NOT_FOUND if the topic does | 816 * Adds one or more messages to the topic. Returns NOT_FOUND if the topic does |
| 817 * not exist. | 817 * not exist. The message payload must not be empty; it must contain either a |
| 818 * non-empty data field, or at least one attribute. |
| 818 * | 819 * |
| 819 * [request] - The metadata request object. | 820 * [request] - The metadata request object. |
| 820 * | 821 * |
| 821 * Request parameters: | 822 * Request parameters: |
| 822 * | 823 * |
| 823 * [topic] - The messages in the request will be published on this topic. | 824 * [topic] - The messages in the request will be published on this topic. |
| 824 * Value must have pattern "^projects/[^/] * / topics/[^/]*$". | 825 * Value must have pattern "^projects/[^/] * / topics/[^/]*$". |
| 825 * | 826 * |
| 826 * Completes with a [PublishResponse]. | 827 * Completes with a [PublishResponse]. |
| 827 * | 828 * |
| (...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1589 | 1590 |
| 1590 core.Map toJson() { | 1591 core.Map toJson() { |
| 1591 var _json = new core.Map(); | 1592 var _json = new core.Map(); |
| 1592 if (messageIds != null) { | 1593 if (messageIds != null) { |
| 1593 _json["messageIds"] = messageIds; | 1594 _json["messageIds"] = messageIds; |
| 1594 } | 1595 } |
| 1595 return _json; | 1596 return _json; |
| 1596 } | 1597 } |
| 1597 } | 1598 } |
| 1598 | 1599 |
| 1599 /** A message data and its attributes. */ | 1600 /** |
| 1601 * A message data and its attributes. The message payload must not be empty; it |
| 1602 * must contain either a non-empty data field, or at least one attribute. |
| 1603 */ |
| 1600 class PubsubMessage { | 1604 class PubsubMessage { |
| 1601 /** Optional attributes for this message. */ | 1605 /** Optional attributes for this message. */ |
| 1602 core.Map<core.String, core.String> attributes; | 1606 core.Map<core.String, core.String> attributes; |
| 1603 /** | 1607 /** |
| 1604 * The message payload. For JSON requests, the value of this field must be | 1608 * The message payload. For JSON requests, the value of this field must be |
| 1605 * base64-encoded. | 1609 * base64-encoded. |
| 1606 */ | 1610 */ |
| 1607 core.String data; | 1611 core.String data; |
| 1608 core.List<core.int> get dataAsBytes { | 1612 core.List<core.int> get dataAsBytes { |
| 1609 return crypto.CryptoUtils.base64StringToBytes(data); | 1613 return crypto.CryptoUtils.base64StringToBytes(data); |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1913 } | 1917 } |
| 1914 | 1918 |
| 1915 /** A subscription resource. */ | 1919 /** A subscription resource. */ |
| 1916 class Subscription { | 1920 class Subscription { |
| 1917 /** | 1921 /** |
| 1918 * This value is the maximum time after a subscriber receives a message before | 1922 * This value is the maximum time after a subscriber receives a message before |
| 1919 * the subscriber should acknowledge the message. After message delivery but | 1923 * the subscriber should acknowledge the message. After message delivery but |
| 1920 * before the ack deadline expires and before the message is acknowledged, it | 1924 * before the ack deadline expires and before the message is acknowledged, it |
| 1921 * is an outstanding message and will not be delivered again during that time | 1925 * is an outstanding message and will not be delivered again during that time |
| 1922 * (on a best-effort basis). For pull delivery this value is used as the | 1926 * (on a best-effort basis). For pull delivery this value is used as the |
| 1923 * initial value for the ack deadline. It may be overridden for each message | 1927 * initial value for the ack deadline. To override this value for a given |
| 1924 * using its corresponding ack_id by calling ModifyAckDeadline. For push | 1928 * message, call ModifyAckDeadline with the corresponding ack_id. For push |
| 1925 * delivery, this value is also used to set the request timeout for the call | 1929 * delivery, this value is also used to set the request timeout for the call |
| 1926 * to the push endpoint. If the subscriber never acknowledges the message, the | 1930 * to the push endpoint. If the subscriber never acknowledges the message, the |
| 1927 * Pub/Sub system will eventually redeliver the message. If this parameter is | 1931 * Pub/Sub system will eventually redeliver the message. If this parameter is |
| 1928 * not set, the default value of 60 seconds is used. | 1932 * not set, the default value of 10 seconds is used. |
| 1929 */ | 1933 */ |
| 1930 core.int ackDeadlineSeconds; | 1934 core.int ackDeadlineSeconds; |
| 1931 /** | 1935 /** |
| 1932 * The name of the subscription. It must have the format | 1936 * The name of the subscription. It must have the format |
| 1933 * "projects/{project}/subscriptions/{subscription}" for Google Cloud Pub/Sub | 1937 * `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must |
| 1934 * API v1 and v1beta2. {subscription} must start with a letter, and contain | 1938 * start with a letter, and contain only letters (`[A-Za-z]`), numbers |
| 1935 * only letters ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), | 1939 * (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), |
| 1936 * periods (.), tildes (~), plus (+) or percent signs (%). It must be between | 1940 * plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters |
| 1937 * 3 and 255 characters in length, and it must not start with "goog". | 1941 * in length, and it must not start with `"goog"`. |
| 1938 */ | 1942 */ |
| 1939 core.String name; | 1943 core.String name; |
| 1940 /** | 1944 /** |
| 1941 * If push delivery is used with this subscription, this field is used to | 1945 * If push delivery is used with this subscription, this field is used to |
| 1942 * configure it. An empty pushConfig signifies that the subscriber will pull | 1946 * configure it. An empty pushConfig signifies that the subscriber will pull |
| 1943 * and ack messages using API methods. | 1947 * and ack messages using API methods. |
| 1944 */ | 1948 */ |
| 1945 PushConfig pushConfig; | 1949 PushConfig pushConfig; |
| 1946 /** | 1950 /** |
| 1947 * The name of the topic from which this subscription is receiving messages. | 1951 * The name of the topic from which this subscription is receiving messages. |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2032 _json["permissions"] = permissions; | 2036 _json["permissions"] = permissions; |
| 2033 } | 2037 } |
| 2034 return _json; | 2038 return _json; |
| 2035 } | 2039 } |
| 2036 } | 2040 } |
| 2037 | 2041 |
| 2038 /** A topic resource. */ | 2042 /** A topic resource. */ |
| 2039 class Topic { | 2043 class Topic { |
| 2040 /** | 2044 /** |
| 2041 * The name of the topic. It must have the format | 2045 * The name of the topic. It must have the format |
| 2042 * "projects/{project}/topics/{topic}" for Google Cloud Pub/Sub API v1 and | 2046 * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter, |
| 2043 * v1beta2. {topic} must start with a letter, and contain only letters | 2047 * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), |
| 2044 * ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), periods (.), | 2048 * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs |
| 2045 * tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 | 2049 * (`%`). It must be between 3 and 255 characters in length, and it must not |
| 2046 * characters in length, and it must not start with "goog". | 2050 * start with `"goog"`. |
| 2047 */ | 2051 */ |
| 2048 core.String name; | 2052 core.String name; |
| 2049 | 2053 |
| 2050 Topic(); | 2054 Topic(); |
| 2051 | 2055 |
| 2052 Topic.fromJson(core.Map _json) { | 2056 Topic.fromJson(core.Map _json) { |
| 2053 if (_json.containsKey("name")) { | 2057 if (_json.containsKey("name")) { |
| 2054 name = _json["name"]; | 2058 name = _json["name"]; |
| 2055 } | 2059 } |
| 2056 } | 2060 } |
| 2057 | 2061 |
| 2058 core.Map toJson() { | 2062 core.Map toJson() { |
| 2059 var _json = new core.Map(); | 2063 var _json = new core.Map(); |
| 2060 if (name != null) { | 2064 if (name != null) { |
| 2061 _json["name"] = name; | 2065 _json["name"] = name; |
| 2062 } | 2066 } |
| 2063 return _json; | 2067 return _json; |
| 2064 } | 2068 } |
| 2065 } | 2069 } |
| OLD | NEW |