| 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.androiddeviceprovisioning.v1; | 3 library googleapis.androiddeviceprovisioning.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; |
| 11 | 11 |
| 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
| 13 ApiRequestError, DetailedApiRequestError; | 13 ApiRequestError, DetailedApiRequestError; |
| 14 | 14 |
| 15 const core.String USER_AGENT = 'dart-api-client androiddeviceprovisioning/v1'; | 15 const core.String USER_AGENT = 'dart-api-client androiddeviceprovisioning/v1'; |
| 16 | 16 |
| 17 /** Android Device Provisioning Partner API */ | 17 /** |
| 18 * Automates reseller integration into Zero Touch Provisioning by assigning |
| 19 * devices to customers and creating device reports. |
| 20 */ |
| 18 class AndroiddeviceprovisioningApi { | 21 class AndroiddeviceprovisioningApi { |
| 19 | 22 |
| 20 final commons.ApiRequester _requester; | 23 final commons.ApiRequester _requester; |
| 21 | 24 |
| 22 OperationsResourceApi get operations => new OperationsResourceApi(_requester); | 25 OperationsResourceApi get operations => new OperationsResourceApi(_requester); |
| 23 PartnersResourceApi get partners => new PartnersResourceApi(_requester); | 26 PartnersResourceApi get partners => new PartnersResourceApi(_requester); |
| 24 | 27 |
| 25 AndroiddeviceprovisioningApi(http.Client client, {core.String rootUrl: "https:
//androiddeviceprovisioning.googleapis.com/", core.String servicePath: ""}) : | 28 AndroiddeviceprovisioningApi(http.Client client, {core.String rootUrl: "https:
//androiddeviceprovisioning.googleapis.com/", core.String servicePath: ""}) : |
| 26 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 29 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
| 27 } | 30 } |
| (...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 769 _json["sectionType"] = sectionType; | 772 _json["sectionType"] = sectionType; |
| 770 } | 773 } |
| 771 return _json; | 774 return _json; |
| 772 } | 775 } |
| 773 } | 776 } |
| 774 | 777 |
| 775 /** DeviceIdentifiers identifies an unique device. */ | 778 /** DeviceIdentifiers identifies an unique device. */ |
| 776 class DeviceIdentifier { | 779 class DeviceIdentifier { |
| 777 /** IMEI (either IMEI or MEID is required). */ | 780 /** IMEI (either IMEI or MEID is required). */ |
| 778 core.String imei; | 781 core.String imei; |
| 779 /** Manufacturer to match android.os.Build.MANUFACTURER (required). */ | 782 /** |
| 783 * Manufacturer name to match `android.os.Build.MANUFACTURER` (required). |
| 784 * Allowed values listed in |
| 785 * [manufacturer names](/zero-touch/resources/manufacturer-names). |
| 786 */ |
| 780 core.String manufacturer; | 787 core.String manufacturer; |
| 781 /** MEID */ | 788 /** MEID */ |
| 782 core.String meid; | 789 core.String meid; |
| 783 /** Model to match android.os.Build.MODEL (required). */ | |
| 784 core.String model; | |
| 785 /** Serial number (optional) */ | 790 /** Serial number (optional) */ |
| 786 core.String serialNumber; | 791 core.String serialNumber; |
| 787 | 792 |
| 788 DeviceIdentifier(); | 793 DeviceIdentifier(); |
| 789 | 794 |
| 790 DeviceIdentifier.fromJson(core.Map _json) { | 795 DeviceIdentifier.fromJson(core.Map _json) { |
| 791 if (_json.containsKey("imei")) { | 796 if (_json.containsKey("imei")) { |
| 792 imei = _json["imei"]; | 797 imei = _json["imei"]; |
| 793 } | 798 } |
| 794 if (_json.containsKey("manufacturer")) { | 799 if (_json.containsKey("manufacturer")) { |
| 795 manufacturer = _json["manufacturer"]; | 800 manufacturer = _json["manufacturer"]; |
| 796 } | 801 } |
| 797 if (_json.containsKey("meid")) { | 802 if (_json.containsKey("meid")) { |
| 798 meid = _json["meid"]; | 803 meid = _json["meid"]; |
| 799 } | 804 } |
| 800 if (_json.containsKey("model")) { | |
| 801 model = _json["model"]; | |
| 802 } | |
| 803 if (_json.containsKey("serialNumber")) { | 805 if (_json.containsKey("serialNumber")) { |
| 804 serialNumber = _json["serialNumber"]; | 806 serialNumber = _json["serialNumber"]; |
| 805 } | 807 } |
| 806 } | 808 } |
| 807 | 809 |
| 808 core.Map<core.String, core.Object> toJson() { | 810 core.Map<core.String, core.Object> toJson() { |
| 809 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 811 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 810 if (imei != null) { | 812 if (imei != null) { |
| 811 _json["imei"] = imei; | 813 _json["imei"] = imei; |
| 812 } | 814 } |
| 813 if (manufacturer != null) { | 815 if (manufacturer != null) { |
| 814 _json["manufacturer"] = manufacturer; | 816 _json["manufacturer"] = manufacturer; |
| 815 } | 817 } |
| 816 if (meid != null) { | 818 if (meid != null) { |
| 817 _json["meid"] = meid; | 819 _json["meid"] = meid; |
| 818 } | 820 } |
| 819 if (model != null) { | |
| 820 _json["model"] = model; | |
| 821 } | |
| 822 if (serialNumber != null) { | 821 if (serialNumber != null) { |
| 823 _json["serialNumber"] = serialNumber; | 822 _json["serialNumber"] = serialNumber; |
| 824 } | 823 } |
| 825 return _json; | 824 return _json; |
| 826 } | 825 } |
| 827 } | 826 } |
| 828 | 827 |
| 829 /** metadata */ | 828 /** metadata */ |
| 830 class DeviceMetadata { | 829 class DeviceMetadata { |
| 831 /** Metadata entries */ | 830 /** Metadata entries */ |
| (...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1651 } | 1650 } |
| 1652 if (deviceIdentifier != null) { | 1651 if (deviceIdentifier != null) { |
| 1653 _json["deviceIdentifier"] = (deviceIdentifier).toJson(); | 1652 _json["deviceIdentifier"] = (deviceIdentifier).toJson(); |
| 1654 } | 1653 } |
| 1655 if (deviceMetadata != null) { | 1654 if (deviceMetadata != null) { |
| 1656 _json["deviceMetadata"] = (deviceMetadata).toJson(); | 1655 _json["deviceMetadata"] = (deviceMetadata).toJson(); |
| 1657 } | 1656 } |
| 1658 return _json; | 1657 return _json; |
| 1659 } | 1658 } |
| 1660 } | 1659 } |
| OLD | NEW |