chore(source): add source at latest version

This commit is contained in:
Sebastian Thiel
2015-08-08 11:50:37 +02:00
parent 8ab4fd0bd4
commit 08d65ba62b
770 changed files with 25835 additions and 10900 deletions

View File

@@ -4,7 +4,7 @@
[package]
name = "google-cloudmonitoring2_beta2"
version = "0.1.8+20150616"
version = "0.1.9+20150713"
authors = ["Sebastian Thiel <byronimo@gmail.com>"]
description = "A complete library to interact with Cloud Monitoring (protocol v2beta2)"
repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/cloudmonitoring2_beta2"
@@ -16,9 +16,10 @@ build = "src/build.rs"
[dependencies]
hyper = ">= 0.6.4"
mime = "0.0.12"
serde = ">= 0.4.1"
hyper = ">= 0.6.8"
mime = "0.1.0"
serde = ">= 0.5.0"
serde_json = "*"
yup-oauth2 = "*"
url = "*"

View File

@@ -5,7 +5,7 @@ DO NOT EDIT !
-->
The `google-cloudmonitoring2_beta2` library allows access to all features of the *Google Cloud Monitoring* service.
This documentation was generated from *Cloud Monitoring* crate version *0.1.8+20150616*, where *20150616* is the exact revision of the *cloudmonitoring:v2beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.8*.
This documentation was generated from *Cloud Monitoring* crate version *0.1.9+20150713*, where *20150713* is the exact revision of the *cloudmonitoring:v2beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.9*.
Everything else about the *Cloud Monitoring* *v2_beta2* API can be found at the
[official documentation site](https://cloud.google.com/monitoring/v2beta2/).

View File

@@ -16,7 +16,7 @@ use hyper::http::h1::LINE_ENDING;
use hyper::method::Method;
use hyper::status::StatusCode;
use serde;
use serde_json as json;
/// Identifies the Hub. There is only one per library, this trait is supposed
/// to make intended use more explicit.
@@ -188,7 +188,7 @@ pub trait Delegate {
///
/// * `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) {
fn response_json_decode_error(&mut self, json_encoded_value: &str, json_decode_error: &json::Error) {
let _ = json_encoded_value;
let _ = json_decode_error;
}
@@ -275,7 +275,7 @@ pub enum Error {
/// Shows that we failed to decode the server response.
/// This can happen if the protocol changes in conjunction with strict json decoding.
JsonDecodeError(String, serde::json::Error),
JsonDecodeError(String, json::Error),
/// Indicates an HTTP repsonse with a non-success status code
Failure(hyper::client::Response),
@@ -718,8 +718,8 @@ impl<'a, A> ResumableUploadHelper<'a, A>
let mut json_err = String::new();
res.read_to_string(&mut json_err).unwrap();
if let Retry::After(d) = self.delegate.http_failure(&res,
serde::json::from_str(&json_err).ok(),
serde::json::from_str(&json_err).ok()) {
json::from_str(&json_err).ok(),
json::from_str(&json_err).ok()) {
sleep_ms(d.num_milliseconds() as u32);
continue;
}
@@ -740,9 +740,9 @@ impl<'a, A> ResumableUploadHelper<'a, A>
// Copy of src/rust/cli/cmn.rs
// TODO(ST): Allow sharing common code between program types
pub fn remove_json_null_values(value: &mut serde::json::value::Value) {
pub fn remove_json_null_values(value: &mut json::value::Value) {
match *value {
serde::json::value::Value::Object(ref mut map) => {
json::value::Value::Object(ref mut map) => {
let mut for_removal = Vec::new();
for (key, mut value) in map.iter_mut() {

View File

@@ -2,7 +2,7 @@
// This file was generated automatically from 'src/mako/api/lib.rs.mako'
// DO NOT EDIT !
//! This documentation was generated from *Cloud Monitoring* crate version *0.1.8+20150616*, where *20150616* is the exact revision of the *cloudmonitoring:v2beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.8*.
//! This documentation was generated from *Cloud Monitoring* crate version *0.1.9+20150713*, where *20150713* is the exact revision of the *cloudmonitoring:v2beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.9*.
//!
//! Everything else about the *Cloud Monitoring* *v2_beta2* API can be found at the
//! [official documentation site](https://cloud.google.com/monitoring/v2beta2/).

View File

@@ -4,6 +4,7 @@
extern crate hyper;
extern crate serde;
extern crate serde_json;
extern crate yup_oauth2 as oauth2;
extern crate mime;
extern crate url;
@@ -15,7 +16,7 @@ use std::cell::RefCell;
use std::borrow::BorrowMut;
use std::default::Default;
use std::collections::BTreeMap;
use serde::json;
use serde_json as json;
use std::io;
use std::fs;
use std::thread::sleep_ms;
@@ -34,6 +35,9 @@ pub use cmn::{MultiPartReader, ToParts, MethodInfo, Result, Error, CallBuilder,
/// [authorization token](https://developers.google.com/youtube/v3/guides/authentication).
#[derive(PartialEq, Eq, Hash)]
pub enum Scope {
/// View and manage your data across Google Cloud Platform services
CloudPlatform,
/// View and write monitoring data for all of your Google and third-party Cloud and API projects
Monitoring,
}
@@ -41,6 +45,7 @@ pub enum Scope {
impl AsRef<str> for Scope {
fn as_ref(&self) -> &str {
match *self {
Scope::CloudPlatform => "https://www.googleapis.com/auth/cloud-platform",
Scope::Monitoring => "https://www.googleapis.com/auth/monitoring",
}
}
@@ -134,7 +139,7 @@ impl<'a, C, A> CloudMonitoring<C, A>
CloudMonitoring {
client: RefCell::new(client),
auth: RefCell::new(authenticator),
_user_agent: "google-api-rust-client/0.1.8".to_string(),
_user_agent: "google-api-rust-client/0.1.9".to_string(),
}
}
@@ -149,7 +154,7 @@ impl<'a, C, A> CloudMonitoring<C, A>
}
/// Set the user-agent header field to use in all requests to the server.
/// It defaults to `google-api-rust-client/0.1.8`.
/// It defaults to `google-api-rust-client/0.1.9`.
///
/// Returns the previously set user-agent.
pub fn user_agent(&mut self, agent_name: String) -> String {
@@ -963,7 +968,7 @@ impl<'a, C, A> TimeseriesDescriptorListCall<'a, C, A> where C: BorrowMut<hyper::
let mut url = "https://www.googleapis.com/cloudmonitoring/v2beta2/projects/{project}/timeseriesDescriptors/{metric}".to_string();
if self._scopes.len() == 0 {
self._scopes.insert(Scope::Monitoring.as_ref().to_string(), ());
self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ());
}
for &(find_this, param_name) in [("{project}", "project"), ("{metric}", "metric")].iter() {
@@ -1221,7 +1226,7 @@ impl<'a, C, A> TimeseriesDescriptorListCall<'a, C, A> where C: BorrowMut<hyper::
/// Identifies the authorization scope for the method you are building.
///
/// Use this method to actively specify which scope should be used, instead the default `Scope` variant
/// `Scope::Monitoring`.
/// `Scope::CloudPlatform`.
///
/// The `scope` will be added to a set of scopes. This is important as one can maintain access
/// tokens for more than one scope.
@@ -1316,7 +1321,7 @@ impl<'a, C, A> TimeseryWriteCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
let mut url = "https://www.googleapis.com/cloudmonitoring/v2beta2/projects/{project}/timeseries:write".to_string();
if self._scopes.len() == 0 {
self._scopes.insert(Scope::Monitoring.as_ref().to_string(), ());
self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ());
}
for &(find_this, param_name) in [("{project}", "project")].iter() {
@@ -1488,7 +1493,7 @@ impl<'a, C, A> TimeseryWriteCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
/// Identifies the authorization scope for the method you are building.
///
/// Use this method to actively specify which scope should be used, instead the default `Scope` variant
/// `Scope::Monitoring`.
/// `Scope::CloudPlatform`.
///
/// The `scope` will be added to a set of scopes. This is important as one can maintain access
/// tokens for more than one scope.
@@ -1626,7 +1631,7 @@ impl<'a, C, A> TimeseryListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
let mut url = "https://www.googleapis.com/cloudmonitoring/v2beta2/projects/{project}/timeseries/{metric}".to_string();
if self._scopes.len() == 0 {
self._scopes.insert(Scope::Monitoring.as_ref().to_string(), ());
self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ());
}
for &(find_this, param_name) in [("{project}", "project"), ("{metric}", "metric")].iter() {
@@ -1884,7 +1889,7 @@ impl<'a, C, A> TimeseryListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
/// Identifies the authorization scope for the method you are building.
///
/// Use this method to actively specify which scope should be used, instead the default `Scope` variant
/// `Scope::Monitoring`.
/// `Scope::CloudPlatform`.
///
/// The `scope` will be added to a set of scopes. This is important as one can maintain access
/// tokens for more than one scope.
@@ -1994,7 +1999,7 @@ impl<'a, C, A> MetricDescriptorListCall<'a, C, A> where C: BorrowMut<hyper::Clie
let mut url = "https://www.googleapis.com/cloudmonitoring/v2beta2/projects/{project}/metricDescriptors".to_string();
if self._scopes.len() == 0 {
self._scopes.insert(Scope::Monitoring.as_ref().to_string(), ());
self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ());
}
for &(find_this, param_name) in [("{project}", "project")].iter() {
@@ -2187,7 +2192,7 @@ impl<'a, C, A> MetricDescriptorListCall<'a, C, A> where C: BorrowMut<hyper::Clie
/// Identifies the authorization scope for the method you are building.
///
/// Use this method to actively specify which scope should be used, instead the default `Scope` variant
/// `Scope::Monitoring`.
/// `Scope::CloudPlatform`.
///
/// The `scope` will be added to a set of scopes. This is important as one can maintain access
/// tokens for more than one scope.
@@ -2277,7 +2282,7 @@ impl<'a, C, A> MetricDescriptorDeleteCall<'a, C, A> where C: BorrowMut<hyper::Cl
let mut url = "https://www.googleapis.com/cloudmonitoring/v2beta2/projects/{project}/metricDescriptors/{metric}".to_string();
if self._scopes.len() == 0 {
self._scopes.insert(Scope::Monitoring.as_ref().to_string(), ());
self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ());
}
for &(find_this, param_name) in [("{project}", "project"), ("{metric}", "metric")].iter() {
@@ -2435,7 +2440,7 @@ impl<'a, C, A> MetricDescriptorDeleteCall<'a, C, A> where C: BorrowMut<hyper::Cl
/// Identifies the authorization scope for the method you are building.
///
/// Use this method to actively specify which scope should be used, instead the default `Scope` variant
/// `Scope::Monitoring`.
/// `Scope::CloudPlatform`.
///
/// The `scope` will be added to a set of scopes. This is important as one can maintain access
/// tokens for more than one scope.
@@ -2530,7 +2535,7 @@ impl<'a, C, A> MetricDescriptorCreateCall<'a, C, A> where C: BorrowMut<hyper::Cl
let mut url = "https://www.googleapis.com/cloudmonitoring/v2beta2/projects/{project}/metricDescriptors".to_string();
if self._scopes.len() == 0 {
self._scopes.insert(Scope::Monitoring.as_ref().to_string(), ());
self._scopes.insert(Scope::CloudPlatform.as_ref().to_string(), ());
}
for &(find_this, param_name) in [("{project}", "project")].iter() {
@@ -2702,7 +2707,7 @@ impl<'a, C, A> MetricDescriptorCreateCall<'a, C, A> where C: BorrowMut<hyper::Cl
/// Identifies the authorization scope for the method you are building.
///
/// Use this method to actively specify which scope should be used, instead the default `Scope` variant
/// `Scope::Monitoring`.
/// `Scope::CloudPlatform`.
///
/// The `scope` will be added to a set of scopes. This is important as one can maintain access
/// tokens for more than one scope.