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; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 } | 50 } |
51 | 51 |
52 | 52 |
53 class ProjectsServicesResourceApi { | 53 class ProjectsServicesResourceApi { |
54 final commons.ApiRequester _requester; | 54 final commons.ApiRequester _requester; |
55 | 55 |
56 ProjectsServicesResourceApi(commons.ApiRequester client) : | 56 ProjectsServicesResourceApi(commons.ApiRequester client) : |
57 _requester = client; | 57 _requester = client; |
58 | 58 |
59 /** | 59 /** |
60 * Disable a managed service for a consumer. | 60 * Disable a service so it can no longer be used with a |
| 61 * project. This prevents unintended usage that may cause unexpected billing |
| 62 * charges or security leaks. |
61 * | 63 * |
62 * Operation<response: google.protobuf.Empty> | 64 * Operation<response: google.protobuf.Empty> |
63 * | 65 * |
64 * [request] - The metadata request object. | 66 * [request] - The metadata request object. |
65 * | 67 * |
66 * Request parameters: | 68 * Request parameters: |
67 * | 69 * |
68 * [name] - Name of the consumer and the service to disable for that consumer. | 70 * [name] - Name of the consumer and the service to disable for that consumer. |
69 * | 71 * |
70 * The Service User implementation accepts the following forms for consumer: | 72 * The Service User implementation accepts the following forms for consumer: |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 "POST", | 105 "POST", |
104 body: _body, | 106 body: _body, |
105 queryParams: _queryParams, | 107 queryParams: _queryParams, |
106 uploadOptions: _uploadOptions, | 108 uploadOptions: _uploadOptions, |
107 uploadMedia: _uploadMedia, | 109 uploadMedia: _uploadMedia, |
108 downloadOptions: _downloadOptions); | 110 downloadOptions: _downloadOptions); |
109 return _response.then((data) => new Operation.fromJson(data)); | 111 return _response.then((data) => new Operation.fromJson(data)); |
110 } | 112 } |
111 | 113 |
112 /** | 114 /** |
113 * Enable a managed service for a consumer with the default settings. | 115 * Enable a service so it can be used with a project. |
| 116 * See [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for |
| 117 * more information. |
114 * | 118 * |
115 * Operation<response: google.protobuf.Empty> | 119 * Operation<response: google.protobuf.Empty> |
116 * | 120 * |
117 * google.rpc.Status errors may contain a | |
118 * google.rpc.PreconditionFailure error detail. | |
119 * | |
120 * [request] - The metadata request object. | 121 * [request] - The metadata request object. |
121 * | 122 * |
122 * Request parameters: | 123 * Request parameters: |
123 * | 124 * |
124 * [name] - Name of the consumer and the service to enable for that consumer. | 125 * [name] - Name of the consumer and the service to enable for that consumer. |
125 * | 126 * |
126 * A valid path would be: | 127 * A valid path would be: |
127 * - /v1/projects/my-project/services/servicemanagement.googleapis.com:enable | 128 * - /v1/projects/my-project/services/servicemanagement.googleapis.com:enable |
128 * Value must have pattern "^projects/[^/]+/services/[^/]+$". | 129 * Value must have pattern "^projects/[^/]+/services/[^/]+$". |
129 * | 130 * |
(...skipping 2835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2965 if (name != null) { | 2966 if (name != null) { |
2966 _json["name"] = name; | 2967 _json["name"] = name; |
2967 } | 2968 } |
2968 if (response != null) { | 2969 if (response != null) { |
2969 _json["response"] = response; | 2970 _json["response"] = response; |
2970 } | 2971 } |
2971 return _json; | 2972 return _json; |
2972 } | 2973 } |
2973 } | 2974 } |
2974 | 2975 |
| 2976 /** The metadata associated with a long running operation resource. */ |
| 2977 class OperationMetadata { |
| 2978 /** Percentage of completion of this operation, ranging from 0 to 100. */ |
| 2979 core.int progressPercentage; |
| 2980 /** |
| 2981 * The full name of the resources that this operation is directly |
| 2982 * associated with. |
| 2983 */ |
| 2984 core.List<core.String> resourceNames; |
| 2985 /** The start time of the operation. */ |
| 2986 core.String startTime; |
| 2987 /** Detailed status information for each step. The order is undetermined. */ |
| 2988 core.List<Step> steps; |
| 2989 |
| 2990 OperationMetadata(); |
| 2991 |
| 2992 OperationMetadata.fromJson(core.Map _json) { |
| 2993 if (_json.containsKey("progressPercentage")) { |
| 2994 progressPercentage = _json["progressPercentage"]; |
| 2995 } |
| 2996 if (_json.containsKey("resourceNames")) { |
| 2997 resourceNames = _json["resourceNames"]; |
| 2998 } |
| 2999 if (_json.containsKey("startTime")) { |
| 3000 startTime = _json["startTime"]; |
| 3001 } |
| 3002 if (_json.containsKey("steps")) { |
| 3003 steps = _json["steps"].map((value) => new Step.fromJson(value)).toList(); |
| 3004 } |
| 3005 } |
| 3006 |
| 3007 core.Map toJson() { |
| 3008 var _json = new core.Map(); |
| 3009 if (progressPercentage != null) { |
| 3010 _json["progressPercentage"] = progressPercentage; |
| 3011 } |
| 3012 if (resourceNames != null) { |
| 3013 _json["resourceNames"] = resourceNames; |
| 3014 } |
| 3015 if (startTime != null) { |
| 3016 _json["startTime"] = startTime; |
| 3017 } |
| 3018 if (steps != null) { |
| 3019 _json["steps"] = steps.map((value) => (value).toJson()).toList(); |
| 3020 } |
| 3021 return _json; |
| 3022 } |
| 3023 } |
| 3024 |
2975 /** | 3025 /** |
2976 * A protocol buffer option, which can be attached to a message, field, | 3026 * A protocol buffer option, which can be attached to a message, field, |
2977 * enumeration, etc. | 3027 * enumeration, etc. |
2978 */ | 3028 */ |
2979 class Option { | 3029 class Option { |
2980 /** | 3030 /** |
2981 * The option's name. For protobuf built-in options (options defined in | 3031 * The option's name. For protobuf built-in options (options defined in |
2982 * descriptor.proto), this is the short name. For example, `"map_entry"`. | 3032 * descriptor.proto), this is the short name. For example, `"map_entry"`. |
2983 * For custom options, it should be the fully-qualified name. For example, | 3033 * For custom options, it should be the fully-qualified name. For example, |
2984 * `"google.api.http"`. | 3034 * `"google.api.http"`. |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3248 * The DNS address at which this service is available, | 3298 * The DNS address at which this service is available, |
3249 * e.g. `calendar.googleapis.com`. | 3299 * e.g. `calendar.googleapis.com`. |
3250 */ | 3300 */ |
3251 core.String name; | 3301 core.String name; |
3252 /** | 3302 /** |
3253 * The id of the Google developer project that owns the service. | 3303 * The id of the Google developer project that owns the service. |
3254 * Members of this project can manage the service configuration, | 3304 * Members of this project can manage the service configuration, |
3255 * manage consumption of the service, etc. | 3305 * manage consumption of the service, etc. |
3256 */ | 3306 */ |
3257 core.String producerProjectId; | 3307 core.String producerProjectId; |
| 3308 /** |
| 3309 * Output only. The source information for this configuration if available. |
| 3310 */ |
| 3311 SourceInfo sourceInfo; |
3258 /** System parameter configuration. */ | 3312 /** System parameter configuration. */ |
3259 SystemParameters systemParameters; | 3313 SystemParameters systemParameters; |
3260 /** | 3314 /** |
3261 * A list of all proto message types included in this API service. | 3315 * A list of all proto message types included in this API service. |
3262 * It serves similar purpose as [google.api.Service.types], except that | 3316 * It serves similar purpose as [google.api.Service.types], except that |
3263 * these types are not needed by user-defined APIs. Therefore, they will not | 3317 * these types are not needed by user-defined APIs. Therefore, they will not |
3264 * show up in the generated discovery doc. This field should only be used | 3318 * show up in the generated discovery doc. This field should only be used |
3265 * to define system APIs in ESF. | 3319 * to define system APIs in ESF. |
3266 */ | 3320 */ |
3267 core.List<Type> systemTypes; | 3321 core.List<Type> systemTypes; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3339 } | 3393 } |
3340 if (_json.containsKey("monitoring")) { | 3394 if (_json.containsKey("monitoring")) { |
3341 monitoring = new Monitoring.fromJson(_json["monitoring"]); | 3395 monitoring = new Monitoring.fromJson(_json["monitoring"]); |
3342 } | 3396 } |
3343 if (_json.containsKey("name")) { | 3397 if (_json.containsKey("name")) { |
3344 name = _json["name"]; | 3398 name = _json["name"]; |
3345 } | 3399 } |
3346 if (_json.containsKey("producerProjectId")) { | 3400 if (_json.containsKey("producerProjectId")) { |
3347 producerProjectId = _json["producerProjectId"]; | 3401 producerProjectId = _json["producerProjectId"]; |
3348 } | 3402 } |
| 3403 if (_json.containsKey("sourceInfo")) { |
| 3404 sourceInfo = new SourceInfo.fromJson(_json["sourceInfo"]); |
| 3405 } |
3349 if (_json.containsKey("systemParameters")) { | 3406 if (_json.containsKey("systemParameters")) { |
3350 systemParameters = new SystemParameters.fromJson(_json["systemParameters"]
); | 3407 systemParameters = new SystemParameters.fromJson(_json["systemParameters"]
); |
3351 } | 3408 } |
3352 if (_json.containsKey("systemTypes")) { | 3409 if (_json.containsKey("systemTypes")) { |
3353 systemTypes = _json["systemTypes"].map((value) => new Type.fromJson(value)
).toList(); | 3410 systemTypes = _json["systemTypes"].map((value) => new Type.fromJson(value)
).toList(); |
3354 } | 3411 } |
3355 if (_json.containsKey("title")) { | 3412 if (_json.containsKey("title")) { |
3356 title = _json["title"]; | 3413 title = _json["title"]; |
3357 } | 3414 } |
3358 if (_json.containsKey("types")) { | 3415 if (_json.containsKey("types")) { |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3421 } | 3478 } |
3422 if (monitoring != null) { | 3479 if (monitoring != null) { |
3423 _json["monitoring"] = (monitoring).toJson(); | 3480 _json["monitoring"] = (monitoring).toJson(); |
3424 } | 3481 } |
3425 if (name != null) { | 3482 if (name != null) { |
3426 _json["name"] = name; | 3483 _json["name"] = name; |
3427 } | 3484 } |
3428 if (producerProjectId != null) { | 3485 if (producerProjectId != null) { |
3429 _json["producerProjectId"] = producerProjectId; | 3486 _json["producerProjectId"] = producerProjectId; |
3430 } | 3487 } |
| 3488 if (sourceInfo != null) { |
| 3489 _json["sourceInfo"] = (sourceInfo).toJson(); |
| 3490 } |
3431 if (systemParameters != null) { | 3491 if (systemParameters != null) { |
3432 _json["systemParameters"] = (systemParameters).toJson(); | 3492 _json["systemParameters"] = (systemParameters).toJson(); |
3433 } | 3493 } |
3434 if (systemTypes != null) { | 3494 if (systemTypes != null) { |
3435 _json["systemTypes"] = systemTypes.map((value) => (value).toJson()).toList
(); | 3495 _json["systemTypes"] = systemTypes.map((value) => (value).toJson()).toList
(); |
3436 } | 3496 } |
3437 if (title != null) { | 3497 if (title != null) { |
3438 _json["title"] = title; | 3498 _json["title"] = title; |
3439 } | 3499 } |
3440 if (types != null) { | 3500 if (types != null) { |
(...skipping 30 matching lines...) Expand all Loading... |
3471 | 3531 |
3472 core.Map toJson() { | 3532 core.Map toJson() { |
3473 var _json = new core.Map(); | 3533 var _json = new core.Map(); |
3474 if (fileName != null) { | 3534 if (fileName != null) { |
3475 _json["fileName"] = fileName; | 3535 _json["fileName"] = fileName; |
3476 } | 3536 } |
3477 return _json; | 3537 return _json; |
3478 } | 3538 } |
3479 } | 3539 } |
3480 | 3540 |
| 3541 /** Source information used to create a Service Config */ |
| 3542 class SourceInfo { |
| 3543 /** |
| 3544 * All files used during config generation. |
| 3545 * |
| 3546 * The values for Object must be JSON objects. It can consist of `num`, |
| 3547 * `String`, `bool` and `null` as well as `Map` and `List` values. |
| 3548 */ |
| 3549 core.List<core.Map<core.String, core.Object>> sourceFiles; |
| 3550 |
| 3551 SourceInfo(); |
| 3552 |
| 3553 SourceInfo.fromJson(core.Map _json) { |
| 3554 if (_json.containsKey("sourceFiles")) { |
| 3555 sourceFiles = _json["sourceFiles"]; |
| 3556 } |
| 3557 } |
| 3558 |
| 3559 core.Map toJson() { |
| 3560 var _json = new core.Map(); |
| 3561 if (sourceFiles != null) { |
| 3562 _json["sourceFiles"] = sourceFiles; |
| 3563 } |
| 3564 return _json; |
| 3565 } |
| 3566 } |
| 3567 |
3481 /** | 3568 /** |
3482 * The `Status` type defines a logical error model that is suitable for | 3569 * The `Status` type defines a logical error model that is suitable for |
3483 * different | 3570 * different |
3484 * programming environments, including REST APIs and RPC APIs. It is used by | 3571 * programming environments, including REST APIs and RPC APIs. It is used by |
3485 * [gRPC](https://github.com/grpc). The error model is designed to be: | 3572 * [gRPC](https://github.com/grpc). The error model is designed to be: |
3486 * | 3573 * |
3487 * - Simple to use and understand for most users | 3574 * - Simple to use and understand for most users |
3488 * - Flexible enough to meet unexpected needs | 3575 * - Flexible enough to meet unexpected needs |
3489 * | 3576 * |
3490 * # Overview | 3577 * # Overview |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3574 if (details != null) { | 3661 if (details != null) { |
3575 _json["details"] = details; | 3662 _json["details"] = details; |
3576 } | 3663 } |
3577 if (message != null) { | 3664 if (message != null) { |
3578 _json["message"] = message; | 3665 _json["message"] = message; |
3579 } | 3666 } |
3580 return _json; | 3667 return _json; |
3581 } | 3668 } |
3582 } | 3669 } |
3583 | 3670 |
| 3671 /** Represents the status of one operation step. */ |
| 3672 class Step { |
| 3673 /** The short description of the step. */ |
| 3674 core.String description; |
| 3675 /** |
| 3676 * The status code. |
| 3677 * Possible string values are: |
| 3678 * - "STATUS_UNSPECIFIED" : Unspecifed code. |
| 3679 * - "DONE" : The operation or step has completed without errors. |
| 3680 * - "NOT_STARTED" : The operation or step has not started yet. |
| 3681 * - "IN_PROGRESS" : The operation or step is in progress. |
| 3682 * - "FAILED" : The operation or step has completed with errors. |
| 3683 * - "CANCELLED" : The operation or step has completed with cancellation. |
| 3684 */ |
| 3685 core.String status; |
| 3686 |
| 3687 Step(); |
| 3688 |
| 3689 Step.fromJson(core.Map _json) { |
| 3690 if (_json.containsKey("description")) { |
| 3691 description = _json["description"]; |
| 3692 } |
| 3693 if (_json.containsKey("status")) { |
| 3694 status = _json["status"]; |
| 3695 } |
| 3696 } |
| 3697 |
| 3698 core.Map toJson() { |
| 3699 var _json = new core.Map(); |
| 3700 if (description != null) { |
| 3701 _json["description"] = description; |
| 3702 } |
| 3703 if (status != null) { |
| 3704 _json["status"] = status; |
| 3705 } |
| 3706 return _json; |
| 3707 } |
| 3708 } |
| 3709 |
3584 /** | 3710 /** |
3585 * Define a parameter's name and location. The parameter may be passed as either | 3711 * Define a parameter's name and location. The parameter may be passed as either |
3586 * an HTTP header or a URL query parameter, and if both are passed the behavior | 3712 * an HTTP header or a URL query parameter, and if both are passed the behavior |
3587 * is implementation-dependent. | 3713 * is implementation-dependent. |
3588 */ | 3714 */ |
3589 class SystemParameter { | 3715 class SystemParameter { |
3590 /** | 3716 /** |
3591 * Define the HTTP header name to use for the parameter. It is case | 3717 * Define the HTTP header name to use for the parameter. It is case |
3592 * insensitive. | 3718 * insensitive. |
3593 */ | 3719 */ |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4011 var _json = new core.Map(); | 4137 var _json = new core.Map(); |
4012 if (restriction != null) { | 4138 if (restriction != null) { |
4013 _json["restriction"] = restriction; | 4139 _json["restriction"] = restriction; |
4014 } | 4140 } |
4015 if (selector != null) { | 4141 if (selector != null) { |
4016 _json["selector"] = selector; | 4142 _json["selector"] = selector; |
4017 } | 4143 } |
4018 return _json; | 4144 return _json; |
4019 } | 4145 } |
4020 } | 4146 } |
OLD | NEW |