Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update generated services

  • Loading branch information...
commit 0b91cc977de8d7a057dc81e3b23686de8219a1cd 1 parent fda46d7
@astrada authored
Showing with 4,335 additions and 428 deletions.
  1. +0 −1  examples/auth/oauth2Flow.ml
  2. +1,038 −97 src/gapi/gapiAnalyticsV3Model.ml
  3. +327 −7 src/gapi/gapiAnalyticsV3Model.mli
  4. +264 −0 src/gapi/gapiAnalyticsV3Service.ml
  5. +116 −1 src/gapi/gapiAnalyticsV3Service.mli
  6. +219 −40 src/gapi/gapiBigqueryV2Model.ml
  7. +93 −24 src/gapi/gapiBigqueryV2Model.mli
  8. +1 −1  src/gapi/gapiBigqueryV2Service.mli
  9. +2 −2 src/gapi/gapiCalendarV3Model.mli
  10. +8 −5 src/gapi/gapiCalendarV3Service.ml
  11. +6 −0 src/gapi/gapiCalendarV3Service.mli
  12. +1 −1  src/gapi/gapiCustomsearchV1Model.mli
  13. +1 −1  src/gapi/gapiCustomsearchV1Service.mli
  14. +11 −0 src/gapi/gapiDiscoveryV1Model.ml
  15. +4 −1 src/gapi/gapiDiscoveryV1Model.mli
  16. +1 −1  src/gapi/gapiDiscoveryV1Service.mli
  17. +962 −90 src/gapi/gapiDriveV2Model.ml
  18. +294 −0 src/gapi/gapiDriveV2Model.mli
  19. +358 −0 src/gapi/gapiDriveV2Service.ml
  20. +230 −6 src/gapi/gapiDriveV2Service.mli
  21. +4 −1 src/gapi/gapiOauth2V2Model.mli
  22. +2 −0  src/gapi/gapiOauth2V2Service.ml
  23. +8 −2 src/gapi/gapiOauth2V2Service.mli
  24. +260 −21 src/gapi/gapiPlusV1Model.ml
  25. +103 −18 src/gapi/gapiPlusV1Model.mli
  26. +9 −59 src/gapi/gapiPlusV1Service.ml
  27. +13 −46 src/gapi/gapiPlusV1Service.mli
  28. +0 −3  test_data/test_plus_person.json
