Skip to content

Commit

Permalink
Update Discovery and Drive services
Browse files Browse the repository at this point in the history
  • Loading branch information
astrada committed Dec 3, 2012
1 parent aa9de68 commit 80fb925
Show file tree
Hide file tree
Showing 4 changed files with 297 additions and 121 deletions.
11 changes: 11 additions & 0 deletions src/gapi/gapiDiscoveryV1Model.ml
Expand Up @@ -67,6 +67,7 @@ struct
minimum : string;
pattern : string;
properties : (string * t) list;
readOnly : bool;
repeated : bool;
required : bool;
_type : string;
Expand Down Expand Up @@ -133,6 +134,10 @@ struct
GapiLens.get = (fun x -> x.properties);
GapiLens.set = (fun v x -> { x with properties = v });
}
let readOnly = {
GapiLens.get = (fun x -> x.readOnly);
GapiLens.set = (fun v x -> { x with readOnly = v });
}
let repeated = {
GapiLens.get = (fun x -> x.repeated);
GapiLens.set = (fun v x -> { x with repeated = v });
Expand Down Expand Up @@ -162,6 +167,7 @@ struct
minimum = "";
pattern = "";
properties = [];
readOnly = false;
repeated = false;
required = false;
_type = "";
Expand All @@ -185,6 +191,7 @@ struct
GapiJson.render_string_value "minimum" x.minimum;
GapiJson.render_string_value "pattern" x.pattern;
GapiJson.render_collection "properties" GapiJson.Object (fun (id, v) -> (fun v -> GapiJson.render_object id (render_content v)) v) x.properties;
GapiJson.render_bool_value "readOnly" x.readOnly;
GapiJson.render_bool_value "repeated" x.repeated;
GapiJson.render_bool_value "required" x.required;
GapiJson.render_string_value "type" x._type;
Expand Down Expand Up @@ -296,6 +303,10 @@ struct
("", empty)
(fun v -> { x with properties = v })
cs
| GapiCore.AnnotatedTree.Leaf
({ GapiJson.name = "readOnly"; data_type = GapiJson.Scalar },
`Bool v) ->
{ x with readOnly = v }
| GapiCore.AnnotatedTree.Leaf
({ GapiJson.name = "repeated"; data_type = GapiJson.Scalar },
`Bool v) ->
Expand Down
3 changes: 3 additions & 0 deletions src/gapi/gapiDiscoveryV1Model.mli
Expand Up @@ -57,6 +57,8 @@ sig
(** The regular expression this parameter must conform to. Uses Java 6 regex format: http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html *)
properties : (string * t) list;
(** If this is a schema for an object, list the schema for each property of this object. *)
readOnly : bool;
(** The value is read-only, generated by the service. The value can not be modified by the client. It the value is included in a POST, PUT or PATCH request, it will be ignored by the service. *)
repeated : bool;
(** Whether this parameter may appear multiple times. *)
required : bool;
Expand All @@ -81,6 +83,7 @@ sig
val minimum : (t, string) GapiLens.t
val pattern : (t, string) GapiLens.t
val properties : (t, (string * t) list) GapiLens.t
val readOnly : (t, bool) GapiLens.t
val repeated : (t, bool) GapiLens.t
val required : (t, bool) GapiLens.t
val _type : (t, string) GapiLens.t
Expand Down

0 comments on commit 80fb925

Please sign in to comment.