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.androidenterprise.v1; | 3 library googleapis.androidenterprise.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; | 10 import 'package:http/http.dart' as http; |
(...skipping 1919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1930 "POST", | 1930 "POST", |
1931 body: _body, | 1931 body: _body, |
1932 queryParams: _queryParams, | 1932 queryParams: _queryParams, |
1933 uploadOptions: _uploadOptions, | 1933 uploadOptions: _uploadOptions, |
1934 uploadMedia: _uploadMedia, | 1934 uploadMedia: _uploadMedia, |
1935 downloadOptions: _downloadOptions); | 1935 downloadOptions: _downloadOptions); |
1936 return _response.then((data) => null); | 1936 return _response.then((data) => null); |
1937 } | 1937 } |
1938 | 1938 |
1939 /** | 1939 /** |
1940 * Generates a URL that can be used to display an iframe to view the product's | 1940 * Generates a URL that can be rendered in an iframe to display the |
1941 * permissions (if any) and approve the product. This URL can be used to | 1941 * permissions (if any) of a product. An enterprise admin must view these |
1942 * approve the product for a limited time (currently 1 hour) using the | 1942 * permissions and accept them on behalf of their organization in order to |
1943 * Products.approve call. | 1943 * approve that product. |
| 1944 * |
| 1945 * Admins should accept the displayed permissions by interacting with a |
| 1946 * separate UI element in the EMM console, which in turn should trigger the |
| 1947 * use of this URL as the approvalUrlInfo.approvalUrl property in a |
| 1948 * Products.approve call to approve the product. This URL can only be used to |
| 1949 * display permissions for up to 1 day. |
1944 * | 1950 * |
1945 * Request parameters: | 1951 * Request parameters: |
1946 * | 1952 * |
1947 * [enterpriseId] - The ID of the enterprise. | 1953 * [enterpriseId] - The ID of the enterprise. |
1948 * | 1954 * |
1949 * [productId] - The ID of the product. | 1955 * [productId] - The ID of the product. |
1950 * | 1956 * |
1951 * [languageCode] - The language code that will be used for permission names | 1957 * [languageCode] - The BCP 47 language code used for permission names and |
1952 * and descriptions in the returned iframe. | 1958 * descriptions in the returned iframe, for instance "en-US". |
1953 * | 1959 * |
1954 * Completes with a [ProductsGenerateApprovalUrlResponse]. | 1960 * Completes with a [ProductsGenerateApprovalUrlResponse]. |
1955 * | 1961 * |
1956 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1962 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1957 * error. | 1963 * error. |
1958 * | 1964 * |
1959 * If the used [http.Client] completes with an error when making a REST call, | 1965 * If the used [http.Client] completes with an error when making a REST call, |
1960 * this method will complete with the same error. | 1966 * this method will complete with the same error. |
1961 */ | 1967 */ |
1962 async.Future<ProductsGenerateApprovalUrlResponse> generateApprovalUrl(core.Str
ing enterpriseId, core.String productId, {core.String languageCode}) { | 1968 async.Future<ProductsGenerateApprovalUrlResponse> generateApprovalUrl(core.Str
ing enterpriseId, core.String productId, {core.String languageCode}) { |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2278 "GET", | 2284 "GET", |
2279 body: _body, | 2285 body: _body, |
2280 queryParams: _queryParams, | 2286 queryParams: _queryParams, |
2281 uploadOptions: _uploadOptions, | 2287 uploadOptions: _uploadOptions, |
2282 uploadMedia: _uploadMedia, | 2288 uploadMedia: _uploadMedia, |
2283 downloadOptions: _downloadOptions); | 2289 downloadOptions: _downloadOptions); |
2284 return _response.then((data) => new User.fromJson(data)); | 2290 return _response.then((data) => new User.fromJson(data)); |
2285 } | 2291 } |
2286 | 2292 |
2287 /** | 2293 /** |
| 2294 * Retrieves the set of products a user is entitled to access. |
| 2295 * |
| 2296 * Request parameters: |
| 2297 * |
| 2298 * [enterpriseId] - The ID of the enterprise. |
| 2299 * |
| 2300 * [userId] - The ID of the user. |
| 2301 * |
| 2302 * Completes with a [ProductSet]. |
| 2303 * |
| 2304 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 2305 * error. |
| 2306 * |
| 2307 * If the used [http.Client] completes with an error when making a REST call, |
| 2308 * this method will complete with the same error. |
| 2309 */ |
| 2310 async.Future<ProductSet> getAvailableProductSet(core.String enterpriseId, core
.String userId) { |
| 2311 var _url = null; |
| 2312 var _queryParams = new core.Map(); |
| 2313 var _uploadMedia = null; |
| 2314 var _uploadOptions = null; |
| 2315 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2316 var _body = null; |
| 2317 |
| 2318 if (enterpriseId == null) { |
| 2319 throw new core.ArgumentError("Parameter enterpriseId is required."); |
| 2320 } |
| 2321 if (userId == null) { |
| 2322 throw new core.ArgumentError("Parameter userId is required."); |
| 2323 } |
| 2324 |
| 2325 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/availableProductSet'; |
| 2326 |
| 2327 var _response = _requester.request(_url, |
| 2328 "GET", |
| 2329 body: _body, |
| 2330 queryParams: _queryParams, |
| 2331 uploadOptions: _uploadOptions, |
| 2332 uploadMedia: _uploadMedia, |
| 2333 downloadOptions: _downloadOptions); |
| 2334 return _response.then((data) => new ProductSet.fromJson(data)); |
| 2335 } |
| 2336 |
| 2337 /** |
2288 * Looks up a user by email address. | 2338 * Looks up a user by email address. |
2289 * | 2339 * |
2290 * Request parameters: | 2340 * Request parameters: |
2291 * | 2341 * |
2292 * [enterpriseId] - The ID of the enterprise. | 2342 * [enterpriseId] - The ID of the enterprise. |
2293 * | 2343 * |
2294 * [email] - The exact primary email address of the user to look up. | 2344 * [email] - The exact primary email address of the user to look up. |
2295 * | 2345 * |
2296 * Completes with a [UsersListResponse]. | 2346 * Completes with a [UsersListResponse]. |
2297 * | 2347 * |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2366 var _response = _requester.request(_url, | 2416 var _response = _requester.request(_url, |
2367 "DELETE", | 2417 "DELETE", |
2368 body: _body, | 2418 body: _body, |
2369 queryParams: _queryParams, | 2419 queryParams: _queryParams, |
2370 uploadOptions: _uploadOptions, | 2420 uploadOptions: _uploadOptions, |
2371 uploadMedia: _uploadMedia, | 2421 uploadMedia: _uploadMedia, |
2372 downloadOptions: _downloadOptions); | 2422 downloadOptions: _downloadOptions); |
2373 return _response.then((data) => null); | 2423 return _response.then((data) => null); |
2374 } | 2424 } |
2375 | 2425 |
| 2426 /** |
| 2427 * Modifies the set of products a user is entitled to access. |
| 2428 * |
| 2429 * [request] - The metadata request object. |
| 2430 * |
| 2431 * Request parameters: |
| 2432 * |
| 2433 * [enterpriseId] - The ID of the enterprise. |
| 2434 * |
| 2435 * [userId] - The ID of the user. |
| 2436 * |
| 2437 * Completes with a [ProductSet]. |
| 2438 * |
| 2439 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 2440 * error. |
| 2441 * |
| 2442 * If the used [http.Client] completes with an error when making a REST call, |
| 2443 * this method will complete with the same error. |
| 2444 */ |
| 2445 async.Future<ProductSet> setAvailableProductSet(ProductSet request, core.Strin
g enterpriseId, core.String userId) { |
| 2446 var _url = null; |
| 2447 var _queryParams = new core.Map(); |
| 2448 var _uploadMedia = null; |
| 2449 var _uploadOptions = null; |
| 2450 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 2451 var _body = null; |
| 2452 |
| 2453 if (request != null) { |
| 2454 _body = convert.JSON.encode((request).toJson()); |
| 2455 } |
| 2456 if (enterpriseId == null) { |
| 2457 throw new core.ArgumentError("Parameter enterpriseId is required."); |
| 2458 } |
| 2459 if (userId == null) { |
| 2460 throw new core.ArgumentError("Parameter userId is required."); |
| 2461 } |
| 2462 |
| 2463 _url = 'enterprises/' + commons.Escaper.ecapeVariable('$enterpriseId') + '/u
sers/' + commons.Escaper.ecapeVariable('$userId') + '/availableProductSet'; |
| 2464 |
| 2465 var _response = _requester.request(_url, |
| 2466 "PUT", |
| 2467 body: _body, |
| 2468 queryParams: _queryParams, |
| 2469 uploadOptions: _uploadOptions, |
| 2470 uploadMedia: _uploadMedia, |
| 2471 downloadOptions: _downloadOptions); |
| 2472 return _response.then((data) => new ProductSet.fromJson(data)); |
| 2473 } |
| 2474 |
2376 } | 2475 } |
2377 | 2476 |
2378 | 2477 |
2379 | 2478 |
2380 /** | 2479 /** |
2381 * Represents the list of app restrictions available to be pre-configured for | 2480 * Represents the list of app restrictions available to be pre-configured for |
2382 * the product. | 2481 * the product. |
2383 */ | 2482 */ |
2384 class AppRestrictionsSchema { | 2483 class AppRestrictionsSchema { |
| 2484 /** |
| 2485 * Identifies what kind of resource this is. Value: the fixed string |
| 2486 * "androidenterprise#appRestrictionsSchema". |
| 2487 */ |
| 2488 core.String kind; |
2385 /** The set of restrictions that make up this schema. */ | 2489 /** The set of restrictions that make up this schema. */ |
2386 core.List<AppRestrictionsSchemaRestriction> restrictions; | 2490 core.List<AppRestrictionsSchemaRestriction> restrictions; |
2387 | 2491 |
2388 AppRestrictionsSchema(); | 2492 AppRestrictionsSchema(); |
2389 | 2493 |
2390 AppRestrictionsSchema.fromJson(core.Map _json) { | 2494 AppRestrictionsSchema.fromJson(core.Map _json) { |
| 2495 if (_json.containsKey("kind")) { |
| 2496 kind = _json["kind"]; |
| 2497 } |
2391 if (_json.containsKey("restrictions")) { | 2498 if (_json.containsKey("restrictions")) { |
2392 restrictions = _json["restrictions"].map((value) => new AppRestrictionsSch
emaRestriction.fromJson(value)).toList(); | 2499 restrictions = _json["restrictions"].map((value) => new AppRestrictionsSch
emaRestriction.fromJson(value)).toList(); |
2393 } | 2500 } |
2394 } | 2501 } |
2395 | 2502 |
2396 core.Map toJson() { | 2503 core.Map toJson() { |
2397 var _json = new core.Map(); | 2504 var _json = new core.Map(); |
| 2505 if (kind != null) { |
| 2506 _json["kind"] = kind; |
| 2507 } |
2398 if (restrictions != null) { | 2508 if (restrictions != null) { |
2399 _json["restrictions"] = restrictions.map((value) => (value).toJson()).toLi
st(); | 2509 _json["restrictions"] = restrictions.map((value) => (value).toJson()).toLi
st(); |
2400 } | 2510 } |
2401 return _json; | 2511 return _json; |
2402 } | 2512 } |
2403 } | 2513 } |
2404 | 2514 |
2405 /** | 2515 /** |
2406 * A restriction in the App Restriction Schema represents a piece of | 2516 * A restriction in the App Restriction Schema represents a piece of |
2407 * configuration that may be pre-applied. | 2517 * configuration that may be pre-applied. |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2540 if (valueMultiselect != null) { | 2650 if (valueMultiselect != null) { |
2541 _json["valueMultiselect"] = valueMultiselect; | 2651 _json["valueMultiselect"] = valueMultiselect; |
2542 } | 2652 } |
2543 if (valueString != null) { | 2653 if (valueString != null) { |
2544 _json["valueString"] = valueString; | 2654 _json["valueString"] = valueString; |
2545 } | 2655 } |
2546 return _json; | 2656 return _json; |
2547 } | 2657 } |
2548 } | 2658 } |
2549 | 2659 |
2550 /** App version represents a single APK version. */ | 2660 /** This represents a single version of the app. */ |
2551 class AppVersion { | 2661 class AppVersion { |
2552 /** Unique increasing identifier for the apk version. */ | 2662 /** Unique increasing identifier for the app version. */ |
2553 core.int versionCode; | 2663 core.int versionCode; |
2554 /** | 2664 /** |
2555 * The string used in the Play Store by the app developer to identify a | 2665 * The string used in the Play Store by the app developer to identify the |
2556 * version of an app. The string is not necessarily unique or localized (e.g. | 2666 * version. The string is not necessarily unique or localized (for example, |
2557 * "1.4"). | 2667 * the string could be "1.4"). |
2558 */ | 2668 */ |
2559 core.String versionString; | 2669 core.String versionString; |
2560 | 2670 |
2561 AppVersion(); | 2671 AppVersion(); |
2562 | 2672 |
2563 AppVersion.fromJson(core.Map _json) { | 2673 AppVersion.fromJson(core.Map _json) { |
2564 if (_json.containsKey("versionCode")) { | 2674 if (_json.containsKey("versionCode")) { |
2565 versionCode = _json["versionCode"]; | 2675 versionCode = _json["versionCode"]; |
2566 } | 2676 } |
2567 if (_json.containsKey("versionString")) { | 2677 if (_json.containsKey("versionString")) { |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2644 * "Accounting apps". | 2754 * "Accounting apps". |
2645 */ | 2755 */ |
2646 core.String name; | 2756 core.String name; |
2647 /** | 2757 /** |
2648 * The IDs of the products in the collection, in the order in which they | 2758 * The IDs of the products in the collection, in the order in which they |
2649 * should be displayed. | 2759 * should be displayed. |
2650 */ | 2760 */ |
2651 core.List<core.String> productId; | 2761 core.List<core.String> productId; |
2652 /** | 2762 /** |
2653 * Whether this collection is visible to all users, or only to the users that | 2763 * Whether this collection is visible to all users, or only to the users that |
2654 * have been granted access through the collection_viewers api. Even if a | 2764 * have been granted access through the "Collectionviewers" API. With the |
2655 * collection is visible to allUsers, it is possible to add and remove | 2765 * launch of the "setAvailableProductSet" API, this property should always be |
2656 * viewers, but this will have no effect until the collection's visibility | 2766 * set to "viewersOnly", as the "allUsers" option will bypass the |
2657 * changes to viewersOnly. | 2767 * "availableProductSet" for all users within a domain. |
| 2768 * |
| 2769 * The "allUsers" setting is deprecated, and will be removed. |
2658 */ | 2770 */ |
2659 core.String visibility; | 2771 core.String visibility; |
2660 | 2772 |
2661 Collection(); | 2773 Collection(); |
2662 | 2774 |
2663 Collection.fromJson(core.Map _json) { | 2775 Collection.fromJson(core.Map _json) { |
2664 if (_json.containsKey("collectionId")) { | 2776 if (_json.containsKey("collectionId")) { |
2665 collectionId = _json["collectionId"]; | 2777 collectionId = _json["collectionId"]; |
2666 } | 2778 } |
2667 if (_json.containsKey("kind")) { | 2779 if (_json.containsKey("kind")) { |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3159 } | 3271 } |
3160 } | 3272 } |
3161 | 3273 |
3162 /** | 3274 /** |
3163 * A group license object indicates a product that an enterprise admin has | 3275 * A group license object indicates a product that an enterprise admin has |
3164 * approved for use in the enterprise. The product may be free or paid. For free | 3276 * approved for use in the enterprise. The product may be free or paid. For free |
3165 * products, a group license object is created in these cases: if the enterprise | 3277 * products, a group license object is created in these cases: if the enterprise |
3166 * admin approves a product in Google Play, if the product is added to a | 3278 * admin approves a product in Google Play, if the product is added to a |
3167 * collection, or if an entitlement for the product is created for a user via | 3279 * collection, or if an entitlement for the product is created for a user via |
3168 * the API. For paid products, a group license object is only created as part of | 3280 * the API. For paid products, a group license object is only created as part of |
3169 * the first bulk purchase of that product in Google Play done by the enterprise | 3281 * the first bulk purchase of that product in Google Play by the enterprise |
3170 * admin. | 3282 * admin. |
3171 * | 3283 * |
3172 * The API can be used to query group licenses; the available information | 3284 * The API can be used to query group licenses; the available information |
3173 * includes the total number of licenses purchased (for paid products) and the | 3285 * includes the total number of licenses purchased (for paid products) and the |
3174 * total number of licenses that have been provisioned, i.e. the total number of | 3286 * total number of licenses that have been provisioned, that is, the total |
3175 * user entitlements in existence for the product. | 3287 * number of user entitlements in existence for the product. |
3176 * | 3288 * |
3177 * Group license objects are never deleted; if e.g. a free app is added to a | 3289 * Group license objects are never deleted. If, for example, a free app is added |
3178 * collection and then removed, the group license will remain, allowing to keep | 3290 * to a collection and then removed, the group license will remain, allowing the |
3179 * track of any remaining entitlements. An enterprise admin may indicate they | 3291 * enterprise admin to keep track of any remaining entitlements. An enterprise |
3180 * are no longer interested in the group license by marking it as unapproved in | 3292 * admin may indicate they are no longer interested in the group license by |
3181 * Google Play. | 3293 * marking it as unapproved in Google Play. |
3182 */ | 3294 */ |
3183 class GroupLicense { | 3295 class GroupLicense { |
3184 /** | 3296 /** |
3185 * How this group license was acquired. "bulkPurchase" means that this group | 3297 * How this group license was acquired. "bulkPurchase" means that this group |
3186 * license object was created because the enterprise purchased licenses for | 3298 * license object was created because the enterprise purchased licenses for |
3187 * this product; this is "free" otherwise (for free products). | 3299 * this product; this is "free" otherwise (for free products). |
3188 */ | 3300 */ |
3189 core.String acquisitionKind; | 3301 core.String acquisitionKind; |
3190 /** | 3302 /** |
3191 * Whether the product to which this group license relates is currently | 3303 * Whether the product to which this group license relates is currently |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3518 * least some users in the enterprise. (Some apps are restricted to a single | 3630 * least some users in the enterprise. (Some apps are restricted to a single |
3519 * enterprise, and no information about them is made available outside that | 3631 * enterprise, and no information about them is made available outside that |
3520 * enterprise.) | 3632 * enterprise.) |
3521 * | 3633 * |
3522 * The information provided for each product (localized name, icon, link to the | 3634 * The information provided for each product (localized name, icon, link to the |
3523 * full Google Play details page) is intended to allow a basic representation of | 3635 * full Google Play details page) is intended to allow a basic representation of |
3524 * the product within an MDM user interface. | 3636 * the product within an MDM user interface. |
3525 */ | 3637 */ |
3526 class Product { | 3638 class Product { |
3527 /** | 3639 /** |
3528 * List of app versions available for this product. The returned list contains | 3640 * App versions currently available for this product. The returned list |
3529 * only public versions. E.g. alpha, beta or canary versions will not be | 3641 * contains only public versions. Alpha and beta versions are not included. |
3530 * included. | |
3531 */ | 3642 */ |
3532 core.List<AppVersion> appVersion; | 3643 core.List<AppVersion> appVersion; |
3533 /** The name of the author of the product (e.g. the app developer). */ | 3644 /** The name of the author of the product (e.g. the app developer). */ |
3534 core.String authorName; | 3645 core.String authorName; |
3535 /** A link to the (consumer) Google Play details page for the product. */ | 3646 /** A link to the (consumer) Google Play details page for the product. */ |
3536 core.String detailsUrl; | 3647 core.String detailsUrl; |
3537 /** How and to whom the package is made available. */ | 3648 /** |
| 3649 * How and to whom the package is made available. The value publicGoogleHosted |
| 3650 * means that the package is available through the Play Store and not |
| 3651 * restricted to a specific enterprise. The value privateGoogleHosted means |
| 3652 * that the package is a private app (restricted to an enterprise) but hosted |
| 3653 * by Google. The value privateSelfHosted means that the package is a private |
| 3654 * app (restricted to an enterprise) and is privately hosted. |
| 3655 */ |
3538 core.String distributionChannel; | 3656 core.String distributionChannel; |
3539 /** A link to an image that can be used as an icon for the product. */ | 3657 /** A link to an image that can be used as an icon for the product. */ |
3540 core.String iconUrl; | 3658 core.String iconUrl; |
3541 /** | 3659 /** |
3542 * Identifies what kind of resource this is. Value: the fixed string | 3660 * Identifies what kind of resource this is. Value: the fixed string |
3543 * "androidenterprise#product". | 3661 * "androidenterprise#product". |
3544 */ | 3662 */ |
3545 core.String kind; | 3663 core.String kind; |
3546 /** | 3664 /** |
3547 * A string of the form "app: | 3665 * A string of the form app:<package name>. For example, |
3548 * " - e.g. "app:com.google.android.gm" represents the GMail app. | 3666 * app:com.google.android.gm represents the Gmail app. |
3549 */ | 3667 */ |
3550 core.String productId; | 3668 core.String productId; |
3551 /** | 3669 /** |
3552 * Whether this app can only be installed on devices using the Android for | 3670 * Whether this app can only be installed on devices using the Android for |
3553 * Work container app. | 3671 * Work container app. |
3554 */ | 3672 */ |
3555 core.bool requiresContainerApp; | 3673 core.bool requiresContainerApp; |
3556 /** The name of the product. */ | 3674 /** The name of the product. */ |
3557 core.String title; | 3675 core.String title; |
3558 /** | 3676 /** |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3709 if (permission != null) { | 3827 if (permission != null) { |
3710 _json["permission"] = permission.map((value) => (value).toJson()).toList()
; | 3828 _json["permission"] = permission.map((value) => (value).toJson()).toList()
; |
3711 } | 3829 } |
3712 if (productId != null) { | 3830 if (productId != null) { |
3713 _json["productId"] = productId; | 3831 _json["productId"] = productId; |
3714 } | 3832 } |
3715 return _json; | 3833 return _json; |
3716 } | 3834 } |
3717 } | 3835 } |
3718 | 3836 |
| 3837 /** A set of products. */ |
| 3838 class ProductSet { |
| 3839 /** |
| 3840 * Identifies what kind of resource this is. Value: the fixed string |
| 3841 * "androidenterprise#productSet". |
| 3842 */ |
| 3843 core.String kind; |
| 3844 /** The list of product IDs making up the set of products. */ |
| 3845 core.List<core.String> productId; |
| 3846 |
| 3847 ProductSet(); |
| 3848 |
| 3849 ProductSet.fromJson(core.Map _json) { |
| 3850 if (_json.containsKey("kind")) { |
| 3851 kind = _json["kind"]; |
| 3852 } |
| 3853 if (_json.containsKey("productId")) { |
| 3854 productId = _json["productId"]; |
| 3855 } |
| 3856 } |
| 3857 |
| 3858 core.Map toJson() { |
| 3859 var _json = new core.Map(); |
| 3860 if (kind != null) { |
| 3861 _json["kind"] = kind; |
| 3862 } |
| 3863 if (productId != null) { |
| 3864 _json["productId"] = productId; |
| 3865 } |
| 3866 return _json; |
| 3867 } |
| 3868 } |
| 3869 |
3719 class ProductsApproveRequest { | 3870 class ProductsApproveRequest { |
| 3871 /** |
| 3872 * The approval URL that was shown to the user. Only the permissions shown to |
| 3873 * the user with that URL will be accepted, which may not be the product's |
| 3874 * entire set of permissions. For example, the URL may only display new |
| 3875 * permissions from an update after the product was approved, or not include |
| 3876 * new permissions if the product was updated since the URL was generated. |
| 3877 */ |
3720 ApprovalUrlInfo approvalUrlInfo; | 3878 ApprovalUrlInfo approvalUrlInfo; |
3721 | 3879 |
3722 ProductsApproveRequest(); | 3880 ProductsApproveRequest(); |
3723 | 3881 |
3724 ProductsApproveRequest.fromJson(core.Map _json) { | 3882 ProductsApproveRequest.fromJson(core.Map _json) { |
3725 if (_json.containsKey("approvalUrlInfo")) { | 3883 if (_json.containsKey("approvalUrlInfo")) { |
3726 approvalUrlInfo = new ApprovalUrlInfo.fromJson(_json["approvalUrlInfo"]); | 3884 approvalUrlInfo = new ApprovalUrlInfo.fromJson(_json["approvalUrlInfo"]); |
3727 } | 3885 } |
3728 } | 3886 } |
3729 | 3887 |
3730 core.Map toJson() { | 3888 core.Map toJson() { |
3731 var _json = new core.Map(); | 3889 var _json = new core.Map(); |
3732 if (approvalUrlInfo != null) { | 3890 if (approvalUrlInfo != null) { |
3733 _json["approvalUrlInfo"] = (approvalUrlInfo).toJson(); | 3891 _json["approvalUrlInfo"] = (approvalUrlInfo).toJson(); |
3734 } | 3892 } |
3735 return _json; | 3893 return _json; |
3736 } | 3894 } |
3737 } | 3895 } |
3738 | 3896 |
3739 class ProductsGenerateApprovalUrlResponse { | 3897 class ProductsGenerateApprovalUrlResponse { |
3740 /** | 3898 /** |
3741 * A iframe-able URL that displays a product's permissions (if any). This URL | 3899 * A URL that can be rendered in an iframe to display the permissions (if any) |
3742 * can be used to approve the product only once and for a limited time (1 | 3900 * of a product. This URL can be used to approve the product only once and |
3743 * hour), using the Products.approve call. If the product is not currently | 3901 * only within 24 hours of being generated, using the Products.approve call. |
3744 * approved and has no permissions, this URL will point to an empty page. If | 3902 * If the product is currently unapproved and has no permissions, this URL |
3745 * the product is currently approved and all of its permissions (if any) are | 3903 * will point to an empty page. If the product is currently approved, a URL |
3746 * also approved, this field will not be populated. | 3904 * will only be generated if that product has added permissions since it was |
| 3905 * last approved, and the URL will only display those new permissions that |
| 3906 * have not yet been accepted. |
3747 */ | 3907 */ |
3748 core.String url; | 3908 core.String url; |
3749 | 3909 |
3750 ProductsGenerateApprovalUrlResponse(); | 3910 ProductsGenerateApprovalUrlResponse(); |
3751 | 3911 |
3752 ProductsGenerateApprovalUrlResponse.fromJson(core.Map _json) { | 3912 ProductsGenerateApprovalUrlResponse.fromJson(core.Map _json) { |
3753 if (_json.containsKey("url")) { | 3913 if (_json.containsKey("url")) { |
3754 url = _json["url"]; | 3914 url = _json["url"]; |
3755 } | 3915 } |
3756 } | 3916 } |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3890 var _json = new core.Map(); | 4050 var _json = new core.Map(); |
3891 if (kind != null) { | 4051 if (kind != null) { |
3892 _json["kind"] = kind; | 4052 _json["kind"] = kind; |
3893 } | 4053 } |
3894 if (user != null) { | 4054 if (user != null) { |
3895 _json["user"] = user.map((value) => (value).toJson()).toList(); | 4055 _json["user"] = user.map((value) => (value).toJson()).toList(); |
3896 } | 4056 } |
3897 return _json; | 4057 return _json; |
3898 } | 4058 } |
3899 } | 4059 } |
OLD | NEW |