fix(version-up): check-in of latest sources

This also includes crate files to remember which
crates we have published already.

Related to #44
This commit is contained in:
Sebastian Thiel
2015-03-25 14:26:30 +01:00
parent c7fb7c4093
commit a2ca1cb28e
353 changed files with 38285 additions and 30817 deletions

View File

@@ -4,7 +4,7 @@
[package]
name = "google-dataflow1_b4"
version = "0.1.1+20150130"
version = "0.1.2+20150130"
authors = ["Sebastian Thiel <byronimo@gmail>"]
description = "A complete library to interact with dataflow (protocol v1b4)"
repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/dataflow1_b4"
@@ -16,7 +16,7 @@ keywords = ["dataflow", "google", "protocol", "web", "api"]
[dependencies]
hyper = "*"
mime = "*"
yup-oauth2 = "*"
url = "*"
serde = "*"
serde_macros = "*"
yup-oauth2 = "*"

View File

@@ -1,11 +1,11 @@
<!---
DO NOT EDIT !
This file was generated automatically from 'src/mako/README.md.mako'
This file was generated automatically from 'src/mako/api/README.md.mako'
DO NOT EDIT !
-->
The `google-dataflow1_b4` library allows access to all features of the *Google dataflow* service.
This documentation was generated from *dataflow* crate version *0.1.1+20150130*, where *20150130* is the exact revision of the *dataflow:v1b4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*.
This documentation was generated from *dataflow* crate version *0.1.2+20150130*, where *20150130* is the exact revision of the *dataflow:v1b4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*.
# Features
It seems there is nothing you can do here ... .
@@ -20,6 +20,8 @@ The API is structured into the following primary items:
* **[Hub](http://byron.github.io/google-apis-rs/google-dataflow1_b4/struct.Dataflow.html)**
* a central object to maintain state and allow accessing all *Activities*
* creates [*Method Builders*](http://byron.github.io/google-apis-rs/google-dataflow1_b4/trait.MethodsBuilder.html) which in turn
allow access to individual [*Call Builders*](http://byron.github.io/google-apis-rs/google-dataflow1_b4/trait.CallBuilder.html)
* **[Resources](http://byron.github.io/google-apis-rs/google-dataflow1_b4/trait.Resource.html)**
* primary types that you can apply *Activities* to
* a collection of properties and *Parts*
@@ -29,6 +31,8 @@ The API is structured into the following primary items:
* **[Activities](http://byron.github.io/google-apis-rs/google-dataflow1_b4/trait.CallBuilder.html)**
* operations to apply to *Resources*
All *structures* are marked with applicable traits to further categorize them and ease browsing.
Generally speaking, you can invoke *Activities* like this:
```Rust,ignore
@@ -87,7 +91,7 @@ the doit() methods, or handed as possibly intermediate results to either the
When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This
makes the system potentially resilient to all kinds of errors.
## Uploads and Downlods
## Uploads and Downloads
If a method supports downloads, the response body, which is part of the [Result](http://byron.github.io/google-apis-rs/google-dataflow1_b4/enum.Result.html), should be
read by you to obtain the media.
If such a method also supports a [Response Result](http://byron.github.io/google-apis-rs/google-dataflow1_b4/trait.ResponseResult.html), it will return that by default.
@@ -110,8 +114,9 @@ The [delegate trait](http://byron.github.io/google-apis-rs/google-dataflow1_b4/t
## Optional Parts in Server-Requests
All structures provided by this library are made to be [enocodable](http://byron.github.io/google-apis-rs/google-dataflow1_b4/trait.RequestValue.html) and
[decodable](http://byron.github.io/google-apis-rs/google-dataflow1_b4/trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid.
Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-dataflow1_b4/trait.Part.html) which are identifyable by name, which will be sent to
[decodable](http://byron.github.io/google-apis-rs/google-dataflow1_b4/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses
are valid.
Most optionals are are considered [Parts](http://byron.github.io/google-apis-rs/google-dataflow1_b4/trait.Part.html) which are identifiable by name, which will be sent to
the server to indicate either the set parts of the request or the desired parts in the response.
## Builder Arguments

View File

@@ -1,4 +1,4 @@
// COPY OF 'src/rust/cmn.rs'
// COPY OF 'src/rust/api/cmn.rs'
// DO NOT EDIT
use std::marker::MarkerTrait;
use std::io::{self, Read, Seek, Cursor, Write, SeekFrom};
@@ -24,7 +24,7 @@ use serde;
pub trait Hub: MarkerTrait {}
/// Identifies types for building methods of a particular resource type
pub trait ResourceMethodsBuilder: MarkerTrait {}
pub trait MethodsBuilder: MarkerTrait {}
/// Identifies types which represent builders for a particular resource method
pub trait CallBuilder: MarkerTrait {}
@@ -105,12 +105,15 @@ pub trait Delegate {
/// information if he is interesting in knowing more context when further calls to it
/// are made.
/// The matching `finished()` call will always be made, no matter whether or not the API
/// request was sucessfull. That way, the delgate may easily maintain a clean state
/// request was successful. That way, the delegate may easily maintain a clean state
/// between various API calls.
fn begin(&mut self, MethodInfo) {}
/// Called whenever there is an [HttpError](http://hyperium.github.io/hyper/hyper/error/enum.HttpError.html), usually if there are network problems.
///
/// If you choose to retry after a duration, the duration should be chosen using the
/// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff).
///
/// Return retry information.
fn http_error(&mut self, &hyper::HttpError) -> Retry {
Retry::Abort
@@ -133,7 +136,7 @@ pub trait Delegate {
/// Called during resumable uploads to provide a URL for the impending upload.
/// It was saved after a previous call to `store_upload_url(...)`, and if not None,
/// will be used instead of asking the server for a new upload URL.
/// This is useful in case a previous resumable upload was aborted/cancelled, but should now
/// This is useful in case a previous resumable upload was aborted/canceled, but should now
/// be resumed.
/// The returned URL will be used exactly once - if it fails again and the delegate allows
/// to retry, we will ask the server for a new upload URL.
@@ -154,8 +157,8 @@ pub trait Delegate {
///
/// # Arguments
///
/// `json_encoded_value` - The json-encoded value which failed to decode.
/// `json_decode_error` - The decoder error
/// * `json_encoded_value` - The json-encoded value which failed to decode.
/// * `json_decode_error` - The decoder error
fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &serde::json::Error) {
let _ = json_encoded_value;
let _ = json_decode_error;
@@ -166,6 +169,9 @@ pub trait Delegate {
/// depends on the used API method.
/// The delegate should check the status, header and decoded json error to decide
/// whether to retry or not. In the latter case, the underlying call will fail.
///
/// If you choose to retry after a duration, the duration should be chosen using the
/// [exponential backoff algorithm](http://en.wikipedia.org/wiki/Exponential_backoff).
fn http_failure(&mut self, _: &hyper::client::Response, Option<JsonServerError>) -> Retry {
Retry::Abort
}
@@ -197,8 +203,8 @@ pub trait Delegate {
///
/// # Arguments
///
/// `is_success` - a true value indicates the operation was successful. If false, you should
/// discard all values stored during `store_upload_url`.
/// * `is_success` - a true value indicates the operation was successful. If false, you should
/// discard all values stored during `store_upload_url`.
fn finished(&mut self, is_success: bool) {
let _ = is_success;
}
@@ -212,8 +218,8 @@ pub struct DefaultDelegate;
impl Delegate for DefaultDelegate {}
/// A universal result type used as return for all action method results.
pub enum Result<T = ()> {
pub enum Error {
/// The http connection failed
HttpError(hyper::HttpError),
@@ -240,11 +246,11 @@ pub enum Result<T = ()> {
/// Indicates an HTTP repsonse with a non-success status code
Failure(hyper::client::Response),
/// It worked !
Success(T),
}
/// A universal result type used as return for all calls.
pub type Result<T> = std::result::Result<T, Error>;
/// Contains information about an API request.
pub struct MethodInfo {
pub id: &'static str,
@@ -499,7 +505,7 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A>
where NC: hyper::net::NetworkConnector,
A: oauth2::GetToken {
fn query_transfer_status(&mut self) -> (Option<u64>, hyper::HttpResult<hyper::client::Response>) {
fn query_transfer_status(&mut self) -> std::result::Result<u64, hyper::HttpResult<hyper::client::Response>> {
loop {
match self.client.post(self.url)
.header(UserAgent(self.user_agent.to_string()))
@@ -516,17 +522,17 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A>
sleep(d);
continue;
}
return (None, Ok(r))
return Err(Ok(r))
}
};
return (Some(h.0.last), Ok(r))
return Ok(h.0.last)
}
Err(err) => {
if let Retry::After(d) = self.delegate.http_error(&err) {
sleep(d);
continue;
}
return (None, Err(err))
return Err(Err(err))
}
}
}
@@ -539,8 +545,8 @@ impl<'a, NC, A> ResumableUploadHelper<'a, NC, A>
let mut start = match self.start_at {
Some(s) => s,
None => match self.query_transfer_status() {
(Some(s), _) => s,
(_, result) => return Some(result)
Ok(s) => s,
Err(result) => return Some(result)
}
};

View File

@@ -1,8 +1,8 @@
// DO NOT EDIT !
// This file was generated automatically from 'src/mako/lib.rs.mako'
// This file was generated automatically from 'src/mako/api/lib.rs.mako'
// DO NOT EDIT !
//! This documentation was generated from *dataflow* crate version *0.1.1+20150130*, where *20150130* is the exact revision of the *dataflow:v1b4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.1*.
//! This documentation was generated from *dataflow* crate version *0.1.2+20150130*, where *20150130* is the exact revision of the *dataflow:v1b4* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.2*.
//! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/dataflow1_b4).
//! # Features
//!
@@ -20,6 +20,8 @@
//!
//! * **[Hub](struct.Dataflow.html)**
//! * a central object to maintain state and allow accessing all *Activities*
//! * creates [*Method Builders*](trait.MethodsBuilder.html) which in turn
//! allow access to individual [*Call Builders*](trait.CallBuilder.html)
//! * **[Resources](trait.Resource.html)**
//! * primary types that you can apply *Activities* to
//! * a collection of properties and *Parts*
@@ -29,6 +31,8 @@
//! * **[Activities](trait.CallBuilder.html)**
//! * operations to apply to *Resources*
//!
//! All *structures* are marked with applicable traits to further categorize them and ease browsing.
//!
//! Generally speaking, you can invoke *Activities* like this:
//!
//! ```Rust,ignore
@@ -88,7 +92,7 @@
//! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This
//! makes the system potentially resilient to all kinds of errors.
//!
//! ## Uploads and Downlods
//! ## Uploads and Downloads
//! If a method supports downloads, the response body, which is part of the [Result](enum.Result.html), should be
//! read by you to obtain the media.
//! If such a method also supports a [Response Result](trait.ResponseResult.html), it will return that by default.
@@ -111,8 +115,9 @@
//! ## Optional Parts in Server-Requests
//!
//! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and
//! [decodable](trait.ResponseResult.html) via json. Optionals are used to indicate that partial requests are responses are valid.
//! Most optionals are are considered [Parts](trait.Part.html) which are identifyable by name, which will be sent to
//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses
//! are valid.
//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to
//! the server to indicate either the set parts of the request or the desired parts in the response.
//!
//! ## Builder Arguments
@@ -161,7 +166,7 @@ use std::io;
use std::fs;
use std::thread::sleep;
pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, ResourceMethodsBuilder, Resource, JsonServerError};
pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder, Hub, ReadSeek, Part, ResponseResult, RequestValue, NestedType, Delegate, DefaultDelegate, MethodsBuilder, Resource, JsonServerError};
// ##############
@@ -223,14 +228,14 @@ impl<'a, C, NC, A> Dataflow<C, NC, A>
Dataflow {
client: RefCell::new(client),
auth: RefCell::new(authenticator),
_user_agent: "google-api-rust-client/0.1.1".to_string(),
_user_agent: "google-api-rust-client/0.1.2".to_string(),
_m: PhantomData
}
}
/// Set the user-agent header field to use in all requests to the server.
/// It defaults to `google-api-rust-client/0.1.1`.
/// It defaults to `google-api-rust-client/0.1.2`.
///
/// Returns the previously set user-agent.
pub fn user_agent(&mut self, agent_name: String) -> String {