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 ca6b75382f2ff3f4340d2304a27fe6f9b1ccea4f 1 parent 68283de
@astrada authored
Showing with 2,940 additions and 386 deletions.
  1. +659 −0 src/gapi/gapiAnalyticsV3Model.ml
  2. +210 −4 src/gapi/gapiAnalyticsV3Model.mli
  3. +187 −0 src/gapi/gapiAnalyticsV3Service.ml
  4. +125 −0 src/gapi/gapiAnalyticsV3Service.mli
  5. +341 −192 src/gapi/gapiBigqueryV2Model.ml
  6. +121 −84 src/gapi/gapiBigqueryV2Model.mli
  7. +5 −2 src/gapi/gapiBigqueryV2Service.ml
  8. +5 −0 src/gapi/gapiBigqueryV2Service.mli
  9. +65 −0 src/gapi/gapiCalendarV3Model.ml
  10. +25 −1 src/gapi/gapiCalendarV3Model.mli
  11. +1 −1  src/gapi/gapiCalendarV3Service.mli
  12. +33 −0 src/gapi/gapiDiscoveryV1Model.ml
  13. +18 −9 src/gapi/gapiDiscoveryV1Model.mli
  14. +1 −30 src/gapi/gapiDiscoveryV1Service.ml
  15. +1 −17 src/gapi/gapiDiscoveryV1Service.mli
  16. +330 −0 src/gapi/gapiDriveV2Model.ml
  17. +105 −1 src/gapi/gapiDriveV2Model.mli
  18. +174 −2 src/gapi/gapiDriveV2Service.ml
  19. +112 −0 src/gapi/gapiDriveV2Service.mli
  20. +2 −0  src/gapi/gapiOauth2V2Service.ml
  21. +3 −0  src/gapi/gapiOauth2V2Service.mli
  22. +87 −0 src/gapi/gapiPagespeedonlineV1Model.ml
  23. +30 −0 src/gapi/gapiPagespeedonlineV1Model.mli
  24. +8 −1 src/gapi/gapiPagespeedonlineV1Service.ml
  25. +2 −0  src/gapi/gapiPagespeedonlineV1Service.mli
  26. +205 −20 src/gapi/gapiPlusV1Model.ml
  27. +80 −10 src/gapi/gapiPlusV1Model.mli
  28. +1 −1  src/gapi/gapiPlusV1Service.ml
  29. +1 −1  src/gapi/gapiSiteVerificationV1Model.mli
  30. +1 −1  src/gapi/gapiSiteVerificationV1Service.mli
  31. +1 −1  src/gapi/gapiTasksV1Model.mli
  32. +1 −1  src/gapi/gapiTasksV1Service.mli
  33. +0 −5 test_data/test_bigquery_job.json
  34. +0 −2  test_data/test_plus_person.json
