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.serviceuser.v1; | 3 library googleapis.serviceuser.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_1; | 10 import 'package:http/http.dart' as http_1; |
11 | 11 |
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' |
13 ApiRequestError, DetailedApiRequestError; | 13 show ApiRequestError, DetailedApiRequestError; |
14 | 14 |
15 const core.String USER_AGENT = 'dart-api-client serviceuser/v1'; | 15 const core.String USER_AGENT = 'dart-api-client serviceuser/v1'; |
16 | 16 |
17 /** | 17 /// Enables services that service consumers want to use on Google Cloud |
18 * Enables services that service consumers want to use on Google Cloud Platform, | 18 /// Platform, lists the available or enabled services, or disables services |
19 * lists the available or enabled services, or disables services that service | 19 /// that service consumers no longer use. |
20 * consumers no longer use. | |
21 */ | |
22 class ServiceuserApi { | 20 class ServiceuserApi { |
23 /** View and manage your data across Google Cloud Platform services */ | 21 /// View and manage your data across Google Cloud Platform services |
24 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; | 22 static const CloudPlatformScope = |
| 23 "https://www.googleapis.com/auth/cloud-platform"; |
25 | 24 |
26 /** View your data across Google Cloud Platform services */ | 25 /// View your data across Google Cloud Platform services |
27 static const CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/clo
ud-platform.read-only"; | 26 static const CloudPlatformReadOnlyScope = |
| 27 "https://www.googleapis.com/auth/cloud-platform.read-only"; |
28 | 28 |
29 /** Manage your Google API service configuration */ | 29 /// Manage your Google API service configuration |
30 static const ServiceManagementScope = "https://www.googleapis.com/auth/service
.management"; | 30 static const ServiceManagementScope = |
31 | 31 "https://www.googleapis.com/auth/service.management"; |
32 | 32 |
33 final commons.ApiRequester _requester; | 33 final commons.ApiRequester _requester; |
34 | 34 |
35 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); | 35 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); |
36 ServicesResourceApi get services => new ServicesResourceApi(_requester); | 36 ServicesResourceApi get services => new ServicesResourceApi(_requester); |
37 | 37 |
38 ServiceuserApi(http_1.Client client, {core.String rootUrl: "https://serviceuse
r.googleapis.com/", core.String servicePath: ""}) : | 38 ServiceuserApi(http_1.Client client, |
39 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 39 {core.String rootUrl: "https://serviceuser.googleapis.com/", |
| 40 core.String servicePath: ""}) |
| 41 : _requester = |
| 42 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); |
40 } | 43 } |
41 | 44 |
42 | |
43 class ProjectsResourceApi { | 45 class ProjectsResourceApi { |
44 final commons.ApiRequester _requester; | 46 final commons.ApiRequester _requester; |
45 | 47 |
46 ProjectsServicesResourceApi get services => new ProjectsServicesResourceApi(_r
equester); | 48 ProjectsServicesResourceApi get services => |
| 49 new ProjectsServicesResourceApi(_requester); |
47 | 50 |
48 ProjectsResourceApi(commons.ApiRequester client) : | 51 ProjectsResourceApi(commons.ApiRequester client) : _requester = client; |
49 _requester = client; | |
50 } | 52 } |
51 | 53 |
52 | |
53 class ProjectsServicesResourceApi { | 54 class ProjectsServicesResourceApi { |
54 final commons.ApiRequester _requester; | 55 final commons.ApiRequester _requester; |
55 | 56 |
56 ProjectsServicesResourceApi(commons.ApiRequester client) : | 57 ProjectsServicesResourceApi(commons.ApiRequester client) |
57 _requester = client; | 58 : _requester = client; |
58 | 59 |
59 /** | 60 /// Disable a service so it can no longer be used with a |
60 * Disable a service so it can no longer be used with a | 61 /// project. This prevents unintended usage that may cause unexpected billing |
61 * project. This prevents unintended usage that may cause unexpected billing | 62 /// charges or security leaks. |
62 * charges or security leaks. | 63 /// |
63 * | 64 /// Operation<response: google.protobuf.Empty> |
64 * Operation<response: google.protobuf.Empty> | 65 /// |
65 * | 66 /// [request] - The metadata request object. |
66 * [request] - The metadata request object. | 67 /// |
67 * | 68 /// Request parameters: |
68 * Request parameters: | 69 /// |
69 * | 70 /// [name] - Name of the consumer and the service to disable for that |
70 * [name] - Name of the consumer and the service to disable for that consumer. | 71 /// consumer. |
71 * | 72 /// |
72 * The Service User implementation accepts the following forms for consumer: | 73 /// The Service User implementation accepts the following forms for consumer: |
73 * - "project:<project_id>" | 74 /// - "project:<project_id>" |
74 * | 75 /// |
75 * A valid path would be: | 76 /// A valid path would be: |
76 * - /v1/projects/my-project/services/servicemanagement.googleapis.com:disable | 77 /// - |
77 * Value must have pattern "^projects/[^/]+/services/[^/]+$". | 78 /// /v1/projects/my-project/services/servicemanagement.googleapis.com:disable |
78 * | 79 /// Value must have pattern "^projects/[^/]+/services/[^/]+$". |
79 * Completes with a [Operation]. | 80 /// |
80 * | 81 /// Completes with a [Operation]. |
81 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 82 /// |
82 * error. | 83 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
83 * | 84 /// an error. |
84 * If the used [http_1.Client] completes with an error when making a REST | 85 /// |
85 * call, this method will complete with the same error. | 86 /// If the used [http_1.Client] completes with an error when making a REST |
86 */ | 87 /// call, this method will complete with the same error. |
87 async.Future<Operation> disable(DisableServiceRequest request, core.String nam
e) { | 88 async.Future<Operation> disable( |
| 89 DisableServiceRequest request, core.String name) { |
88 var _url = null; | 90 var _url = null; |
89 var _queryParams = new core.Map(); | 91 var _queryParams = new core.Map(); |
90 var _uploadMedia = null; | 92 var _uploadMedia = null; |
91 var _uploadOptions = null; | 93 var _uploadOptions = null; |
92 var _downloadOptions = commons.DownloadOptions.Metadata; | 94 var _downloadOptions = commons.DownloadOptions.Metadata; |
93 var _body = null; | 95 var _body = null; |
94 | 96 |
95 if (request != null) { | 97 if (request != null) { |
96 _body = convert.JSON.encode((request).toJson()); | 98 _body = convert.JSON.encode((request).toJson()); |
97 } | 99 } |
98 if (name == null) { | 100 if (name == null) { |
99 throw new core.ArgumentError("Parameter name is required."); | 101 throw new core.ArgumentError("Parameter name is required."); |
100 } | 102 } |
101 | 103 |
102 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':disable'; | 104 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':disable'; |
103 | 105 |
104 var _response = _requester.request(_url, | 106 var _response = _requester.request(_url, "POST", |
105 "POST", | 107 body: _body, |
106 body: _body, | 108 queryParams: _queryParams, |
107 queryParams: _queryParams, | 109 uploadOptions: _uploadOptions, |
108 uploadOptions: _uploadOptions, | 110 uploadMedia: _uploadMedia, |
109 uploadMedia: _uploadMedia, | 111 downloadOptions: _downloadOptions); |
110 downloadOptions: _downloadOptions); | |
111 return _response.then((data) => new Operation.fromJson(data)); | 112 return _response.then((data) => new Operation.fromJson(data)); |
112 } | 113 } |
113 | 114 |
114 /** | 115 /// Enable a service so it can be used with a project. |
115 * Enable a service so it can be used with a project. | 116 /// See [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for |
116 * See [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for | 117 /// more information. |
117 * more information. | 118 /// |
118 * | 119 /// Operation<response: google.protobuf.Empty> |
119 * Operation<response: google.protobuf.Empty> | 120 /// |
120 * | 121 /// [request] - The metadata request object. |
121 * [request] - The metadata request object. | 122 /// |
122 * | 123 /// Request parameters: |
123 * Request parameters: | 124 /// |
124 * | 125 /// [name] - Name of the consumer and the service to enable for that |
125 * [name] - Name of the consumer and the service to enable for that consumer. | 126 /// consumer. |
126 * | 127 /// |
127 * A valid path would be: | 128 /// A valid path would be: |
128 * - /v1/projects/my-project/services/servicemanagement.googleapis.com:enable | 129 /// - |
129 * Value must have pattern "^projects/[^/]+/services/[^/]+$". | 130 /// /v1/projects/my-project/services/servicemanagement.googleapis.com:enable |
130 * | 131 /// Value must have pattern "^projects/[^/]+/services/[^/]+$". |
131 * Completes with a [Operation]. | 132 /// |
132 * | 133 /// Completes with a [Operation]. |
133 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 134 /// |
134 * error. | 135 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
135 * | 136 /// an error. |
136 * If the used [http_1.Client] completes with an error when making a REST | 137 /// |
137 * call, this method will complete with the same error. | 138 /// If the used [http_1.Client] completes with an error when making a REST |
138 */ | 139 /// call, this method will complete with the same error. |
139 async.Future<Operation> enable(EnableServiceRequest request, core.String name)
{ | 140 async.Future<Operation> enable( |
| 141 EnableServiceRequest request, core.String name) { |
140 var _url = null; | 142 var _url = null; |
141 var _queryParams = new core.Map(); | 143 var _queryParams = new core.Map(); |
142 var _uploadMedia = null; | 144 var _uploadMedia = null; |
143 var _uploadOptions = null; | 145 var _uploadOptions = null; |
144 var _downloadOptions = commons.DownloadOptions.Metadata; | 146 var _downloadOptions = commons.DownloadOptions.Metadata; |
145 var _body = null; | 147 var _body = null; |
146 | 148 |
147 if (request != null) { | 149 if (request != null) { |
148 _body = convert.JSON.encode((request).toJson()); | 150 _body = convert.JSON.encode((request).toJson()); |
149 } | 151 } |
150 if (name == null) { | 152 if (name == null) { |
151 throw new core.ArgumentError("Parameter name is required."); | 153 throw new core.ArgumentError("Parameter name is required."); |
152 } | 154 } |
153 | 155 |
154 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':enable'; | 156 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':enable'; |
155 | 157 |
156 var _response = _requester.request(_url, | 158 var _response = _requester.request(_url, "POST", |
157 "POST", | 159 body: _body, |
158 body: _body, | 160 queryParams: _queryParams, |
159 queryParams: _queryParams, | 161 uploadOptions: _uploadOptions, |
160 uploadOptions: _uploadOptions, | 162 uploadMedia: _uploadMedia, |
161 uploadMedia: _uploadMedia, | 163 downloadOptions: _downloadOptions); |
162 downloadOptions: _downloadOptions); | |
163 return _response.then((data) => new Operation.fromJson(data)); | 164 return _response.then((data) => new Operation.fromJson(data)); |
164 } | 165 } |
165 | 166 |
166 /** | 167 /// List enabled services for the specified consumer. |
167 * List enabled services for the specified consumer. | 168 /// |
168 * | 169 /// Request parameters: |
169 * Request parameters: | 170 /// |
170 * | 171 /// [parent] - List enabled services for the specified parent. |
171 * [parent] - List enabled services for the specified parent. | 172 /// |
172 * | 173 /// An example valid parent would be: |
173 * An example valid parent would be: | 174 /// - projects/my-project |
174 * - projects/my-project | 175 /// Value must have pattern "^projects/[^/]+$". |
175 * Value must have pattern "^projects/[^/]+$". | 176 /// |
176 * | 177 /// [pageSize] - Requested size of the next page of data. |
177 * [pageToken] - Token identifying which result to start with; returned by a | 178 /// |
178 * previous list | 179 /// [pageToken] - Token identifying which result to start with; returned by a |
179 * call. | 180 /// previous list |
180 * | 181 /// call. |
181 * [pageSize] - Requested size of the next page of data. | 182 /// |
182 * | 183 /// Completes with a [ListEnabledServicesResponse]. |
183 * Completes with a [ListEnabledServicesResponse]. | 184 /// |
184 * | 185 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
185 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 186 /// an error. |
186 * error. | 187 /// |
187 * | 188 /// If the used [http_1.Client] completes with an error when making a REST |
188 * If the used [http_1.Client] completes with an error when making a REST | 189 /// call, this method will complete with the same error. |
189 * call, this method will complete with the same error. | 190 async.Future<ListEnabledServicesResponse> list(core.String parent, |
190 */ | 191 {core.int pageSize, core.String pageToken}) { |
191 async.Future<ListEnabledServicesResponse> list(core.String parent, {core.Strin
g pageToken, core.int pageSize}) { | |
192 var _url = null; | 192 var _url = null; |
193 var _queryParams = new core.Map(); | 193 var _queryParams = new core.Map(); |
194 var _uploadMedia = null; | 194 var _uploadMedia = null; |
195 var _uploadOptions = null; | 195 var _uploadOptions = null; |
196 var _downloadOptions = commons.DownloadOptions.Metadata; | 196 var _downloadOptions = commons.DownloadOptions.Metadata; |
197 var _body = null; | 197 var _body = null; |
198 | 198 |
199 if (parent == null) { | 199 if (parent == null) { |
200 throw new core.ArgumentError("Parameter parent is required."); | 200 throw new core.ArgumentError("Parameter parent is required."); |
201 } | 201 } |
| 202 if (pageSize != null) { |
| 203 _queryParams["pageSize"] = ["${pageSize}"]; |
| 204 } |
202 if (pageToken != null) { | 205 if (pageToken != null) { |
203 _queryParams["pageToken"] = [pageToken]; | 206 _queryParams["pageToken"] = [pageToken]; |
204 } | 207 } |
205 if (pageSize != null) { | |
206 _queryParams["pageSize"] = ["${pageSize}"]; | |
207 } | |
208 | 208 |
209 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/services
'; | 209 _url = |
| 210 'v1/' + commons.Escaper.ecapeVariableReserved('$parent') + '/services'; |
210 | 211 |
211 var _response = _requester.request(_url, | 212 var _response = _requester.request(_url, "GET", |
212 "GET", | 213 body: _body, |
213 body: _body, | 214 queryParams: _queryParams, |
214 queryParams: _queryParams, | 215 uploadOptions: _uploadOptions, |
215 uploadOptions: _uploadOptions, | 216 uploadMedia: _uploadMedia, |
216 uploadMedia: _uploadMedia, | 217 downloadOptions: _downloadOptions); |
217 downloadOptions: _downloadOptions); | 218 return _response |
218 return _response.then((data) => new ListEnabledServicesResponse.fromJson(dat
a)); | 219 .then((data) => new ListEnabledServicesResponse.fromJson(data)); |
219 } | 220 } |
220 | |
221 } | 221 } |
222 | 222 |
223 | |
224 class ServicesResourceApi { | 223 class ServicesResourceApi { |
225 final commons.ApiRequester _requester; | 224 final commons.ApiRequester _requester; |
226 | 225 |
227 ServicesResourceApi(commons.ApiRequester client) : | 226 ServicesResourceApi(commons.ApiRequester client) : _requester = client; |
228 _requester = client; | |
229 | 227 |
230 /** | 228 /// Search available services. |
231 * Search available services. | 229 /// |
232 * | 230 /// When no filter is specified, returns all accessible services. For |
233 * When no filter is specified, returns all accessible services. For | 231 /// authenticated users, also returns all services the calling user has |
234 * authenticated users, also returns all services the calling user has | 232 /// "servicemanagement.services.bind" permission for. |
235 * "servicemanagement.services.bind" permission for. | 233 /// |
236 * | 234 /// Request parameters: |
237 * Request parameters: | 235 /// |
238 * | 236 /// [pageToken] - Token identifying which result to start with; returned by a |
239 * [pageToken] - Token identifying which result to start with; returned by a | 237 /// previous list |
240 * previous list | 238 /// call. |
241 * call. | 239 /// |
242 * | 240 /// [pageSize] - Requested size of the next page of data. |
243 * [pageSize] - Requested size of the next page of data. | 241 /// |
244 * | 242 /// Completes with a [SearchServicesResponse]. |
245 * Completes with a [SearchServicesResponse]. | 243 /// |
246 * | 244 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
247 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 245 /// an error. |
248 * error. | 246 /// |
249 * | 247 /// If the used [http_1.Client] completes with an error when making a REST |
250 * If the used [http_1.Client] completes with an error when making a REST | 248 /// call, this method will complete with the same error. |
251 * call, this method will complete with the same error. | 249 async.Future<SearchServicesResponse> search( |
252 */ | 250 {core.String pageToken, core.int pageSize}) { |
253 async.Future<SearchServicesResponse> search({core.String pageToken, core.int p
ageSize}) { | |
254 var _url = null; | 251 var _url = null; |
255 var _queryParams = new core.Map(); | 252 var _queryParams = new core.Map(); |
256 var _uploadMedia = null; | 253 var _uploadMedia = null; |
257 var _uploadOptions = null; | 254 var _uploadOptions = null; |
258 var _downloadOptions = commons.DownloadOptions.Metadata; | 255 var _downloadOptions = commons.DownloadOptions.Metadata; |
259 var _body = null; | 256 var _body = null; |
260 | 257 |
261 if (pageToken != null) { | 258 if (pageToken != null) { |
262 _queryParams["pageToken"] = [pageToken]; | 259 _queryParams["pageToken"] = [pageToken]; |
263 } | 260 } |
264 if (pageSize != null) { | 261 if (pageSize != null) { |
265 _queryParams["pageSize"] = ["${pageSize}"]; | 262 _queryParams["pageSize"] = ["${pageSize}"]; |
266 } | 263 } |
267 | 264 |
268 _url = 'v1/services:search'; | 265 _url = 'v1/services:search'; |
269 | 266 |
270 var _response = _requester.request(_url, | 267 var _response = _requester.request(_url, "GET", |
271 "GET", | 268 body: _body, |
272 body: _body, | 269 queryParams: _queryParams, |
273 queryParams: _queryParams, | 270 uploadOptions: _uploadOptions, |
274 uploadOptions: _uploadOptions, | 271 uploadMedia: _uploadMedia, |
275 uploadMedia: _uploadMedia, | 272 downloadOptions: _downloadOptions); |
276 downloadOptions: _downloadOptions); | |
277 return _response.then((data) => new SearchServicesResponse.fromJson(data)); | 273 return _response.then((data) => new SearchServicesResponse.fromJson(data)); |
278 } | 274 } |
279 | |
280 } | 275 } |
281 | 276 |
| 277 /// Api is a light-weight descriptor for an API Interface. |
| 278 /// |
| 279 /// Interfaces are also described as "protocol buffer services" in some |
| 280 /// contexts, |
| 281 /// such as by the "service" keyword in a .proto file, but they are different |
| 282 /// from API Services, which represent a concrete implementation of an |
| 283 /// interface |
| 284 /// as opposed to simply a description of methods and bindings. They are also |
| 285 /// sometimes simply referred to as "APIs" in other contexts, such as the name |
| 286 /// of |
| 287 /// this message itself. See https://cloud.google.com/apis/design/glossary for |
| 288 /// detailed terminology. |
| 289 class Api { |
| 290 /// The methods of this interface, in unspecified order. |
| 291 core.List<Method> methods; |
282 | 292 |
| 293 /// Included interfaces. See Mixin. |
| 294 core.List<Mixin> mixins; |
283 | 295 |
284 /** | 296 /// The fully qualified name of this interface, including package name |
285 * Api is a light-weight descriptor for an API Interface. | 297 /// followed by the interface's simple name. |
286 * | |
287 * Interfaces are also described as "protocol buffer services" in some contexts, | |
288 * such as by the "service" keyword in a .proto file, but they are different | |
289 * from API Services, which represent a concrete implementation of an interface | |
290 * as opposed to simply a description of methods and bindings. They are also | |
291 * sometimes simply referred to as "APIs" in other contexts, such as the name of | |
292 * this message itself. See https://cloud.google.com/apis/design/glossary for | |
293 * detailed terminology. | |
294 */ | |
295 class Api { | |
296 /** The methods of this interface, in unspecified order. */ | |
297 core.List<Method> methods; | |
298 /** Included interfaces. See Mixin. */ | |
299 core.List<Mixin> mixins; | |
300 /** | |
301 * The fully qualified name of this interface, including package name | |
302 * followed by the interface's simple name. | |
303 */ | |
304 core.String name; | 298 core.String name; |
305 /** Any metadata attached to the interface. */ | 299 |
| 300 /// Any metadata attached to the interface. |
306 core.List<Option> options; | 301 core.List<Option> options; |
307 /** | 302 |
308 * Source context for the protocol buffer service represented by this | 303 /// Source context for the protocol buffer service represented by this |
309 * message. | 304 /// message. |
310 */ | |
311 SourceContext sourceContext; | 305 SourceContext sourceContext; |
312 /** | 306 |
313 * The source syntax of the service. | 307 /// The source syntax of the service. |
314 * Possible string values are: | 308 /// Possible string values are: |
315 * - "SYNTAX_PROTO2" : Syntax `proto2`. | 309 /// - "SYNTAX_PROTO2" : Syntax `proto2`. |
316 * - "SYNTAX_PROTO3" : Syntax `proto3`. | 310 /// - "SYNTAX_PROTO3" : Syntax `proto3`. |
317 */ | |
318 core.String syntax; | 311 core.String syntax; |
319 /** | 312 |
320 * A version string for this interface. If specified, must have the form | 313 /// A version string for this interface. If specified, must have the form |
321 * `major-version.minor-version`, as in `1.10`. If the minor version is | 314 /// `major-version.minor-version`, as in `1.10`. If the minor version is |
322 * omitted, it defaults to zero. If the entire version field is empty, the | 315 /// omitted, it defaults to zero. If the entire version field is empty, the |
323 * major version is derived from the package name, as outlined below. If the | 316 /// major version is derived from the package name, as outlined below. If the |
324 * field is not empty, the version in the package name will be verified to be | 317 /// field is not empty, the version in the package name will be verified to |
325 * consistent with what is provided here. | 318 /// be |
326 * | 319 /// consistent with what is provided here. |
327 * The versioning schema uses [semantic | 320 /// |
328 * versioning](http://semver.org) where the major version number | 321 /// The versioning schema uses [semantic |
329 * indicates a breaking change and the minor version an additive, | 322 /// versioning](http://semver.org) where the major version number |
330 * non-breaking change. Both version numbers are signals to users | 323 /// indicates a breaking change and the minor version an additive, |
331 * what to expect from different versions, and should be carefully | 324 /// non-breaking change. Both version numbers are signals to users |
332 * chosen based on the product plan. | 325 /// what to expect from different versions, and should be carefully |
333 * | 326 /// chosen based on the product plan. |
334 * The major version is also reflected in the package name of the | 327 /// |
335 * interface, which must end in `v<major-version>`, as in | 328 /// The major version is also reflected in the package name of the |
336 * `google.feature.v1`. For major versions 0 and 1, the suffix can | 329 /// interface, which must end in `v<major-version>`, as in |
337 * be omitted. Zero major versions must only be used for | 330 /// `google.feature.v1`. For major versions 0 and 1, the suffix can |
338 * experimental, non-GA interfaces. | 331 /// be omitted. Zero major versions must only be used for |
339 */ | 332 /// experimental, non-GA interfaces. |
340 core.String version; | 333 core.String version; |
341 | 334 |
342 Api(); | 335 Api(); |
343 | 336 |
344 Api.fromJson(core.Map _json) { | 337 Api.fromJson(core.Map _json) { |
345 if (_json.containsKey("methods")) { | 338 if (_json.containsKey("methods")) { |
346 methods = _json["methods"].map((value) => new Method.fromJson(value)).toLi
st(); | 339 methods = |
| 340 _json["methods"].map((value) => new Method.fromJson(value)).toList(); |
347 } | 341 } |
348 if (_json.containsKey("mixins")) { | 342 if (_json.containsKey("mixins")) { |
349 mixins = _json["mixins"].map((value) => new Mixin.fromJson(value)).toList(
); | 343 mixins = |
| 344 _json["mixins"].map((value) => new Mixin.fromJson(value)).toList(); |
350 } | 345 } |
351 if (_json.containsKey("name")) { | 346 if (_json.containsKey("name")) { |
352 name = _json["name"]; | 347 name = _json["name"]; |
353 } | 348 } |
354 if (_json.containsKey("options")) { | 349 if (_json.containsKey("options")) { |
355 options = _json["options"].map((value) => new Option.fromJson(value)).toLi
st(); | 350 options = |
| 351 _json["options"].map((value) => new Option.fromJson(value)).toList(); |
356 } | 352 } |
357 if (_json.containsKey("sourceContext")) { | 353 if (_json.containsKey("sourceContext")) { |
358 sourceContext = new SourceContext.fromJson(_json["sourceContext"]); | 354 sourceContext = new SourceContext.fromJson(_json["sourceContext"]); |
359 } | 355 } |
360 if (_json.containsKey("syntax")) { | 356 if (_json.containsKey("syntax")) { |
361 syntax = _json["syntax"]; | 357 syntax = _json["syntax"]; |
362 } | 358 } |
363 if (_json.containsKey("version")) { | 359 if (_json.containsKey("version")) { |
364 version = _json["version"]; | 360 version = _json["version"]; |
365 } | 361 } |
366 } | 362 } |
367 | 363 |
368 core.Map<core.String, core.Object> toJson() { | 364 core.Map<core.String, core.Object> toJson() { |
369 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 365 final core.Map<core.String, core.Object> _json = |
| 366 new core.Map<core.String, core.Object>(); |
370 if (methods != null) { | 367 if (methods != null) { |
371 _json["methods"] = methods.map((value) => (value).toJson()).toList(); | 368 _json["methods"] = methods.map((value) => (value).toJson()).toList(); |
372 } | 369 } |
373 if (mixins != null) { | 370 if (mixins != null) { |
374 _json["mixins"] = mixins.map((value) => (value).toJson()).toList(); | 371 _json["mixins"] = mixins.map((value) => (value).toJson()).toList(); |
375 } | 372 } |
376 if (name != null) { | 373 if (name != null) { |
377 _json["name"] = name; | 374 _json["name"] = name; |
378 } | 375 } |
379 if (options != null) { | 376 if (options != null) { |
380 _json["options"] = options.map((value) => (value).toJson()).toList(); | 377 _json["options"] = options.map((value) => (value).toJson()).toList(); |
381 } | 378 } |
382 if (sourceContext != null) { | 379 if (sourceContext != null) { |
383 _json["sourceContext"] = (sourceContext).toJson(); | 380 _json["sourceContext"] = (sourceContext).toJson(); |
384 } | 381 } |
385 if (syntax != null) { | 382 if (syntax != null) { |
386 _json["syntax"] = syntax; | 383 _json["syntax"] = syntax; |
387 } | 384 } |
388 if (version != null) { | 385 if (version != null) { |
389 _json["version"] = version; | 386 _json["version"] = version; |
390 } | 387 } |
391 return _json; | 388 return _json; |
392 } | 389 } |
393 } | 390 } |
394 | 391 |
395 /** | 392 /// Configuration for an anthentication provider, including support for |
396 * Configuration for an anthentication provider, including support for | 393 /// [JSON Web Token |
397 * [JSON Web Token | 394 /// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). |
398 * (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). | |
399 */ | |
400 class AuthProvider { | 395 class AuthProvider { |
401 /** | 396 /// The list of JWT |
402 * The list of JWT | 397 /// [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32
#section-4.1.3). |
403 * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#
section-4.1.3). | 398 /// that are allowed to access. A JWT containing any of these audiences will |
404 * that are allowed to access. A JWT containing any of these audiences will | 399 /// be accepted. When this setting is absent, only JWTs with audience |
405 * be accepted. When this setting is absent, only JWTs with audience | 400 /// "https://Service_name/API_name" |
406 * "https://Service_name/API_name" | 401 /// will be accepted. For example, if no audiences are in the setting, |
407 * will be accepted. For example, if no audiences are in the setting, | 402 /// LibraryService API will only accept JWTs with the following audience |
408 * LibraryService API will only accept JWTs with the following audience | 403 /// "https://library-example.googleapis.com/google.example.library.v1.LibraryS
ervice". |
409 * "https://library-example.googleapis.com/google.example.library.v1.LibrarySe
rvice". | 404 /// |
410 * | 405 /// Example: |
411 * Example: | 406 /// |
412 * | 407 /// audiences: bookstore_android.apps.googleusercontent.com, |
413 * audiences: bookstore_android.apps.googleusercontent.com, | 408 /// bookstore_web.apps.googleusercontent.com |
414 * bookstore_web.apps.googleusercontent.com | |
415 */ | |
416 core.String audiences; | 409 core.String audiences; |
417 /** | 410 |
418 * Redirect URL if JWT token is required but no present or is expired. | 411 /// Redirect URL if JWT token is required but no present or is expired. |
419 * Implement authorizationUrl of securityDefinitions in OpenAPI spec. | 412 /// Implement authorizationUrl of securityDefinitions in OpenAPI spec. |
420 */ | |
421 core.String authorizationUrl; | 413 core.String authorizationUrl; |
422 /** | 414 |
423 * The unique identifier of the auth provider. It will be referred to by | 415 /// The unique identifier of the auth provider. It will be referred to by |
424 * `AuthRequirement.provider_id`. | 416 /// `AuthRequirement.provider_id`. |
425 * | 417 /// |
426 * Example: "bookstore_auth". | 418 /// Example: "bookstore_auth". |
427 */ | |
428 core.String id; | 419 core.String id; |
429 /** | 420 |
430 * Identifies the principal that issued the JWT. See | 421 /// Identifies the principal that issued the JWT. See |
431 * https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.
1 | 422 /// https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1
.1 |
432 * Usually a URL or an email address. | 423 /// Usually a URL or an email address. |
433 * | 424 /// |
434 * Example: https://securetoken.google.com | 425 /// Example: https://securetoken.google.com |
435 * Example: 1234567-compute@developer.gserviceaccount.com | 426 /// Example: 1234567-compute@developer.gserviceaccount.com |
436 */ | |
437 core.String issuer; | 427 core.String issuer; |
438 /** | 428 |
439 * URL of the provider's public key set to validate signature of the JWT. See | 429 /// URL of the provider's public key set to validate signature of the JWT. |
440 * [OpenID | 430 /// See |
441 * Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#Provi
derMetadata). | 431 /// [OpenID |
442 * Optional if the key set document: | 432 /// Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#Prov
iderMetadata). |
443 * - can be retrieved from | 433 /// Optional if the key set document: |
444 * [OpenID | 434 /// - can be retrieved from |
445 * Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html | 435 /// [OpenID |
446 * of the issuer. | 436 /// Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html |
447 * - can be inferred from the email domain of the issuer (e.g. a Google | 437 /// of the issuer. |
448 * service account). | 438 /// - can be inferred from the email domain of the issuer (e.g. a Google |
449 * | 439 /// service account). |
450 * Example: https://www.googleapis.com/oauth2/v1/certs | 440 /// |
451 */ | 441 /// Example: https://www.googleapis.com/oauth2/v1/certs |
452 core.String jwksUri; | 442 core.String jwksUri; |
453 | 443 |
454 AuthProvider(); | 444 AuthProvider(); |
455 | 445 |
456 AuthProvider.fromJson(core.Map _json) { | 446 AuthProvider.fromJson(core.Map _json) { |
457 if (_json.containsKey("audiences")) { | 447 if (_json.containsKey("audiences")) { |
458 audiences = _json["audiences"]; | 448 audiences = _json["audiences"]; |
459 } | 449 } |
460 if (_json.containsKey("authorizationUrl")) { | 450 if (_json.containsKey("authorizationUrl")) { |
461 authorizationUrl = _json["authorizationUrl"]; | 451 authorizationUrl = _json["authorizationUrl"]; |
462 } | 452 } |
463 if (_json.containsKey("id")) { | 453 if (_json.containsKey("id")) { |
464 id = _json["id"]; | 454 id = _json["id"]; |
465 } | 455 } |
466 if (_json.containsKey("issuer")) { | 456 if (_json.containsKey("issuer")) { |
467 issuer = _json["issuer"]; | 457 issuer = _json["issuer"]; |
468 } | 458 } |
469 if (_json.containsKey("jwksUri")) { | 459 if (_json.containsKey("jwksUri")) { |
470 jwksUri = _json["jwksUri"]; | 460 jwksUri = _json["jwksUri"]; |
471 } | 461 } |
472 } | 462 } |
473 | 463 |
474 core.Map<core.String, core.Object> toJson() { | 464 core.Map<core.String, core.Object> toJson() { |
475 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 465 final core.Map<core.String, core.Object> _json = |
| 466 new core.Map<core.String, core.Object>(); |
476 if (audiences != null) { | 467 if (audiences != null) { |
477 _json["audiences"] = audiences; | 468 _json["audiences"] = audiences; |
478 } | 469 } |
479 if (authorizationUrl != null) { | 470 if (authorizationUrl != null) { |
480 _json["authorizationUrl"] = authorizationUrl; | 471 _json["authorizationUrl"] = authorizationUrl; |
481 } | 472 } |
482 if (id != null) { | 473 if (id != null) { |
483 _json["id"] = id; | 474 _json["id"] = id; |
484 } | 475 } |
485 if (issuer != null) { | 476 if (issuer != null) { |
486 _json["issuer"] = issuer; | 477 _json["issuer"] = issuer; |
487 } | 478 } |
488 if (jwksUri != null) { | 479 if (jwksUri != null) { |
489 _json["jwksUri"] = jwksUri; | 480 _json["jwksUri"] = jwksUri; |
490 } | 481 } |
491 return _json; | 482 return _json; |
492 } | 483 } |
493 } | 484 } |
494 | 485 |
495 /** | 486 /// User-defined authentication requirements, including support for |
496 * User-defined authentication requirements, including support for | 487 /// [JSON Web Token |
497 * [JSON Web Token | 488 /// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). |
498 * (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). | |
499 */ | |
500 class AuthRequirement { | 489 class AuthRequirement { |
501 /** | 490 /// NOTE: This will be deprecated soon, once AuthProvider.audiences is |
502 * NOTE: This will be deprecated soon, once AuthProvider.audiences is | 491 /// implemented and accepted in all the runtime components. |
503 * implemented and accepted in all the runtime components. | 492 /// |
504 * | 493 /// The list of JWT |
505 * The list of JWT | 494 /// [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32
#section-4.1.3). |
506 * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#
section-4.1.3). | 495 /// that are allowed to access. A JWT containing any of these audiences will |
507 * that are allowed to access. A JWT containing any of these audiences will | 496 /// be accepted. When this setting is absent, only JWTs with audience |
508 * be accepted. When this setting is absent, only JWTs with audience | 497 /// "https://Service_name/API_name" |
509 * "https://Service_name/API_name" | 498 /// will be accepted. For example, if no audiences are in the setting, |
510 * will be accepted. For example, if no audiences are in the setting, | 499 /// LibraryService API will only accept JWTs with the following audience |
511 * LibraryService API will only accept JWTs with the following audience | 500 /// "https://library-example.googleapis.com/google.example.library.v1.LibraryS
ervice". |
512 * "https://library-example.googleapis.com/google.example.library.v1.LibrarySe
rvice". | 501 /// |
513 * | 502 /// Example: |
514 * Example: | 503 /// |
515 * | 504 /// audiences: bookstore_android.apps.googleusercontent.com, |
516 * audiences: bookstore_android.apps.googleusercontent.com, | 505 /// bookstore_web.apps.googleusercontent.com |
517 * bookstore_web.apps.googleusercontent.com | |
518 */ | |
519 core.String audiences; | 506 core.String audiences; |
520 /** | 507 |
521 * id from authentication provider. | 508 /// id from authentication provider. |
522 * | 509 /// |
523 * Example: | 510 /// Example: |
524 * | 511 /// |
525 * provider_id: bookstore_auth | 512 /// provider_id: bookstore_auth |
526 */ | |
527 core.String providerId; | 513 core.String providerId; |
528 | 514 |
529 AuthRequirement(); | 515 AuthRequirement(); |
530 | 516 |
531 AuthRequirement.fromJson(core.Map _json) { | 517 AuthRequirement.fromJson(core.Map _json) { |
532 if (_json.containsKey("audiences")) { | 518 if (_json.containsKey("audiences")) { |
533 audiences = _json["audiences"]; | 519 audiences = _json["audiences"]; |
534 } | 520 } |
535 if (_json.containsKey("providerId")) { | 521 if (_json.containsKey("providerId")) { |
536 providerId = _json["providerId"]; | 522 providerId = _json["providerId"]; |
537 } | 523 } |
538 } | 524 } |
539 | 525 |
540 core.Map<core.String, core.Object> toJson() { | 526 core.Map<core.String, core.Object> toJson() { |
541 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 527 final core.Map<core.String, core.Object> _json = |
| 528 new core.Map<core.String, core.Object>(); |
542 if (audiences != null) { | 529 if (audiences != null) { |
543 _json["audiences"] = audiences; | 530 _json["audiences"] = audiences; |
544 } | 531 } |
545 if (providerId != null) { | 532 if (providerId != null) { |
546 _json["providerId"] = providerId; | 533 _json["providerId"] = providerId; |
547 } | 534 } |
548 return _json; | 535 return _json; |
549 } | 536 } |
550 } | 537 } |
551 | 538 |
552 /** | 539 /// `Authentication` defines the authentication configuration for an API. |
553 * `Authentication` defines the authentication configuration for an API. | 540 /// |
554 * | 541 /// Example for an API targeted for external use: |
555 * Example for an API targeted for external use: | 542 /// |
556 * | 543 /// name: calendar.googleapis.com |
557 * name: calendar.googleapis.com | 544 /// authentication: |
558 * authentication: | 545 /// providers: |
559 * providers: | 546 /// - id: google_calendar_auth |
560 * - id: google_calendar_auth | 547 /// jwks_uri: https://www.googleapis.com/oauth2/v1/certs |
561 * jwks_uri: https://www.googleapis.com/oauth2/v1/certs | 548 /// issuer: https://securetoken.google.com |
562 * issuer: https://securetoken.google.com | 549 /// rules: |
563 * rules: | 550 /// - selector: "*" |
564 * - selector: "*" | 551 /// requirements: |
565 * requirements: | 552 /// provider_id: google_calendar_auth |
566 * provider_id: google_calendar_auth | |
567 */ | |
568 class Authentication { | 553 class Authentication { |
569 /** Defines a set of authentication providers that a service supports. */ | 554 /// Defines a set of authentication providers that a service supports. |
570 core.List<AuthProvider> providers; | 555 core.List<AuthProvider> providers; |
571 /** | 556 |
572 * A list of authentication rules that apply to individual API methods. | 557 /// A list of authentication rules that apply to individual API methods. |
573 * | 558 /// |
574 * **NOTE:** All service configuration rules follow "last one wins" order. | 559 /// **NOTE:** All service configuration rules follow "last one wins" order. |
575 */ | |
576 core.List<AuthenticationRule> rules; | 560 core.List<AuthenticationRule> rules; |
577 | 561 |
578 Authentication(); | 562 Authentication(); |
579 | 563 |
580 Authentication.fromJson(core.Map _json) { | 564 Authentication.fromJson(core.Map _json) { |
581 if (_json.containsKey("providers")) { | 565 if (_json.containsKey("providers")) { |
582 providers = _json["providers"].map((value) => new AuthProvider.fromJson(va
lue)).toList(); | 566 providers = _json["providers"] |
| 567 .map((value) => new AuthProvider.fromJson(value)) |
| 568 .toList(); |
583 } | 569 } |
584 if (_json.containsKey("rules")) { | 570 if (_json.containsKey("rules")) { |
585 rules = _json["rules"].map((value) => new AuthenticationRule.fromJson(valu
e)).toList(); | 571 rules = _json["rules"] |
| 572 .map((value) => new AuthenticationRule.fromJson(value)) |
| 573 .toList(); |
586 } | 574 } |
587 } | 575 } |
588 | 576 |
589 core.Map<core.String, core.Object> toJson() { | 577 core.Map<core.String, core.Object> toJson() { |
590 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 578 final core.Map<core.String, core.Object> _json = |
| 579 new core.Map<core.String, core.Object>(); |
591 if (providers != null) { | 580 if (providers != null) { |
592 _json["providers"] = providers.map((value) => (value).toJson()).toList(); | 581 _json["providers"] = providers.map((value) => (value).toJson()).toList(); |
593 } | 582 } |
594 if (rules != null) { | 583 if (rules != null) { |
595 _json["rules"] = rules.map((value) => (value).toJson()).toList(); | 584 _json["rules"] = rules.map((value) => (value).toJson()).toList(); |
596 } | 585 } |
597 return _json; | 586 return _json; |
598 } | 587 } |
599 } | 588 } |
600 | 589 |
601 /** | 590 /// Authentication rules for the service. |
602 * Authentication rules for the service. | 591 /// |
603 * | 592 /// By default, if a method has any authentication requirements, every request |
604 * By default, if a method has any authentication requirements, every request | 593 /// must include a valid credential matching one of the requirements. |
605 * must include a valid credential matching one of the requirements. | 594 /// It's an error to include more than one kind of credential in a single |
606 * It's an error to include more than one kind of credential in a single | 595 /// request. |
607 * request. | 596 /// |
608 * | 597 /// If a method doesn't have any auth requirements, request credentials will be |
609 * If a method doesn't have any auth requirements, request credentials will be | 598 /// ignored. |
610 * ignored. | |
611 */ | |
612 class AuthenticationRule { | 599 class AuthenticationRule { |
613 /** | 600 /// Whether to allow requests without a credential. The credential can be |
614 * Whether to allow requests without a credential. The credential can be | 601 /// an OAuth token, Google cookies (first-party auth) or EndUserCreds. |
615 * an OAuth token, Google cookies (first-party auth) or EndUserCreds. | 602 /// |
616 * | 603 /// For requests without credentials, if the service control environment is |
617 * For requests without credentials, if the service control environment is | 604 /// specified, each incoming request **must** be associated with a service |
618 * specified, each incoming request **must** be associated with a service | 605 /// consumer. This can be done by passing an API key that belongs to a |
619 * consumer. This can be done by passing an API key that belongs to a consumer | 606 /// consumer |
620 * project. | 607 /// project. |
621 */ | |
622 core.bool allowWithoutCredential; | 608 core.bool allowWithoutCredential; |
623 /** Configuration for custom authentication. */ | 609 |
| 610 /// Configuration for custom authentication. |
624 CustomAuthRequirements customAuth; | 611 CustomAuthRequirements customAuth; |
625 /** The requirements for OAuth credentials. */ | 612 |
| 613 /// The requirements for OAuth credentials. |
626 OAuthRequirements oauth; | 614 OAuthRequirements oauth; |
627 /** Requirements for additional authentication providers. */ | 615 |
| 616 /// Requirements for additional authentication providers. |
628 core.List<AuthRequirement> requirements; | 617 core.List<AuthRequirement> requirements; |
629 /** | 618 |
630 * Selects the methods to which this rule applies. | 619 /// Selects the methods to which this rule applies. |
631 * | 620 /// |
632 * Refer to selector for syntax details. | 621 /// Refer to selector for syntax details. |
633 */ | |
634 core.String selector; | 622 core.String selector; |
635 | 623 |
636 AuthenticationRule(); | 624 AuthenticationRule(); |
637 | 625 |
638 AuthenticationRule.fromJson(core.Map _json) { | 626 AuthenticationRule.fromJson(core.Map _json) { |
639 if (_json.containsKey("allowWithoutCredential")) { | 627 if (_json.containsKey("allowWithoutCredential")) { |
640 allowWithoutCredential = _json["allowWithoutCredential"]; | 628 allowWithoutCredential = _json["allowWithoutCredential"]; |
641 } | 629 } |
642 if (_json.containsKey("customAuth")) { | 630 if (_json.containsKey("customAuth")) { |
643 customAuth = new CustomAuthRequirements.fromJson(_json["customAuth"]); | 631 customAuth = new CustomAuthRequirements.fromJson(_json["customAuth"]); |
644 } | 632 } |
645 if (_json.containsKey("oauth")) { | 633 if (_json.containsKey("oauth")) { |
646 oauth = new OAuthRequirements.fromJson(_json["oauth"]); | 634 oauth = new OAuthRequirements.fromJson(_json["oauth"]); |
647 } | 635 } |
648 if (_json.containsKey("requirements")) { | 636 if (_json.containsKey("requirements")) { |
649 requirements = _json["requirements"].map((value) => new AuthRequirement.fr
omJson(value)).toList(); | 637 requirements = _json["requirements"] |
| 638 .map((value) => new AuthRequirement.fromJson(value)) |
| 639 .toList(); |
650 } | 640 } |
651 if (_json.containsKey("selector")) { | 641 if (_json.containsKey("selector")) { |
652 selector = _json["selector"]; | 642 selector = _json["selector"]; |
653 } | 643 } |
654 } | 644 } |
655 | 645 |
656 core.Map<core.String, core.Object> toJson() { | 646 core.Map<core.String, core.Object> toJson() { |
657 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 647 final core.Map<core.String, core.Object> _json = |
| 648 new core.Map<core.String, core.Object>(); |
658 if (allowWithoutCredential != null) { | 649 if (allowWithoutCredential != null) { |
659 _json["allowWithoutCredential"] = allowWithoutCredential; | 650 _json["allowWithoutCredential"] = allowWithoutCredential; |
660 } | 651 } |
661 if (customAuth != null) { | 652 if (customAuth != null) { |
662 _json["customAuth"] = (customAuth).toJson(); | 653 _json["customAuth"] = (customAuth).toJson(); |
663 } | 654 } |
664 if (oauth != null) { | 655 if (oauth != null) { |
665 _json["oauth"] = (oauth).toJson(); | 656 _json["oauth"] = (oauth).toJson(); |
666 } | 657 } |
667 if (requirements != null) { | 658 if (requirements != null) { |
668 _json["requirements"] = requirements.map((value) => (value).toJson()).toLi
st(); | 659 _json["requirements"] = |
| 660 requirements.map((value) => (value).toJson()).toList(); |
669 } | 661 } |
670 if (selector != null) { | 662 if (selector != null) { |
671 _json["selector"] = selector; | 663 _json["selector"] = selector; |
672 } | 664 } |
673 return _json; | 665 return _json; |
674 } | 666 } |
675 } | 667 } |
676 | 668 |
677 /** | 669 /// Configuration of authorization. |
678 * Configuration of authorization. | 670 /// |
679 * | 671 /// This section determines the authorization provider, if unspecified, then no |
680 * This section determines the authorization provider, if unspecified, then no | 672 /// authorization check will be done. |
681 * authorization check will be done. | 673 /// |
682 * | 674 /// Example: |
683 * Example: | 675 /// |
684 * | 676 /// experimental: |
685 * experimental: | 677 /// authorization: |
686 * authorization: | 678 /// provider: firebaserules.googleapis.com |
687 * provider: firebaserules.googleapis.com | |
688 */ | |
689 class AuthorizationConfig { | 679 class AuthorizationConfig { |
690 /** | 680 /// The name of the authorization provider, such as |
691 * The name of the authorization provider, such as | 681 /// firebaserules.googleapis.com. |
692 * firebaserules.googleapis.com. | |
693 */ | |
694 core.String provider; | 682 core.String provider; |
695 | 683 |
696 AuthorizationConfig(); | 684 AuthorizationConfig(); |
697 | 685 |
698 AuthorizationConfig.fromJson(core.Map _json) { | 686 AuthorizationConfig.fromJson(core.Map _json) { |
699 if (_json.containsKey("provider")) { | 687 if (_json.containsKey("provider")) { |
700 provider = _json["provider"]; | 688 provider = _json["provider"]; |
701 } | 689 } |
702 } | 690 } |
703 | 691 |
704 core.Map<core.String, core.Object> toJson() { | 692 core.Map<core.String, core.Object> toJson() { |
705 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 693 final core.Map<core.String, core.Object> _json = |
| 694 new core.Map<core.String, core.Object>(); |
706 if (provider != null) { | 695 if (provider != null) { |
707 _json["provider"] = provider; | 696 _json["provider"] = provider; |
708 } | 697 } |
709 return _json; | 698 return _json; |
710 } | 699 } |
711 } | 700 } |
712 | 701 |
713 /** | 702 /// Authorization rule for API services. |
714 * Authorization rule for API services. | 703 /// |
715 * | 704 /// It specifies the permission(s) required for an API element for the overall |
716 * It specifies the permission(s) required for an API element for the overall | 705 /// API request to succeed. It is typically used to mark request message fields |
717 * API request to succeed. It is typically used to mark request message fields | 706 /// that contain the name of the resource and indicates the permissions that |
718 * that contain the name of the resource and indicates the permissions that | 707 /// will be checked on that resource. |
719 * will be checked on that resource. | 708 /// |
720 * | 709 /// For example: |
721 * For example: | 710 /// |
722 * | 711 /// package google.storage.v1; |
723 * package google.storage.v1; | 712 /// |
724 * | 713 /// message CopyObjectRequest { |
725 * message CopyObjectRequest { | 714 /// string source = 1 [ |
726 * string source = 1 [ | 715 /// (google.api.authz).permissions = "storage.objects.get"]; |
727 * (google.api.authz).permissions = "storage.objects.get"]; | 716 /// |
728 * | 717 /// string destination = 2 [ |
729 * string destination = 2 [ | 718 /// (google.api.authz).permissions = |
730 * (google.api.authz).permissions = | 719 /// "storage.objects.create,storage.objects.update"]; |
731 * "storage.objects.create,storage.objects.update"]; | 720 /// } |
732 * } | |
733 */ | |
734 class AuthorizationRule { | 721 class AuthorizationRule { |
735 /** | 722 /// The required permissions. The acceptable values vary depend on the |
736 * The required permissions. The acceptable values vary depend on the | 723 /// authorization system used. For Google APIs, it should be a |
737 * authorization system used. For Google APIs, it should be a comma-separated | 724 /// comma-separated |
738 * Google IAM permission values. When multiple permissions are listed, the | 725 /// Google IAM permission values. When multiple permissions are listed, the |
739 * semantics is not defined by the system. Additional documentation must | 726 /// semantics is not defined by the system. Additional documentation must |
740 * be provided manually. | 727 /// be provided manually. |
741 */ | |
742 core.String permissions; | 728 core.String permissions; |
743 /** | 729 |
744 * Selects the API elements to which this rule applies. | 730 /// Selects the API elements to which this rule applies. |
745 * | 731 /// |
746 * Refer to selector for syntax details. | 732 /// Refer to selector for syntax details. |
747 */ | |
748 core.String selector; | 733 core.String selector; |
749 | 734 |
750 AuthorizationRule(); | 735 AuthorizationRule(); |
751 | 736 |
752 AuthorizationRule.fromJson(core.Map _json) { | 737 AuthorizationRule.fromJson(core.Map _json) { |
753 if (_json.containsKey("permissions")) { | 738 if (_json.containsKey("permissions")) { |
754 permissions = _json["permissions"]; | 739 permissions = _json["permissions"]; |
755 } | 740 } |
756 if (_json.containsKey("selector")) { | 741 if (_json.containsKey("selector")) { |
757 selector = _json["selector"]; | 742 selector = _json["selector"]; |
758 } | 743 } |
759 } | 744 } |
760 | 745 |
761 core.Map<core.String, core.Object> toJson() { | 746 core.Map<core.String, core.Object> toJson() { |
762 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 747 final core.Map<core.String, core.Object> _json = |
| 748 new core.Map<core.String, core.Object>(); |
763 if (permissions != null) { | 749 if (permissions != null) { |
764 _json["permissions"] = permissions; | 750 _json["permissions"] = permissions; |
765 } | 751 } |
766 if (selector != null) { | 752 if (selector != null) { |
767 _json["selector"] = selector; | 753 _json["selector"] = selector; |
768 } | 754 } |
769 return _json; | 755 return _json; |
770 } | 756 } |
771 } | 757 } |
772 | 758 |
773 /** `Backend` defines the backend configuration for a service. */ | 759 /// `Backend` defines the backend configuration for a service. |
774 class Backend { | 760 class Backend { |
775 /** | 761 /// A list of API backend rules that apply to individual API methods. |
776 * A list of API backend rules that apply to individual API methods. | 762 /// |
777 * | 763 /// **NOTE:** All service configuration rules follow "last one wins" order. |
778 * **NOTE:** All service configuration rules follow "last one wins" order. | |
779 */ | |
780 core.List<BackendRule> rules; | 764 core.List<BackendRule> rules; |
781 | 765 |
782 Backend(); | 766 Backend(); |
783 | 767 |
784 Backend.fromJson(core.Map _json) { | 768 Backend.fromJson(core.Map _json) { |
785 if (_json.containsKey("rules")) { | 769 if (_json.containsKey("rules")) { |
786 rules = _json["rules"].map((value) => new BackendRule.fromJson(value)).toL
ist(); | 770 rules = _json["rules"] |
| 771 .map((value) => new BackendRule.fromJson(value)) |
| 772 .toList(); |
787 } | 773 } |
788 } | 774 } |
789 | 775 |
790 core.Map<core.String, core.Object> toJson() { | 776 core.Map<core.String, core.Object> toJson() { |
791 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 777 final core.Map<core.String, core.Object> _json = |
| 778 new core.Map<core.String, core.Object>(); |
792 if (rules != null) { | 779 if (rules != null) { |
793 _json["rules"] = rules.map((value) => (value).toJson()).toList(); | 780 _json["rules"] = rules.map((value) => (value).toJson()).toList(); |
794 } | 781 } |
795 return _json; | 782 return _json; |
796 } | 783 } |
797 } | 784 } |
798 | 785 |
799 /** A backend rule provides configuration for an individual API element. */ | 786 /// A backend rule provides configuration for an individual API element. |
800 class BackendRule { | 787 class BackendRule { |
801 /** The address of the API backend. */ | 788 /// The address of the API backend. |
802 core.String address; | 789 core.String address; |
803 /** | 790 |
804 * The number of seconds to wait for a response from a request. The | 791 /// The number of seconds to wait for a response from a request. The default |
805 * default depends on the deployment context. | 792 /// deadline for gRPC and HTTP requests is 5 seconds. For Stubby requests, |
806 */ | 793 /// the default is no deadline. |
807 core.double deadline; | 794 core.double deadline; |
808 /** | 795 |
809 * Minimum deadline in seconds needed for this method. Calls having deadline | 796 /// Minimum deadline in seconds needed for this method. Calls having deadline |
810 * value lower than this will be rejected. | 797 /// value lower than this will be rejected. |
811 */ | |
812 core.double minDeadline; | 798 core.double minDeadline; |
813 /** | 799 |
814 * Selects the methods to which this rule applies. | 800 /// Selects the methods to which this rule applies. |
815 * | 801 /// |
816 * Refer to selector for syntax details. | 802 /// Refer to selector for syntax details. |
817 */ | |
818 core.String selector; | 803 core.String selector; |
819 | 804 |
820 BackendRule(); | 805 BackendRule(); |
821 | 806 |
822 BackendRule.fromJson(core.Map _json) { | 807 BackendRule.fromJson(core.Map _json) { |
823 if (_json.containsKey("address")) { | 808 if (_json.containsKey("address")) { |
824 address = _json["address"]; | 809 address = _json["address"]; |
825 } | 810 } |
826 if (_json.containsKey("deadline")) { | 811 if (_json.containsKey("deadline")) { |
827 deadline = _json["deadline"]; | 812 deadline = _json["deadline"]; |
828 } | 813 } |
829 if (_json.containsKey("minDeadline")) { | 814 if (_json.containsKey("minDeadline")) { |
830 minDeadline = _json["minDeadline"]; | 815 minDeadline = _json["minDeadline"]; |
831 } | 816 } |
832 if (_json.containsKey("selector")) { | 817 if (_json.containsKey("selector")) { |
833 selector = _json["selector"]; | 818 selector = _json["selector"]; |
834 } | 819 } |
835 } | 820 } |
836 | 821 |
837 core.Map<core.String, core.Object> toJson() { | 822 core.Map<core.String, core.Object> toJson() { |
838 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 823 final core.Map<core.String, core.Object> _json = |
| 824 new core.Map<core.String, core.Object>(); |
839 if (address != null) { | 825 if (address != null) { |
840 _json["address"] = address; | 826 _json["address"] = address; |
841 } | 827 } |
842 if (deadline != null) { | 828 if (deadline != null) { |
843 _json["deadline"] = deadline; | 829 _json["deadline"] = deadline; |
844 } | 830 } |
845 if (minDeadline != null) { | 831 if (minDeadline != null) { |
846 _json["minDeadline"] = minDeadline; | 832 _json["minDeadline"] = minDeadline; |
847 } | 833 } |
848 if (selector != null) { | 834 if (selector != null) { |
849 _json["selector"] = selector; | 835 _json["selector"] = selector; |
850 } | 836 } |
851 return _json; | 837 return _json; |
852 } | 838 } |
853 } | 839 } |
854 | 840 |
855 /** | 841 /// `Context` defines which contexts an API requests. |
856 * `Context` defines which contexts an API requests. | 842 /// |
857 * | 843 /// Example: |
858 * Example: | 844 /// |
859 * | 845 /// context: |
860 * context: | 846 /// rules: |
861 * rules: | 847 /// - selector: "*" |
862 * - selector: "*" | 848 /// requested: |
863 * requested: | 849 /// - google.rpc.context.ProjectContext |
864 * - google.rpc.context.ProjectContext | 850 /// - google.rpc.context.OriginContext |
865 * - google.rpc.context.OriginContext | 851 /// |
866 * | 852 /// The above specifies that all methods in the API request |
867 * The above specifies that all methods in the API request | 853 /// `google.rpc.context.ProjectContext` and |
868 * `google.rpc.context.ProjectContext` and | 854 /// `google.rpc.context.OriginContext`. |
869 * `google.rpc.context.OriginContext`. | 855 /// |
870 * | 856 /// Available context types are defined in package |
871 * Available context types are defined in package | 857 /// `google.rpc.context`. |
872 * `google.rpc.context`. | |
873 */ | |
874 class Context { | 858 class Context { |
875 /** | 859 /// A list of RPC context rules that apply to individual API methods. |
876 * A list of RPC context rules that apply to individual API methods. | 860 /// |
877 * | 861 /// **NOTE:** All service configuration rules follow "last one wins" order. |
878 * **NOTE:** All service configuration rules follow "last one wins" order. | |
879 */ | |
880 core.List<ContextRule> rules; | 862 core.List<ContextRule> rules; |
881 | 863 |
882 Context(); | 864 Context(); |
883 | 865 |
884 Context.fromJson(core.Map _json) { | 866 Context.fromJson(core.Map _json) { |
885 if (_json.containsKey("rules")) { | 867 if (_json.containsKey("rules")) { |
886 rules = _json["rules"].map((value) => new ContextRule.fromJson(value)).toL
ist(); | 868 rules = _json["rules"] |
| 869 .map((value) => new ContextRule.fromJson(value)) |
| 870 .toList(); |
887 } | 871 } |
888 } | 872 } |
889 | 873 |
890 core.Map<core.String, core.Object> toJson() { | 874 core.Map<core.String, core.Object> toJson() { |
891 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 875 final core.Map<core.String, core.Object> _json = |
| 876 new core.Map<core.String, core.Object>(); |
892 if (rules != null) { | 877 if (rules != null) { |
893 _json["rules"] = rules.map((value) => (value).toJson()).toList(); | 878 _json["rules"] = rules.map((value) => (value).toJson()).toList(); |
894 } | 879 } |
895 return _json; | 880 return _json; |
896 } | 881 } |
897 } | 882 } |
898 | 883 |
899 /** | 884 /// A context rule provides information about the context for an individual API |
900 * A context rule provides information about the context for an individual API | 885 /// element. |
901 * element. | |
902 */ | |
903 class ContextRule { | 886 class ContextRule { |
904 /** A list of full type names of provided contexts. */ | 887 /// A list of full type names of provided contexts. |
905 core.List<core.String> provided; | 888 core.List<core.String> provided; |
906 /** A list of full type names of requested contexts. */ | 889 |
| 890 /// A list of full type names of requested contexts. |
907 core.List<core.String> requested; | 891 core.List<core.String> requested; |
908 /** | 892 |
909 * Selects the methods to which this rule applies. | 893 /// Selects the methods to which this rule applies. |
910 * | 894 /// |
911 * Refer to selector for syntax details. | 895 /// Refer to selector for syntax details. |
912 */ | |
913 core.String selector; | 896 core.String selector; |
914 | 897 |
915 ContextRule(); | 898 ContextRule(); |
916 | 899 |
917 ContextRule.fromJson(core.Map _json) { | 900 ContextRule.fromJson(core.Map _json) { |
918 if (_json.containsKey("provided")) { | 901 if (_json.containsKey("provided")) { |
919 provided = _json["provided"]; | 902 provided = _json["provided"]; |
920 } | 903 } |
921 if (_json.containsKey("requested")) { | 904 if (_json.containsKey("requested")) { |
922 requested = _json["requested"]; | 905 requested = _json["requested"]; |
923 } | 906 } |
924 if (_json.containsKey("selector")) { | 907 if (_json.containsKey("selector")) { |
925 selector = _json["selector"]; | 908 selector = _json["selector"]; |
926 } | 909 } |
927 } | 910 } |
928 | 911 |
929 core.Map<core.String, core.Object> toJson() { | 912 core.Map<core.String, core.Object> toJson() { |
930 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 913 final core.Map<core.String, core.Object> _json = |
| 914 new core.Map<core.String, core.Object>(); |
931 if (provided != null) { | 915 if (provided != null) { |
932 _json["provided"] = provided; | 916 _json["provided"] = provided; |
933 } | 917 } |
934 if (requested != null) { | 918 if (requested != null) { |
935 _json["requested"] = requested; | 919 _json["requested"] = requested; |
936 } | 920 } |
937 if (selector != null) { | 921 if (selector != null) { |
938 _json["selector"] = selector; | 922 _json["selector"] = selector; |
939 } | 923 } |
940 return _json; | 924 return _json; |
941 } | 925 } |
942 } | 926 } |
943 | 927 |
944 /** | 928 /// Selects and configures the service controller used by the service. The |
945 * Selects and configures the service controller used by the service. The | 929 /// service controller handles features like abuse, quota, billing, logging, |
946 * service controller handles features like abuse, quota, billing, logging, | 930 /// monitoring, etc. |
947 * monitoring, etc. | |
948 */ | |
949 class Control { | 931 class Control { |
950 /** | 932 /// The service control environment to use. If empty, no control plane |
951 * The service control environment to use. If empty, no control plane | 933 /// feature (like quota and billing) will be enabled. |
952 * feature (like quota and billing) will be enabled. | |
953 */ | |
954 core.String environment; | 934 core.String environment; |
955 | 935 |
956 Control(); | 936 Control(); |
957 | 937 |
958 Control.fromJson(core.Map _json) { | 938 Control.fromJson(core.Map _json) { |
959 if (_json.containsKey("environment")) { | 939 if (_json.containsKey("environment")) { |
960 environment = _json["environment"]; | 940 environment = _json["environment"]; |
961 } | 941 } |
962 } | 942 } |
963 | 943 |
964 core.Map<core.String, core.Object> toJson() { | 944 core.Map<core.String, core.Object> toJson() { |
965 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 945 final core.Map<core.String, core.Object> _json = |
| 946 new core.Map<core.String, core.Object>(); |
966 if (environment != null) { | 947 if (environment != null) { |
967 _json["environment"] = environment; | 948 _json["environment"] = environment; |
968 } | 949 } |
969 return _json; | 950 return _json; |
970 } | 951 } |
971 } | 952 } |
972 | 953 |
973 /** Configuration for a custom authentication provider. */ | 954 /// Configuration for a custom authentication provider. |
974 class CustomAuthRequirements { | 955 class CustomAuthRequirements { |
975 /** | 956 /// A configuration string containing connection information for the |
976 * A configuration string containing connection information for the | 957 /// authentication provider, typically formatted as a SmartService string |
977 * authentication provider, typically formatted as a SmartService string | 958 /// (go/smartservice). |
978 * (go/smartservice). | |
979 */ | |
980 core.String provider; | 959 core.String provider; |
981 | 960 |
982 CustomAuthRequirements(); | 961 CustomAuthRequirements(); |
983 | 962 |
984 CustomAuthRequirements.fromJson(core.Map _json) { | 963 CustomAuthRequirements.fromJson(core.Map _json) { |
985 if (_json.containsKey("provider")) { | 964 if (_json.containsKey("provider")) { |
986 provider = _json["provider"]; | 965 provider = _json["provider"]; |
987 } | 966 } |
988 } | 967 } |
989 | 968 |
990 core.Map<core.String, core.Object> toJson() { | 969 core.Map<core.String, core.Object> toJson() { |
991 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 970 final core.Map<core.String, core.Object> _json = |
| 971 new core.Map<core.String, core.Object>(); |
992 if (provider != null) { | 972 if (provider != null) { |
993 _json["provider"] = provider; | 973 _json["provider"] = provider; |
994 } | 974 } |
995 return _json; | 975 return _json; |
996 } | 976 } |
997 } | 977 } |
998 | 978 |
999 /** | 979 /// Customize service error responses. For example, list any service |
1000 * Customize service error responses. For example, list any service | 980 /// specific protobuf types that can appear in error detail lists of |
1001 * specific protobuf types that can appear in error detail lists of | 981 /// error responses. |
1002 * error responses. | 982 /// |
1003 * | 983 /// Example: |
1004 * Example: | 984 /// |
1005 * | 985 /// custom_error: |
1006 * custom_error: | 986 /// types: |
1007 * types: | 987 /// - google.foo.v1.CustomError |
1008 * - google.foo.v1.CustomError | 988 /// - google.foo.v1.AnotherError |
1009 * - google.foo.v1.AnotherError | |
1010 */ | |
1011 class CustomError { | 989 class CustomError { |
1012 /** | 990 /// The list of custom error rules that apply to individual API messages. |
1013 * The list of custom error rules that apply to individual API messages. | 991 /// |
1014 * | 992 /// **NOTE:** All service configuration rules follow "last one wins" order. |
1015 * **NOTE:** All service configuration rules follow "last one wins" order. | |
1016 */ | |
1017 core.List<CustomErrorRule> rules; | 993 core.List<CustomErrorRule> rules; |
1018 /** | 994 |
1019 * The list of custom error detail types, e.g. 'google.foo.v1.CustomError'. | 995 /// The list of custom error detail types, e.g. 'google.foo.v1.CustomError'. |
1020 */ | |
1021 core.List<core.String> types; | 996 core.List<core.String> types; |
1022 | 997 |
1023 CustomError(); | 998 CustomError(); |
1024 | 999 |
1025 CustomError.fromJson(core.Map _json) { | 1000 CustomError.fromJson(core.Map _json) { |
1026 if (_json.containsKey("rules")) { | 1001 if (_json.containsKey("rules")) { |
1027 rules = _json["rules"].map((value) => new CustomErrorRule.fromJson(value))
.toList(); | 1002 rules = _json["rules"] |
| 1003 .map((value) => new CustomErrorRule.fromJson(value)) |
| 1004 .toList(); |
1028 } | 1005 } |
1029 if (_json.containsKey("types")) { | 1006 if (_json.containsKey("types")) { |
1030 types = _json["types"]; | 1007 types = _json["types"]; |
1031 } | 1008 } |
1032 } | 1009 } |
1033 | 1010 |
1034 core.Map<core.String, core.Object> toJson() { | 1011 core.Map<core.String, core.Object> toJson() { |
1035 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1012 final core.Map<core.String, core.Object> _json = |
| 1013 new core.Map<core.String, core.Object>(); |
1036 if (rules != null) { | 1014 if (rules != null) { |
1037 _json["rules"] = rules.map((value) => (value).toJson()).toList(); | 1015 _json["rules"] = rules.map((value) => (value).toJson()).toList(); |
1038 } | 1016 } |
1039 if (types != null) { | 1017 if (types != null) { |
1040 _json["types"] = types; | 1018 _json["types"] = types; |
1041 } | 1019 } |
1042 return _json; | 1020 return _json; |
1043 } | 1021 } |
1044 } | 1022 } |
1045 | 1023 |
1046 /** A custom error rule. */ | 1024 /// A custom error rule. |
1047 class CustomErrorRule { | 1025 class CustomErrorRule { |
1048 /** | 1026 /// Mark this message as possible payload in error response. Otherwise, |
1049 * Mark this message as possible payload in error response. Otherwise, | 1027 /// objects of this type will be filtered when they appear in error payload. |
1050 * objects of this type will be filtered when they appear in error payload. | |
1051 */ | |
1052 core.bool isErrorType; | 1028 core.bool isErrorType; |
1053 /** | 1029 |
1054 * Selects messages to which this rule applies. | 1030 /// Selects messages to which this rule applies. |
1055 * | 1031 /// |
1056 * Refer to selector for syntax details. | 1032 /// Refer to selector for syntax details. |
1057 */ | |
1058 core.String selector; | 1033 core.String selector; |
1059 | 1034 |
1060 CustomErrorRule(); | 1035 CustomErrorRule(); |
1061 | 1036 |
1062 CustomErrorRule.fromJson(core.Map _json) { | 1037 CustomErrorRule.fromJson(core.Map _json) { |
1063 if (_json.containsKey("isErrorType")) { | 1038 if (_json.containsKey("isErrorType")) { |
1064 isErrorType = _json["isErrorType"]; | 1039 isErrorType = _json["isErrorType"]; |
1065 } | 1040 } |
1066 if (_json.containsKey("selector")) { | 1041 if (_json.containsKey("selector")) { |
1067 selector = _json["selector"]; | 1042 selector = _json["selector"]; |
1068 } | 1043 } |
1069 } | 1044 } |
1070 | 1045 |
1071 core.Map<core.String, core.Object> toJson() { | 1046 core.Map<core.String, core.Object> toJson() { |
1072 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1047 final core.Map<core.String, core.Object> _json = |
| 1048 new core.Map<core.String, core.Object>(); |
1073 if (isErrorType != null) { | 1049 if (isErrorType != null) { |
1074 _json["isErrorType"] = isErrorType; | 1050 _json["isErrorType"] = isErrorType; |
1075 } | 1051 } |
1076 if (selector != null) { | 1052 if (selector != null) { |
1077 _json["selector"] = selector; | 1053 _json["selector"] = selector; |
1078 } | 1054 } |
1079 return _json; | 1055 return _json; |
1080 } | 1056 } |
1081 } | 1057 } |
1082 | 1058 |
1083 /** A custom pattern is used for defining custom HTTP verb. */ | 1059 /// A custom pattern is used for defining custom HTTP verb. |
1084 class CustomHttpPattern { | 1060 class CustomHttpPattern { |
1085 /** The name of this custom HTTP verb. */ | 1061 /// The name of this custom HTTP verb. |
1086 core.String kind; | 1062 core.String kind; |
1087 /** The path matched by this custom verb. */ | 1063 |
| 1064 /// The path matched by this custom verb. |
1088 core.String path; | 1065 core.String path; |
1089 | 1066 |
1090 CustomHttpPattern(); | 1067 CustomHttpPattern(); |
1091 | 1068 |
1092 CustomHttpPattern.fromJson(core.Map _json) { | 1069 CustomHttpPattern.fromJson(core.Map _json) { |
1093 if (_json.containsKey("kind")) { | 1070 if (_json.containsKey("kind")) { |
1094 kind = _json["kind"]; | 1071 kind = _json["kind"]; |
1095 } | 1072 } |
1096 if (_json.containsKey("path")) { | 1073 if (_json.containsKey("path")) { |
1097 path = _json["path"]; | 1074 path = _json["path"]; |
1098 } | 1075 } |
1099 } | 1076 } |
1100 | 1077 |
1101 core.Map<core.String, core.Object> toJson() { | 1078 core.Map<core.String, core.Object> toJson() { |
1102 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1079 final core.Map<core.String, core.Object> _json = |
| 1080 new core.Map<core.String, core.Object>(); |
1103 if (kind != null) { | 1081 if (kind != null) { |
1104 _json["kind"] = kind; | 1082 _json["kind"] = kind; |
1105 } | 1083 } |
1106 if (path != null) { | 1084 if (path != null) { |
1107 _json["path"] = path; | 1085 _json["path"] = path; |
1108 } | 1086 } |
1109 return _json; | 1087 return _json; |
1110 } | 1088 } |
1111 } | 1089 } |
1112 | 1090 |
1113 /** Request message for DisableService method. */ | 1091 /// Request message for DisableService method. |
1114 class DisableServiceRequest { | 1092 class DisableServiceRequest { |
1115 | |
1116 DisableServiceRequest(); | 1093 DisableServiceRequest(); |
1117 | 1094 |
1118 DisableServiceRequest.fromJson(core.Map _json) { | 1095 DisableServiceRequest.fromJson(core.Map _json) {} |
1119 } | |
1120 | 1096 |
1121 core.Map<core.String, core.Object> toJson() { | 1097 core.Map<core.String, core.Object> toJson() { |
1122 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1098 final core.Map<core.String, core.Object> _json = |
| 1099 new core.Map<core.String, core.Object>(); |
1123 return _json; | 1100 return _json; |
1124 } | 1101 } |
1125 } | 1102 } |
1126 | 1103 |
1127 /** | 1104 /// `Documentation` provides the information for describing a service. |
1128 * `Documentation` provides the information for describing a service. | 1105 /// |
1129 * | 1106 /// Example: |
1130 * Example: | 1107 /// <pre><code>documentation: |
1131 * <pre><code>documentation: | 1108 /// summary: > |
1132 * summary: > | 1109 /// The Google Calendar API gives access |
1133 * The Google Calendar API gives access | 1110 /// to most calendar features. |
1134 * to most calendar features. | 1111 /// pages: |
1135 * pages: | 1112 /// - name: Overview |
1136 * - name: Overview | 1113 /// content: (== include google/foo/overview.md ==) |
1137 * content: (== include google/foo/overview.md ==) | 1114 /// - name: Tutorial |
1138 * - name: Tutorial | 1115 /// content: (== include google/foo/tutorial.md ==) |
1139 * content: (== include google/foo/tutorial.md ==) | 1116 /// subpages; |
1140 * subpages; | 1117 /// - name: Java |
1141 * - name: Java | 1118 /// content: (== include google/foo/tutorial_java.md ==) |
1142 * content: (== include google/foo/tutorial_java.md ==) | 1119 /// rules: |
1143 * rules: | 1120 /// - selector: google.calendar.Calendar.Get |
1144 * - selector: google.calendar.Calendar.Get | 1121 /// description: > |
1145 * description: > | 1122 /// ... |
1146 * ... | 1123 /// - selector: google.calendar.Calendar.Put |
1147 * - selector: google.calendar.Calendar.Put | 1124 /// description: > |
1148 * description: > | 1125 /// ... |
1149 * ... | 1126 /// </code></pre> |
1150 * </code></pre> | 1127 /// Documentation is provided in markdown syntax. In addition to |
1151 * Documentation is provided in markdown syntax. In addition to | 1128 /// standard markdown features, definition lists, tables and fenced |
1152 * standard markdown features, definition lists, tables and fenced | 1129 /// code blocks are supported. Section headers can be provided and are |
1153 * code blocks are supported. Section headers can be provided and are | 1130 /// interpreted relative to the section nesting of the context where |
1154 * interpreted relative to the section nesting of the context where | 1131 /// a documentation fragment is embedded. |
1155 * a documentation fragment is embedded. | 1132 /// |
1156 * | 1133 /// Documentation from the IDL is merged with documentation defined |
1157 * Documentation from the IDL is merged with documentation defined | 1134 /// via the config at normalization time, where documentation provided |
1158 * via the config at normalization time, where documentation provided | 1135 /// by config rules overrides IDL provided. |
1159 * by config rules overrides IDL provided. | 1136 /// |
1160 * | 1137 /// A number of constructs specific to the API platform are supported |
1161 * A number of constructs specific to the API platform are supported | 1138 /// in documentation text. |
1162 * in documentation text. | 1139 /// |
1163 * | 1140 /// In order to reference a proto element, the following |
1164 * In order to reference a proto element, the following | 1141 /// notation can be used: |
1165 * notation can be used: | 1142 /// <pre><code>[fully.qualified.proto.name][]</code></pre> |
1166 * <pre><code>[fully.qualified.proto.name][]</code></pre> | 1143 /// To override the display text used for the link, this can be used: |
1167 * To override the display text used for the link, this can be used: | 1144 /// <pre><code>[display text][fully.qualified.proto.name]</code></pre> |
1168 * <pre><code>[display text][fully.qualified.proto.name]</code></pre> | 1145 /// Text can be excluded from doc using the following notation: |
1169 * Text can be excluded from doc using the following notation: | 1146 /// <pre><code>(-- internal comment --)</code></pre> |
1170 * <pre><code>(-- internal comment --)</code></pre> | 1147 /// Comments can be made conditional using a visibility label. The below |
1171 * Comments can be made conditional using a visibility label. The below | 1148 /// text will be only rendered if the `BETA` label is available: |
1172 * text will be only rendered if the `BETA` label is available: | 1149 /// <pre><code>(--BETA: comment for BETA users --)</code></pre> |
1173 * <pre><code>(--BETA: comment for BETA users --)</code></pre> | 1150 /// A few directives are available in documentation. Note that |
1174 * A few directives are available in documentation. Note that | 1151 /// directives must appear on a single line to be properly |
1175 * directives must appear on a single line to be properly | 1152 /// identified. The `include` directive includes a markdown file from |
1176 * identified. The `include` directive includes a markdown file from | 1153 /// an external source: |
1177 * an external source: | 1154 /// <pre><code>(== include path/to/file ==)</code></pre> |
1178 * <pre><code>(== include path/to/file ==)</code></pre> | 1155 /// The `resource_for` directive marks a message to be the resource of |
1179 * The `resource_for` directive marks a message to be the resource of | 1156 /// a collection in REST view. If it is not specified, tools attempt |
1180 * a collection in REST view. If it is not specified, tools attempt | 1157 /// to infer the resource from the operations in a collection: |
1181 * to infer the resource from the operations in a collection: | 1158 /// <pre><code>(== resource_for v1.shelves.books ==)</code></pre> |
1182 * <pre><code>(== resource_for v1.shelves.books ==)</code></pre> | 1159 /// The directive `suppress_warning` does not directly affect documentation |
1183 * The directive `suppress_warning` does not directly affect documentation | 1160 /// and is documented together with service config validation. |
1184 * and is documented together with service config validation. | |
1185 */ | |
1186 class Documentation { | 1161 class Documentation { |
1187 /** The URL to the root of documentation. */ | 1162 /// The URL to the root of documentation. |
1188 core.String documentationRootUrl; | 1163 core.String documentationRootUrl; |
1189 /** | 1164 |
1190 * Declares a single overview page. For example: | 1165 /// Declares a single overview page. For example: |
1191 * <pre><code>documentation: | 1166 /// <pre><code>documentation: |
1192 * summary: ... | 1167 /// summary: ... |
1193 * overview: (== include overview.md ==) | 1168 /// overview: (== include overview.md ==) |
1194 * </code></pre> | 1169 /// </code></pre> |
1195 * This is a shortcut for the following declaration (using pages style): | 1170 /// This is a shortcut for the following declaration (using pages style): |
1196 * <pre><code>documentation: | 1171 /// <pre><code>documentation: |
1197 * summary: ... | 1172 /// summary: ... |
1198 * pages: | 1173 /// pages: |
1199 * - name: Overview | 1174 /// - name: Overview |
1200 * content: (== include overview.md ==) | 1175 /// content: (== include overview.md ==) |
1201 * </code></pre> | 1176 /// </code></pre> |
1202 * Note: you cannot specify both `overview` field and `pages` field. | 1177 /// Note: you cannot specify both `overview` field and `pages` field. |
1203 */ | |
1204 core.String overview; | 1178 core.String overview; |
1205 /** The top level pages for the documentation set. */ | 1179 |
| 1180 /// The top level pages for the documentation set. |
1206 core.List<Page> pages; | 1181 core.List<Page> pages; |
1207 /** | 1182 |
1208 * A list of documentation rules that apply to individual API elements. | 1183 /// A list of documentation rules that apply to individual API elements. |
1209 * | 1184 /// |
1210 * **NOTE:** All service configuration rules follow "last one wins" order. | 1185 /// **NOTE:** All service configuration rules follow "last one wins" order. |
1211 */ | |
1212 core.List<DocumentationRule> rules; | 1186 core.List<DocumentationRule> rules; |
1213 /** | 1187 |
1214 * A short summary of what the service does. Can only be provided by | 1188 /// A short summary of what the service does. Can only be provided by |
1215 * plain text. | 1189 /// plain text. |
1216 */ | |
1217 core.String summary; | 1190 core.String summary; |
1218 | 1191 |
1219 Documentation(); | 1192 Documentation(); |
1220 | 1193 |
1221 Documentation.fromJson(core.Map _json) { | 1194 Documentation.fromJson(core.Map _json) { |
1222 if (_json.containsKey("documentationRootUrl")) { | 1195 if (_json.containsKey("documentationRootUrl")) { |
1223 documentationRootUrl = _json["documentationRootUrl"]; | 1196 documentationRootUrl = _json["documentationRootUrl"]; |
1224 } | 1197 } |
1225 if (_json.containsKey("overview")) { | 1198 if (_json.containsKey("overview")) { |
1226 overview = _json["overview"]; | 1199 overview = _json["overview"]; |
1227 } | 1200 } |
1228 if (_json.containsKey("pages")) { | 1201 if (_json.containsKey("pages")) { |
1229 pages = _json["pages"].map((value) => new Page.fromJson(value)).toList(); | 1202 pages = _json["pages"].map((value) => new Page.fromJson(value)).toList(); |
1230 } | 1203 } |
1231 if (_json.containsKey("rules")) { | 1204 if (_json.containsKey("rules")) { |
1232 rules = _json["rules"].map((value) => new DocumentationRule.fromJson(value
)).toList(); | 1205 rules = _json["rules"] |
| 1206 .map((value) => new DocumentationRule.fromJson(value)) |
| 1207 .toList(); |
1233 } | 1208 } |
1234 if (_json.containsKey("summary")) { | 1209 if (_json.containsKey("summary")) { |
1235 summary = _json["summary"]; | 1210 summary = _json["summary"]; |
1236 } | 1211 } |
1237 } | 1212 } |
1238 | 1213 |
1239 core.Map<core.String, core.Object> toJson() { | 1214 core.Map<core.String, core.Object> toJson() { |
1240 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1215 final core.Map<core.String, core.Object> _json = |
| 1216 new core.Map<core.String, core.Object>(); |
1241 if (documentationRootUrl != null) { | 1217 if (documentationRootUrl != null) { |
1242 _json["documentationRootUrl"] = documentationRootUrl; | 1218 _json["documentationRootUrl"] = documentationRootUrl; |
1243 } | 1219 } |
1244 if (overview != null) { | 1220 if (overview != null) { |
1245 _json["overview"] = overview; | 1221 _json["overview"] = overview; |
1246 } | 1222 } |
1247 if (pages != null) { | 1223 if (pages != null) { |
1248 _json["pages"] = pages.map((value) => (value).toJson()).toList(); | 1224 _json["pages"] = pages.map((value) => (value).toJson()).toList(); |
1249 } | 1225 } |
1250 if (rules != null) { | 1226 if (rules != null) { |
1251 _json["rules"] = rules.map((value) => (value).toJson()).toList(); | 1227 _json["rules"] = rules.map((value) => (value).toJson()).toList(); |
1252 } | 1228 } |
1253 if (summary != null) { | 1229 if (summary != null) { |
1254 _json["summary"] = summary; | 1230 _json["summary"] = summary; |
1255 } | 1231 } |
1256 return _json; | 1232 return _json; |
1257 } | 1233 } |
1258 } | 1234 } |
1259 | 1235 |
1260 /** A documentation rule provides information about individual API elements. */ | 1236 /// A documentation rule provides information about individual API elements. |
1261 class DocumentationRule { | 1237 class DocumentationRule { |
1262 /** | 1238 /// Deprecation description of the selected element(s). It can be provided if |
1263 * Deprecation description of the selected element(s). It can be provided if | 1239 /// an |
1264 * an | 1240 /// element is marked as `deprecated`. |
1265 * element is marked as `deprecated`. | |
1266 */ | |
1267 core.String deprecationDescription; | 1241 core.String deprecationDescription; |
1268 /** Description of the selected API(s). */ | 1242 |
| 1243 /// Description of the selected API(s). |
1269 core.String description; | 1244 core.String description; |
1270 /** | 1245 |
1271 * The selector is a comma-separated list of patterns. Each pattern is a | 1246 /// The selector is a comma-separated list of patterns. Each pattern is a |
1272 * qualified name of the element which may end in "*", indicating a wildcard. | 1247 /// qualified name of the element which may end in "*", indicating a |
1273 * Wildcards are only allowed at the end and for a whole component of the | 1248 /// wildcard. |
1274 * qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To | 1249 /// Wildcards are only allowed at the end and for a whole component of the |
1275 * specify a default for all applicable elements, the whole pattern "*" | 1250 /// qualified name, i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". To |
1276 * is used. | 1251 /// specify a default for all applicable elements, the whole pattern "*" |
1277 */ | 1252 /// is used. |
1278 core.String selector; | 1253 core.String selector; |
1279 | 1254 |
1280 DocumentationRule(); | 1255 DocumentationRule(); |
1281 | 1256 |
1282 DocumentationRule.fromJson(core.Map _json) { | 1257 DocumentationRule.fromJson(core.Map _json) { |
1283 if (_json.containsKey("deprecationDescription")) { | 1258 if (_json.containsKey("deprecationDescription")) { |
1284 deprecationDescription = _json["deprecationDescription"]; | 1259 deprecationDescription = _json["deprecationDescription"]; |
1285 } | 1260 } |
1286 if (_json.containsKey("description")) { | 1261 if (_json.containsKey("description")) { |
1287 description = _json["description"]; | 1262 description = _json["description"]; |
1288 } | 1263 } |
1289 if (_json.containsKey("selector")) { | 1264 if (_json.containsKey("selector")) { |
1290 selector = _json["selector"]; | 1265 selector = _json["selector"]; |
1291 } | 1266 } |
1292 } | 1267 } |
1293 | 1268 |
1294 core.Map<core.String, core.Object> toJson() { | 1269 core.Map<core.String, core.Object> toJson() { |
1295 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1270 final core.Map<core.String, core.Object> _json = |
| 1271 new core.Map<core.String, core.Object>(); |
1296 if (deprecationDescription != null) { | 1272 if (deprecationDescription != null) { |
1297 _json["deprecationDescription"] = deprecationDescription; | 1273 _json["deprecationDescription"] = deprecationDescription; |
1298 } | 1274 } |
1299 if (description != null) { | 1275 if (description != null) { |
1300 _json["description"] = description; | 1276 _json["description"] = description; |
1301 } | 1277 } |
1302 if (selector != null) { | 1278 if (selector != null) { |
1303 _json["selector"] = selector; | 1279 _json["selector"] = selector; |
1304 } | 1280 } |
1305 return _json; | 1281 return _json; |
1306 } | 1282 } |
1307 } | 1283 } |
1308 | 1284 |
1309 /** Request message for EnableService method. */ | 1285 /// Request message for EnableService method. |
1310 class EnableServiceRequest { | 1286 class EnableServiceRequest { |
1311 | |
1312 EnableServiceRequest(); | 1287 EnableServiceRequest(); |
1313 | 1288 |
1314 EnableServiceRequest.fromJson(core.Map _json) { | 1289 EnableServiceRequest.fromJson(core.Map _json) {} |
1315 } | |
1316 | 1290 |
1317 core.Map<core.String, core.Object> toJson() { | 1291 core.Map<core.String, core.Object> toJson() { |
1318 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1292 final core.Map<core.String, core.Object> _json = |
| 1293 new core.Map<core.String, core.Object>(); |
1319 return _json; | 1294 return _json; |
1320 } | 1295 } |
1321 } | 1296 } |
1322 | 1297 |
1323 /** | 1298 /// `Endpoint` describes a network endpoint that serves a set of APIs. |
1324 * `Endpoint` describes a network endpoint that serves a set of APIs. | 1299 /// A service may expose any number of endpoints, and all endpoints share the |
1325 * A service may expose any number of endpoints, and all endpoints share the | 1300 /// same service configuration, such as quota configuration and monitoring |
1326 * same service configuration, such as quota configuration and monitoring | 1301 /// configuration. |
1327 * configuration. | 1302 /// |
1328 * | 1303 /// Example service configuration: |
1329 * Example service configuration: | 1304 /// |
1330 * | 1305 /// name: library-example.googleapis.com |
1331 * name: library-example.googleapis.com | 1306 /// endpoints: |
1332 * endpoints: | 1307 /// # Below entry makes 'google.example.library.v1.Library' |
1333 * # Below entry makes 'google.example.library.v1.Library' | 1308 /// # API be served from endpoint address library-example.googleapis.com. |
1334 * # API be served from endpoint address library-example.googleapis.com. | 1309 /// # It also allows HTTP OPTIONS calls to be passed to the backend, for |
1335 * # It also allows HTTP OPTIONS calls to be passed to the backend, for | 1310 /// # it to decide whether the subsequent cross-origin request is |
1336 * # it to decide whether the subsequent cross-origin request is | 1311 /// # allowed to proceed. |
1337 * # allowed to proceed. | 1312 /// - name: library-example.googleapis.com |
1338 * - name: library-example.googleapis.com | 1313 /// allow_cors: true |
1339 * allow_cors: true | |
1340 */ | |
1341 class Endpoint { | 1314 class Endpoint { |
1342 /** | 1315 /// DEPRECATED: This field is no longer supported. Instead of using aliases, |
1343 * DEPRECATED: This field is no longer supported. Instead of using aliases, | 1316 /// please specify multiple google.api.Endpoint for each of the intented |
1344 * please specify multiple google.api.Endpoint for each of the intented | 1317 /// alias. |
1345 * alias. | 1318 /// |
1346 * | 1319 /// Additional names that this endpoint will be hosted on. |
1347 * Additional names that this endpoint will be hosted on. | |
1348 */ | |
1349 core.List<core.String> aliases; | 1320 core.List<core.String> aliases; |
1350 /** | 1321 |
1351 * Allowing | 1322 /// Allowing |
1352 * [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka | 1323 /// [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka |
1353 * cross-domain traffic, would allow the backends served from this endpoint to | 1324 /// cross-domain traffic, would allow the backends served from this endpoint |
1354 * receive and respond to HTTP OPTIONS requests. The response will be used by | 1325 /// to |
1355 * the browser to determine whether the subsequent cross-origin request is | 1326 /// receive and respond to HTTP OPTIONS requests. The response will be used |
1356 * allowed to proceed. | 1327 /// by |
1357 */ | 1328 /// the browser to determine whether the subsequent cross-origin request is |
| 1329 /// allowed to proceed. |
1358 core.bool allowCors; | 1330 core.bool allowCors; |
1359 /** | 1331 |
1360 * The list of APIs served by this endpoint. | 1332 /// The list of APIs served by this endpoint. |
1361 * | 1333 /// |
1362 * If no APIs are specified this translates to "all APIs" exported by the | 1334 /// If no APIs are specified this translates to "all APIs" exported by the |
1363 * service, as defined in the top-level service configuration. | 1335 /// service, as defined in the top-level service configuration. |
1364 */ | |
1365 core.List<core.String> apis; | 1336 core.List<core.String> apis; |
1366 /** The list of features enabled on this endpoint. */ | 1337 |
| 1338 /// The list of features enabled on this endpoint. |
1367 core.List<core.String> features; | 1339 core.List<core.String> features; |
1368 /** The canonical name of this endpoint. */ | 1340 |
| 1341 /// The canonical name of this endpoint. |
1369 core.String name; | 1342 core.String name; |
1370 /** | 1343 |
1371 * The specification of an Internet routable address of API frontend that will | 1344 /// The specification of an Internet routable address of API frontend that |
1372 * handle requests to this [API | 1345 /// will |
1373 * Endpoint](https://cloud.google.com/apis/design/glossary). | 1346 /// handle requests to this [API |
1374 * It should be either a valid IPv4 address or a fully-qualified domain name. | 1347 /// Endpoint](https://cloud.google.com/apis/design/glossary). |
1375 * For example, "8.8.8.8" or "myservice.appspot.com". | 1348 /// It should be either a valid IPv4 address or a fully-qualified domain |
1376 */ | 1349 /// name. |
| 1350 /// For example, "8.8.8.8" or "myservice.appspot.com". |
1377 core.String target; | 1351 core.String target; |
1378 | 1352 |
1379 Endpoint(); | 1353 Endpoint(); |
1380 | 1354 |
1381 Endpoint.fromJson(core.Map _json) { | 1355 Endpoint.fromJson(core.Map _json) { |
1382 if (_json.containsKey("aliases")) { | 1356 if (_json.containsKey("aliases")) { |
1383 aliases = _json["aliases"]; | 1357 aliases = _json["aliases"]; |
1384 } | 1358 } |
1385 if (_json.containsKey("allowCors")) { | 1359 if (_json.containsKey("allowCors")) { |
1386 allowCors = _json["allowCors"]; | 1360 allowCors = _json["allowCors"]; |
1387 } | 1361 } |
1388 if (_json.containsKey("apis")) { | 1362 if (_json.containsKey("apis")) { |
1389 apis = _json["apis"]; | 1363 apis = _json["apis"]; |
1390 } | 1364 } |
1391 if (_json.containsKey("features")) { | 1365 if (_json.containsKey("features")) { |
1392 features = _json["features"]; | 1366 features = _json["features"]; |
1393 } | 1367 } |
1394 if (_json.containsKey("name")) { | 1368 if (_json.containsKey("name")) { |
1395 name = _json["name"]; | 1369 name = _json["name"]; |
1396 } | 1370 } |
1397 if (_json.containsKey("target")) { | 1371 if (_json.containsKey("target")) { |
1398 target = _json["target"]; | 1372 target = _json["target"]; |
1399 } | 1373 } |
1400 } | 1374 } |
1401 | 1375 |
1402 core.Map<core.String, core.Object> toJson() { | 1376 core.Map<core.String, core.Object> toJson() { |
1403 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1377 final core.Map<core.String, core.Object> _json = |
| 1378 new core.Map<core.String, core.Object>(); |
1404 if (aliases != null) { | 1379 if (aliases != null) { |
1405 _json["aliases"] = aliases; | 1380 _json["aliases"] = aliases; |
1406 } | 1381 } |
1407 if (allowCors != null) { | 1382 if (allowCors != null) { |
1408 _json["allowCors"] = allowCors; | 1383 _json["allowCors"] = allowCors; |
1409 } | 1384 } |
1410 if (apis != null) { | 1385 if (apis != null) { |
1411 _json["apis"] = apis; | 1386 _json["apis"] = apis; |
1412 } | 1387 } |
1413 if (features != null) { | 1388 if (features != null) { |
1414 _json["features"] = features; | 1389 _json["features"] = features; |
1415 } | 1390 } |
1416 if (name != null) { | 1391 if (name != null) { |
1417 _json["name"] = name; | 1392 _json["name"] = name; |
1418 } | 1393 } |
1419 if (target != null) { | 1394 if (target != null) { |
1420 _json["target"] = target; | 1395 _json["target"] = target; |
1421 } | 1396 } |
1422 return _json; | 1397 return _json; |
1423 } | 1398 } |
1424 } | 1399 } |
1425 | 1400 |
1426 /** Enum type definition. */ | 1401 /// Enum type definition. |
1427 class Enum { | 1402 class Enum { |
1428 /** Enum value definitions. */ | 1403 /// Enum value definitions. |
1429 core.List<EnumValue> enumvalue; | 1404 core.List<EnumValue> enumvalue; |
1430 /** Enum type name. */ | 1405 |
| 1406 /// Enum type name. |
1431 core.String name; | 1407 core.String name; |
1432 /** Protocol buffer options. */ | 1408 |
| 1409 /// Protocol buffer options. |
1433 core.List<Option> options; | 1410 core.List<Option> options; |
1434 /** The source context. */ | 1411 |
| 1412 /// The source context. |
1435 SourceContext sourceContext; | 1413 SourceContext sourceContext; |
1436 /** | 1414 |
1437 * The source syntax. | 1415 /// The source syntax. |
1438 * Possible string values are: | 1416 /// Possible string values are: |
1439 * - "SYNTAX_PROTO2" : Syntax `proto2`. | 1417 /// - "SYNTAX_PROTO2" : Syntax `proto2`. |
1440 * - "SYNTAX_PROTO3" : Syntax `proto3`. | 1418 /// - "SYNTAX_PROTO3" : Syntax `proto3`. |
1441 */ | |
1442 core.String syntax; | 1419 core.String syntax; |
1443 | 1420 |
1444 Enum(); | 1421 Enum(); |
1445 | 1422 |
1446 Enum.fromJson(core.Map _json) { | 1423 Enum.fromJson(core.Map _json) { |
1447 if (_json.containsKey("enumvalue")) { | 1424 if (_json.containsKey("enumvalue")) { |
1448 enumvalue = _json["enumvalue"].map((value) => new EnumValue.fromJson(value
)).toList(); | 1425 enumvalue = _json["enumvalue"] |
| 1426 .map((value) => new EnumValue.fromJson(value)) |
| 1427 .toList(); |
1449 } | 1428 } |
1450 if (_json.containsKey("name")) { | 1429 if (_json.containsKey("name")) { |
1451 name = _json["name"]; | 1430 name = _json["name"]; |
1452 } | 1431 } |
1453 if (_json.containsKey("options")) { | 1432 if (_json.containsKey("options")) { |
1454 options = _json["options"].map((value) => new Option.fromJson(value)).toLi
st(); | 1433 options = |
| 1434 _json["options"].map((value) => new Option.fromJson(value)).toList(); |
1455 } | 1435 } |
1456 if (_json.containsKey("sourceContext")) { | 1436 if (_json.containsKey("sourceContext")) { |
1457 sourceContext = new SourceContext.fromJson(_json["sourceContext"]); | 1437 sourceContext = new SourceContext.fromJson(_json["sourceContext"]); |
1458 } | 1438 } |
1459 if (_json.containsKey("syntax")) { | 1439 if (_json.containsKey("syntax")) { |
1460 syntax = _json["syntax"]; | 1440 syntax = _json["syntax"]; |
1461 } | 1441 } |
1462 } | 1442 } |
1463 | 1443 |
1464 core.Map<core.String, core.Object> toJson() { | 1444 core.Map<core.String, core.Object> toJson() { |
1465 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1445 final core.Map<core.String, core.Object> _json = |
| 1446 new core.Map<core.String, core.Object>(); |
1466 if (enumvalue != null) { | 1447 if (enumvalue != null) { |
1467 _json["enumvalue"] = enumvalue.map((value) => (value).toJson()).toList(); | 1448 _json["enumvalue"] = enumvalue.map((value) => (value).toJson()).toList(); |
1468 } | 1449 } |
1469 if (name != null) { | 1450 if (name != null) { |
1470 _json["name"] = name; | 1451 _json["name"] = name; |
1471 } | 1452 } |
1472 if (options != null) { | 1453 if (options != null) { |
1473 _json["options"] = options.map((value) => (value).toJson()).toList(); | 1454 _json["options"] = options.map((value) => (value).toJson()).toList(); |
1474 } | 1455 } |
1475 if (sourceContext != null) { | 1456 if (sourceContext != null) { |
1476 _json["sourceContext"] = (sourceContext).toJson(); | 1457 _json["sourceContext"] = (sourceContext).toJson(); |
1477 } | 1458 } |
1478 if (syntax != null) { | 1459 if (syntax != null) { |
1479 _json["syntax"] = syntax; | 1460 _json["syntax"] = syntax; |
1480 } | 1461 } |
1481 return _json; | 1462 return _json; |
1482 } | 1463 } |
1483 } | 1464 } |
1484 | 1465 |
1485 /** Enum value definition. */ | 1466 /// Enum value definition. |
1486 class EnumValue { | 1467 class EnumValue { |
1487 /** Enum value name. */ | 1468 /// Enum value name. |
1488 core.String name; | 1469 core.String name; |
1489 /** Enum value number. */ | 1470 |
| 1471 /// Enum value number. |
1490 core.int number; | 1472 core.int number; |
1491 /** Protocol buffer options. */ | 1473 |
| 1474 /// Protocol buffer options. |
1492 core.List<Option> options; | 1475 core.List<Option> options; |
1493 | 1476 |
1494 EnumValue(); | 1477 EnumValue(); |
1495 | 1478 |
1496 EnumValue.fromJson(core.Map _json) { | 1479 EnumValue.fromJson(core.Map _json) { |
1497 if (_json.containsKey("name")) { | 1480 if (_json.containsKey("name")) { |
1498 name = _json["name"]; | 1481 name = _json["name"]; |
1499 } | 1482 } |
1500 if (_json.containsKey("number")) { | 1483 if (_json.containsKey("number")) { |
1501 number = _json["number"]; | 1484 number = _json["number"]; |
1502 } | 1485 } |
1503 if (_json.containsKey("options")) { | 1486 if (_json.containsKey("options")) { |
1504 options = _json["options"].map((value) => new Option.fromJson(value)).toLi
st(); | 1487 options = |
| 1488 _json["options"].map((value) => new Option.fromJson(value)).toList(); |
1505 } | 1489 } |
1506 } | 1490 } |
1507 | 1491 |
1508 core.Map<core.String, core.Object> toJson() { | 1492 core.Map<core.String, core.Object> toJson() { |
1509 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1493 final core.Map<core.String, core.Object> _json = |
| 1494 new core.Map<core.String, core.Object>(); |
1510 if (name != null) { | 1495 if (name != null) { |
1511 _json["name"] = name; | 1496 _json["name"] = name; |
1512 } | 1497 } |
1513 if (number != null) { | 1498 if (number != null) { |
1514 _json["number"] = number; | 1499 _json["number"] = number; |
1515 } | 1500 } |
1516 if (options != null) { | 1501 if (options != null) { |
1517 _json["options"] = options.map((value) => (value).toJson()).toList(); | 1502 _json["options"] = options.map((value) => (value).toJson()).toList(); |
1518 } | 1503 } |
1519 return _json; | 1504 return _json; |
1520 } | 1505 } |
1521 } | 1506 } |
1522 | 1507 |
1523 /** | 1508 /// Experimental service configuration. These configuration options can |
1524 * Experimental service configuration. These configuration options can | 1509 /// only be used by whitelisted users. |
1525 * only be used by whitelisted users. | |
1526 */ | |
1527 class Experimental { | 1510 class Experimental { |
1528 /** Authorization configuration. */ | 1511 /// Authorization configuration. |
1529 AuthorizationConfig authorization; | 1512 AuthorizationConfig authorization; |
1530 | 1513 |
1531 Experimental(); | 1514 Experimental(); |
1532 | 1515 |
1533 Experimental.fromJson(core.Map _json) { | 1516 Experimental.fromJson(core.Map _json) { |
1534 if (_json.containsKey("authorization")) { | 1517 if (_json.containsKey("authorization")) { |
1535 authorization = new AuthorizationConfig.fromJson(_json["authorization"]); | 1518 authorization = new AuthorizationConfig.fromJson(_json["authorization"]); |
1536 } | 1519 } |
1537 } | 1520 } |
1538 | 1521 |
1539 core.Map<core.String, core.Object> toJson() { | 1522 core.Map<core.String, core.Object> toJson() { |
1540 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1523 final core.Map<core.String, core.Object> _json = |
| 1524 new core.Map<core.String, core.Object>(); |
1541 if (authorization != null) { | 1525 if (authorization != null) { |
1542 _json["authorization"] = (authorization).toJson(); | 1526 _json["authorization"] = (authorization).toJson(); |
1543 } | 1527 } |
1544 return _json; | 1528 return _json; |
1545 } | 1529 } |
1546 } | 1530 } |
1547 | 1531 |
1548 /** A single field of a message type. */ | 1532 /// A single field of a message type. |
1549 class Field { | 1533 class Field { |
1550 /** | 1534 /// The field cardinality. |
1551 * The field cardinality. | 1535 /// Possible string values are: |
1552 * Possible string values are: | 1536 /// - "CARDINALITY_UNKNOWN" : For fields with unknown cardinality. |
1553 * - "CARDINALITY_UNKNOWN" : For fields with unknown cardinality. | 1537 /// - "CARDINALITY_OPTIONAL" : For optional fields. |
1554 * - "CARDINALITY_OPTIONAL" : For optional fields. | 1538 /// - "CARDINALITY_REQUIRED" : For required fields. Proto2 syntax only. |
1555 * - "CARDINALITY_REQUIRED" : For required fields. Proto2 syntax only. | 1539 /// - "CARDINALITY_REPEATED" : For repeated fields. |
1556 * - "CARDINALITY_REPEATED" : For repeated fields. | |
1557 */ | |
1558 core.String cardinality; | 1540 core.String cardinality; |
1559 /** | 1541 |
1560 * The string value of the default value of this field. Proto2 syntax only. | 1542 /// The string value of the default value of this field. Proto2 syntax only. |
1561 */ | |
1562 core.String defaultValue; | 1543 core.String defaultValue; |
1563 /** The field JSON name. */ | 1544 |
| 1545 /// The field JSON name. |
1564 core.String jsonName; | 1546 core.String jsonName; |
1565 /** | 1547 |
1566 * The field type. | 1548 /// The field type. |
1567 * Possible string values are: | 1549 /// Possible string values are: |
1568 * - "TYPE_UNKNOWN" : Field type unknown. | 1550 /// - "TYPE_UNKNOWN" : Field type unknown. |
1569 * - "TYPE_DOUBLE" : Field type double. | 1551 /// - "TYPE_DOUBLE" : Field type double. |
1570 * - "TYPE_FLOAT" : Field type float. | 1552 /// - "TYPE_FLOAT" : Field type float. |
1571 * - "TYPE_INT64" : Field type int64. | 1553 /// - "TYPE_INT64" : Field type int64. |
1572 * - "TYPE_UINT64" : Field type uint64. | 1554 /// - "TYPE_UINT64" : Field type uint64. |
1573 * - "TYPE_INT32" : Field type int32. | 1555 /// - "TYPE_INT32" : Field type int32. |
1574 * - "TYPE_FIXED64" : Field type fixed64. | 1556 /// - "TYPE_FIXED64" : Field type fixed64. |
1575 * - "TYPE_FIXED32" : Field type fixed32. | 1557 /// - "TYPE_FIXED32" : Field type fixed32. |
1576 * - "TYPE_BOOL" : Field type bool. | 1558 /// - "TYPE_BOOL" : Field type bool. |
1577 * - "TYPE_STRING" : Field type string. | 1559 /// - "TYPE_STRING" : Field type string. |
1578 * - "TYPE_GROUP" : Field type group. Proto2 syntax only, and deprecated. | 1560 /// - "TYPE_GROUP" : Field type group. Proto2 syntax only, and deprecated. |
1579 * - "TYPE_MESSAGE" : Field type message. | 1561 /// - "TYPE_MESSAGE" : Field type message. |
1580 * - "TYPE_BYTES" : Field type bytes. | 1562 /// - "TYPE_BYTES" : Field type bytes. |
1581 * - "TYPE_UINT32" : Field type uint32. | 1563 /// - "TYPE_UINT32" : Field type uint32. |
1582 * - "TYPE_ENUM" : Field type enum. | 1564 /// - "TYPE_ENUM" : Field type enum. |
1583 * - "TYPE_SFIXED32" : Field type sfixed32. | 1565 /// - "TYPE_SFIXED32" : Field type sfixed32. |
1584 * - "TYPE_SFIXED64" : Field type sfixed64. | 1566 /// - "TYPE_SFIXED64" : Field type sfixed64. |
1585 * - "TYPE_SINT32" : Field type sint32. | 1567 /// - "TYPE_SINT32" : Field type sint32. |
1586 * - "TYPE_SINT64" : Field type sint64. | 1568 /// - "TYPE_SINT64" : Field type sint64. |
1587 */ | |
1588 core.String kind; | 1569 core.String kind; |
1589 /** The field name. */ | 1570 |
| 1571 /// The field name. |
1590 core.String name; | 1572 core.String name; |
1591 /** The field number. */ | 1573 |
| 1574 /// The field number. |
1592 core.int number; | 1575 core.int number; |
1593 /** | 1576 |
1594 * The index of the field type in `Type.oneofs`, for message or enumeration | 1577 /// The index of the field type in `Type.oneofs`, for message or enumeration |
1595 * types. The first type has index 1; zero means the type is not in the list. | 1578 /// types. The first type has index 1; zero means the type is not in the |
1596 */ | 1579 /// list. |
1597 core.int oneofIndex; | 1580 core.int oneofIndex; |
1598 /** The protocol buffer options. */ | 1581 |
| 1582 /// The protocol buffer options. |
1599 core.List<Option> options; | 1583 core.List<Option> options; |
1600 /** Whether to use alternative packed wire representation. */ | 1584 |
| 1585 /// Whether to use alternative packed wire representation. |
1601 core.bool packed; | 1586 core.bool packed; |
1602 /** | 1587 |
1603 * The field type URL, without the scheme, for message or enumeration | 1588 /// The field type URL, without the scheme, for message or enumeration |
1604 * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. | 1589 /// types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. |
1605 */ | |
1606 core.String typeUrl; | 1590 core.String typeUrl; |
1607 | 1591 |
1608 Field(); | 1592 Field(); |
1609 | 1593 |
1610 Field.fromJson(core.Map _json) { | 1594 Field.fromJson(core.Map _json) { |
1611 if (_json.containsKey("cardinality")) { | 1595 if (_json.containsKey("cardinality")) { |
1612 cardinality = _json["cardinality"]; | 1596 cardinality = _json["cardinality"]; |
1613 } | 1597 } |
1614 if (_json.containsKey("defaultValue")) { | 1598 if (_json.containsKey("defaultValue")) { |
1615 defaultValue = _json["defaultValue"]; | 1599 defaultValue = _json["defaultValue"]; |
1616 } | 1600 } |
1617 if (_json.containsKey("jsonName")) { | 1601 if (_json.containsKey("jsonName")) { |
1618 jsonName = _json["jsonName"]; | 1602 jsonName = _json["jsonName"]; |
1619 } | 1603 } |
1620 if (_json.containsKey("kind")) { | 1604 if (_json.containsKey("kind")) { |
1621 kind = _json["kind"]; | 1605 kind = _json["kind"]; |
1622 } | 1606 } |
1623 if (_json.containsKey("name")) { | 1607 if (_json.containsKey("name")) { |
1624 name = _json["name"]; | 1608 name = _json["name"]; |
1625 } | 1609 } |
1626 if (_json.containsKey("number")) { | 1610 if (_json.containsKey("number")) { |
1627 number = _json["number"]; | 1611 number = _json["number"]; |
1628 } | 1612 } |
1629 if (_json.containsKey("oneofIndex")) { | 1613 if (_json.containsKey("oneofIndex")) { |
1630 oneofIndex = _json["oneofIndex"]; | 1614 oneofIndex = _json["oneofIndex"]; |
1631 } | 1615 } |
1632 if (_json.containsKey("options")) { | 1616 if (_json.containsKey("options")) { |
1633 options = _json["options"].map((value) => new Option.fromJson(value)).toLi
st(); | 1617 options = |
| 1618 _json["options"].map((value) => new Option.fromJson(value)).toList(); |
1634 } | 1619 } |
1635 if (_json.containsKey("packed")) { | 1620 if (_json.containsKey("packed")) { |
1636 packed = _json["packed"]; | 1621 packed = _json["packed"]; |
1637 } | 1622 } |
1638 if (_json.containsKey("typeUrl")) { | 1623 if (_json.containsKey("typeUrl")) { |
1639 typeUrl = _json["typeUrl"]; | 1624 typeUrl = _json["typeUrl"]; |
1640 } | 1625 } |
1641 } | 1626 } |
1642 | 1627 |
1643 core.Map<core.String, core.Object> toJson() { | 1628 core.Map<core.String, core.Object> toJson() { |
1644 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1629 final core.Map<core.String, core.Object> _json = |
| 1630 new core.Map<core.String, core.Object>(); |
1645 if (cardinality != null) { | 1631 if (cardinality != null) { |
1646 _json["cardinality"] = cardinality; | 1632 _json["cardinality"] = cardinality; |
1647 } | 1633 } |
1648 if (defaultValue != null) { | 1634 if (defaultValue != null) { |
1649 _json["defaultValue"] = defaultValue; | 1635 _json["defaultValue"] = defaultValue; |
1650 } | 1636 } |
1651 if (jsonName != null) { | 1637 if (jsonName != null) { |
1652 _json["jsonName"] = jsonName; | 1638 _json["jsonName"] = jsonName; |
1653 } | 1639 } |
1654 if (kind != null) { | 1640 if (kind != null) { |
(...skipping 14 matching lines...) Expand all Loading... |
1669 if (packed != null) { | 1655 if (packed != null) { |
1670 _json["packed"] = packed; | 1656 _json["packed"] = packed; |
1671 } | 1657 } |
1672 if (typeUrl != null) { | 1658 if (typeUrl != null) { |
1673 _json["typeUrl"] = typeUrl; | 1659 _json["typeUrl"] = typeUrl; |
1674 } | 1660 } |
1675 return _json; | 1661 return _json; |
1676 } | 1662 } |
1677 } | 1663 } |
1678 | 1664 |
1679 /** | 1665 /// Defines the HTTP configuration for an API service. It contains a list of |
1680 * Defines the HTTP configuration for an API service. It contains a list of | 1666 /// HttpRule, each specifying the mapping of an RPC method |
1681 * HttpRule, each specifying the mapping of an RPC method | 1667 /// to one or more HTTP REST API methods. |
1682 * to one or more HTTP REST API methods. | |
1683 */ | |
1684 class Http { | 1668 class Http { |
1685 /** | 1669 /// When set to true, URL path parmeters will be fully URI-decoded except in |
1686 * When set to true, URL path parmeters will be fully URI-decoded except in | 1670 /// cases of single segment matches in reserved expansion, where "%2F" will |
1687 * cases of single segment matches in reserved expansion, where "%2F" will be | 1671 /// be |
1688 * left encoded. | 1672 /// left encoded. |
1689 * | 1673 /// |
1690 * The default behavior is to not decode RFC 6570 reserved characters in multi | 1674 /// The default behavior is to not decode RFC 6570 reserved characters in |
1691 * segment matches. | 1675 /// multi |
1692 */ | 1676 /// segment matches. |
1693 core.bool fullyDecodeReservedExpansion; | 1677 core.bool fullyDecodeReservedExpansion; |
1694 /** | 1678 |
1695 * A list of HTTP configuration rules that apply to individual API methods. | 1679 /// A list of HTTP configuration rules that apply to individual API methods. |
1696 * | 1680 /// |
1697 * **NOTE:** All service configuration rules follow "last one wins" order. | 1681 /// **NOTE:** All service configuration rules follow "last one wins" order. |
1698 */ | |
1699 core.List<HttpRule> rules; | 1682 core.List<HttpRule> rules; |
1700 | 1683 |
1701 Http(); | 1684 Http(); |
1702 | 1685 |
1703 Http.fromJson(core.Map _json) { | 1686 Http.fromJson(core.Map _json) { |
1704 if (_json.containsKey("fullyDecodeReservedExpansion")) { | 1687 if (_json.containsKey("fullyDecodeReservedExpansion")) { |
1705 fullyDecodeReservedExpansion = _json["fullyDecodeReservedExpansion"]; | 1688 fullyDecodeReservedExpansion = _json["fullyDecodeReservedExpansion"]; |
1706 } | 1689 } |
1707 if (_json.containsKey("rules")) { | 1690 if (_json.containsKey("rules")) { |
1708 rules = _json["rules"].map((value) => new HttpRule.fromJson(value)).toList
(); | 1691 rules = |
| 1692 _json["rules"].map((value) => new HttpRule.fromJson(value)).toList(); |
1709 } | 1693 } |
1710 } | 1694 } |
1711 | 1695 |
1712 core.Map<core.String, core.Object> toJson() { | 1696 core.Map<core.String, core.Object> toJson() { |
1713 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1697 final core.Map<core.String, core.Object> _json = |
| 1698 new core.Map<core.String, core.Object>(); |
1714 if (fullyDecodeReservedExpansion != null) { | 1699 if (fullyDecodeReservedExpansion != null) { |
1715 _json["fullyDecodeReservedExpansion"] = fullyDecodeReservedExpansion; | 1700 _json["fullyDecodeReservedExpansion"] = fullyDecodeReservedExpansion; |
1716 } | 1701 } |
1717 if (rules != null) { | 1702 if (rules != null) { |
1718 _json["rules"] = rules.map((value) => (value).toJson()).toList(); | 1703 _json["rules"] = rules.map((value) => (value).toJson()).toList(); |
1719 } | 1704 } |
1720 return _json; | 1705 return _json; |
1721 } | 1706 } |
1722 } | 1707 } |
1723 | 1708 |
1724 /** | 1709 /// `HttpRule` defines the mapping of an RPC method to one or more HTTP |
1725 * `HttpRule` defines the mapping of an RPC method to one or more HTTP | 1710 /// REST API methods. The mapping specifies how different portions of the RPC |
1726 * REST API methods. The mapping specifies how different portions of the RPC | 1711 /// request message are mapped to URL path, URL query parameters, and |
1727 * request message are mapped to URL path, URL query parameters, and | 1712 /// HTTP request body. The mapping is typically specified as an |
1728 * HTTP request body. The mapping is typically specified as an | 1713 /// `google.api.http` annotation on the RPC method, |
1729 * `google.api.http` annotation on the RPC method, | 1714 /// see "google/api/annotations.proto" for details. |
1730 * see "google/api/annotations.proto" for details. | 1715 /// |
1731 * | 1716 /// The mapping consists of a field specifying the path template and |
1732 * The mapping consists of a field specifying the path template and | 1717 /// method kind. The path template can refer to fields in the request |
1733 * method kind. The path template can refer to fields in the request | 1718 /// message, as in the example below which describes a REST GET |
1734 * message, as in the example below which describes a REST GET | 1719 /// operation on a resource collection of messages: |
1735 * operation on a resource collection of messages: | 1720 /// |
1736 * | 1721 /// |
1737 * | 1722 /// service Messaging { |
1738 * service Messaging { | 1723 /// rpc GetMessage(GetMessageRequest) returns (Message) { |
1739 * rpc GetMessage(GetMessageRequest) returns (Message) { | 1724 /// option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; |
1740 * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; | 1725 /// } |
1741 * } | 1726 /// } |
1742 * } | 1727 /// message GetMessageRequest { |
1743 * message GetMessageRequest { | 1728 /// message SubMessage { |
1744 * message SubMessage { | 1729 /// string subfield = 1; |
1745 * string subfield = 1; | 1730 /// } |
1746 * } | 1731 /// string message_id = 1; // mapped to the URL |
1747 * string message_id = 1; // mapped to the URL | 1732 /// SubMessage sub = 2; // `sub.subfield` is url-mapped |
1748 * SubMessage sub = 2; // `sub.subfield` is url-mapped | 1733 /// } |
1749 * } | 1734 /// message Message { |
1750 * message Message { | 1735 /// string text = 1; // content of the resource |
1751 * string text = 1; // content of the resource | 1736 /// } |
1752 * } | 1737 /// |
1753 * | 1738 /// The same http annotation can alternatively be expressed inside the |
1754 * The same http annotation can alternatively be expressed inside the | 1739 /// `GRPC API Configuration` YAML file. |
1755 * `GRPC API Configuration` YAML file. | 1740 /// |
1756 * | 1741 /// http: |
1757 * http: | 1742 /// rules: |
1758 * rules: | 1743 /// - selector: <proto_package_name>.Messaging.GetMessage |
1759 * - selector: <proto_package_name>.Messaging.GetMessage | 1744 /// get: /v1/messages/{message_id}/{sub.subfield} |
1760 * get: /v1/messages/{message_id}/{sub.subfield} | 1745 /// |
1761 * | 1746 /// This definition enables an automatic, bidrectional mapping of HTTP |
1762 * This definition enables an automatic, bidrectional mapping of HTTP | 1747 /// JSON to RPC. Example: |
1763 * JSON to RPC. Example: | 1748 /// |
1764 * | 1749 /// HTTP | RPC |
1765 * HTTP | RPC | 1750 /// -----|----- |
1766 * -----|----- | 1751 /// `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: |
1767 * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: | 1752 /// SubMessage(subfield: "foo"))` |
1768 * SubMessage(subfield: "foo"))` | 1753 /// |
1769 * | 1754 /// In general, not only fields but also field paths can be referenced |
1770 * In general, not only fields but also field paths can be referenced | 1755 /// from a path pattern. Fields mapped to the path pattern cannot be |
1771 * from a path pattern. Fields mapped to the path pattern cannot be | 1756 /// repeated and must have a primitive (non-message) type. |
1772 * repeated and must have a primitive (non-message) type. | 1757 /// |
1773 * | 1758 /// Any fields in the request message which are not bound by the path |
1774 * Any fields in the request message which are not bound by the path | 1759 /// pattern automatically become (optional) HTTP query |
1775 * pattern automatically become (optional) HTTP query | 1760 /// parameters. Assume the following definition of the request message: |
1776 * parameters. Assume the following definition of the request message: | 1761 /// |
1777 * | 1762 /// |
1778 * | 1763 /// service Messaging { |
1779 * service Messaging { | 1764 /// rpc GetMessage(GetMessageRequest) returns (Message) { |
1780 * rpc GetMessage(GetMessageRequest) returns (Message) { | 1765 /// option (google.api.http).get = "/v1/messages/{message_id}"; |
1781 * option (google.api.http).get = "/v1/messages/{message_id}"; | 1766 /// } |
1782 * } | 1767 /// } |
1783 * } | 1768 /// message GetMessageRequest { |
1784 * message GetMessageRequest { | 1769 /// message SubMessage { |
1785 * message SubMessage { | 1770 /// string subfield = 1; |
1786 * string subfield = 1; | 1771 /// } |
1787 * } | 1772 /// string message_id = 1; // mapped to the URL |
1788 * string message_id = 1; // mapped to the URL | 1773 /// int64 revision = 2; // becomes a parameter |
1789 * int64 revision = 2; // becomes a parameter | 1774 /// SubMessage sub = 3; // `sub.subfield` becomes a parameter |
1790 * SubMessage sub = 3; // `sub.subfield` becomes a parameter | 1775 /// } |
1791 * } | 1776 /// |
1792 * | 1777 /// |
1793 * | 1778 /// This enables a HTTP JSON to RPC mapping as below: |
1794 * This enables a HTTP JSON to RPC mapping as below: | 1779 /// |
1795 * | 1780 /// HTTP | RPC |
1796 * HTTP | RPC | 1781 /// -----|----- |
1797 * -----|----- | 1782 /// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | |
1798 * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | | 1783 /// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: |
1799 * `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: | 1784 /// "foo"))` |
1800 * "foo"))` | 1785 /// |
1801 * | 1786 /// Note that fields which are mapped to HTTP parameters must have a |
1802 * Note that fields which are mapped to HTTP parameters must have a | 1787 /// primitive type or a repeated primitive type. Message types are not |
1803 * primitive type or a repeated primitive type. Message types are not | 1788 /// allowed. In the case of a repeated type, the parameter can be |
1804 * allowed. In the case of a repeated type, the parameter can be | 1789 /// repeated in the URL, as in `...?param=A¶m=B`. |
1805 * repeated in the URL, as in `...?param=A¶m=B`. | 1790 /// |
1806 * | 1791 /// For HTTP method kinds which allow a request body, the `body` field |
1807 * For HTTP method kinds which allow a request body, the `body` field | 1792 /// specifies the mapping. Consider a REST update method on the |
1808 * specifies the mapping. Consider a REST update method on the | 1793 /// message resource collection: |
1809 * message resource collection: | 1794 /// |
1810 * | 1795 /// |
1811 * | 1796 /// service Messaging { |
1812 * service Messaging { | 1797 /// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { |
1813 * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { | 1798 /// option (google.api.http) = { |
1814 * option (google.api.http) = { | 1799 /// put: "/v1/messages/{message_id}" |
1815 * put: "/v1/messages/{message_id}" | 1800 /// body: "message" |
1816 * body: "message" | 1801 /// }; |
1817 * }; | 1802 /// } |
1818 * } | 1803 /// } |
1819 * } | 1804 /// message UpdateMessageRequest { |
1820 * message UpdateMessageRequest { | 1805 /// string message_id = 1; // mapped to the URL |
1821 * string message_id = 1; // mapped to the URL | 1806 /// Message message = 2; // mapped to the body |
1822 * Message message = 2; // mapped to the body | 1807 /// } |
1823 * } | 1808 /// |
1824 * | 1809 /// |
1825 * | 1810 /// The following HTTP JSON to RPC mapping is enabled, where the |
1826 * The following HTTP JSON to RPC mapping is enabled, where the | 1811 /// representation of the JSON in the request body is determined by |
1827 * representation of the JSON in the request body is determined by | 1812 /// protos JSON encoding: |
1828 * protos JSON encoding: | 1813 /// |
1829 * | 1814 /// HTTP | RPC |
1830 * HTTP | RPC | 1815 /// -----|----- |
1831 * -----|----- | 1816 /// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: |
1832 * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: | 1817 /// "123456" message { text: "Hi!" })` |
1833 * "123456" message { text: "Hi!" })` | 1818 /// |
1834 * | 1819 /// The special name `*` can be used in the body mapping to define that |
1835 * The special name `*` can be used in the body mapping to define that | 1820 /// every field not bound by the path template should be mapped to the |
1836 * every field not bound by the path template should be mapped to the | 1821 /// request body. This enables the following alternative definition of |
1837 * request body. This enables the following alternative definition of | 1822 /// the update method: |
1838 * the update method: | 1823 /// |
1839 * | 1824 /// service Messaging { |
1840 * service Messaging { | 1825 /// rpc UpdateMessage(Message) returns (Message) { |
1841 * rpc UpdateMessage(Message) returns (Message) { | 1826 /// option (google.api.http) = { |
1842 * option (google.api.http) = { | 1827 /// put: "/v1/messages/{message_id}" |
1843 * put: "/v1/messages/{message_id}" | 1828 /// body: "*" |
1844 * body: "*" | 1829 /// }; |
1845 * }; | 1830 /// } |
1846 * } | 1831 /// } |
1847 * } | 1832 /// message Message { |
1848 * message Message { | 1833 /// string message_id = 1; |
1849 * string message_id = 1; | 1834 /// string text = 2; |
1850 * string text = 2; | 1835 /// } |
1851 * } | 1836 /// |
1852 * | 1837 /// |
1853 * | 1838 /// The following HTTP JSON to RPC mapping is enabled: |
1854 * The following HTTP JSON to RPC mapping is enabled: | 1839 /// |
1855 * | 1840 /// HTTP | RPC |
1856 * HTTP | RPC | 1841 /// -----|----- |
1857 * -----|----- | 1842 /// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: |
1858 * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: | 1843 /// "123456" text: "Hi!")` |
1859 * "123456" text: "Hi!")` | 1844 /// |
1860 * | 1845 /// Note that when using `*` in the body mapping, it is not possible to |
1861 * Note that when using `*` in the body mapping, it is not possible to | 1846 /// have HTTP parameters, as all fields not bound by the path end in |
1862 * have HTTP parameters, as all fields not bound by the path end in | 1847 /// the body. This makes this option more rarely used in practice of |
1863 * the body. This makes this option more rarely used in practice of | 1848 /// defining REST APIs. The common usage of `*` is in custom methods |
1864 * defining REST APIs. The common usage of `*` is in custom methods | 1849 /// which don't use the URL at all for transferring data. |
1865 * which don't use the URL at all for transferring data. | 1850 /// |
1866 * | 1851 /// It is possible to define multiple HTTP methods for one RPC by using |
1867 * It is possible to define multiple HTTP methods for one RPC by using | 1852 /// the `additional_bindings` option. Example: |
1868 * the `additional_bindings` option. Example: | 1853 /// |
1869 * | 1854 /// service Messaging { |
1870 * service Messaging { | 1855 /// rpc GetMessage(GetMessageRequest) returns (Message) { |
1871 * rpc GetMessage(GetMessageRequest) returns (Message) { | 1856 /// option (google.api.http) = { |
1872 * option (google.api.http) = { | 1857 /// get: "/v1/messages/{message_id}" |
1873 * get: "/v1/messages/{message_id}" | 1858 /// additional_bindings { |
1874 * additional_bindings { | 1859 /// get: "/v1/users/{user_id}/messages/{message_id}" |
1875 * get: "/v1/users/{user_id}/messages/{message_id}" | 1860 /// } |
1876 * } | 1861 /// }; |
1877 * }; | 1862 /// } |
1878 * } | 1863 /// } |
1879 * } | 1864 /// message GetMessageRequest { |
1880 * message GetMessageRequest { | 1865 /// string message_id = 1; |
1881 * string message_id = 1; | 1866 /// string user_id = 2; |
1882 * string user_id = 2; | 1867 /// } |
1883 * } | 1868 /// |
1884 * | 1869 /// |
1885 * | 1870 /// This enables the following two alternative HTTP JSON to RPC |
1886 * This enables the following two alternative HTTP JSON to RPC | 1871 /// mappings: |
1887 * mappings: | 1872 /// |
1888 * | 1873 /// HTTP | RPC |
1889 * HTTP | RPC | 1874 /// -----|----- |
1890 * -----|----- | 1875 /// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` |
1891 * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` | 1876 /// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: |
1892 * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: | 1877 /// "123456")` |
1893 * "123456")` | 1878 /// |
1894 * | 1879 /// # Rules for HTTP mapping |
1895 * # Rules for HTTP mapping | 1880 /// |
1896 * | 1881 /// The rules for mapping HTTP path, query parameters, and body fields |
1897 * The rules for mapping HTTP path, query parameters, and body fields | 1882 /// to the request message are as follows: |
1898 * to the request message are as follows: | 1883 /// |
1899 * | 1884 /// 1. The `body` field specifies either `*` or a field path, or is |
1900 * 1. The `body` field specifies either `*` or a field path, or is | 1885 /// omitted. If omitted, it indicates there is no HTTP request body. |
1901 * omitted. If omitted, it indicates there is no HTTP request body. | 1886 /// 2. Leaf fields (recursive expansion of nested messages in the |
1902 * 2. Leaf fields (recursive expansion of nested messages in the | 1887 /// request) can be classified into three types: |
1903 * request) can be classified into three types: | 1888 /// (a) Matched in the URL template. |
1904 * (a) Matched in the URL template. | 1889 /// (b) Covered by body (if body is `*`, everything except (a) fields; |
1905 * (b) Covered by body (if body is `*`, everything except (a) fields; | 1890 /// else everything under the body field) |
1906 * else everything under the body field) | 1891 /// (c) All other fields. |
1907 * (c) All other fields. | 1892 /// 3. URL query parameters found in the HTTP request are mapped to (c) fields. |
1908 * 3. URL query parameters found in the HTTP request are mapped to (c) fields. | 1893 /// 4. Any body sent with an HTTP request can contain only (b) fields. |
1909 * 4. Any body sent with an HTTP request can contain only (b) fields. | 1894 /// |
1910 * | 1895 /// The syntax of the path template is as follows: |
1911 * The syntax of the path template is as follows: | 1896 /// |
1912 * | 1897 /// Template = "/" Segments [ Verb ] ; |
1913 * Template = "/" Segments [ Verb ] ; | 1898 /// Segments = Segment { "/" Segment } ; |
1914 * Segments = Segment { "/" Segment } ; | 1899 /// Segment = "*" | "**" | LITERAL | Variable ; |
1915 * Segment = "*" | "**" | LITERAL | Variable ; | 1900 /// Variable = "{" FieldPath [ "=" Segments ] "}" ; |
1916 * Variable = "{" FieldPath [ "=" Segments ] "}" ; | 1901 /// FieldPath = IDENT { "." IDENT } ; |
1917 * FieldPath = IDENT { "." IDENT } ; | 1902 /// Verb = ":" LITERAL ; |
1918 * Verb = ":" LITERAL ; | 1903 /// |
1919 * | 1904 /// The syntax `*` matches a single path segment. The syntax `**` matches zero |
1920 * The syntax `*` matches a single path segment. The syntax `**` matches zero | 1905 /// or more path segments, which must be the last part of the path except the |
1921 * or more path segments, which must be the last part of the path except the | 1906 /// `Verb`. The syntax `LITERAL` matches literal text in the path. |
1922 * `Verb`. The syntax `LITERAL` matches literal text in the path. | 1907 /// |
1923 * | 1908 /// The syntax `Variable` matches part of the URL path as specified by its |
1924 * The syntax `Variable` matches part of the URL path as specified by its | 1909 /// template. A variable template must not contain other variables. If a |
1925 * template. A variable template must not contain other variables. If a variable | 1910 /// variable |
1926 * matches a single path segment, its template may be omitted, e.g. `{var}` | 1911 /// matches a single path segment, its template may be omitted, e.g. `{var}` |
1927 * is equivalent to `{var=*}`. | 1912 /// is equivalent to `{var=*}`. |
1928 * | 1913 /// |
1929 * If a variable contains exactly one path segment, such as `"{var}"` or | 1914 /// If a variable contains exactly one path segment, such as `"{var}"` or |
1930 * `"{var=*}"`, when such a variable is expanded into a URL path, all characters | 1915 /// `"{var=*}"`, when such a variable is expanded into a URL path, all |
1931 * except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the | 1916 /// characters |
1932 * Discovery Document as `{var}`. | 1917 /// except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the |
1933 * | 1918 /// Discovery Document as `{var}`. |
1934 * If a variable contains one or more path segments, such as `"{var=foo / * }"` | 1919 /// |
1935 * or `"{var=**}"`, when such a variable is expanded into a URL path, all | 1920 /// If a variable contains one or more path segments, such as `"{var=foo / * |
1936 * characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables | 1921 /// }"` |
1937 * show up in the Discovery Document as `{+var}`. | 1922 /// or `"{var=**}"`, when such a variable is expanded into a URL path, all |
1938 * | 1923 /// characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables |
1939 * NOTE: While the single segment variable matches the semantics of | 1924 /// show up in the Discovery Document as `{+var}`. |
1940 * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 | 1925 /// |
1941 * Simple String Expansion, the multi segment variable **does not** match | 1926 /// NOTE: While the single segment variable matches the semantics of |
1942 * RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion | 1927 /// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 |
1943 * does not expand special characters like `?` and `#`, which would lead | 1928 /// Simple String Expansion, the multi segment variable **does not** match |
1944 * to invalid URLs. | 1929 /// RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion |
1945 * | 1930 /// does not expand special characters like `?` and `#`, which would lead |
1946 * NOTE: the field paths in variables and in the `body` must not refer to | 1931 /// to invalid URLs. |
1947 * repeated fields or map fields. | 1932 /// |
1948 */ | 1933 /// NOTE: the field paths in variables and in the `body` must not refer to |
| 1934 /// repeated fields or map fields. |
1949 class HttpRule { | 1935 class HttpRule { |
1950 /** | 1936 /// Additional HTTP bindings for the selector. Nested bindings must |
1951 * Additional HTTP bindings for the selector. Nested bindings must | 1937 /// not contain an `additional_bindings` field themselves (that is, |
1952 * not contain an `additional_bindings` field themselves (that is, | 1938 /// the nesting may only be one level deep). |
1953 * the nesting may only be one level deep). | |
1954 */ | |
1955 core.List<HttpRule> additionalBindings; | 1939 core.List<HttpRule> additionalBindings; |
1956 /** | 1940 |
1957 * Specifies the permission(s) required for an API element for the overall | 1941 /// Specifies the permission(s) required for an API element for the overall |
1958 * API request to succeed. It is typically used to mark request message fields | 1942 /// API request to succeed. It is typically used to mark request message |
1959 * that contain the name of the resource and indicates the permissions that | 1943 /// fields |
1960 * will be checked on that resource. | 1944 /// that contain the name of the resource and indicates the permissions that |
1961 */ | 1945 /// will be checked on that resource. |
1962 core.List<AuthorizationRule> authorizations; | 1946 core.List<AuthorizationRule> authorizations; |
1963 /** | 1947 |
1964 * The name of the request field whose value is mapped to the HTTP body, or | 1948 /// The name of the request field whose value is mapped to the HTTP body, or |
1965 * `*` for mapping all fields not captured by the path pattern to the HTTP | 1949 /// `*` for mapping all fields not captured by the path pattern to the HTTP |
1966 * body. NOTE: the referred field must not be a repeated field and must be | 1950 /// body. NOTE: the referred field must not be a repeated field and must be |
1967 * present at the top-level of request message type. | 1951 /// present at the top-level of request message type. |
1968 */ | |
1969 core.String body; | 1952 core.String body; |
1970 /** | 1953 |
1971 * The custom pattern is used for specifying an HTTP method that is not | 1954 /// The custom pattern is used for specifying an HTTP method that is not |
1972 * included in the `pattern` field, such as HEAD, or "*" to leave the | 1955 /// included in the `pattern` field, such as HEAD, or "*" to leave the |
1973 * HTTP method unspecified for this rule. The wild-card rule is useful | 1956 /// HTTP method unspecified for this rule. The wild-card rule is useful |
1974 * for services that provide content to Web (HTML) clients. | 1957 /// for services that provide content to Web (HTML) clients. |
1975 */ | |
1976 CustomHttpPattern custom; | 1958 CustomHttpPattern custom; |
1977 /** Used for deleting a resource. */ | 1959 |
| 1960 /// Used for deleting a resource. |
1978 core.String delete; | 1961 core.String delete; |
1979 /** Used for listing and getting information about resources. */ | 1962 |
| 1963 /// Used for listing and getting information about resources. |
1980 core.String get; | 1964 core.String get; |
1981 /** | 1965 |
1982 * Use this only for Scotty Requests. Do not use this for bytestream methods. | 1966 /// Use this only for Scotty Requests. Do not use this for bytestream |
1983 * For media support, add instead [][google.bytestream.RestByteStream] as an | 1967 /// methods. |
1984 * API to your configuration. | 1968 /// For media support, add instead [][google.bytestream.RestByteStream] as an |
1985 */ | 1969 /// API to your configuration. |
1986 MediaDownload mediaDownload; | 1970 MediaDownload mediaDownload; |
1987 /** | 1971 |
1988 * Use this only for Scotty Requests. Do not use this for media support using | 1972 /// Use this only for Scotty Requests. Do not use this for media support |
1989 * Bytestream, add instead | 1973 /// using |
1990 * [][google.bytestream.RestByteStream] as an API to your | 1974 /// Bytestream, add instead |
1991 * configuration for Bytestream methods. | 1975 /// [][google.bytestream.RestByteStream] as an API to your |
1992 */ | 1976 /// configuration for Bytestream methods. |
1993 MediaUpload mediaUpload; | 1977 MediaUpload mediaUpload; |
1994 /** Used for updating a resource. */ | 1978 |
| 1979 /// Used for updating a resource. |
1995 core.String patch; | 1980 core.String patch; |
1996 /** Used for creating a resource. */ | 1981 |
| 1982 /// Used for creating a resource. |
1997 core.String post; | 1983 core.String post; |
1998 /** Used for updating a resource. */ | 1984 |
| 1985 /// Used for updating a resource. |
1999 core.String put; | 1986 core.String put; |
2000 /** | 1987 |
2001 * The name of the response field whose value is mapped to the HTTP body of | 1988 /// The name of the response field whose value is mapped to the HTTP body of |
2002 * response. Other response fields are ignored. This field is optional. When | 1989 /// response. Other response fields are ignored. This field is optional. When |
2003 * not set, the response message will be used as HTTP body of response. | 1990 /// not set, the response message will be used as HTTP body of response. |
2004 * NOTE: the referred field must be not a repeated field and must be present | 1991 /// NOTE: the referred field must be not a repeated field and must be present |
2005 * at the top-level of response message type. | 1992 /// at the top-level of response message type. |
2006 */ | |
2007 core.String responseBody; | 1993 core.String responseBody; |
2008 /** | 1994 |
2009 * DO NOT USE. This is an experimental field. | 1995 /// DO NOT USE. This is an experimental field. |
2010 * | 1996 /// |
2011 * Optional. The REST collection name is by default derived from the URL | 1997 /// Optional. The REST collection name is by default derived from the URL |
2012 * pattern. If specified, this field overrides the default collection name. | 1998 /// pattern. If specified, this field overrides the default collection name. |
2013 * Example: | 1999 /// Example: |
2014 * | 2000 /// |
2015 * rpc AddressesAggregatedList(AddressesAggregatedListRequest) | 2001 /// rpc AddressesAggregatedList(AddressesAggregatedListRequest) |
2016 * returns (AddressesAggregatedListResponse) { | 2002 /// returns (AddressesAggregatedListResponse) { |
2017 * option (google.api.http) = { | 2003 /// option (google.api.http) = { |
2018 * get: "/v1/projects/{project_id}/aggregated/addresses" | 2004 /// get: "/v1/projects/{project_id}/aggregated/addresses" |
2019 * rest_collection: "projects.addresses" | 2005 /// rest_collection: "projects.addresses" |
2020 * }; | 2006 /// }; |
2021 * } | 2007 /// } |
2022 * | 2008 /// |
2023 * This method has the automatically derived collection name | 2009 /// This method has the automatically derived collection name |
2024 * "projects.aggregated". Because, semantically, this rpc is actually an | 2010 /// "projects.aggregated". Because, semantically, this rpc is actually an |
2025 * operation on the "projects.addresses" collection, the `rest_collection` | 2011 /// operation on the "projects.addresses" collection, the `rest_collection` |
2026 * field is configured to override the derived collection name. | 2012 /// field is configured to override the derived collection name. |
2027 */ | |
2028 core.String restCollection; | 2013 core.String restCollection; |
2029 /** | 2014 |
2030 * DO NOT USE. This is an experimental field. | 2015 /// DO NOT USE. This is an experimental field. |
2031 * | 2016 /// |
2032 * Optional. The rest method name is by default derived from the URL | 2017 /// Optional. The rest method name is by default derived from the URL |
2033 * pattern. If specified, this field overrides the default method name. | 2018 /// pattern. If specified, this field overrides the default method name. |
2034 * Example: | 2019 /// Example: |
2035 * | 2020 /// |
2036 * rpc CreateResource(CreateResourceRequest) | 2021 /// rpc CreateResource(CreateResourceRequest) |
2037 * returns (CreateResourceResponse) { | 2022 /// returns (CreateResourceResponse) { |
2038 * option (google.api.http) = { | 2023 /// option (google.api.http) = { |
2039 * post: "/v1/resources", | 2024 /// post: "/v1/resources", |
2040 * body: "resource", | 2025 /// body: "resource", |
2041 * rest_method_name: "insert" | 2026 /// rest_method_name: "insert" |
2042 * }; | 2027 /// }; |
2043 * } | 2028 /// } |
2044 * | 2029 /// |
2045 * This method has the automatically derived rest method name | 2030 /// This method has the automatically derived rest method name |
2046 * "create", but for backwards compatibility with apiary, it is specified as | 2031 /// "create", but for backwards compatibility with apiary, it is specified as |
2047 * insert. | 2032 /// insert. |
2048 */ | |
2049 core.String restMethodName; | 2033 core.String restMethodName; |
2050 /** | 2034 |
2051 * Selects methods to which this rule applies. | 2035 /// Selects methods to which this rule applies. |
2052 * | 2036 /// |
2053 * Refer to selector for syntax details. | 2037 /// Refer to selector for syntax details. |
2054 */ | |
2055 core.String selector; | 2038 core.String selector; |
2056 | 2039 |
2057 HttpRule(); | 2040 HttpRule(); |
2058 | 2041 |
2059 HttpRule.fromJson(core.Map _json) { | 2042 HttpRule.fromJson(core.Map _json) { |
2060 if (_json.containsKey("additionalBindings")) { | 2043 if (_json.containsKey("additionalBindings")) { |
2061 additionalBindings = _json["additionalBindings"].map((value) => new HttpRu
le.fromJson(value)).toList(); | 2044 additionalBindings = _json["additionalBindings"] |
| 2045 .map((value) => new HttpRule.fromJson(value)) |
| 2046 .toList(); |
2062 } | 2047 } |
2063 if (_json.containsKey("authorizations")) { | 2048 if (_json.containsKey("authorizations")) { |
2064 authorizations = _json["authorizations"].map((value) => new AuthorizationR
ule.fromJson(value)).toList(); | 2049 authorizations = _json["authorizations"] |
| 2050 .map((value) => new AuthorizationRule.fromJson(value)) |
| 2051 .toList(); |
2065 } | 2052 } |
2066 if (_json.containsKey("body")) { | 2053 if (_json.containsKey("body")) { |
2067 body = _json["body"]; | 2054 body = _json["body"]; |
2068 } | 2055 } |
2069 if (_json.containsKey("custom")) { | 2056 if (_json.containsKey("custom")) { |
2070 custom = new CustomHttpPattern.fromJson(_json["custom"]); | 2057 custom = new CustomHttpPattern.fromJson(_json["custom"]); |
2071 } | 2058 } |
2072 if (_json.containsKey("delete")) { | 2059 if (_json.containsKey("delete")) { |
2073 delete = _json["delete"]; | 2060 delete = _json["delete"]; |
2074 } | 2061 } |
(...skipping 23 matching lines...) Expand all Loading... |
2098 } | 2085 } |
2099 if (_json.containsKey("restMethodName")) { | 2086 if (_json.containsKey("restMethodName")) { |
2100 restMethodName = _json["restMethodName"]; | 2087 restMethodName = _json["restMethodName"]; |
2101 } | 2088 } |
2102 if (_json.containsKey("selector")) { | 2089 if (_json.containsKey("selector")) { |
2103 selector = _json["selector"]; | 2090 selector = _json["selector"]; |
2104 } | 2091 } |
2105 } | 2092 } |
2106 | 2093 |
2107 core.Map<core.String, core.Object> toJson() { | 2094 core.Map<core.String, core.Object> toJson() { |
2108 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2095 final core.Map<core.String, core.Object> _json = |
| 2096 new core.Map<core.String, core.Object>(); |
2109 if (additionalBindings != null) { | 2097 if (additionalBindings != null) { |
2110 _json["additionalBindings"] = additionalBindings.map((value) => (value).to
Json()).toList(); | 2098 _json["additionalBindings"] = |
| 2099 additionalBindings.map((value) => (value).toJson()).toList(); |
2111 } | 2100 } |
2112 if (authorizations != null) { | 2101 if (authorizations != null) { |
2113 _json["authorizations"] = authorizations.map((value) => (value).toJson()).
toList(); | 2102 _json["authorizations"] = |
| 2103 authorizations.map((value) => (value).toJson()).toList(); |
2114 } | 2104 } |
2115 if (body != null) { | 2105 if (body != null) { |
2116 _json["body"] = body; | 2106 _json["body"] = body; |
2117 } | 2107 } |
2118 if (custom != null) { | 2108 if (custom != null) { |
2119 _json["custom"] = (custom).toJson(); | 2109 _json["custom"] = (custom).toJson(); |
2120 } | 2110 } |
2121 if (delete != null) { | 2111 if (delete != null) { |
2122 _json["delete"] = delete; | 2112 _json["delete"] = delete; |
2123 } | 2113 } |
(...skipping 24 matching lines...) Expand all Loading... |
2148 if (restMethodName != null) { | 2138 if (restMethodName != null) { |
2149 _json["restMethodName"] = restMethodName; | 2139 _json["restMethodName"] = restMethodName; |
2150 } | 2140 } |
2151 if (selector != null) { | 2141 if (selector != null) { |
2152 _json["selector"] = selector; | 2142 _json["selector"] = selector; |
2153 } | 2143 } |
2154 return _json; | 2144 return _json; |
2155 } | 2145 } |
2156 } | 2146 } |
2157 | 2147 |
2158 /** A description of a label. */ | 2148 /// A description of a label. |
2159 class LabelDescriptor { | 2149 class LabelDescriptor { |
2160 /** A human-readable description for the label. */ | 2150 /// A human-readable description for the label. |
2161 core.String description; | 2151 core.String description; |
2162 /** The label key. */ | 2152 |
| 2153 /// The label key. |
2163 core.String key; | 2154 core.String key; |
2164 /** | 2155 |
2165 * The type of data that can be assigned to the label. | 2156 /// The type of data that can be assigned to the label. |
2166 * Possible string values are: | 2157 /// Possible string values are: |
2167 * - "STRING" : A variable-length string. This is the default. | 2158 /// - "STRING" : A variable-length string. This is the default. |
2168 * - "BOOL" : Boolean; true or false. | 2159 /// - "BOOL" : Boolean; true or false. |
2169 * - "INT64" : A 64-bit signed integer. | 2160 /// - "INT64" : A 64-bit signed integer. |
2170 */ | |
2171 core.String valueType; | 2161 core.String valueType; |
2172 | 2162 |
2173 LabelDescriptor(); | 2163 LabelDescriptor(); |
2174 | 2164 |
2175 LabelDescriptor.fromJson(core.Map _json) { | 2165 LabelDescriptor.fromJson(core.Map _json) { |
2176 if (_json.containsKey("description")) { | 2166 if (_json.containsKey("description")) { |
2177 description = _json["description"]; | 2167 description = _json["description"]; |
2178 } | 2168 } |
2179 if (_json.containsKey("key")) { | 2169 if (_json.containsKey("key")) { |
2180 key = _json["key"]; | 2170 key = _json["key"]; |
2181 } | 2171 } |
2182 if (_json.containsKey("valueType")) { | 2172 if (_json.containsKey("valueType")) { |
2183 valueType = _json["valueType"]; | 2173 valueType = _json["valueType"]; |
2184 } | 2174 } |
2185 } | 2175 } |
2186 | 2176 |
2187 core.Map<core.String, core.Object> toJson() { | 2177 core.Map<core.String, core.Object> toJson() { |
2188 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2178 final core.Map<core.String, core.Object> _json = |
| 2179 new core.Map<core.String, core.Object>(); |
2189 if (description != null) { | 2180 if (description != null) { |
2190 _json["description"] = description; | 2181 _json["description"] = description; |
2191 } | 2182 } |
2192 if (key != null) { | 2183 if (key != null) { |
2193 _json["key"] = key; | 2184 _json["key"] = key; |
2194 } | 2185 } |
2195 if (valueType != null) { | 2186 if (valueType != null) { |
2196 _json["valueType"] = valueType; | 2187 _json["valueType"] = valueType; |
2197 } | 2188 } |
2198 return _json; | 2189 return _json; |
2199 } | 2190 } |
2200 } | 2191 } |
2201 | 2192 |
2202 /** Response message for `ListEnabledServices` method. */ | 2193 /// Response message for `ListEnabledServices` method. |
2203 class ListEnabledServicesResponse { | 2194 class ListEnabledServicesResponse { |
2204 /** | 2195 /// Token that can be passed to `ListEnabledServices` to resume a paginated |
2205 * Token that can be passed to `ListEnabledServices` to resume a paginated | 2196 /// query. |
2206 * query. | |
2207 */ | |
2208 core.String nextPageToken; | 2197 core.String nextPageToken; |
2209 /** Services enabled for the specified parent. */ | 2198 |
| 2199 /// Services enabled for the specified parent. |
2210 core.List<PublishedService> services; | 2200 core.List<PublishedService> services; |
2211 | 2201 |
2212 ListEnabledServicesResponse(); | 2202 ListEnabledServicesResponse(); |
2213 | 2203 |
2214 ListEnabledServicesResponse.fromJson(core.Map _json) { | 2204 ListEnabledServicesResponse.fromJson(core.Map _json) { |
2215 if (_json.containsKey("nextPageToken")) { | 2205 if (_json.containsKey("nextPageToken")) { |
2216 nextPageToken = _json["nextPageToken"]; | 2206 nextPageToken = _json["nextPageToken"]; |
2217 } | 2207 } |
2218 if (_json.containsKey("services")) { | 2208 if (_json.containsKey("services")) { |
2219 services = _json["services"].map((value) => new PublishedService.fromJson(
value)).toList(); | 2209 services = _json["services"] |
| 2210 .map((value) => new PublishedService.fromJson(value)) |
| 2211 .toList(); |
2220 } | 2212 } |
2221 } | 2213 } |
2222 | 2214 |
2223 core.Map<core.String, core.Object> toJson() { | 2215 core.Map<core.String, core.Object> toJson() { |
2224 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2216 final core.Map<core.String, core.Object> _json = |
| 2217 new core.Map<core.String, core.Object>(); |
2225 if (nextPageToken != null) { | 2218 if (nextPageToken != null) { |
2226 _json["nextPageToken"] = nextPageToken; | 2219 _json["nextPageToken"] = nextPageToken; |
2227 } | 2220 } |
2228 if (services != null) { | 2221 if (services != null) { |
2229 _json["services"] = services.map((value) => (value).toJson()).toList(); | 2222 _json["services"] = services.map((value) => (value).toJson()).toList(); |
2230 } | 2223 } |
2231 return _json; | 2224 return _json; |
2232 } | 2225 } |
2233 } | 2226 } |
2234 | 2227 |
2235 /** | 2228 /// A description of a log type. Example in YAML format: |
2236 * A description of a log type. Example in YAML format: | 2229 /// |
2237 * | 2230 /// - name: library.googleapis.com/activity_history |
2238 * - name: library.googleapis.com/activity_history | 2231 /// description: The history of borrowing and returning library items. |
2239 * description: The history of borrowing and returning library items. | 2232 /// display_name: Activity |
2240 * display_name: Activity | 2233 /// labels: |
2241 * labels: | 2234 /// - key: /customer_id |
2242 * - key: /customer_id | 2235 /// description: Identifier of a library customer |
2243 * description: Identifier of a library customer | |
2244 */ | |
2245 class LogDescriptor { | 2236 class LogDescriptor { |
2246 /** | 2237 /// A human-readable description of this log. This information appears in |
2247 * A human-readable description of this log. This information appears in | 2238 /// the documentation and can contain details. |
2248 * the documentation and can contain details. | |
2249 */ | |
2250 core.String description; | 2239 core.String description; |
2251 /** | 2240 |
2252 * The human-readable name for this log. This information appears on | 2241 /// The human-readable name for this log. This information appears on |
2253 * the user interface and should be concise. | 2242 /// the user interface and should be concise. |
2254 */ | |
2255 core.String displayName; | 2243 core.String displayName; |
2256 /** | 2244 |
2257 * The set of labels that are available to describe a specific log entry. | 2245 /// The set of labels that are available to describe a specific log entry. |
2258 * Runtime requests that contain labels not specified here are | 2246 /// Runtime requests that contain labels not specified here are |
2259 * considered invalid. | 2247 /// considered invalid. |
2260 */ | |
2261 core.List<LabelDescriptor> labels; | 2248 core.List<LabelDescriptor> labels; |
2262 /** | 2249 |
2263 * The name of the log. It must be less than 512 characters long and can | 2250 /// The name of the log. It must be less than 512 characters long and can |
2264 * include the following characters: upper- and lower-case alphanumeric | 2251 /// include the following characters: upper- and lower-case alphanumeric |
2265 * characters [A-Za-z0-9], and punctuation characters including | 2252 /// characters [A-Za-z0-9], and punctuation characters including |
2266 * slash, underscore, hyphen, period [/_-.]. | 2253 /// slash, underscore, hyphen, period [/_-.]. |
2267 */ | |
2268 core.String name; | 2254 core.String name; |
2269 | 2255 |
2270 LogDescriptor(); | 2256 LogDescriptor(); |
2271 | 2257 |
2272 LogDescriptor.fromJson(core.Map _json) { | 2258 LogDescriptor.fromJson(core.Map _json) { |
2273 if (_json.containsKey("description")) { | 2259 if (_json.containsKey("description")) { |
2274 description = _json["description"]; | 2260 description = _json["description"]; |
2275 } | 2261 } |
2276 if (_json.containsKey("displayName")) { | 2262 if (_json.containsKey("displayName")) { |
2277 displayName = _json["displayName"]; | 2263 displayName = _json["displayName"]; |
2278 } | 2264 } |
2279 if (_json.containsKey("labels")) { | 2265 if (_json.containsKey("labels")) { |
2280 labels = _json["labels"].map((value) => new LabelDescriptor.fromJson(value
)).toList(); | 2266 labels = _json["labels"] |
| 2267 .map((value) => new LabelDescriptor.fromJson(value)) |
| 2268 .toList(); |
2281 } | 2269 } |
2282 if (_json.containsKey("name")) { | 2270 if (_json.containsKey("name")) { |
2283 name = _json["name"]; | 2271 name = _json["name"]; |
2284 } | 2272 } |
2285 } | 2273 } |
2286 | 2274 |
2287 core.Map<core.String, core.Object> toJson() { | 2275 core.Map<core.String, core.Object> toJson() { |
2288 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2276 final core.Map<core.String, core.Object> _json = |
| 2277 new core.Map<core.String, core.Object>(); |
2289 if (description != null) { | 2278 if (description != null) { |
2290 _json["description"] = description; | 2279 _json["description"] = description; |
2291 } | 2280 } |
2292 if (displayName != null) { | 2281 if (displayName != null) { |
2293 _json["displayName"] = displayName; | 2282 _json["displayName"] = displayName; |
2294 } | 2283 } |
2295 if (labels != null) { | 2284 if (labels != null) { |
2296 _json["labels"] = labels.map((value) => (value).toJson()).toList(); | 2285 _json["labels"] = labels.map((value) => (value).toJson()).toList(); |
2297 } | 2286 } |
2298 if (name != null) { | 2287 if (name != null) { |
2299 _json["name"] = name; | 2288 _json["name"] = name; |
2300 } | 2289 } |
2301 return _json; | 2290 return _json; |
2302 } | 2291 } |
2303 } | 2292 } |
2304 | 2293 |
2305 /** | 2294 /// Logging configuration of the service. |
2306 * Logging configuration of the service. | 2295 /// |
2307 * | 2296 /// The following example shows how to configure logs to be sent to the |
2308 * The following example shows how to configure logs to be sent to the | 2297 /// producer and consumer projects. In the example, the `activity_history` |
2309 * producer and consumer projects. In the example, the `activity_history` | 2298 /// log is sent to both the producer and consumer projects, whereas the |
2310 * log is sent to both the producer and consumer projects, whereas the | 2299 /// `purchase_history` log is only sent to the producer project. |
2311 * `purchase_history` log is only sent to the producer project. | 2300 /// |
2312 * | 2301 /// monitored_resources: |
2313 * monitored_resources: | 2302 /// - type: library.googleapis.com/branch |
2314 * - type: library.googleapis.com/branch | 2303 /// labels: |
2315 * labels: | 2304 /// - key: /city |
2316 * - key: /city | 2305 /// description: The city where the library branch is located in. |
2317 * description: The city where the library branch is located in. | 2306 /// - key: /name |
2318 * - key: /name | 2307 /// description: The name of the branch. |
2319 * description: The name of the branch. | 2308 /// logs: |
2320 * logs: | 2309 /// - name: activity_history |
2321 * - name: activity_history | 2310 /// labels: |
2322 * labels: | 2311 /// - key: /customer_id |
2323 * - key: /customer_id | 2312 /// - name: purchase_history |
2324 * - name: purchase_history | 2313 /// logging: |
2325 * logging: | 2314 /// producer_destinations: |
2326 * producer_destinations: | 2315 /// - monitored_resource: library.googleapis.com/branch |
2327 * - monitored_resource: library.googleapis.com/branch | 2316 /// logs: |
2328 * logs: | 2317 /// - activity_history |
2329 * - activity_history | 2318 /// - purchase_history |
2330 * - purchase_history | 2319 /// consumer_destinations: |
2331 * consumer_destinations: | 2320 /// - monitored_resource: library.googleapis.com/branch |
2332 * - monitored_resource: library.googleapis.com/branch | 2321 /// logs: |
2333 * logs: | 2322 /// - activity_history |
2334 * - activity_history | |
2335 */ | |
2336 class Logging { | 2323 class Logging { |
2337 /** | 2324 /// Logging configurations for sending logs to the consumer project. |
2338 * Logging configurations for sending logs to the consumer project. | 2325 /// There can be multiple consumer destinations, each one must have a |
2339 * There can be multiple consumer destinations, each one must have a | 2326 /// different monitored resource type. A log can be used in at most |
2340 * different monitored resource type. A log can be used in at most | 2327 /// one consumer destination. |
2341 * one consumer destination. | |
2342 */ | |
2343 core.List<LoggingDestination> consumerDestinations; | 2328 core.List<LoggingDestination> consumerDestinations; |
2344 /** | 2329 |
2345 * Logging configurations for sending logs to the producer project. | 2330 /// Logging configurations for sending logs to the producer project. |
2346 * There can be multiple producer destinations, each one must have a | 2331 /// There can be multiple producer destinations, each one must have a |
2347 * different monitored resource type. A log can be used in at most | 2332 /// different monitored resource type. A log can be used in at most |
2348 * one producer destination. | 2333 /// one producer destination. |
2349 */ | |
2350 core.List<LoggingDestination> producerDestinations; | 2334 core.List<LoggingDestination> producerDestinations; |
2351 | 2335 |
2352 Logging(); | 2336 Logging(); |
2353 | 2337 |
2354 Logging.fromJson(core.Map _json) { | 2338 Logging.fromJson(core.Map _json) { |
2355 if (_json.containsKey("consumerDestinations")) { | 2339 if (_json.containsKey("consumerDestinations")) { |
2356 consumerDestinations = _json["consumerDestinations"].map((value) => new Lo
ggingDestination.fromJson(value)).toList(); | 2340 consumerDestinations = _json["consumerDestinations"] |
| 2341 .map((value) => new LoggingDestination.fromJson(value)) |
| 2342 .toList(); |
2357 } | 2343 } |
2358 if (_json.containsKey("producerDestinations")) { | 2344 if (_json.containsKey("producerDestinations")) { |
2359 producerDestinations = _json["producerDestinations"].map((value) => new Lo
ggingDestination.fromJson(value)).toList(); | 2345 producerDestinations = _json["producerDestinations"] |
| 2346 .map((value) => new LoggingDestination.fromJson(value)) |
| 2347 .toList(); |
2360 } | 2348 } |
2361 } | 2349 } |
2362 | 2350 |
2363 core.Map<core.String, core.Object> toJson() { | 2351 core.Map<core.String, core.Object> toJson() { |
2364 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2352 final core.Map<core.String, core.Object> _json = |
| 2353 new core.Map<core.String, core.Object>(); |
2365 if (consumerDestinations != null) { | 2354 if (consumerDestinations != null) { |
2366 _json["consumerDestinations"] = consumerDestinations.map((value) => (value
).toJson()).toList(); | 2355 _json["consumerDestinations"] = |
| 2356 consumerDestinations.map((value) => (value).toJson()).toList(); |
2367 } | 2357 } |
2368 if (producerDestinations != null) { | 2358 if (producerDestinations != null) { |
2369 _json["producerDestinations"] = producerDestinations.map((value) => (value
).toJson()).toList(); | 2359 _json["producerDestinations"] = |
| 2360 producerDestinations.map((value) => (value).toJson()).toList(); |
2370 } | 2361 } |
2371 return _json; | 2362 return _json; |
2372 } | 2363 } |
2373 } | 2364 } |
2374 | 2365 |
2375 /** | 2366 /// Configuration of a specific logging destination (the producer project |
2376 * Configuration of a specific logging destination (the producer project | 2367 /// or the consumer project). |
2377 * or the consumer project). | |
2378 */ | |
2379 class LoggingDestination { | 2368 class LoggingDestination { |
2380 /** | 2369 /// Names of the logs to be sent to this destination. Each name must |
2381 * Names of the logs to be sent to this destination. Each name must | 2370 /// be defined in the Service.logs section. If the log name is |
2382 * be defined in the Service.logs section. If the log name is | 2371 /// not a domain scoped name, it will be automatically prefixed with |
2383 * not a domain scoped name, it will be automatically prefixed with | 2372 /// the service name followed by "/". |
2384 * the service name followed by "/". | |
2385 */ | |
2386 core.List<core.String> logs; | 2373 core.List<core.String> logs; |
2387 /** | 2374 |
2388 * The monitored resource type. The type must be defined in the | 2375 /// The monitored resource type. The type must be defined in the |
2389 * Service.monitored_resources section. | 2376 /// Service.monitored_resources section. |
2390 */ | |
2391 core.String monitoredResource; | 2377 core.String monitoredResource; |
2392 | 2378 |
2393 LoggingDestination(); | 2379 LoggingDestination(); |
2394 | 2380 |
2395 LoggingDestination.fromJson(core.Map _json) { | 2381 LoggingDestination.fromJson(core.Map _json) { |
2396 if (_json.containsKey("logs")) { | 2382 if (_json.containsKey("logs")) { |
2397 logs = _json["logs"]; | 2383 logs = _json["logs"]; |
2398 } | 2384 } |
2399 if (_json.containsKey("monitoredResource")) { | 2385 if (_json.containsKey("monitoredResource")) { |
2400 monitoredResource = _json["monitoredResource"]; | 2386 monitoredResource = _json["monitoredResource"]; |
2401 } | 2387 } |
2402 } | 2388 } |
2403 | 2389 |
2404 core.Map<core.String, core.Object> toJson() { | 2390 core.Map<core.String, core.Object> toJson() { |
2405 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2391 final core.Map<core.String, core.Object> _json = |
| 2392 new core.Map<core.String, core.Object>(); |
2406 if (logs != null) { | 2393 if (logs != null) { |
2407 _json["logs"] = logs; | 2394 _json["logs"] = logs; |
2408 } | 2395 } |
2409 if (monitoredResource != null) { | 2396 if (monitoredResource != null) { |
2410 _json["monitoredResource"] = monitoredResource; | 2397 _json["monitoredResource"] = monitoredResource; |
2411 } | 2398 } |
2412 return _json; | 2399 return _json; |
2413 } | 2400 } |
2414 } | 2401 } |
2415 | 2402 |
2416 /** | 2403 /// Defines the Media configuration for a service in case of a download. |
2417 * Defines the Media configuration for a service in case of a download. | 2404 /// Use this only for Scotty Requests. Do not use this for media support using |
2418 * Use this only for Scotty Requests. Do not use this for media support using | 2405 /// Bytestream, add instead [][google.bytestream.RestByteStream] as an API to |
2419 * Bytestream, add instead [][google.bytestream.RestByteStream] as an API to | 2406 /// your configuration for Bytestream methods. |
2420 * your configuration for Bytestream methods. | |
2421 */ | |
2422 class MediaDownload { | 2407 class MediaDownload { |
2423 /** | 2408 /// A boolean that determines whether a notification for the completion of a |
2424 * A boolean that determines whether a notification for the completion of a | 2409 /// download should be sent to the backend. |
2425 * download should be sent to the backend. | |
2426 */ | |
2427 core.bool completeNotification; | 2410 core.bool completeNotification; |
2428 /** | 2411 |
2429 * DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED. | 2412 /// DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED. |
2430 * | 2413 /// |
2431 * Specify name of the download service if one is used for download. | 2414 /// Specify name of the download service if one is used for download. |
2432 */ | |
2433 core.String downloadService; | 2415 core.String downloadService; |
2434 /** Name of the Scotty dropzone to use for the current API. */ | 2416 |
| 2417 /// Name of the Scotty dropzone to use for the current API. |
2435 core.String dropzone; | 2418 core.String dropzone; |
2436 /** Whether download is enabled. */ | 2419 |
| 2420 /// Whether download is enabled. |
2437 core.bool enabled; | 2421 core.bool enabled; |
2438 /** | 2422 |
2439 * Optional maximum acceptable size for direct download. | 2423 /// Optional maximum acceptable size for direct download. |
2440 * The size is specified in bytes. | 2424 /// The size is specified in bytes. |
2441 */ | |
2442 core.String maxDirectDownloadSize; | 2425 core.String maxDirectDownloadSize; |
2443 /** | 2426 |
2444 * A boolean that determines if direct download from ESF should be used for | 2427 /// A boolean that determines if direct download from ESF should be used for |
2445 * download of this media. | 2428 /// download of this media. |
2446 */ | |
2447 core.bool useDirectDownload; | 2429 core.bool useDirectDownload; |
2448 | 2430 |
2449 MediaDownload(); | 2431 MediaDownload(); |
2450 | 2432 |
2451 MediaDownload.fromJson(core.Map _json) { | 2433 MediaDownload.fromJson(core.Map _json) { |
2452 if (_json.containsKey("completeNotification")) { | 2434 if (_json.containsKey("completeNotification")) { |
2453 completeNotification = _json["completeNotification"]; | 2435 completeNotification = _json["completeNotification"]; |
2454 } | 2436 } |
2455 if (_json.containsKey("downloadService")) { | 2437 if (_json.containsKey("downloadService")) { |
2456 downloadService = _json["downloadService"]; | 2438 downloadService = _json["downloadService"]; |
2457 } | 2439 } |
2458 if (_json.containsKey("dropzone")) { | 2440 if (_json.containsKey("dropzone")) { |
2459 dropzone = _json["dropzone"]; | 2441 dropzone = _json["dropzone"]; |
2460 } | 2442 } |
2461 if (_json.containsKey("enabled")) { | 2443 if (_json.containsKey("enabled")) { |
2462 enabled = _json["enabled"]; | 2444 enabled = _json["enabled"]; |
2463 } | 2445 } |
2464 if (_json.containsKey("maxDirectDownloadSize")) { | 2446 if (_json.containsKey("maxDirectDownloadSize")) { |
2465 maxDirectDownloadSize = _json["maxDirectDownloadSize"]; | 2447 maxDirectDownloadSize = _json["maxDirectDownloadSize"]; |
2466 } | 2448 } |
2467 if (_json.containsKey("useDirectDownload")) { | 2449 if (_json.containsKey("useDirectDownload")) { |
2468 useDirectDownload = _json["useDirectDownload"]; | 2450 useDirectDownload = _json["useDirectDownload"]; |
2469 } | 2451 } |
2470 } | 2452 } |
2471 | 2453 |
2472 core.Map<core.String, core.Object> toJson() { | 2454 core.Map<core.String, core.Object> toJson() { |
2473 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2455 final core.Map<core.String, core.Object> _json = |
| 2456 new core.Map<core.String, core.Object>(); |
2474 if (completeNotification != null) { | 2457 if (completeNotification != null) { |
2475 _json["completeNotification"] = completeNotification; | 2458 _json["completeNotification"] = completeNotification; |
2476 } | 2459 } |
2477 if (downloadService != null) { | 2460 if (downloadService != null) { |
2478 _json["downloadService"] = downloadService; | 2461 _json["downloadService"] = downloadService; |
2479 } | 2462 } |
2480 if (dropzone != null) { | 2463 if (dropzone != null) { |
2481 _json["dropzone"] = dropzone; | 2464 _json["dropzone"] = dropzone; |
2482 } | 2465 } |
2483 if (enabled != null) { | 2466 if (enabled != null) { |
2484 _json["enabled"] = enabled; | 2467 _json["enabled"] = enabled; |
2485 } | 2468 } |
2486 if (maxDirectDownloadSize != null) { | 2469 if (maxDirectDownloadSize != null) { |
2487 _json["maxDirectDownloadSize"] = maxDirectDownloadSize; | 2470 _json["maxDirectDownloadSize"] = maxDirectDownloadSize; |
2488 } | 2471 } |
2489 if (useDirectDownload != null) { | 2472 if (useDirectDownload != null) { |
2490 _json["useDirectDownload"] = useDirectDownload; | 2473 _json["useDirectDownload"] = useDirectDownload; |
2491 } | 2474 } |
2492 return _json; | 2475 return _json; |
2493 } | 2476 } |
2494 } | 2477 } |
2495 | 2478 |
2496 /** | 2479 /// Defines the Media configuration for a service in case of an upload. |
2497 * Defines the Media configuration for a service in case of an upload. | 2480 /// Use this only for Scotty Requests. Do not use this for media support using |
2498 * Use this only for Scotty Requests. Do not use this for media support using | 2481 /// Bytestream, add instead [][google.bytestream.RestByteStream] as an API to |
2499 * Bytestream, add instead [][google.bytestream.RestByteStream] as an API to | 2482 /// your configuration for Bytestream methods. |
2500 * your configuration for Bytestream methods. | |
2501 */ | |
2502 class MediaUpload { | 2483 class MediaUpload { |
2503 /** | 2484 /// A boolean that determines whether a notification for the completion of an |
2504 * A boolean that determines whether a notification for the completion of an | 2485 /// upload should be sent to the backend. These notifications will not be |
2505 * upload should be sent to the backend. These notifications will not be seen | 2486 /// seen |
2506 * by the client and will not consume quota. | 2487 /// by the client and will not consume quota. |
2507 */ | |
2508 core.bool completeNotification; | 2488 core.bool completeNotification; |
2509 /** Name of the Scotty dropzone to use for the current API. */ | 2489 |
| 2490 /// Name of the Scotty dropzone to use for the current API. |
2510 core.String dropzone; | 2491 core.String dropzone; |
2511 /** Whether upload is enabled. */ | 2492 |
| 2493 /// Whether upload is enabled. |
2512 core.bool enabled; | 2494 core.bool enabled; |
2513 /** | 2495 |
2514 * Optional maximum acceptable size for an upload. | 2496 /// Optional maximum acceptable size for an upload. |
2515 * The size is specified in bytes. | 2497 /// The size is specified in bytes. |
2516 */ | |
2517 core.String maxSize; | 2498 core.String maxSize; |
2518 /** | 2499 |
2519 * An array of mimetype patterns. Esf will only accept uploads that match one | 2500 /// An array of mimetype patterns. Esf will only accept uploads that match |
2520 * of the given patterns. | 2501 /// one |
2521 */ | 2502 /// of the given patterns. |
2522 core.List<core.String> mimeTypes; | 2503 core.List<core.String> mimeTypes; |
2523 /** | 2504 |
2524 * Whether to receive a notification for progress changes of media upload. | 2505 /// Whether to receive a notification for progress changes of media upload. |
2525 */ | |
2526 core.bool progressNotification; | 2506 core.bool progressNotification; |
2527 /** Whether to receive a notification on the start of media upload. */ | 2507 |
| 2508 /// Whether to receive a notification on the start of media upload. |
2528 core.bool startNotification; | 2509 core.bool startNotification; |
2529 /** | 2510 |
2530 * DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED. | 2511 /// DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED. |
2531 * | 2512 /// |
2532 * Specify name of the upload service if one is used for upload. | 2513 /// Specify name of the upload service if one is used for upload. |
2533 */ | |
2534 core.String uploadService; | 2514 core.String uploadService; |
2535 | 2515 |
2536 MediaUpload(); | 2516 MediaUpload(); |
2537 | 2517 |
2538 MediaUpload.fromJson(core.Map _json) { | 2518 MediaUpload.fromJson(core.Map _json) { |
2539 if (_json.containsKey("completeNotification")) { | 2519 if (_json.containsKey("completeNotification")) { |
2540 completeNotification = _json["completeNotification"]; | 2520 completeNotification = _json["completeNotification"]; |
2541 } | 2521 } |
2542 if (_json.containsKey("dropzone")) { | 2522 if (_json.containsKey("dropzone")) { |
2543 dropzone = _json["dropzone"]; | 2523 dropzone = _json["dropzone"]; |
(...skipping 12 matching lines...) Expand all Loading... |
2556 } | 2536 } |
2557 if (_json.containsKey("startNotification")) { | 2537 if (_json.containsKey("startNotification")) { |
2558 startNotification = _json["startNotification"]; | 2538 startNotification = _json["startNotification"]; |
2559 } | 2539 } |
2560 if (_json.containsKey("uploadService")) { | 2540 if (_json.containsKey("uploadService")) { |
2561 uploadService = _json["uploadService"]; | 2541 uploadService = _json["uploadService"]; |
2562 } | 2542 } |
2563 } | 2543 } |
2564 | 2544 |
2565 core.Map<core.String, core.Object> toJson() { | 2545 core.Map<core.String, core.Object> toJson() { |
2566 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2546 final core.Map<core.String, core.Object> _json = |
| 2547 new core.Map<core.String, core.Object>(); |
2567 if (completeNotification != null) { | 2548 if (completeNotification != null) { |
2568 _json["completeNotification"] = completeNotification; | 2549 _json["completeNotification"] = completeNotification; |
2569 } | 2550 } |
2570 if (dropzone != null) { | 2551 if (dropzone != null) { |
2571 _json["dropzone"] = dropzone; | 2552 _json["dropzone"] = dropzone; |
2572 } | 2553 } |
2573 if (enabled != null) { | 2554 if (enabled != null) { |
2574 _json["enabled"] = enabled; | 2555 _json["enabled"] = enabled; |
2575 } | 2556 } |
2576 if (maxSize != null) { | 2557 if (maxSize != null) { |
2577 _json["maxSize"] = maxSize; | 2558 _json["maxSize"] = maxSize; |
2578 } | 2559 } |
2579 if (mimeTypes != null) { | 2560 if (mimeTypes != null) { |
2580 _json["mimeTypes"] = mimeTypes; | 2561 _json["mimeTypes"] = mimeTypes; |
2581 } | 2562 } |
2582 if (progressNotification != null) { | 2563 if (progressNotification != null) { |
2583 _json["progressNotification"] = progressNotification; | 2564 _json["progressNotification"] = progressNotification; |
2584 } | 2565 } |
2585 if (startNotification != null) { | 2566 if (startNotification != null) { |
2586 _json["startNotification"] = startNotification; | 2567 _json["startNotification"] = startNotification; |
2587 } | 2568 } |
2588 if (uploadService != null) { | 2569 if (uploadService != null) { |
2589 _json["uploadService"] = uploadService; | 2570 _json["uploadService"] = uploadService; |
2590 } | 2571 } |
2591 return _json; | 2572 return _json; |
2592 } | 2573 } |
2593 } | 2574 } |
2594 | 2575 |
2595 /** Method represents a method of an API interface. */ | 2576 /// Method represents a method of an API interface. |
2596 class Method { | 2577 class Method { |
2597 /** The simple name of this method. */ | 2578 /// The simple name of this method. |
2598 core.String name; | 2579 core.String name; |
2599 /** Any metadata attached to the method. */ | 2580 |
| 2581 /// Any metadata attached to the method. |
2600 core.List<Option> options; | 2582 core.List<Option> options; |
2601 /** If true, the request is streamed. */ | 2583 |
| 2584 /// If true, the request is streamed. |
2602 core.bool requestStreaming; | 2585 core.bool requestStreaming; |
2603 /** A URL of the input message type. */ | 2586 |
| 2587 /// A URL of the input message type. |
2604 core.String requestTypeUrl; | 2588 core.String requestTypeUrl; |
2605 /** If true, the response is streamed. */ | 2589 |
| 2590 /// If true, the response is streamed. |
2606 core.bool responseStreaming; | 2591 core.bool responseStreaming; |
2607 /** The URL of the output message type. */ | 2592 |
| 2593 /// The URL of the output message type. |
2608 core.String responseTypeUrl; | 2594 core.String responseTypeUrl; |
2609 /** | 2595 |
2610 * The source syntax of this method. | 2596 /// The source syntax of this method. |
2611 * Possible string values are: | 2597 /// Possible string values are: |
2612 * - "SYNTAX_PROTO2" : Syntax `proto2`. | 2598 /// - "SYNTAX_PROTO2" : Syntax `proto2`. |
2613 * - "SYNTAX_PROTO3" : Syntax `proto3`. | 2599 /// - "SYNTAX_PROTO3" : Syntax `proto3`. |
2614 */ | |
2615 core.String syntax; | 2600 core.String syntax; |
2616 | 2601 |
2617 Method(); | 2602 Method(); |
2618 | 2603 |
2619 Method.fromJson(core.Map _json) { | 2604 Method.fromJson(core.Map _json) { |
2620 if (_json.containsKey("name")) { | 2605 if (_json.containsKey("name")) { |
2621 name = _json["name"]; | 2606 name = _json["name"]; |
2622 } | 2607 } |
2623 if (_json.containsKey("options")) { | 2608 if (_json.containsKey("options")) { |
2624 options = _json["options"].map((value) => new Option.fromJson(value)).toLi
st(); | 2609 options = |
| 2610 _json["options"].map((value) => new Option.fromJson(value)).toList(); |
2625 } | 2611 } |
2626 if (_json.containsKey("requestStreaming")) { | 2612 if (_json.containsKey("requestStreaming")) { |
2627 requestStreaming = _json["requestStreaming"]; | 2613 requestStreaming = _json["requestStreaming"]; |
2628 } | 2614 } |
2629 if (_json.containsKey("requestTypeUrl")) { | 2615 if (_json.containsKey("requestTypeUrl")) { |
2630 requestTypeUrl = _json["requestTypeUrl"]; | 2616 requestTypeUrl = _json["requestTypeUrl"]; |
2631 } | 2617 } |
2632 if (_json.containsKey("responseStreaming")) { | 2618 if (_json.containsKey("responseStreaming")) { |
2633 responseStreaming = _json["responseStreaming"]; | 2619 responseStreaming = _json["responseStreaming"]; |
2634 } | 2620 } |
2635 if (_json.containsKey("responseTypeUrl")) { | 2621 if (_json.containsKey("responseTypeUrl")) { |
2636 responseTypeUrl = _json["responseTypeUrl"]; | 2622 responseTypeUrl = _json["responseTypeUrl"]; |
2637 } | 2623 } |
2638 if (_json.containsKey("syntax")) { | 2624 if (_json.containsKey("syntax")) { |
2639 syntax = _json["syntax"]; | 2625 syntax = _json["syntax"]; |
2640 } | 2626 } |
2641 } | 2627 } |
2642 | 2628 |
2643 core.Map<core.String, core.Object> toJson() { | 2629 core.Map<core.String, core.Object> toJson() { |
2644 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2630 final core.Map<core.String, core.Object> _json = |
| 2631 new core.Map<core.String, core.Object>(); |
2645 if (name != null) { | 2632 if (name != null) { |
2646 _json["name"] = name; | 2633 _json["name"] = name; |
2647 } | 2634 } |
2648 if (options != null) { | 2635 if (options != null) { |
2649 _json["options"] = options.map((value) => (value).toJson()).toList(); | 2636 _json["options"] = options.map((value) => (value).toJson()).toList(); |
2650 } | 2637 } |
2651 if (requestStreaming != null) { | 2638 if (requestStreaming != null) { |
2652 _json["requestStreaming"] = requestStreaming; | 2639 _json["requestStreaming"] = requestStreaming; |
2653 } | 2640 } |
2654 if (requestTypeUrl != null) { | 2641 if (requestTypeUrl != null) { |
2655 _json["requestTypeUrl"] = requestTypeUrl; | 2642 _json["requestTypeUrl"] = requestTypeUrl; |
2656 } | 2643 } |
2657 if (responseStreaming != null) { | 2644 if (responseStreaming != null) { |
2658 _json["responseStreaming"] = responseStreaming; | 2645 _json["responseStreaming"] = responseStreaming; |
2659 } | 2646 } |
2660 if (responseTypeUrl != null) { | 2647 if (responseTypeUrl != null) { |
2661 _json["responseTypeUrl"] = responseTypeUrl; | 2648 _json["responseTypeUrl"] = responseTypeUrl; |
2662 } | 2649 } |
2663 if (syntax != null) { | 2650 if (syntax != null) { |
2664 _json["syntax"] = syntax; | 2651 _json["syntax"] = syntax; |
2665 } | 2652 } |
2666 return _json; | 2653 return _json; |
2667 } | 2654 } |
2668 } | 2655 } |
2669 | 2656 |
2670 /** | 2657 /// Defines a metric type and its schema. Once a metric descriptor is created, |
2671 * Defines a metric type and its schema. Once a metric descriptor is created, | 2658 /// deleting or altering it stops data collection and makes the metric type's |
2672 * deleting or altering it stops data collection and makes the metric type's | 2659 /// existing data unusable. |
2673 * existing data unusable. | |
2674 */ | |
2675 class MetricDescriptor { | 2660 class MetricDescriptor { |
2676 /** | 2661 /// A detailed description of the metric, which can be used in documentation. |
2677 * A detailed description of the metric, which can be used in documentation. | |
2678 */ | |
2679 core.String description; | 2662 core.String description; |
2680 /** | 2663 |
2681 * A concise name for the metric, which can be displayed in user interfaces. | 2664 /// A concise name for the metric, which can be displayed in user interfaces. |
2682 * Use sentence case without an ending period, for example "Request count". | 2665 /// Use sentence case without an ending period, for example "Request count". |
2683 */ | |
2684 core.String displayName; | 2666 core.String displayName; |
2685 /** | 2667 |
2686 * The set of labels that can be used to describe a specific | 2668 /// The set of labels that can be used to describe a specific |
2687 * instance of this metric type. For example, the | 2669 /// instance of this metric type. For example, the |
2688 * `appengine.googleapis.com/http/server/response_latencies` metric | 2670 /// `appengine.googleapis.com/http/server/response_latencies` metric |
2689 * type has a label for the HTTP response code, `response_code`, so | 2671 /// type has a label for the HTTP response code, `response_code`, so |
2690 * you can look at latencies for successful responses or just | 2672 /// you can look at latencies for successful responses or just |
2691 * for responses that failed. | 2673 /// for responses that failed. |
2692 */ | |
2693 core.List<LabelDescriptor> labels; | 2674 core.List<LabelDescriptor> labels; |
2694 /** | 2675 |
2695 * Whether the metric records instantaneous values, changes to a value, etc. | 2676 /// Whether the metric records instantaneous values, changes to a value, etc. |
2696 * Some combinations of `metric_kind` and `value_type` might not be supported. | 2677 /// Some combinations of `metric_kind` and `value_type` might not be |
2697 * Possible string values are: | 2678 /// supported. |
2698 * - "METRIC_KIND_UNSPECIFIED" : Do not use this default value. | 2679 /// Possible string values are: |
2699 * - "GAUGE" : An instantaneous measurement of a value. | 2680 /// - "METRIC_KIND_UNSPECIFIED" : Do not use this default value. |
2700 * - "DELTA" : The change in a value during a time interval. | 2681 /// - "GAUGE" : An instantaneous measurement of a value. |
2701 * - "CUMULATIVE" : A value accumulated over a time interval. Cumulative | 2682 /// - "DELTA" : The change in a value during a time interval. |
2702 * measurements in a time series should have the same start time | 2683 /// - "CUMULATIVE" : A value accumulated over a time interval. Cumulative |
2703 * and increasing end times, until an event resets the cumulative | 2684 /// measurements in a time series should have the same start time |
2704 * value to zero and sets a new start time for the following | 2685 /// and increasing end times, until an event resets the cumulative |
2705 * points. | 2686 /// value to zero and sets a new start time for the following |
2706 */ | 2687 /// points. |
2707 core.String metricKind; | 2688 core.String metricKind; |
2708 /** | 2689 |
2709 * The resource name of the metric descriptor. Depending on the | 2690 /// The resource name of the metric descriptor. Depending on the |
2710 * implementation, the name typically includes: (1) the parent resource name | 2691 /// implementation, the name typically includes: (1) the parent resource name |
2711 * that defines the scope of the metric type or of its data; and (2) the | 2692 /// that defines the scope of the metric type or of its data; and (2) the |
2712 * metric's URL-encoded type, which also appears in the `type` field of this | 2693 /// metric's URL-encoded type, which also appears in the `type` field of this |
2713 * descriptor. For example, following is the resource name of a custom | 2694 /// descriptor. For example, following is the resource name of a custom |
2714 * metric within the GCP project `my-project-id`: | 2695 /// metric within the GCP project `my-project-id`: |
2715 * | 2696 /// |
2716 * "projects/my-project-id/metricDescriptors/custom.googleapis.com%2Finvoice%2
Fpaid%2Famount" | 2697 /// "projects/my-project-id/metricDescriptors/custom.googleapis.com%2Finvoice%
2Fpaid%2Famount" |
2717 */ | |
2718 core.String name; | 2698 core.String name; |
2719 /** | 2699 |
2720 * The metric type, including its DNS name prefix. The type is not | 2700 /// The metric type, including its DNS name prefix. The type is not |
2721 * URL-encoded. All user-defined custom metric types have the DNS name | 2701 /// URL-encoded. All user-defined custom metric types have the DNS name |
2722 * `custom.googleapis.com`. Metric types should use a natural hierarchical | 2702 /// `custom.googleapis.com`. Metric types should use a natural hierarchical |
2723 * grouping. For example: | 2703 /// grouping. For example: |
2724 * | 2704 /// |
2725 * "custom.googleapis.com/invoice/paid/amount" | 2705 /// "custom.googleapis.com/invoice/paid/amount" |
2726 * "appengine.googleapis.com/http/server/response_latencies" | 2706 /// "appengine.googleapis.com/http/server/response_latencies" |
2727 */ | |
2728 core.String type; | 2707 core.String type; |
2729 /** | 2708 |
2730 * The unit in which the metric value is reported. It is only applicable | 2709 /// The unit in which the metric value is reported. It is only applicable |
2731 * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The | 2710 /// if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The |
2732 * supported units are a subset of [The Unified Code for Units of | 2711 /// supported units are a subset of [The Unified Code for Units of |
2733 * Measure](http://unitsofmeasure.org/ucum.html) standard: | 2712 /// Measure](http://unitsofmeasure.org/ucum.html) standard: |
2734 * | 2713 /// |
2735 * **Basic units (UNIT)** | 2714 /// **Basic units (UNIT)** |
2736 * | 2715 /// |
2737 * * `bit` bit | 2716 /// * `bit` bit |
2738 * * `By` byte | 2717 /// * `By` byte |
2739 * * `s` second | 2718 /// * `s` second |
2740 * * `min` minute | 2719 /// * `min` minute |
2741 * * `h` hour | 2720 /// * `h` hour |
2742 * * `d` day | 2721 /// * `d` day |
2743 * | 2722 /// |
2744 * **Prefixes (PREFIX)** | 2723 /// **Prefixes (PREFIX)** |
2745 * | 2724 /// |
2746 * * `k` kilo (10**3) | 2725 /// * `k` kilo (10**3) |
2747 * * `M` mega (10**6) | 2726 /// * `M` mega (10**6) |
2748 * * `G` giga (10**9) | 2727 /// * `G` giga (10**9) |
2749 * * `T` tera (10**12) | 2728 /// * `T` tera (10**12) |
2750 * * `P` peta (10**15) | 2729 /// * `P` peta (10**15) |
2751 * * `E` exa (10**18) | 2730 /// * `E` exa (10**18) |
2752 * * `Z` zetta (10**21) | 2731 /// * `Z` zetta (10**21) |
2753 * * `Y` yotta (10**24) | 2732 /// * `Y` yotta (10**24) |
2754 * * `m` milli (10**-3) | 2733 /// * `m` milli (10**-3) |
2755 * * `u` micro (10**-6) | 2734 /// * `u` micro (10**-6) |
2756 * * `n` nano (10**-9) | 2735 /// * `n` nano (10**-9) |
2757 * * `p` pico (10**-12) | 2736 /// * `p` pico (10**-12) |
2758 * * `f` femto (10**-15) | 2737 /// * `f` femto (10**-15) |
2759 * * `a` atto (10**-18) | 2738 /// * `a` atto (10**-18) |
2760 * * `z` zepto (10**-21) | 2739 /// * `z` zepto (10**-21) |
2761 * * `y` yocto (10**-24) | 2740 /// * `y` yocto (10**-24) |
2762 * * `Ki` kibi (2**10) | 2741 /// * `Ki` kibi (2**10) |
2763 * * `Mi` mebi (2**20) | 2742 /// * `Mi` mebi (2**20) |
2764 * * `Gi` gibi (2**30) | 2743 /// * `Gi` gibi (2**30) |
2765 * * `Ti` tebi (2**40) | 2744 /// * `Ti` tebi (2**40) |
2766 * | 2745 /// |
2767 * **Grammar** | 2746 /// **Grammar** |
2768 * | 2747 /// |
2769 * The grammar includes the dimensionless unit `1`, such as `1/s`. | 2748 /// The grammar includes the dimensionless unit `1`, such as `1/s`. |
2770 * | 2749 /// |
2771 * The grammar also includes these connectors: | 2750 /// The grammar also includes these connectors: |
2772 * | 2751 /// |
2773 * * `/` division (as an infix operator, e.g. `1/s`). | 2752 /// * `/` division (as an infix operator, e.g. `1/s`). |
2774 * * `.` multiplication (as an infix operator, e.g. `GBy.d`) | 2753 /// * `.` multiplication (as an infix operator, e.g. `GBy.d`) |
2775 * | 2754 /// |
2776 * The grammar for a unit is as follows: | 2755 /// The grammar for a unit is as follows: |
2777 * | 2756 /// |
2778 * Expression = Component { "." Component } { "/" Component } ; | 2757 /// Expression = Component { "." Component } { "/" Component } ; |
2779 * | 2758 /// |
2780 * Component = [ PREFIX ] UNIT [ Annotation ] | 2759 /// Component = [ PREFIX ] UNIT [ Annotation ] |
2781 * | Annotation | 2760 /// | Annotation |
2782 * | "1" | 2761 /// | "1" |
2783 * ; | 2762 /// ; |
2784 * | 2763 /// |
2785 * Annotation = "{" NAME "}" ; | 2764 /// Annotation = "{" NAME "}" ; |
2786 * | 2765 /// |
2787 * Notes: | 2766 /// Notes: |
2788 * | 2767 /// |
2789 * * `Annotation` is just a comment if it follows a `UNIT` and is | 2768 /// * `Annotation` is just a comment if it follows a `UNIT` and is |
2790 * equivalent to `1` if it is used alone. For examples, | 2769 /// equivalent to `1` if it is used alone. For examples, |
2791 * `{requests}/s == 1/s`, `By{transmitted}/s == By/s`. | 2770 /// `{requests}/s == 1/s`, `By{transmitted}/s == By/s`. |
2792 * * `NAME` is a sequence of non-blank printable ASCII characters not | 2771 /// * `NAME` is a sequence of non-blank printable ASCII characters not |
2793 * containing '{' or '}'. | 2772 /// containing '{' or '}'. |
2794 */ | |
2795 core.String unit; | 2773 core.String unit; |
2796 /** | 2774 |
2797 * Whether the measurement is an integer, a floating-point number, etc. | 2775 /// Whether the measurement is an integer, a floating-point number, etc. |
2798 * Some combinations of `metric_kind` and `value_type` might not be supported. | 2776 /// Some combinations of `metric_kind` and `value_type` might not be |
2799 * Possible string values are: | 2777 /// supported. |
2800 * - "VALUE_TYPE_UNSPECIFIED" : Do not use this default value. | 2778 /// Possible string values are: |
2801 * - "BOOL" : The value is a boolean. | 2779 /// - "VALUE_TYPE_UNSPECIFIED" : Do not use this default value. |
2802 * This value type can be used only if the metric kind is `GAUGE`. | 2780 /// - "BOOL" : The value is a boolean. |
2803 * - "INT64" : The value is a signed 64-bit integer. | 2781 /// This value type can be used only if the metric kind is `GAUGE`. |
2804 * - "DOUBLE" : The value is a double precision floating point number. | 2782 /// - "INT64" : The value is a signed 64-bit integer. |
2805 * - "STRING" : The value is a text string. | 2783 /// - "DOUBLE" : The value is a double precision floating point number. |
2806 * This value type can be used only if the metric kind is `GAUGE`. | 2784 /// - "STRING" : The value is a text string. |
2807 * - "DISTRIBUTION" : The value is a `Distribution`. | 2785 /// This value type can be used only if the metric kind is `GAUGE`. |
2808 * - "MONEY" : The value is money. | 2786 /// - "DISTRIBUTION" : The value is a `Distribution`. |
2809 */ | 2787 /// - "MONEY" : The value is money. |
2810 core.String valueType; | 2788 core.String valueType; |
2811 | 2789 |
2812 MetricDescriptor(); | 2790 MetricDescriptor(); |
2813 | 2791 |
2814 MetricDescriptor.fromJson(core.Map _json) { | 2792 MetricDescriptor.fromJson(core.Map _json) { |
2815 if (_json.containsKey("description")) { | 2793 if (_json.containsKey("description")) { |
2816 description = _json["description"]; | 2794 description = _json["description"]; |
2817 } | 2795 } |
2818 if (_json.containsKey("displayName")) { | 2796 if (_json.containsKey("displayName")) { |
2819 displayName = _json["displayName"]; | 2797 displayName = _json["displayName"]; |
2820 } | 2798 } |
2821 if (_json.containsKey("labels")) { | 2799 if (_json.containsKey("labels")) { |
2822 labels = _json["labels"].map((value) => new LabelDescriptor.fromJson(value
)).toList(); | 2800 labels = _json["labels"] |
| 2801 .map((value) => new LabelDescriptor.fromJson(value)) |
| 2802 .toList(); |
2823 } | 2803 } |
2824 if (_json.containsKey("metricKind")) { | 2804 if (_json.containsKey("metricKind")) { |
2825 metricKind = _json["metricKind"]; | 2805 metricKind = _json["metricKind"]; |
2826 } | 2806 } |
2827 if (_json.containsKey("name")) { | 2807 if (_json.containsKey("name")) { |
2828 name = _json["name"]; | 2808 name = _json["name"]; |
2829 } | 2809 } |
2830 if (_json.containsKey("type")) { | 2810 if (_json.containsKey("type")) { |
2831 type = _json["type"]; | 2811 type = _json["type"]; |
2832 } | 2812 } |
2833 if (_json.containsKey("unit")) { | 2813 if (_json.containsKey("unit")) { |
2834 unit = _json["unit"]; | 2814 unit = _json["unit"]; |
2835 } | 2815 } |
2836 if (_json.containsKey("valueType")) { | 2816 if (_json.containsKey("valueType")) { |
2837 valueType = _json["valueType"]; | 2817 valueType = _json["valueType"]; |
2838 } | 2818 } |
2839 } | 2819 } |
2840 | 2820 |
2841 core.Map<core.String, core.Object> toJson() { | 2821 core.Map<core.String, core.Object> toJson() { |
2842 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2822 final core.Map<core.String, core.Object> _json = |
| 2823 new core.Map<core.String, core.Object>(); |
2843 if (description != null) { | 2824 if (description != null) { |
2844 _json["description"] = description; | 2825 _json["description"] = description; |
2845 } | 2826 } |
2846 if (displayName != null) { | 2827 if (displayName != null) { |
2847 _json["displayName"] = displayName; | 2828 _json["displayName"] = displayName; |
2848 } | 2829 } |
2849 if (labels != null) { | 2830 if (labels != null) { |
2850 _json["labels"] = labels.map((value) => (value).toJson()).toList(); | 2831 _json["labels"] = labels.map((value) => (value).toJson()).toList(); |
2851 } | 2832 } |
2852 if (metricKind != null) { | 2833 if (metricKind != null) { |
2853 _json["metricKind"] = metricKind; | 2834 _json["metricKind"] = metricKind; |
2854 } | 2835 } |
2855 if (name != null) { | 2836 if (name != null) { |
2856 _json["name"] = name; | 2837 _json["name"] = name; |
2857 } | 2838 } |
2858 if (type != null) { | 2839 if (type != null) { |
2859 _json["type"] = type; | 2840 _json["type"] = type; |
2860 } | 2841 } |
2861 if (unit != null) { | 2842 if (unit != null) { |
2862 _json["unit"] = unit; | 2843 _json["unit"] = unit; |
2863 } | 2844 } |
2864 if (valueType != null) { | 2845 if (valueType != null) { |
2865 _json["valueType"] = valueType; | 2846 _json["valueType"] = valueType; |
2866 } | 2847 } |
2867 return _json; | 2848 return _json; |
2868 } | 2849 } |
2869 } | 2850 } |
2870 | 2851 |
2871 /** | 2852 /// Bind API methods to metrics. Binding a method to a metric causes that |
2872 * Bind API methods to metrics. Binding a method to a metric causes that | 2853 /// metric's configured quota behaviors to apply to the method call. |
2873 * metric's configured quota behaviors to apply to the method call. | |
2874 */ | |
2875 class MetricRule { | 2854 class MetricRule { |
2876 /** | 2855 /// Metrics to update when the selected methods are called, and the |
2877 * Metrics to update when the selected methods are called, and the associated | 2856 /// associated |
2878 * cost applied to each metric. | 2857 /// cost applied to each metric. |
2879 * | 2858 /// |
2880 * The key of the map is the metric name, and the values are the amount | 2859 /// The key of the map is the metric name, and the values are the amount |
2881 * increased for the metric against which the quota limits are defined. | 2860 /// increased for the metric against which the quota limits are defined. |
2882 * The value must not be negative. | 2861 /// The value must not be negative. |
2883 */ | |
2884 core.Map<core.String, core.String> metricCosts; | 2862 core.Map<core.String, core.String> metricCosts; |
2885 /** | 2863 |
2886 * Selects the methods to which this rule applies. | 2864 /// Selects the methods to which this rule applies. |
2887 * | 2865 /// |
2888 * Refer to selector for syntax details. | 2866 /// Refer to selector for syntax details. |
2889 */ | |
2890 core.String selector; | 2867 core.String selector; |
2891 | 2868 |
2892 MetricRule(); | 2869 MetricRule(); |
2893 | 2870 |
2894 MetricRule.fromJson(core.Map _json) { | 2871 MetricRule.fromJson(core.Map _json) { |
2895 if (_json.containsKey("metricCosts")) { | 2872 if (_json.containsKey("metricCosts")) { |
2896 metricCosts = _json["metricCosts"]; | 2873 metricCosts = _json["metricCosts"]; |
2897 } | 2874 } |
2898 if (_json.containsKey("selector")) { | 2875 if (_json.containsKey("selector")) { |
2899 selector = _json["selector"]; | 2876 selector = _json["selector"]; |
2900 } | 2877 } |
2901 } | 2878 } |
2902 | 2879 |
2903 core.Map<core.String, core.Object> toJson() { | 2880 core.Map<core.String, core.Object> toJson() { |
2904 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2881 final core.Map<core.String, core.Object> _json = |
| 2882 new core.Map<core.String, core.Object>(); |
2905 if (metricCosts != null) { | 2883 if (metricCosts != null) { |
2906 _json["metricCosts"] = metricCosts; | 2884 _json["metricCosts"] = metricCosts; |
2907 } | 2885 } |
2908 if (selector != null) { | 2886 if (selector != null) { |
2909 _json["selector"] = selector; | 2887 _json["selector"] = selector; |
2910 } | 2888 } |
2911 return _json; | 2889 return _json; |
2912 } | 2890 } |
2913 } | 2891 } |
2914 | 2892 |
2915 /** | 2893 /// Declares an API Interface to be included in this interface. The including |
2916 * Declares an API Interface to be included in this interface. The including | 2894 /// interface must redeclare all the methods from the included interface, but |
2917 * interface must redeclare all the methods from the included interface, but | 2895 /// documentation and options are inherited as follows: |
2918 * documentation and options are inherited as follows: | 2896 /// |
2919 * | 2897 /// - If after comment and whitespace stripping, the documentation |
2920 * - If after comment and whitespace stripping, the documentation | 2898 /// string of the redeclared method is empty, it will be inherited |
2921 * string of the redeclared method is empty, it will be inherited | 2899 /// from the original method. |
2922 * from the original method. | 2900 /// |
2923 * | 2901 /// - Each annotation belonging to the service config (http, |
2924 * - Each annotation belonging to the service config (http, | 2902 /// visibility) which is not set in the redeclared method will be |
2925 * visibility) which is not set in the redeclared method will be | 2903 /// inherited. |
2926 * inherited. | 2904 /// |
2927 * | 2905 /// - If an http annotation is inherited, the path pattern will be |
2928 * - If an http annotation is inherited, the path pattern will be | 2906 /// modified as follows. Any version prefix will be replaced by the |
2929 * modified as follows. Any version prefix will be replaced by the | 2907 /// version of the including interface plus the root path if |
2930 * version of the including interface plus the root path if | 2908 /// specified. |
2931 * specified. | 2909 /// |
2932 * | 2910 /// Example of a simple mixin: |
2933 * Example of a simple mixin: | 2911 /// |
2934 * | 2912 /// package google.acl.v1; |
2935 * package google.acl.v1; | 2913 /// service AccessControl { |
2936 * service AccessControl { | 2914 /// // Get the underlying ACL object. |
2937 * // Get the underlying ACL object. | 2915 /// rpc GetAcl(GetAclRequest) returns (Acl) { |
2938 * rpc GetAcl(GetAclRequest) returns (Acl) { | 2916 /// option (google.api.http).get = "/v1/{resource=**}:getAcl"; |
2939 * option (google.api.http).get = "/v1/{resource=**}:getAcl"; | 2917 /// } |
2940 * } | 2918 /// } |
2941 * } | 2919 /// |
2942 * | 2920 /// package google.storage.v2; |
2943 * package google.storage.v2; | 2921 /// service Storage { |
2944 * service Storage { | 2922 /// // rpc GetAcl(GetAclRequest) returns (Acl); |
2945 * // rpc GetAcl(GetAclRequest) returns (Acl); | 2923 /// |
2946 * | 2924 /// // Get a data record. |
2947 * // Get a data record. | 2925 /// rpc GetData(GetDataRequest) returns (Data) { |
2948 * rpc GetData(GetDataRequest) returns (Data) { | 2926 /// option (google.api.http).get = "/v2/{resource=**}"; |
2949 * option (google.api.http).get = "/v2/{resource=**}"; | 2927 /// } |
2950 * } | 2928 /// } |
2951 * } | 2929 /// |
2952 * | 2930 /// Example of a mixin configuration: |
2953 * Example of a mixin configuration: | 2931 /// |
2954 * | 2932 /// apis: |
2955 * apis: | 2933 /// - name: google.storage.v2.Storage |
2956 * - name: google.storage.v2.Storage | 2934 /// mixins: |
2957 * mixins: | 2935 /// - name: google.acl.v1.AccessControl |
2958 * - name: google.acl.v1.AccessControl | 2936 /// |
2959 * | 2937 /// The mixin construct implies that all methods in `AccessControl` are |
2960 * The mixin construct implies that all methods in `AccessControl` are | 2938 /// also declared with same name and request/response types in |
2961 * also declared with same name and request/response types in | 2939 /// `Storage`. A documentation generator or annotation processor will |
2962 * `Storage`. A documentation generator or annotation processor will | 2940 /// see the effective `Storage.GetAcl` method after inherting |
2963 * see the effective `Storage.GetAcl` method after inherting | 2941 /// documentation and annotations as follows: |
2964 * documentation and annotations as follows: | 2942 /// |
2965 * | 2943 /// service Storage { |
2966 * service Storage { | 2944 /// // Get the underlying ACL object. |
2967 * // Get the underlying ACL object. | 2945 /// rpc GetAcl(GetAclRequest) returns (Acl) { |
2968 * rpc GetAcl(GetAclRequest) returns (Acl) { | 2946 /// option (google.api.http).get = "/v2/{resource=**}:getAcl"; |
2969 * option (google.api.http).get = "/v2/{resource=**}:getAcl"; | 2947 /// } |
2970 * } | 2948 /// ... |
2971 * ... | 2949 /// } |
2972 * } | 2950 /// |
2973 * | 2951 /// Note how the version in the path pattern changed from `v1` to `v2`. |
2974 * Note how the version in the path pattern changed from `v1` to `v2`. | 2952 /// |
2975 * | 2953 /// If the `root` field in the mixin is specified, it should be a |
2976 * If the `root` field in the mixin is specified, it should be a | 2954 /// relative path under which inherited HTTP paths are placed. Example: |
2977 * relative path under which inherited HTTP paths are placed. Example: | 2955 /// |
2978 * | 2956 /// apis: |
2979 * apis: | 2957 /// - name: google.storage.v2.Storage |
2980 * - name: google.storage.v2.Storage | 2958 /// mixins: |
2981 * mixins: | 2959 /// - name: google.acl.v1.AccessControl |
2982 * - name: google.acl.v1.AccessControl | 2960 /// root: acls |
2983 * root: acls | 2961 /// |
2984 * | 2962 /// This implies the following inherited HTTP annotation: |
2985 * This implies the following inherited HTTP annotation: | 2963 /// |
2986 * | 2964 /// service Storage { |
2987 * service Storage { | 2965 /// // Get the underlying ACL object. |
2988 * // Get the underlying ACL object. | 2966 /// rpc GetAcl(GetAclRequest) returns (Acl) { |
2989 * rpc GetAcl(GetAclRequest) returns (Acl) { | 2967 /// option (google.api.http).get = "/v2/acls/{resource=**}:getAcl"; |
2990 * option (google.api.http).get = "/v2/acls/{resource=**}:getAcl"; | 2968 /// } |
2991 * } | 2969 /// ... |
2992 * ... | 2970 /// } |
2993 * } | |
2994 */ | |
2995 class Mixin { | 2971 class Mixin { |
2996 /** The fully qualified name of the interface which is included. */ | 2972 /// The fully qualified name of the interface which is included. |
2997 core.String name; | 2973 core.String name; |
2998 /** | 2974 |
2999 * If non-empty specifies a path under which inherited HTTP paths | 2975 /// If non-empty specifies a path under which inherited HTTP paths |
3000 * are rooted. | 2976 /// are rooted. |
3001 */ | |
3002 core.String root; | 2977 core.String root; |
3003 | 2978 |
3004 Mixin(); | 2979 Mixin(); |
3005 | 2980 |
3006 Mixin.fromJson(core.Map _json) { | 2981 Mixin.fromJson(core.Map _json) { |
3007 if (_json.containsKey("name")) { | 2982 if (_json.containsKey("name")) { |
3008 name = _json["name"]; | 2983 name = _json["name"]; |
3009 } | 2984 } |
3010 if (_json.containsKey("root")) { | 2985 if (_json.containsKey("root")) { |
3011 root = _json["root"]; | 2986 root = _json["root"]; |
3012 } | 2987 } |
3013 } | 2988 } |
3014 | 2989 |
3015 core.Map<core.String, core.Object> toJson() { | 2990 core.Map<core.String, core.Object> toJson() { |
3016 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 2991 final core.Map<core.String, core.Object> _json = |
| 2992 new core.Map<core.String, core.Object>(); |
3017 if (name != null) { | 2993 if (name != null) { |
3018 _json["name"] = name; | 2994 _json["name"] = name; |
3019 } | 2995 } |
3020 if (root != null) { | 2996 if (root != null) { |
3021 _json["root"] = root; | 2997 _json["root"] = root; |
3022 } | 2998 } |
3023 return _json; | 2999 return _json; |
3024 } | 3000 } |
3025 } | 3001 } |
3026 | 3002 |
3027 /** | 3003 /// An object that describes the schema of a MonitoredResource object using a |
3028 * An object that describes the schema of a MonitoredResource object using a | 3004 /// type name and a set of labels. For example, the monitored resource |
3029 * type name and a set of labels. For example, the monitored resource | 3005 /// descriptor for Google Compute Engine VM instances has a type of |
3030 * descriptor for Google Compute Engine VM instances has a type of | 3006 /// `"gce_instance"` and specifies the use of the labels `"instance_id"` and |
3031 * `"gce_instance"` and specifies the use of the labels `"instance_id"` and | 3007 /// `"zone"` to identify particular VM instances. |
3032 * `"zone"` to identify particular VM instances. | 3008 /// |
3033 * | 3009 /// Different APIs can support different monitored resource types. APIs |
3034 * Different APIs can support different monitored resource types. APIs generally | 3010 /// generally |
3035 * provide a `list` method that returns the monitored resource descriptors used | 3011 /// provide a `list` method that returns the monitored resource descriptors |
3036 * by the API. | 3012 /// used |
3037 */ | 3013 /// by the API. |
3038 class MonitoredResourceDescriptor { | 3014 class MonitoredResourceDescriptor { |
3039 /** | 3015 /// Optional. A detailed description of the monitored resource type that |
3040 * Optional. A detailed description of the monitored resource type that might | 3016 /// might |
3041 * be used in documentation. | 3017 /// be used in documentation. |
3042 */ | |
3043 core.String description; | 3018 core.String description; |
3044 /** | 3019 |
3045 * Optional. A concise name for the monitored resource type that might be | 3020 /// Optional. A concise name for the monitored resource type that might be |
3046 * displayed in user interfaces. It should be a Title Cased Noun Phrase, | 3021 /// displayed in user interfaces. It should be a Title Cased Noun Phrase, |
3047 * without any article or other determiners. For example, | 3022 /// without any article or other determiners. For example, |
3048 * `"Google Cloud SQL Database"`. | 3023 /// `"Google Cloud SQL Database"`. |
3049 */ | |
3050 core.String displayName; | 3024 core.String displayName; |
3051 /** | 3025 |
3052 * Required. A set of labels used to describe instances of this monitored | 3026 /// Required. A set of labels used to describe instances of this monitored |
3053 * resource type. For example, an individual Google Cloud SQL database is | 3027 /// resource type. For example, an individual Google Cloud SQL database is |
3054 * identified by values for the labels `"database_id"` and `"zone"`. | 3028 /// identified by values for the labels `"database_id"` and `"zone"`. |
3055 */ | |
3056 core.List<LabelDescriptor> labels; | 3029 core.List<LabelDescriptor> labels; |
3057 /** | 3030 |
3058 * Optional. The resource name of the monitored resource descriptor: | 3031 /// Optional. The resource name of the monitored resource descriptor: |
3059 * `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where | 3032 /// `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where |
3060 * {type} is the value of the `type` field in this object and | 3033 /// {type} is the value of the `type` field in this object and |
3061 * {project_id} is a project ID that provides API-specific context for | 3034 /// {project_id} is a project ID that provides API-specific context for |
3062 * accessing the type. APIs that do not use project information can use the | 3035 /// accessing the type. APIs that do not use project information can use the |
3063 * resource name format `"monitoredResourceDescriptors/{type}"`. | 3036 /// resource name format `"monitoredResourceDescriptors/{type}"`. |
3064 */ | |
3065 core.String name; | 3037 core.String name; |
3066 /** | 3038 |
3067 * Required. The monitored resource type. For example, the type | 3039 /// Required. The monitored resource type. For example, the type |
3068 * `"cloudsql_database"` represents databases in Google Cloud SQL. | 3040 /// `"cloudsql_database"` represents databases in Google Cloud SQL. |
3069 * The maximum length of this value is 256 characters. | 3041 /// The maximum length of this value is 256 characters. |
3070 */ | |
3071 core.String type; | 3042 core.String type; |
3072 | 3043 |
3073 MonitoredResourceDescriptor(); | 3044 MonitoredResourceDescriptor(); |
3074 | 3045 |
3075 MonitoredResourceDescriptor.fromJson(core.Map _json) { | 3046 MonitoredResourceDescriptor.fromJson(core.Map _json) { |
3076 if (_json.containsKey("description")) { | 3047 if (_json.containsKey("description")) { |
3077 description = _json["description"]; | 3048 description = _json["description"]; |
3078 } | 3049 } |
3079 if (_json.containsKey("displayName")) { | 3050 if (_json.containsKey("displayName")) { |
3080 displayName = _json["displayName"]; | 3051 displayName = _json["displayName"]; |
3081 } | 3052 } |
3082 if (_json.containsKey("labels")) { | 3053 if (_json.containsKey("labels")) { |
3083 labels = _json["labels"].map((value) => new LabelDescriptor.fromJson(value
)).toList(); | 3054 labels = _json["labels"] |
| 3055 .map((value) => new LabelDescriptor.fromJson(value)) |
| 3056 .toList(); |
3084 } | 3057 } |
3085 if (_json.containsKey("name")) { | 3058 if (_json.containsKey("name")) { |
3086 name = _json["name"]; | 3059 name = _json["name"]; |
3087 } | 3060 } |
3088 if (_json.containsKey("type")) { | 3061 if (_json.containsKey("type")) { |
3089 type = _json["type"]; | 3062 type = _json["type"]; |
3090 } | 3063 } |
3091 } | 3064 } |
3092 | 3065 |
3093 core.Map<core.String, core.Object> toJson() { | 3066 core.Map<core.String, core.Object> toJson() { |
3094 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3067 final core.Map<core.String, core.Object> _json = |
| 3068 new core.Map<core.String, core.Object>(); |
3095 if (description != null) { | 3069 if (description != null) { |
3096 _json["description"] = description; | 3070 _json["description"] = description; |
3097 } | 3071 } |
3098 if (displayName != null) { | 3072 if (displayName != null) { |
3099 _json["displayName"] = displayName; | 3073 _json["displayName"] = displayName; |
3100 } | 3074 } |
3101 if (labels != null) { | 3075 if (labels != null) { |
3102 _json["labels"] = labels.map((value) => (value).toJson()).toList(); | 3076 _json["labels"] = labels.map((value) => (value).toJson()).toList(); |
3103 } | 3077 } |
3104 if (name != null) { | 3078 if (name != null) { |
3105 _json["name"] = name; | 3079 _json["name"] = name; |
3106 } | 3080 } |
3107 if (type != null) { | 3081 if (type != null) { |
3108 _json["type"] = type; | 3082 _json["type"] = type; |
3109 } | 3083 } |
3110 return _json; | 3084 return _json; |
3111 } | 3085 } |
3112 } | 3086 } |
3113 | 3087 |
3114 /** | 3088 /// Monitoring configuration of the service. |
3115 * Monitoring configuration of the service. | 3089 /// |
3116 * | 3090 /// The example below shows how to configure monitored resources and metrics |
3117 * The example below shows how to configure monitored resources and metrics | 3091 /// for monitoring. In the example, a monitored resource and two metrics are |
3118 * for monitoring. In the example, a monitored resource and two metrics are | 3092 /// defined. The `library.googleapis.com/book/returned_count` metric is sent |
3119 * defined. The `library.googleapis.com/book/returned_count` metric is sent | 3093 /// to both producer and consumer projects, whereas the |
3120 * to both producer and consumer projects, whereas the | 3094 /// `library.googleapis.com/book/overdue_count` metric is only sent to the |
3121 * `library.googleapis.com/book/overdue_count` metric is only sent to the | 3095 /// consumer project. |
3122 * consumer project. | 3096 /// |
3123 * | 3097 /// monitored_resources: |
3124 * monitored_resources: | 3098 /// - type: library.googleapis.com/branch |
3125 * - type: library.googleapis.com/branch | 3099 /// labels: |
3126 * labels: | 3100 /// - key: /city |
3127 * - key: /city | 3101 /// description: The city where the library branch is located in. |
3128 * description: The city where the library branch is located in. | 3102 /// - key: /name |
3129 * - key: /name | 3103 /// description: The name of the branch. |
3130 * description: The name of the branch. | 3104 /// metrics: |
3131 * metrics: | 3105 /// - name: library.googleapis.com/book/returned_count |
3132 * - name: library.googleapis.com/book/returned_count | 3106 /// metric_kind: DELTA |
3133 * metric_kind: DELTA | 3107 /// value_type: INT64 |
3134 * value_type: INT64 | 3108 /// labels: |
3135 * labels: | 3109 /// - key: /customer_id |
3136 * - key: /customer_id | 3110 /// - name: library.googleapis.com/book/overdue_count |
3137 * - name: library.googleapis.com/book/overdue_count | 3111 /// metric_kind: GAUGE |
3138 * metric_kind: GAUGE | 3112 /// value_type: INT64 |
3139 * value_type: INT64 | 3113 /// labels: |
3140 * labels: | 3114 /// - key: /customer_id |
3141 * - key: /customer_id | 3115 /// monitoring: |
3142 * monitoring: | 3116 /// producer_destinations: |
3143 * producer_destinations: | 3117 /// - monitored_resource: library.googleapis.com/branch |
3144 * - monitored_resource: library.googleapis.com/branch | 3118 /// metrics: |
3145 * metrics: | 3119 /// - library.googleapis.com/book/returned_count |
3146 * - library.googleapis.com/book/returned_count | 3120 /// consumer_destinations: |
3147 * consumer_destinations: | 3121 /// - monitored_resource: library.googleapis.com/branch |
3148 * - monitored_resource: library.googleapis.com/branch | 3122 /// metrics: |
3149 * metrics: | 3123 /// - library.googleapis.com/book/returned_count |
3150 * - library.googleapis.com/book/returned_count | 3124 /// - library.googleapis.com/book/overdue_count |
3151 * - library.googleapis.com/book/overdue_count | |
3152 */ | |
3153 class Monitoring { | 3125 class Monitoring { |
3154 /** | 3126 /// Monitoring configurations for sending metrics to the consumer project. |
3155 * Monitoring configurations for sending metrics to the consumer project. | 3127 /// There can be multiple consumer destinations, each one must have a |
3156 * There can be multiple consumer destinations, each one must have a | 3128 /// different monitored resource type. A metric can be used in at most |
3157 * different monitored resource type. A metric can be used in at most | 3129 /// one consumer destination. |
3158 * one consumer destination. | |
3159 */ | |
3160 core.List<MonitoringDestination> consumerDestinations; | 3130 core.List<MonitoringDestination> consumerDestinations; |
3161 /** | 3131 |
3162 * Monitoring configurations for sending metrics to the producer project. | 3132 /// Monitoring configurations for sending metrics to the producer project. |
3163 * There can be multiple producer destinations, each one must have a | 3133 /// There can be multiple producer destinations, each one must have a |
3164 * different monitored resource type. A metric can be used in at most | 3134 /// different monitored resource type. A metric can be used in at most |
3165 * one producer destination. | 3135 /// one producer destination. |
3166 */ | |
3167 core.List<MonitoringDestination> producerDestinations; | 3136 core.List<MonitoringDestination> producerDestinations; |
3168 | 3137 |
3169 Monitoring(); | 3138 Monitoring(); |
3170 | 3139 |
3171 Monitoring.fromJson(core.Map _json) { | 3140 Monitoring.fromJson(core.Map _json) { |
3172 if (_json.containsKey("consumerDestinations")) { | 3141 if (_json.containsKey("consumerDestinations")) { |
3173 consumerDestinations = _json["consumerDestinations"].map((value) => new Mo
nitoringDestination.fromJson(value)).toList(); | 3142 consumerDestinations = _json["consumerDestinations"] |
| 3143 .map((value) => new MonitoringDestination.fromJson(value)) |
| 3144 .toList(); |
3174 } | 3145 } |
3175 if (_json.containsKey("producerDestinations")) { | 3146 if (_json.containsKey("producerDestinations")) { |
3176 producerDestinations = _json["producerDestinations"].map((value) => new Mo
nitoringDestination.fromJson(value)).toList(); | 3147 producerDestinations = _json["producerDestinations"] |
| 3148 .map((value) => new MonitoringDestination.fromJson(value)) |
| 3149 .toList(); |
3177 } | 3150 } |
3178 } | 3151 } |
3179 | 3152 |
3180 core.Map<core.String, core.Object> toJson() { | 3153 core.Map<core.String, core.Object> toJson() { |
3181 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3154 final core.Map<core.String, core.Object> _json = |
| 3155 new core.Map<core.String, core.Object>(); |
3182 if (consumerDestinations != null) { | 3156 if (consumerDestinations != null) { |
3183 _json["consumerDestinations"] = consumerDestinations.map((value) => (value
).toJson()).toList(); | 3157 _json["consumerDestinations"] = |
| 3158 consumerDestinations.map((value) => (value).toJson()).toList(); |
3184 } | 3159 } |
3185 if (producerDestinations != null) { | 3160 if (producerDestinations != null) { |
3186 _json["producerDestinations"] = producerDestinations.map((value) => (value
).toJson()).toList(); | 3161 _json["producerDestinations"] = |
| 3162 producerDestinations.map((value) => (value).toJson()).toList(); |
3187 } | 3163 } |
3188 return _json; | 3164 return _json; |
3189 } | 3165 } |
3190 } | 3166 } |
3191 | 3167 |
3192 /** | 3168 /// Configuration of a specific monitoring destination (the producer project |
3193 * Configuration of a specific monitoring destination (the producer project | 3169 /// or the consumer project). |
3194 * or the consumer project). | |
3195 */ | |
3196 class MonitoringDestination { | 3170 class MonitoringDestination { |
3197 /** | 3171 /// Names of the metrics to report to this monitoring destination. |
3198 * Names of the metrics to report to this monitoring destination. | 3172 /// Each name must be defined in Service.metrics section. |
3199 * Each name must be defined in Service.metrics section. | |
3200 */ | |
3201 core.List<core.String> metrics; | 3173 core.List<core.String> metrics; |
3202 /** | 3174 |
3203 * The monitored resource type. The type must be defined in | 3175 /// The monitored resource type. The type must be defined in |
3204 * Service.monitored_resources section. | 3176 /// Service.monitored_resources section. |
3205 */ | |
3206 core.String monitoredResource; | 3177 core.String monitoredResource; |
3207 | 3178 |
3208 MonitoringDestination(); | 3179 MonitoringDestination(); |
3209 | 3180 |
3210 MonitoringDestination.fromJson(core.Map _json) { | 3181 MonitoringDestination.fromJson(core.Map _json) { |
3211 if (_json.containsKey("metrics")) { | 3182 if (_json.containsKey("metrics")) { |
3212 metrics = _json["metrics"]; | 3183 metrics = _json["metrics"]; |
3213 } | 3184 } |
3214 if (_json.containsKey("monitoredResource")) { | 3185 if (_json.containsKey("monitoredResource")) { |
3215 monitoredResource = _json["monitoredResource"]; | 3186 monitoredResource = _json["monitoredResource"]; |
3216 } | 3187 } |
3217 } | 3188 } |
3218 | 3189 |
3219 core.Map<core.String, core.Object> toJson() { | 3190 core.Map<core.String, core.Object> toJson() { |
3220 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3191 final core.Map<core.String, core.Object> _json = |
| 3192 new core.Map<core.String, core.Object>(); |
3221 if (metrics != null) { | 3193 if (metrics != null) { |
3222 _json["metrics"] = metrics; | 3194 _json["metrics"] = metrics; |
3223 } | 3195 } |
3224 if (monitoredResource != null) { | 3196 if (monitoredResource != null) { |
3225 _json["monitoredResource"] = monitoredResource; | 3197 _json["monitoredResource"] = monitoredResource; |
3226 } | 3198 } |
3227 return _json; | 3199 return _json; |
3228 } | 3200 } |
3229 } | 3201 } |
3230 | 3202 |
3231 /** | 3203 /// OAuth scopes are a way to define data and permissions on data. For example, |
3232 * OAuth scopes are a way to define data and permissions on data. For example, | 3204 /// there are scopes defined for "Read-only access to Google Calendar" and |
3233 * there are scopes defined for "Read-only access to Google Calendar" and | 3205 /// "Access to Cloud Platform". Users can consent to a scope for an |
3234 * "Access to Cloud Platform". Users can consent to a scope for an application, | 3206 /// application, |
3235 * giving it permission to access that data on their behalf. | 3207 /// giving it permission to access that data on their behalf. |
3236 * | 3208 /// |
3237 * OAuth scope specifications should be fairly coarse grained; a user will need | 3209 /// OAuth scope specifications should be fairly coarse grained; a user will |
3238 * to see and understand the text description of what your scope means. | 3210 /// need |
3239 * | 3211 /// to see and understand the text description of what your scope means. |
3240 * In most cases: use one or at most two OAuth scopes for an entire family of | 3212 /// |
3241 * products. If your product has multiple APIs, you should probably be sharing | 3213 /// In most cases: use one or at most two OAuth scopes for an entire family of |
3242 * the OAuth scope across all of those APIs. | 3214 /// products. If your product has multiple APIs, you should probably be sharing |
3243 * | 3215 /// the OAuth scope across all of those APIs. |
3244 * When you need finer grained OAuth consent screens: talk with your product | 3216 /// |
3245 * management about how developers will use them in practice. | 3217 /// When you need finer grained OAuth consent screens: talk with your product |
3246 * | 3218 /// management about how developers will use them in practice. |
3247 * Please note that even though each of the canonical scopes is enough for a | 3219 /// |
3248 * request to be accepted and passed to the backend, a request can still fail | 3220 /// Please note that even though each of the canonical scopes is enough for a |
3249 * due to the backend requiring additional scopes or permissions. | 3221 /// request to be accepted and passed to the backend, a request can still fail |
3250 */ | 3222 /// due to the backend requiring additional scopes or permissions. |
3251 class OAuthRequirements { | 3223 class OAuthRequirements { |
3252 /** | 3224 /// The list of publicly documented OAuth scopes that are allowed access. An |
3253 * The list of publicly documented OAuth scopes that are allowed access. An | 3225 /// OAuth token containing any of these scopes will be accepted. |
3254 * OAuth token containing any of these scopes will be accepted. | 3226 /// |
3255 * | 3227 /// Example: |
3256 * Example: | 3228 /// |
3257 * | 3229 /// canonical_scopes: https://www.googleapis.com/auth/calendar, |
3258 * canonical_scopes: https://www.googleapis.com/auth/calendar, | 3230 /// https://www.googleapis.com/auth/calendar.read |
3259 * https://www.googleapis.com/auth/calendar.read | |
3260 */ | |
3261 core.String canonicalScopes; | 3231 core.String canonicalScopes; |
3262 | 3232 |
3263 OAuthRequirements(); | 3233 OAuthRequirements(); |
3264 | 3234 |
3265 OAuthRequirements.fromJson(core.Map _json) { | 3235 OAuthRequirements.fromJson(core.Map _json) { |
3266 if (_json.containsKey("canonicalScopes")) { | 3236 if (_json.containsKey("canonicalScopes")) { |
3267 canonicalScopes = _json["canonicalScopes"]; | 3237 canonicalScopes = _json["canonicalScopes"]; |
3268 } | 3238 } |
3269 } | 3239 } |
3270 | 3240 |
3271 core.Map<core.String, core.Object> toJson() { | 3241 core.Map<core.String, core.Object> toJson() { |
3272 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3242 final core.Map<core.String, core.Object> _json = |
| 3243 new core.Map<core.String, core.Object>(); |
3273 if (canonicalScopes != null) { | 3244 if (canonicalScopes != null) { |
3274 _json["canonicalScopes"] = canonicalScopes; | 3245 _json["canonicalScopes"] = canonicalScopes; |
3275 } | 3246 } |
3276 return _json; | 3247 return _json; |
3277 } | 3248 } |
3278 } | 3249 } |
3279 | 3250 |
3280 /** | 3251 /// This resource represents a long-running operation that is the result of a |
3281 * This resource represents a long-running operation that is the result of a | 3252 /// network API call. |
3282 * network API call. | |
3283 */ | |
3284 class Operation { | 3253 class Operation { |
3285 /** | 3254 /// If the value is `false`, it means the operation is still in progress. |
3286 * If the value is `false`, it means the operation is still in progress. | 3255 /// If `true`, the operation is completed, and either `error` or `response` |
3287 * If true, the operation is completed, and either `error` or `response` is | 3256 /// is |
3288 * available. | 3257 /// available. |
3289 */ | |
3290 core.bool done; | 3258 core.bool done; |
3291 /** The error result of the operation in case of failure or cancellation. */ | 3259 |
| 3260 /// The error result of the operation in case of failure or cancellation. |
3292 Status error; | 3261 Status error; |
3293 /** | 3262 |
3294 * Service-specific metadata associated with the operation. It typically | 3263 /// Service-specific metadata associated with the operation. It typically |
3295 * contains progress information and common metadata such as create time. | 3264 /// contains progress information and common metadata such as create time. |
3296 * Some services might not provide such metadata. Any method that returns a | 3265 /// Some services might not provide such metadata. Any method that returns a |
3297 * long-running operation should document the metadata type, if any. | 3266 /// long-running operation should document the metadata type, if any. |
3298 * | 3267 /// |
3299 * The values for Object must be JSON objects. It can consist of `num`, | 3268 /// The values for Object must be JSON objects. It can consist of `num`, |
3300 * `String`, `bool` and `null` as well as `Map` and `List` values. | 3269 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
3301 */ | |
3302 core.Map<core.String, core.Object> metadata; | 3270 core.Map<core.String, core.Object> metadata; |
3303 /** | 3271 |
3304 * The server-assigned name, which is only unique within the same service that | 3272 /// The server-assigned name, which is only unique within the same service |
3305 * originally returns it. If you use the default HTTP mapping, the | 3273 /// that |
3306 * `name` should have the format of `operations/some/unique/name`. | 3274 /// originally returns it. If you use the default HTTP mapping, the |
3307 */ | 3275 /// `name` should have the format of `operations/some/unique/name`. |
3308 core.String name; | 3276 core.String name; |
3309 /** | 3277 |
3310 * The normal response of the operation in case of success. If the original | 3278 /// The normal response of the operation in case of success. If the original |
3311 * method returns no data on success, such as `Delete`, the response is | 3279 /// method returns no data on success, such as `Delete`, the response is |
3312 * `google.protobuf.Empty`. If the original method is standard | 3280 /// `google.protobuf.Empty`. If the original method is standard |
3313 * `Get`/`Create`/`Update`, the response should be the resource. For other | 3281 /// `Get`/`Create`/`Update`, the response should be the resource. For other |
3314 * methods, the response should have the type `XxxResponse`, where `Xxx` | 3282 /// methods, the response should have the type `XxxResponse`, where `Xxx` |
3315 * is the original method name. For example, if the original method name | 3283 /// is the original method name. For example, if the original method name |
3316 * is `TakeSnapshot()`, the inferred response type is | 3284 /// is `TakeSnapshot()`, the inferred response type is |
3317 * `TakeSnapshotResponse`. | 3285 /// `TakeSnapshotResponse`. |
3318 * | 3286 /// |
3319 * The values for Object must be JSON objects. It can consist of `num`, | 3287 /// The values for Object must be JSON objects. It can consist of `num`, |
3320 * `String`, `bool` and `null` as well as `Map` and `List` values. | 3288 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
3321 */ | |
3322 core.Map<core.String, core.Object> response; | 3289 core.Map<core.String, core.Object> response; |
3323 | 3290 |
3324 Operation(); | 3291 Operation(); |
3325 | 3292 |
3326 Operation.fromJson(core.Map _json) { | 3293 Operation.fromJson(core.Map _json) { |
3327 if (_json.containsKey("done")) { | 3294 if (_json.containsKey("done")) { |
3328 done = _json["done"]; | 3295 done = _json["done"]; |
3329 } | 3296 } |
3330 if (_json.containsKey("error")) { | 3297 if (_json.containsKey("error")) { |
3331 error = new Status.fromJson(_json["error"]); | 3298 error = new Status.fromJson(_json["error"]); |
3332 } | 3299 } |
3333 if (_json.containsKey("metadata")) { | 3300 if (_json.containsKey("metadata")) { |
3334 metadata = _json["metadata"]; | 3301 metadata = _json["metadata"]; |
3335 } | 3302 } |
3336 if (_json.containsKey("name")) { | 3303 if (_json.containsKey("name")) { |
3337 name = _json["name"]; | 3304 name = _json["name"]; |
3338 } | 3305 } |
3339 if (_json.containsKey("response")) { | 3306 if (_json.containsKey("response")) { |
3340 response = _json["response"]; | 3307 response = _json["response"]; |
3341 } | 3308 } |
3342 } | 3309 } |
3343 | 3310 |
3344 core.Map<core.String, core.Object> toJson() { | 3311 core.Map<core.String, core.Object> toJson() { |
3345 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3312 final core.Map<core.String, core.Object> _json = |
| 3313 new core.Map<core.String, core.Object>(); |
3346 if (done != null) { | 3314 if (done != null) { |
3347 _json["done"] = done; | 3315 _json["done"] = done; |
3348 } | 3316 } |
3349 if (error != null) { | 3317 if (error != null) { |
3350 _json["error"] = (error).toJson(); | 3318 _json["error"] = (error).toJson(); |
3351 } | 3319 } |
3352 if (metadata != null) { | 3320 if (metadata != null) { |
3353 _json["metadata"] = metadata; | 3321 _json["metadata"] = metadata; |
3354 } | 3322 } |
3355 if (name != null) { | 3323 if (name != null) { |
3356 _json["name"] = name; | 3324 _json["name"] = name; |
3357 } | 3325 } |
3358 if (response != null) { | 3326 if (response != null) { |
3359 _json["response"] = response; | 3327 _json["response"] = response; |
3360 } | 3328 } |
3361 return _json; | 3329 return _json; |
3362 } | 3330 } |
3363 } | 3331 } |
3364 | 3332 |
3365 /** The metadata associated with a long running operation resource. */ | 3333 /// The metadata associated with a long running operation resource. |
3366 class OperationMetadata { | 3334 class OperationMetadata { |
3367 /** Percentage of completion of this operation, ranging from 0 to 100. */ | 3335 /// Percentage of completion of this operation, ranging from 0 to 100. |
3368 core.int progressPercentage; | 3336 core.int progressPercentage; |
3369 /** | 3337 |
3370 * The full name of the resources that this operation is directly | 3338 /// The full name of the resources that this operation is directly |
3371 * associated with. | 3339 /// associated with. |
3372 */ | |
3373 core.List<core.String> resourceNames; | 3340 core.List<core.String> resourceNames; |
3374 /** The start time of the operation. */ | 3341 |
| 3342 /// The start time of the operation. |
3375 core.String startTime; | 3343 core.String startTime; |
3376 /** Detailed status information for each step. The order is undetermined. */ | 3344 |
| 3345 /// Detailed status information for each step. The order is undetermined. |
3377 core.List<Step> steps; | 3346 core.List<Step> steps; |
3378 | 3347 |
3379 OperationMetadata(); | 3348 OperationMetadata(); |
3380 | 3349 |
3381 OperationMetadata.fromJson(core.Map _json) { | 3350 OperationMetadata.fromJson(core.Map _json) { |
3382 if (_json.containsKey("progressPercentage")) { | 3351 if (_json.containsKey("progressPercentage")) { |
3383 progressPercentage = _json["progressPercentage"]; | 3352 progressPercentage = _json["progressPercentage"]; |
3384 } | 3353 } |
3385 if (_json.containsKey("resourceNames")) { | 3354 if (_json.containsKey("resourceNames")) { |
3386 resourceNames = _json["resourceNames"]; | 3355 resourceNames = _json["resourceNames"]; |
3387 } | 3356 } |
3388 if (_json.containsKey("startTime")) { | 3357 if (_json.containsKey("startTime")) { |
3389 startTime = _json["startTime"]; | 3358 startTime = _json["startTime"]; |
3390 } | 3359 } |
3391 if (_json.containsKey("steps")) { | 3360 if (_json.containsKey("steps")) { |
3392 steps = _json["steps"].map((value) => new Step.fromJson(value)).toList(); | 3361 steps = _json["steps"].map((value) => new Step.fromJson(value)).toList(); |
3393 } | 3362 } |
3394 } | 3363 } |
3395 | 3364 |
3396 core.Map<core.String, core.Object> toJson() { | 3365 core.Map<core.String, core.Object> toJson() { |
3397 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3366 final core.Map<core.String, core.Object> _json = |
| 3367 new core.Map<core.String, core.Object>(); |
3398 if (progressPercentage != null) { | 3368 if (progressPercentage != null) { |
3399 _json["progressPercentage"] = progressPercentage; | 3369 _json["progressPercentage"] = progressPercentage; |
3400 } | 3370 } |
3401 if (resourceNames != null) { | 3371 if (resourceNames != null) { |
3402 _json["resourceNames"] = resourceNames; | 3372 _json["resourceNames"] = resourceNames; |
3403 } | 3373 } |
3404 if (startTime != null) { | 3374 if (startTime != null) { |
3405 _json["startTime"] = startTime; | 3375 _json["startTime"] = startTime; |
3406 } | 3376 } |
3407 if (steps != null) { | 3377 if (steps != null) { |
3408 _json["steps"] = steps.map((value) => (value).toJson()).toList(); | 3378 _json["steps"] = steps.map((value) => (value).toJson()).toList(); |
3409 } | 3379 } |
3410 return _json; | 3380 return _json; |
3411 } | 3381 } |
3412 } | 3382 } |
3413 | 3383 |
3414 /** | 3384 /// A protocol buffer option, which can be attached to a message, field, |
3415 * A protocol buffer option, which can be attached to a message, field, | 3385 /// enumeration, etc. |
3416 * enumeration, etc. | |
3417 */ | |
3418 class Option { | 3386 class Option { |
3419 /** | 3387 /// The option's name. For protobuf built-in options (options defined in |
3420 * The option's name. For protobuf built-in options (options defined in | 3388 /// descriptor.proto), this is the short name. For example, `"map_entry"`. |
3421 * descriptor.proto), this is the short name. For example, `"map_entry"`. | 3389 /// For custom options, it should be the fully-qualified name. For example, |
3422 * For custom options, it should be the fully-qualified name. For example, | 3390 /// `"google.api.http"`. |
3423 * `"google.api.http"`. | |
3424 */ | |
3425 core.String name; | 3391 core.String name; |
3426 /** | 3392 |
3427 * The option's value packed in an Any message. If the value is a primitive, | 3393 /// The option's value packed in an Any message. If the value is a primitive, |
3428 * the corresponding wrapper type defined in google/protobuf/wrappers.proto | 3394 /// the corresponding wrapper type defined in google/protobuf/wrappers.proto |
3429 * should be used. If the value is an enum, it should be stored as an int32 | 3395 /// should be used. If the value is an enum, it should be stored as an int32 |
3430 * value using the google.protobuf.Int32Value type. | 3396 /// value using the google.protobuf.Int32Value type. |
3431 * | 3397 /// |
3432 * The values for Object must be JSON objects. It can consist of `num`, | 3398 /// The values for Object must be JSON objects. It can consist of `num`, |
3433 * `String`, `bool` and `null` as well as `Map` and `List` values. | 3399 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
3434 */ | |
3435 core.Map<core.String, core.Object> value; | 3400 core.Map<core.String, core.Object> value; |
3436 | 3401 |
3437 Option(); | 3402 Option(); |
3438 | 3403 |
3439 Option.fromJson(core.Map _json) { | 3404 Option.fromJson(core.Map _json) { |
3440 if (_json.containsKey("name")) { | 3405 if (_json.containsKey("name")) { |
3441 name = _json["name"]; | 3406 name = _json["name"]; |
3442 } | 3407 } |
3443 if (_json.containsKey("value")) { | 3408 if (_json.containsKey("value")) { |
3444 value = _json["value"]; | 3409 value = _json["value"]; |
3445 } | 3410 } |
3446 } | 3411 } |
3447 | 3412 |
3448 core.Map<core.String, core.Object> toJson() { | 3413 core.Map<core.String, core.Object> toJson() { |
3449 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3414 final core.Map<core.String, core.Object> _json = |
| 3415 new core.Map<core.String, core.Object>(); |
3450 if (name != null) { | 3416 if (name != null) { |
3451 _json["name"] = name; | 3417 _json["name"] = name; |
3452 } | 3418 } |
3453 if (value != null) { | 3419 if (value != null) { |
3454 _json["value"] = value; | 3420 _json["value"] = value; |
3455 } | 3421 } |
3456 return _json; | 3422 return _json; |
3457 } | 3423 } |
3458 } | 3424 } |
3459 | 3425 |
3460 /** | 3426 /// Represents a documentation page. A page can contain subpages to represent |
3461 * Represents a documentation page. A page can contain subpages to represent | 3427 /// nested documentation set structure. |
3462 * nested documentation set structure. | |
3463 */ | |
3464 class Page { | 3428 class Page { |
3465 /** | 3429 /// The Markdown content of the page. You can use <code>(== include |
3466 * The Markdown content of the page. You can use <code>(== include {path} | 3430 /// {path} ==)</code> |
3467 * ==)</code> | 3431 /// to include content from a Markdown file. |
3468 * to include content from a Markdown file. | |
3469 */ | |
3470 core.String content; | 3432 core.String content; |
3471 /** | 3433 |
3472 * The name of the page. It will be used as an identity of the page to | 3434 /// The name of the page. It will be used as an identity of the page to |
3473 * generate URI of the page, text of the link to this page in navigation, | 3435 /// generate URI of the page, text of the link to this page in navigation, |
3474 * etc. The full page name (start from the root page name to this page | 3436 /// etc. The full page name (start from the root page name to this page |
3475 * concatenated with `.`) can be used as reference to the page in your | 3437 /// concatenated with `.`) can be used as reference to the page in your |
3476 * documentation. For example: | 3438 /// documentation. For example: |
3477 * <pre><code>pages: | 3439 /// <pre><code>pages: |
3478 * - name: Tutorial | 3440 /// - name: Tutorial |
3479 * content: (== include tutorial.md ==) | 3441 /// content: (== include tutorial.md ==) |
3480 * subpages: | 3442 /// subpages: |
3481 * - name: Java | 3443 /// - name: Java |
3482 * content: (== include tutorial_java.md ==) | 3444 /// content: (== include tutorial_java.md ==) |
3483 * </code></pre> | 3445 /// </code></pre> |
3484 * You can reference `Java` page using Markdown reference link syntax: | 3446 /// You can reference `Java` page using Markdown reference link syntax: |
3485 * `Java`. | 3447 /// `Java`. |
3486 */ | |
3487 core.String name; | 3448 core.String name; |
3488 /** | 3449 |
3489 * Subpages of this page. The order of subpages specified here will be | 3450 /// Subpages of this page. The order of subpages specified here will be |
3490 * honored in the generated docset. | 3451 /// honored in the generated docset. |
3491 */ | |
3492 core.List<Page> subpages; | 3452 core.List<Page> subpages; |
3493 | 3453 |
3494 Page(); | 3454 Page(); |
3495 | 3455 |
3496 Page.fromJson(core.Map _json) { | 3456 Page.fromJson(core.Map _json) { |
3497 if (_json.containsKey("content")) { | 3457 if (_json.containsKey("content")) { |
3498 content = _json["content"]; | 3458 content = _json["content"]; |
3499 } | 3459 } |
3500 if (_json.containsKey("name")) { | 3460 if (_json.containsKey("name")) { |
3501 name = _json["name"]; | 3461 name = _json["name"]; |
3502 } | 3462 } |
3503 if (_json.containsKey("subpages")) { | 3463 if (_json.containsKey("subpages")) { |
3504 subpages = _json["subpages"].map((value) => new Page.fromJson(value)).toLi
st(); | 3464 subpages = |
| 3465 _json["subpages"].map((value) => new Page.fromJson(value)).toList(); |
3505 } | 3466 } |
3506 } | 3467 } |
3507 | 3468 |
3508 core.Map<core.String, core.Object> toJson() { | 3469 core.Map<core.String, core.Object> toJson() { |
3509 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3470 final core.Map<core.String, core.Object> _json = |
| 3471 new core.Map<core.String, core.Object>(); |
3510 if (content != null) { | 3472 if (content != null) { |
3511 _json["content"] = content; | 3473 _json["content"] = content; |
3512 } | 3474 } |
3513 if (name != null) { | 3475 if (name != null) { |
3514 _json["name"] = name; | 3476 _json["name"] = name; |
3515 } | 3477 } |
3516 if (subpages != null) { | 3478 if (subpages != null) { |
3517 _json["subpages"] = subpages.map((value) => (value).toJson()).toList(); | 3479 _json["subpages"] = subpages.map((value) => (value).toJson()).toList(); |
3518 } | 3480 } |
3519 return _json; | 3481 return _json; |
3520 } | 3482 } |
3521 } | 3483 } |
3522 | 3484 |
3523 /** | 3485 /// The published version of a Service that is managed by |
3524 * The published version of a Service that is managed by | 3486 /// Google Service Management. |
3525 * Google Service Management. | |
3526 */ | |
3527 class PublishedService { | 3487 class PublishedService { |
3528 /** | 3488 /// The resource name of the service. |
3529 * The resource name of the service. | 3489 /// |
3530 * | 3490 /// A valid name would be: |
3531 * A valid name would be: | 3491 /// - services/serviceuser.googleapis.com |
3532 * - services/serviceuser.googleapis.com | |
3533 */ | |
3534 core.String name; | 3492 core.String name; |
3535 /** The service's published configuration. */ | 3493 |
| 3494 /// The service's published configuration. |
3536 Service service; | 3495 Service service; |
3537 | 3496 |
3538 PublishedService(); | 3497 PublishedService(); |
3539 | 3498 |
3540 PublishedService.fromJson(core.Map _json) { | 3499 PublishedService.fromJson(core.Map _json) { |
3541 if (_json.containsKey("name")) { | 3500 if (_json.containsKey("name")) { |
3542 name = _json["name"]; | 3501 name = _json["name"]; |
3543 } | 3502 } |
3544 if (_json.containsKey("service")) { | 3503 if (_json.containsKey("service")) { |
3545 service = new Service.fromJson(_json["service"]); | 3504 service = new Service.fromJson(_json["service"]); |
3546 } | 3505 } |
3547 } | 3506 } |
3548 | 3507 |
3549 core.Map<core.String, core.Object> toJson() { | 3508 core.Map<core.String, core.Object> toJson() { |
3550 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3509 final core.Map<core.String, core.Object> _json = |
| 3510 new core.Map<core.String, core.Object>(); |
3551 if (name != null) { | 3511 if (name != null) { |
3552 _json["name"] = name; | 3512 _json["name"] = name; |
3553 } | 3513 } |
3554 if (service != null) { | 3514 if (service != null) { |
3555 _json["service"] = (service).toJson(); | 3515 _json["service"] = (service).toJson(); |
3556 } | 3516 } |
3557 return _json; | 3517 return _json; |
3558 } | 3518 } |
3559 } | 3519 } |
3560 | 3520 |
3561 /** | 3521 /// Quota configuration helps to achieve fairness and budgeting in service |
3562 * Quota configuration helps to achieve fairness and budgeting in service | 3522 /// usage. |
3563 * usage. | 3523 /// |
3564 * | 3524 /// The quota configuration works this way: |
3565 * The quota configuration works this way: | 3525 /// - The service configuration defines a set of metrics. |
3566 * - The service configuration defines a set of metrics. | 3526 /// - For API calls, the quota.metric_rules maps methods to metrics with |
3567 * - For API calls, the quota.metric_rules maps methods to metrics with | 3527 /// corresponding costs. |
3568 * corresponding costs. | 3528 /// - The quota.limits defines limits on the metrics, which will be used for |
3569 * - The quota.limits defines limits on the metrics, which will be used for | 3529 /// quota checks at runtime. |
3570 * quota checks at runtime. | 3530 /// |
3571 * | 3531 /// An example quota configuration in yaml format: |
3572 * An example quota configuration in yaml format: | 3532 /// |
3573 * | 3533 /// quota: |
3574 * quota: | 3534 /// |
3575 * | 3535 /// - name: apiWriteQpsPerProject |
3576 * - name: apiWriteQpsPerProject | 3536 /// metric: library.googleapis.com/write_calls |
3577 * metric: library.googleapis.com/write_calls | 3537 /// unit: "1/min/{project}" # rate limit for consumer projects |
3578 * unit: "1/min/{project}" # rate limit for consumer projects | 3538 /// values: |
3579 * values: | 3539 /// STANDARD: 10000 |
3580 * STANDARD: 10000 | 3540 /// |
3581 * | 3541 /// |
3582 * | 3542 /// # The metric rules bind all methods to the read_calls metric, |
3583 * # The metric rules bind all methods to the read_calls metric, | 3543 /// # except for the UpdateBook and DeleteBook methods. These two methods |
3584 * # except for the UpdateBook and DeleteBook methods. These two methods | 3544 /// # are mapped to the write_calls metric, with the UpdateBook method |
3585 * # are mapped to the write_calls metric, with the UpdateBook method | 3545 /// # consuming at twice rate as the DeleteBook method. |
3586 * # consuming at twice rate as the DeleteBook method. | 3546 /// metric_rules: |
3587 * metric_rules: | 3547 /// - selector: "*" |
3588 * - selector: "*" | 3548 /// metric_costs: |
3589 * metric_costs: | 3549 /// library.googleapis.com/read_calls: 1 |
3590 * library.googleapis.com/read_calls: 1 | 3550 /// - selector: google.example.library.v1.LibraryService.UpdateBook |
3591 * - selector: google.example.library.v1.LibraryService.UpdateBook | 3551 /// metric_costs: |
3592 * metric_costs: | 3552 /// library.googleapis.com/write_calls: 2 |
3593 * library.googleapis.com/write_calls: 2 | 3553 /// - selector: google.example.library.v1.LibraryService.DeleteBook |
3594 * - selector: google.example.library.v1.LibraryService.DeleteBook | 3554 /// metric_costs: |
3595 * metric_costs: | 3555 /// library.googleapis.com/write_calls: 1 |
3596 * library.googleapis.com/write_calls: 1 | 3556 /// |
3597 * | 3557 /// Corresponding Metric definition: |
3598 * Corresponding Metric definition: | 3558 /// |
3599 * | 3559 /// metrics: |
3600 * metrics: | 3560 /// - name: library.googleapis.com/read_calls |
3601 * - name: library.googleapis.com/read_calls | 3561 /// display_name: Read requests |
3602 * display_name: Read requests | 3562 /// metric_kind: DELTA |
3603 * metric_kind: DELTA | 3563 /// value_type: INT64 |
3604 * value_type: INT64 | 3564 /// |
3605 * | 3565 /// - name: library.googleapis.com/write_calls |
3606 * - name: library.googleapis.com/write_calls | 3566 /// display_name: Write requests |
3607 * display_name: Write requests | 3567 /// metric_kind: DELTA |
3608 * metric_kind: DELTA | 3568 /// value_type: INT64 |
3609 * value_type: INT64 | |
3610 */ | |
3611 class Quota { | 3569 class Quota { |
3612 /** List of `QuotaLimit` definitions for the service. */ | 3570 /// List of `QuotaLimit` definitions for the service. |
3613 core.List<QuotaLimit> limits; | 3571 core.List<QuotaLimit> limits; |
3614 /** | 3572 |
3615 * List of `MetricRule` definitions, each one mapping a selected method to one | 3573 /// List of `MetricRule` definitions, each one mapping a selected method to |
3616 * or more metrics. | 3574 /// one |
3617 */ | 3575 /// or more metrics. |
3618 core.List<MetricRule> metricRules; | 3576 core.List<MetricRule> metricRules; |
3619 | 3577 |
3620 Quota(); | 3578 Quota(); |
3621 | 3579 |
3622 Quota.fromJson(core.Map _json) { | 3580 Quota.fromJson(core.Map _json) { |
3623 if (_json.containsKey("limits")) { | 3581 if (_json.containsKey("limits")) { |
3624 limits = _json["limits"].map((value) => new QuotaLimit.fromJson(value)).to
List(); | 3582 limits = _json["limits"] |
| 3583 .map((value) => new QuotaLimit.fromJson(value)) |
| 3584 .toList(); |
3625 } | 3585 } |
3626 if (_json.containsKey("metricRules")) { | 3586 if (_json.containsKey("metricRules")) { |
3627 metricRules = _json["metricRules"].map((value) => new MetricRule.fromJson(
value)).toList(); | 3587 metricRules = _json["metricRules"] |
| 3588 .map((value) => new MetricRule.fromJson(value)) |
| 3589 .toList(); |
3628 } | 3590 } |
3629 } | 3591 } |
3630 | 3592 |
3631 core.Map<core.String, core.Object> toJson() { | 3593 core.Map<core.String, core.Object> toJson() { |
3632 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3594 final core.Map<core.String, core.Object> _json = |
| 3595 new core.Map<core.String, core.Object>(); |
3633 if (limits != null) { | 3596 if (limits != null) { |
3634 _json["limits"] = limits.map((value) => (value).toJson()).toList(); | 3597 _json["limits"] = limits.map((value) => (value).toJson()).toList(); |
3635 } | 3598 } |
3636 if (metricRules != null) { | 3599 if (metricRules != null) { |
3637 _json["metricRules"] = metricRules.map((value) => (value).toJson()).toList
(); | 3600 _json["metricRules"] = |
| 3601 metricRules.map((value) => (value).toJson()).toList(); |
3638 } | 3602 } |
3639 return _json; | 3603 return _json; |
3640 } | 3604 } |
3641 } | 3605 } |
3642 | 3606 |
3643 /** | 3607 /// `QuotaLimit` defines a specific limit that applies over a specified |
3644 * `QuotaLimit` defines a specific limit that applies over a specified duration | 3608 /// duration |
3645 * for a limit type. There can be at most one limit for a duration and limit | 3609 /// for a limit type. There can be at most one limit for a duration and limit |
3646 * type combination defined within a `QuotaGroup`. | 3610 /// type combination defined within a `QuotaGroup`. |
3647 */ | |
3648 class QuotaLimit { | 3611 class QuotaLimit { |
3649 /** | 3612 /// Default number of tokens that can be consumed during the specified |
3650 * Default number of tokens that can be consumed during the specified | 3613 /// duration. This is the number of tokens assigned when a client |
3651 * duration. This is the number of tokens assigned when a client | 3614 /// application developer activates the service for his/her project. |
3652 * application developer activates the service for his/her project. | 3615 /// |
3653 * | 3616 /// Specifying a value of 0 will block all requests. This can be used if you |
3654 * Specifying a value of 0 will block all requests. This can be used if you | 3617 /// are provisioning quota to selected consumers and blocking others. |
3655 * are provisioning quota to selected consumers and blocking others. | 3618 /// Similarly, a value of -1 will indicate an unlimited quota. No other |
3656 * Similarly, a value of -1 will indicate an unlimited quota. No other | 3619 /// negative values are allowed. |
3657 * negative values are allowed. | 3620 /// |
3658 * | 3621 /// Used by group-based quotas only. |
3659 * Used by group-based quotas only. | |
3660 */ | |
3661 core.String defaultLimit; | 3622 core.String defaultLimit; |
3662 /** | 3623 |
3663 * Optional. User-visible, extended description for this quota limit. | 3624 /// Optional. User-visible, extended description for this quota limit. |
3664 * Should be used only when more context is needed to understand this limit | 3625 /// Should be used only when more context is needed to understand this limit |
3665 * than provided by the limit's display name (see: `display_name`). | 3626 /// than provided by the limit's display name (see: `display_name`). |
3666 */ | |
3667 core.String description; | 3627 core.String description; |
3668 /** | 3628 |
3669 * User-visible display name for this limit. | 3629 /// User-visible display name for this limit. |
3670 * Optional. If not set, the UI will provide a default display name based on | 3630 /// Optional. If not set, the UI will provide a default display name based on |
3671 * the quota configuration. This field can be used to override the default | 3631 /// the quota configuration. This field can be used to override the default |
3672 * display name generated from the configuration. | 3632 /// display name generated from the configuration. |
3673 */ | |
3674 core.String displayName; | 3633 core.String displayName; |
3675 /** | 3634 |
3676 * Duration of this limit in textual notation. Example: "100s", "24h", "1d". | 3635 /// Duration of this limit in textual notation. Example: "100s", "24h", "1d". |
3677 * For duration longer than a day, only multiple of days is supported. We | 3636 /// For duration longer than a day, only multiple of days is supported. We |
3678 * support only "100s" and "1d" for now. Additional support will be added in | 3637 /// support only "100s" and "1d" for now. Additional support will be added in |
3679 * the future. "0" indicates indefinite duration. | 3638 /// the future. "0" indicates indefinite duration. |
3680 * | 3639 /// |
3681 * Used by group-based quotas only. | 3640 /// Used by group-based quotas only. |
3682 */ | |
3683 core.String duration; | 3641 core.String duration; |
3684 /** | 3642 |
3685 * Free tier value displayed in the Developers Console for this limit. | 3643 /// Free tier value displayed in the Developers Console for this limit. |
3686 * The free tier is the number of tokens that will be subtracted from the | 3644 /// The free tier is the number of tokens that will be subtracted from the |
3687 * billed amount when billing is enabled. | 3645 /// billed amount when billing is enabled. |
3688 * This field can only be set on a limit with duration "1d", in a billable | 3646 /// This field can only be set on a limit with duration "1d", in a billable |
3689 * group; it is invalid on any other limit. If this field is not set, it | 3647 /// group; it is invalid on any other limit. If this field is not set, it |
3690 * defaults to 0, indicating that there is no free tier for this service. | 3648 /// defaults to 0, indicating that there is no free tier for this service. |
3691 * | 3649 /// |
3692 * Used by group-based quotas only. | 3650 /// Used by group-based quotas only. |
3693 */ | |
3694 core.String freeTier; | 3651 core.String freeTier; |
3695 /** | 3652 |
3696 * Maximum number of tokens that can be consumed during the specified | 3653 /// Maximum number of tokens that can be consumed during the specified |
3697 * duration. Client application developers can override the default limit up | 3654 /// duration. Client application developers can override the default limit up |
3698 * to this maximum. If specified, this value cannot be set to a value less | 3655 /// to this maximum. If specified, this value cannot be set to a value less |
3699 * than the default limit. If not specified, it is set to the default limit. | 3656 /// than the default limit. If not specified, it is set to the default limit. |
3700 * | 3657 /// |
3701 * To allow clients to apply overrides with no upper bound, set this to -1, | 3658 /// To allow clients to apply overrides with no upper bound, set this to -1, |
3702 * indicating unlimited maximum quota. | 3659 /// indicating unlimited maximum quota. |
3703 * | 3660 /// |
3704 * Used by group-based quotas only. | 3661 /// Used by group-based quotas only. |
3705 */ | |
3706 core.String maxLimit; | 3662 core.String maxLimit; |
3707 /** | 3663 |
3708 * The name of the metric this quota limit applies to. The quota limits with | 3664 /// The name of the metric this quota limit applies to. The quota limits with |
3709 * the same metric will be checked together during runtime. The metric must be | 3665 /// the same metric will be checked together during runtime. The metric must |
3710 * defined within the service config. | 3666 /// be |
3711 * | 3667 /// defined within the service config. |
3712 * Used by metric-based quotas only. | 3668 /// |
3713 */ | 3669 /// Used by metric-based quotas only. |
3714 core.String metric; | 3670 core.String metric; |
3715 /** | 3671 |
3716 * Name of the quota limit. The name is used to refer to the limit when | 3672 /// Name of the quota limit. The name is used to refer to the limit when |
3717 * overriding the default limit on per-consumer basis. | 3673 /// overriding the default limit on per-consumer basis. |
3718 * | 3674 /// |
3719 * For metric-based quota limits, the name must be provided, and it must be | 3675 /// For metric-based quota limits, the name must be provided, and it must be |
3720 * unique within the service. The name can only include alphanumeric | 3676 /// unique within the service. The name can only include alphanumeric |
3721 * characters as well as '-'. | 3677 /// characters as well as '-'. |
3722 * | 3678 /// |
3723 * The maximum length of the limit name is 64 characters. | 3679 /// The maximum length of the limit name is 64 characters. |
3724 * | 3680 /// |
3725 * The name of a limit is used as a unique identifier for this limit. | 3681 /// The name of a limit is used as a unique identifier for this limit. |
3726 * Therefore, once a limit has been put into use, its name should be | 3682 /// Therefore, once a limit has been put into use, its name should be |
3727 * immutable. You can use the display_name field to provide a user-friendly | 3683 /// immutable. You can use the display_name field to provide a user-friendly |
3728 * name for the limit. The display name can be evolved over time without | 3684 /// name for the limit. The display name can be evolved over time without |
3729 * affecting the identity of the limit. | 3685 /// affecting the identity of the limit. |
3730 */ | |
3731 core.String name; | 3686 core.String name; |
3732 /** | 3687 |
3733 * Specify the unit of the quota limit. It uses the same syntax as | 3688 /// Specify the unit of the quota limit. It uses the same syntax as |
3734 * Metric.unit. The supported unit kinds are determined by the quota | 3689 /// Metric.unit. The supported unit kinds are determined by the quota |
3735 * backend system. | 3690 /// backend system. |
3736 * | 3691 /// |
3737 * The [Google Service Control](https://cloud.google.com/service-control) | 3692 /// The [Google Service Control](https://cloud.google.com/service-control) |
3738 * supports the following unit components: | 3693 /// supports the following unit components: |
3739 * * One of the time intevals: | 3694 /// * One of the time intevals: |
3740 * * "/min" for quota every minute. | 3695 /// * "/min" for quota every minute. |
3741 * * "/d" for quota every 24 hours, starting 00:00 US Pacific Time. | 3696 /// * "/d" for quota every 24 hours, starting 00:00 US Pacific Time. |
3742 * * Otherwise the quota won't be reset by time, such as storage limit. | 3697 /// * Otherwise the quota won't be reset by time, such as storage limit. |
3743 * * One and only one of the granted containers: | 3698 /// * One and only one of the granted containers: |
3744 * * "/{project}" quota for a project | 3699 /// * "/{project}" quota for a project |
3745 * | 3700 /// |
3746 * Here are some examples: | 3701 /// Here are some examples: |
3747 * * "1/min/{project}" for quota per minute per project. | 3702 /// * "1/min/{project}" for quota per minute per project. |
3748 * | 3703 /// |
3749 * Note: the order of unit components is insignificant. | 3704 /// Note: the order of unit components is insignificant. |
3750 * The "1" at the beginning is required to follow the metric unit syntax. | 3705 /// The "1" at the beginning is required to follow the metric unit syntax. |
3751 * | 3706 /// |
3752 * Used by metric-based quotas only. | 3707 /// Used by metric-based quotas only. |
3753 */ | |
3754 core.String unit; | 3708 core.String unit; |
3755 /** Tiered limit values, currently only STANDARD is supported. */ | 3709 |
| 3710 /// Tiered limit values, currently only STANDARD is supported. |
3756 core.Map<core.String, core.String> values; | 3711 core.Map<core.String, core.String> values; |
3757 | 3712 |
3758 QuotaLimit(); | 3713 QuotaLimit(); |
3759 | 3714 |
3760 QuotaLimit.fromJson(core.Map _json) { | 3715 QuotaLimit.fromJson(core.Map _json) { |
3761 if (_json.containsKey("defaultLimit")) { | 3716 if (_json.containsKey("defaultLimit")) { |
3762 defaultLimit = _json["defaultLimit"]; | 3717 defaultLimit = _json["defaultLimit"]; |
3763 } | 3718 } |
3764 if (_json.containsKey("description")) { | 3719 if (_json.containsKey("description")) { |
3765 description = _json["description"]; | 3720 description = _json["description"]; |
(...skipping 18 matching lines...) Expand all Loading... |
3784 } | 3739 } |
3785 if (_json.containsKey("unit")) { | 3740 if (_json.containsKey("unit")) { |
3786 unit = _json["unit"]; | 3741 unit = _json["unit"]; |
3787 } | 3742 } |
3788 if (_json.containsKey("values")) { | 3743 if (_json.containsKey("values")) { |
3789 values = _json["values"]; | 3744 values = _json["values"]; |
3790 } | 3745 } |
3791 } | 3746 } |
3792 | 3747 |
3793 core.Map<core.String, core.Object> toJson() { | 3748 core.Map<core.String, core.Object> toJson() { |
3794 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3749 final core.Map<core.String, core.Object> _json = |
| 3750 new core.Map<core.String, core.Object>(); |
3795 if (defaultLimit != null) { | 3751 if (defaultLimit != null) { |
3796 _json["defaultLimit"] = defaultLimit; | 3752 _json["defaultLimit"] = defaultLimit; |
3797 } | 3753 } |
3798 if (description != null) { | 3754 if (description != null) { |
3799 _json["description"] = description; | 3755 _json["description"] = description; |
3800 } | 3756 } |
3801 if (displayName != null) { | 3757 if (displayName != null) { |
3802 _json["displayName"] = displayName; | 3758 _json["displayName"] = displayName; |
3803 } | 3759 } |
3804 if (duration != null) { | 3760 if (duration != null) { |
(...skipping 14 matching lines...) Expand all Loading... |
3819 if (unit != null) { | 3775 if (unit != null) { |
3820 _json["unit"] = unit; | 3776 _json["unit"] = unit; |
3821 } | 3777 } |
3822 if (values != null) { | 3778 if (values != null) { |
3823 _json["values"] = values; | 3779 _json["values"] = values; |
3824 } | 3780 } |
3825 return _json; | 3781 return _json; |
3826 } | 3782 } |
3827 } | 3783 } |
3828 | 3784 |
3829 /** Response message for SearchServices method. */ | 3785 /// Response message for SearchServices method. |
3830 class SearchServicesResponse { | 3786 class SearchServicesResponse { |
3831 /** | 3787 /// Token that can be passed to `ListAvailableServices` to resume a paginated |
3832 * Token that can be passed to `ListAvailableServices` to resume a paginated | 3788 /// query. |
3833 * query. | |
3834 */ | |
3835 core.String nextPageToken; | 3789 core.String nextPageToken; |
3836 /** Services available publicly or available to the authenticated caller. */ | 3790 |
| 3791 /// Services available publicly or available to the authenticated caller. |
3837 core.List<PublishedService> services; | 3792 core.List<PublishedService> services; |
3838 | 3793 |
3839 SearchServicesResponse(); | 3794 SearchServicesResponse(); |
3840 | 3795 |
3841 SearchServicesResponse.fromJson(core.Map _json) { | 3796 SearchServicesResponse.fromJson(core.Map _json) { |
3842 if (_json.containsKey("nextPageToken")) { | 3797 if (_json.containsKey("nextPageToken")) { |
3843 nextPageToken = _json["nextPageToken"]; | 3798 nextPageToken = _json["nextPageToken"]; |
3844 } | 3799 } |
3845 if (_json.containsKey("services")) { | 3800 if (_json.containsKey("services")) { |
3846 services = _json["services"].map((value) => new PublishedService.fromJson(
value)).toList(); | 3801 services = _json["services"] |
| 3802 .map((value) => new PublishedService.fromJson(value)) |
| 3803 .toList(); |
3847 } | 3804 } |
3848 } | 3805 } |
3849 | 3806 |
3850 core.Map<core.String, core.Object> toJson() { | 3807 core.Map<core.String, core.Object> toJson() { |
3851 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 3808 final core.Map<core.String, core.Object> _json = |
| 3809 new core.Map<core.String, core.Object>(); |
3852 if (nextPageToken != null) { | 3810 if (nextPageToken != null) { |
3853 _json["nextPageToken"] = nextPageToken; | 3811 _json["nextPageToken"] = nextPageToken; |
3854 } | 3812 } |
3855 if (services != null) { | 3813 if (services != null) { |
3856 _json["services"] = services.map((value) => (value).toJson()).toList(); | 3814 _json["services"] = services.map((value) => (value).toJson()).toList(); |
3857 } | 3815 } |
3858 return _json; | 3816 return _json; |
3859 } | 3817 } |
3860 } | 3818 } |
3861 | 3819 |
3862 /** | 3820 /// `Service` is the root object of Google service configuration schema. It |
3863 * `Service` is the root object of Google service configuration schema. It | 3821 /// describes basic information about a service, such as the name and the |
3864 * describes basic information about a service, such as the name and the | 3822 /// title, and delegates other aspects to sub-sections. Each sub-section is |
3865 * title, and delegates other aspects to sub-sections. Each sub-section is | 3823 /// either a proto message or a repeated proto message that configures a |
3866 * either a proto message or a repeated proto message that configures a | 3824 /// specific aspect, such as auth. See each proto message definition for |
3867 * specific aspect, such as auth. See each proto message definition for details. | 3825 /// details. |
3868 * | 3826 /// |
3869 * Example: | 3827 /// Example: |
3870 * | 3828 /// |
3871 * type: google.api.Service | 3829 /// type: google.api.Service |
3872 * config_version: 3 | 3830 /// config_version: 3 |
3873 * name: calendar.googleapis.com | 3831 /// name: calendar.googleapis.com |
3874 * title: Google Calendar API | 3832 /// title: Google Calendar API |
3875 * apis: | 3833 /// apis: |
3876 * - name: google.calendar.v3.Calendar | 3834 /// - name: google.calendar.v3.Calendar |
3877 * authentication: | 3835 /// authentication: |
3878 * providers: | 3836 /// providers: |
3879 * - id: google_calendar_auth | 3837 /// - id: google_calendar_auth |
3880 * jwks_uri: https://www.googleapis.com/oauth2/v1/certs | 3838 /// jwks_uri: https://www.googleapis.com/oauth2/v1/certs |
3881 * issuer: https://securetoken.google.com | 3839 /// issuer: https://securetoken.google.com |
3882 * rules: | 3840 /// rules: |
3883 * - selector: "*" | 3841 /// - selector: "*" |
3884 * requirements: | 3842 /// requirements: |
3885 * provider_id: google_calendar_auth | 3843 /// provider_id: google_calendar_auth |
3886 */ | |
3887 class Service { | 3844 class Service { |
3888 /** | 3845 /// A list of API interfaces exported by this service. Only the `name` field |
3889 * A list of API interfaces exported by this service. Only the `name` field | 3846 /// of the google.protobuf.Api needs to be provided by the configuration |
3890 * of the google.protobuf.Api needs to be provided by the configuration | 3847 /// author, as the remaining fields will be derived from the IDL during the |
3891 * author, as the remaining fields will be derived from the IDL during the | 3848 /// normalization process. It is an error to specify an API interface here |
3892 * normalization process. It is an error to specify an API interface here | 3849 /// which cannot be resolved against the associated IDL files. |
3893 * which cannot be resolved against the associated IDL files. | |
3894 */ | |
3895 core.List<Api> apis; | 3850 core.List<Api> apis; |
3896 /** Auth configuration. */ | 3851 |
| 3852 /// Auth configuration. |
3897 Authentication authentication; | 3853 Authentication authentication; |
3898 /** API backend configuration. */ | 3854 |
| 3855 /// API backend configuration. |
3899 Backend backend; | 3856 Backend backend; |
3900 /** | 3857 |
3901 * The semantic version of the service configuration. The config version | 3858 /// The semantic version of the service configuration. The config version |
3902 * affects the interpretation of the service configuration. For example, | 3859 /// affects the interpretation of the service configuration. For example, |
3903 * certain features are enabled by default for certain config versions. | 3860 /// certain features are enabled by default for certain config versions. |
3904 * The latest config version is `3`. | 3861 /// The latest config version is `3`. |
3905 */ | |
3906 core.int configVersion; | 3862 core.int configVersion; |
3907 /** Context configuration. */ | 3863 |
| 3864 /// Context configuration. |
3908 Context context; | 3865 Context context; |
3909 /** Configuration for the service control plane. */ | 3866 |
| 3867 /// Configuration for the service control plane. |
3910 Control control; | 3868 Control control; |
3911 /** Custom error configuration. */ | 3869 |
| 3870 /// Custom error configuration. |
3912 CustomError customError; | 3871 CustomError customError; |
3913 /** Additional API documentation. */ | 3872 |
| 3873 /// Additional API documentation. |
3914 Documentation documentation; | 3874 Documentation documentation; |
3915 /** | 3875 |
3916 * Configuration for network endpoints. If this is empty, then an endpoint | 3876 /// Configuration for network endpoints. If this is empty, then an endpoint |
3917 * with the same name as the service is automatically generated to service all | 3877 /// with the same name as the service is automatically generated to service |
3918 * defined APIs. | 3878 /// all |
3919 */ | 3879 /// defined APIs. |
3920 core.List<Endpoint> endpoints; | 3880 core.List<Endpoint> endpoints; |
3921 /** | 3881 |
3922 * A list of all enum types included in this API service. Enums | 3882 /// A list of all enum types included in this API service. Enums |
3923 * referenced directly or indirectly by the `apis` are automatically | 3883 /// referenced directly or indirectly by the `apis` are automatically |
3924 * included. Enums which are not referenced but shall be included | 3884 /// included. Enums which are not referenced but shall be included |
3925 * should be listed here by name. Example: | 3885 /// should be listed here by name. Example: |
3926 * | 3886 /// |
3927 * enums: | 3887 /// enums: |
3928 * - name: google.someapi.v1.SomeEnum | 3888 /// - name: google.someapi.v1.SomeEnum |
3929 */ | |
3930 core.List<Enum> enums; | 3889 core.List<Enum> enums; |
3931 /** Experimental configuration. */ | 3890 |
| 3891 /// Experimental configuration. |
3932 Experimental experimental; | 3892 Experimental experimental; |
3933 /** HTTP configuration. */ | 3893 |
| 3894 /// HTTP configuration. |
3934 Http http; | 3895 Http http; |
3935 /** | 3896 |
3936 * A unique ID for a specific instance of this message, typically assigned | 3897 /// A unique ID for a specific instance of this message, typically assigned |
3937 * by the client for tracking purpose. If empty, the server may choose to | 3898 /// by the client for tracking purpose. If empty, the server may choose to |
3938 * generate one instead. | 3899 /// generate one instead. |
3939 */ | |
3940 core.String id; | 3900 core.String id; |
3941 /** Logging configuration. */ | 3901 |
| 3902 /// Logging configuration. |
3942 Logging logging; | 3903 Logging logging; |
3943 /** Defines the logs used by this service. */ | 3904 |
| 3905 /// Defines the logs used by this service. |
3944 core.List<LogDescriptor> logs; | 3906 core.List<LogDescriptor> logs; |
3945 /** Defines the metrics used by this service. */ | 3907 |
| 3908 /// Defines the metrics used by this service. |
3946 core.List<MetricDescriptor> metrics; | 3909 core.List<MetricDescriptor> metrics; |
3947 /** | 3910 |
3948 * Defines the monitored resources used by this service. This is required | 3911 /// Defines the monitored resources used by this service. This is required |
3949 * by the Service.monitoring and Service.logging configurations. | 3912 /// by the Service.monitoring and Service.logging configurations. |
3950 */ | |
3951 core.List<MonitoredResourceDescriptor> monitoredResources; | 3913 core.List<MonitoredResourceDescriptor> monitoredResources; |
3952 /** Monitoring configuration. */ | 3914 |
| 3915 /// Monitoring configuration. |
3953 Monitoring monitoring; | 3916 Monitoring monitoring; |
3954 /** | 3917 |
3955 * The DNS address at which this service is available, | 3918 /// The DNS address at which this service is available, |
3956 * e.g. `calendar.googleapis.com`. | 3919 /// e.g. `calendar.googleapis.com`. |
3957 */ | |
3958 core.String name; | 3920 core.String name; |
3959 /** The Google project that owns this service. */ | 3921 |
| 3922 /// The Google project that owns this service. |
3960 core.String producerProjectId; | 3923 core.String producerProjectId; |
3961 /** Quota configuration. */ | 3924 |
| 3925 /// Quota configuration. |
3962 Quota quota; | 3926 Quota quota; |
3963 /** | 3927 |
3964 * Output only. The source information for this configuration if available. | 3928 /// Output only. The source information for this configuration if available. |
3965 */ | |
3966 SourceInfo sourceInfo; | 3929 SourceInfo sourceInfo; |
3967 /** System parameter configuration. */ | 3930 |
| 3931 /// System parameter configuration. |
3968 SystemParameters systemParameters; | 3932 SystemParameters systemParameters; |
3969 /** | 3933 |
3970 * A list of all proto message types included in this API service. | 3934 /// A list of all proto message types included in this API service. |
3971 * It serves similar purpose as [google.api.Service.types], except that | 3935 /// It serves similar purpose as [google.api.Service.types], except that |
3972 * these types are not needed by user-defined APIs. Therefore, they will not | 3936 /// these types are not needed by user-defined APIs. Therefore, they will not |
3973 * show up in the generated discovery doc. This field should only be used | 3937 /// show up in the generated discovery doc. This field should only be used |
3974 * to define system APIs in ESF. | 3938 /// to define system APIs in ESF. |
3975 */ | |
3976 core.List<Type> systemTypes; | 3939 core.List<Type> systemTypes; |
3977 /** The product title for this service. */ | 3940 |
| 3941 /// The product title for this service. |
3978 core.String title; | 3942 core.String title; |
3979 /** | 3943 |
3980 * A list of all proto message types included in this API service. | 3944 /// A list of all proto message types included in this API service. |
3981 * Types referenced directly or indirectly by the `apis` are | 3945 /// Types referenced directly or indirectly by the `apis` are |
3982 * automatically included. Messages which are not referenced but | 3946 /// automatically included. Messages which are not referenced but |
3983 * shall be included, such as types used by the `google.protobuf.Any` type, | 3947 /// shall be included, such as types used by the `google.protobuf.Any` type, |
3984 * should be listed here by name. Example: | 3948 /// should be listed here by name. Example: |
3985 * | 3949 /// |
3986 * types: | 3950 /// types: |
3987 * - name: google.protobuf.Int32 | 3951 /// - name: google.protobuf.Int32 |
3988 */ | |
3989 core.List<Type> types; | 3952 core.List<Type> types; |
3990 /** Configuration controlling usage of this service. */ | 3953 |
| 3954 /// Configuration controlling usage of this service. |
3991 Usage usage; | 3955 Usage usage; |
3992 /** API visibility configuration. */ | 3956 |
| 3957 /// API visibility configuration. |
3993 Visibility visibility; | 3958 Visibility visibility; |
3994 | 3959 |
3995 Service(); | 3960 Service(); |
3996 | 3961 |
3997 Service.fromJson(core.Map _json) { | 3962 Service.fromJson(core.Map _json) { |
3998 if (_json.containsKey("apis")) { | 3963 if (_json.containsKey("apis")) { |
3999 apis = _json["apis"].map((value) => new Api.fromJson(value)).toList(); | 3964 apis = _json["apis"].map((value) => new Api.fromJson(value)).toList(); |
4000 } | 3965 } |
4001 if (_json.containsKey("authentication")) { | 3966 if (_json.containsKey("authentication")) { |
4002 authentication = new Authentication.fromJson(_json["authentication"]); | 3967 authentication = new Authentication.fromJson(_json["authentication"]); |
(...skipping 10 matching lines...) Expand all Loading... |
4013 if (_json.containsKey("control")) { | 3978 if (_json.containsKey("control")) { |
4014 control = new Control.fromJson(_json["control"]); | 3979 control = new Control.fromJson(_json["control"]); |
4015 } | 3980 } |
4016 if (_json.containsKey("customError")) { | 3981 if (_json.containsKey("customError")) { |
4017 customError = new CustomError.fromJson(_json["customError"]); | 3982 customError = new CustomError.fromJson(_json["customError"]); |
4018 } | 3983 } |
4019 if (_json.containsKey("documentation")) { | 3984 if (_json.containsKey("documentation")) { |
4020 documentation = new Documentation.fromJson(_json["documentation"]); | 3985 documentation = new Documentation.fromJson(_json["documentation"]); |
4021 } | 3986 } |
4022 if (_json.containsKey("endpoints")) { | 3987 if (_json.containsKey("endpoints")) { |
4023 endpoints = _json["endpoints"].map((value) => new Endpoint.fromJson(value)
).toList(); | 3988 endpoints = _json["endpoints"] |
| 3989 .map((value) => new Endpoint.fromJson(value)) |
| 3990 .toList(); |
4024 } | 3991 } |
4025 if (_json.containsKey("enums")) { | 3992 if (_json.containsKey("enums")) { |
4026 enums = _json["enums"].map((value) => new Enum.fromJson(value)).toList(); | 3993 enums = _json["enums"].map((value) => new Enum.fromJson(value)).toList(); |
4027 } | 3994 } |
4028 if (_json.containsKey("experimental")) { | 3995 if (_json.containsKey("experimental")) { |
4029 experimental = new Experimental.fromJson(_json["experimental"]); | 3996 experimental = new Experimental.fromJson(_json["experimental"]); |
4030 } | 3997 } |
4031 if (_json.containsKey("http")) { | 3998 if (_json.containsKey("http")) { |
4032 http = new Http.fromJson(_json["http"]); | 3999 http = new Http.fromJson(_json["http"]); |
4033 } | 4000 } |
4034 if (_json.containsKey("id")) { | 4001 if (_json.containsKey("id")) { |
4035 id = _json["id"]; | 4002 id = _json["id"]; |
4036 } | 4003 } |
4037 if (_json.containsKey("logging")) { | 4004 if (_json.containsKey("logging")) { |
4038 logging = new Logging.fromJson(_json["logging"]); | 4005 logging = new Logging.fromJson(_json["logging"]); |
4039 } | 4006 } |
4040 if (_json.containsKey("logs")) { | 4007 if (_json.containsKey("logs")) { |
4041 logs = _json["logs"].map((value) => new LogDescriptor.fromJson(value)).toL
ist(); | 4008 logs = _json["logs"] |
| 4009 .map((value) => new LogDescriptor.fromJson(value)) |
| 4010 .toList(); |
4042 } | 4011 } |
4043 if (_json.containsKey("metrics")) { | 4012 if (_json.containsKey("metrics")) { |
4044 metrics = _json["metrics"].map((value) => new MetricDescriptor.fromJson(va
lue)).toList(); | 4013 metrics = _json["metrics"] |
| 4014 .map((value) => new MetricDescriptor.fromJson(value)) |
| 4015 .toList(); |
4045 } | 4016 } |
4046 if (_json.containsKey("monitoredResources")) { | 4017 if (_json.containsKey("monitoredResources")) { |
4047 monitoredResources = _json["monitoredResources"].map((value) => new Monito
redResourceDescriptor.fromJson(value)).toList(); | 4018 monitoredResources = _json["monitoredResources"] |
| 4019 .map((value) => new MonitoredResourceDescriptor.fromJson(value)) |
| 4020 .toList(); |
4048 } | 4021 } |
4049 if (_json.containsKey("monitoring")) { | 4022 if (_json.containsKey("monitoring")) { |
4050 monitoring = new Monitoring.fromJson(_json["monitoring"]); | 4023 monitoring = new Monitoring.fromJson(_json["monitoring"]); |
4051 } | 4024 } |
4052 if (_json.containsKey("name")) { | 4025 if (_json.containsKey("name")) { |
4053 name = _json["name"]; | 4026 name = _json["name"]; |
4054 } | 4027 } |
4055 if (_json.containsKey("producerProjectId")) { | 4028 if (_json.containsKey("producerProjectId")) { |
4056 producerProjectId = _json["producerProjectId"]; | 4029 producerProjectId = _json["producerProjectId"]; |
4057 } | 4030 } |
4058 if (_json.containsKey("quota")) { | 4031 if (_json.containsKey("quota")) { |
4059 quota = new Quota.fromJson(_json["quota"]); | 4032 quota = new Quota.fromJson(_json["quota"]); |
4060 } | 4033 } |
4061 if (_json.containsKey("sourceInfo")) { | 4034 if (_json.containsKey("sourceInfo")) { |
4062 sourceInfo = new SourceInfo.fromJson(_json["sourceInfo"]); | 4035 sourceInfo = new SourceInfo.fromJson(_json["sourceInfo"]); |
4063 } | 4036 } |
4064 if (_json.containsKey("systemParameters")) { | 4037 if (_json.containsKey("systemParameters")) { |
4065 systemParameters = new SystemParameters.fromJson(_json["systemParameters"]
); | 4038 systemParameters = |
| 4039 new SystemParameters.fromJson(_json["systemParameters"]); |
4066 } | 4040 } |
4067 if (_json.containsKey("systemTypes")) { | 4041 if (_json.containsKey("systemTypes")) { |
4068 systemTypes = _json["systemTypes"].map((value) => new Type.fromJson(value)
).toList(); | 4042 systemTypes = _json["systemTypes"] |
| 4043 .map((value) => new Type.fromJson(value)) |
| 4044 .toList(); |
4069 } | 4045 } |
4070 if (_json.containsKey("title")) { | 4046 if (_json.containsKey("title")) { |
4071 title = _json["title"]; | 4047 title = _json["title"]; |
4072 } | 4048 } |
4073 if (_json.containsKey("types")) { | 4049 if (_json.containsKey("types")) { |
4074 types = _json["types"].map((value) => new Type.fromJson(value)).toList(); | 4050 types = _json["types"].map((value) => new Type.fromJson(value)).toList(); |
4075 } | 4051 } |
4076 if (_json.containsKey("usage")) { | 4052 if (_json.containsKey("usage")) { |
4077 usage = new Usage.fromJson(_json["usage"]); | 4053 usage = new Usage.fromJson(_json["usage"]); |
4078 } | 4054 } |
4079 if (_json.containsKey("visibility")) { | 4055 if (_json.containsKey("visibility")) { |
4080 visibility = new Visibility.fromJson(_json["visibility"]); | 4056 visibility = new Visibility.fromJson(_json["visibility"]); |
4081 } | 4057 } |
4082 } | 4058 } |
4083 | 4059 |
4084 core.Map<core.String, core.Object> toJson() { | 4060 core.Map<core.String, core.Object> toJson() { |
4085 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4061 final core.Map<core.String, core.Object> _json = |
| 4062 new core.Map<core.String, core.Object>(); |
4086 if (apis != null) { | 4063 if (apis != null) { |
4087 _json["apis"] = apis.map((value) => (value).toJson()).toList(); | 4064 _json["apis"] = apis.map((value) => (value).toJson()).toList(); |
4088 } | 4065 } |
4089 if (authentication != null) { | 4066 if (authentication != null) { |
4090 _json["authentication"] = (authentication).toJson(); | 4067 _json["authentication"] = (authentication).toJson(); |
4091 } | 4068 } |
4092 if (backend != null) { | 4069 if (backend != null) { |
4093 _json["backend"] = (backend).toJson(); | 4070 _json["backend"] = (backend).toJson(); |
4094 } | 4071 } |
4095 if (configVersion != null) { | 4072 if (configVersion != null) { |
(...skipping 29 matching lines...) Expand all Loading... |
4125 if (logging != null) { | 4102 if (logging != null) { |
4126 _json["logging"] = (logging).toJson(); | 4103 _json["logging"] = (logging).toJson(); |
4127 } | 4104 } |
4128 if (logs != null) { | 4105 if (logs != null) { |
4129 _json["logs"] = logs.map((value) => (value).toJson()).toList(); | 4106 _json["logs"] = logs.map((value) => (value).toJson()).toList(); |
4130 } | 4107 } |
4131 if (metrics != null) { | 4108 if (metrics != null) { |
4132 _json["metrics"] = metrics.map((value) => (value).toJson()).toList(); | 4109 _json["metrics"] = metrics.map((value) => (value).toJson()).toList(); |
4133 } | 4110 } |
4134 if (monitoredResources != null) { | 4111 if (monitoredResources != null) { |
4135 _json["monitoredResources"] = monitoredResources.map((value) => (value).to
Json()).toList(); | 4112 _json["monitoredResources"] = |
| 4113 monitoredResources.map((value) => (value).toJson()).toList(); |
4136 } | 4114 } |
4137 if (monitoring != null) { | 4115 if (monitoring != null) { |
4138 _json["monitoring"] = (monitoring).toJson(); | 4116 _json["monitoring"] = (monitoring).toJson(); |
4139 } | 4117 } |
4140 if (name != null) { | 4118 if (name != null) { |
4141 _json["name"] = name; | 4119 _json["name"] = name; |
4142 } | 4120 } |
4143 if (producerProjectId != null) { | 4121 if (producerProjectId != null) { |
4144 _json["producerProjectId"] = producerProjectId; | 4122 _json["producerProjectId"] = producerProjectId; |
4145 } | 4123 } |
4146 if (quota != null) { | 4124 if (quota != null) { |
4147 _json["quota"] = (quota).toJson(); | 4125 _json["quota"] = (quota).toJson(); |
4148 } | 4126 } |
4149 if (sourceInfo != null) { | 4127 if (sourceInfo != null) { |
4150 _json["sourceInfo"] = (sourceInfo).toJson(); | 4128 _json["sourceInfo"] = (sourceInfo).toJson(); |
4151 } | 4129 } |
4152 if (systemParameters != null) { | 4130 if (systemParameters != null) { |
4153 _json["systemParameters"] = (systemParameters).toJson(); | 4131 _json["systemParameters"] = (systemParameters).toJson(); |
4154 } | 4132 } |
4155 if (systemTypes != null) { | 4133 if (systemTypes != null) { |
4156 _json["systemTypes"] = systemTypes.map((value) => (value).toJson()).toList
(); | 4134 _json["systemTypes"] = |
| 4135 systemTypes.map((value) => (value).toJson()).toList(); |
4157 } | 4136 } |
4158 if (title != null) { | 4137 if (title != null) { |
4159 _json["title"] = title; | 4138 _json["title"] = title; |
4160 } | 4139 } |
4161 if (types != null) { | 4140 if (types != null) { |
4162 _json["types"] = types.map((value) => (value).toJson()).toList(); | 4141 _json["types"] = types.map((value) => (value).toJson()).toList(); |
4163 } | 4142 } |
4164 if (usage != null) { | 4143 if (usage != null) { |
4165 _json["usage"] = (usage).toJson(); | 4144 _json["usage"] = (usage).toJson(); |
4166 } | 4145 } |
4167 if (visibility != null) { | 4146 if (visibility != null) { |
4168 _json["visibility"] = (visibility).toJson(); | 4147 _json["visibility"] = (visibility).toJson(); |
4169 } | 4148 } |
4170 return _json; | 4149 return _json; |
4171 } | 4150 } |
4172 } | 4151 } |
4173 | 4152 |
4174 /** | 4153 /// `SourceContext` represents information about the source of a |
4175 * `SourceContext` represents information about the source of a | 4154 /// protobuf element, like the file in which it is defined. |
4176 * protobuf element, like the file in which it is defined. | |
4177 */ | |
4178 class SourceContext { | 4155 class SourceContext { |
4179 /** | 4156 /// The path-qualified name of the .proto file that contained the associated |
4180 * The path-qualified name of the .proto file that contained the associated | 4157 /// protobuf element. For example: `"google/protobuf/source_context.proto"`. |
4181 * protobuf element. For example: `"google/protobuf/source_context.proto"`. | |
4182 */ | |
4183 core.String fileName; | 4158 core.String fileName; |
4184 | 4159 |
4185 SourceContext(); | 4160 SourceContext(); |
4186 | 4161 |
4187 SourceContext.fromJson(core.Map _json) { | 4162 SourceContext.fromJson(core.Map _json) { |
4188 if (_json.containsKey("fileName")) { | 4163 if (_json.containsKey("fileName")) { |
4189 fileName = _json["fileName"]; | 4164 fileName = _json["fileName"]; |
4190 } | 4165 } |
4191 } | 4166 } |
4192 | 4167 |
4193 core.Map<core.String, core.Object> toJson() { | 4168 core.Map<core.String, core.Object> toJson() { |
4194 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4169 final core.Map<core.String, core.Object> _json = |
| 4170 new core.Map<core.String, core.Object>(); |
4195 if (fileName != null) { | 4171 if (fileName != null) { |
4196 _json["fileName"] = fileName; | 4172 _json["fileName"] = fileName; |
4197 } | 4173 } |
4198 return _json; | 4174 return _json; |
4199 } | 4175 } |
4200 } | 4176 } |
4201 | 4177 |
4202 /** Source information used to create a Service Config */ | 4178 /// Source information used to create a Service Config |
4203 class SourceInfo { | 4179 class SourceInfo { |
4204 /** | 4180 /// All files used during config generation. |
4205 * All files used during config generation. | 4181 /// |
4206 * | 4182 /// The values for Object must be JSON objects. It can consist of `num`, |
4207 * The values for Object must be JSON objects. It can consist of `num`, | 4183 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
4208 * `String`, `bool` and `null` as well as `Map` and `List` values. | |
4209 */ | |
4210 core.List<core.Map<core.String, core.Object>> sourceFiles; | 4184 core.List<core.Map<core.String, core.Object>> sourceFiles; |
4211 | 4185 |
4212 SourceInfo(); | 4186 SourceInfo(); |
4213 | 4187 |
4214 SourceInfo.fromJson(core.Map _json) { | 4188 SourceInfo.fromJson(core.Map _json) { |
4215 if (_json.containsKey("sourceFiles")) { | 4189 if (_json.containsKey("sourceFiles")) { |
4216 sourceFiles = _json["sourceFiles"]; | 4190 sourceFiles = _json["sourceFiles"]; |
4217 } | 4191 } |
4218 } | 4192 } |
4219 | 4193 |
4220 core.Map<core.String, core.Object> toJson() { | 4194 core.Map<core.String, core.Object> toJson() { |
4221 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4195 final core.Map<core.String, core.Object> _json = |
| 4196 new core.Map<core.String, core.Object>(); |
4222 if (sourceFiles != null) { | 4197 if (sourceFiles != null) { |
4223 _json["sourceFiles"] = sourceFiles; | 4198 _json["sourceFiles"] = sourceFiles; |
4224 } | 4199 } |
4225 return _json; | 4200 return _json; |
4226 } | 4201 } |
4227 } | 4202 } |
4228 | 4203 |
4229 /** | 4204 /// The `Status` type defines a logical error model that is suitable for |
4230 * The `Status` type defines a logical error model that is suitable for | 4205 /// different |
4231 * different | 4206 /// programming environments, including REST APIs and RPC APIs. It is used by |
4232 * programming environments, including REST APIs and RPC APIs. It is used by | 4207 /// [gRPC](https://github.com/grpc). The error model is designed to be: |
4233 * [gRPC](https://github.com/grpc). The error model is designed to be: | 4208 /// |
4234 * | 4209 /// - Simple to use and understand for most users |
4235 * - Simple to use and understand for most users | 4210 /// - Flexible enough to meet unexpected needs |
4236 * - Flexible enough to meet unexpected needs | 4211 /// |
4237 * | 4212 /// # Overview |
4238 * # Overview | 4213 /// |
4239 * | 4214 /// The `Status` message contains three pieces of data: error code, error |
4240 * The `Status` message contains three pieces of data: error code, error | 4215 /// message, |
4241 * message, | 4216 /// and error details. The error code should be an enum value of |
4242 * and error details. The error code should be an enum value of | 4217 /// google.rpc.Code, but it may accept additional error codes if needed. The |
4243 * google.rpc.Code, but it may accept additional error codes if needed. The | 4218 /// error message should be a developer-facing English message that helps |
4244 * error message should be a developer-facing English message that helps | 4219 /// developers *understand* and *resolve* the error. If a localized user-facing |
4245 * developers *understand* and *resolve* the error. If a localized user-facing | 4220 /// error message is needed, put the localized message in the error details or |
4246 * error message is needed, put the localized message in the error details or | 4221 /// localize it in the client. The optional error details may contain arbitrary |
4247 * localize it in the client. The optional error details may contain arbitrary | 4222 /// information about the error. There is a predefined set of error detail |
4248 * information about the error. There is a predefined set of error detail types | 4223 /// types |
4249 * in the package `google.rpc` that can be used for common error conditions. | 4224 /// in the package `google.rpc` that can be used for common error conditions. |
4250 * | 4225 /// |
4251 * # Language mapping | 4226 /// # Language mapping |
4252 * | 4227 /// |
4253 * The `Status` message is the logical representation of the error model, but it | 4228 /// The `Status` message is the logical representation of the error model, but |
4254 * is not necessarily the actual wire format. When the `Status` message is | 4229 /// it |
4255 * exposed in different client libraries and different wire protocols, it can be | 4230 /// is not necessarily the actual wire format. When the `Status` message is |
4256 * mapped differently. For example, it will likely be mapped to some exceptions | 4231 /// exposed in different client libraries and different wire protocols, it can |
4257 * in Java, but more likely mapped to some error codes in C. | 4232 /// be |
4258 * | 4233 /// mapped differently. For example, it will likely be mapped to some |
4259 * # Other uses | 4234 /// exceptions |
4260 * | 4235 /// in Java, but more likely mapped to some error codes in C. |
4261 * The error model and the `Status` message can be used in a variety of | 4236 /// |
4262 * environments, either with or without APIs, to provide a | 4237 /// # Other uses |
4263 * consistent developer experience across different environments. | 4238 /// |
4264 * | 4239 /// The error model and the `Status` message can be used in a variety of |
4265 * Example uses of this error model include: | 4240 /// environments, either with or without APIs, to provide a |
4266 * | 4241 /// consistent developer experience across different environments. |
4267 * - Partial errors. If a service needs to return partial errors to the client, | 4242 /// |
4268 * it may embed the `Status` in the normal response to indicate the partial | 4243 /// Example uses of this error model include: |
4269 * errors. | 4244 /// |
4270 * | 4245 /// - Partial errors. If a service needs to return partial errors to the |
4271 * - Workflow errors. A typical workflow has multiple steps. Each step may | 4246 /// client, |
4272 * have a `Status` message for error reporting. | 4247 /// it may embed the `Status` in the normal response to indicate the partial |
4273 * | 4248 /// errors. |
4274 * - Batch operations. If a client uses batch request and batch response, the | 4249 /// |
4275 * `Status` message should be used directly inside batch response, one for | 4250 /// - Workflow errors. A typical workflow has multiple steps. Each step may |
4276 * each error sub-response. | 4251 /// have a `Status` message for error reporting. |
4277 * | 4252 /// |
4278 * - Asynchronous operations. If an API call embeds asynchronous operation | 4253 /// - Batch operations. If a client uses batch request and batch response, the |
4279 * results in its response, the status of those operations should be | 4254 /// `Status` message should be used directly inside batch response, one for |
4280 * represented directly using the `Status` message. | 4255 /// each error sub-response. |
4281 * | 4256 /// |
4282 * - Logging. If some API errors are stored in logs, the message `Status` could | 4257 /// - Asynchronous operations. If an API call embeds asynchronous operation |
4283 * be used directly after any stripping needed for security/privacy reasons. | 4258 /// results in its response, the status of those operations should be |
4284 */ | 4259 /// represented directly using the `Status` message. |
| 4260 /// |
| 4261 /// - Logging. If some API errors are stored in logs, the message `Status` |
| 4262 /// could |
| 4263 /// be used directly after any stripping needed for security/privacy reasons. |
4285 class Status { | 4264 class Status { |
4286 /** The status code, which should be an enum value of google.rpc.Code. */ | 4265 /// The status code, which should be an enum value of google.rpc.Code. |
4287 core.int code; | 4266 core.int code; |
4288 /** | 4267 |
4289 * A list of messages that carry the error details. There is a common set of | 4268 /// A list of messages that carry the error details. There is a common set |
4290 * message types for APIs to use. | 4269 /// of |
4291 * | 4270 /// message types for APIs to use. |
4292 * The values for Object must be JSON objects. It can consist of `num`, | 4271 /// |
4293 * `String`, `bool` and `null` as well as `Map` and `List` values. | 4272 /// The values for Object must be JSON objects. It can consist of `num`, |
4294 */ | 4273 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
4295 core.List<core.Map<core.String, core.Object>> details; | 4274 core.List<core.Map<core.String, core.Object>> details; |
4296 /** | 4275 |
4297 * A developer-facing error message, which should be in English. Any | 4276 /// A developer-facing error message, which should be in English. Any |
4298 * user-facing error message should be localized and sent in the | 4277 /// user-facing error message should be localized and sent in the |
4299 * google.rpc.Status.details field, or localized by the client. | 4278 /// google.rpc.Status.details field, or localized by the client. |
4300 */ | |
4301 core.String message; | 4279 core.String message; |
4302 | 4280 |
4303 Status(); | 4281 Status(); |
4304 | 4282 |
4305 Status.fromJson(core.Map _json) { | 4283 Status.fromJson(core.Map _json) { |
4306 if (_json.containsKey("code")) { | 4284 if (_json.containsKey("code")) { |
4307 code = _json["code"]; | 4285 code = _json["code"]; |
4308 } | 4286 } |
4309 if (_json.containsKey("details")) { | 4287 if (_json.containsKey("details")) { |
4310 details = _json["details"]; | 4288 details = _json["details"]; |
4311 } | 4289 } |
4312 if (_json.containsKey("message")) { | 4290 if (_json.containsKey("message")) { |
4313 message = _json["message"]; | 4291 message = _json["message"]; |
4314 } | 4292 } |
4315 } | 4293 } |
4316 | 4294 |
4317 core.Map<core.String, core.Object> toJson() { | 4295 core.Map<core.String, core.Object> toJson() { |
4318 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4296 final core.Map<core.String, core.Object> _json = |
| 4297 new core.Map<core.String, core.Object>(); |
4319 if (code != null) { | 4298 if (code != null) { |
4320 _json["code"] = code; | 4299 _json["code"] = code; |
4321 } | 4300 } |
4322 if (details != null) { | 4301 if (details != null) { |
4323 _json["details"] = details; | 4302 _json["details"] = details; |
4324 } | 4303 } |
4325 if (message != null) { | 4304 if (message != null) { |
4326 _json["message"] = message; | 4305 _json["message"] = message; |
4327 } | 4306 } |
4328 return _json; | 4307 return _json; |
4329 } | 4308 } |
4330 } | 4309 } |
4331 | 4310 |
4332 /** Represents the status of one operation step. */ | 4311 /// Represents the status of one operation step. |
4333 class Step { | 4312 class Step { |
4334 /** The short description of the step. */ | 4313 /// The short description of the step. |
4335 core.String description; | 4314 core.String description; |
4336 /** | 4315 |
4337 * The status code. | 4316 /// The status code. |
4338 * Possible string values are: | 4317 /// Possible string values are: |
4339 * - "STATUS_UNSPECIFIED" : Unspecifed code. | 4318 /// - "STATUS_UNSPECIFIED" : Unspecifed code. |
4340 * - "DONE" : The operation or step has completed without errors. | 4319 /// - "DONE" : The operation or step has completed without errors. |
4341 * - "NOT_STARTED" : The operation or step has not started yet. | 4320 /// - "NOT_STARTED" : The operation or step has not started yet. |
4342 * - "IN_PROGRESS" : The operation or step is in progress. | 4321 /// - "IN_PROGRESS" : The operation or step is in progress. |
4343 * - "FAILED" : The operation or step has completed with errors. If the | 4322 /// - "FAILED" : The operation or step has completed with errors. If the |
4344 * operation is | 4323 /// operation is |
4345 * rollbackable, the rollback completed with errors too. | 4324 /// rollbackable, the rollback completed with errors too. |
4346 * - "CANCELLED" : The operation or step has completed with cancellation. | 4325 /// - "CANCELLED" : The operation or step has completed with cancellation. |
4347 */ | |
4348 core.String status; | 4326 core.String status; |
4349 | 4327 |
4350 Step(); | 4328 Step(); |
4351 | 4329 |
4352 Step.fromJson(core.Map _json) { | 4330 Step.fromJson(core.Map _json) { |
4353 if (_json.containsKey("description")) { | 4331 if (_json.containsKey("description")) { |
4354 description = _json["description"]; | 4332 description = _json["description"]; |
4355 } | 4333 } |
4356 if (_json.containsKey("status")) { | 4334 if (_json.containsKey("status")) { |
4357 status = _json["status"]; | 4335 status = _json["status"]; |
4358 } | 4336 } |
4359 } | 4337 } |
4360 | 4338 |
4361 core.Map<core.String, core.Object> toJson() { | 4339 core.Map<core.String, core.Object> toJson() { |
4362 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4340 final core.Map<core.String, core.Object> _json = |
| 4341 new core.Map<core.String, core.Object>(); |
4363 if (description != null) { | 4342 if (description != null) { |
4364 _json["description"] = description; | 4343 _json["description"] = description; |
4365 } | 4344 } |
4366 if (status != null) { | 4345 if (status != null) { |
4367 _json["status"] = status; | 4346 _json["status"] = status; |
4368 } | 4347 } |
4369 return _json; | 4348 return _json; |
4370 } | 4349 } |
4371 } | 4350 } |
4372 | 4351 |
4373 /** | 4352 /// Define a parameter's name and location. The parameter may be passed as |
4374 * Define a parameter's name and location. The parameter may be passed as either | 4353 /// either |
4375 * an HTTP header or a URL query parameter, and if both are passed the behavior | 4354 /// an HTTP header or a URL query parameter, and if both are passed the |
4376 * is implementation-dependent. | 4355 /// behavior |
4377 */ | 4356 /// is implementation-dependent. |
4378 class SystemParameter { | 4357 class SystemParameter { |
4379 /** | 4358 /// Define the HTTP header name to use for the parameter. It is case |
4380 * Define the HTTP header name to use for the parameter. It is case | 4359 /// insensitive. |
4381 * insensitive. | |
4382 */ | |
4383 core.String httpHeader; | 4360 core.String httpHeader; |
4384 /** | 4361 |
4385 * Define the name of the parameter, such as "api_key" . It is case sensitive. | 4362 /// Define the name of the parameter, such as "api_key" . It is case |
4386 */ | 4363 /// sensitive. |
4387 core.String name; | 4364 core.String name; |
4388 /** | 4365 |
4389 * Define the URL query parameter name to use for the parameter. It is case | 4366 /// Define the URL query parameter name to use for the parameter. It is case |
4390 * sensitive. | 4367 /// sensitive. |
4391 */ | |
4392 core.String urlQueryParameter; | 4368 core.String urlQueryParameter; |
4393 | 4369 |
4394 SystemParameter(); | 4370 SystemParameter(); |
4395 | 4371 |
4396 SystemParameter.fromJson(core.Map _json) { | 4372 SystemParameter.fromJson(core.Map _json) { |
4397 if (_json.containsKey("httpHeader")) { | 4373 if (_json.containsKey("httpHeader")) { |
4398 httpHeader = _json["httpHeader"]; | 4374 httpHeader = _json["httpHeader"]; |
4399 } | 4375 } |
4400 if (_json.containsKey("name")) { | 4376 if (_json.containsKey("name")) { |
4401 name = _json["name"]; | 4377 name = _json["name"]; |
4402 } | 4378 } |
4403 if (_json.containsKey("urlQueryParameter")) { | 4379 if (_json.containsKey("urlQueryParameter")) { |
4404 urlQueryParameter = _json["urlQueryParameter"]; | 4380 urlQueryParameter = _json["urlQueryParameter"]; |
4405 } | 4381 } |
4406 } | 4382 } |
4407 | 4383 |
4408 core.Map<core.String, core.Object> toJson() { | 4384 core.Map<core.String, core.Object> toJson() { |
4409 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4385 final core.Map<core.String, core.Object> _json = |
| 4386 new core.Map<core.String, core.Object>(); |
4410 if (httpHeader != null) { | 4387 if (httpHeader != null) { |
4411 _json["httpHeader"] = httpHeader; | 4388 _json["httpHeader"] = httpHeader; |
4412 } | 4389 } |
4413 if (name != null) { | 4390 if (name != null) { |
4414 _json["name"] = name; | 4391 _json["name"] = name; |
4415 } | 4392 } |
4416 if (urlQueryParameter != null) { | 4393 if (urlQueryParameter != null) { |
4417 _json["urlQueryParameter"] = urlQueryParameter; | 4394 _json["urlQueryParameter"] = urlQueryParameter; |
4418 } | 4395 } |
4419 return _json; | 4396 return _json; |
4420 } | 4397 } |
4421 } | 4398 } |
4422 | 4399 |
4423 /** | 4400 /// Define a system parameter rule mapping system parameter definitions to |
4424 * Define a system parameter rule mapping system parameter definitions to | 4401 /// methods. |
4425 * methods. | |
4426 */ | |
4427 class SystemParameterRule { | 4402 class SystemParameterRule { |
4428 /** | 4403 /// Define parameters. Multiple names may be defined for a parameter. |
4429 * Define parameters. Multiple names may be defined for a parameter. | 4404 /// For a given method call, only one of them should be used. If multiple |
4430 * For a given method call, only one of them should be used. If multiple | 4405 /// names are used the behavior is implementation-dependent. |
4431 * names are used the behavior is implementation-dependent. | 4406 /// If none of the specified names are present the behavior is |
4432 * If none of the specified names are present the behavior is | 4407 /// parameter-dependent. |
4433 * parameter-dependent. | |
4434 */ | |
4435 core.List<SystemParameter> parameters; | 4408 core.List<SystemParameter> parameters; |
4436 /** | 4409 |
4437 * Selects the methods to which this rule applies. Use '*' to indicate all | 4410 /// Selects the methods to which this rule applies. Use '*' to indicate all |
4438 * methods in all APIs. | 4411 /// methods in all APIs. |
4439 * | 4412 /// |
4440 * Refer to selector for syntax details. | 4413 /// Refer to selector for syntax details. |
4441 */ | |
4442 core.String selector; | 4414 core.String selector; |
4443 | 4415 |
4444 SystemParameterRule(); | 4416 SystemParameterRule(); |
4445 | 4417 |
4446 SystemParameterRule.fromJson(core.Map _json) { | 4418 SystemParameterRule.fromJson(core.Map _json) { |
4447 if (_json.containsKey("parameters")) { | 4419 if (_json.containsKey("parameters")) { |
4448 parameters = _json["parameters"].map((value) => new SystemParameter.fromJs
on(value)).toList(); | 4420 parameters = _json["parameters"] |
| 4421 .map((value) => new SystemParameter.fromJson(value)) |
| 4422 .toList(); |
4449 } | 4423 } |
4450 if (_json.containsKey("selector")) { | 4424 if (_json.containsKey("selector")) { |
4451 selector = _json["selector"]; | 4425 selector = _json["selector"]; |
4452 } | 4426 } |
4453 } | 4427 } |
4454 | 4428 |
4455 core.Map<core.String, core.Object> toJson() { | 4429 core.Map<core.String, core.Object> toJson() { |
4456 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4430 final core.Map<core.String, core.Object> _json = |
| 4431 new core.Map<core.String, core.Object>(); |
4457 if (parameters != null) { | 4432 if (parameters != null) { |
4458 _json["parameters"] = parameters.map((value) => (value).toJson()).toList()
; | 4433 _json["parameters"] = |
| 4434 parameters.map((value) => (value).toJson()).toList(); |
4459 } | 4435 } |
4460 if (selector != null) { | 4436 if (selector != null) { |
4461 _json["selector"] = selector; | 4437 _json["selector"] = selector; |
4462 } | 4438 } |
4463 return _json; | 4439 return _json; |
4464 } | 4440 } |
4465 } | 4441 } |
4466 | 4442 |
4467 /** | 4443 /// ### System parameter configuration |
4468 * ### System parameter configuration | 4444 /// |
4469 * | 4445 /// A system parameter is a special kind of parameter defined by the API |
4470 * A system parameter is a special kind of parameter defined by the API | 4446 /// system, not by an individual API. It is typically mapped to an HTTP header |
4471 * system, not by an individual API. It is typically mapped to an HTTP header | 4447 /// and/or a URL query parameter. This configuration specifies which methods |
4472 * and/or a URL query parameter. This configuration specifies which methods | 4448 /// change the names of the system parameters. |
4473 * change the names of the system parameters. | |
4474 */ | |
4475 class SystemParameters { | 4449 class SystemParameters { |
4476 /** | 4450 /// Define system parameters. |
4477 * Define system parameters. | 4451 /// |
4478 * | 4452 /// The parameters defined here will override the default parameters |
4479 * The parameters defined here will override the default parameters | 4453 /// implemented by the system. If this field is missing from the service |
4480 * implemented by the system. If this field is missing from the service | 4454 /// config, default system parameters will be used. Default system parameters |
4481 * config, default system parameters will be used. Default system parameters | 4455 /// and names is implementation-dependent. |
4482 * and names is implementation-dependent. | 4456 /// |
4483 * | 4457 /// Example: define api key for all methods |
4484 * Example: define api key for all methods | 4458 /// |
4485 * | 4459 /// system_parameters |
4486 * system_parameters | 4460 /// rules: |
4487 * rules: | 4461 /// - selector: "*" |
4488 * - selector: "*" | 4462 /// parameters: |
4489 * parameters: | 4463 /// - name: api_key |
4490 * - name: api_key | 4464 /// url_query_parameter: api_key |
4491 * url_query_parameter: api_key | 4465 /// |
4492 * | 4466 /// |
4493 * | 4467 /// Example: define 2 api key names for a specific method. |
4494 * Example: define 2 api key names for a specific method. | 4468 /// |
4495 * | 4469 /// system_parameters |
4496 * system_parameters | 4470 /// rules: |
4497 * rules: | 4471 /// - selector: "/ListShelves" |
4498 * - selector: "/ListShelves" | 4472 /// parameters: |
4499 * parameters: | 4473 /// - name: api_key |
4500 * - name: api_key | 4474 /// http_header: Api-Key1 |
4501 * http_header: Api-Key1 | 4475 /// - name: api_key |
4502 * - name: api_key | 4476 /// http_header: Api-Key2 |
4503 * http_header: Api-Key2 | 4477 /// |
4504 * | 4478 /// **NOTE:** All service configuration rules follow "last one wins" order. |
4505 * **NOTE:** All service configuration rules follow "last one wins" order. | |
4506 */ | |
4507 core.List<SystemParameterRule> rules; | 4479 core.List<SystemParameterRule> rules; |
4508 | 4480 |
4509 SystemParameters(); | 4481 SystemParameters(); |
4510 | 4482 |
4511 SystemParameters.fromJson(core.Map _json) { | 4483 SystemParameters.fromJson(core.Map _json) { |
4512 if (_json.containsKey("rules")) { | 4484 if (_json.containsKey("rules")) { |
4513 rules = _json["rules"].map((value) => new SystemParameterRule.fromJson(val
ue)).toList(); | 4485 rules = _json["rules"] |
| 4486 .map((value) => new SystemParameterRule.fromJson(value)) |
| 4487 .toList(); |
4514 } | 4488 } |
4515 } | 4489 } |
4516 | 4490 |
4517 core.Map<core.String, core.Object> toJson() { | 4491 core.Map<core.String, core.Object> toJson() { |
4518 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4492 final core.Map<core.String, core.Object> _json = |
| 4493 new core.Map<core.String, core.Object>(); |
4519 if (rules != null) { | 4494 if (rules != null) { |
4520 _json["rules"] = rules.map((value) => (value).toJson()).toList(); | 4495 _json["rules"] = rules.map((value) => (value).toJson()).toList(); |
4521 } | 4496 } |
4522 return _json; | 4497 return _json; |
4523 } | 4498 } |
4524 } | 4499 } |
4525 | 4500 |
4526 /** A protocol buffer message type. */ | 4501 /// A protocol buffer message type. |
4527 class Type { | 4502 class Type { |
4528 /** The list of fields. */ | 4503 /// The list of fields. |
4529 core.List<Field> fields; | 4504 core.List<Field> fields; |
4530 /** The fully qualified message name. */ | 4505 |
| 4506 /// The fully qualified message name. |
4531 core.String name; | 4507 core.String name; |
4532 /** The list of types appearing in `oneof` definitions in this type. */ | 4508 |
| 4509 /// The list of types appearing in `oneof` definitions in this type. |
4533 core.List<core.String> oneofs; | 4510 core.List<core.String> oneofs; |
4534 /** The protocol buffer options. */ | 4511 |
| 4512 /// The protocol buffer options. |
4535 core.List<Option> options; | 4513 core.List<Option> options; |
4536 /** The source context. */ | 4514 |
| 4515 /// The source context. |
4537 SourceContext sourceContext; | 4516 SourceContext sourceContext; |
4538 /** | 4517 |
4539 * The source syntax. | 4518 /// The source syntax. |
4540 * Possible string values are: | 4519 /// Possible string values are: |
4541 * - "SYNTAX_PROTO2" : Syntax `proto2`. | 4520 /// - "SYNTAX_PROTO2" : Syntax `proto2`. |
4542 * - "SYNTAX_PROTO3" : Syntax `proto3`. | 4521 /// - "SYNTAX_PROTO3" : Syntax `proto3`. |
4543 */ | |
4544 core.String syntax; | 4522 core.String syntax; |
4545 | 4523 |
4546 Type(); | 4524 Type(); |
4547 | 4525 |
4548 Type.fromJson(core.Map _json) { | 4526 Type.fromJson(core.Map _json) { |
4549 if (_json.containsKey("fields")) { | 4527 if (_json.containsKey("fields")) { |
4550 fields = _json["fields"].map((value) => new Field.fromJson(value)).toList(
); | 4528 fields = |
| 4529 _json["fields"].map((value) => new Field.fromJson(value)).toList(); |
4551 } | 4530 } |
4552 if (_json.containsKey("name")) { | 4531 if (_json.containsKey("name")) { |
4553 name = _json["name"]; | 4532 name = _json["name"]; |
4554 } | 4533 } |
4555 if (_json.containsKey("oneofs")) { | 4534 if (_json.containsKey("oneofs")) { |
4556 oneofs = _json["oneofs"]; | 4535 oneofs = _json["oneofs"]; |
4557 } | 4536 } |
4558 if (_json.containsKey("options")) { | 4537 if (_json.containsKey("options")) { |
4559 options = _json["options"].map((value) => new Option.fromJson(value)).toLi
st(); | 4538 options = |
| 4539 _json["options"].map((value) => new Option.fromJson(value)).toList(); |
4560 } | 4540 } |
4561 if (_json.containsKey("sourceContext")) { | 4541 if (_json.containsKey("sourceContext")) { |
4562 sourceContext = new SourceContext.fromJson(_json["sourceContext"]); | 4542 sourceContext = new SourceContext.fromJson(_json["sourceContext"]); |
4563 } | 4543 } |
4564 if (_json.containsKey("syntax")) { | 4544 if (_json.containsKey("syntax")) { |
4565 syntax = _json["syntax"]; | 4545 syntax = _json["syntax"]; |
4566 } | 4546 } |
4567 } | 4547 } |
4568 | 4548 |
4569 core.Map<core.String, core.Object> toJson() { | 4549 core.Map<core.String, core.Object> toJson() { |
4570 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4550 final core.Map<core.String, core.Object> _json = |
| 4551 new core.Map<core.String, core.Object>(); |
4571 if (fields != null) { | 4552 if (fields != null) { |
4572 _json["fields"] = fields.map((value) => (value).toJson()).toList(); | 4553 _json["fields"] = fields.map((value) => (value).toJson()).toList(); |
4573 } | 4554 } |
4574 if (name != null) { | 4555 if (name != null) { |
4575 _json["name"] = name; | 4556 _json["name"] = name; |
4576 } | 4557 } |
4577 if (oneofs != null) { | 4558 if (oneofs != null) { |
4578 _json["oneofs"] = oneofs; | 4559 _json["oneofs"] = oneofs; |
4579 } | 4560 } |
4580 if (options != null) { | 4561 if (options != null) { |
4581 _json["options"] = options.map((value) => (value).toJson()).toList(); | 4562 _json["options"] = options.map((value) => (value).toJson()).toList(); |
4582 } | 4563 } |
4583 if (sourceContext != null) { | 4564 if (sourceContext != null) { |
4584 _json["sourceContext"] = (sourceContext).toJson(); | 4565 _json["sourceContext"] = (sourceContext).toJson(); |
4585 } | 4566 } |
4586 if (syntax != null) { | 4567 if (syntax != null) { |
4587 _json["syntax"] = syntax; | 4568 _json["syntax"] = syntax; |
4588 } | 4569 } |
4589 return _json; | 4570 return _json; |
4590 } | 4571 } |
4591 } | 4572 } |
4592 | 4573 |
4593 /** Configuration controlling usage of a service. */ | 4574 /// Configuration controlling usage of a service. |
4594 class Usage { | 4575 class Usage { |
4595 /** | 4576 /// The full resource name of a channel used for sending notifications to the |
4596 * The full resource name of a channel used for sending notifications to the | 4577 /// service producer. |
4597 * service producer. | 4578 /// |
4598 * | 4579 /// Google Service Management currently only supports |
4599 * Google Service Management currently only supports | 4580 /// [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification |
4600 * [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification | 4581 /// channel. To use Google Cloud Pub/Sub as the channel, this must be the |
4601 * channel. To use Google Cloud Pub/Sub as the channel, this must be the name | 4582 /// name |
4602 * of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format | 4583 /// of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format |
4603 * documented in https://cloud.google.com/pubsub/docs/overview. | 4584 /// documented in https://cloud.google.com/pubsub/docs/overview. |
4604 */ | |
4605 core.String producerNotificationChannel; | 4585 core.String producerNotificationChannel; |
4606 /** | 4586 |
4607 * Requirements that must be satisfied before a consumer project can use the | 4587 /// Requirements that must be satisfied before a consumer project can use the |
4608 * service. Each requirement is of the form <service.name>/<requirement-id>; | 4588 /// service. Each requirement is of the form <service.name>/<requirement-id>; |
4609 * for example 'serviceusage.googleapis.com/billing-enabled'. | 4589 /// for example 'serviceusage.googleapis.com/billing-enabled'. |
4610 */ | |
4611 core.List<core.String> requirements; | 4590 core.List<core.String> requirements; |
4612 /** | 4591 |
4613 * A list of usage rules that apply to individual API methods. | 4592 /// A list of usage rules that apply to individual API methods. |
4614 * | 4593 /// |
4615 * **NOTE:** All service configuration rules follow "last one wins" order. | 4594 /// **NOTE:** All service configuration rules follow "last one wins" order. |
4616 */ | |
4617 core.List<UsageRule> rules; | 4595 core.List<UsageRule> rules; |
4618 | 4596 |
4619 Usage(); | 4597 Usage(); |
4620 | 4598 |
4621 Usage.fromJson(core.Map _json) { | 4599 Usage.fromJson(core.Map _json) { |
4622 if (_json.containsKey("producerNotificationChannel")) { | 4600 if (_json.containsKey("producerNotificationChannel")) { |
4623 producerNotificationChannel = _json["producerNotificationChannel"]; | 4601 producerNotificationChannel = _json["producerNotificationChannel"]; |
4624 } | 4602 } |
4625 if (_json.containsKey("requirements")) { | 4603 if (_json.containsKey("requirements")) { |
4626 requirements = _json["requirements"]; | 4604 requirements = _json["requirements"]; |
4627 } | 4605 } |
4628 if (_json.containsKey("rules")) { | 4606 if (_json.containsKey("rules")) { |
4629 rules = _json["rules"].map((value) => new UsageRule.fromJson(value)).toLis
t(); | 4607 rules = |
| 4608 _json["rules"].map((value) => new UsageRule.fromJson(value)).toList(); |
4630 } | 4609 } |
4631 } | 4610 } |
4632 | 4611 |
4633 core.Map<core.String, core.Object> toJson() { | 4612 core.Map<core.String, core.Object> toJson() { |
4634 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4613 final core.Map<core.String, core.Object> _json = |
| 4614 new core.Map<core.String, core.Object>(); |
4635 if (producerNotificationChannel != null) { | 4615 if (producerNotificationChannel != null) { |
4636 _json["producerNotificationChannel"] = producerNotificationChannel; | 4616 _json["producerNotificationChannel"] = producerNotificationChannel; |
4637 } | 4617 } |
4638 if (requirements != null) { | 4618 if (requirements != null) { |
4639 _json["requirements"] = requirements; | 4619 _json["requirements"] = requirements; |
4640 } | 4620 } |
4641 if (rules != null) { | 4621 if (rules != null) { |
4642 _json["rules"] = rules.map((value) => (value).toJson()).toList(); | 4622 _json["rules"] = rules.map((value) => (value).toJson()).toList(); |
4643 } | 4623 } |
4644 return _json; | 4624 return _json; |
4645 } | 4625 } |
4646 } | 4626 } |
4647 | 4627 |
4648 /** | 4628 /// Usage configuration rules for the service. |
4649 * Usage configuration rules for the service. | 4629 /// |
4650 * | 4630 /// NOTE: Under development. |
4651 * NOTE: Under development. | 4631 /// |
4652 * | 4632 /// |
4653 * | 4633 /// Use this rule to configure unregistered calls for the service. Unregistered |
4654 * Use this rule to configure unregistered calls for the service. Unregistered | 4634 /// calls are calls that do not contain consumer project identity. |
4655 * calls are calls that do not contain consumer project identity. | 4635 /// (Example: calls that do not contain an API key). |
4656 * (Example: calls that do not contain an API key). | 4636 /// By default, API methods do not allow unregistered calls, and each method |
4657 * By default, API methods do not allow unregistered calls, and each method call | 4637 /// call |
4658 * must be identified by a consumer project identity. Use this rule to | 4638 /// must be identified by a consumer project identity. Use this rule to |
4659 * allow/disallow unregistered calls. | 4639 /// allow/disallow unregistered calls. |
4660 * | 4640 /// |
4661 * Example of an API that wants to allow unregistered calls for entire service. | 4641 /// Example of an API that wants to allow unregistered calls for entire |
4662 * | 4642 /// service. |
4663 * usage: | 4643 /// |
4664 * rules: | 4644 /// usage: |
4665 * - selector: "*" | 4645 /// rules: |
4666 * allow_unregistered_calls: true | 4646 /// - selector: "*" |
4667 * | 4647 /// allow_unregistered_calls: true |
4668 * Example of a method that wants to allow unregistered calls. | 4648 /// |
4669 * | 4649 /// Example of a method that wants to allow unregistered calls. |
4670 * usage: | 4650 /// |
4671 * rules: | 4651 /// usage: |
4672 * - selector: "google.example.library.v1.LibraryService.CreateBook" | 4652 /// rules: |
4673 * allow_unregistered_calls: true | 4653 /// - selector: "google.example.library.v1.LibraryService.CreateBook" |
4674 */ | 4654 /// allow_unregistered_calls: true |
4675 class UsageRule { | 4655 class UsageRule { |
4676 /** True, if the method allows unregistered calls; false otherwise. */ | 4656 /// True, if the method allows unregistered calls; false otherwise. |
4677 core.bool allowUnregisteredCalls; | 4657 core.bool allowUnregisteredCalls; |
4678 /** | 4658 |
4679 * Selects the methods to which this rule applies. Use '*' to indicate all | 4659 /// Selects the methods to which this rule applies. Use '*' to indicate all |
4680 * methods in all APIs. | 4660 /// methods in all APIs. |
4681 * | 4661 /// |
4682 * Refer to selector for syntax details. | 4662 /// Refer to selector for syntax details. |
4683 */ | |
4684 core.String selector; | 4663 core.String selector; |
4685 /** | 4664 |
4686 * True, if the method should skip service control. If so, no control plane | 4665 /// True, if the method should skip service control. If so, no control plane |
4687 * feature (like quota and billing) will be enabled. | 4666 /// feature (like quota and billing) will be enabled. |
4688 */ | |
4689 core.bool skipServiceControl; | 4667 core.bool skipServiceControl; |
4690 | 4668 |
4691 UsageRule(); | 4669 UsageRule(); |
4692 | 4670 |
4693 UsageRule.fromJson(core.Map _json) { | 4671 UsageRule.fromJson(core.Map _json) { |
4694 if (_json.containsKey("allowUnregisteredCalls")) { | 4672 if (_json.containsKey("allowUnregisteredCalls")) { |
4695 allowUnregisteredCalls = _json["allowUnregisteredCalls"]; | 4673 allowUnregisteredCalls = _json["allowUnregisteredCalls"]; |
4696 } | 4674 } |
4697 if (_json.containsKey("selector")) { | 4675 if (_json.containsKey("selector")) { |
4698 selector = _json["selector"]; | 4676 selector = _json["selector"]; |
4699 } | 4677 } |
4700 if (_json.containsKey("skipServiceControl")) { | 4678 if (_json.containsKey("skipServiceControl")) { |
4701 skipServiceControl = _json["skipServiceControl"]; | 4679 skipServiceControl = _json["skipServiceControl"]; |
4702 } | 4680 } |
4703 } | 4681 } |
4704 | 4682 |
4705 core.Map<core.String, core.Object> toJson() { | 4683 core.Map<core.String, core.Object> toJson() { |
4706 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4684 final core.Map<core.String, core.Object> _json = |
| 4685 new core.Map<core.String, core.Object>(); |
4707 if (allowUnregisteredCalls != null) { | 4686 if (allowUnregisteredCalls != null) { |
4708 _json["allowUnregisteredCalls"] = allowUnregisteredCalls; | 4687 _json["allowUnregisteredCalls"] = allowUnregisteredCalls; |
4709 } | 4688 } |
4710 if (selector != null) { | 4689 if (selector != null) { |
4711 _json["selector"] = selector; | 4690 _json["selector"] = selector; |
4712 } | 4691 } |
4713 if (skipServiceControl != null) { | 4692 if (skipServiceControl != null) { |
4714 _json["skipServiceControl"] = skipServiceControl; | 4693 _json["skipServiceControl"] = skipServiceControl; |
4715 } | 4694 } |
4716 return _json; | 4695 return _json; |
4717 } | 4696 } |
4718 } | 4697 } |
4719 | 4698 |
4720 /** | 4699 /// `Visibility` defines restrictions for the visibility of service |
4721 * `Visibility` defines restrictions for the visibility of service | 4700 /// elements. Restrictions are specified using visibility labels |
4722 * elements. Restrictions are specified using visibility labels | 4701 /// (e.g., TRUSTED_TESTER) that are elsewhere linked to users and projects. |
4723 * (e.g., TRUSTED_TESTER) that are elsewhere linked to users and projects. | 4702 /// |
4724 * | 4703 /// Users and projects can have access to more than one visibility label. The |
4725 * Users and projects can have access to more than one visibility label. The | 4704 /// effective visibility for multiple labels is the union of each label's |
4726 * effective visibility for multiple labels is the union of each label's | 4705 /// elements, plus any unrestricted elements. |
4727 * elements, plus any unrestricted elements. | 4706 /// |
4728 * | 4707 /// If an element and its parents have no restrictions, visibility is |
4729 * If an element and its parents have no restrictions, visibility is | 4708 /// unconditionally granted. |
4730 * unconditionally granted. | 4709 /// |
4731 * | 4710 /// Example: |
4732 * Example: | 4711 /// |
4733 * | 4712 /// visibility: |
4734 * visibility: | 4713 /// rules: |
4735 * rules: | 4714 /// - selector: google.calendar.Calendar.EnhancedSearch |
4736 * - selector: google.calendar.Calendar.EnhancedSearch | 4715 /// restriction: TRUSTED_TESTER |
4737 * restriction: TRUSTED_TESTER | 4716 /// - selector: google.calendar.Calendar.Delegate |
4738 * - selector: google.calendar.Calendar.Delegate | 4717 /// restriction: GOOGLE_INTERNAL |
4739 * restriction: GOOGLE_INTERNAL | 4718 /// |
4740 * | 4719 /// Here, all methods are publicly visible except for the restricted methods |
4741 * Here, all methods are publicly visible except for the restricted methods | 4720 /// EnhancedSearch and Delegate. |
4742 * EnhancedSearch and Delegate. | |
4743 */ | |
4744 class Visibility { | 4721 class Visibility { |
4745 /** | 4722 /// A list of visibility rules that apply to individual API elements. |
4746 * A list of visibility rules that apply to individual API elements. | 4723 /// |
4747 * | 4724 /// **NOTE:** All service configuration rules follow "last one wins" order. |
4748 * **NOTE:** All service configuration rules follow "last one wins" order. | |
4749 */ | |
4750 core.List<VisibilityRule> rules; | 4725 core.List<VisibilityRule> rules; |
4751 | 4726 |
4752 Visibility(); | 4727 Visibility(); |
4753 | 4728 |
4754 Visibility.fromJson(core.Map _json) { | 4729 Visibility.fromJson(core.Map _json) { |
4755 if (_json.containsKey("rules")) { | 4730 if (_json.containsKey("rules")) { |
4756 rules = _json["rules"].map((value) => new VisibilityRule.fromJson(value)).
toList(); | 4731 rules = _json["rules"] |
| 4732 .map((value) => new VisibilityRule.fromJson(value)) |
| 4733 .toList(); |
4757 } | 4734 } |
4758 } | 4735 } |
4759 | 4736 |
4760 core.Map<core.String, core.Object> toJson() { | 4737 core.Map<core.String, core.Object> toJson() { |
4761 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4738 final core.Map<core.String, core.Object> _json = |
| 4739 new core.Map<core.String, core.Object>(); |
4762 if (rules != null) { | 4740 if (rules != null) { |
4763 _json["rules"] = rules.map((value) => (value).toJson()).toList(); | 4741 _json["rules"] = rules.map((value) => (value).toJson()).toList(); |
4764 } | 4742 } |
4765 return _json; | 4743 return _json; |
4766 } | 4744 } |
4767 } | 4745 } |
4768 | 4746 |
4769 /** | 4747 /// A visibility rule provides visibility configuration for an individual API |
4770 * A visibility rule provides visibility configuration for an individual API | 4748 /// element. |
4771 * element. | |
4772 */ | |
4773 class VisibilityRule { | 4749 class VisibilityRule { |
4774 /** | 4750 /// A comma-separated list of visibility labels that apply to the `selector`. |
4775 * A comma-separated list of visibility labels that apply to the `selector`. | 4751 /// Any of the listed labels can be used to grant the visibility. |
4776 * Any of the listed labels can be used to grant the visibility. | 4752 /// |
4777 * | 4753 /// If a rule has multiple labels, removing one of the labels but not all of |
4778 * If a rule has multiple labels, removing one of the labels but not all of | 4754 /// them can break clients. |
4779 * them can break clients. | 4755 /// |
4780 * | 4756 /// Example: |
4781 * Example: | 4757 /// |
4782 * | 4758 /// visibility: |
4783 * visibility: | 4759 /// rules: |
4784 * rules: | 4760 /// - selector: google.calendar.Calendar.EnhancedSearch |
4785 * - selector: google.calendar.Calendar.EnhancedSearch | 4761 /// restriction: GOOGLE_INTERNAL, TRUSTED_TESTER |
4786 * restriction: GOOGLE_INTERNAL, TRUSTED_TESTER | 4762 /// |
4787 * | 4763 /// Removing GOOGLE_INTERNAL from this restriction will break clients that |
4788 * Removing GOOGLE_INTERNAL from this restriction will break clients that | 4764 /// rely on this method and only had access to it through GOOGLE_INTERNAL. |
4789 * rely on this method and only had access to it through GOOGLE_INTERNAL. | |
4790 */ | |
4791 core.String restriction; | 4765 core.String restriction; |
4792 /** | 4766 |
4793 * Selects methods, messages, fields, enums, etc. to which this rule applies. | 4767 /// Selects methods, messages, fields, enums, etc. to which this rule |
4794 * | 4768 /// applies. |
4795 * Refer to selector for syntax details. | 4769 /// |
4796 */ | 4770 /// Refer to selector for syntax details. |
4797 core.String selector; | 4771 core.String selector; |
4798 | 4772 |
4799 VisibilityRule(); | 4773 VisibilityRule(); |
4800 | 4774 |
4801 VisibilityRule.fromJson(core.Map _json) { | 4775 VisibilityRule.fromJson(core.Map _json) { |
4802 if (_json.containsKey("restriction")) { | 4776 if (_json.containsKey("restriction")) { |
4803 restriction = _json["restriction"]; | 4777 restriction = _json["restriction"]; |
4804 } | 4778 } |
4805 if (_json.containsKey("selector")) { | 4779 if (_json.containsKey("selector")) { |
4806 selector = _json["selector"]; | 4780 selector = _json["selector"]; |
4807 } | 4781 } |
4808 } | 4782 } |
4809 | 4783 |
4810 core.Map<core.String, core.Object> toJson() { | 4784 core.Map<core.String, core.Object> toJson() { |
4811 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 4785 final core.Map<core.String, core.Object> _json = |
| 4786 new core.Map<core.String, core.Object>(); |
4812 if (restriction != null) { | 4787 if (restriction != null) { |
4813 _json["restriction"] = restriction; | 4788 _json["restriction"] = restriction; |
4814 } | 4789 } |
4815 if (selector != null) { | 4790 if (selector != null) { |
4816 _json["selector"] = selector; | 4791 _json["selector"] = selector; |
4817 } | 4792 } |
4818 return _json; | 4793 return _json; |
4819 } | 4794 } |
4820 } | 4795 } |
OLD | NEW |