Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update generated services

* Fix default handling for int64
  • Loading branch information...
commit 42da6aabae3c304373568e6388ec523a9360ee19 1 parent bebe3d7
@astrada authored
Showing with 1,650 additions and 208 deletions.
  1. +1 −1  src/gapi/gapiAdsenseV1_1Model.mli
  2. +1 −1  src/gapi/gapiAdsenseV1_1Service.mli
  3. +669 −0 src/gapi/gapiAnalyticsV3Model.ml
  4. +205 −0 src/gapi/gapiAnalyticsV3Model.mli
  5. +123 −0 src/gapi/gapiAnalyticsV3Service.ml
  6. +40 −0 src/gapi/gapiAnalyticsV3Service.mli
  7. +33 −0 src/gapi/gapiBigqueryV2Model.ml
  8. +12 −3 src/gapi/gapiBigqueryV2Model.mli
  9. +6 −0 src/gapi/gapiBigqueryV2Service.ml
  10. +9 −0 src/gapi/gapiBigqueryV2Service.mli
  11. +33 −0 src/gapi/gapiCalendarV3Model.ml
  12. +12 −3 src/gapi/gapiCalendarV3Model.mli
  13. +11 −3 src/gapi/gapiCalendarV3Service.ml
  14. +8 −2 src/gapi/gapiCalendarV3Service.mli
  15. +11 −0 src/gapi/gapiDiscoveryV1Model.ml
  16. +4 −1 src/gapi/gapiDiscoveryV1Model.mli
  17. +292 −106 src/gapi/gapiDriveV2Model.ml
  18. +119 −59 src/gapi/gapiDriveV2Model.mli
  19. +27 −11 src/gapi/gapiDriveV2Service.ml
  20. +23 −6 src/gapi/gapiDriveV2Service.mli
  21. +1 −1  src/gapi/gapiPagespeedonlineV1Model.mli
  22. +1 −1  src/gapi/gapiPagespeedonlineV1Service.mli
  23. +4 −4 src/gapi/gapiPlusV1Model.mli
  24. +1 −1  src/gapi/gapiPlusV1Service.mli
  25. +2 −2 src/test/testDriveV2Service.ml
  26. +1 −1  test_data/test_drive_change_list.json
  27. +0 −1  test_data/test_drive_file.json
  28. +1 −1  tools/serviceGeneratorState.ml
