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

@@ -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 *pubsub* crate version *0.1.8+20150427*, where *20150427* is the exact revision of the *pubsub:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.8*.
//! This documentation was generated from *pubsub* crate version *0.1.9+20150604*, where *20150604* is the exact revision of the *pubsub:v1beta2* schema built by the [mako](http://www.makotemplates.org/) code generator *v0.1.9*.
//!
//! Everything else about the *pubsub* *v1_beta2* API can be found at the
//! [official documentation site](https://cloud.google.com/pubsub/docs).

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;
@@ -135,7 +136,7 @@ impl<'a, C, A> Pubsub<C, A>
Pubsub {
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(),
}
}
@@ -144,7 +145,7 @@ impl<'a, C, A> Pubsub<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 {
@@ -294,7 +295,7 @@ pub struct ModifyAckDeadlineRequest {
/// The new ack deadline with respect to the time this request was sent to the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack deadline will expire 10 seconds after the ModifyAckDeadline call was made. Specifying zero may immediately make the message available for another pull request.
#[serde(rename="ackDeadlineSeconds")]
pub ack_deadline_seconds: Option<i32>,
/// The acknowledgment ID.
/// The acknowledgment ID. Either this or ack_ids must be populated, but not both.
#[serde(rename="ackId")]
pub ack_id: Option<String>,
/// List of acknowledgment IDs.
@@ -339,7 +340,7 @@ pub struct PushConfig {
impl Part for PushConfig {}
/// # Overview The `Policy` defines an access control policy language. It can be used to define policies that can be attached to resources like files, folders, VMs, etc. # Policy structure A `Policy` consists of a list of bindings. A `Binding` binds a set of members to a role, where the members can include user accounts, user groups, user domains, and service accounts. A role is a named set of permissions, defined by the IAM system. The definition of a role is outside the policy. A permission check involves determining the roles that include the specified permission, and then determining if the principal specified by the check is a member of a binding to at least one of these roles. The membership check is recursive when a group is bound to a role. Policy examples: ``` { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group::admins@example.com", "domain:google.com", "serviceAccount:frontend@example.iam.gserviceaccounts.com"] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } ```
/// # Overview The `Policy` defines an access control policy language. It is used to define policies that are attached to resources like files, folders, VMs, etc. # Policy structure A `Policy` consists of a list of bindings. A `Binding` binds a set of members to a role, where the members include user accounts, user groups, user domains, and service accounts. A 'role' is a named set of permissions, defined by IAM. The definition of a role is outside the policy. A permission check first determines the roles that include the specified permission, and then determines if the principal specified is a member of a binding to at least one of these roles. The membership check is recursive when a group is bound to a role. Policy examples: ``` { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:frontend@example.iam.gserviceaccounts.com"] }, { "role": "roles/viewer", "members": ["user:sean@example.com"] } ] } ```
///
/// # Activities
///
@@ -357,7 +358,7 @@ pub struct Policy {
pub rules: Option<Vec<Rule>>,
/// It is an error to specify multiple bindings for the same role. It is an error to specify a binding with no members.
pub bindings: Option<Vec<Binding>>,
/// The policy language version. The version of the policy itself is represented by the etag. The current version is 0.
/// The policy language version. The version of the policy is represented by the etag. The default version is 0.
pub version: Option<i32>,
/// Can be used to perform a read-modify-write.
pub etag: Option<String>,
@@ -427,7 +428,7 @@ pub struct ModifyPushConfigRequest {
impl RequestValue for ModifyPushConfigRequest {}
/// A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
/// A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
///
/// # Activities
///
@@ -512,7 +513,7 @@ pub struct PullRequest {
impl RequestValue for PullRequest {}
/// Associates members of various types with roles. See below for details of the various objects that can be included as members.
/// Associates members with roles. See below for allowed formats of members.
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
@@ -549,7 +550,7 @@ impl Part for DataAccessOptions {}
///
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct Topic {
/// The name of the topic. It must have the format "projects/{project}/topics/{topic}" for Google Cloud Pub/Sub API v1beta2. {topic} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".
/// The name of the topic. It must have the format "projects/{project}/topics/{topic}" for Google Cloud Pub/Sub API v1 and v1beta2. {topic} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".
pub name: Option<String>,
}
@@ -667,7 +668,7 @@ impl Part for Condition {}
///
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct Subscription {
/// The name of the topic from which this subscription is receiving messages. This will be present if and only if the subscription has not been detached from its topic.
/// The name of the topic from which this subscription is receiving messages. The value of this field will be `_deleted-topic_` if the topic has been deleted.
pub topic: Option<String>,
/// This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message. After message delivery but before the ack deadline expires and before the message is acknowledged, it is an outstanding message and will not be delivered again during that time (on a best-effort basis). For pull delivery this value is used as the initial value for the ack deadline. It may be overridden for each message using its corresponding ack_id by calling ModifyAckDeadline. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message. If this parameter is not set, the default value of 60 seconds is used.
#[serde(rename="ackDeadlineSeconds")]
@@ -675,7 +676,7 @@ pub struct Subscription {
/// If push delivery is used with this subscription, this field is used to configure it. An empty pushConfig signifies that the subscriber will pull and ack messages using API methods.
#[serde(rename="pushConfig")]
pub push_config: Option<PushConfig>,
/// The name of the subscription. It must have the format "projects/{project}/subscriptions/{subscription}" for Google Cloud Pub/Sub API v1beta2. {subscription} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".
/// The name of the subscription. It must have the format "projects/{project}/subscriptions/{subscription}" for Google Cloud Pub/Sub API v1 and v1beta2. {subscription} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".
pub name: Option<String>,
}
@@ -771,7 +772,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> {
/// # Arguments
///
/// * `request` - No description provided.
/// * `name` - The name of the topic. It must have the format "projects/{project}/topics/{topic}" for Google Cloud Pub/Sub API v1beta2. {topic} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".
/// * `name` - The name of the topic. It must have the format "projects/{project}/topics/{topic}" for Google Cloud Pub/Sub API v1 and v1beta2. {topic} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".
pub fn topics_create(&self, request: Topic, name: &str) -> ProjectTopicCreateCall<'a, C, A> {
ProjectTopicCreateCall {
hub: self.hub,
@@ -790,7 +791,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> {
/// # Arguments
///
/// * `request` - No description provided.
/// * `resource` - REQUIRED: The resource for which policy detail is being requested. Usually some path like projects/{project}.
/// * `resource` - REQUIRED: The resource for which policy detail is being requested. Resource is usually specified as a path, such as, projects/{project}.
pub fn topics_test_iam_permissions(&self, request: TestIamPermissionsRequest, resource: &str) -> ProjectTopicTestIamPermissionCall<'a, C, A> {
ProjectTopicTestIamPermissionCall {
hub: self.hub,
@@ -859,11 +860,11 @@ impl<'a, C, A> ProjectMethods<'a, C, A> {
/// Create a builder to help you perform the following task:
///
/// Gets the access control policy for a resource. May be empty if no such policy or resource exists.
/// Gets the access control policy for a resource. Is empty if the policy or the resource does not exist.
///
/// # Arguments
///
/// * `resource` - REQUIRED: The resource for which policy is being requested. Usually some path like projects/{project}.
/// * `resource` - REQUIRED: The resource for which policy is being requested. Resource is usually specified as a path, such as, projects/{project}.
pub fn topics_get_iam_policy(&self, resource: &str) -> ProjectTopicGetIamPolicyCall<'a, C, A> {
ProjectTopicGetIamPolicyCall {
hub: self.hub,
@@ -917,7 +918,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> {
/// # Arguments
///
/// * `request` - No description provided.
/// * `resource` - REQUIRED: The resource for which policy is being specified. Usually some path like projects/{project}/zones/{zone}/disks/{disk}.
/// * `resource` - REQUIRED: The resource for which policy is being specified. Resource is usually specified as a path, such as, projects/{project}/zones/{zone}/disks/{disk}.
pub fn topics_set_iam_policy(&self, request: SetIamPolicyRequest, resource: &str) -> ProjectTopicSetIamPolicyCall<'a, C, A> {
ProjectTopicSetIamPolicyCall {
hub: self.hub,
@@ -936,7 +937,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> {
/// # Arguments
///
/// * `request` - No description provided.
/// * `name` - The name of the subscription. It must have the format "projects/{project}/subscriptions/{subscription}" for Google Cloud Pub/Sub API v1beta2. {subscription} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".
/// * `name` - The name of the subscription. It must have the format "projects/{project}/subscriptions/{subscription}" for Google Cloud Pub/Sub API v1 and v1beta2. {subscription} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".
pub fn subscriptions_create(&self, request: Subscription, name: &str) -> ProjectSubscriptionCreateCall<'a, C, A> {
ProjectSubscriptionCreateCall {
hub: self.hub,
@@ -969,11 +970,11 @@ impl<'a, C, A> ProjectMethods<'a, C, A> {
/// Create a builder to help you perform the following task:
///
/// Gets the access control policy for a resource. May be empty if no such policy or resource exists.
/// Gets the access control policy for a resource. Is empty if the policy or the resource does not exist.
///
/// # Arguments
///
/// * `resource` - REQUIRED: The resource for which policy is being requested. Usually some path like projects/{project}.
/// * `resource` - REQUIRED: The resource for which policy is being requested. Resource is usually specified as a path, such as, projects/{project}.
pub fn subscriptions_get_iam_policy(&self, resource: &str) -> ProjectSubscriptionGetIamPolicyCall<'a, C, A> {
ProjectSubscriptionGetIamPolicyCall {
hub: self.hub,
@@ -991,7 +992,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> {
/// # Arguments
///
/// * `request` - No description provided.
/// * `resource` - REQUIRED: The resource for which policy detail is being requested. Usually some path like projects/{project}.
/// * `resource` - REQUIRED: The resource for which policy detail is being requested. Resource is usually specified as a path, such as, projects/{project}.
pub fn subscriptions_test_iam_permissions(&self, request: TestIamPermissionsRequest, resource: &str) -> ProjectSubscriptionTestIamPermissionCall<'a, C, A> {
ProjectSubscriptionTestIamPermissionCall {
hub: self.hub,
@@ -1005,7 +1006,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> {
/// Create a builder to help you perform the following task:
///
/// Deletes the topic with the given name. Returns NOT_FOUND if the topic does not exist. After a topic is deleted, a new topic may be created with the same name; this is an entirely new topic with none of the old configuration or subscriptions. Existing subscriptions to this topic are not deleted.
/// Deletes the topic with the given name. Returns NOT_FOUND if the topic does not exist. After a topic is deleted, a new topic may be created with the same name; this is an entirely new topic with none of the old configuration or subscriptions. Existing subscriptions to this topic are not deleted, but their `topic` field is set to `_deleted-topic_`.
///
/// # Arguments
///
@@ -1082,7 +1083,7 @@ impl<'a, C, A> ProjectMethods<'a, C, A> {
/// # Arguments
///
/// * `request` - No description provided.
/// * `resource` - REQUIRED: The resource for which policy is being specified. Usually some path like projects/{project}/zones/{zone}/disks/{disk}.
/// * `resource` - REQUIRED: The resource for which policy is being specified. Resource is usually specified as a path, such as, projects/{project}/zones/{zone}/disks/{disk}.
pub fn subscriptions_set_iam_policy(&self, request: SetIamPolicyRequest, resource: &str) -> ProjectSubscriptionSetIamPolicyCall<'a, C, A> {
ProjectSubscriptionSetIamPolicyCall {
hub: self.hub,
@@ -1859,7 +1860,7 @@ impl<'a, C, A> ProjectTopicCreateCall<'a, C, A> where C: BorrowMut<hyper::Client
self._request = new_value;
self
}
/// The name of the topic. It must have the format "projects/{project}/topics/{topic}" for Google Cloud Pub/Sub API v1beta2. {topic} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".
/// The name of the topic. It must have the format "projects/{project}/topics/{topic}" for Google Cloud Pub/Sub API v1 and v1beta2. {topic} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".
///
/// Sets the *name* path property to the given value.
///
@@ -2136,7 +2137,7 @@ impl<'a, C, A> ProjectTopicTestIamPermissionCall<'a, C, A> where C: BorrowMut<hy
self._request = new_value;
self
}
/// REQUIRED: The resource for which policy detail is being requested. Usually some path like projects/{project}.
/// REQUIRED: The resource for which policy detail is being requested. Resource is usually specified as a path, such as, projects/{project}.
///
/// Sets the *resource* path property to the given value.
///
@@ -3004,7 +3005,7 @@ impl<'a, C, A> ProjectTopicGetCall<'a, C, A> where C: BorrowMut<hyper::Client>,
}
/// Gets the access control policy for a resource. May be empty if no such policy or resource exists.
/// Gets the access control policy for a resource. Is empty if the policy or the resource does not exist.
///
/// A builder for the *topics.getIamPolicy* method supported by a *project* resource.
/// It is not used directly, but through a `ProjectMethods` instance.
@@ -3182,7 +3183,7 @@ impl<'a, C, A> ProjectTopicGetIamPolicyCall<'a, C, A> where C: BorrowMut<hyper::
}
/// REQUIRED: The resource for which policy is being requested. Usually some path like projects/{project}.
/// REQUIRED: The resource for which policy is being requested. Resource is usually specified as a path, such as, projects/{project}.
///
/// Sets the *resource* path property to the given value.
///
@@ -3982,7 +3983,7 @@ impl<'a, C, A> ProjectTopicSetIamPolicyCall<'a, C, A> where C: BorrowMut<hyper::
self._request = new_value;
self
}
/// REQUIRED: The resource for which policy is being specified. Usually some path like projects/{project}/zones/{zone}/disks/{disk}.
/// REQUIRED: The resource for which policy is being specified. Resource is usually specified as a path, such as, projects/{project}/zones/{zone}/disks/{disk}.
///
/// Sets the *resource* path property to the given value.
///
@@ -4259,7 +4260,7 @@ impl<'a, C, A> ProjectSubscriptionCreateCall<'a, C, A> where C: BorrowMut<hyper:
self._request = new_value;
self
}
/// The name of the subscription. It must have the format "projects/{project}/subscriptions/{subscription}" for Google Cloud Pub/Sub API v1beta2. {subscription} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".
/// The name of the subscription. It must have the format "projects/{project}/subscriptions/{subscription}" for Google Cloud Pub/Sub API v1 and v1beta2. {subscription} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9], dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".
///
/// Sets the *name* path property to the given value.
///
@@ -4604,7 +4605,7 @@ impl<'a, C, A> ProjectSubscriptionAcknowledgeCall<'a, C, A> where C: BorrowMut<h
}
/// Gets the access control policy for a resource. May be empty if no such policy or resource exists.
/// Gets the access control policy for a resource. Is empty if the policy or the resource does not exist.
///
/// A builder for the *subscriptions.getIamPolicy* method supported by a *project* resource.
/// It is not used directly, but through a `ProjectMethods` instance.
@@ -4782,7 +4783,7 @@ impl<'a, C, A> ProjectSubscriptionGetIamPolicyCall<'a, C, A> where C: BorrowMut<
}
/// REQUIRED: The resource for which policy is being requested. Usually some path like projects/{project}.
/// REQUIRED: The resource for which policy is being requested. Resource is usually specified as a path, such as, projects/{project}.
///
/// Sets the *resource* path property to the given value.
///
@@ -5059,7 +5060,7 @@ impl<'a, C, A> ProjectSubscriptionTestIamPermissionCall<'a, C, A> where C: Borro
self._request = new_value;
self
}
/// REQUIRED: The resource for which policy detail is being requested. Usually some path like projects/{project}.
/// REQUIRED: The resource for which policy detail is being requested. Resource is usually specified as a path, such as, projects/{project}.
///
/// Sets the *resource* path property to the given value.
///
@@ -5127,7 +5128,7 @@ impl<'a, C, A> ProjectSubscriptionTestIamPermissionCall<'a, C, A> where C: Borro
}
/// Deletes the topic with the given name. Returns NOT_FOUND if the topic does not exist. After a topic is deleted, a new topic may be created with the same name; this is an entirely new topic with none of the old configuration or subscriptions. Existing subscriptions to this topic are not deleted.
/// Deletes the topic with the given name. Returns NOT_FOUND if the topic does not exist. After a topic is deleted, a new topic may be created with the same name; this is an entirely new topic with none of the old configuration or subscriptions. Existing subscriptions to this topic are not deleted, but their `topic` field is set to `_deleted-topic_`.
///
/// A builder for the *topics.delete* method supported by a *project* resource.
/// It is not used directly, but through a `ProjectMethods` instance.
@@ -6368,7 +6369,7 @@ impl<'a, C, A> ProjectSubscriptionSetIamPolicyCall<'a, C, A> where C: BorrowMut<
self._request = new_value;
self
}
/// REQUIRED: The resource for which policy is being specified. Usually some path like projects/{project}/zones/{zone}/disks/{disk}.
/// REQUIRED: The resource for which policy is being specified. Resource is usually specified as a path, such as, projects/{project}/zones/{zone}/disks/{disk}.
///
/// Sets the *resource* path property to the given value.
///