View
1  examples/auth/oauth2Flow.ml
@@ -87,7 +87,6 @@ let main () =
~redirect_uri
~scope:[GapiCalendarV3Service.Scope.calendar;
GapiPlusV1Service.Scope.plus_me;
- GapiPlusV1Service.Scope.userinfo_email;
GapiTasksV1Service.Scope.tasks;
GapiUrlshortenerV1Service.Scope.urlshortener;
GapiAnalyticsV3Service.Scope.analytics_readonly;
View
1,135 src/gapi/gapiAnalyticsV3Model.ml
@@ -1756,7 +1756,7 @@ struct
end
-module Profile =
+module CustomDataSource =
struct
module ParentLink =
struct
@@ -1862,21 +1862,15 @@ struct
accountId : string;
childLink : ChildLink.t;
created : GapiDate.t;
- currency : string;
- defaultPage : string;
- excludeQueryParameters : string;
+ description : string;
id : string;
- internalWebPropertyId : string;
kind : string;
name : string;
parentLink : ParentLink.t;
+ profilesLinked : string list;
selfLink : string;
- siteSearchCategoryParameters : string;
- siteSearchQueryParameters : string;
- timezone : string;
updated : GapiDate.t;
webPropertyId : string;
- websiteUrl : string;
}
@@ -1892,26 +1886,14 @@ struct
GapiLens.get = (fun x -> x.created);
GapiLens.set = (fun v x -> { x with created = v });
}
- let currency = {
- GapiLens.get = (fun x -> x.currency);
- GapiLens.set = (fun v x -> { x with currency = v });
- }
- let defaultPage = {
- GapiLens.get = (fun x -> x.defaultPage);
- GapiLens.set = (fun v x -> { x with defaultPage = v });
- }
- let excludeQueryParameters = {
- GapiLens.get = (fun x -> x.excludeQueryParameters);
- GapiLens.set = (fun v x -> { x with excludeQueryParameters = v });
+ let description = {
+ GapiLens.get = (fun x -> x.description);
+ GapiLens.set = (fun v x -> { x with description = v });
}
let id = {
GapiLens.get = (fun x -> x.id);
GapiLens.set = (fun v x -> { x with id = v });
}
- let internalWebPropertyId = {
- GapiLens.get = (fun x -> x.internalWebPropertyId);
- GapiLens.set = (fun v x -> { x with internalWebPropertyId = v });
- }
let kind = {
GapiLens.get = (fun x -> x.kind);
GapiLens.set = (fun v x -> { x with kind = v });
@@ -1924,22 +1906,14 @@ struct
GapiLens.get = (fun x -> x.parentLink);
GapiLens.set = (fun v x -> { x with parentLink = v });
}
+ let profilesLinked = {
+ GapiLens.get = (fun x -> x.profilesLinked);
+ GapiLens.set = (fun v x -> { x with profilesLinked = v });
+ }
let selfLink = {
GapiLens.get = (fun x -> x.selfLink);
GapiLens.set = (fun v x -> { x with selfLink = v });
}
- let siteSearchCategoryParameters = {
- GapiLens.get = (fun x -> x.siteSearchCategoryParameters);
- GapiLens.set = (fun v x -> { x with siteSearchCategoryParameters = v });
- }
- let siteSearchQueryParameters = {
- GapiLens.get = (fun x -> x.siteSearchQueryParameters);
- GapiLens.set = (fun v x -> { x with siteSearchQueryParameters = v });
- }
- let timezone = {
- GapiLens.get = (fun x -> x.timezone);
- GapiLens.set = (fun v x -> { x with timezone = v });
- }
let updated = {
GapiLens.get = (fun x -> x.updated);
GapiLens.set = (fun v x -> { x with updated = v });
@@ -1948,30 +1922,20 @@ 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 = "";
childLink = ChildLink.empty;
created = GapiDate.epoch;
- currency = "";
- defaultPage = "";
- excludeQueryParameters = "";
+ description = "";
id = "";
- internalWebPropertyId = "";
kind = "";
name = "";
parentLink = ParentLink.empty;
+ profilesLinked = [];
selfLink = "";
- siteSearchCategoryParameters = "";
- siteSearchQueryParameters = "";
- timezone = "";
updated = GapiDate.epoch;
webPropertyId = "";
- websiteUrl = "";
}
@@ -1980,21 +1944,15 @@ struct
GapiJson.render_string_value "accountId" x.accountId;
(fun v -> GapiJson.render_object "childLink" (ChildLink.render_content v)) x.childLink;
GapiJson.render_date_value "created" x.created;
- GapiJson.render_string_value "currency" x.currency;
- GapiJson.render_string_value "defaultPage" x.defaultPage;
- GapiJson.render_string_value "excludeQueryParameters" x.excludeQueryParameters;
+ GapiJson.render_string_value "description" x.description;
GapiJson.render_string_value "id" x.id;
- GapiJson.render_string_value "internalWebPropertyId" x.internalWebPropertyId;
GapiJson.render_string_value "kind" x.kind;
GapiJson.render_string_value "name" x.name;
(fun v -> GapiJson.render_object "parentLink" (ParentLink.render_content v)) x.parentLink;
+ GapiJson.render_array "profilesLinked" (GapiJson.render_string_value "") x.profilesLinked;
GapiJson.render_string_value "selfLink" x.selfLink;
- GapiJson.render_string_value "siteSearchCategoryParameters" x.siteSearchCategoryParameters;
- GapiJson.render_string_value "siteSearchQueryParameters" x.siteSearchQueryParameters;
- 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 =
@@ -2018,33 +1976,775 @@ struct
Json_type.String v) ->
{ x with created = GapiDate.of_string v }
| GapiCore.AnnotatedTree.Leaf
- ({ GapiJson.name = "currency"; data_type = GapiJson.Scalar },
+ ({ GapiJson.name = "description"; data_type = GapiJson.Scalar },
Json_type.String v) ->
- { x with currency = v }
+ { x with description = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "id"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with id = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "kind"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with kind = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "name"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with name = v }
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = "parentLink"; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children
+ ParentLink.parse
+ ParentLink.empty
+ (fun v -> { x with parentLink = v })
+ cs
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = "profilesLinked"; 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.CustomDataSource.parse.parse_collection" e x')
+ ""
+ (fun v -> { x with profilesLinked = 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 = "updated"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with updated = GapiDate.of_string 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.CustomDataSource.parse" e x
+
+ let to_data_model = GapiJson.render_root render
+
+ let of_data_model = GapiJson.parse_root parse empty
+
+end
+
+module Profile =
+struct
+ module ParentLink =
+ struct
+ type t = {
+ href : string;
+ _type : string;
+
+ }
+
+ let href = {
+ GapiLens.get = (fun x -> x.href);
+ GapiLens.set = (fun v x -> { x with href = v });
+ }
+ let _type = {
+ GapiLens.get = (fun x -> x._type);
+ GapiLens.set = (fun v x -> { x with _type = v });
+ }
+
+ let empty = {
+ href = "";
+ _type = "";
+
+ }
+
+ let rec render_content x =
+ [
+ GapiJson.render_string_value "href" x.href;
+ GapiJson.render_string_value "type" x._type;
+
+ ]
+ and render x =
+ GapiJson.render_object "" (render_content x)
+
+ let rec parse x = function
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "href"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with href = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "type"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with _type = v }
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = ""; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children parse empty (fun x -> x) cs
+ | e ->
+ GapiJson.unexpected "GapiAnalyticsV3Model.ParentLink.parse" e x
+
+ end
+
+ module ChildLink =
+ struct
+ type t = {
+ href : string;
+ _type : string;
+
+ }
+
+ let href = {
+ GapiLens.get = (fun x -> x.href);
+ GapiLens.set = (fun v x -> { x with href = v });
+ }
+ let _type = {
+ GapiLens.get = (fun x -> x._type);
+ GapiLens.set = (fun v x -> { x with _type = v });
+ }
+
+ let empty = {
+ href = "";
+ _type = "";
+
+ }
+
+ let rec render_content x =
+ [
+ GapiJson.render_string_value "href" x.href;
+ GapiJson.render_string_value "type" x._type;
+
+ ]
+ and render x =
+ GapiJson.render_object "" (render_content x)
+
+ let rec parse x = function
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "href"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with href = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "type"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with _type = v }
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = ""; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children parse empty (fun x -> x) cs
+ | e ->
+ GapiJson.unexpected "GapiAnalyticsV3Model.ChildLink.parse" e x
+
+ end
+
+ type t = {
+ accountId : string;
+ childLink : ChildLink.t;
+ created : GapiDate.t;
+ currency : string;
+ defaultPage : string;
+ eCommerceTracking : bool;
+ excludeQueryParameters : string;
+ id : string;
+ internalWebPropertyId : string;
+ kind : string;
+ name : string;
+ parentLink : ParentLink.t;
+ selfLink : string;
+ siteSearchCategoryParameters : string;
+ siteSearchQueryParameters : string;
+ timezone : string;
+ updated : GapiDate.t;
+ webPropertyId : string;
+ websiteUrl : string;
+
+ }
+
+ let accountId = {
+ GapiLens.get = (fun x -> x.accountId);
+ GapiLens.set = (fun v x -> { x with accountId = v });
+ }
+ let childLink = {
+ GapiLens.get = (fun x -> x.childLink);
+ GapiLens.set = (fun v x -> { x with childLink = v });
+ }
+ let created = {
+ GapiLens.get = (fun x -> x.created);
+ GapiLens.set = (fun v x -> { x with created = v });
+ }
+ let currency = {
+ GapiLens.get = (fun x -> x.currency);
+ GapiLens.set = (fun v x -> { x with currency = v });
+ }
+ let defaultPage = {
+ GapiLens.get = (fun x -> x.defaultPage);
+ GapiLens.set = (fun v x -> { x with defaultPage = v });
+ }
+ let eCommerceTracking = {
+ GapiLens.get = (fun x -> x.eCommerceTracking);
+ GapiLens.set = (fun v x -> { x with eCommerceTracking = v });
+ }
+ let excludeQueryParameters = {
+ GapiLens.get = (fun x -> x.excludeQueryParameters);
+ GapiLens.set = (fun v x -> { x with excludeQueryParameters = v });
+ }
+ let id = {
+ GapiLens.get = (fun x -> x.id);
+ GapiLens.set = (fun v x -> { x with id = v });
+ }
+ let internalWebPropertyId = {
+ GapiLens.get = (fun x -> x.internalWebPropertyId);
+ GapiLens.set = (fun v x -> { x with internalWebPropertyId = v });
+ }
+ let kind = {
+ GapiLens.get = (fun x -> x.kind);
+ GapiLens.set = (fun v x -> { x with kind = v });
+ }
+ let name = {
+ GapiLens.get = (fun x -> x.name);
+ GapiLens.set = (fun v x -> { x with name = 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 siteSearchCategoryParameters = {
+ GapiLens.get = (fun x -> x.siteSearchCategoryParameters);
+ GapiLens.set = (fun v x -> { x with siteSearchCategoryParameters = v });
+ }
+ let siteSearchQueryParameters = {
+ GapiLens.get = (fun x -> x.siteSearchQueryParameters);
+ GapiLens.set = (fun v x -> { x with siteSearchQueryParameters = v });
+ }
+ let timezone = {
+ GapiLens.get = (fun x -> x.timezone);
+ GapiLens.set = (fun v x -> { x with timezone = v });
+ }
+ let updated = {
+ GapiLens.get = (fun x -> x.updated);
+ GapiLens.set = (fun v x -> { x with updated = v });
+ }
+ let webPropertyId = {
+ 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 = "";
+ childLink = ChildLink.empty;
+ created = GapiDate.epoch;
+ currency = "";
+ defaultPage = "";
+ eCommerceTracking = false;
+ excludeQueryParameters = "";
+ id = "";
+ internalWebPropertyId = "";
+ kind = "";
+ name = "";
+ parentLink = ParentLink.empty;
+ selfLink = "";
+ siteSearchCategoryParameters = "";
+ siteSearchQueryParameters = "";
+ timezone = "";
+ updated = GapiDate.epoch;
+ webPropertyId = "";
+ websiteUrl = "";
+
+ }
+
+ let rec render_content x =
+ [
+ GapiJson.render_string_value "accountId" x.accountId;
+ (fun v -> GapiJson.render_object "childLink" (ChildLink.render_content v)) x.childLink;
+ GapiJson.render_date_value "created" x.created;
+ GapiJson.render_string_value "currency" x.currency;
+ GapiJson.render_string_value "defaultPage" x.defaultPage;
+ GapiJson.render_bool_value "eCommerceTracking" x.eCommerceTracking;
+ GapiJson.render_string_value "excludeQueryParameters" x.excludeQueryParameters;
+ GapiJson.render_string_value "id" x.id;
+ GapiJson.render_string_value "internalWebPropertyId" x.internalWebPropertyId;
+ GapiJson.render_string_value "kind" x.kind;
+ GapiJson.render_string_value "name" x.name;
+ (fun v -> GapiJson.render_object "parentLink" (ParentLink.render_content v)) x.parentLink;
+ GapiJson.render_string_value "selfLink" x.selfLink;
+ GapiJson.render_string_value "siteSearchCategoryParameters" x.siteSearchCategoryParameters;
+ GapiJson.render_string_value "siteSearchQueryParameters" x.siteSearchQueryParameters;
+ 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 =
+ 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.Node
+ ({ GapiJson.name = "childLink"; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children
+ ChildLink.parse
+ ChildLink.empty
+ (fun v -> { x with childLink = v })
+ cs
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "created"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with created = GapiDate.of_string v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "currency"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with currency = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "defaultPage"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with defaultPage = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "eCommerceTracking"; data_type = GapiJson.Scalar },
+ Json_type.Bool v) ->
+ { x with eCommerceTracking = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "excludeQueryParameters"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with excludeQueryParameters = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "id"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with id = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "internalWebPropertyId"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with internalWebPropertyId = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "kind"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with kind = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "name"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with name = v }
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = "parentLink"; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children
+ ParentLink.parse
+ ParentLink.empty
+ (fun v -> { x with parentLink = 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 = "siteSearchCategoryParameters"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with siteSearchCategoryParameters = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "siteSearchQueryParameters"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with siteSearchQueryParameters = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "timezone"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with timezone = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "updated"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with updated = GapiDate.of_string v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ 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) ->
+ GapiJson.parse_children parse empty (fun x -> x) cs
+ | e ->
+ GapiJson.unexpected "GapiAnalyticsV3Model.Profile.parse" e x
+
+ let to_data_model = GapiJson.render_root render
+
+ let of_data_model = GapiJson.parse_root parse empty
+
+end
+
+module Profiles =
+struct
+ type t = {
+ items : Profile.t list;
+ itemsPerPage : int;
+ kind : string;
+ nextLink : string;
+ previousLink : string;
+ startIndex : int;
+ totalResults : int;
+ username : string;
+
+ }
+
+ let items = {
+ GapiLens.get = (fun x -> x.items);
+ GapiLens.set = (fun v x -> { x with items = 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 startIndex = {
+ GapiLens.get = (fun x -> x.startIndex);
+ GapiLens.set = (fun v x -> { x with startIndex = v });
+ }
+ let totalResults = {
+ GapiLens.get = (fun x -> x.totalResults);
+ GapiLens.set = (fun v x -> { x with totalResults = v });
+ }
+ let username = {
+ GapiLens.get = (fun x -> x.username);
+ GapiLens.set = (fun v x -> { x with username = v });
+ }
+
+ let empty = {
+ items = [];
+ itemsPerPage = 0;
+ kind = "";
+ nextLink = "";
+ previousLink = "";
+ startIndex = 0;
+ totalResults = 0;
+ username = "";
+
+ }
+
+ let rec render_content x =
+ [
+ GapiJson.render_array "items" Profile.render x.items;
+ 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;
+ GapiJson.render_int_value "startIndex" x.startIndex;
+ GapiJson.render_int_value "totalResults" x.totalResults;
+ GapiJson.render_string_value "username" x.username;
+
+ ]
+ and render x =
+ GapiJson.render_object "" (render_content x)
+
+ let rec parse x = function
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = "items"; data_type = GapiJson.Array },
+ cs) ->
+ GapiJson.parse_collection
+ (fun x' -> function
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = ""; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children
+ Profile.parse
+ Profile.empty
+ (fun v -> v)
+ cs
+ | e ->
+ GapiJson.unexpected "GapiAnalyticsV3Model.Profiles.parse.parse_collection" e x')
+ Profile.empty
+ (fun v -> { x with items = v })
+ cs
+ | 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.Leaf
+ ({ GapiJson.name = "startIndex"; data_type = GapiJson.Scalar },
+ Json_type.Int v) ->
+ { x with startIndex = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "totalResults"; data_type = GapiJson.Scalar },
+ Json_type.Int v) ->
+ { x with totalResults = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "username"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with username = v }
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = ""; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children parse empty (fun x -> x) cs
+ | e ->
+ GapiJson.unexpected "GapiAnalyticsV3Model.Profiles.parse" e x
+
+ let to_data_model = GapiJson.render_root render
+
+ let of_data_model = GapiJson.parse_root parse empty
+
+end
+
+module DailyUpload =
+struct
+ module RecentChanges =
+ struct
+ type t = {
+ change : string;
+ time : GapiDate.t;
+
+ }
+
+ let change = {
+ GapiLens.get = (fun x -> x.change);
+ GapiLens.set = (fun v x -> { x with change = v });
+ }
+ let time = {
+ GapiLens.get = (fun x -> x.time);
+ GapiLens.set = (fun v x -> { x with time = v });
+ }
+
+ let empty = {
+ change = "";
+ time = GapiDate.epoch;
+
+ }
+
+ let rec render_content x =
+ [
+ GapiJson.render_string_value "change" x.change;
+ GapiJson.render_date_value "time" x.time;
+
+ ]
+ and render x =
+ GapiJson.render_object "" (render_content x)
+
+ let rec parse x = function
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "change"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with change = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "time"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with time = GapiDate.of_string v }
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = ""; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children parse empty (fun x -> x) cs
+ | e ->
+ GapiJson.unexpected "GapiAnalyticsV3Model.RecentChanges.parse" e x
+
+ end
+
+ module ParentLink =
+ struct
+ type t = {
+ href : string;
+ _type : string;
+
+ }
+
+ let href = {
+ GapiLens.get = (fun x -> x.href);
+ GapiLens.set = (fun v x -> { x with href = v });
+ }
+ let _type = {
+ GapiLens.get = (fun x -> x._type);
+ GapiLens.set = (fun v x -> { x with _type = v });
+ }
+
+ let empty = {
+ href = "";
+ _type = "";
+
+ }
+
+ let rec render_content x =
+ [
+ GapiJson.render_string_value "href" x.href;
+ GapiJson.render_string_value "type" x._type;
+
+ ]
+ and render x =
+ GapiJson.render_object "" (render_content x)
+
+ let rec parse x = function
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "href"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with href = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "type"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with _type = v }
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = ""; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children parse empty (fun x -> x) cs
+ | e ->
+ GapiJson.unexpected "GapiAnalyticsV3Model.ParentLink.parse" e x
+
+ end
+
+ type t = {
+ accountId : string;
+ appendCount : int;
+ createdTime : GapiDate.t;
+ customDataSourceId : string;
+ date : string;
+ kind : string;
+ modifiedTime : GapiDate.t;
+ parentLink : ParentLink.t;
+ recentChanges : RecentChanges.t list;
+ selfLink : string;
+ webPropertyId : string;
+
+ }
+
+ let accountId = {
+ GapiLens.get = (fun x -> x.accountId);
+ GapiLens.set = (fun v x -> { x with accountId = v });
+ }
+ let appendCount = {
+ GapiLens.get = (fun x -> x.appendCount);
+ GapiLens.set = (fun v x -> { x with appendCount = v });
+ }
+ let createdTime = {
+ GapiLens.get = (fun x -> x.createdTime);
+ GapiLens.set = (fun v x -> { x with createdTime = v });
+ }
+ let customDataSourceId = {
+ GapiLens.get = (fun x -> x.customDataSourceId);
+ GapiLens.set = (fun v x -> { x with customDataSourceId = v });
+ }
+ let date = {
+ GapiLens.get = (fun x -> x.date);
+ GapiLens.set = (fun v x -> { x with date = v });
+ }
+ let kind = {
+ GapiLens.get = (fun x -> x.kind);
+ GapiLens.set = (fun v x -> { x with kind = v });
+ }
+ let modifiedTime = {
+ GapiLens.get = (fun x -> x.modifiedTime);
+ GapiLens.set = (fun v x -> { x with modifiedTime = v });
+ }
+ let parentLink = {
+ GapiLens.get = (fun x -> x.parentLink);
+ GapiLens.set = (fun v x -> { x with parentLink = v });
+ }
+ let recentChanges = {
+ GapiLens.get = (fun x -> x.recentChanges);
+ GapiLens.set = (fun v x -> { x with recentChanges = v });
+ }
+ let selfLink = {
+ GapiLens.get = (fun x -> x.selfLink);
+ GapiLens.set = (fun v x -> { x with selfLink = v });
+ }
+ let webPropertyId = {
+ GapiLens.get = (fun x -> x.webPropertyId);
+ GapiLens.set = (fun v x -> { x with webPropertyId = v });
+ }
+
+ let empty = {
+ accountId = "";
+ appendCount = 0;
+ createdTime = GapiDate.epoch;
+ customDataSourceId = "";
+ date = "";
+ kind = "";
+ modifiedTime = GapiDate.epoch;
+ parentLink = ParentLink.empty;
+ recentChanges = [];
+ selfLink = "";
+ webPropertyId = "";
+
+ }
+
+ let rec render_content x =
+ [
+ GapiJson.render_string_value "accountId" x.accountId;
+ GapiJson.render_int_value "appendCount" x.appendCount;
+ GapiJson.render_date_value "createdTime" x.createdTime;
+ GapiJson.render_string_value "customDataSourceId" x.customDataSourceId;
+ GapiJson.render_string_value "date" x.date;
+ GapiJson.render_string_value "kind" x.kind;
+ GapiJson.render_date_value "modifiedTime" x.modifiedTime;
+ (fun v -> GapiJson.render_object "parentLink" (ParentLink.render_content v)) x.parentLink;
+ GapiJson.render_array "recentChanges" RecentChanges.render x.recentChanges;
+ GapiJson.render_string_value "selfLink" x.selfLink;
+ 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 = "defaultPage"; data_type = GapiJson.Scalar },
+ ({ GapiJson.name = "accountId"; data_type = GapiJson.Scalar },
Json_type.String v) ->
- { x with defaultPage = v }
+ { x with accountId = v }
| GapiCore.AnnotatedTree.Leaf
- ({ GapiJson.name = "excludeQueryParameters"; data_type = GapiJson.Scalar },
+ ({ GapiJson.name = "appendCount"; data_type = GapiJson.Scalar },
+ Json_type.Int v) ->
+ { x with appendCount = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "createdTime"; data_type = GapiJson.Scalar },
Json_type.String v) ->
- { x with excludeQueryParameters = v }
+ { x with createdTime = GapiDate.of_string v }
| GapiCore.AnnotatedTree.Leaf
- ({ GapiJson.name = "id"; data_type = GapiJson.Scalar },
+ ({ GapiJson.name = "customDataSourceId"; data_type = GapiJson.Scalar },
Json_type.String v) ->
- { x with id = v }
+ { x with customDataSourceId = v }
| GapiCore.AnnotatedTree.Leaf
- ({ GapiJson.name = "internalWebPropertyId"; data_type = GapiJson.Scalar },
+ ({ GapiJson.name = "date"; data_type = GapiJson.Scalar },
Json_type.String v) ->
- { x with internalWebPropertyId = v }
+ { x with date = v }
| GapiCore.AnnotatedTree.Leaf
({ GapiJson.name = "kind"; data_type = GapiJson.Scalar },
Json_type.String v) ->
{ x with kind = v }
| GapiCore.AnnotatedTree.Leaf
- ({ GapiJson.name = "name"; data_type = GapiJson.Scalar },
+ ({ GapiJson.name = "modifiedTime"; data_type = GapiJson.Scalar },
Json_type.String v) ->
- { x with name = v }
+ { x with modifiedTime = GapiDate.of_string v }
| GapiCore.AnnotatedTree.Node
({ GapiJson.name = "parentLink"; data_type = GapiJson.Object },
cs) ->
@@ -2053,40 +2753,38 @@ struct
ParentLink.empty
(fun v -> { x with parentLink = v })
cs
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = "recentChanges"; data_type = GapiJson.Array },
+ cs) ->
+ GapiJson.parse_collection
+ (fun x' -> function
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = ""; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children
+ RecentChanges.parse
+ RecentChanges.empty
+ (fun v -> v)
+ cs
+ | e ->
+ GapiJson.unexpected "GapiAnalyticsV3Model.DailyUpload.parse.parse_collection" e x')
+ RecentChanges.empty
+ (fun v -> { x with recentChanges = 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 = "siteSearchCategoryParameters"; data_type = GapiJson.Scalar },
- Json_type.String v) ->
- { x with siteSearchCategoryParameters = v }
- | GapiCore.AnnotatedTree.Leaf
- ({ GapiJson.name = "siteSearchQueryParameters"; data_type = GapiJson.Scalar },
- Json_type.String v) ->
- { x with siteSearchQueryParameters = v }
- | GapiCore.AnnotatedTree.Leaf
- ({ GapiJson.name = "timezone"; data_type = GapiJson.Scalar },
- Json_type.String v) ->
- { x with timezone = v }
- | GapiCore.AnnotatedTree.Leaf
- ({ GapiJson.name = "updated"; data_type = GapiJson.Scalar },
- Json_type.String v) ->
- { x with updated = GapiDate.of_string v }
- | GapiCore.AnnotatedTree.Leaf
({ 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) ->
GapiJson.parse_children parse empty (fun x -> x) cs
| e ->
- GapiJson.unexpected "GapiAnalyticsV3Model.Profile.parse" e x
+ GapiJson.unexpected "GapiAnalyticsV3Model.DailyUpload.parse" e x
let to_data_model = GapiJson.render_root render
@@ -2094,10 +2792,10 @@ struct
end
-module Profiles =
+module DailyUploads =
struct
type t = {
- items : Profile.t list;
+ items : DailyUpload.t list;
itemsPerPage : int;
kind : string;
nextLink : string;
@@ -2155,7 +2853,7 @@ struct
let rec render_content x =
[
- GapiJson.render_array "items" Profile.render x.items;
+ GapiJson.render_array "items" DailyUpload.render x.items;
GapiJson.render_int_value "itemsPerPage" x.itemsPerPage;
GapiJson.render_string_value "kind" x.kind;
GapiJson.render_string_value "nextLink" x.nextLink;
@@ -2178,13 +2876,13 @@ struct
({ GapiJson.name = ""; data_type = GapiJson.Object },
cs) ->
GapiJson.parse_children
- Profile.parse
- Profile.empty
+ DailyUpload.parse
+ DailyUpload.empty
(fun v -> v)
cs
| e ->
- GapiJson.unexpected "GapiAnalyticsV3Model.Profiles.parse.parse_collection" e x')
- Profile.empty
+ GapiJson.unexpected "GapiAnalyticsV3Model.DailyUploads.parse.parse_collection" e x')
+ DailyUpload.empty
(fun v -> { x with items = v })
cs
| GapiCore.AnnotatedTree.Leaf
@@ -2220,7 +2918,7 @@ struct
cs) ->
GapiJson.parse_children parse empty (fun x -> x) cs
| e ->
- GapiJson.unexpected "GapiAnalyticsV3Model.Profiles.parse" e x
+ GapiJson.unexpected "GapiAnalyticsV3Model.DailyUploads.parse" e x
let to_data_model = GapiJson.render_root render
@@ -2525,6 +3223,115 @@ struct
end
+module DailyUploadAppend =
+struct
+ type t = {
+ accountId : string;
+ appendNumber : int;
+ customDataSourceId : string;
+ date : string;
+ kind : string;
+ nextAppendLink : string;
+ webPropertyId : string;
+
+ }
+
+ let accountId = {
+ GapiLens.get = (fun x -> x.accountId);
+ GapiLens.set = (fun v x -> { x with accountId = v });
+ }
+ let appendNumber = {
+ GapiLens.get = (fun x -> x.appendNumber);
+ GapiLens.set = (fun v x -> { x with appendNumber = v });
+ }
+ let customDataSourceId = {
+ GapiLens.get = (fun x -> x.customDataSourceId);
+ GapiLens.set = (fun v x -> { x with customDataSourceId = v });
+ }
+ let date = {
+ GapiLens.get = (fun x -> x.date);
+ GapiLens.set = (fun v x -> { x with date = v });
+ }
+ let kind = {
+ GapiLens.get = (fun x -> x.kind);
+ GapiLens.set = (fun v x -> { x with kind = v });
+ }
+ let nextAppendLink = {
+ GapiLens.get = (fun x -> x.nextAppendLink);
+ GapiLens.set = (fun v x -> { x with nextAppendLink = v });
+ }
+ let webPropertyId = {
+ GapiLens.get = (fun x -> x.webPropertyId);
+ GapiLens.set = (fun v x -> { x with webPropertyId = v });
+ }
+
+ let empty = {
+ accountId = "";
+ appendNumber = 0;
+ customDataSourceId = "";
+ date = "";
+ kind = "";
+ nextAppendLink = "";
+ webPropertyId = "";
+
+ }
+
+ let rec render_content x =
+ [
+ GapiJson.render_string_value "accountId" x.accountId;
+ GapiJson.render_int_value "appendNumber" x.appendNumber;
+ GapiJson.render_string_value "customDataSourceId" x.customDataSourceId;
+ GapiJson.render_string_value "date" x.date;
+ GapiJson.render_string_value "kind" x.kind;
+ GapiJson.render_string_value "nextAppendLink" x.nextAppendLink;
+ 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 = "appendNumber"; data_type = GapiJson.Scalar },
+ Json_type.Int v) ->
+ { x with appendNumber = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "customDataSourceId"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with customDataSourceId = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "date"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with date = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "kind"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with kind = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "nextAppendLink"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with nextAppendLink = 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.DailyUploadAppend.parse" e x
+
+ let to_data_model = GapiJson.render_root render
+
+ let of_data_model = GapiJson.parse_root parse empty
+
+end
+
module Segments =
struct
type t = {
@@ -3317,6 +4124,140 @@ struct
end
+module CustomDataSources =
+struct
+ type t = {
+ items : CustomDataSource.t list;
+ itemsPerPage : int;
+ kind : string;
+ nextLink : string;
+ previousLink : string;
+ startIndex : int;
+ totalResults : int;
+ username : string;
+
+ }
+
+ let items = {
+ GapiLens.get = (fun x -> x.items);
+ GapiLens.set = (fun v x -> { x with items = 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 startIndex = {
+ GapiLens.get = (fun x -> x.startIndex);
+ GapiLens.set = (fun v x -> { x with startIndex = v });
+ }
+ let totalResults = {
+ GapiLens.get = (fun x -> x.totalResults);
+ GapiLens.set = (fun v x -> { x with totalResults = v });
+ }
+ let username = {
+ GapiLens.get = (fun x -> x.username);
+ GapiLens.set = (fun v x -> { x with username = v });
+ }
+
+ let empty = {
+ items = [];
+ itemsPerPage = 0;
+ kind = "";
+ nextLink = "";
+ previousLink = "";
+ startIndex = 0;
+ totalResults = 0;
+ username = "";
+
+ }
+
+ let rec render_content x =
+ [
+ GapiJson.render_array "items" CustomDataSource.render x.items;
+ 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;
+ GapiJson.render_int_value "startIndex" x.startIndex;
+ GapiJson.render_int_value "totalResults" x.totalResults;
+ GapiJson.render_string_value "username" x.username;
+
+ ]
+ and render x =
+ GapiJson.render_object "" (render_content x)
+
+ let rec parse x = function
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = "items"; data_type = GapiJson.Array },
+ cs) ->
+ GapiJson.parse_collection
+ (fun x' -> function
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = ""; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children
+ CustomDataSource.parse
+ CustomDataSource.empty
+ (fun v -> v)
+ cs
+ | e ->
+ GapiJson.unexpected "GapiAnalyticsV3Model.CustomDataSources.parse.parse_collection" e x')
+ CustomDataSource.empty
+ (fun v -> { x with items = v })
+ cs
+ | 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.Leaf
+ ({ GapiJson.name = "startIndex"; data_type = GapiJson.Scalar },
+ Json_type.Int v) ->
+ { x with startIndex = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "totalResults"; data_type = GapiJson.Scalar },
+ Json_type.Int v) ->
+ { x with totalResults = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "username"; data_type = GapiJson.Scalar },
+ Json_type.String v) ->
+ { x with username = v }
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = ""; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children parse empty (fun x -> x) cs
+ | e ->
+ GapiJson.unexpected "GapiAnalyticsV3Model.CustomDataSources.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
334 src/gapi/gapiAnalyticsV3Model.mli
@@ -3,7 +3,7 @@
(** Data definition for Google Analytics API (v3).
For more information about this data model, see the
- {{:http://code.google.com/apis/analytics}API Documentation}.
+ {{:https://developers.google.com/analytics/}API Documentation}.
*)
module Goal :
@@ -253,7 +253,7 @@ sig
items : Goal.t list;
(** A list of goals. *)
itemsPerPage : int;
- (** The maximum number of resources the response can contain, regardless of the actual number of resources 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. *)
+ (** The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. *)
kind : string;
(** Collection type. *)
nextLink : string;
@@ -587,6 +587,103 @@ sig
end
+module CustomDataSource :
+sig
+ module ParentLink :
+ sig
+ type t = {
+ href : string;
+ (** Link to the web property to which this custom data source belongs. *)
+ _type : string;
+ (** Value is "analytics#webproperty". *)
+
+ }
+
+ val href : (t, string) GapiLens.t
+ val _type : (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 ChildLink :
+ sig
+ type t = {
+ href : string;
+ (** Link to the list of daily uploads for this custom data source. *)
+ _type : string;
+ (** Value is "analytics#dailyUploads". *)
+
+ }
+
+ val href : (t, string) GapiLens.t
+ val _type : (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 = {
+ accountId : string;
+ (** Account ID to which this custom data source belongs. *)
+ childLink : ChildLink.t;
+ (** Child link for this custom data source. Points to the list of daily uploads for this custom data source. *)
+ created : GapiDate.t;
+ (** Time this custom data source was created. *)
+ description : string;
+ (** Description of custom data source. *)
+ id : string;
+ (** Custom data source ID. *)
+ kind : string;
+ (** Resource type for Analytics custom data source. *)
+ name : string;
+ (** Name of this custom data source. *)
+ parentLink : ParentLink.t;
+ (** Parent link for this custom data source. Points to the web property to which this custom data source belongs. *)
+ profilesLinked : string list;
+ (** *)
+ selfLink : string;
+ (** Link for this Analytics custom data source. *)
+ updated : GapiDate.t;
+ (** Time this custom data source was last modified. *)
+ webPropertyId : string;
+ (** Web property ID of the form UA-XXXXX-YY to which this custom data source belongs. *)
+
+ }
+
+ val accountId : (t, string) GapiLens.t
+ val childLink : (t, ChildLink.t) GapiLens.t
+ val created : (t, GapiDate.t) GapiLens.t
+ val description : (t, string) GapiLens.t
+ val id : (t, string) GapiLens.t
+ val kind : (t, string) GapiLens.t
+ val name : (t, string) GapiLens.t
+ val parentLink : (t, ParentLink.t) GapiLens.t
+ val profilesLinked : (t, string list) GapiLens.t
+ val selfLink : (t, string) GapiLens.t
+ val updated : (t, GapiDate.t) 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
+
+ val to_data_model : t -> GapiJson.json_data_model
+
+ val of_data_model : GapiJson.json_data_model -> t
+
+end
+
module Profile :
sig
module ParentLink :
@@ -642,6 +739,8 @@ sig
(** The currency type associated with this profile. *)
defaultPage : string;
(** Default page for this profile. *)
+ eCommerceTracking : bool;
+ (** E-commerce tracking parameter for this profile. *)
excludeQueryParameters : string;
(** The query parameters that are excluded from this profile. *)
id : string;
@@ -676,6 +775,7 @@ sig
val created : (t, GapiDate.t) GapiLens.t
val currency : (t, string) GapiLens.t
val defaultPage : (t, string) GapiLens.t
+ val eCommerceTracking : (t, bool) GapiLens.t
val excludeQueryParameters : (t, string) GapiLens.t
val id : (t, string) GapiLens.t
val internalWebPropertyId : (t, string) GapiLens.t
@@ -708,7 +808,7 @@ sig
items : Profile.t list;
(** A list of profiles. *)
itemsPerPage : int;
- (** The maximum number of resources the response can contain, regardless of the actual number of resources 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. *)
+ (** The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. *)
kind : string;
(** Collection type. *)
nextLink : string;
@@ -745,13 +845,150 @@ sig
end
+module DailyUpload :
+sig
+ module RecentChanges :
+ sig
+ type t = {
+ change : string;
+ (** *)
+ time : GapiDate.t;
+ (** *)
+
+ }
+
+ val change : (t, string) GapiLens.t
+ val time : (t, GapiDate.t) GapiLens.t
+
+ val empty : t
+
+ val render : t -> GapiJson.json_data_model list
+
+ val parse : t -> GapiJson.json_data_model -> t
+
+ end
+
+ module ParentLink :
+ sig
+ type t = {
+ href : string;
+ (** Link to the custom data source to which this daily upload belongs. *)
+ _type : string;
+ (** Value is "analytics#customDataSource". *)
+
+ }
+
+ val href : (t, string) GapiLens.t
+ val _type : (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 = {
+ accountId : string;
+ (** Account ID to which this daily upload belongs. *)
+ appendCount : int;
+ (** Number of appends for this date. *)
+ createdTime : GapiDate.t;
+ (** Time this daily upload was created. *)
+ customDataSourceId : string;
+ (** Custom data source ID to which this daily upload belongs. *)
+ date : string;
+ (** Date associated with daily upload. *)
+ kind : string;
+ (** Resource type for Analytics daily upload. *)
+ modifiedTime : GapiDate.t;
+ (** Time this daily upload was last modified. *)
+ parentLink : ParentLink.t;
+ (** Parent link for a daily upload. Points to the custom data source to which this daily upload belongs. *)
+ recentChanges : RecentChanges.t list;
+ (** Change log for last 10 changes in chronological order. *)
+ selfLink : string;
+ (** Link for this daily upload. *)
+ webPropertyId : string;
+ (** Web property ID of the form UA-XXXXX-YY to which this daily upload belongs. *)
+
+ }
+
+ val accountId : (t, string) GapiLens.t
+ val appendCount : (t, int) GapiLens.t
+ val createdTime : (t, GapiDate.t) GapiLens.t
+ val customDataSourceId : (t, string) GapiLens.t
+ val date : (t, string) GapiLens.t
+ val kind : (t, string) GapiLens.t
+ val modifiedTime : (t, GapiDate.t) GapiLens.t
+ val parentLink : (t, ParentLink.t) GapiLens.t
+ val recentChanges : (t, RecentChanges.t list) GapiLens.t
+ val selfLink : (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
+
+ val to_data_model : t -> GapiJson.json_data_model
+
+ val of_data_model : GapiJson.json_data_model -> t
+
+end
+
+module DailyUploads :
+sig
+ type t = {
+ items : DailyUpload.t list;
+ (** A collection of daily uploads. *)
+ itemsPerPage : int;
+ (** The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. *)
+ kind : string;
+ (** Collection type. Value is analytics#dailyUploads. *)
+ nextLink : string;
+ (** Link to next page for this daily upload collection. *)
+ previousLink : string;
+ (** Link to previous page for this daily upload collection. *)
+ startIndex : int;
+ (** The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. *)
+ totalResults : int;
+ (** The total number of results for the query, regardless of the number of results in the response. *)
+ username : string;
+ (** Email ID of the authenticated user *)
+
+ }
+
+ val items : (t, DailyUpload.t list) 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 startIndex : (t, int) GapiLens.t
+ val totalResults : (t, int) GapiLens.t
+ val username : (t, string) 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 Webproperties :
sig
type t = {
items : Webproperty.t list;
(** A list of web properties. *)
itemsPerPage : int;
- (** The maximum number of resources the response can contain, regardless of the actual number of resources 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. *)
+ (** The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. *)
kind : string;
(** Collection type. *)
nextLink : string;
@@ -849,13 +1086,53 @@ sig
end
+module DailyUploadAppend :
+sig
+ type t = {
+ accountId : string;
+ (** Account Id to which this daily upload append belongs. *)
+ appendNumber : int;
+ (** Append number. *)
+ customDataSourceId : string;
+ (** Custom data source Id to which this daily upload append belongs. *)
+ date : string;
+ (** Date associated with daily upload append. *)
+ kind : string;
+ (** Resource type for Analytics daily upload append. *)
+ nextAppendLink : string;
+ (** *)
+ webPropertyId : string;
+ (** Web property Id of the form UA-XXXXX-YY to which this daily upload append belongs. *)
+
+ }
+
+ val accountId : (t, string) GapiLens.t
+ val appendNumber : (t, int) GapiLens.t
+ val customDataSourceId : (t, string) GapiLens.t
+ val date : (t, string) GapiLens.t
+ val kind : (t, string) GapiLens.t
+ val nextAppendLink : (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
+
+ val to_data_model : t -> GapiJson.json_data_model
+
+ val of_data_model : GapiJson.json_data_model -> t
+
+end
+
module Segments :
sig
type t = {
items : Segment.t list;
(** A list of advanced segments. *)
itemsPerPage : int;
- (** The maximum number of resources the response can contain, regardless of the actual number of resources 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. *)
+ (** The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. *)
kind : string;
(** Collection type for advanced segments. *)
nextLink : string;
@@ -921,7 +1198,7 @@ sig
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. *)
+ (** A primitive dimension value. A primitive metric value. *)
}
@@ -1094,13 +1371,56 @@ sig
end
+module CustomDataSources :
+sig
+ type t = {
+ items : CustomDataSource.t list;
+ (** Collection of custom data sources. *)
+ itemsPerPage : int;
+ (** The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. *)
+ kind : string;
+ (** Collection type. *)
+ nextLink : string;
+ (** Link to next page for this custom data source collection. *)
+ previousLink : string;
+ (** Link to previous page for this custom data source collection. *)
+ startIndex : int;
+ (** The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter. *)
+ totalResults : int;
+ (** The total number of results for the query, regardless of the number of results in the response. *)
+ username : string;
+ (** Email ID of the authenticated user *)
+
+ }
+
+ val items : (t, CustomDataSource.t list) 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 startIndex : (t, int) GapiLens.t
+ val totalResults : (t, int) GapiLens.t
+ val username : (t, string) 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 = {
items : Account.t list;
(** A list of accounts. *)
itemsPerPage : int;
- (** The maximum number of entries the response can contain, regardless of the actual number of entries 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. *)
+ (** The maximum number of entries the response can contain, regardless of the actual number of entries returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. *)
kind : string;
(** Collection type. *)
nextLink : string;
View
264 src/gapi/gapiAnalyticsV3Service.ml
@@ -345,6 +345,270 @@ struct
end
+ module CustomDataSources =
+ struct
+ module CustomDataSourcesParameters =
+ struct
+ type t = {
+ (* Standard query parameters *)
+ fields : string;
+ prettyPrint : bool;
+ quotaUser : string;
+ userIp : string;
+ key : string;
+ (* customDataSources-specific query parameters *)
+ max_results : int;
+ start_index : int;
+
+ }
+
+ let default = {
+ fields = "";
+ prettyPrint = true;
+ quotaUser = "";
+ userIp = "";
+ key = "";
+ max_results = 0;
+ 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.max_results) string_of_int "max-results";
+ param (fun p -> p.start_index) string_of_int "start-index";
+
+ ] |> List.concat
+
+ let merge_parameters
+ ?(standard_parameters = GapiService.StandardParameters.default)
+ ?(max_results = default.max_results)
+ ?(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;
+ max_results;
+ start_index;
+
+ } in
+ if parameters = default then None else Some parameters
+
+ end
+
+ let list
+ ?(base_url = "https://www.googleapis.com/analytics/v3/")
+ ?std_params
+ ?max_results
+ ?start_index
+ ~accountId
+ ~webPropertyId
+ session =
+ let full_url = GapiUtils.add_path_to_url ["management"; "accounts";
+ ((fun x -> x) accountId); "webproperties";
+ ((fun x -> x) webPropertyId); "customDataSources"] base_url in
+ let params = CustomDataSourcesParameters.merge_parameters
+ ?standard_parameters:std_params ?max_results ?start_index () in
+ let query_parameters = Option.map
+ CustomDataSourcesParameters.to_key_value_list params in
+ GapiService.get ?query_parameters full_url
+ (GapiJson.parse_json_response CustomDataSources.of_data_model)
+ session
+
+
+ end
+
+ module DailyUploads =
+ struct
+ module Type =
+ struct
+ type t =
+ | Default
+ | Cost
+
+ let to_string = function
+ | Default -> ""
+ | Cost -> "cost"
+
+ let of_string = function
+ | "" -> Default
+ | "cost" -> Cost
+ | s -> failwith ("Unexpected value for Type:" ^ s)
+
+ end
+
+ module DailyUploadsParameters =
+ struct
+ type t = {
+ (* Standard query parameters *)
+ fields : string;
+ prettyPrint : bool;
+ quotaUser : string;
+ userIp : string;
+ key : string;
+ (* dailyUploads-specific query parameters *)
+ appendNumber : int;
+ end_date : string;
+ max_results : int;
+ reset : bool;
+ start_date : string;
+ start_index : int;
+ _type : Type.t;
+
+ }
+
+ let default = {
+ fields = "";
+ prettyPrint = true;
+ quotaUser = "";
+ userIp = "";
+ key = "";
+ appendNumber = 0;
+ end_date = "";
+ max_results = 0;
+ reset = false;
+ start_date = "";
+ start_index = 0;
+ _type = Type.Default;
+
+ }
+
+ 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.appendNumber) string_of_int "appendNumber";
+ param (fun p -> p.end_date) (fun x -> x) "end-date";
+ param (fun p -> p.max_results) string_of_int "max-results";
+ param (fun p -> p.reset) string_of_bool "reset";
+ param (fun p -> p.start_date) (fun x -> x) "start-date";
+ param (fun p -> p.start_index) string_of_int "start-index";
+ param (fun p -> p._type) Type.to_string "type";
+
+ ] |> List.concat
+
+ let merge_parameters
+ ?(standard_parameters = GapiService.StandardParameters.default)
+ ?(appendNumber = default.appendNumber)
+ ?(end_date = default.end_date)
+ ?(max_results = default.max_results)
+ ?(reset = default.reset)
+ ?(start_date = default.start_date)
+ ?(start_index = default.start_index)
+ ?(_type = default._type)
+ () =
+ 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;
+ appendNumber;
+ end_date;
+ max_results;
+ reset;
+ start_date;
+ start_index;
+ _type;
+
+ } in
+ if parameters = default then None else Some parameters
+
+ end
+
+ let delete
+ ?(base_url = "https://www.googleapis.com/analytics/v3/")
+ ?std_params
+ ~accountId
+ ~webPropertyId
+ ~customDataSourceId
+ ~date
+ ~_type
+ session =
+ let full_url = GapiUtils.add_path_to_url ["management"; "accounts";
+ ((fun x -> x) accountId); "webproperties";
+ ((fun x -> x) webPropertyId); "customDataSources";
+ ((fun x -> x) customDataSourceId); "dailyUploads";
+ ((fun x -> x) date)] base_url in
+ let params = DailyUploadsParameters.merge_parameters
+ ?standard_parameters:std_params ~_type () in
+ let query_parameters = Option.map
+ DailyUploadsParameters.to_key_value_list params in
+ GapiService.delete ?query_parameters full_url
+ GapiRequest.parse_empty_response session
+
+ let list
+ ?(base_url = "https://www.googleapis.com/analytics/v3/")
+ ?std_params
+ ?max_results
+ ?start_index
+ ~accountId
+ ~webPropertyId
+ ~customDataSourceId
+ ~start_date
+ ~end_date
+ session =
+ let full_url = GapiUtils.add_path_to_url ["management"; "accounts";
+ ((fun x -> x) accountId); "webproperties";
+ ((fun x -> x) webPropertyId); "customDataSources";
+ ((fun x -> x) customDataSourceId); "dailyUploads"] base_url in
+ let params = DailyUploadsParameters.merge_parameters
+ ?standard_parameters:std_params ~end_date ?max_results ~start_date
+ ?start_index () in
+ let query_parameters = Option.map
+ DailyUploadsParameters.to_key_value_list params in
+ GapiService.get ?query_parameters full_url
+ (GapiJson.parse_json_response DailyUploads.of_data_model) session
+
+ let upload
+ ?(base_url = "https://www.googleapis.com/analytics/v3/")
+ ?std_params
+ ?media_source
+ ?(reset = false)
+ ~accountId
+ ~webPropertyId
+ ~customDataSourceId
+ ~date
+ ~appendNumber
+ ~_type
+ session =
+ let base_path = ["management"; "accounts"; ((fun x -> x) accountId);
+ "webproperties"; ((fun x -> x) webPropertyId); "customDataSources";
+ ((fun x -> x) customDataSourceId); "dailyUploads";
+ ((fun x -> x) date); "uploads"] in
+ let media_path = [""; "resumable"; "upload"; "analytics"; "v3";
+ "management"; "accounts"; ((fun x -> x) accountId); "webproperties";
+ ((fun x -> x) webPropertyId); "customDataSources";
+ ((fun x -> x) customDataSourceId); "dailyUploads";
+ ((fun x -> x) date); "uploads"] in
+ let path_to_add = if Option.is_some media_source then media_path
+ else base_path in
+ let full_url = GapiUtils.add_path_to_url path_to_add base_url in
+ let params = DailyUploadsParameters.merge_parameters
+ ?standard_parameters:std_params ~appendNumber ~reset ~_type () in
+ let query_parameters = Option.map
+ DailyUploadsParameters.to_key_value_list params in
+ GapiService.post ?query_parameters ?media_source
+ ~data:DailyUploadAppend.empty full_url
+ (GapiJson.parse_json_response DailyUploadAppend.of_data_model)
+ session
+
+
+ end
+
module Goals =
struct
module GoalsParameters =
View
117 src/gapi/gapiAnalyticsV3Service.mli
@@ -5,7 +5,7 @@
View and manage your Google Analytics data.
For more information about this service, see the
- {{:http://code.google.com/apis/analytics}API Documentation}.
+ {{:https://developers.google.com/analytics/}API Documentation}.
*)
module Scope :
@@ -200,6 +200,121 @@ sig
end
+ module DailyUploads :
+ sig
+
+ module Type :
+ sig
+ type t =
+ | Default
+ | Cost
+
+ val to_string : t -> string
+
+ val of_string : string -> t
+
+ end
+
+ (** Delete uploaded data for the given date.
+
+ @param base_url Service endpoint base URL (defaults to ["https://www.googleapis.com/analytics/v3/"]).
+ @param std_params Optional standard parameters.
+ @param accountId Account Id associated with daily upload delete.
+ @param webPropertyId Web property Id associated with daily upload delete.
+ @param customDataSourceId Custom data source Id associated with daily upload delete.
+ @param date Date for which data is to be deleted. Date should be formatted as YYYY-MM-DD.
+ @param _type Type of data for this delete.
+ *)
+ val delete :
+ ?base_url:string ->
+ ?std_params:GapiService.StandardParameters.t ->
+ accountId:string ->
+ webPropertyId:string ->
+ customDataSourceId:string ->
+ date:string ->
+ _type:Type.t ->
+ GapiConversation.Session.t ->
+ unit * GapiConversation.Session.t
+
+ (** List daily uploads to which the user has access.
+
+ @param base_url Service endpoint base URL (defaults to ["https://www.googleapis.com/analytics/v3/"]).
+ @param std_params Optional standard parameters.
+ @param max_results The maximum number of custom data sources to include in this response.
+ @param start_index A 1-based index of the first daily upload to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
+ @param accountId Account Id for the daily uploads to retrieve.
+ @param webPropertyId Web property Id for the daily uploads to retrieve.
+ @param customDataSourceId Custom data source Id for daily uploads to retrieve.
+ @param start_date Start date of the form YYYY-MM-DD.
+ @param end_date End date of the form YYYY-MM-DD.
+ *)
+ val list :
+ ?base_url:string ->
+ ?std_params:GapiService.StandardParameters.t ->
+ ?max_results:int ->
+ ?start_index:int ->
+ accountId:string ->
+ webPropertyId:string ->
+ customDataSourceId:string ->
+ start_date:string ->
+ end_date:string ->
+ GapiConversation.Session.t ->
+ GapiAnalyticsV3Model.DailyUploads.t * GapiConversation.Session.t
+
+ (** Update/Overwrite data for a custom data source.
+
+ @param base_url Service endpoint base URL (defaults to ["https://www.googleapis.com/analytics/v3/"]).
+ @param std_params Optional standard parameters.
+ @param reset Reset/Overwrite all previous appends for this date and start over with this file as the first upload.
+ @param accountId Account Id associated with daily upload.
+ @param webPropertyId Web property Id associated with daily upload.
+ @param customDataSourceId Custom data source Id to which the data being uploaded belongs.
+ @param date Date for which data is uploaded. Date should be formatted as YYYY-MM-DD.
+ @param appendNumber Append number for this upload indexed from 1.
+ @param _type Type of data for this upload.
+ *)
+ val upload :
+ ?base_url:string ->
+ ?std_params:GapiService.StandardParameters.t ->
+ ?media_source:GapiMediaResource.t ->
+ ?reset:bool ->
+ accountId:string ->
+ webPropertyId:string ->
+ customDataSourceId:string ->
+ date:string ->
+ appendNumber:int ->
+ _type:Type.t ->
+ GapiConversation.Session.t ->
+ GapiAnalyticsV3Model.DailyUploadAppend.t * GapiConversation.Session.t
+
+
+ end
+
+ module CustomDataSources :
+ sig
+
+ (** List custom data sources to which the user has access.
+
+ @param base_url Service endpoint base URL (defaults to ["https://www.googleapis.com/analytics/v3/"]).
+ @param std_params Optional standard parameters.
+ @param max_results The maximum number of custom data sources to include in this response.
+ @param start_index A 1-based index of the first custom data source to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
+ @param accountId Account Id for the custom data sources to retrieve.
+ @param webPropertyId Web property Id for the custom data sources to retrieve.
+ *)
+ val list :
+ ?base_url:string ->
+ ?std_params:GapiService.StandardParameters.t ->
+ ?max_results:int ->
+ ?start_index:int ->
+ accountId:string ->
+ webPropertyId:string ->
+ GapiConversation.Session.t ->
+ GapiAnalyticsV3Model.CustomDataSources.t * GapiConversation.Session.t
+
+
+ end
+
module Accounts :
sig
View
259 src/gapi/gapiBigqueryV2Model.ml
@@ -314,49 +314,53 @@ struct
end
-module TableRow =
+module TableCell =
struct
- module F =
- struct
- type t = {
- v : string;
-
- }
+ type t = {
+ v : string;
- let v = {
- GapiLens.get = (fun x -> x.v);
- GapiLens.set = (fun v x -> { x with v = v });
- }
+ }
+
+ let v = {
+ GapiLens.get = (fun x -> x.v);
+ GapiLens.set = (fun v x -> { x with v = v });
+ }
+
+ let empty = {
+ v = "";
- let empty = {
- v = "";
+ }
+
+ let rec render_content x =
+ [
+ GapiJson.render_string_value "v" x.v;
- }
-
- let rec render_content x =
- [
- GapiJson.render_string_value "v" x.v;
-
- ]
- and render x =
- GapiJson.render_object "" (render_content x)
-
- let rec parse x = function
- | GapiCore.AnnotatedTree.Leaf
- ({ GapiJson.name = "v"; data_type = GapiJson.Scalar },
- Json_type.String v) ->
- { x with v = v }
- | GapiCore.AnnotatedTree.Node
- ({ GapiJson.name = ""; data_type = GapiJson.Object },
- cs) ->