View
2  src/gapi/gapiAdsenseV1_1Model.mli
@@ -3,7 +3,7 @@
(** Data definition for AdSense Management API (v1.1).
For more information about this data model, see the
- {{:https://code.google.com/apis/adsense/management/}API Documentation}.
+ {{:https://developers.google.com/adsense/management/}API Documentation}.
*)
module AdUnit :
View
2  src/gapi/gapiAdsenseV1_1Service.mli
@@ -5,7 +5,7 @@
Gives AdSense publishers access to their inventory and the ability to generate reports.
For more information about this service, see the
- {{:https://code.google.com/apis/adsense/management/}API Documentation}.
+ {{:https://developers.google.com/adsense/management/}API Documentation}.
*)
module Scope :
View
669 src/gapi/gapiAnalyticsV3Model.ml
@@ -1876,6 +1876,7 @@ struct
timezone : string;
updated : GapiDate.t;
webPropertyId : string;
+ websiteUrl : string;
}
@@ -1947,6 +1948,10 @@ struct
GapiLens.get = (fun x -> x.webPropertyId);
GapiLens.set = (fun v x -> { x with webPropertyId = v });
}
+ let websiteUrl = {
+ GapiLens.get = (fun x -> x.websiteUrl);
+ GapiLens.set = (fun v x -> { x with websiteUrl = v });
+ }
let empty = {
accountId = "";
@@ -1966,6 +1971,7 @@ struct
timezone = "";
updated = GapiDate.epoch;
webPropertyId = "";
+ websiteUrl = "";
}
@@ -1988,6 +1994,7 @@ struct
GapiJson.render_string_value "timezone" x.timezone;
GapiJson.render_date_value "updated" x.updated;
GapiJson.render_string_value "webPropertyId" x.webPropertyId;
+ GapiJson.render_string_value "websiteUrl" x.websiteUrl;
]
and render x =
@@ -2070,6 +2077,10 @@ struct
({ GapiJson.name = "webPropertyId"; data_type = GapiJson.Scalar },
Json_type.String v) ->
{ x with webPropertyId = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "websiteUrl"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with websiteUrl = v }
| GapiCore.AnnotatedTree.Node
({ GapiJson.name = ""; data_type = GapiJson.Object },
cs) ->
@@ -2648,6 +2659,664 @@ struct
end
+module McfData =
+struct
+ module Rows =
+ struct
+ module ConversionPathValue =
+ struct
+ type t = {
+ interactionType : string;
+ nodeValue : string;
+
+ }
+
+ let interactionType = {
+ GapiLens.get = (fun x -> x.interactionType);
+ GapiLens.set = (fun v x -> { x with interactionType = v });
+ }
+ let nodeValue = {
+ GapiLens.get = (fun x -> x.nodeValue);
+ GapiLens.set = (fun v x -> { x with nodeValue = v });
+ }
+
+ let empty = {
+ interactionType = "";
+ nodeValue = "";
+
+ }
+
+ let rec render_content x =
+ [
+ GapiJson.render_string_value "interactionType" x.interactionType;
+ GapiJson.render_string_value "nodeValue" x.nodeValue;
+
+ ]
+ and render x =
+ GapiJson.render_object "" (render_content x)
+
+ let rec parse x = function
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "interactionType"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with interactionType = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "nodeValue"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with nodeValue = v }
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = ""; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children parse empty (fun x -> x) cs
+ | e ->
+ GapiJson.unexpected "GapiAnalyticsV3Model.ConversionPathValue.parse" e x
+
+ end
+
+ type t = {
+ conversionPathValue : ConversionPathValue.t list;
+ primitiveValue : string;
+
+ }
+
+ let conversionPathValue = {
+ GapiLens.get = (fun x -> x.conversionPathValue);
+ GapiLens.set = (fun v x -> { x with conversionPathValue = v });
+ }
+ let primitiveValue = {
+ GapiLens.get = (fun x -> x.primitiveValue);
+ GapiLens.set = (fun v x -> { x with primitiveValue = v });
+ }
+
+ let empty = {
+ conversionPathValue = [];
+ primitiveValue = "";
+
+ }
+
+ let rec render_content x =
+ [
+ GapiJson.render_array "conversionPathValue" ConversionPathValue.render x.conversionPathValue;
+ GapiJson.render_string_value "primitiveValue" x.primitiveValue;
+
+ ]
+ and render x =
+ GapiJson.render_object "" (render_content x)
+
+ let rec parse x = function
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = "conversionPathValue"; data_type = GapiJson.Array },
+ cs) ->
+ GapiJson.parse_collection
+ (fun x' -> function
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = ""; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children
+ ConversionPathValue.parse
+ ConversionPathValue.empty
+ (fun v -> v)
+ cs
+ | e ->
+ GapiJson.unexpected "GapiAnalyticsV3Model.Rows.parse.parse_collection" e x')
+ ConversionPathValue.empty
+ (fun v -> { x with conversionPathValue = v })
+ cs
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "primitiveValue"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with primitiveValue = v }
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = ""; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children parse empty (fun x -> x) cs
+ | e ->
+ GapiJson.unexpected "GapiAnalyticsV3Model.Rows.parse" e x
+
+ end
+
+ module Query =
+ struct
+ type t = {
+ dimensions : string;
+ end_date : string;
+ filters : string;
+ ids : string;
+ max_results : int;
+ metrics : string list;
+ segment : string;
+ sort : string list;
+ start_date : string;
+ start_index : int;
+
+ }
+
+ let dimensions = {
+ GapiLens.get = (fun x -> x.dimensions);
+ GapiLens.set = (fun v x -> { x with dimensions = v });
+ }
+ let end_date = {
+ GapiLens.get = (fun x -> x.end_date);
+ GapiLens.set = (fun v x -> { x with end_date = v });
+ }
+ let filters = {
+ GapiLens.get = (fun x -> x.filters);
+ GapiLens.set = (fun v x -> { x with filters = v });
+ }
+ let ids = {
+ GapiLens.get = (fun x -> x.ids);
+ GapiLens.set = (fun v x -> { x with ids = v });
+ }
+ let max_results = {
+ GapiLens.get = (fun x -> x.max_results);
+ GapiLens.set = (fun v x -> { x with max_results = v });
+ }
+ let metrics = {
+ GapiLens.get = (fun x -> x.metrics);
+ GapiLens.set = (fun v x -> { x with metrics = v });
+ }
+ let segment = {
+ GapiLens.get = (fun x -> x.segment);
+ GapiLens.set = (fun v x -> { x with segment = v });
+ }
+ let sort = {
+ GapiLens.get = (fun x -> x.sort);
+ GapiLens.set = (fun v x -> { x with sort = v });
+ }
+ let start_date = {
+ GapiLens.get = (fun x -> x.start_date);
+ GapiLens.set = (fun v x -> { x with start_date = v });
+ }
+ let start_index = {
+ GapiLens.get = (fun x -> x.start_index);
+ GapiLens.set = (fun v x -> { x with start_index = v });
+ }
+
+ let empty = {
+ dimensions = "";
+ end_date = "";
+ filters = "";
+ ids = "";
+ max_results = 0;
+ metrics = [];
+ segment = "";
+ sort = [];
+ start_date = "";
+ start_index = 0;
+
+ }
+
+ let rec render_content x =
+ [
+ GapiJson.render_string_value "dimensions" x.dimensions;
+ GapiJson.render_string_value "end-date" x.end_date;
+ GapiJson.render_string_value "filters" x.filters;
+ GapiJson.render_string_value "ids" x.ids;
+ GapiJson.render_int_value "max-results" x.max_results;
+ GapiJson.render_array "metrics" (GapiJson.render_string_value "") x.metrics;
+ GapiJson.render_string_value "segment" x.segment;
+ GapiJson.render_array "sort" (GapiJson.render_string_value "") x.sort;
+ GapiJson.render_string_value "start-date" x.start_date;
+ GapiJson.render_int_value "start-index" x.start_index;
+
+ ]
+ and render x =
+ GapiJson.render_object "" (render_content x)
+
+ let rec parse x = function
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "dimensions"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with dimensions = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "end-date"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with end_date = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "filters"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with filters = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "ids"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with ids = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "max-results"; data_type = GapiJson.Scalar },
+ Json_type.Int v) ->
+ { x with max_results = v }
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = "metrics"; data_type = GapiJson.Array },
+ cs) ->
+ GapiJson.parse_collection
+ (fun x' -> function
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = ""; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ v
+ | e ->
+ GapiJson.unexpected "GapiAnalyticsV3Model.Query.parse.parse_collection" e x')
+ ""
+ (fun v -> { x with metrics = v })
+ cs
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "segment"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with segment = v }
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = "sort"; data_type = GapiJson.Array },
+ cs) ->
+ GapiJson.parse_collection
+ (fun x' -> function
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = ""; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ v
+ | e ->
+ GapiJson.unexpected "GapiAnalyticsV3Model.Query.parse.parse_collection" e x')
+ ""
+ (fun v -> { x with sort = v })
+ cs
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "start-date"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with start_date = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "start-index"; data_type = GapiJson.Scalar },
+ Json_type.Int v) ->
+ { x with start_index = v }
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = ""; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children parse empty (fun x -> x) cs
+ | e ->
+ GapiJson.unexpected "GapiAnalyticsV3Model.Query.parse" e x
+
+ end
+
+ module ProfileInfo =
+ struct
+ type t = {
+ accountId : string;
+ internalWebPropertyId : string;
+ profileId : string;
+ profileName : string;
+ tableId : string;
+ webPropertyId : string;
+
+ }
+
+ let accountId = {
+ GapiLens.get = (fun x -> x.accountId);
+ GapiLens.set = (fun v x -> { x with accountId = v });
+ }
+ let internalWebPropertyId = {
+ GapiLens.get = (fun x -> x.internalWebPropertyId);
+ GapiLens.set = (fun v x -> { x with internalWebPropertyId = v });
+ }
+ let profileId = {
+ GapiLens.get = (fun x -> x.profileId);
+ GapiLens.set = (fun v x -> { x with profileId = v });
+ }
+ let profileName = {
+ GapiLens.get = (fun x -> x.profileName);
+ GapiLens.set = (fun v x -> { x with profileName = v });
+ }
+ let tableId = {
+ GapiLens.get = (fun x -> x.tableId);
+ GapiLens.set = (fun v x -> { x with tableId = v });
+ }
+ let webPropertyId = {
+ GapiLens.get = (fun x -> x.webPropertyId);
+ GapiLens.set = (fun v x -> { x with webPropertyId = v });
+ }
+
+ let empty = {
+ accountId = "";
+ internalWebPropertyId = "";
+ profileId = "";
+ profileName = "";
+ tableId = "";
+ webPropertyId = "";
+
+ }
+
+ let rec render_content x =
+ [
+ GapiJson.render_string_value "accountId" x.accountId;
+ GapiJson.render_string_value "internalWebPropertyId" x.internalWebPropertyId;
+ GapiJson.render_string_value "profileId" x.profileId;
+ GapiJson.render_string_value "profileName" x.profileName;
+ GapiJson.render_string_value "tableId" x.tableId;
+ GapiJson.render_string_value "webPropertyId" x.webPropertyId;
+
+ ]
+ and render x =
+ GapiJson.render_object "" (render_content x)
+
+ let rec parse x = function
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "accountId"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with accountId = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "internalWebPropertyId"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with internalWebPropertyId = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "profileId"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with profileId = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "profileName"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with profileName = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "tableId"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with tableId = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "webPropertyId"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with webPropertyId = v }
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = ""; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children parse empty (fun x -> x) cs
+ | e ->
+ GapiJson.unexpected "GapiAnalyticsV3Model.ProfileInfo.parse" e x
+
+ end
+
+ module ColumnHeaders =
+ struct
+ type t = {
+ columnType : string;
+ dataType : string;
+ name : string;
+
+ }
+
+ let columnType = {
+ GapiLens.get = (fun x -> x.columnType);
+ GapiLens.set = (fun v x -> { x with columnType = v });
+ }
+ let dataType = {
+ GapiLens.get = (fun x -> x.dataType);
+ GapiLens.set = (fun v x -> { x with dataType = v });
+ }
+ let name = {
+ GapiLens.get = (fun x -> x.name);
+ GapiLens.set = (fun v x -> { x with name = v });
+ }
+
+ let empty = {
+ columnType = "";
+ dataType = "";
+ name = "";
+
+ }
+
+ let rec render_content x =
+ [
+ GapiJson.render_string_value "columnType" x.columnType;
+ GapiJson.render_string_value "dataType" x.dataType;
+ GapiJson.render_string_value "name" x.name;
+
+ ]
+ and render x =
+ GapiJson.render_object "" (render_content x)
+
+ let rec parse x = function
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "columnType"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with columnType = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "dataType"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with dataType = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "name"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with name = v }
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = ""; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children parse empty (fun x -> x) cs
+ | e ->
+ GapiJson.unexpected "GapiAnalyticsV3Model.ColumnHeaders.parse" e x
+
+ end
+
+ type t = {
+ columnHeaders : ColumnHeaders.t list;
+ containsSampledData : bool;
+ id : string;
+ itemsPerPage : int;
+ kind : string;
+ nextLink : string;
+ previousLink : string;
+ profileInfo : ProfileInfo.t;
+ query : Query.t;
+ rows : Rows.t list list;
+ selfLink : string;
+ totalResults : int;
+ totalsForAllResults : (string * string) list;
+
+ }
+
+ let columnHeaders = {
+ GapiLens.get = (fun x -> x.columnHeaders);
+ GapiLens.set = (fun v x -> { x with columnHeaders = v });
+ }
+ let containsSampledData = {
+ GapiLens.get = (fun x -> x.containsSampledData);
+ GapiLens.set = (fun v x -> { x with containsSampledData = v });
+ }
+ let id = {
+ GapiLens.get = (fun x -> x.id);
+ GapiLens.set = (fun v x -> { x with id = v });
+ }
+ let itemsPerPage = {
+ GapiLens.get = (fun x -> x.itemsPerPage);
+ GapiLens.set = (fun v x -> { x with itemsPerPage = v });
+ }
+ let kind = {
+ GapiLens.get = (fun x -> x.kind);
+ GapiLens.set = (fun v x -> { x with kind = v });
+ }
+ let nextLink = {
+ GapiLens.get = (fun x -> x.nextLink);
+ GapiLens.set = (fun v x -> { x with nextLink = v });
+ }
+ let previousLink = {
+ GapiLens.get = (fun x -> x.previousLink);
+ GapiLens.set = (fun v x -> { x with previousLink = v });
+ }
+ let profileInfo = {
+ GapiLens.get = (fun x -> x.profileInfo);
+ GapiLens.set = (fun v x -> { x with profileInfo = v });
+ }
+ let query = {
+ GapiLens.get = (fun x -> x.query);
+ GapiLens.set = (fun v x -> { x with query = v });
+ }
+ let rows = {
+ GapiLens.get = (fun x -> x.rows);
+ GapiLens.set = (fun v x -> { x with rows = v });
+ }
+ let selfLink = {
+ GapiLens.get = (fun x -> x.selfLink);
+ GapiLens.set = (fun v x -> { x with selfLink = v });
+ }
+ let totalResults = {
+ GapiLens.get = (fun x -> x.totalResults);
+ GapiLens.set = (fun v x -> { x with totalResults = v });
+ }
+ let totalsForAllResults = {
+ GapiLens.get = (fun x -> x.totalsForAllResults);
+ GapiLens.set = (fun v x -> { x with totalsForAllResults = v });
+ }
+
+ let empty = {
+ columnHeaders = [];
+ containsSampledData = false;
+ id = "";
+ itemsPerPage = 0;
+ kind = "";
+ nextLink = "";
+ previousLink = "";
+ profileInfo = ProfileInfo.empty;
+ query = Query.empty;
+ rows = [];
+ selfLink = "";
+ totalResults = 0;
+ totalsForAllResults = [];
+
+ }
+
+ let rec render_content x =
+ [
+ GapiJson.render_array "columnHeaders" ColumnHeaders.render x.columnHeaders;
+ GapiJson.render_bool_value "containsSampledData" x.containsSampledData;
+ GapiJson.render_string_value "id" x.id;
+ GapiJson.render_int_value "itemsPerPage" x.itemsPerPage;
+ GapiJson.render_string_value "kind" x.kind;
+ GapiJson.render_string_value "nextLink" x.nextLink;
+ GapiJson.render_string_value "previousLink" x.previousLink;
+ (fun v -> GapiJson.render_object "profileInfo" (ProfileInfo.render_content v)) x.profileInfo;
+ (fun v -> GapiJson.render_object "query" (Query.render_content v)) x.query;
+ GapiJson.render_array "rows" (GapiJson.render_array "" Rows.render) x.rows;
+ GapiJson.render_string_value "selfLink" x.selfLink;
+ GapiJson.render_int_value "totalResults" x.totalResults;
+ GapiJson.render_collection "totalsForAllResults" GapiJson.Object (fun (id, v) -> GapiJson.render_string_value id v) x.totalsForAllResults;
+
+ ]
+ and render x =
+ GapiJson.render_object "" (render_content x)
+
+ let rec parse x = function
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = "columnHeaders"; data_type = GapiJson.Array },
+ cs) ->
+ GapiJson.parse_collection
+ (fun x' -> function
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = ""; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children
+ ColumnHeaders.parse
+ ColumnHeaders.empty
+ (fun v -> v)
+ cs
+ | e ->
+ GapiJson.unexpected "GapiAnalyticsV3Model.McfData.parse.parse_collection" e x')
+ ColumnHeaders.empty
+ (fun v -> { x with columnHeaders = v })
+ cs
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "containsSampledData"; data_type = GapiJson.Scalar },
+ Json_type.Bool v) ->
+ { x with containsSampledData = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "id"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with id = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "itemsPerPage"; data_type = GapiJson.Scalar },
+ Json_type.Int v) ->
+ { x with itemsPerPage = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "kind"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with kind = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "nextLink"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with nextLink = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "previousLink"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with previousLink = v }
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = "profileInfo"; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children
+ ProfileInfo.parse
+ ProfileInfo.empty
+ (fun v -> { x with profileInfo = v })
+ cs
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = "query"; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children
+ Query.parse
+ Query.empty
+ (fun v -> { x with query = v })
+ cs
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = "rows"; data_type = GapiJson.Array },
+ cs) ->
+ GapiJson.parse_collection
+ (fun x' -> function
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = ""; data_type = GapiJson.Array },
+ cs) ->
+ GapiJson.parse_collection
+ (fun x' -> function
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = ""; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children
+ Rows.parse
+ Rows.empty
+ (fun v -> v)
+ cs
+ | e ->
+ GapiJson.unexpected "GapiAnalyticsV3Model.McfData.parse.parse_collection" e x')
+ Rows.empty
+ (fun v -> v)
+ cs
+ | e ->
+ GapiJson.unexpected "GapiAnalyticsV3Model.McfData.parse.parse_collection" e x')
+ []
+ (fun v -> { x with rows = v })
+ cs
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "selfLink"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with selfLink = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "totalResults"; data_type = GapiJson.Scalar },
+ Json_type.Int v) ->
+ { x with totalResults = v }
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = "totalsForAllResults"; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_collection
+ (fun x' -> function
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = n; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ (n, v)
+ | e ->
+ GapiJson.unexpected "GapiAnalyticsV3Model.McfData.parse.parse_dictionary" e x')
+ ("", "")
+ (fun v -> { x with totalsForAllResults = v })
+ cs
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = ""; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children parse empty (fun x -> x) cs
+ | e ->
+ GapiJson.unexpected "GapiAnalyticsV3Model.McfData.parse" e x
+
+ let to_data_model = GapiJson.render_root render
+
+ let of_data_model = GapiJson.parse_root parse empty
+
+end
+
module Accounts =
struct
type t = {
View
205 src/gapi/gapiAnalyticsV3Model.mli
@@ -666,6 +666,8 @@ sig
(** Time this profile was last modified. *)
webPropertyId : string;
(** Web property ID of the form UA-XXXXX-YY to which this profile belongs. *)
+ websiteUrl : string;
+ (** Website URL for this profile. *)
}
@@ -686,6 +688,7 @@ sig
val timezone : (t, string) GapiLens.t
val updated : (t, GapiDate.t) GapiLens.t
val webPropertyId : (t, string) GapiLens.t
+ val websiteUrl : (t, string) GapiLens.t
val empty : t
@@ -889,6 +892,208 @@ sig
end
+module McfData :
+sig
+ module Rows :
+ sig
+ module ConversionPathValue :
+ sig
+ type t = {
+ interactionType : string;
+ (** Type of an interaction on conversion path. Such as CLICK, IMPRESSION etc. *)
+ nodeValue : string;
+ (** Node value of an interaction on conversion path. Such as source, medium etc. *)
+
+ }
+
+ val interactionType : (t, string) GapiLens.t
+ val nodeValue : (t, string) GapiLens.t
+
+ val empty : t
+
+ val render : t -> GapiJson.json_data_model list
+
+ val parse : t -> GapiJson.json_data_model -> t
+
+ end
+
+ type t = {
+ conversionPathValue : ConversionPathValue.t list;
+ (** A conversion path dimension value, containing a list of interactions with their attributes. *)
+ primitiveValue : string;
+ (** A primitive metric value. A primitive dimension value. *)
+
+ }
+
+ val conversionPathValue : (t, ConversionPathValue.t list) GapiLens.t
+ val primitiveValue : (t, string) GapiLens.t
+
+ val empty : t
+
+ val render : t -> GapiJson.json_data_model list
+
+ val parse : t -> GapiJson.json_data_model -> t
+
+ end
+
+ module Query :
+ sig
+ type t = {
+ dimensions : string;
+ (** List of analytics dimensions. *)
+ end_date : string;
+ (** End date. *)
+ filters : string;
+ (** Comma-separated list of dimension or metric filters. *)
+ ids : string;
+ (** Unique table ID. *)
+ max_results : int;
+ (** Maximum results per page. *)
+ metrics : string list;
+ (** List of analytics metrics. *)
+ segment : string;
+ (** Analytics advanced segment. *)
+ sort : string list;
+ (** List of dimensions or metrics based on which Analytics data is sorted. *)
+ start_date : string;
+ (** Start date. *)
+ start_index : int;
+ (** Start index. *)
+
+ }
+
+ val dimensions : (t, string) GapiLens.t
+ val end_date : (t, string) GapiLens.t
+ val filters : (t, string) GapiLens.t
+ val ids : (t, string) GapiLens.t
+ val max_results : (t, int) GapiLens.t
+ val metrics : (t, string list) GapiLens.t
+ val segment : (t, string) GapiLens.t
+ val sort : (t, string list) GapiLens.t
+ val start_date : (t, string) GapiLens.t
+ val start_index : (t, int) GapiLens.t
+
+ val empty : t
+
+ val render : t -> GapiJson.json_data_model list
+
+ val parse : t -> GapiJson.json_data_model -> t
+
+ end
+
+ module ProfileInfo :
+ sig
+ type t = {
+ accountId : string;
+ (** Account ID to which this profile belongs. *)
+ internalWebPropertyId : string;
+ (** Internal ID for the web property to which this profile belongs. *)
+ profileId : string;
+ (** Profile ID. *)
+ profileName : string;
+ (** Profile name. *)
+ tableId : string;
+ (** Table ID for profile. *)
+ webPropertyId : string;
+ (** Web Property ID to which this profile belongs. *)
+
+ }
+
+ val accountId : (t, string) GapiLens.t
+ val internalWebPropertyId : (t, string) GapiLens.t
+ val profileId : (t, string) GapiLens.t
+ val profileName : (t, string) GapiLens.t
+ val tableId : (t, string) GapiLens.t
+ val webPropertyId : (t, string) GapiLens.t
+
+ val empty : t
+
+ val render : t -> GapiJson.json_data_model list
+
+ val parse : t -> GapiJson.json_data_model -> t
+
+ end
+
+ module ColumnHeaders :
+ sig
+ type t = {
+ columnType : string;
+ (** Column Type. Either DIMENSION or METRIC. *)
+ dataType : string;
+ (** Data type. Dimension and metric values data types such as INTEGER, DOUBLE, CURRENCY, MCF_SEQUENCE etc. *)
+ name : string;
+ (** Column name. *)
+
+ }
+
+ val columnType : (t, string) GapiLens.t
+ val dataType : (t, string) GapiLens.t
+ val name : (t, string) GapiLens.t
+
+ val empty : t
+
+ val render : t -> GapiJson.json_data_model list
+
+ val parse : t -> GapiJson.json_data_model -> t
+
+ end
+
+ type t = {
+ columnHeaders : ColumnHeaders.t list;
+ (** Column headers that list dimension names followed by the metric names. The order of dimensions and metrics is same as specified in the request. *)
+ containsSampledData : bool;
+ (** Determines if the Analytics data contains sampled data. *)
+ id : string;
+ (** Unique ID for this data response. *)
+ itemsPerPage : int;
+ (** The maximum number of rows the response can contain, regardless of the actual number of rows returned. Its value ranges from 1 to 10,000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. *)
+ kind : string;
+ (** Resource type. *)
+ nextLink : string;
+ (** Link to next page for this Analytics data query. *)
+ previousLink : string;
+ (** Link to previous page for this Analytics data query. *)
+ profileInfo : ProfileInfo.t;
+ (** Information for the profile, for which the Analytics data was requested. *)
+ query : Query.t;
+ (** Analytics data request query parameters. *)
+ rows : Rows.t list list;
+ (** Analytics data rows, where each row contains a list of dimension values followed by the metric values. The order of dimensions and metrics is same as specified in the request. *)
+ selfLink : string;
+ (** Link to this page. *)
+ totalResults : int;
+ (** The total number of rows for the query, regardless of the number of rows in the response. *)
+ totalsForAllResults : (string * string) list;
+ (** Total values for the requested metrics over all the results, not just the results returned in this response. The order of the metric totals is same as the metric order specified in the request. *)
+
+ }
+
+ val columnHeaders : (t, ColumnHeaders.t list) GapiLens.t
+ val containsSampledData : (t, bool) GapiLens.t
+ val id : (t, string) GapiLens.t
+ val itemsPerPage : (t, int) GapiLens.t
+ val kind : (t, string) GapiLens.t
+ val nextLink : (t, string) GapiLens.t
+ val previousLink : (t, string) GapiLens.t
+ val profileInfo : (t, ProfileInfo.t) GapiLens.t
+ val query : (t, Query.t) GapiLens.t
+ val rows : (t, Rows.t list list) GapiLens.t
+ val selfLink : (t, string) GapiLens.t
+ val totalResults : (t, int) GapiLens.t
+ val totalsForAllResults : (t, (string * string) list) GapiLens.t
+
+ val empty : t
+
+ val render : t -> GapiJson.json_data_model list
+
+ val parse : t -> GapiJson.json_data_model -> t
+
+ val to_data_model : t -> GapiJson.json_data_model
+
+ val of_data_model : GapiJson.json_data_model -> t
+
+end
+
module Accounts :
sig
type t = {
View
123 src/gapi/gapiAnalyticsV3Service.ml
@@ -5,6 +5,8 @@ open GapiAnalyticsV3Model
module Scope =
struct
+ let analytics = "https://www.googleapis.com/auth/analytics"
+
let analytics_readonly = "https://www.googleapis.com/auth/analytics.readonly"
@@ -139,6 +141,127 @@ struct
end
+ module Mcf =
+ struct
+ module McfParameters =
+ struct
+ type t = {
+ (* Standard query parameters *)
+ fields : string;
+ prettyPrint : bool;
+ quotaUser : string;
+ userIp : string;
+ key : string;
+ (* mcf-specific query parameters *)
+ dimensions : string;
+ end_date : string;
+ filters : string;
+ ids : string;
+ max_results : int;
+ metrics : string;
+ sort : string;
+ start_date : string;
+ start_index : int;
+
+ }
+
+ let default = {
+ fields = "";
+ prettyPrint = true;
+ quotaUser = "";
+ userIp = "";
+ key = "";
+ dimensions = "";
+ end_date = "";
+ filters = "";
+ ids = "";
+ max_results = 0;
+ metrics = "";
+ sort = "";
+ start_date = "";
+ start_index = 0;
+
+ }
+
+ let to_key_value_list qp =
+ let param get_value to_string name =
+ GapiService.build_param default qp get_value to_string name in [
+ param (fun p -> p.fields) (fun x -> x) "fields";
+ param (fun p -> p.prettyPrint) string_of_bool "prettyPrint";
+ param (fun p -> p.quotaUser) (fun x -> x) "quotaUser";
+ param (fun p -> p.userIp) (fun x -> x) "userIp";
+ param (fun p -> p.key) (fun x -> x) "key";
+ param (fun p -> p.dimensions) (fun x -> x) "dimensions";
+ param (fun p -> p.end_date) (fun x -> x) "end-date";
+ param (fun p -> p.filters) (fun x -> x) "filters";
+ param (fun p -> p.ids) (fun x -> x) "ids";
+ param (fun p -> p.max_results) string_of_int "max-results";
+ param (fun p -> p.metrics) (fun x -> x) "metrics";
+ param (fun p -> p.sort) (fun x -> x) "sort";
+ param (fun p -> p.start_date) (fun x -> x) "start-date";
+ param (fun p -> p.start_index) string_of_int "start-index";
+
+ ] |> List.concat
+
+ let merge_parameters
+ ?(standard_parameters = GapiService.StandardParameters.default)
+ ?(dimensions = default.dimensions)
+ ?(end_date = default.end_date)
+ ?(filters = default.filters)
+ ?(ids = default.ids)
+ ?(max_results = default.max_results)
+ ?(metrics = default.metrics)
+ ?(sort = default.sort)
+ ?(start_date = default.start_date)
+ ?(start_index = default.start_index)
+ () =
+ let parameters = {
+ fields = standard_parameters.GapiService.StandardParameters.fields;
+ prettyPrint = standard_parameters.GapiService.StandardParameters.prettyPrint;
+ quotaUser = standard_parameters.GapiService.StandardParameters.quotaUser;
+ userIp = standard_parameters.GapiService.StandardParameters.userIp;
+ key = standard_parameters.GapiService.StandardParameters.key;
+ dimensions;
+ end_date;
+ filters;
+ ids;
+ max_results;
+ metrics;
+ sort;
+ start_date;
+ start_index;
+
+ } in
+ if parameters = default then None else Some parameters
+
+ end
+
+ let get
+ ?(base_url = "https://www.googleapis.com/analytics/v3/")
+ ?etag
+ ?std_params
+ ?dimensions
+ ?filters
+ ?max_results
+ ?sort
+ ?start_index
+ ~ids
+ ~start_date
+ ~end_date
+ ~metrics
+ session =
+ let full_url = GapiUtils.add_path_to_url ["data"; "mcf"] base_url in
+ let params = McfParameters.merge_parameters
+ ?standard_parameters:std_params ?dimensions ~end_date ?filters ~ids
+ ?max_results ~metrics ?sort ~start_date ?start_index () in
+ let query_parameters = Option.map McfParameters.to_key_value_list
+ params in
+ GapiService.get ?query_parameters ?etag full_url
+ (GapiJson.parse_json_response McfData.of_data_model) session
+
+
+ end
+
end
View
40 src/gapi/gapiAnalyticsV3Service.mli
@@ -10,6 +10,9 @@
module Scope :
sig
+ val analytics : string
+ (** View and manage your Google Analytics data *)
+
val analytics_readonly : string
(** View your Google Analytics data *)
@@ -19,6 +22,43 @@ end
module DataResource :
sig
+ module Mcf :
+ sig
+
+ (** Returns Analytics Multi-Channel Funnels data for a profile.
+
+ @param base_url Service endpoint base URL (defaults to ["https://www.googleapis.com/analytics/v3/"]).
+ @param etag Optional ETag.
+ @param std_params Optional standard parameters.
+ @param dimensions A comma-separated list of Multi-Channel Funnels dimensions. E.g., 'mcf:source,mcf:medium'.
+ @param filters A comma-separated list of dimension or metric filters to be applied to the Analytics data.
+ @param max_results The maximum number of entries to include in this feed.
+ @param sort A comma-separated list of dimensions or metrics that determine the sort order for the Analytics data.
+ @param start_index An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
+ @param ids Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics profile ID.
+ @param start_date Start date for fetching Analytics data. All requests should specify a start date formatted as YYYY-MM-DD.
+ @param end_date End date for fetching Analytics data. All requests should specify an end date formatted as YYYY-MM-DD.
+ @param metrics A comma-separated list of Multi-Channel Funnels metrics. E.g., 'mcf:totalConversions,mcf:totalConversionValue'. At least one metric must be specified.
+ *)
+ val get :
+ ?base_url:string ->
+ ?etag:string ->
+ ?std_params:GapiService.StandardParameters.t ->
+ ?dimensions:string ->
+ ?filters:string ->
+ ?max_results:int ->
+ ?sort:string ->
+ ?start_index:int ->
+ ids:string ->
+ start_date:string ->
+ end_date:string ->
+ metrics:string ->
+ GapiConversation.Session.t ->
+ GapiAnalyticsV3Model.McfData.t * GapiConversation.Session.t
+
+
+ end
+
module Ga :
sig
View
33 src/gapi/gapiBigqueryV2Model.ml
@@ -884,11 +884,13 @@ end
module JobConfigurationLoad =
struct
type t = {
+ allowQuotedNewlines : bool;
createDisposition : string;
destinationTable : TableReference.t;
encoding : string;
fieldDelimiter : string;
maxBadRecords : int;
+ quote : string;
schema : TableSchema.t;
schemaInline : string;
schemaInlineFormat : string;
@@ -898,6 +900,10 @@ struct
}
+ let allowQuotedNewlines = {
+ GapiLens.get = (fun x -> x.allowQuotedNewlines);
+ GapiLens.set = (fun v x -> { x with allowQuotedNewlines = v });
+ }
let createDisposition = {
GapiLens.get = (fun x -> x.createDisposition);
GapiLens.set = (fun v x -> { x with createDisposition = v });
@@ -918,6 +924,10 @@ struct
GapiLens.get = (fun x -> x.maxBadRecords);
GapiLens.set = (fun v x -> { x with maxBadRecords = v });
}
+ let quote = {
+ GapiLens.get = (fun x -> x.quote);
+ GapiLens.set = (fun v x -> { x with quote = v });
+ }
let schema = {
GapiLens.get = (fun x -> x.schema);
GapiLens.set = (fun v x -> { x with schema = v });
@@ -944,11 +954,13 @@ struct
}
let empty = {
+ allowQuotedNewlines = false;
createDisposition = "";
destinationTable = TableReference.empty;
encoding = "";
fieldDelimiter = "";
maxBadRecords = 0;
+ quote = "";
schema = TableSchema.empty;
schemaInline = "";
schemaInlineFormat = "";
@@ -960,11 +972,13 @@ struct
let rec render_content x =
[
+ GapiJson.render_bool_value "allowQuotedNewlines" x.allowQuotedNewlines;
GapiJson.render_string_value "createDisposition" x.createDisposition;
(fun v -> GapiJson.render_object "destinationTable" (TableReference.render_content v)) x.destinationTable;
GapiJson.render_string_value "encoding" x.encoding;
GapiJson.render_string_value "fieldDelimiter" x.fieldDelimiter;
GapiJson.render_int_value "maxBadRecords" x.maxBadRecords;
+ GapiJson.render_string_value "quote" x.quote;
(fun v -> GapiJson.render_object "schema" (TableSchema.render_content v)) x.schema;
GapiJson.render_string_value "schemaInline" x.schemaInline;
GapiJson.render_string_value "schemaInlineFormat" x.schemaInlineFormat;
@@ -978,6 +992,10 @@ struct
let rec parse x = function
| GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "allowQuotedNewlines"; data_type = GapiJson.Scalar },
+ Json_type.Bool v) ->
+ { x with allowQuotedNewlines = v }
+ | GapiCore.AnnotatedTree.Leaf
({ GapiJson.name = "createDisposition"; data_type = GapiJson.Scalar },
Json_type.String v) ->
{ x with createDisposition = v }
@@ -1001,6 +1019,10 @@ struct
({ GapiJson.name = "maxBadRecords"; data_type = GapiJson.Scalar },
Json_type.Int v) ->
{ x with maxBadRecords = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "quote"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with quote = v }
| GapiCore.AnnotatedTree.Node
({ GapiJson.name = "schema"; data_type = GapiJson.Object },
cs) ->
@@ -2461,6 +2483,7 @@ module QueryRequest =
struct
type t = {
defaultDataset : DatasetReference.t;
+ dryRun : bool;
kind : string;
maxResults : int;
query : string;
@@ -2472,6 +2495,10 @@ struct
GapiLens.get = (fun x -> x.defaultDataset);
GapiLens.set = (fun v x -> { x with defaultDataset = v });
}
+ let dryRun = {
+ GapiLens.get = (fun x -> x.dryRun);
+ GapiLens.set = (fun v x -> { x with dryRun = v });
+ }
let kind = {
GapiLens.get = (fun x -> x.kind);
GapiLens.set = (fun v x -> { x with kind = v });
@@ -2491,6 +2518,7 @@ struct
let empty = {
defaultDataset = DatasetReference.empty;
+ dryRun = false;
kind = "";
maxResults = 0;
query = "";
@@ -2501,6 +2529,7 @@ struct
let rec render_content x =
[
(fun v -> GapiJson.render_object "defaultDataset" (DatasetReference.render_content v)) x.defaultDataset;
+ GapiJson.render_bool_value "dryRun" x.dryRun;
GapiJson.render_string_value "kind" x.kind;
GapiJson.render_int_value "maxResults" x.maxResults;
GapiJson.render_string_value "query" x.query;
@@ -2520,6 +2549,10 @@ struct
(fun v -> { x with defaultDataset = v })
cs
| GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "dryRun"; data_type = GapiJson.Scalar },
+ Json_type.Bool v) ->
+ { x with dryRun = v }
+ | GapiCore.AnnotatedTree.Leaf
({ GapiJson.name = "kind"; data_type = GapiJson.Scalar },
Json_type.String v) ->
{ x with kind = v }
View
15 src/gapi/gapiBigqueryV2Model.mli
@@ -346,6 +346,8 @@ end
module JobConfigurationLoad :
sig
type t = {
+ allowQuotedNewlines : bool;
+ (** [Experimental] Whether to allow quoted newlines in the source CSV data. *)
createDisposition : string;
(** [Optional] Whether to create the table if it doesn't already exist (CREATE_IF_NEEDED) or to require the table already exist (CREATE_NEVER). Default is CREATE_IF_NEEDED. *)
destinationTable : TableReference.t;
@@ -353,9 +355,11 @@ sig
encoding : string;
(** [Optional] Character encoding of the input data. May be UTF-8 or ISO-8859-1. Default is UTF-8. *)
fieldDelimiter : string;
- (** [Optional] Delimiter to use between fields in the import data. Default is ',' *)
+ (** [Optional] Delimiter to use between fields in the import data. Default is ','. Note that delimiters are applied to the raw, binary data before the encoding is applied. *)
maxBadRecords : int;
(** [Optional] Maximum number of bad records that should be ignored before the entire job is aborted and no updates are performed. *)
+ quote : string;
+ (** [Optional] Quote character to use. Default is '"'. Note that quoting is done on the raw, binary data before the encoding is applied. *)
schema : TableSchema.t;
(** [Optional] Schema of the table being written to. *)
schemaInline : string;
@@ -371,11 +375,13 @@ sig
}
+ val allowQuotedNewlines : (t, bool) GapiLens.t
val createDisposition : (t, string) GapiLens.t
val destinationTable : (t, TableReference.t) GapiLens.t
val encoding : (t, string) GapiLens.t
val fieldDelimiter : (t, string) GapiLens.t
val maxBadRecords : (t, int) GapiLens.t
+ val quote : (t, string) GapiLens.t
val schema : (t, TableSchema.t) GapiLens.t
val schemaInline : (t, string) GapiLens.t
val schemaInlineFormat : (t, string) GapiLens.t
@@ -430,7 +436,7 @@ sig
destinationTable : TableReference.t;
(** [Optional] Describes the table where the query results should be stored. If not present, a new table will be created to store the results. *)
priority : string;
- (** [Experimental] Specifies a priority for the query. Default is INTERACTIVE. Alternative is BATCH, which may be subject to looser quota restrictions. *)
+ (** [Optional] Specifies a priority for the query. Default is INTERACTIVE. Alternative is BATCH, which may be subject to looser quota restrictions. *)
query : string;
(** [Required] BigQuery SQL query to execute. *)
writeDisposition : string;
@@ -842,7 +848,7 @@ sig
jobComplete : bool;
(** Whether the query has completed or not. If rows or totalRows are present, this will always be true. If this is false, totalRows will not be available. *)
jobReference : JobReference.t;
- (** Reference to the Helix Job that was created to run the query. This field will be present even if the original request timed out, in which case GetQueryResults can be used to read the results once the query has completed. Since this API only returns the first page of results, subsequent pages can be fetched via the same mechanism (GetQueryResults). *)
+ (** Reference to the BigQuery Job that was created to run the query. This field will be present even if the original request timed out, in which case GetQueryResults can be used to read the results once the query has completed. Since this API only returns the first page of results, subsequent pages can be fetched via the same mechanism (GetQueryResults). *)
kind : string;
(** The resource type of the response. *)
rows : TableRow.t list;
@@ -879,6 +885,8 @@ sig
type t = {
defaultDataset : DatasetReference.t;
(** [Optional] Specifies the default datasetId and projectId to assume for any unqualified table names in the query. If not set, all table names in the query string must be fully-qualified in the format projectId:datasetId.tableid. *)
+ dryRun : bool;
+ (** [Optional] If set, don't actually run the query. A valid query will return an empty response, while an invalid query will return the same error it would if it wasn't a dry run. *)
kind : string;
(** The resource type of the request. *)
maxResults : int;
@@ -891,6 +899,7 @@ sig
}
val defaultDataset : (t, DatasetReference.t) GapiLens.t
+ val dryRun : (t, bool) GapiLens.t
val kind : (t, string) GapiLens.t
val maxResults : (t, int) GapiLens.t
val query : (t, string) GapiLens.t
View
6 src/gapi/gapiBigqueryV2Service.ml
@@ -7,6 +7,12 @@ module Scope =
struct
let bigquery = "https://www.googleapis.com/auth/bigquery"
+ let devstorage_full_control = "https://www.googleapis.com/auth/devstorage.full_control"
+
+ let devstorage_read_only = "https://www.googleapis.com/auth/devstorage.read_only"
+
+ let devstorage_read_write = "https://www.googleapis.com/auth/devstorage.read_write"
+
end
View
9 src/gapi/gapiBigqueryV2Service.mli
@@ -13,6 +13,15 @@ sig
val bigquery : string
(** View and manage your data in Google BigQuery *)
+ val devstorage_full_control : string
+ (** Manage your data and permissions in Google Cloud Storage *)
+
+ val devstorage_read_only : string
+ (** View your data in Google Cloud Storage *)
+
+ val devstorage_read_write : string
+ (** Manage your data in Google Cloud Storage *)
+
end
(** Service Auth Scopes *)
View
33 src/gapi/gapiCalendarV3Model.ml
@@ -1229,6 +1229,7 @@ struct
guestsCanInviteOthers : bool;
guestsCanModify : bool;
guestsCanSeeOtherGuests : bool;
+ hangoutLink : string;
htmlLink : string;
iCalUID : string;
id : string;
@@ -1311,6 +1312,10 @@ struct
GapiLens.get = (fun x -> x.guestsCanSeeOtherGuests);
GapiLens.set = (fun v x -> { x with guestsCanSeeOtherGuests = v });
}
+ let hangoutLink = {
+ GapiLens.get = (fun x -> x.hangoutLink);
+ GapiLens.set = (fun v x -> { x with hangoutLink = v });
+ }
let htmlLink = {
GapiLens.get = (fun x -> x.htmlLink);
GapiLens.set = (fun v x -> { x with htmlLink = v });
@@ -1404,6 +1409,7 @@ struct
guestsCanInviteOthers = false;
guestsCanModify = false;
guestsCanSeeOtherGuests = false;
+ hangoutLink = "";
htmlLink = "";
iCalUID = "";
id = "";
@@ -1443,6 +1449,7 @@ struct
GapiJson.render_bool_value "guestsCanInviteOthers" x.guestsCanInviteOthers;
GapiJson.render_bool_value "guestsCanModify" x.guestsCanModify;
GapiJson.render_bool_value "guestsCanSeeOtherGuests" x.guestsCanSeeOtherGuests;
+ GapiJson.render_string_value "hangoutLink" x.hangoutLink;
GapiJson.render_string_value "htmlLink" x.htmlLink;
GapiJson.render_string_value "iCalUID" x.iCalUID;
GapiJson.render_string_value "id" x.id;
@@ -1559,6 +1566,10 @@ struct
Json_type.Bool v) ->
{ x with guestsCanSeeOtherGuests = v }
| GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "hangoutLink"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with hangoutLink = v }
+ | GapiCore.AnnotatedTree.Leaf
({ GapiJson.name = "htmlLink"; data_type = GapiJson.Scalar },
Json_type.String v) ->
{ x with htmlLink = v }
@@ -2287,10 +2298,12 @@ module CalendarListEntry =
struct
type t = {
accessRole : string;
+ backgroundColor : string;
colorId : string;
defaultReminders : EventReminder.t list;
description : string;
etag : string;
+ foregroundColor : string;
hidden : bool;
id : string;
kind : string;
@@ -2306,6 +2319,10 @@ struct
GapiLens.get = (fun x -> x.accessRole);
GapiLens.set = (fun v x -> { x with accessRole = v });
}
+ let backgroundColor = {
+ GapiLens.get = (fun x -> x.backgroundColor);
+ GapiLens.set = (fun v x -> { x with backgroundColor = v });
+ }
let colorId = {
GapiLens.get = (fun x -> x.colorId);
GapiLens.set = (fun v x -> { x with colorId = v });
@@ -2322,6 +2339,10 @@ struct
GapiLens.get = (fun x -> x.etag);
GapiLens.set = (fun v x -> { x with etag = v });
}
+ let foregroundColor = {
+ GapiLens.get = (fun x -> x.foregroundColor);
+ GapiLens.set = (fun v x -> { x with foregroundColor = v });
+ }
let hidden = {
GapiLens.get = (fun x -> x.hidden);
GapiLens.set = (fun v x -> { x with hidden = v });
@@ -2357,10 +2378,12 @@ struct
let empty = {
accessRole = "";
+ backgroundColor = "";
colorId = "";
defaultReminders = [];
description = "";
etag = "";
+ foregroundColor = "";
hidden = false;
id = "";
kind = "";
@@ -2375,10 +2398,12 @@ struct
let rec render_content x =
[
GapiJson.render_string_value "accessRole" x.accessRole;
+ GapiJson.render_string_value "backgroundColor" x.backgroundColor;
GapiJson.render_string_value "colorId" x.colorId;
GapiJson.render_array "defaultReminders" EventReminder.render x.defaultReminders;
GapiJson.render_string_value "description" x.description;
GapiJson.render_string_value "etag" x.etag;
+ GapiJson.render_string_value "foregroundColor" x.foregroundColor;
GapiJson.render_bool_value "hidden" x.hidden;
GapiJson.render_string_value "id" x.id;
GapiJson.render_string_value "kind" x.kind;
@@ -2398,6 +2423,10 @@ struct
Json_type.String v) ->
{ x with accessRole = v }
| GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "backgroundColor"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with backgroundColor = v }
+ | GapiCore.AnnotatedTree.Leaf
({ GapiJson.name = "colorId"; data_type = GapiJson.Scalar },
Json_type.String v) ->
{ x with colorId = v }
@@ -2428,6 +2457,10 @@ struct
Json_type.String v) ->
{ x with etag = v }
| GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "foregroundColor"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with foregroundColor = v }
+ | GapiCore.AnnotatedTree.Leaf
({ GapiJson.name = "hidden"; data_type = GapiJson.Scalar },
Json_type.Bool v) ->
{ x with hidden = v }
View
15 src/gapi/gapiCalendarV3Model.mli
@@ -3,7 +3,7 @@
(** Data definition for Calendar API (v3).
For more information about this data model, see the
- {{:http://code.google.com/apis/calendar/v3/using.html}API Documentation}.
+ {{:https://developers.google.com/google-apps/calendar/firstapp}API Documentation}.
*)
module ColorDefinition :
@@ -487,7 +487,7 @@ sig
attendees : EventAttendee.t list;
(** The attendees of the event. *)
attendeesOmitted : bool;
- (** Whether attendees have been omitted from the event's representation. When retrieving an event, this is due to a restriction specified by the 'maxAttendee' query parameter. When updating an event, this can be used to only update the participant's response. Optional. The default is False. *)
+ (** Whether attendees may have been omitted from the event's representation. When retrieving an event, this may be due to a restriction specified by the 'maxAttendee' query parameter. When updating an event, this can be used to only update the participant's response. Optional. The default is False. *)
colorId : string;
(** The color of the event. This is an ID referring to an entry in the "event" section of the colors definition (see the "colors" endpoint). Optional. *)
created : GapiDate.t;
@@ -499,7 +499,7 @@ sig
_end : EventDateTime.t;
(** The (exclusive) end time of the event. For a recurring event, this is the end time of the first instance. *)
endTimeUnspecified : bool;
- (** *)
+ (** Whether the end time is actually unspecified. An end time is still provided for compatibility reasons, even if this attribute is set to True. The default is False. *)
etag : string;
(** ETag of the resource. *)
extendedProperties : ExtendedProperties.t;
@@ -512,6 +512,8 @@ sig
(** Whether attendees other than the organizer can modify the event. Optional. The default is False. *)
guestsCanSeeOtherGuests : bool;
(** Whether attendees other than the organizer can see who the event's attendees are. Optional. The default is False. *)
+ hangoutLink : string;
+ (** An absolute link to the Google+ hangout associated with this event. Read-only. *)
htmlLink : string;
(** An absolute link to this event in the Google Calendar Web UI. Read-only. *)
iCalUID : string;
@@ -577,6 +579,7 @@ sig
val guestsCanInviteOthers : (t, bool) GapiLens.t
val guestsCanModify : (t, bool) GapiLens.t
val guestsCanSeeOtherGuests : (t, bool) GapiLens.t
+ val hangoutLink : (t, string) GapiLens.t
val htmlLink : (t, string) GapiLens.t
val iCalUID : (t, string) GapiLens.t
val id : (t, string) GapiLens.t
@@ -833,6 +836,8 @@ sig
- "reader" - Provides read access to the calendar. Private events will appear to users with reader access, but event details will be hidden.
- "writer" - Provides read and write access to the calendar. Private events will appear to users with writer access, and event details will be visible.
- "owner" - Provides ownership of the calendar. This role has all of the permissions of the writer role with the additional ability to see and manipulate ACLs. *)
+ backgroundColor : string;
+ (** The main color of the calendar in the format '#0088aa'. This property supersedes the index-based colorId property. Optional. *)
colorId : string;
(** The color of the calendar. This is an ID referring to an entry in the "calendar" section of the colors definition (see the "colors" endpoint). Optional. *)
defaultReminders : EventReminder.t list;
@@ -841,6 +846,8 @@ sig
(** Description of the calendar. Optional. Read-only. *)
etag : string;
(** ETag of the resource. *)
+ foregroundColor : string;
+ (** The foreground color of the calendar in the format '#ffffff'. This property supersedes the index-based colorId property. Optional. *)
hidden : bool;
(** Whether the calendar has been hidden from the list. Optional. The default is False. *)
id : string;
@@ -861,10 +868,12 @@ sig
}
val accessRole : (t, string) GapiLens.t
+ val backgroundColor : (t, string) GapiLens.t
val colorId : (t, string) GapiLens.t
val defaultReminders : (t, EventReminder.t list) GapiLens.t
val description : (t, string) GapiLens.t
val etag : (t, string) GapiLens.t
+ val foregroundColor : (t, string) GapiLens.t
val hidden : (t, bool) GapiLens.t
val id : (t, string) GapiLens.t
val kind : (t, string) GapiLens.t
View
14 src/gapi/gapiCalendarV3Service.ml
@@ -156,6 +156,7 @@ struct
userIp : string;
key : string;
(* calendarList-specific query parameters *)
+ colorRgbFormat : bool;
maxResults : int;
minAccessRole : MinAccessRole.t;
pageToken : string;
@@ -169,6 +170,7 @@ struct
quotaUser = "";
userIp = "";
key = "";
+ colorRgbFormat = false;
maxResults = 0;
minAccessRole = MinAccessRole.Default;
pageToken = "";
@@ -184,6 +186,7 @@ struct
param (fun p -> p.quotaUser) (fun x -> x) "quotaUser";
param (fun p -> p.userIp) (fun x -> x) "userIp";
param (fun p -> p.key) (fun x -> x) "key";
+ param (fun p -> p.colorRgbFormat) string_of_bool "colorRgbFormat";
param (fun p -> p.maxResults) string_of_int "maxResults";
param (fun p -> p.minAccessRole) MinAccessRole.to_string "minAccessRole";
param (fun p -> p.pageToken) (fun x -> x) "pageToken";
@@ -193,6 +196,7 @@ struct
let merge_parameters
?(standard_parameters = GapiService.StandardParameters.default)
+ ?(colorRgbFormat = default.colorRgbFormat)
?(maxResults = default.maxResults)
?(minAccessRole = default.minAccessRole)
?(pageToken = default.pageToken)
@@ -204,6 +208,7 @@ struct
quotaUser = standard_parameters.GapiService.StandardParameters.quotaUser;
userIp = standard_parameters.GapiService.StandardParameters.userIp;
key = standard_parameters.GapiService.StandardParameters.key;
+ colorRgbFormat;
maxResults;
minAccessRole;
pageToken;
@@ -246,6 +251,7 @@ struct
let insert
?(base_url = "https://www.googleapis.com/calendar/v3/")
?std_params
+ ?colorRgbFormat
calendarListEntry
session =
let full_url = GapiUtils.add_path_to_url ["users"; "me"; "calendarList"]
@@ -253,7 +259,7 @@ struct
let etag = GapiUtils.etag_option calendarListEntry.CalendarListEntry.etag
in
let params = CalendarListParameters.merge_parameters
- ?standard_parameters:std_params () in
+ ?standard_parameters:std_params ?colorRgbFormat () in
let query_parameters = Option.map
CalendarListParameters.to_key_value_list params in
GapiService.post ?query_parameters ?etag
@@ -282,6 +288,7 @@ struct
let patch
?(base_url = "https://www.googleapis.com/calendar/v3/")
?std_params
+ ?colorRgbFormat
~calendarId
calendarListEntry
session =
@@ -290,7 +297,7 @@ struct
let etag = GapiUtils.etag_option calendarListEntry.CalendarListEntry.etag
in
let params = CalendarListParameters.merge_parameters
- ?standard_parameters:std_params () in
+ ?standard_parameters:std_params ?colorRgbFormat () in
let query_parameters = Option.map
CalendarListParameters.to_key_value_list params in
GapiService.patch ?query_parameters ?etag
@@ -301,6 +308,7 @@ struct
let update
?(base_url = "https://www.googleapis.com/calendar/v3/")
?std_params
+ ?colorRgbFormat
~calendarId
calendarListEntry
session =
@@ -309,7 +317,7 @@ struct
let etag = GapiUtils.etag_option calendarListEntry.CalendarListEntry.etag
in
let params = CalendarListParameters.merge_parameters
- ?standard_parameters:std_params () in
+ ?standard_parameters:std_params ?colorRgbFormat () in
let query_parameters = Option.map
CalendarListParameters.to_key_value_list params in
GapiService.put ?query_parameters ?etag
View
10 src/gapi/gapiCalendarV3Service.mli
@@ -5,7 +5,7 @@
Lets you manipulate events and other calendar data..
For more information about this service, see the
- {{:http://code.google.com/apis/calendar/v3/using.html}API Documentation}.
+ {{:https://developers.google.com/google-apps/calendar/firstapp}API Documentation}.
*)
module Scope :
@@ -167,10 +167,12 @@ sig
@param base_url Service endpoint base URL (defaults to ["https://www.googleapis.com/calendar/v3/"]).
@param std_params Optional standard parameters.
+ @param colorRgbFormat Whether to use the 'frontendColor' and 'backgroundColor' fields to write the calendar colors (RGB). If this feature is used, the index-based 'color' field will be set to the best matching option automatically. Optional. The default is False.
*)
val insert :
?base_url:string ->
?std_params:GapiService.StandardParameters.t ->
+ ?colorRgbFormat:bool ->
GapiCalendarV3Model.CalendarListEntry.t ->
GapiConversation.Session.t ->
GapiCalendarV3Model.CalendarListEntry.t * GapiConversation.Session.t
@@ -198,11 +200,13 @@ sig
@param base_url Service endpoint base URL (defaults to ["https://www.googleapis.com/calendar/v3/"]).
@param std_params Optional standard parameters.
+ @param colorRgbFormat Whether to use the 'frontendColor' and 'backgroundColor' fields to write the calendar colors (RGB). If this feature is used, the index-based 'color' field will be set to the best matching option automatically. Optional. The default is False.
@param calendarId Calendar identifier.
*)
val patch :
?base_url:string ->
?std_params:GapiService.StandardParameters.t ->
+ ?colorRgbFormat:bool ->
calendarId:string ->
GapiCalendarV3Model.CalendarListEntry.t ->
GapiConversation.Session.t ->
@@ -212,11 +216,13 @@ sig
@param base_url Service endpoint base URL (defaults to ["https://www.googleapis.com/calendar/v3/"]).
@param std_params Optional standard parameters.
+ @param colorRgbFormat Whether to use the 'frontendColor' and 'backgroundColor' fields to write the calendar colors (RGB). If this feature is used, the index-based 'color' field will be set to the best matching option automatically. Optional. The default is False.
@param calendarId Calendar identifier.
*)
val update :
?base_url:string ->
?std_params:GapiService.StandardParameters.t ->
+ ?colorRgbFormat:bool ->
calendarId:string ->
GapiCalendarV3Model.CalendarListEntry.t ->
GapiConversation.Session.t ->
@@ -457,7 +463,7 @@ sig
@param orderBy The order of the events returned in the result. Optional. The default is an unspecified, stable order.
@param pageToken Token specifying which result page to return. Optional.
@param q Free text search terms to find events that match these terms in any field, except for extended properties. Optional.
- @param showDeleted Whether to include deleted events (with 'eventStatus' equals 'cancelled') in the result. Optional. The default is False.
+ @param showDeleted Whether to include deleted single events (with 'status' equals 'cancelled') in the result. Cancelled instances of recurring events will still be included if 'singleEvents' is False. Optional. The default is False.
@param showHiddenInvitations Whether to include hidden invitations in the result. Optional. The default is False.
@param singleEvents Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves. Optional. The default is False.
@param timeMax Upper bound (exclusive) for an event's start time to filter by. Optional. The default is not to filter by start time.
View
11 src/gapi/gapiDiscoveryV1Model.ml
@@ -1123,6 +1123,7 @@ struct
basePath : string;
baseUrl : string;
batchPath : string;
+ canonicalName : string;
description : string;
discoveryVersion : string;
documentationLink : string;
@@ -1161,6 +1162,10 @@ struct
GapiLens.get = (fun x -> x.batchPath);
GapiLens.set = (fun v x -> { x with batchPath = v });
}
+ let canonicalName = {
+ GapiLens.get = (fun x -> x.canonicalName);
+ GapiLens.set = (fun v x -> { x with canonicalName = v });
+ }
let description = {
GapiLens.get = (fun x -> x.description);
GapiLens.set = (fun v x -> { x with description = v });
@@ -1243,6 +1248,7 @@ struct
basePath = "";
baseUrl = "";
batchPath = "";
+ canonicalName = "";
description = "";
discoveryVersion = "";
documentationLink = "";
@@ -1271,6 +1277,7 @@ struct
GapiJson.render_string_value "basePath" x.basePath;
GapiJson.render_string_value "baseUrl" x.baseUrl;
GapiJson.render_string_value "batchPath" x.batchPath;
+ GapiJson.render_string_value "canonicalName" x.canonicalName;
GapiJson.render_string_value "description" x.description;
GapiJson.render_string_value "discoveryVersion" x.discoveryVersion;
GapiJson.render_string_value "documentationLink" x.documentationLink;
@@ -1317,6 +1324,10 @@ struct
Json_type.String v) ->
{ x with batchPath = v }
| GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "canonicalName"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with canonicalName = v }
+ | GapiCore.AnnotatedTree.Leaf
({ GapiJson.name = "description"; data_type = GapiJson.Scalar },
Json_type.String v) ->
{ x with description = v }
View
5 src/gapi/gapiDiscoveryV1Model.mli
@@ -54,7 +54,7 @@ sig
minimum : string;
(** The minimum value of this parameter. *)
pattern : string;
- (** The regular expression this parameter must conform to. *)
+ (** The regular expression this parameter must conform to. Uses Java 6 regex format: http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html *)
properties : (string * t) list;
(** If this is a schema for an object, list the schema for each property of this object. *)
repeated : bool;
@@ -389,6 +389,8 @@ sig
(** [DEPRECATED] The base URL for REST requests. *)
batchPath : string;
(** The path for REST batch requests. *)
+ canonicalName : string;
+ (** Indicates how the API name should be capitalized and split into various parts. Useful for generating pretty class names. *)
description : string;
(** The description of this API. *)
discoveryVersion : string;
@@ -434,6 +436,7 @@ sig
val basePath : (t, string) GapiLens.t
val baseUrl : (t, string) GapiLens.t
val batchPath : (t, string) GapiLens.t
+ val canonicalName : (t, string) GapiLens.t
val description : (t, string) GapiLens.t
val discoveryVersion : (t, string) GapiLens.t
val documentationLink : (t, string) GapiLens.t
View
398 src/gapi/gapiDriveV2Model.ml
@@ -1,5 +1,92 @@
(* Warning! This file is generated. Modify at your own risk. *)
+module ParentReference =
+struct
+ type t = {
+ id : string;
+ isRoot : bool;
+ kind : string;
+ parentLink : string;
+ selfLink : string;
+
+ }
+
+ let id = {
+ GapiLens.get = (fun x -> x.id);
+ GapiLens.set = (fun v x -> { x with id = v });
+ }
+ let isRoot = {
+ GapiLens.get = (fun x -> x.isRoot);
+ GapiLens.set = (fun v x -> { x with isRoot = v });
+ }
+ let kind = {
+ GapiLens.get = (fun x -> x.kind);
+ GapiLens.set = (fun v x -> { x with kind = v });
+ }
+ let parentLink = {
+ GapiLens.get = (fun x -> x.parentLink);
+ GapiLens.set = (fun v x -> { x with parentLink = v });
+ }
+ let selfLink = {
+ GapiLens.get = (fun x -> x.selfLink);
+ GapiLens.set = (fun v x -> { x with selfLink = v });
+ }
+
+ let empty = {
+ id = "";
+ isRoot = false;
+ kind = "";
+ parentLink = "";
+ selfLink = "";
+
+ }
+
+ let rec render_content x =
+ [
+ GapiJson.render_string_value "id" x.id;
+ GapiJson.render_bool_value "isRoot" x.isRoot;
+ GapiJson.render_string_value "kind" x.kind;
+ GapiJson.render_string_value "parentLink" x.parentLink;
+ GapiJson.render_string_value "selfLink" x.selfLink;
+
+ ]
+ and render x =
+ GapiJson.render_object "" (render_content x)
+
+ let rec parse x = function
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "id"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with id = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "isRoot"; data_type = GapiJson.Scalar },
+ Json_type.Bool v) ->
+ { x with isRoot = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "kind"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with kind = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "parentLink"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with parentLink = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "selfLink"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with selfLink = v }
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = ""; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children parse empty (fun x -> x) cs
+ | e ->
+ GapiJson.unexpected "GapiDriveV2Model.ParentReference.parse" e x
+
+ let to_data_model = GapiJson.render_root render
+
+ let of_data_model = GapiJson.parse_root parse empty
+
+end
+
module Permission =
struct
type t = {
@@ -174,93 +261,6 @@ struct
end
-module ParentReference =
-struct
- type t = {
- id : string;
- isRoot : bool;
- kind : string;
- parentLink : string;
- selfLink : string;
-
- }
-
- let id = {
- GapiLens.get = (fun x -> x.id);
- GapiLens.set = (fun v x -> { x with id = v });
- }
- let isRoot = {
- GapiLens.get = (fun x -> x.isRoot);
- GapiLens.set = (fun v x -> { x with isRoot = v });
- }
- let kind = {
- GapiLens.get = (fun x -> x.kind);
- GapiLens.set = (fun v x -> { x with kind = v });
- }
- let parentLink = {
- GapiLens.get = (fun x -> x.parentLink);
- GapiLens.set = (fun v x -> { x with parentLink = v });
- }
- let selfLink = {
- GapiLens.get = (fun x -> x.selfLink);
- GapiLens.set = (fun v x -> { x with selfLink = v });
- }
-
- let empty = {
- id = "";
- isRoot = false;
- kind = "";
- parentLink = "";
- selfLink = "";
-
- }
-
- let rec render_content x =
- [
- GapiJson.render_string_value "id" x.id;
- GapiJson.render_bool_value "isRoot" x.isRoot;
- GapiJson.render_string_value "kind" x.kind;
- GapiJson.render_string_value "parentLink" x.parentLink;
- GapiJson.render_string_value "selfLink" x.selfLink;
-
- ]
- and render x =
- GapiJson.render_object "" (render_content x)
-
- let rec parse x = function
- | GapiCore.AnnotatedTree.Leaf
- ({ GapiJson.name = "id"; data_type = GapiJson.Scalar },
- Json_type.String v) ->
- { x with id = v }
- | GapiCore.AnnotatedTree.Leaf
- ({ GapiJson.name = "isRoot"; data_type = GapiJson.Scalar },
- Json_type.Bool v) ->
- { x with isRoot = v }
- | GapiCore.AnnotatedTree.Leaf
- ({ GapiJson.name = "kind"; data_type = GapiJson.Scalar },
- Json_type.String v) ->
- { x with kind = v }
- | GapiCore.AnnotatedTree.Leaf
- ({ GapiJson.name = "parentLink"; data_type = GapiJson.Scalar },
- Json_type.String v) ->
- { x with parentLink = v }
- | GapiCore.AnnotatedTree.Leaf
- ({ GapiJson.name = "selfLink"; data_type = GapiJson.Scalar },
- Json_type.String v) ->
- { x with selfLink = v }
- | GapiCore.AnnotatedTree.Node
- ({ GapiJson.name = ""; data_type = GapiJson.Object },
- cs) ->
- GapiJson.parse_children parse empty (fun x -> x) cs
- | e ->
- GapiJson.unexpected "GapiDriveV2Model.ParentReference.parse" e x
-
- let to_data_model = GapiJson.render_root render
-
- let of_data_model = GapiJson.parse_root parse empty
-
-end
-
module File =
struct
module Labels =
@@ -385,6 +385,155 @@ struct
end
+ module ImageMediaMetadata =
+ struct
+ module Location =
+ struct
+ type t = {
+ altitude : float;
+ latitude : float;
+ longitude : float;
+
+ }
+
+ let altitude = {
+ GapiLens.get = (fun x -> x.altitude);
+ GapiLens.set = (fun v x -> { x with altitude = v });
+ }
+ let latitude = {
+ GapiLens.get = (fun x -> x.latitude);
+ GapiLens.set = (fun v x -> { x with latitude = v });