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

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

Issue 2571553005: Api-roll 43: 2016-12-13 (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // This is a generated file (see the discoveryapis_generator project). 1 // This is a generated file (see the discoveryapis_generator project).
2 2
3 library googleapis.servicemanagement.v1; 3 library googleapis.servicemanagement.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;
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 "POST", 139 "POST",
140 body: _body, 140 body: _body,
141 queryParams: _queryParams, 141 queryParams: _queryParams,
142 uploadOptions: _uploadOptions, 142 uploadOptions: _uploadOptions,
143 uploadMedia: _uploadMedia, 143 uploadMedia: _uploadMedia,
144 downloadOptions: _downloadOptions); 144 downloadOptions: _downloadOptions);
145 return _response.then((data) => new Operation.fromJson(data)); 145 return _response.then((data) => new Operation.fromJson(data));
146 } 146 }
147 147
148 /** 148 /**
149 * Deletes a managed service. This method will change the serivce in the 149 * Deletes a managed service. This method will change the service to the
150 * `Soft-Delete` state for 30 days. Within this period, service producers may 150 * `Soft-Delete` state for 30 days. Within this period, service producers may
151 * call UndeleteService to restore the service. 151 * call UndeleteService to restore the service.
152 * After 30 days, the service will be permanently deleted. 152 * After 30 days, the service will be permanently deleted.
153 * 153 *
154 * Operation<response: google.protobuf.Empty> 154 * Operation<response: google.protobuf.Empty>
155 * 155 *
156 * Request parameters: 156 * Request parameters:
157 * 157 *
158 * [serviceName] - The name of the service. See the 158 * [serviceName] - The name of the service. See the
159 * [overview](/service-management/overview) 159 * [overview](/service-management/overview)
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 * Request parameters: 486 * Request parameters:
487 * 487 *
488 * [pageSize] - Requested size of the next page of data. 488 * [pageSize] - Requested size of the next page of data.
489 * 489 *
490 * [producerProjectId] - Include services produced by the specified project. 490 * [producerProjectId] - Include services produced by the specified project.
491 * 491 *
492 * [pageToken] - Token identifying which result to start with; returned by a 492 * [pageToken] - Token identifying which result to start with; returned by a
493 * previous list 493 * previous list
494 * call. 494 * call.
495 * 495 *
496 * [consumerId] - Include services consumed by the specified consumer.
497 *
498 * The Google Service Management implementation accepts the following
499 * forms:
500 * - project:<project_id>
501 *
496 * Completes with a [ListServicesResponse]. 502 * Completes with a [ListServicesResponse].
497 * 503 *
498 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 504 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
499 * error. 505 * error.
500 * 506 *
501 * If the used [http_1.Client] completes with an error when making a REST 507 * If the used [http_1.Client] completes with an error when making a REST
502 * call, this method will complete with the same error. 508 * call, this method will complete with the same error.
503 */ 509 */
504 async.Future<ListServicesResponse> list({core.int pageSize, core.String produc erProjectId, core.String pageToken}) { 510 async.Future<ListServicesResponse> list({core.int pageSize, core.String produc erProjectId, core.String pageToken, core.String consumerId}) {
505 var _url = null; 511 var _url = null;
506 var _queryParams = new core.Map(); 512 var _queryParams = new core.Map();
507 var _uploadMedia = null; 513 var _uploadMedia = null;
508 var _uploadOptions = null; 514 var _uploadOptions = null;
509 var _downloadOptions = commons.DownloadOptions.Metadata; 515 var _downloadOptions = commons.DownloadOptions.Metadata;
510 var _body = null; 516 var _body = null;
511 517
512 if (pageSize != null) { 518 if (pageSize != null) {
513 _queryParams["pageSize"] = ["${pageSize}"]; 519 _queryParams["pageSize"] = ["${pageSize}"];
514 } 520 }
515 if (producerProjectId != null) { 521 if (producerProjectId != null) {
516 _queryParams["producerProjectId"] = [producerProjectId]; 522 _queryParams["producerProjectId"] = [producerProjectId];
517 } 523 }
518 if (pageToken != null) { 524 if (pageToken != null) {
519 _queryParams["pageToken"] = [pageToken]; 525 _queryParams["pageToken"] = [pageToken];
520 } 526 }
527 if (consumerId != null) {
528 _queryParams["consumerId"] = [consumerId];
529 }
521 530
522 _url = 'v1/services'; 531 _url = 'v1/services';
523 532
524 var _response = _requester.request(_url, 533 var _response = _requester.request(_url,
525 "GET", 534 "GET",
526 body: _body, 535 body: _body,
527 queryParams: _queryParams, 536 queryParams: _queryParams,
528 uploadOptions: _uploadOptions, 537 uploadOptions: _uploadOptions,
529 uploadMedia: _uploadMedia, 538 uploadMedia: _uploadMedia,
530 downloadOptions: _downloadOptions); 539 downloadOptions: _downloadOptions);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 body: _body, 584 body: _body,
576 queryParams: _queryParams, 585 queryParams: _queryParams,
577 uploadOptions: _uploadOptions, 586 uploadOptions: _uploadOptions,
578 uploadMedia: _uploadMedia, 587 uploadMedia: _uploadMedia,
579 downloadOptions: _downloadOptions); 588 downloadOptions: _downloadOptions);
580 return _response.then((data) => new Policy.fromJson(data)); 589 return _response.then((data) => new Policy.fromJson(data));
581 } 590 }
582 591
583 /** 592 /**
584 * Returns permissions that a caller has on the specified resource. 593 * Returns permissions that a caller has on the specified resource.
594 * If the resource does not exist, this will return an empty set of
595 * permissions, not a NOT_FOUND error.
585 * 596 *
586 * [request] - The metadata request object. 597 * [request] - The metadata request object.
587 * 598 *
588 * Request parameters: 599 * Request parameters:
589 * 600 *
590 * [resource] - REQUIRED: The resource for which the policy detail is being 601 * [resource] - REQUIRED: The resource for which the policy detail is being
591 * requested. 602 * requested.
592 * `resource` is usually specified as a path. For example, a Project 603 * `resource` is usually specified as a path. For example, a Project
593 * resource is specified as `projects/{project}`. 604 * resource is specified as `projects/{project}`.
594 * Value must have pattern "^services/[^/]+$". 605 * Value must have pattern "^services/[^/]+$".
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 _json["syntax"] = syntax; 1185 _json["syntax"] = syntax;
1175 } 1186 }
1176 if (version != null) { 1187 if (version != null) {
1177 _json["version"] = version; 1188 _json["version"] = version;
1178 } 1189 }
1179 return _json; 1190 return _json;
1180 } 1191 }
1181 } 1192 }
1182 1193
1183 /** 1194 /**
1184 * Enables "data access" audit logging for a service and specifies a list 1195 * Provides the configuration for non-admin_activity logging for a service.
1185 * of members that are log-exempted. 1196 * Controls exemptions and specific log sub-types.
1186 */ 1197 */
1187 class AuditConfig { 1198 class AuditConfig {
1188 /** 1199 /**
1200 * The configuration for each type of logging
1201 * Next ID: 4
1202 */
1203 core.List<AuditLogConfig> auditLogConfigs;
1204 /**
1189 * Specifies the identities that are exempted from "data access" audit 1205 * Specifies the identities that are exempted from "data access" audit
1190 * logging for the `service` specified above. 1206 * logging for the `service` specified above.
1191 * Follows the same format of Binding.members. 1207 * Follows the same format of Binding.members.
1192 */ 1208 */
1193 core.List<core.String> exemptedMembers; 1209 core.List<core.String> exemptedMembers;
1194 /** 1210 /**
1195 * Specifies a service that will be enabled for "data access" audit 1211 * Specifies a service that will be enabled for audit logging.
1196 * logging.
1197 * For example, `resourcemanager`, `storage`, `compute`. 1212 * For example, `resourcemanager`, `storage`, `compute`.
1198 * `allServices` is a special value that covers all services. 1213 * `allServices` is a special value that covers all services.
1199 */ 1214 */
1200 core.String service; 1215 core.String service;
1201 1216
1202 AuditConfig(); 1217 AuditConfig();
1203 1218
1204 AuditConfig.fromJson(core.Map _json) { 1219 AuditConfig.fromJson(core.Map _json) {
1220 if (_json.containsKey("auditLogConfigs")) {
1221 auditLogConfigs = _json["auditLogConfigs"].map((value) => new AuditLogConf ig.fromJson(value)).toList();
1222 }
1205 if (_json.containsKey("exemptedMembers")) { 1223 if (_json.containsKey("exemptedMembers")) {
1206 exemptedMembers = _json["exemptedMembers"]; 1224 exemptedMembers = _json["exemptedMembers"];
1207 } 1225 }
1208 if (_json.containsKey("service")) { 1226 if (_json.containsKey("service")) {
1209 service = _json["service"]; 1227 service = _json["service"];
1210 } 1228 }
1211 } 1229 }
1212 1230
1213 core.Map toJson() { 1231 core.Map toJson() {
1214 var _json = new core.Map(); 1232 var _json = new core.Map();
1233 if (auditLogConfigs != null) {
1234 _json["auditLogConfigs"] = auditLogConfigs.map((value) => (value).toJson() ).toList();
1235 }
1215 if (exemptedMembers != null) { 1236 if (exemptedMembers != null) {
1216 _json["exemptedMembers"] = exemptedMembers; 1237 _json["exemptedMembers"] = exemptedMembers;
1217 } 1238 }
1218 if (service != null) { 1239 if (service != null) {
1219 _json["service"] = service; 1240 _json["service"] = service;
1220 } 1241 }
1221 return _json; 1242 return _json;
1222 } 1243 }
1223 } 1244 }
1224 1245
1246 /** Provides the configuration for a sub-type of logging. */
1247 class AuditLogConfig {
1248 /**
1249 * Specifies the identities that are exempted from this type of logging
1250 * Follows the same format of Binding.members.
1251 */
1252 core.List<core.String> exemptedMembers;
1253 /**
1254 * The log type that this config enables.
1255 * Possible string values are:
1256 * - "LOG_TYPE_UNSPECIFIED" : Default case. Should never be this.
1257 * - "ADMIN_READ" : Log admin reads
1258 * - "DATA_WRITE" : Log data writes
1259 * - "DATA_READ" : Log data reads
1260 */
1261 core.String logType;
1262
1263 AuditLogConfig();
1264
1265 AuditLogConfig.fromJson(core.Map _json) {
1266 if (_json.containsKey("exemptedMembers")) {
1267 exemptedMembers = _json["exemptedMembers"];
1268 }
1269 if (_json.containsKey("logType")) {
1270 logType = _json["logType"];
1271 }
1272 }
1273
1274 core.Map toJson() {
1275 var _json = new core.Map();
1276 if (exemptedMembers != null) {
1277 _json["exemptedMembers"] = exemptedMembers;
1278 }
1279 if (logType != null) {
1280 _json["logType"] = logType;
1281 }
1282 return _json;
1283 }
1284 }
1285
1225 /** 1286 /**
1226 * Configuration for an anthentication provider, including support for 1287 * Configuration for an anthentication provider, including support for
1227 * [JSON Web Token 1288 * [JSON Web Token
1228 * (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). 1289 * (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
1229 */ 1290 */
1230 class AuthProvider { 1291 class AuthProvider {
1231 /** 1292 /**
1232 * The list of JWT 1293 * The list of JWT
1233 * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32# section-4.1.3). 1294 * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32# section-4.1.3).
1234 * that are allowed to access. A JWT containing any of these audiences will 1295 * that are allowed to access. A JWT containing any of these audiences will
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1368 } 1429 }
1369 } 1430 }
1370 1431
1371 /** 1432 /**
1372 * `Authentication` defines the authentication configuration for an API. 1433 * `Authentication` defines the authentication configuration for an API.
1373 * 1434 *
1374 * Example for an API targeted for external use: 1435 * Example for an API targeted for external use:
1375 * 1436 *
1376 * name: calendar.googleapis.com 1437 * name: calendar.googleapis.com
1377 * authentication: 1438 * authentication:
1439 * providers:
1440 * - id: google_calendar_auth
1441 * jwks_uri: https://www.googleapis.com/oauth2/v1/certs
1442 * issuer: https://securetoken.google.com
1378 * rules: 1443 * rules:
1379 * - selector: "*" 1444 * - selector: "*"
1380 * oauth: 1445 * requirements:
1381 * canonical_scopes: https://www.googleapis.com/auth/calendar 1446 * provider_id: google_calendar_auth
1382 *
1383 * - selector: google.calendar.Delegate
1384 * oauth:
1385 * canonical_scopes: https://www.googleapis.com/auth/calendar.read
1386 */ 1447 */
1387 class Authentication { 1448 class Authentication {
1388 /** Defines a set of authentication providers that a service supports. */ 1449 /** Defines a set of authentication providers that a service supports. */
1389 core.List<AuthProvider> providers; 1450 core.List<AuthProvider> providers;
1390 /** 1451 /**
1391 * A list of authentication rules that apply to individual API methods. 1452 * A list of authentication rules that apply to individual API methods.
1392 * 1453 *
1393 * **NOTE:** All service configuration rules follow "last one wins" order. 1454 * **NOTE:** All service configuration rules follow "last one wins" order.
1394 */ 1455 */
1395 core.List<AuthenticationRule> rules; 1456 core.List<AuthenticationRule> rules;
(...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after
2556 * Example service configuration: 2617 * Example service configuration:
2557 * 2618 *
2558 * name: library-example.googleapis.com 2619 * name: library-example.googleapis.com
2559 * endpoints: 2620 * endpoints:
2560 * # Below entry makes 'google.example.library.v1.Library' 2621 * # Below entry makes 'google.example.library.v1.Library'
2561 * # API be served from endpoint address library-example.googleapis.com. 2622 * # API be served from endpoint address library-example.googleapis.com.
2562 * # It also allows HTTP OPTIONS calls to be passed to the backend, for 2623 * # It also allows HTTP OPTIONS calls to be passed to the backend, for
2563 * # it to decide whether the subsequent cross-origin request is 2624 * # it to decide whether the subsequent cross-origin request is
2564 * # allowed to proceed. 2625 * # allowed to proceed.
2565 * - name: library-example.googleapis.com 2626 * - name: library-example.googleapis.com
2566 * apis: google.example.library.v1.Library
2567 * allow_cors: true 2627 * allow_cors: true
2568 * # Below entry makes 'google.example.library.v1.Library'
2569 * # API be served from endpoint address
2570 * # google.example.library-example.v1.LibraryManager.
2571 * - name: library-manager.googleapis.com
2572 * apis: google.example.library.v1.LibraryManager
2573 * # BNS address for a borg job. Can specify a task by appending
2574 * # "/taskId" (e.g. "/0") to the job spec.
2575 *
2576 * Example OpenAPI extension for endpoint with allow_cors set to true:
2577 *
2578 * {
2579 * "swagger": "2.0",
2580 * "info": {
2581 * "description": "A simple..."
2582 * },
2583 * "host": "MY_PROJECT_ID.appspot.com",
2584 * "x-google-endpoints": [{
2585 * "name": "MY_PROJECT_ID.appspot.com",
2586 * "allow_cors": "true"
2587 * }]
2588 * }
2589 */ 2628 */
2590 class Endpoint { 2629 class Endpoint {
2591 /** 2630 /**
2592 * DEPRECATED: This field is no longer supported. Instead of using aliases, 2631 * DEPRECATED: This field is no longer supported. Instead of using aliases,
2593 * please specify multiple google.api.Endpoint for each of the intented 2632 * please specify multiple google.api.Endpoint for each of the intented
2594 * alias. 2633 * alias.
2595 * 2634 *
2596 * Additional names that this endpoint will be hosted on. 2635 * Additional names that this endpoint will be hosted on.
2597 */ 2636 */
2598 core.List<core.String> aliases; 2637 core.List<core.String> aliases;
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
3032 * message are populated from the path, query parameters, or body of 3071 * message are populated from the path, query parameters, or body of
3033 * the HTTP request. The mapping is typically specified as an 3072 * the HTTP request. The mapping is typically specified as an
3034 * `google.api.http` annotation, see "google/api/annotations.proto" 3073 * `google.api.http` annotation, see "google/api/annotations.proto"
3035 * for details. 3074 * for details.
3036 * 3075 *
3037 * The mapping consists of a field specifying the path template and 3076 * The mapping consists of a field specifying the path template and
3038 * method kind. The path template can refer to fields in the request 3077 * method kind. The path template can refer to fields in the request
3039 * message, as in the example below which describes a REST GET 3078 * message, as in the example below which describes a REST GET
3040 * operation on a resource collection of messages: 3079 * operation on a resource collection of messages:
3041 * 3080 *
3042 * ```proto 3081 *
3043 * service Messaging { 3082 * service Messaging {
3044 * rpc GetMessage(GetMessageRequest) returns (Message) { 3083 * rpc GetMessage(GetMessageRequest) returns (Message) {
3045 * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; 3084 * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}";
3046 * } 3085 * }
3047 * } 3086 * }
3048 * message GetMessageRequest { 3087 * message GetMessageRequest {
3049 * message SubMessage { 3088 * message SubMessage {
3050 * string subfield = 1; 3089 * string subfield = 1;
3051 * } 3090 * }
3052 * string message_id = 1; // mapped to the URL 3091 * string message_id = 1; // mapped to the URL
3053 * SubMessage sub = 2; // `sub.subfield` is url-mapped 3092 * SubMessage sub = 2; // `sub.subfield` is url-mapped
3054 * } 3093 * }
3055 * message Message { 3094 * message Message {
3056 * string text = 1; // content of the resource 3095 * string text = 1; // content of the resource
3057 * } 3096 * }
3058 * ``` 3097 *
3098 * The same http annotation can alternatively be expressed inside the
3099 * `GRPC API Configuration` YAML file.
3100 *
3101 * http:
3102 * rules:
3103 * - selector: <proto_package_name>.Messaging.GetMessage
3104 * get: /v1/messages/{message_id}/{sub.subfield}
3059 * 3105 *
3060 * This definition enables an automatic, bidrectional mapping of HTTP 3106 * This definition enables an automatic, bidrectional mapping of HTTP
3061 * JSON to RPC. Example: 3107 * JSON to RPC. Example:
3062 * 3108 *
3063 * HTTP | RPC 3109 * HTTP | RPC
3064 * -----|----- 3110 * -----|-----
3065 * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: 3111 * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub:
3066 * SubMessage(subfield: "foo"))` 3112 * SubMessage(subfield: "foo"))`
3067 * 3113 *
3068 * In general, not only fields but also field paths can be referenced 3114 * In general, not only fields but also field paths can be referenced
3069 * from a path pattern. Fields mapped to the path pattern cannot be 3115 * from a path pattern. Fields mapped to the path pattern cannot be
3070 * repeated and must have a primitive (non-message) type. 3116 * repeated and must have a primitive (non-message) type.
3071 * 3117 *
3072 * Any fields in the request message which are not bound by the path 3118 * Any fields in the request message which are not bound by the path
3073 * pattern automatically become (optional) HTTP query 3119 * pattern automatically become (optional) HTTP query
3074 * parameters. Assume the following definition of the request message: 3120 * parameters. Assume the following definition of the request message:
3075 * 3121 *
3076 * ```proto 3122 *
3077 * message GetMessageRequest { 3123 * message GetMessageRequest {
3078 * message SubMessage { 3124 * message SubMessage {
3079 * string subfield = 1; 3125 * string subfield = 1;
3080 * } 3126 * }
3081 * string message_id = 1; // mapped to the URL 3127 * string message_id = 1; // mapped to the URL
3082 * int64 revision = 2; // becomes a parameter 3128 * int64 revision = 2; // becomes a parameter
3083 * SubMessage sub = 3; // `sub.subfield` becomes a parameter 3129 * SubMessage sub = 3; // `sub.subfield` becomes a parameter
3084 * } 3130 * }
3085 * ``` 3131 *
3086 * 3132 *
3087 * This enables a HTTP JSON to RPC mapping as below: 3133 * This enables a HTTP JSON to RPC mapping as below:
3088 * 3134 *
3089 * HTTP | RPC 3135 * HTTP | RPC
3090 * -----|----- 3136 * -----|-----
3091 * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | 3137 * `GET /v1/messages/123456?revision=2&sub.subfield=foo` |
3092 * `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: 3138 * `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield:
3093 * "foo"))` 3139 * "foo"))`
3094 * 3140 *
3095 * Note that fields which are mapped to HTTP parameters must have a 3141 * Note that fields which are mapped to HTTP parameters must have a
3096 * primitive type or a repeated primitive type. Message types are not 3142 * primitive type or a repeated primitive type. Message types are not
3097 * allowed. In the case of a repeated type, the parameter can be 3143 * allowed. In the case of a repeated type, the parameter can be
3098 * repeated in the URL, as in `...?param=A&param=B`. 3144 * repeated in the URL, as in `...?param=A&param=B`.
3099 * 3145 *
3100 * For HTTP method kinds which allow a request body, the `body` field 3146 * For HTTP method kinds which allow a request body, the `body` field
3101 * specifies the mapping. Consider a REST update method on the 3147 * specifies the mapping. Consider a REST update method on the
3102 * message resource collection: 3148 * message resource collection:
3103 * 3149 *
3104 * ```proto 3150 *
3105 * service Messaging { 3151 * service Messaging {
3106 * rpc UpdateMessage(UpdateMessageRequest) returns (Message) { 3152 * rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
3107 * option (google.api.http) = { 3153 * option (google.api.http) = {
3108 * put: "/v1/messages/{message_id}" 3154 * put: "/v1/messages/{message_id}"
3109 * body: "message" 3155 * body: "message"
3110 * }; 3156 * };
3111 * } 3157 * }
3112 * } 3158 * }
3113 * message UpdateMessageRequest { 3159 * message UpdateMessageRequest {
3114 * string message_id = 1; // mapped to the URL 3160 * string message_id = 1; // mapped to the URL
3115 * Message message = 2; // mapped to the body 3161 * Message message = 2; // mapped to the body
3116 * } 3162 * }
3117 * ``` 3163 *
3118 * 3164 *
3119 * The following HTTP JSON to RPC mapping is enabled, where the 3165 * The following HTTP JSON to RPC mapping is enabled, where the
3120 * representation of the JSON in the request body is determined by 3166 * representation of the JSON in the request body is determined by
3121 * protos JSON encoding: 3167 * protos JSON encoding:
3122 * 3168 *
3123 * HTTP | RPC 3169 * HTTP | RPC
3124 * -----|----- 3170 * -----|-----
3125 * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: 3171 * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
3126 * "123456" message { text: "Hi!" })` 3172 * "123456" message { text: "Hi!" })`
3127 * 3173 *
3128 * The special name `*` can be used in the body mapping to define that 3174 * The special name `*` can be used in the body mapping to define that
3129 * every field not bound by the path template should be mapped to the 3175 * every field not bound by the path template should be mapped to the
3130 * request body. This enables the following alternative definition of 3176 * request body. This enables the following alternative definition of
3131 * the update method: 3177 * the update method:
3132 * 3178 *
3133 * ```proto 3179 * service Messaging {
3134 * service Messaging { 3180 * rpc UpdateMessage(Message) returns (Message) {
3135 * rpc UpdateMessage(Message) returns (Message) { 3181 * option (google.api.http) = {
3136 * option (google.api.http) = { 3182 * put: "/v1/messages/{message_id}"
3137 * put: "/v1/messages/{message_id}" 3183 * body: "*"
3138 * body: "*" 3184 * };
3139 * }; 3185 * }
3140 * } 3186 * }
3141 * } 3187 * message Message {
3142 * message Message { 3188 * string message_id = 1;
3143 * string message_id = 1; 3189 * string text = 2;
3144 * string text = 2; 3190 * }
3145 * } 3191 *
3146 * ```
3147 * 3192 *
3148 * The following HTTP JSON to RPC mapping is enabled: 3193 * The following HTTP JSON to RPC mapping is enabled:
3149 * 3194 *
3150 * HTTP | RPC 3195 * HTTP | RPC
3151 * -----|----- 3196 * -----|-----
3152 * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: 3197 * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
3153 * "123456" text: "Hi!")` 3198 * "123456" text: "Hi!")`
3154 * 3199 *
3155 * Note that when using `*` in the body mapping, it is not possible to 3200 * Note that when using `*` in the body mapping, it is not possible to
3156 * have HTTP parameters, as all fields not bound by the path end in 3201 * have HTTP parameters, as all fields not bound by the path end in
3157 * the body. This makes this option more rarely used in practice of 3202 * the body. This makes this option more rarely used in practice of
3158 * defining REST APIs. The common usage of `*` is in custom methods 3203 * defining REST APIs. The common usage of `*` is in custom methods
3159 * which don't use the URL at all for transferring data. 3204 * which don't use the URL at all for transferring data.
3160 * 3205 *
3161 * It is possible to define multiple HTTP methods for one RPC by using 3206 * It is possible to define multiple HTTP methods for one RPC by using
3162 * the `additional_bindings` option. Example: 3207 * the `additional_bindings` option. Example:
3163 * 3208 *
3164 * ```proto 3209 * service Messaging {
3165 * service Messaging { 3210 * rpc GetMessage(GetMessageRequest) returns (Message) {
3166 * rpc GetMessage(GetMessageRequest) returns (Message) { 3211 * option (google.api.http) = {
3167 * option (google.api.http) = { 3212 * get: "/v1/messages/{message_id}"
3168 * get: "/v1/messages/{message_id}" 3213 * additional_bindings {
3169 * additional_bindings { 3214 * get: "/v1/users/{user_id}/messages/{message_id}"
3170 * get: "/v1/users/{user_id}/messages/{message_id}" 3215 * }
3216 * };
3171 * } 3217 * }
3172 * }; 3218 * }
3173 * } 3219 * message GetMessageRequest {
3174 * } 3220 * string message_id = 1;
3175 * message GetMessageRequest { 3221 * string user_id = 2;
3176 * string message_id = 1; 3222 * }
3177 * string user_id = 2; 3223 *
3178 * }
3179 * ```
3180 * 3224 *
3181 * This enables the following two alternative HTTP JSON to RPC 3225 * This enables the following two alternative HTTP JSON to RPC
3182 * mappings: 3226 * mappings:
3183 * 3227 *
3184 * HTTP | RPC 3228 * HTTP | RPC
3185 * -----|----- 3229 * -----|-----
3186 * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` 3230 * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
3187 * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: 3231 * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id:
3188 * "123456")` 3232 * "123456")`
3189 * 3233 *
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
3240 /** 3284 /**
3241 * Additional HTTP bindings for the selector. Nested bindings must 3285 * Additional HTTP bindings for the selector. Nested bindings must
3242 * not contain an `additional_bindings` field themselves (that is, 3286 * not contain an `additional_bindings` field themselves (that is,
3243 * the nesting may only be one level deep). 3287 * the nesting may only be one level deep).
3244 */ 3288 */
3245 core.List<HttpRule> additionalBindings; 3289 core.List<HttpRule> additionalBindings;
3246 /** 3290 /**
3247 * The name of the request field whose value is mapped to the HTTP body, or 3291 * The name of the request field whose value is mapped to the HTTP body, or
3248 * `*` for mapping all fields not captured by the path pattern to the HTTP 3292 * `*` for mapping all fields not captured by the path pattern to the HTTP
3249 * body. NOTE: the referred field must not be a repeated field and must be 3293 * body. NOTE: the referred field must not be a repeated field and must be
3250 * present at the top-level of response message type. 3294 * present at the top-level of request message type.
3251 */ 3295 */
3252 core.String body; 3296 core.String body;
3253 /** Custom pattern is used for defining custom verbs. */ 3297 /** Custom pattern is used for defining custom verbs. */
3254 CustomHttpPattern custom; 3298 CustomHttpPattern custom;
3255 /** Used for deleting a resource. */ 3299 /** Used for deleting a resource. */
3256 core.String delete; 3300 core.String delete;
3257 /** Used for listing and getting information about resources. */ 3301 /** Used for listing and getting information about resources. */
3258 core.String get; 3302 core.String get;
3259 /** 3303 /**
3260 * Do not use this. For media support, add instead 3304 * Do not use this. For media support, add instead
(...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after
4611 } 4655 }
4612 return _json; 4656 return _json;
4613 } 4657 }
4614 } 4658 }
4615 4659
4616 /** 4660 /**
4617 * A protocol buffer option, which can be attached to a message, field, 4661 * A protocol buffer option, which can be attached to a message, field,
4618 * enumeration, etc. 4662 * enumeration, etc.
4619 */ 4663 */
4620 class Option { 4664 class Option {
4621 /** The option's name. For example, `"java_package"`. */ 4665 /**
4666 * The option's name. For protobuf built-in options (options defined in
4667 * descriptor.proto), this is the short name. For example, `"map_entry"`.
4668 * For custom options, it should be the fully-qualified name. For example,
4669 * `"google.api.http"`.
4670 */
4622 core.String name; 4671 core.String name;
4623 /** 4672 /**
4624 * The option's value. For example, `"com.google.protobuf"`. 4673 * The option's value packed in an Any message. If the value is a primitive,
4674 * the corresponding wrapper type defined in google/protobuf/wrappers.proto
4675 * should be used. If the value is an enum, it should be stored as an int32
4676 * value using the google.protobuf.Int32Value type.
4625 * 4677 *
4626 * The values for Object must be JSON objects. It can consist of `num`, 4678 * The values for Object must be JSON objects. It can consist of `num`,
4627 * `String`, `bool` and `null` as well as `Map` and `List` values. 4679 * `String`, `bool` and `null` as well as `Map` and `List` values.
4628 */ 4680 */
4629 core.Map<core.String, core.Object> value; 4681 core.Map<core.String, core.Object> value;
4630 4682
4631 Option(); 4683 Option();
4632 4684
4633 Option.fromJson(core.Map _json) { 4685 Option.fromJson(core.Map _json) {
4634 if (_json.containsKey("name")) { 4686 if (_json.containsKey("name")) {
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
5055 * specific aspect, such as auth. See each proto message definition for details. 5107 * specific aspect, such as auth. See each proto message definition for details.
5056 * 5108 *
5057 * Example: 5109 * Example:
5058 * 5110 *
5059 * type: google.api.Service 5111 * type: google.api.Service
5060 * config_version: 3 5112 * config_version: 3
5061 * name: calendar.googleapis.com 5113 * name: calendar.googleapis.com
5062 * title: Google Calendar API 5114 * title: Google Calendar API
5063 * apis: 5115 * apis:
5064 * - name: google.calendar.v3.Calendar 5116 * - name: google.calendar.v3.Calendar
5065 * backend: 5117 * authentication:
5118 * providers:
5119 * - id: google_calendar_auth
5120 * jwks_uri: https://www.googleapis.com/oauth2/v1/certs
5121 * issuer: https://securetoken.google.com
5066 * rules: 5122 * rules:
5067 * - selector: "google.calendar.v3.*" 5123 * - selector: "*"
5068 * address: calendar.example.com 5124 * requirements:
5125 * provider_id: google_calendar_auth
5069 */ 5126 */
5070 class Service { 5127 class Service {
5071 /** 5128 /**
5072 * A list of API interfaces exported by this service. Only the `name` field 5129 * A list of API interfaces exported by this service. Only the `name` field
5073 * of the google.protobuf.Api needs to be provided by the configuration 5130 * of the google.protobuf.Api needs to be provided by the configuration
5074 * author, as the remaining fields will be derived from the IDL during the 5131 * author, as the remaining fields will be derived from the IDL during the
5075 * normalization process. It is an error to specify an API interface here 5132 * normalization process. It is an error to specify an API interface here
5076 * which cannot be resolved against the associated IDL files. 5133 * which cannot be resolved against the associated IDL files.
5077 */ 5134 */
5078 core.List<Api> apis; 5135 core.List<Api> apis;
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
5590 * an HTTP header or a URL query parameter, and if both are passed the behavior 5647 * an HTTP header or a URL query parameter, and if both are passed the behavior
5591 * is implementation-dependent. 5648 * is implementation-dependent.
5592 */ 5649 */
5593 class SystemParameter { 5650 class SystemParameter {
5594 /** 5651 /**
5595 * Define the HTTP header name to use for the parameter. It is case 5652 * Define the HTTP header name to use for the parameter. It is case
5596 * insensitive. 5653 * insensitive.
5597 */ 5654 */
5598 core.String httpHeader; 5655 core.String httpHeader;
5599 /** 5656 /**
5600 * Define the name of the parameter, such as "api_key", "alt", "callback", 5657 * Define the name of the parameter, such as "api_key" . It is case sensitive.
5601 * and etc. It is case sensitive.
5602 */ 5658 */
5603 core.String name; 5659 core.String name;
5604 /** 5660 /**
5605 * Define the URL query parameter name to use for the parameter. It is case 5661 * Define the URL query parameter name to use for the parameter. It is case
5606 * sensitive. 5662 * sensitive.
5607 */ 5663 */
5608 core.String urlQueryParameter; 5664 core.String urlQueryParameter;
5609 5665
5610 SystemParameter(); 5666 SystemParameter();
5611 5667
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
5690 */ 5746 */
5691 class SystemParameters { 5747 class SystemParameters {
5692 /** 5748 /**
5693 * Define system parameters. 5749 * Define system parameters.
5694 * 5750 *
5695 * The parameters defined here will override the default parameters 5751 * The parameters defined here will override the default parameters
5696 * implemented by the system. If this field is missing from the service 5752 * implemented by the system. If this field is missing from the service
5697 * config, default system parameters will be used. Default system parameters 5753 * config, default system parameters will be used. Default system parameters
5698 * and names is implementation-dependent. 5754 * and names is implementation-dependent.
5699 * 5755 *
5700 * Example: define api key and alt name for all methods 5756 * Example: define api key for all methods
5701 * 5757 *
5702 * system_parameters 5758 * system_parameters
5703 * rules: 5759 * rules:
5704 * - selector: "*" 5760 * - selector: "*"
5705 * parameters: 5761 * parameters:
5706 * - name: api_key 5762 * - name: api_key
5707 * url_query_parameter: api_key 5763 * url_query_parameter: api_key
5708 * - name: alt 5764 *
5709 * http_header: Response-Content-Type
5710 * 5765 *
5711 * Example: define 2 api key names for a specific method. 5766 * Example: define 2 api key names for a specific method.
5712 * 5767 *
5713 * system_parameters 5768 * system_parameters
5714 * rules: 5769 * rules:
5715 * - selector: "/ListShelves" 5770 * - selector: "/ListShelves"
5716 * parameters: 5771 * parameters:
5717 * - name: api_key 5772 * - name: api_key
5718 * http_header: Api-Key1 5773 * http_header: Api-Key1
5719 * - name: api_key 5774 * - name: api_key
5720 * http_header: Api-Key2 5775 * http_header: Api-Key2
5721 * 5776 *
5722 * **NOTE:** All service configuration rules follow "last one wins" order. 5777 * **NOTE:** All service configuration rules follow "last one wins" order.
5723 */ 5778 */
5724 core.List<SystemParameterRule> rules; 5779 core.List<SystemParameterRule> rules;
5725 5780
5726 SystemParameters(); 5781 SystemParameters();
5727 5782
5728 SystemParameters.fromJson(core.Map _json) { 5783 SystemParameters.fromJson(core.Map _json) {
5729 if (_json.containsKey("rules")) { 5784 if (_json.containsKey("rules")) {
5730 rules = _json["rules"].map((value) => new SystemParameterRule.fromJson(val ue)).toList(); 5785 rules = _json["rules"].map((value) => new SystemParameterRule.fromJson(val ue)).toList();
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
5933 if (service != null) { 5988 if (service != null) {
5934 _json["service"] = (service).toJson(); 5989 _json["service"] = (service).toJson();
5935 } 5990 }
5936 return _json; 5991 return _json;
5937 } 5992 }
5938 } 5993 }
5939 5994
5940 /** Configuration controlling usage of a service. */ 5995 /** Configuration controlling usage of a service. */
5941 class Usage { 5996 class Usage {
5942 /** 5997 /**
5998 * The full resource name of a channel used for sending notifications to the
5999 * service producer.
6000 *
6001 * Google Service Management currently only supports
6002 * [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification
6003 * channel. To use Google Cloud Pub/Sub as the channel, this must be the name
6004 * of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format
6005 * documented in https://cloud.google.com/pubsub/docs/overview.
6006 */
6007 core.String producerNotificationChannel;
6008 /**
5943 * Requirements that must be satisfied before a consumer project can use the 6009 * Requirements that must be satisfied before a consumer project can use the
5944 * service. Each requirement is of the form <service.name>/<requirement-id>; 6010 * service. Each requirement is of the form <service.name>/<requirement-id>;
5945 * for example 'serviceusage.googleapis.com/billing-enabled'. 6011 * for example 'serviceusage.googleapis.com/billing-enabled'.
5946 */ 6012 */
5947 core.List<core.String> requirements; 6013 core.List<core.String> requirements;
5948 /** 6014 /**
5949 * A list of usage rules that apply to individual API methods. 6015 * A list of usage rules that apply to individual API methods.
5950 * 6016 *
5951 * **NOTE:** All service configuration rules follow "last one wins" order. 6017 * **NOTE:** All service configuration rules follow "last one wins" order.
5952 */ 6018 */
5953 core.List<UsageRule> rules; 6019 core.List<UsageRule> rules;
5954 6020
5955 Usage(); 6021 Usage();
5956 6022
5957 Usage.fromJson(core.Map _json) { 6023 Usage.fromJson(core.Map _json) {
6024 if (_json.containsKey("producerNotificationChannel")) {
6025 producerNotificationChannel = _json["producerNotificationChannel"];
6026 }
5958 if (_json.containsKey("requirements")) { 6027 if (_json.containsKey("requirements")) {
5959 requirements = _json["requirements"]; 6028 requirements = _json["requirements"];
5960 } 6029 }
5961 if (_json.containsKey("rules")) { 6030 if (_json.containsKey("rules")) {
5962 rules = _json["rules"].map((value) => new UsageRule.fromJson(value)).toLis t(); 6031 rules = _json["rules"].map((value) => new UsageRule.fromJson(value)).toLis t();
5963 } 6032 }
5964 } 6033 }
5965 6034
5966 core.Map toJson() { 6035 core.Map toJson() {
5967 var _json = new core.Map(); 6036 var _json = new core.Map();
6037 if (producerNotificationChannel != null) {
6038 _json["producerNotificationChannel"] = producerNotificationChannel;
6039 }
5968 if (requirements != null) { 6040 if (requirements != null) {
5969 _json["requirements"] = requirements; 6041 _json["requirements"] = requirements;
5970 } 6042 }
5971 if (rules != null) { 6043 if (rules != null) {
5972 _json["rules"] = rules.map((value) => (value).toJson()).toList(); 6044 _json["rules"] = rules.map((value) => (value).toJson()).toList();
5973 } 6045 }
5974 return _json; 6046 return _json;
5975 } 6047 }
5976 } 6048 }
5977 6049
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
6130 var _json = new core.Map(); 6202 var _json = new core.Map();
6131 if (restriction != null) { 6203 if (restriction != null) {
6132 _json["restriction"] = restriction; 6204 _json["restriction"] = restriction;
6133 } 6205 }
6134 if (selector != null) { 6206 if (selector != null) {
6135 _json["selector"] = selector; 6207 _json["selector"] = selector;
6136 } 6208 }
6137 return _json; 6209 return _json;
6138 } 6210 }
6139 } 6211 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/servicecontrol/v1.dart ('k') | generated/googleapis/lib/sheets/v4.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698