View
659 src/gapi/gapiAnalyticsV3Model.ml
@@ -1602,10 +1602,13 @@ struct
childLink : ChildLink.t;
created : GapiDate.t;
id : string;
+ industryVertical : string;
internalWebPropertyId : string;
kind : string;
+ level : string;
name : string;
parentLink : ParentLink.t;
+ profileCount : int;
selfLink : string;
updated : GapiDate.t;
websiteUrl : string;
@@ -1628,6 +1631,10 @@ struct
GapiLens.get = (fun x -> x.id);
GapiLens.set = (fun v x -> { x with id = v });
}
+ let industryVertical = {
+ GapiLens.get = (fun x -> x.industryVertical);
+ GapiLens.set = (fun v x -> { x with industryVertical = v });
+ }
let internalWebPropertyId = {
GapiLens.get = (fun x -> x.internalWebPropertyId);
GapiLens.set = (fun v x -> { x with internalWebPropertyId = v });
@@ -1636,6 +1643,10 @@ struct
GapiLens.get = (fun x -> x.kind);
GapiLens.set = (fun v x -> { x with kind = v });
}
+ let level = {
+ GapiLens.get = (fun x -> x.level);
+ GapiLens.set = (fun v x -> { x with level = v });
+ }
let name = {
GapiLens.get = (fun x -> x.name);
GapiLens.set = (fun v x -> { x with name = v });
@@ -1644,6 +1655,10 @@ struct
GapiLens.get = (fun x -> x.parentLink);
GapiLens.set = (fun v x -> { x with parentLink = v });
}
+ let profileCount = {
+ GapiLens.get = (fun x -> x.profileCount);
+ GapiLens.set = (fun v x -> { x with profileCount = v });
+ }
let selfLink = {
GapiLens.get = (fun x -> x.selfLink);
GapiLens.set = (fun v x -> { x with selfLink = v });
@@ -1662,10 +1677,13 @@ struct
childLink = ChildLink.empty;
created = GapiDate.epoch;
id = "";
+ industryVertical = "";
internalWebPropertyId = "";
kind = "";
+ level = "";
name = "";
parentLink = ParentLink.empty;
+ profileCount = 0;
selfLink = "";
updated = GapiDate.epoch;
websiteUrl = "";
@@ -1678,10 +1696,13 @@ struct
(fun v -> GapiJson.render_object "childLink" (ChildLink.render_content v)) x.childLink;
GapiJson.render_date_value "created" x.created;
GapiJson.render_string_value "id" x.id;
+ GapiJson.render_string_value "industryVertical" x.industryVertical;
GapiJson.render_string_value "internalWebPropertyId" x.internalWebPropertyId;
GapiJson.render_string_value "kind" x.kind;
+ GapiJson.render_string_value "level" x.level;
GapiJson.render_string_value "name" x.name;
(fun v -> GapiJson.render_object "parentLink" (ParentLink.render_content v)) x.parentLink;
+ GapiJson.render_int_value "profileCount" x.profileCount;
GapiJson.render_string_value "selfLink" x.selfLink;
GapiJson.render_date_value "updated" x.updated;
GapiJson.render_string_value "websiteUrl" x.websiteUrl;
@@ -1712,6 +1733,10 @@ struct
`String v) ->
{ x with id = v }
| GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "industryVertical"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with industryVertical = v }
+ | GapiCore.AnnotatedTree.Leaf
({ GapiJson.name = "internalWebPropertyId"; data_type = GapiJson.Scalar },
`String v) ->
{ x with internalWebPropertyId = v }
@@ -1720,6 +1745,10 @@ struct
`String v) ->
{ x with kind = v }
| GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "level"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with level = v }
+ | GapiCore.AnnotatedTree.Leaf
({ GapiJson.name = "name"; data_type = GapiJson.Scalar },
`String v) ->
{ x with name = v }
@@ -1732,6 +1761,10 @@ struct
(fun v -> { x with parentLink = v })
cs
| GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "profileCount"; data_type = GapiJson.Scalar },
+ `Int v) ->
+ { x with profileCount = v }
+ | GapiCore.AnnotatedTree.Leaf
({ GapiJson.name = "selfLink"; data_type = GapiJson.Scalar },
`String v) ->
{ x with selfLink = v }
@@ -1756,6 +1789,632 @@ struct
end
+module Experiment =
+struct
+ module Variations =
+ struct
+ type t = {
+ name : string;
+ status : string;
+ url : string;
+ weight : float;
+ won : bool;
+
+ }
+
+ let name = {
+ GapiLens.get = (fun x -> x.name);
+ GapiLens.set = (fun v x -> { x with name = v });
+ }
+ let status = {
+ GapiLens.get = (fun x -> x.status);
+ GapiLens.set = (fun v x -> { x with status = v });
+ }
+ let url = {
+ GapiLens.get = (fun x -> x.url);
+ GapiLens.set = (fun v x -> { x with url = v });
+ }
+ let weight = {
+ GapiLens.get = (fun x -> x.weight);
+ GapiLens.set = (fun v x -> { x with weight = v });
+ }
+ let won = {
+ GapiLens.get = (fun x -> x.won);
+ GapiLens.set = (fun v x -> { x with won = v });
+ }
+
+ let empty = {
+ name = "";
+ status = "";
+ url = "";
+ weight = 0.0;
+ won = false;
+
+ }
+
+ let rec render_content x =
+ [
+ GapiJson.render_string_value "name" x.name;
+ GapiJson.render_string_value "status" x.status;
+ GapiJson.render_string_value "url" x.url;
+ GapiJson.render_float_value "weight" x.weight;
+ GapiJson.render_bool_value "won" x.won;
+
+ ]
+ and render x =
+ GapiJson.render_object "" (render_content x)
+
+ let rec parse x = function
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "name"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with name = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "status"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with status = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "url"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with url = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "weight"; data_type = GapiJson.Scalar },
+ `Float v) ->
+ { x with weight = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "weight"; data_type = GapiJson.Scalar },
+ `Int v) ->
+ { x with weight = float_of_int v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "won"; data_type = GapiJson.Scalar },
+ `Bool v) ->
+ { x with won = v }
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = ""; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children parse empty (fun x -> x) cs
+ | e ->
+ GapiJson.unexpected "GapiAnalyticsV3Model.Variations.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 },
+ `String v) ->
+ { x with href = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "type"; data_type = GapiJson.Scalar },
+ `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;
+ created : GapiDate.t;
+ description : string;
+ editableInGaUi : string;
+ endTime : GapiDate.t;
+ id : string;
+ internalWebPropertyId : string;
+ kind : string;
+ minimumExperimentLengthInDays : int;
+ name : string;
+ objectiveMetric : string;
+ optimizationType : string;
+ parentLink : ParentLink.t;
+ profileId : string;
+ reasonExperimentEnded : string;
+ rewriteVariationUrlsAsOriginal : bool;
+ selfLink : string;
+ servingFramework : string;
+ snippet : string;
+ startTime : GapiDate.t;
+ status : string;
+ trafficCoverage : float;
+ updated : GapiDate.t;
+ variations : Variations.t list;
+ webPropertyId : string;
+ winnerConfidenceLevel : float;
+ winnerFound : bool;
+
+ }
+
+ let accountId = {
+ GapiLens.get = (fun x -> x.accountId);
+ GapiLens.set = (fun v x -> { x with accountId = v });
+ }
+ let created = {
+ GapiLens.get = (fun x -> x.created);
+ GapiLens.set = (fun v x -> { x with created = v });
+ }
+ let description = {
+ GapiLens.get = (fun x -> x.description);
+ GapiLens.set = (fun v x -> { x with description = v });
+ }
+ let editableInGaUi = {
+ GapiLens.get = (fun x -> x.editableInGaUi);
+ GapiLens.set = (fun v x -> { x with editableInGaUi = v });
+ }
+ let endTime = {
+ GapiLens.get = (fun x -> x.endTime);
+ GapiLens.set = (fun v x -> { x with endTime = 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 minimumExperimentLengthInDays = {
+ GapiLens.get = (fun x -> x.minimumExperimentLengthInDays);
+ GapiLens.set = (fun v x -> { x with minimumExperimentLengthInDays = v });
+ }
+ let name = {
+ GapiLens.get = (fun x -> x.name);
+ GapiLens.set = (fun v x -> { x with name = v });
+ }
+ let objectiveMetric = {
+ GapiLens.get = (fun x -> x.objectiveMetric);
+ GapiLens.set = (fun v x -> { x with objectiveMetric = v });
+ }
+ let optimizationType = {
+ GapiLens.get = (fun x -> x.optimizationType);
+ GapiLens.set = (fun v x -> { x with optimizationType = v });
+ }
+ let parentLink = {
+ GapiLens.get = (fun x -> x.parentLink);
+ GapiLens.set = (fun v x -> { x with parentLink = v });
+ }
+ let profileId = {
+ GapiLens.get = (fun x -> x.profileId);
+ GapiLens.set = (fun v x -> { x with profileId = v });
+ }
+ let reasonExperimentEnded = {
+ GapiLens.get = (fun x -> x.reasonExperimentEnded);
+ GapiLens.set = (fun v x -> { x with reasonExperimentEnded = v });
+ }
+ let rewriteVariationUrlsAsOriginal = {
+ GapiLens.get = (fun x -> x.rewriteVariationUrlsAsOriginal);
+ GapiLens.set = (fun v x -> { x with rewriteVariationUrlsAsOriginal = v });
+ }
+ let selfLink = {
+ GapiLens.get = (fun x -> x.selfLink);
+ GapiLens.set = (fun v x -> { x with selfLink = v });
+ }
+ let servingFramework = {
+ GapiLens.get = (fun x -> x.servingFramework);
+ GapiLens.set = (fun v x -> { x with servingFramework = v });
+ }
+ let snippet = {
+ GapiLens.get = (fun x -> x.snippet);
+ GapiLens.set = (fun v x -> { x with snippet = v });
+ }
+ let startTime = {
+ GapiLens.get = (fun x -> x.startTime);
+ GapiLens.set = (fun v x -> { x with startTime = v });
+ }
+ let status = {
+ GapiLens.get = (fun x -> x.status);
+ GapiLens.set = (fun v x -> { x with status = v });
+ }
+ let trafficCoverage = {
+ GapiLens.get = (fun x -> x.trafficCoverage);
+ GapiLens.set = (fun v x -> { x with trafficCoverage = v });
+ }
+ let updated = {
+ GapiLens.get = (fun x -> x.updated);
+ GapiLens.set = (fun v x -> { x with updated = v });
+ }
+ let variations = {
+ GapiLens.get = (fun x -> x.variations);
+ GapiLens.set = (fun v x -> { x with variations = v });
+ }
+ let webPropertyId = {
+ GapiLens.get = (fun x -> x.webPropertyId);
+ GapiLens.set = (fun v x -> { x with webPropertyId = v });
+ }
+ let winnerConfidenceLevel = {
+ GapiLens.get = (fun x -> x.winnerConfidenceLevel);
+ GapiLens.set = (fun v x -> { x with winnerConfidenceLevel = v });
+ }
+ let winnerFound = {
+ GapiLens.get = (fun x -> x.winnerFound);
+ GapiLens.set = (fun v x -> { x with winnerFound = v });
+ }
+
+ let empty = {
+ accountId = "";
+ created = GapiDate.epoch;
+ description = "";
+ editableInGaUi = "";
+ endTime = GapiDate.epoch;
+ id = "";
+ internalWebPropertyId = "";
+ kind = "";
+ minimumExperimentLengthInDays = 0;
+ name = "";
+ objectiveMetric = "";
+ optimizationType = "";
+ parentLink = ParentLink.empty;
+ profileId = "";
+ reasonExperimentEnded = "";
+ rewriteVariationUrlsAsOriginal = false;
+ selfLink = "";
+ servingFramework = "";
+ snippet = "";
+ startTime = GapiDate.epoch;
+ status = "";
+ trafficCoverage = 0.0;
+ updated = GapiDate.epoch;
+ variations = [];
+ webPropertyId = "";
+ winnerConfidenceLevel = 0.0;
+ winnerFound = false;
+
+ }
+
+ let rec render_content x =
+ [
+ GapiJson.render_string_value "accountId" x.accountId;
+ GapiJson.render_date_value "created" x.created;
+ GapiJson.render_string_value "description" x.description;
+ GapiJson.render_string_value "editableInGaUi" x.editableInGaUi;
+ GapiJson.render_date_value "endTime" x.endTime;
+ GapiJson.render_string_value "id" x.id;
+ GapiJson.render_string_value "internalWebPropertyId" x.internalWebPropertyId;
+ GapiJson.render_string_value "kind" x.kind;
+ GapiJson.render_int_value "minimumExperimentLengthInDays" x.minimumExperimentLengthInDays;
+ GapiJson.render_string_value "name" x.name;
+ GapiJson.render_string_value "objectiveMetric" x.objectiveMetric;
+ GapiJson.render_string_value "optimizationType" x.optimizationType;
+ (fun v -> GapiJson.render_object "parentLink" (ParentLink.render_content v)) x.parentLink;
+ GapiJson.render_string_value "profileId" x.profileId;
+ GapiJson.render_string_value "reasonExperimentEnded" x.reasonExperimentEnded;
+ GapiJson.render_bool_value "rewriteVariationUrlsAsOriginal" x.rewriteVariationUrlsAsOriginal;
+ GapiJson.render_string_value "selfLink" x.selfLink;
+ GapiJson.render_string_value "servingFramework" x.servingFramework;
+ GapiJson.render_string_value "snippet" x.snippet;
+ GapiJson.render_date_value "startTime" x.startTime;
+ GapiJson.render_string_value "status" x.status;
+ GapiJson.render_float_value "trafficCoverage" x.trafficCoverage;
+ GapiJson.render_date_value "updated" x.updated;
+ GapiJson.render_array "variations" Variations.render x.variations;
+ GapiJson.render_string_value "webPropertyId" x.webPropertyId;
+ GapiJson.render_float_value "winnerConfidenceLevel" x.winnerConfidenceLevel;
+ GapiJson.render_bool_value "winnerFound" x.winnerFound;
+
+ ]
+ and render x =
+ GapiJson.render_object "" (render_content x)
+
+ let rec parse x = function
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "accountId"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with accountId = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "created"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with created = GapiDate.of_string v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "description"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with description = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "editableInGaUi"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with editableInGaUi = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "endTime"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with endTime = GapiDate.of_string v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "id"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with id = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "internalWebPropertyId"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with internalWebPropertyId = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "kind"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with kind = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "minimumExperimentLengthInDays"; data_type = GapiJson.Scalar },
+ `Int v) ->
+ { x with minimumExperimentLengthInDays = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "name"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with name = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "objectiveMetric"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with objectiveMetric = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "optimizationType"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with optimizationType = 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 = "profileId"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with profileId = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "reasonExperimentEnded"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with reasonExperimentEnded = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "rewriteVariationUrlsAsOriginal"; data_type = GapiJson.Scalar },
+ `Bool v) ->
+ { x with rewriteVariationUrlsAsOriginal = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "selfLink"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with selfLink = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "servingFramework"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with servingFramework = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "snippet"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with snippet = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "startTime"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with startTime = GapiDate.of_string v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "status"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with status = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "trafficCoverage"; data_type = GapiJson.Scalar },
+ `Float v) ->
+ { x with trafficCoverage = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "trafficCoverage"; data_type = GapiJson.Scalar },
+ `Int v) ->
+ { x with trafficCoverage = float_of_int v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "updated"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with updated = GapiDate.of_string v }
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = "variations"; data_type = GapiJson.Array },
+ cs) ->
+ GapiJson.parse_collection
+ (fun x' -> function
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = ""; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children
+ Variations.parse
+ Variations.empty
+ (fun v -> v)
+ cs
+ | e ->
+ GapiJson.unexpected "GapiAnalyticsV3Model.Experiment.parse.parse_collection" e x')
+ Variations.empty
+ (fun v -> { x with variations = v })
+ cs
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "webPropertyId"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with webPropertyId = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "winnerConfidenceLevel"; data_type = GapiJson.Scalar },
+ `Float v) ->
+ { x with winnerConfidenceLevel = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "winnerConfidenceLevel"; data_type = GapiJson.Scalar },
+ `Int v) ->
+ { x with winnerConfidenceLevel = float_of_int v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "winnerFound"; data_type = GapiJson.Scalar },
+ `Bool v) ->
+ { x with winnerFound = v }
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = ""; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children parse empty (fun x -> x) cs
+ | e ->
+ GapiJson.unexpected "GapiAnalyticsV3Model.Experiment.parse" e x
+
+ let to_data_model = GapiJson.render_root render
+
+ let of_data_model = GapiJson.parse_root parse empty
+
+end
+
+module Experiments =
+struct
+ type t = {
+ items : Experiment.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" Experiment.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
+ Experiment.parse
+ Experiment.empty
+ (fun v -> v)
+ cs
+ | e ->
+ GapiJson.unexpected "GapiAnalyticsV3Model.Experiments.parse.parse_collection" e x')
+ Experiment.empty
+ (fun v -> { x with items = v })
+ cs
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "itemsPerPage"; data_type = GapiJson.Scalar },
+ `Int v) ->
+ { x with itemsPerPage = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "kind"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with kind = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "nextLink"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with nextLink = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "previousLink"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with previousLink = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "startIndex"; data_type = GapiJson.Scalar },
+ `Int v) ->
+ { x with startIndex = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "totalResults"; data_type = GapiJson.Scalar },
+ `Int v) ->
+ { x with totalResults = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "username"; data_type = GapiJson.Scalar },
+ `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.Experiments.parse" e x
+
+ let to_data_model = GapiJson.render_root render
+
+ let of_data_model = GapiJson.parse_root parse empty
+
+end
+
module CustomDataSource =
struct
module ParentLink =
View
214 src/gapi/gapiAnalyticsV3Model.mli
@@ -546,14 +546,20 @@ sig
(** Time this web property was created. *)
id : string;
(** Web property ID of the form UA-XXXXX-YY. *)
+ industryVertical : string;
+ (** The industry vertical/category selected for this web property. *)
internalWebPropertyId : string;
(** Internal ID for this web property. *)
kind : string;
(** Resource type for Analytics WebProperty. *)
+ level : string;
+ (** Level for this web property. Possible values are STANDARD or PREMIUM. *)
name : string;
(** Name of this web property. *)
parentLink : ParentLink.t;
(** Parent link for this web property. Points to the account to which this web property belongs. *)
+ profileCount : int;
+ (** Profile count for this web property. *)
selfLink : string;
(** Link for this web property. *)
updated : GapiDate.t;
@@ -567,10 +573,13 @@ sig
val childLink : (t, ChildLink.t) GapiLens.t
val created : (t, GapiDate.t) GapiLens.t
val id : (t, string) GapiLens.t
+ val industryVertical : (t, string) GapiLens.t
val internalWebPropertyId : (t, string) GapiLens.t
val kind : (t, string) GapiLens.t
+ val level : (t, string) GapiLens.t
val name : (t, string) GapiLens.t
val parentLink : (t, ParentLink.t) GapiLens.t
+ val profileCount : (t, int) GapiLens.t
val selfLink : (t, string) GapiLens.t
val updated : (t, GapiDate.t) GapiLens.t
val websiteUrl : (t, string) GapiLens.t
@@ -587,6 +596,203 @@ sig
end
+module Experiment :
+sig
+ module Variations :
+ sig
+ type t = {
+ name : string;
+ (** The name of the variation. This field is required when creating an experiment. This field may not be changed for an experiment whose status is ENDED. *)
+ status : string;
+ (** Status of the variation. Possible values: "ACTIVE", "INACTIVE". INACTIVE variations are not served. This field may not be changed for an experiment whose status is ENDED. *)
+ url : string;
+ (** The URL of the variation. This field may not be changed for an experiment whose status is RUNNING or ENDED. *)
+ weight : float;
+ (** Weight that this variation should receive. Only present if the experiment is running. This field is read-only. *)
+ won : bool;
+ (** True if the experiment has ended and this variation performed (statistically) significantly better than the original. This field is read-only. *)
+
+ }
+
+ val name : (t, string) GapiLens.t
+ val status : (t, string) GapiLens.t
+ val url : (t, string) GapiLens.t
+ val weight : (t, float) GapiLens.t
+ val won : (t, bool) 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 profile to which this experiment belongs. This field is read-only. *)
+ _type : string;
+ (** Value is "analytics#profile". This field is read-only. *)
+
+ }
+
+ 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 experiment belongs. This field is read-only. *)
+ created : GapiDate.t;
+ (** Time the experiment was created. This field is read-only. *)
+ description : string;
+ (** Notes about this experiment. *)
+ editableInGaUi : string;
+ (** If true, the end user will be able to edit the experiment via the Google Analytics user interface. *)
+ endTime : GapiDate.t;
+ (** The ending time of the experiment (the time the status changed from RUNNING to ENDED). This field is present only if the experiment has ended. This field is read-only. *)
+ id : string;
+ (** Experiment ID. Required for patch and update. Disallowed for create. *)
+ internalWebPropertyId : string;
+ (** Internal ID for the web property to which this experiment belongs. This field is read-only. *)
+ kind : string;
+ (** Resource type for an Analytics experiment. This field is read-only. *)
+ minimumExperimentLengthInDays : int;
+ (** Specifies the minimum length of the experiment. Can be changed for a running experiment. This field may not be changed for an experiments whose status is ENDED. *)
+ name : string;
+ (** Experiment name. This field may not be changed for an experiment whose status is ENDED. This field is required when creating an experiment. *)
+ objectiveMetric : string;
+ (** The metric that the experiment is optimizing. Valid values: "ga:goal(n)Completions", "ga:bounces", "ga:pageviews", "ga:timeOnSite", "ga:transactions", "ga:transactionRevenue". This field is required if status is "RUNNING" and servingFramework is one of "REDIRECT" or "API". *)
+ optimizationType : string;
+ (** Whether the objectiveMetric should be minimized or maximized. Possible values: "MAXIMUM", "MINIMUM". Optional--defaults to "MAXIMUM". Cannot be specified without objectiveMetric. Cannot be modified when status is "RUNNING" or "ENDED". *)
+ parentLink : ParentLink.t;
+ (** Parent link for an experiment. Points to the profile to which this experiment belongs. *)
+ profileId : string;
+ (** Profile ID to which this experiment belongs. This field is read-only. *)
+ reasonExperimentEnded : string;
+ (** Why the experiment ended. Possible values: "STOPPED_BY_USER", "WINNER_FOUND", "EXPERIMENT_EXPIRED", "ENDED_WITH_NO_WINNER", "GOAL_OBJECTIVE_CHANGED". "ENDED_WITH_NO_WINNER" means that the experiment didn't expire but no winner was projected to be found. If the experiment status is changed via the API to ENDED this field is set to STOPPED_BY_USER. This field is read-only. *)
+ rewriteVariationUrlsAsOriginal : bool;
+ (** Boolean specifying whether variations URLS are rewritten to match those of the original. This field may not be changed for an experiments whose status is ENDED. *)
+ selfLink : string;
+ (** Link for this experiment. This field is read-only. *)
+ servingFramework : string;
+ (** The framework used to serve the experiment variations and evaluate the results. One of:
+- REDIRECT: Google Analytics redirects traffic to different variation pages, reports the chosen variation and evaluates the results.
+- API: Google Analytics chooses and reports the variation to serve and evaluates the results; the caller is responsible for serving the selected variation.
+- EXTERNAL: The variations will be served externally and the chosen variation reported to Google Analytics. The caller is responsible for serving the selected variation and evaluating the results. *)
+ snippet : string;
+ (** The snippet of code to include on the control page(s). This field is read-only. *)
+ startTime : GapiDate.t;
+ (** The starting time of the experiment (the time the status changed from READY_TO_RUN to RUNNING). This field is present only if the experiment has started. This field is read-only. *)
+ status : string;
+ (** Experiment status. Possible values: "DRAFT", "READY_TO_RUN", "RUNNING", "ENDED". Experiments can be created in the "DRAFT", "READY_TO_RUN" or "RUNNING" state. This field is required when creating an experiment. *)
+ trafficCoverage : float;
+ (** A floating-point number between 0 and 1. Specifies the fraction of the traffic that participates in the experiment. Can be changed for a running experiment. This field may not be changed for an experiments whose status is ENDED. *)
+ updated : GapiDate.t;
+ (** Time the experiment was last modified. This field is read-only. *)
+ variations : Variations.t list;
+ (** Array of variations. The first variation in the array is the original. The number of variations may not change once an experiment is in the RUNNING state. At least two variations are required before status can be set to RUNNING. *)
+ webPropertyId : string;
+ (** Web property ID to which this experiment belongs. The web property ID is of the form UA-XXXXX-YY. This field is read-only. *)
+ winnerConfidenceLevel : float;
+ (** A floating-point number between 0 and 1. Specifies the necessary confidence level to choose a winner. This field may not be changed for an experiments whose status is ENDED. *)
+ winnerFound : bool;
+ (** Boolean specifying whether a winner has been found for this experiment. This field is read-only. *)
+
+ }
+
+ val accountId : (t, string) GapiLens.t
+ val created : (t, GapiDate.t) GapiLens.t
+ val description : (t, string) GapiLens.t
+ val editableInGaUi : (t, string) GapiLens.t
+ val endTime : (t, GapiDate.t) GapiLens.t
+ val id : (t, string) GapiLens.t
+ val internalWebPropertyId : (t, string) GapiLens.t
+ val kind : (t, string) GapiLens.t
+ val minimumExperimentLengthInDays : (t, int) GapiLens.t
+ val name : (t, string) GapiLens.t
+ val objectiveMetric : (t, string) GapiLens.t
+ val optimizationType : (t, string) GapiLens.t
+ val parentLink : (t, ParentLink.t) GapiLens.t
+ val profileId : (t, string) GapiLens.t
+ val reasonExperimentEnded : (t, string) GapiLens.t
+ val rewriteVariationUrlsAsOriginal : (t, bool) GapiLens.t
+ val selfLink : (t, string) GapiLens.t
+ val servingFramework : (t, string) GapiLens.t
+ val snippet : (t, string) GapiLens.t
+ val startTime : (t, GapiDate.t) GapiLens.t
+ val status : (t, string) GapiLens.t
+ val trafficCoverage : (t, float) GapiLens.t
+ val updated : (t, GapiDate.t) GapiLens.t
+ val variations : (t, Variations.t list) GapiLens.t
+ val webPropertyId : (t, string) GapiLens.t
+ val winnerConfidenceLevel : (t, float) GapiLens.t
+ val winnerFound : (t, bool) 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 Experiments :
+sig
+ type t = {
+ items : Experiment.t list;
+ (** A list of experiments. *)
+ 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 experiment collection. *)
+ previousLink : string;
+ (** Link to previous page for this experiment 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 resources in the result. *)
+ username : string;
+ (** Email ID of the authenticated user *)
+
+ }
+
+ val items : (t, Experiment.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 CustomDataSource :
sig
module ParentLink :
@@ -649,7 +855,7 @@ sig
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;
- (** *)
+ (** IDs of profiles linked to the custom data source. *)
selfLink : string;
(** Link for this Analytics custom data source. *)
updated : GapiDate.t;
@@ -740,7 +946,7 @@ sig
defaultPage : string;
(** Default page for this profile. *)
eCommerceTracking : bool;
- (** E-commerce tracking parameter for this profile. *)
+ (** Indicates whether ecommerce tracking is enabled for this profile. *)
excludeQueryParameters : string;
(** The query parameters that are excluded from this profile. *)
id : string;
@@ -854,9 +1060,9 @@ sig
sig
type t = {
change : string;
- (** *)
+ (** The type of change: APPEND, RESET, or DELETE. *)
time : GapiDate.t;
- (** *)
+ (** The time when the change occurred. *)
}
View
187 src/gapi/gapiAnalyticsV3Service.ml
@@ -609,6 +609,193 @@ struct
end
+ module Experiments =
+ struct
+ module ExperimentsParameters =
+ struct
+ type t = {
+ (* Standard query parameters *)
+ fields : string;
+ prettyPrint : bool;
+ quotaUser : string;
+ userIp : string;
+ key : string;
+ (* experiments-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 delete
+ ?(base_url = "https://www.googleapis.com/analytics/v3/")
+ ?std_params
+ ~accountId
+ ~webPropertyId
+ ~profileId
+ ~experimentId
+ session =
+ let full_url = GapiUtils.add_path_to_url ["management"; "accounts";
+ ((fun x -> x) accountId); "webproperties";
+ ((fun x -> x) webPropertyId); "profiles"; ((fun x -> x) profileId);
+ "experiments"; ((fun x -> x) experimentId)] base_url in
+ let params = ExperimentsParameters.merge_parameters
+ ?standard_parameters:std_params () in
+ let query_parameters = Option.map
+ ExperimentsParameters.to_key_value_list params in
+ GapiService.delete ?query_parameters full_url
+ GapiRequest.parse_empty_response session
+
+ let get
+ ?(base_url = "https://www.googleapis.com/analytics/v3/")
+ ?etag
+ ?std_params
+ ~accountId
+ ~webPropertyId
+ ~profileId
+ ~experimentId
+ session =
+ let full_url = GapiUtils.add_path_to_url ["management"; "accounts";
+ ((fun x -> x) accountId); "webproperties";
+ ((fun x -> x) webPropertyId); "profiles"; ((fun x -> x) profileId);
+ "experiments"; ((fun x -> x) experimentId)] base_url in
+ let params = ExperimentsParameters.merge_parameters
+ ?standard_parameters:std_params () in
+ let query_parameters = Option.map
+ ExperimentsParameters.to_key_value_list params in
+ GapiService.get ?query_parameters ?etag full_url
+ (GapiJson.parse_json_response Experiment.of_data_model) session
+
+ let insert
+ ?(base_url = "https://www.googleapis.com/analytics/v3/")
+ ?std_params
+ ~accountId
+ ~webPropertyId
+ ~profileId
+ experiment
+ session =
+ let full_url = GapiUtils.add_path_to_url ["management"; "accounts";
+ ((fun x -> x) accountId); "webproperties";
+ ((fun x -> x) webPropertyId); "profiles"; ((fun x -> x) profileId);
+ "experiments"] base_url in
+ let params = ExperimentsParameters.merge_parameters
+ ?standard_parameters:std_params () in
+ let query_parameters = Option.map
+ ExperimentsParameters.to_key_value_list params in
+ GapiService.post ?query_parameters
+ ~data_to_post:(GapiJson.render_json Experiment.to_data_model)
+ ~data:experiment full_url
+ (GapiJson.parse_json_response Experiment.of_data_model) session
+
+ let list
+ ?(base_url = "https://www.googleapis.com/analytics/v3/")
+ ?std_params
+ ?max_results
+ ?start_index
+ ~accountId
+ ~webPropertyId
+ ~profileId
+ session =
+ let full_url = GapiUtils.add_path_to_url ["management"; "accounts";
+ ((fun x -> x) accountId); "webproperties";
+ ((fun x -> x) webPropertyId); "profiles"; ((fun x -> x) profileId);
+ "experiments"] base_url in
+ let params = ExperimentsParameters.merge_parameters
+ ?standard_parameters:std_params ?max_results ?start_index () in
+ let query_parameters = Option.map
+ ExperimentsParameters.to_key_value_list params in
+ GapiService.get ?query_parameters full_url
+ (GapiJson.parse_json_response Experiments.of_data_model) session
+
+ let patch
+ ?(base_url = "https://www.googleapis.com/analytics/v3/")
+ ?std_params
+ ~accountId
+ ~webPropertyId
+ ~profileId
+ ~experimentId
+ experiment
+ session =
+ let full_url = GapiUtils.add_path_to_url ["management"; "accounts";
+ ((fun x -> x) accountId); "webproperties";
+ ((fun x -> x) webPropertyId); "profiles"; ((fun x -> x) profileId);
+ "experiments"; ((fun x -> x) experimentId)] base_url in
+ let params = ExperimentsParameters.merge_parameters
+ ?standard_parameters:std_params () in
+ let query_parameters = Option.map
+ ExperimentsParameters.to_key_value_list params in
+ GapiService.patch ?query_parameters
+ ~data_to_post:(GapiJson.render_json Experiment.to_data_model)
+ ~data:experiment full_url
+ (GapiJson.parse_json_response Experiment.of_data_model) session
+
+ let update
+ ?(base_url = "https://www.googleapis.com/analytics/v3/")
+ ?std_params
+ ~accountId
+ ~webPropertyId
+ ~profileId
+ ~experimentId
+ experiment
+ session =
+ let full_url = GapiUtils.add_path_to_url ["management"; "accounts";
+ ((fun x -> x) accountId); "webproperties";
+ ((fun x -> x) webPropertyId); "profiles"; ((fun x -> x) profileId);
+ "experiments"; ((fun x -> x) experimentId)] base_url in
+ let params = ExperimentsParameters.merge_parameters
+ ?standard_parameters:std_params () in
+ let query_parameters = Option.map
+ ExperimentsParameters.to_key_value_list params in
+ GapiService.put ?query_parameters
+ ~data_to_post:(GapiJson.render_json Experiment.to_data_model)
+ ~data:experiment full_url
+ (GapiJson.parse_json_response Experiment.of_data_model) session
+
+
+ end
+
module Goals =
struct
module GoalsParameters =
View
125 src/gapi/gapiAnalyticsV3Service.mli
@@ -200,6 +200,131 @@ sig
end
+ module Experiments :
+ sig
+
+ (** Delete an experiment.
+
+ @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 to which the experiment belongs
+ @param webPropertyId Web property ID to which the experiment belongs
+ @param profileId Profile ID to which the experiment belongs
+ @param experimentId ID of the experiment to delete
+ *)
+ val delete :
+ ?base_url:string ->
+ ?std_params:GapiService.StandardParameters.t ->
+ accountId:string ->
+ webPropertyId:string ->
+ profileId:string ->
+ experimentId:string ->
+ GapiConversation.Session.t ->
+ unit * GapiConversation.Session.t
+
+ (** Returns an experiment to which the user has access.
+
+ @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 accountId Account ID to retrieve the experiment for.
+ @param webPropertyId Web property ID to retrieve the experiment for.
+ @param profileId Profile ID to retrieve the experiment for.
+ @param experimentId Experiment ID to retrieve the experiment for.
+ *)
+ val get :
+ ?base_url:string ->
+ ?etag:string ->
+ ?std_params:GapiService.StandardParameters.t ->
+ accountId:string ->
+ webPropertyId:string ->
+ profileId:string ->
+ experimentId:string ->
+ GapiConversation.Session.t ->
+ GapiAnalyticsV3Model.Experiment.t * GapiConversation.Session.t
+
+ (** Create a new experiment.
+
+ @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 to create the experiment for.
+ @param webPropertyId Web property ID to create the experiment for.
+ @param profileId Profile ID to create the experiment for.
+ *)
+ val insert :
+ ?base_url:string ->
+ ?std_params:GapiService.StandardParameters.t ->
+ accountId:string ->
+ webPropertyId:string ->
+ profileId:string ->
+ GapiAnalyticsV3Model.Experiment.t ->
+ GapiConversation.Session.t ->
+ GapiAnalyticsV3Model.Experiment.t * GapiConversation.Session.t
+
+ (** Lists experiments 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 experiments to include in this response.
+ @param start_index An index of the first experiment to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
+ @param accountId Account ID to retrieve experiments for.
+ @param webPropertyId Web property ID to retrieve experiments for.
+ @param profileId Profile ID to retrieve experiments for.
+ *)
+ val list :
+ ?base_url:string ->
+ ?std_params:GapiService.StandardParameters.t ->
+ ?max_results:int ->
+ ?start_index:int ->
+ accountId:string ->
+ webPropertyId:string ->
+ profileId:string ->
+ GapiConversation.Session.t ->
+ GapiAnalyticsV3Model.Experiments.t * GapiConversation.Session.t
+
+ (** Update an existing experiment. This method supports patch semantics.
+
+ @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 of the experiment to update.
+ @param webPropertyId Web property ID of the experiment to update.
+ @param profileId Profile ID of the experiment to update.
+ @param experimentId Experiment ID of the experiment to update.
+ *)
+ val patch :
+ ?base_url:string ->
+ ?std_params:GapiService.StandardParameters.t ->
+ accountId:string ->
+ webPropertyId:string ->
+ profileId:string ->
+ experimentId:string ->
+ GapiAnalyticsV3Model.Experiment.t ->
+ GapiConversation.Session.t ->
+ GapiAnalyticsV3Model.Experiment.t * GapiConversation.Session.t
+
+ (** Update an existing experiment.
+
+ @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 of the experiment to update.
+ @param webPropertyId Web property ID of the experiment to update.
+ @param profileId Profile ID of the experiment to update.
+ @param experimentId Experiment ID of the experiment to update.
+ *)
+ val update :
+ ?base_url:string ->
+ ?std_params:GapiService.StandardParameters.t ->
+ accountId:string ->
+ webPropertyId:string ->
+ profileId:string ->
+ experimentId:string ->
+ GapiAnalyticsV3Model.Experiment.t ->
+ GapiConversation.Session.t ->
+ GapiAnalyticsV3Model.Experiment.t * GapiConversation.Session.t
+
+
+ end
+
module DailyUploads :
sig
View
533 src/gapi/gapiBigqueryV2Model.ml
@@ -594,22 +594,36 @@ end
module JobStatistics2 =
struct
type t = {
+ cacheHit : bool;
+ completionRatio : float;
totalBytesProcessed : int64;
}
+ let cacheHit = {
+ GapiLens.get = (fun x -> x.cacheHit);
+ GapiLens.set = (fun v x -> { x with cacheHit = v });
+ }
+ let completionRatio = {
+ GapiLens.get = (fun x -> x.completionRatio);
+ GapiLens.set = (fun v x -> { x with completionRatio = v });
+ }
let totalBytesProcessed = {
GapiLens.get = (fun x -> x.totalBytesProcessed);
GapiLens.set = (fun v x -> { x with totalBytesProcessed = v });
}
let empty = {
+ cacheHit = false;
+ completionRatio = 0.0;
totalBytesProcessed = 0L;
}
let rec render_content x =
[
+ GapiJson.render_bool_value "cacheHit" x.cacheHit;
+ GapiJson.render_float_value "completionRatio" x.completionRatio;
GapiJson.render_int64_value "totalBytesProcessed" x.totalBytesProcessed;
]
@@ -618,6 +632,18 @@ struct
let rec parse x = function
| GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "cacheHit"; data_type = GapiJson.Scalar },
+ `Bool v) ->
+ { x with cacheHit = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "completionRatio"; data_type = GapiJson.Scalar },
+ `Float v) ->
+ { x with completionRatio = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "completionRatio"; data_type = GapiJson.Scalar },
+ `Int v) ->
+ { x with completionRatio = float_of_int v }
+ | GapiCore.AnnotatedTree.Leaf
({ GapiJson.name = "totalBytesProcessed"; data_type = GapiJson.Scalar },
`String v) ->
{ x with totalBytesProcessed = Int64.of_string v }
@@ -729,183 +755,6 @@ struct
end
-module JobConfigurationProperties = GapiJson.StringDictionary
-
-module JobConfigurationTableCopy =
-struct
- type t = {
- createDisposition : string;
- destinationTable : TableReference.t;
- sourceTable : TableReference.t;
- writeDisposition : string;
-
- }
-
- let createDisposition = {
- GapiLens.get = (fun x -> x.createDisposition);
- GapiLens.set = (fun v x -> { x with createDisposition = v });
- }
- let destinationTable = {
- GapiLens.get = (fun x -> x.destinationTable);
- GapiLens.set = (fun v x -> { x with destinationTable = v });
- }
- let sourceTable = {
- GapiLens.get = (fun x -> x.sourceTable);
- GapiLens.set = (fun v x -> { x with sourceTable = v });
- }
- let writeDisposition = {
- GapiLens.get = (fun x -> x.writeDisposition);
- GapiLens.set = (fun v x -> { x with writeDisposition = v });
- }
-
- let empty = {
- createDisposition = "";
- destinationTable = TableReference.empty;
- sourceTable = TableReference.empty;
- writeDisposition = "";
-
- }
-
- let rec render_content x =
- [
- GapiJson.render_string_value "createDisposition" x.createDisposition;
- (fun v -> GapiJson.render_object "destinationTable" (TableReference.render_content v)) x.destinationTable;
- (fun v -> GapiJson.render_object "sourceTable" (TableReference.render_content v)) x.sourceTable;
- GapiJson.render_string_value "writeDisposition" x.writeDisposition;
-
- ]
- and render x =
- GapiJson.render_object "" (render_content x)
-
- let rec parse x = function
- | GapiCore.AnnotatedTree.Leaf
- ({ GapiJson.name = "createDisposition"; data_type = GapiJson.Scalar },
- `String v) ->
- { x with createDisposition = v }
- | GapiCore.AnnotatedTree.Node
- ({ GapiJson.name = "destinationTable"; data_type = GapiJson.Object },
- cs) ->
- GapiJson.parse_children
- TableReference.parse
- TableReference.empty
- (fun v -> { x with destinationTable = v })
- cs
- | GapiCore.AnnotatedTree.Node
- ({ GapiJson.name = "sourceTable"; data_type = GapiJson.Object },
- cs) ->
- GapiJson.parse_children
- TableReference.parse
- TableReference.empty
- (fun v -> { x with sourceTable = v })
- cs
- | GapiCore.AnnotatedTree.Leaf
- ({ GapiJson.name = "writeDisposition"; data_type = GapiJson.Scalar },
- `String v) ->
- { x with writeDisposition = v }
- | GapiCore.AnnotatedTree.Node
- ({ GapiJson.name = ""; data_type = GapiJson.Object },
- cs) ->
- GapiJson.parse_children parse empty (fun x -> x) cs
- | e ->
- GapiJson.unexpected "GapiBigqueryV2Model.JobConfigurationTableCopy.parse" e x
-
- let to_data_model = GapiJson.render_root render
-
- let of_data_model = GapiJson.parse_root parse empty
-
-end
-
-module JobConfigurationExtract =
-struct
- type t = {
- destinationFormat : string;
- destinationUri : string;
- fieldDelimiter : string;
- printHeader : bool;
- sourceTable : TableReference.t;
-
- }
-
- let destinationFormat = {
- GapiLens.get = (fun x -> x.destinationFormat);
- GapiLens.set = (fun v x -> { x with destinationFormat = v });
- }
- let destinationUri = {
- GapiLens.get = (fun x -> x.destinationUri);
- GapiLens.set = (fun v x -> { x with destinationUri = v });
- }
- let fieldDelimiter = {
- GapiLens.get = (fun x -> x.fieldDelimiter);
- GapiLens.set = (fun v x -> { x with fieldDelimiter = v });
- }
- let printHeader = {
- GapiLens.get = (fun x -> x.printHeader);
- GapiLens.set = (fun v x -> { x with printHeader = v });
- }
- let sourceTable = {
- GapiLens.get = (fun x -> x.sourceTable);
- GapiLens.set = (fun v x -> { x with sourceTable = v });
- }
-
- let empty = {
- destinationFormat = "";
- destinationUri = "";
- fieldDelimiter = "";
- printHeader = false;
- sourceTable = TableReference.empty;
-
- }
-
- let rec render_content x =
- [
- GapiJson.render_string_value "destinationFormat" x.destinationFormat;
- GapiJson.render_string_value "destinationUri" x.destinationUri;
- GapiJson.render_string_value "fieldDelimiter" x.fieldDelimiter;
- GapiJson.render_bool_value "printHeader" x.printHeader;
- (fun v -> GapiJson.render_object "sourceTable" (TableReference.render_content v)) x.sourceTable;
-
- ]
- and render x =
- GapiJson.render_object "" (render_content x)
-
- let rec parse x = function
- | GapiCore.AnnotatedTree.Leaf
- ({ GapiJson.name = "destinationFormat"; data_type = GapiJson.Scalar },
- `String v) ->
- { x with destinationFormat = v }
- | GapiCore.AnnotatedTree.Leaf
- ({ GapiJson.name = "destinationUri"; data_type = GapiJson.Scalar },
- `String v) ->
- { x with destinationUri = v }
- | GapiCore.AnnotatedTree.Leaf
- ({ GapiJson.name = "fieldDelimiter"; data_type = GapiJson.Scalar },
- `String v) ->
- { x with fieldDelimiter = v }
- | GapiCore.AnnotatedTree.Leaf
- ({ GapiJson.name = "printHeader"; data_type = GapiJson.Scalar },
- `Bool v) ->
- { x with printHeader = v }
- | GapiCore.AnnotatedTree.Node
- ({ GapiJson.name = "sourceTable"; data_type = GapiJson.Object },
- cs) ->
- GapiJson.parse_children
- TableReference.parse
- TableReference.empty
- (fun v -> { x with sourceTable = v })
- cs
- | GapiCore.AnnotatedTree.Node
- ({ GapiJson.name = ""; data_type = GapiJson.Object },
- cs) ->
- GapiJson.parse_children parse empty (fun x -> x) cs
- | e ->
- GapiJson.unexpected "GapiBigqueryV2Model.JobConfigurationExtract.parse" e x
-
- let to_data_model = GapiJson.render_root render
-
- let of_data_model = GapiJson.parse_root parse empty
-
-end
-
module TableFieldSchema =
struct
type t = {
@@ -1052,6 +901,7 @@ end
module JobConfigurationLoad =
struct
type t = {
+ allowJaggedRows : bool;
allowQuotedNewlines : bool;
createDisposition : string;
destinationTable : TableReference.t;
@@ -1069,6 +919,10 @@ struct
}
+ let allowJaggedRows = {
+ GapiLens.get = (fun x -> x.allowJaggedRows);
+ GapiLens.set = (fun v x -> { x with allowJaggedRows = v });
+ }
let allowQuotedNewlines = {
GapiLens.get = (fun x -> x.allowQuotedNewlines);
GapiLens.set = (fun v x -> { x with allowQuotedNewlines = v });
@@ -1127,6 +981,7 @@ struct
}
let empty = {
+ allowJaggedRows = false;
allowQuotedNewlines = false;
createDisposition = "";
destinationTable = TableReference.empty;
@@ -1146,6 +1001,7 @@ struct
let rec render_content x =
[
+ GapiJson.render_bool_value "allowJaggedRows" x.allowJaggedRows;
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;
@@ -1167,6 +1023,10 @@ struct
let rec parse x = function
| GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "allowJaggedRows"; data_type = GapiJson.Scalar },
+ `Bool v) ->
+ { x with allowJaggedRows = v }
+ | GapiCore.AnnotatedTree.Leaf
({ GapiJson.name = "allowQuotedNewlines"; data_type = GapiJson.Scalar },
`Bool v) ->
{ x with allowQuotedNewlines = v }
@@ -1253,6 +1113,181 @@ struct
end
+module JobConfigurationExtract =
+struct
+ type t = {
+ destinationFormat : string;
+ destinationUri : string;
+ fieldDelimiter : string;
+ printHeader : bool;
+ sourceTable : TableReference.t;
+
+ }
+
+ let destinationFormat = {
+ GapiLens.get = (fun x -> x.destinationFormat);
+ GapiLens.set = (fun v x -> { x with destinationFormat = v });
+ }
+ let destinationUri = {
+ GapiLens.get = (fun x -> x.destinationUri);
+ GapiLens.set = (fun v x -> { x with destinationUri = v });
+ }
+ let fieldDelimiter = {
+ GapiLens.get = (fun x -> x.fieldDelimiter);
+ GapiLens.set = (fun v x -> { x with fieldDelimiter = v });
+ }
+ let printHeader = {
+ GapiLens.get = (fun x -> x.printHeader);
+ GapiLens.set = (fun v x -> { x with printHeader = v });
+ }
+ let sourceTable = {
+ GapiLens.get = (fun x -> x.sourceTable);
+ GapiLens.set = (fun v x -> { x with sourceTable = v });
+ }
+
+ let empty = {
+ destinationFormat = "";
+ destinationUri = "";
+ fieldDelimiter = "";
+ printHeader = false;
+ sourceTable = TableReference.empty;
+
+ }
+
+ let rec render_content x =
+ [
+ GapiJson.render_string_value "destinationFormat" x.destinationFormat;
+ GapiJson.render_string_value "destinationUri" x.destinationUri;
+ GapiJson.render_string_value "fieldDelimiter" x.fieldDelimiter;
+ GapiJson.render_bool_value "printHeader" x.printHeader;
+ (fun v -> GapiJson.render_object "sourceTable" (TableReference.render_content v)) x.sourceTable;
+
+ ]
+ and render x =
+ GapiJson.render_object "" (render_content x)
+
+ let rec parse x = function
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "destinationFormat"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with destinationFormat = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "destinationUri"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with destinationUri = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "fieldDelimiter"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with fieldDelimiter = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "printHeader"; data_type = GapiJson.Scalar },
+ `Bool v) ->
+ { x with printHeader = v }
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = "sourceTable"; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children
+ TableReference.parse
+ TableReference.empty
+ (fun v -> { x with sourceTable = v })
+ cs
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = ""; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children parse empty (fun x -> x) cs
+ | e ->
+ GapiJson.unexpected "GapiBigqueryV2Model.JobConfigurationExtract.parse" e x
+
+ let to_data_model = GapiJson.render_root render
+
+ let of_data_model = GapiJson.parse_root parse empty
+
+end
+
+module JobConfigurationTableCopy =
+struct
+ type t = {
+ createDisposition : string;
+ destinationTable : TableReference.t;
+ sourceTable : TableReference.t;
+ writeDisposition : string;
+
+ }
+
+ let createDisposition = {
+ GapiLens.get = (fun x -> x.createDisposition);
+ GapiLens.set = (fun v x -> { x with createDisposition = v });
+ }
+ let destinationTable = {
+ GapiLens.get = (fun x -> x.destinationTable);
+ GapiLens.set = (fun v x -> { x with destinationTable = v });
+ }
+ let sourceTable = {
+ GapiLens.get = (fun x -> x.sourceTable);
+ GapiLens.set = (fun v x -> { x with sourceTable = v });
+ }
+ let writeDisposition = {
+ GapiLens.get = (fun x -> x.writeDisposition);
+ GapiLens.set = (fun v x -> { x with writeDisposition = v });
+ }
+
+ let empty = {
+ createDisposition = "";
+ destinationTable = TableReference.empty;
+ sourceTable = TableReference.empty;
+ writeDisposition = "";
+
+ }
+
+ let rec render_content x =
+ [
+ GapiJson.render_string_value "createDisposition" x.createDisposition;
+ (fun v -> GapiJson.render_object "destinationTable" (TableReference.render_content v)) x.destinationTable;
+ (fun v -> GapiJson.render_object "sourceTable" (TableReference.render_content v)) x.sourceTable;
+ GapiJson.render_string_value "writeDisposition" x.writeDisposition;
+
+ ]
+ and render x =
+ GapiJson.render_object "" (render_content x)
+
+ let rec parse x = function
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "createDisposition"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with createDisposition = v }
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = "destinationTable"; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children
+ TableReference.parse
+ TableReference.empty
+ (fun v -> { x with destinationTable = v })
+ cs
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = "sourceTable"; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children
+ TableReference.parse
+ TableReference.empty
+ (fun v -> { x with sourceTable = v })
+ cs
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "writeDisposition"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with writeDisposition = v }
+ | GapiCore.AnnotatedTree.Node
+ ({ GapiJson.name = ""; data_type = GapiJson.Object },
+ cs) ->
+ GapiJson.parse_children parse empty (fun x -> x) cs
+ | e ->
+ GapiJson.unexpected "GapiBigqueryV2Model.JobConfigurationTableCopy.parse" e x
+
+ let to_data_model = GapiJson.render_root render
+
+ let of_data_model = GapiJson.parse_root parse empty
+
+end
+
module DatasetReference =
struct
type t = {
@@ -1314,9 +1349,11 @@ struct
createDisposition : string;
defaultDataset : DatasetReference.t;
destinationTable : TableReference.t;
+ minCompletionRatio : float;
preserveNulls : bool;
priority : string;
query : string;
+ useQueryCache : bool;
writeDisposition : string;
}
@@ -1337,6 +1374,10 @@ struct
GapiLens.get = (fun x -> x.destinationTable);
GapiLens.set = (fun v x -> { x with destinationTable = v });
}
+ let minCompletionRatio = {
+ GapiLens.get = (fun x -> x.minCompletionRatio);
+ GapiLens.set = (fun v x -> { x with minCompletionRatio = v });
+ }
let preserveNulls = {
GapiLens.get = (fun x -> x.preserveNulls);
GapiLens.set = (fun v x -> { x with preserveNulls = v });
@@ -1349,6 +1390,10 @@ struct
GapiLens.get = (fun x -> x.query);
GapiLens.set = (fun v x -> { x with query = v });
}
+ let useQueryCache = {
+ GapiLens.get = (fun x -> x.useQueryCache);
+ GapiLens.set = (fun v x -> { x with useQueryCache = v });
+ }
let writeDisposition = {
GapiLens.get = (fun x -> x.writeDisposition);
GapiLens.set = (fun v x -> { x with writeDisposition = v });
@@ -1359,9 +1404,11 @@ struct
createDisposition = "";
defaultDataset = DatasetReference.empty;
destinationTable = TableReference.empty;
+ minCompletionRatio = 0.0;
preserveNulls = false;
priority = "";
query = "";
+ useQueryCache = false;
writeDisposition = "";
}
@@ -1372,9 +1419,11 @@ struct
GapiJson.render_string_value "createDisposition" x.createDisposition;
(fun v -> GapiJson.render_object "defaultDataset" (DatasetReference.render_content v)) x.defaultDataset;
(fun v -> GapiJson.render_object "destinationTable" (TableReference.render_content v)) x.destinationTable;
+ GapiJson.render_float_value "minCompletionRatio" x.minCompletionRatio;
GapiJson.render_bool_value "preserveNulls" x.preserveNulls;
GapiJson.render_string_value "priority" x.priority;
GapiJson.render_string_value "query" x.query;
+ GapiJson.render_bool_value "useQueryCache" x.useQueryCache;
GapiJson.render_string_value "writeDisposition" x.writeDisposition;
]
@@ -1407,6 +1456,14 @@ struct
(fun v -> { x with destinationTable = v })
cs
| GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "minCompletionRatio"; data_type = GapiJson.Scalar },
+ `Float v) ->
+ { x with minCompletionRatio = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "minCompletionRatio"; data_type = GapiJson.Scalar },
+ `Int v) ->
+ { x with minCompletionRatio = float_of_int v }
+ | GapiCore.AnnotatedTree.Leaf
({ GapiJson.name = "preserveNulls"; data_type = GapiJson.Scalar },
`Bool v) ->
{ x with preserveNulls = v }
@@ -1419,6 +1476,10 @@ struct
`String v) ->
{ x with query = v }
| GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "useQueryCache"; data_type = GapiJson.Scalar },
+ `Bool v) ->
+ { x with useQueryCache = v }
+ | GapiCore.AnnotatedTree.Leaf
({ GapiJson.name = "writeDisposition"; data_type = GapiJson.Scalar },
`String v) ->
{ x with writeDisposition = v }
@@ -1439,10 +1500,10 @@ module JobConfiguration =
struct
type t = {
copy : JobConfigurationTableCopy.t;
+ dryRun : bool;
extract : JobConfigurationExtract.t;
link : JobConfigurationLink.t;
load : JobConfigurationLoad.t;
- properties : JobConfigurationProperties.t;
query : JobConfigurationQuery.t;
}
@@ -1451,6 +1512,10 @@ struct
GapiLens.get = (fun x -> x.copy);
GapiLens.set = (fun v x -> { x with copy = v });
}
+ let dryRun = {
+ GapiLens.get = (fun x -> x.dryRun);
+ GapiLens.set = (fun v x -> { x with dryRun = v });
+ }
let extract = {
GapiLens.get = (fun x -> x.extract);
GapiLens.set = (fun v x -> { x with extract = v });
@@ -1463,10 +1528,6 @@ struct
GapiLens.get = (fun x -> x.load);
GapiLens.set = (fun v x -> { x with load = v });
}
- let properties = {
- GapiLens.get = (fun x -> x.properties);
- GapiLens.set = (fun v x -> { x with properties = v });
- }
let query = {
GapiLens.get = (fun x -> x.query);
GapiLens.set = (fun v x -> { x with query = v });
@@ -1474,10 +1535,10 @@ struct
let empty = {
copy = JobConfigurationTableCopy.empty;
+ dryRun = false;
extract = JobConfigurationExtract.empty;
link = JobConfigurationLink.empty;
load = JobConfigurationLoad.empty;
- properties = JobConfigurationProperties.empty;
query = JobConfigurationQuery.empty;
}
@@ -1485,10 +1546,10 @@ struct
let rec render_content x =
[
(fun v -> GapiJson.render_object "copy" (JobConfigurationTableCopy.render_content v)) x.copy;
+ GapiJson.render_bool_value "dryRun" x.dryRun;
(fun v -> GapiJson.render_object "extract" (JobConfigurationExtract.render_content v)) x.extract;
(fun v -> GapiJson.render_object "link" (JobConfigurationLink.render_content v)) x.link;
(fun v -> GapiJson.render_object "load" (JobConfigurationLoad.render_content v)) x.load;
- (fun v -> GapiJson.render_object "properties" (JobConfigurationProperties.render_content v)) x.properties;
(fun v -> GapiJson.render_object "query" (JobConfigurationQuery.render_content v)) x.query;
]
@@ -1504,6 +1565,10 @@ struct
JobConfigurationTableCopy.empty
(fun v -> { x with copy = v })
cs
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "dryRun"; data_type = GapiJson.Scalar },
+ `Bool v) ->
+ { x with dryRun = v }
| GapiCore.AnnotatedTree.Node
({ GapiJson.name = "extract"; data_type = GapiJson.Object },
cs) ->
@@ -1529,14 +1594,6 @@ struct
(fun v -> { x with load = v })
cs
| GapiCore.AnnotatedTree.Node
- ({ GapiJson.name = "properties"; data_type = GapiJson.Object },
- cs) ->
- GapiJson.parse_children
- JobConfigurationProperties.parse
- JobConfigurationProperties.empty
- (fun v -> { x with properties = v })
- cs
- | GapiCore.AnnotatedTree.Node
({ GapiJson.name = "query"; data_type = GapiJson.Object },
cs) ->
GapiJson.parse_children
@@ -1798,6 +1855,7 @@ struct
friendlyName : string;
id : string;
kind : string;
+ numericId : string;
projectReference : ProjectReference.t;
}
@@ -1814,6 +1872,10 @@ struct
GapiLens.get = (fun x -> x.kind);
GapiLens.set = (fun v x -> { x with kind = v });
}
+ let numericId = {
+ GapiLens.get = (fun x -> x.numericId);
+ GapiLens.set = (fun v x -> { x with numericId = v });
+ }
let projectReference = {
GapiLens.get = (fun x -> x.projectReference);
GapiLens.set = (fun v x -> { x with projectReference = v });
@@ -1823,6 +1885,7 @@ struct
friendlyName = "";
id = "";
kind = "";
+ numericId = "";
projectReference = ProjectReference.empty;
}
@@ -1832,6 +1895,7 @@ struct
GapiJson.render_string_value "friendlyName" x.friendlyName;
GapiJson.render_string_value "id" x.id;
GapiJson.render_string_value "kind" x.kind;
+ GapiJson.render_string_value "numericId" x.numericId;
(fun v -> GapiJson.render_object "projectReference" (ProjectReference.render_content v)) x.projectReference;
]
@@ -1851,6 +1915,10 @@ struct
({ GapiJson.name = "kind"; data_type = GapiJson.Scalar },
`String v) ->
{ x with kind = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "numericId"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with numericId = v }
| GapiCore.AnnotatedTree.Node
({ GapiJson.name = "projectReference"; data_type = GapiJson.Object },
cs) ->
@@ -2552,16 +2620,22 @@ end
module GetQueryResultsResponse =
struct
type t = {
+ cacheHit : bool;
etag : string;
jobComplete : bool;
jobReference : JobReference.t;
kind : string;
+ pageToken : string;
rows : TableRow.t list;
schema : TableSchema.t;
totalRows : string;
}
+ let cacheHit = {
+ GapiLens.get = (fun x -> x.cacheHit);
+ GapiLens.set = (fun v x -> { x with cacheHit = v });
+ }
let etag = {
GapiLens.get = (fun x -> x.etag);
GapiLens.set = (fun v x -> { x with etag = v });
@@ -2578,6 +2652,10 @@ struct
GapiLens.get = (fun x -> x.kind);
GapiLens.set = (fun v x -> { x with kind = v });
}
+ let pageToken = {
+ GapiLens.get = (fun x -> x.pageToken);
+ GapiLens.set = (fun v x -> { x with pageToken = v });
+ }
let rows = {
GapiLens.get = (fun x -> x.rows);
GapiLens.set = (fun v x -> { x with rows = v });
@@ -2592,10 +2670,12 @@ struct
}
let empty = {
+ cacheHit = false;
etag = "";
jobComplete = false;
jobReference = JobReference.empty;
kind = "";
+ pageToken = "";
rows = [];
schema = TableSchema.empty;
totalRows = "";
@@ -2604,10 +2684,12 @@ struct
let rec render_content x =
[
+ GapiJson.render_bool_value "cacheHit" x.cacheHit;
GapiJson.render_string_value "etag" x.etag;
GapiJson.render_bool_value "jobComplete" x.jobComplete;
(fun v -> GapiJson.render_object "jobReference" (JobReference.render_content v)) x.jobReference;
GapiJson.render_string_value "kind" x.kind;
+ GapiJson.render_string_value "pageToken" x.pageToken;
GapiJson.render_array "rows" TableRow.render x.rows;
(fun v -> GapiJson.render_object "schema" (TableSchema.render_content v)) x.schema;
GapiJson.render_string_value "totalRows" x.totalRows;
@@ -2618,6 +2700,10 @@ struct
let rec parse x = function
| GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "cacheHit"; data_type = GapiJson.Scalar },
+ `Bool v) ->
+ { x with cacheHit = v }
+ | GapiCore.AnnotatedTree.Leaf
({ GapiJson.name = "etag"; data_type = GapiJson.Scalar },
`String v) ->
{ x with etag = v }
@@ -2637,6 +2723,10 @@ struct
({ GapiJson.name = "kind"; data_type = GapiJson.Scalar },
`String v) ->
{ x with kind = v }
+ | GapiCore.AnnotatedTree.Leaf
+ ({ GapiJson.name = "pageToken"; data_type = GapiJson.Scalar },
+ `String v) ->
+ { x with pageToken = v }
| GapiCore.AnnotatedTree.Node
({ GapiJson.name = "rows"; data_type = GapiJson.Array },
cs) ->
@@ -2687,9 +2777,11 @@ struct
dryRun : bool;
kind : string;
maxResults : int;
+ minCompletionRatio : float;
preserveNulls : bool;
query : string;
timeoutMs : int;
+ useQueryCache : bool;
}