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

Side by Side Diff: generated/googleapis/lib/youtubeanalytics/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
« no previous file with comments | « generated/googleapis/lib/youtube/v3.dart ('k') | generated/googleapis/pubspec.yaml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.youtubeAnalytics.v1; 3 library googleapis.youtubeAnalytics.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 19 matching lines...) Expand all
30 * content 30 * content
31 */ 31 */
32 static const YtAnalyticsMonetaryReadonlyScope = "https://www.googleapis.com/au th/yt-analytics-monetary.readonly"; 32 static const YtAnalyticsMonetaryReadonlyScope = "https://www.googleapis.com/au th/yt-analytics-monetary.readonly";
33 33
34 /** View YouTube Analytics reports for your YouTube content */ 34 /** View YouTube Analytics reports for your YouTube content */
35 static const YtAnalyticsReadonlyScope = "https://www.googleapis.com/auth/yt-an alytics.readonly"; 35 static const YtAnalyticsReadonlyScope = "https://www.googleapis.com/auth/yt-an alytics.readonly";
36 36
37 37
38 final commons.ApiRequester _requester; 38 final commons.ApiRequester _requester;
39 39
40 BatchReportDefinitionsResourceApi get batchReportDefinitions => new BatchRepor tDefinitionsResourceApi(_requester);
41 BatchReportsResourceApi get batchReports => new BatchReportsResourceApi(_reque ster);
42 GroupItemsResourceApi get groupItems => new GroupItemsResourceApi(_requester); 40 GroupItemsResourceApi get groupItems => new GroupItemsResourceApi(_requester);
43 GroupsResourceApi get groups => new GroupsResourceApi(_requester); 41 GroupsResourceApi get groups => new GroupsResourceApi(_requester);
44 ReportsResourceApi get reports => new ReportsResourceApi(_requester); 42 ReportsResourceApi get reports => new ReportsResourceApi(_requester);
45 43
46 YoutubeAnalyticsApi(http.Client client, {core.String rootUrl: "https://www.goo gleapis.com/", core.String servicePath: "youtube/analytics/v1/"}) : 44 YoutubeAnalyticsApi(http.Client client, {core.String rootUrl: "https://www.goo gleapis.com/", core.String servicePath: "youtube/analytics/v1/"}) :
47 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT); 45 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT);
48 } 46 }
49 47
50 48
51 class BatchReportDefinitionsResourceApi {
52 final commons.ApiRequester _requester;
53
54 BatchReportDefinitionsResourceApi(commons.ApiRequester client) :
55 _requester = client;
56
57 /**
58 * Retrieves a list of available batch report definitions.
59 *
60 * Request parameters:
61 *
62 * [onBehalfOfContentOwner] - The onBehalfOfContentOwner parameter identifies
63 * the content owner that the user is acting on behalf of.
64 *
65 * Completes with a [BatchReportDefinitionList].
66 *
67 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
68 * error.
69 *
70 * If the used [http.Client] completes with an error when making a REST call,
71 * this method will complete with the same error.
72 */
73 async.Future<BatchReportDefinitionList> list(core.String onBehalfOfContentOwne r) {
74 var _url = null;
75 var _queryParams = new core.Map();
76 var _uploadMedia = null;
77 var _uploadOptions = null;
78 var _downloadOptions = commons.DownloadOptions.Metadata;
79 var _body = null;
80
81 if (onBehalfOfContentOwner == null) {
82 throw new core.ArgumentError("Parameter onBehalfOfContentOwner is required .");
83 }
84 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner];
85
86 _url = 'batchReportDefinitions';
87
88 var _response = _requester.request(_url,
89 "GET",
90 body: _body,
91 queryParams: _queryParams,
92 uploadOptions: _uploadOptions,
93 uploadMedia: _uploadMedia,
94 downloadOptions: _downloadOptions);
95 return _response.then((data) => new BatchReportDefinitionList.fromJson(data) );
96 }
97
98 }
99
100
101 class BatchReportsResourceApi {
102 final commons.ApiRequester _requester;
103
104 BatchReportsResourceApi(commons.ApiRequester client) :
105 _requester = client;
106
107 /**
108 * Retrieves a list of processed batch reports.
109 *
110 * Request parameters:
111 *
112 * [batchReportDefinitionId] - The batchReportDefinitionId parameter specifies
113 * the ID of the batch reportort definition for which you are retrieving
114 * reports.
115 *
116 * [onBehalfOfContentOwner] - The onBehalfOfContentOwner parameter identifies
117 * the content owner that the user is acting on behalf of.
118 *
119 * Completes with a [BatchReportList].
120 *
121 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
122 * error.
123 *
124 * If the used [http.Client] completes with an error when making a REST call,
125 * this method will complete with the same error.
126 */
127 async.Future<BatchReportList> list(core.String batchReportDefinitionId, core.S tring onBehalfOfContentOwner) {
128 var _url = null;
129 var _queryParams = new core.Map();
130 var _uploadMedia = null;
131 var _uploadOptions = null;
132 var _downloadOptions = commons.DownloadOptions.Metadata;
133 var _body = null;
134
135 if (batchReportDefinitionId == null) {
136 throw new core.ArgumentError("Parameter batchReportDefinitionId is require d.");
137 }
138 _queryParams["batchReportDefinitionId"] = [batchReportDefinitionId];
139 if (onBehalfOfContentOwner == null) {
140 throw new core.ArgumentError("Parameter onBehalfOfContentOwner is required .");
141 }
142 _queryParams["onBehalfOfContentOwner"] = [onBehalfOfContentOwner];
143
144 _url = 'batchReports';
145
146 var _response = _requester.request(_url,
147 "GET",
148 body: _body,
149 queryParams: _queryParams,
150 uploadOptions: _uploadOptions,
151 uploadMedia: _uploadMedia,
152 downloadOptions: _downloadOptions);
153 return _response.then((data) => new BatchReportList.fromJson(data));
154 }
155
156 }
157
158
159 class GroupItemsResourceApi { 49 class GroupItemsResourceApi {
160 final commons.ApiRequester _requester; 50 final commons.ApiRequester _requester;
161 51
162 GroupItemsResourceApi(commons.ApiRequester client) : 52 GroupItemsResourceApi(commons.ApiRequester client) :
163 _requester = client; 53 _requester = client;
164 54
165 /** 55 /**
166 * Removes an item from a group. 56 * Removes an item from a group.
167 * 57 *
168 * Request parameters: 58 * Request parameters:
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 uploadOptions: _uploadOptions, 600 uploadOptions: _uploadOptions,
711 uploadMedia: _uploadMedia, 601 uploadMedia: _uploadMedia,
712 downloadOptions: _downloadOptions); 602 downloadOptions: _downloadOptions);
713 return _response.then((data) => new ResultTable.fromJson(data)); 603 return _response.then((data) => new ResultTable.fromJson(data));
714 } 604 }
715 605
716 } 606 }
717 607
718 608
719 609
720 class BatchReportOutputs {
721 /**
722 * Cloud storage URL to download this report. This URL is valid for 30
723 * minutes.
724 */
725 core.String downloadUrl;
726 /** Format of the output. */
727 core.String format;
728 /** Type of the output. */
729 core.String type;
730
731 BatchReportOutputs();
732
733 BatchReportOutputs.fromJson(core.Map _json) {
734 if (_json.containsKey("downloadUrl")) {
735 downloadUrl = _json["downloadUrl"];
736 }
737 if (_json.containsKey("format")) {
738 format = _json["format"];
739 }
740 if (_json.containsKey("type")) {
741 type = _json["type"];
742 }
743 }
744
745 core.Map toJson() {
746 var _json = new core.Map();
747 if (downloadUrl != null) {
748 _json["downloadUrl"] = downloadUrl;
749 }
750 if (format != null) {
751 _json["format"] = format;
752 }
753 if (type != null) {
754 _json["type"] = type;
755 }
756 return _json;
757 }
758 }
759
760 /**
761 * Period included in the report. For reports containing all entities endTime is
762 * not set. Both startTime and endTime are inclusive.
763 */
764 class BatchReportTimeSpan {
765 /**
766 * End of the period included in the report. Inclusive. For reports containing
767 * all entities endTime is not set.
768 */
769 core.DateTime endTime;
770 /** Start of the period included in the report. Inclusive. */
771 core.DateTime startTime;
772
773 BatchReportTimeSpan();
774
775 BatchReportTimeSpan.fromJson(core.Map _json) {
776 if (_json.containsKey("endTime")) {
777 endTime = core.DateTime.parse(_json["endTime"]);
778 }
779 if (_json.containsKey("startTime")) {
780 startTime = core.DateTime.parse(_json["startTime"]);
781 }
782 }
783
784 core.Map toJson() {
785 var _json = new core.Map();
786 if (endTime != null) {
787 _json["endTime"] = (endTime).toIso8601String();
788 }
789 if (startTime != null) {
790 _json["startTime"] = (startTime).toIso8601String();
791 }
792 return _json;
793 }
794 }
795
796 /** Contains single batchReport resource. */
797 class BatchReport {
798 /** The ID that YouTube assigns and uses to uniquely identify the report. */
799 core.String id;
800 /**
801 * This value specifies the type of data of this item. For batch report the
802 * kind property value is youtubeAnalytics#batchReport.
803 */
804 core.String kind;
805 /** Report outputs. */
806 core.List<BatchReportOutputs> outputs;
807 /** The ID of the the report definition. */
808 core.String reportId;
809 /**
810 * Period included in the report. For reports containing all entities endTime
811 * is not set. Both startTime and endTime are inclusive.
812 */
813 BatchReportTimeSpan timeSpan;
814 /** The time when the report was updated. */
815 core.DateTime timeUpdated;
816
817 BatchReport();
818
819 BatchReport.fromJson(core.Map _json) {
820 if (_json.containsKey("id")) {
821 id = _json["id"];
822 }
823 if (_json.containsKey("kind")) {
824 kind = _json["kind"];
825 }
826 if (_json.containsKey("outputs")) {
827 outputs = _json["outputs"].map((value) => new BatchReportOutputs.fromJson( value)).toList();
828 }
829 if (_json.containsKey("reportId")) {
830 reportId = _json["reportId"];
831 }
832 if (_json.containsKey("timeSpan")) {
833 timeSpan = new BatchReportTimeSpan.fromJson(_json["timeSpan"]);
834 }
835 if (_json.containsKey("timeUpdated")) {
836 timeUpdated = core.DateTime.parse(_json["timeUpdated"]);
837 }
838 }
839
840 core.Map toJson() {
841 var _json = new core.Map();
842 if (id != null) {
843 _json["id"] = id;
844 }
845 if (kind != null) {
846 _json["kind"] = kind;
847 }
848 if (outputs != null) {
849 _json["outputs"] = outputs.map((value) => (value).toJson()).toList();
850 }
851 if (reportId != null) {
852 _json["reportId"] = reportId;
853 }
854 if (timeSpan != null) {
855 _json["timeSpan"] = (timeSpan).toJson();
856 }
857 if (timeUpdated != null) {
858 _json["timeUpdated"] = (timeUpdated).toIso8601String();
859 }
860 return _json;
861 }
862 }
863
864 /** Contains single batchReportDefinition resource. */
865 class BatchReportDefinition {
866 /**
867 * The ID that YouTube assigns and uses to uniquely identify the report
868 * definition.
869 */
870 core.String id;
871 /**
872 * This value specifies the type of data of this item. For batch report
873 * definition the kind property value is
874 * youtubeAnalytics#batchReportDefinition.
875 */
876 core.String kind;
877 /** Name of the report definition. */
878 core.String name;
879 /** Status of the report definition. */
880 core.String status;
881 /** Type of the report definition. */
882 core.String type;
883
884 BatchReportDefinition();
885
886 BatchReportDefinition.fromJson(core.Map _json) {
887 if (_json.containsKey("id")) {
888 id = _json["id"];
889 }
890 if (_json.containsKey("kind")) {
891 kind = _json["kind"];
892 }
893 if (_json.containsKey("name")) {
894 name = _json["name"];
895 }
896 if (_json.containsKey("status")) {
897 status = _json["status"];
898 }
899 if (_json.containsKey("type")) {
900 type = _json["type"];
901 }
902 }
903
904 core.Map toJson() {
905 var _json = new core.Map();
906 if (id != null) {
907 _json["id"] = id;
908 }
909 if (kind != null) {
910 _json["kind"] = kind;
911 }
912 if (name != null) {
913 _json["name"] = name;
914 }
915 if (status != null) {
916 _json["status"] = status;
917 }
918 if (type != null) {
919 _json["type"] = type;
920 }
921 return _json;
922 }
923 }
924
925 /**
926 * A paginated list of batchReportDefinition resources returned in response to a
927 * youtubeAnalytics.batchReportDefinitions.list request.
928 */
929 class BatchReportDefinitionList {
930 /**
931 * A list of batchReportDefinition resources that match the request criteria.
932 */
933 core.List<BatchReportDefinition> items;
934 /**
935 * This value specifies the type of data included in the API response. For the
936 * list method, the kind property value is
937 * youtubeAnalytics#batchReportDefinitionList.
938 */
939 core.String kind;
940
941 BatchReportDefinitionList();
942
943 BatchReportDefinitionList.fromJson(core.Map _json) {
944 if (_json.containsKey("items")) {
945 items = _json["items"].map((value) => new BatchReportDefinition.fromJson(v alue)).toList();
946 }
947 if (_json.containsKey("kind")) {
948 kind = _json["kind"];
949 }
950 }
951
952 core.Map toJson() {
953 var _json = new core.Map();
954 if (items != null) {
955 _json["items"] = items.map((value) => (value).toJson()).toList();
956 }
957 if (kind != null) {
958 _json["kind"] = kind;
959 }
960 return _json;
961 }
962 }
963
964 /**
965 * A paginated list of batchReport resources returned in response to a
966 * youtubeAnalytics.batchReport.list request.
967 */
968 class BatchReportList {
969 /** A list of batchReport resources that match the request criteria. */
970 core.List<BatchReport> items;
971 /**
972 * This value specifies the type of data included in the API response. For the
973 * list method, the kind property value is youtubeAnalytics#batchReportList.
974 */
975 core.String kind;
976
977 BatchReportList();
978
979 BatchReportList.fromJson(core.Map _json) {
980 if (_json.containsKey("items")) {
981 items = _json["items"].map((value) => new BatchReport.fromJson(value)).toL ist();
982 }
983 if (_json.containsKey("kind")) {
984 kind = _json["kind"];
985 }
986 }
987
988 core.Map toJson() {
989 var _json = new core.Map();
990 if (items != null) {
991 _json["items"] = items.map((value) => (value).toJson()).toList();
992 }
993 if (kind != null) {
994 _json["kind"] = kind;
995 }
996 return _json;
997 }
998 }
999
1000 class GroupContentDetails { 610 class GroupContentDetails {
1001 core.String itemCount; 611 core.String itemCount;
1002 core.String itemType; 612 core.String itemType;
1003 613
1004 GroupContentDetails(); 614 GroupContentDetails();
1005 615
1006 GroupContentDetails.fromJson(core.Map _json) { 616 GroupContentDetails.fromJson(core.Map _json) {
1007 if (_json.containsKey("itemCount")) { 617 if (_json.containsKey("itemCount")) {
1008 itemCount = _json["itemCount"]; 618 itemCount = _json["itemCount"];
1009 } 619 }
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
1353 } 963 }
1354 if (kind != null) { 964 if (kind != null) {
1355 _json["kind"] = kind; 965 _json["kind"] = kind;
1356 } 966 }
1357 if (rows != null) { 967 if (rows != null) {
1358 _json["rows"] = rows; 968 _json["rows"] = rows;
1359 } 969 }
1360 return _json; 970 return _json;
1361 } 971 }
1362 } 972 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/youtube/v3.dart ('k') | generated/googleapis/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698