Publish latest versions of all APIs

This commit is contained in:
Sebastian Thiel
2017-09-27 14:54:55 +02:00
parent 3a6ef3db41
commit 059d6700dd
1024 changed files with 515705 additions and 77998 deletions

View File

@@ -4,12 +4,12 @@
[package]
name = "google-safebrowsing4"
version = "1.0.6+20170509"
version = "1.0.6+20170921"
authors = ["Sebastian Thiel <byronimo@gmail.com>"]
description = "A complete library to interact with safebrowsing (protocol v4)"
repository = "https://github.com/Byron/google-apis-rs/tree/master/gen/safebrowsing4"
homepage = "https://developers.google.com/safe-browsing/"
documentation = "https://docs.rs/google-safebrowsing4/1.0.6+20170509"
documentation = "https://docs.rs/google-safebrowsing4/1.0.6+20170921"
license = "MIT"
keywords = ["safebrowsing", "google", "protocol", "web", "api"]

View File

@@ -5,26 +5,26 @@ DO NOT EDIT !
-->
The `google-safebrowsing4` library allows access to all features of the *Google safebrowsing* service.
This documentation was generated from *safebrowsing* crate version *1.0.6+20170509*, where *20170509* is the exact revision of the *safebrowsing:v4* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.6*.
This documentation was generated from *safebrowsing* crate version *1.0.6+20170921*, where *20170921* is the exact revision of the *safebrowsing:v4* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.6*.
Everything else about the *safebrowsing* *v4* API can be found at the
[official documentation site](https://developers.google.com/safe-browsing/).
# Features
Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-safebrowsing4/1.0.6+20170509/google_safebrowsing4/struct.Safebrowsing.html) ...
Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-safebrowsing4/1.0.6+20170921/google_safebrowsing4/struct.Safebrowsing.html) ...
* encoded full hashes
* [*get*](https://docs.rs/google-safebrowsing4/1.0.6+20170509/google_safebrowsing4/struct.EncodedFullHasheGetCall.html)
* [*get*](https://docs.rs/google-safebrowsing4/1.0.6+20170921/google_safebrowsing4/struct.EncodedFullHasheGetCall.html)
* encoded updates
* [*get*](https://docs.rs/google-safebrowsing4/1.0.6+20170509/google_safebrowsing4/struct.EncodedUpdateGetCall.html)
* [*get*](https://docs.rs/google-safebrowsing4/1.0.6+20170921/google_safebrowsing4/struct.EncodedUpdateGetCall.html)
* full hashes
* [*find*](https://docs.rs/google-safebrowsing4/1.0.6+20170509/google_safebrowsing4/struct.FullHasheFindCall.html)
* [*find*](https://docs.rs/google-safebrowsing4/1.0.6+20170921/google_safebrowsing4/struct.FullHasheFindCall.html)
* threat list updates
* [*fetch*](https://docs.rs/google-safebrowsing4/1.0.6+20170509/google_safebrowsing4/struct.ThreatListUpdateFetchCall.html)
* [*fetch*](https://docs.rs/google-safebrowsing4/1.0.6+20170921/google_safebrowsing4/struct.ThreatListUpdateFetchCall.html)
* threat lists
* [*list*](https://docs.rs/google-safebrowsing4/1.0.6+20170509/google_safebrowsing4/struct.ThreatListListCall.html)
* [*list*](https://docs.rs/google-safebrowsing4/1.0.6+20170921/google_safebrowsing4/struct.ThreatListListCall.html)
* threat matches
* [*find*](https://docs.rs/google-safebrowsing4/1.0.6+20170509/google_safebrowsing4/struct.ThreatMatcheFindCall.html)
* [*find*](https://docs.rs/google-safebrowsing4/1.0.6+20170921/google_safebrowsing4/struct.ThreatMatcheFindCall.html)
@@ -33,17 +33,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r
The API is structured into the following primary items:
* **[Hub](https://docs.rs/google-safebrowsing4/1.0.6+20170509/google_safebrowsing4/struct.Safebrowsing.html)**
* **[Hub](https://docs.rs/google-safebrowsing4/1.0.6+20170921/google_safebrowsing4/struct.Safebrowsing.html)**
* a central object to maintain state and allow accessing all *Activities*
* creates [*Method Builders*](https://docs.rs/google-safebrowsing4/1.0.6+20170509/google_safebrowsing4/trait.MethodsBuilder.html) which in turn
allow access to individual [*Call Builders*](https://docs.rs/google-safebrowsing4/1.0.6+20170509/google_safebrowsing4/trait.CallBuilder.html)
* **[Resources](https://docs.rs/google-safebrowsing4/1.0.6+20170509/google_safebrowsing4/trait.Resource.html)**
* creates [*Method Builders*](https://docs.rs/google-safebrowsing4/1.0.6+20170921/google_safebrowsing4/trait.MethodsBuilder.html) which in turn
allow access to individual [*Call Builders*](https://docs.rs/google-safebrowsing4/1.0.6+20170921/google_safebrowsing4/trait.CallBuilder.html)
* **[Resources](https://docs.rs/google-safebrowsing4/1.0.6+20170921/google_safebrowsing4/trait.Resource.html)**
* primary types that you can apply *Activities* to
* a collection of properties and *Parts*
* **[Parts](https://docs.rs/google-safebrowsing4/1.0.6+20170509/google_safebrowsing4/trait.Part.html)**
* **[Parts](https://docs.rs/google-safebrowsing4/1.0.6+20170921/google_safebrowsing4/trait.Part.html)**
* a collection of properties
* never directly used in *Activities*
* **[Activities](https://docs.rs/google-safebrowsing4/1.0.6+20170509/google_safebrowsing4/trait.CallBuilder.html)**
* **[Activities](https://docs.rs/google-safebrowsing4/1.0.6+20170921/google_safebrowsing4/trait.CallBuilder.html)**
* operations to apply to *Resources*
All *structures* are marked with applicable traits to further categorize them and ease browsing.
@@ -129,17 +129,17 @@ match result {
```
## Handling Errors
All errors produced by the system are provided either as [Result](https://docs.rs/google-safebrowsing4/1.0.6+20170509/google_safebrowsing4/enum.Result.html) enumeration as return value of
All errors produced by the system are provided either as [Result](https://docs.rs/google-safebrowsing4/1.0.6+20170921/google_safebrowsing4/enum.Result.html) enumeration as return value of
the doit() methods, or handed as possibly intermediate results to either the
[Hub Delegate](https://docs.rs/google-safebrowsing4/1.0.6+20170509/google_safebrowsing4/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html).
[Hub Delegate](https://docs.rs/google-safebrowsing4/1.0.6+20170921/google_safebrowsing4/trait.Delegate.html), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html).
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 Downloads
If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-safebrowsing4/1.0.6+20170509/google_safebrowsing4/enum.Result.html), should be
If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-safebrowsing4/1.0.6+20170921/google_safebrowsing4/enum.Result.html), should be
read by you to obtain the media.
If such a method also supports a [Response Result](https://docs.rs/google-safebrowsing4/1.0.6+20170509/google_safebrowsing4/trait.ResponseResult.html), it will return that by default.
If such a method also supports a [Response Result](https://docs.rs/google-safebrowsing4/1.0.6+20170921/google_safebrowsing4/trait.ResponseResult.html), it will return that by default.
You can see it as meta-data for the actual media. To trigger a media download, you will have to set up the builder by making
this call: `.param("alt", "media")`.
@@ -149,29 +149,29 @@ Methods supporting uploads can do so using up to 2 different protocols:
## Customization and Callbacks
You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-safebrowsing4/1.0.6+20170509/google_safebrowsing4/trait.Delegate.html) to the
[Method Builder](https://docs.rs/google-safebrowsing4/1.0.6+20170509/google_safebrowsing4/trait.CallBuilder.html) before making the final `doit()` call.
You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-safebrowsing4/1.0.6+20170921/google_safebrowsing4/trait.Delegate.html) to the
[Method Builder](https://docs.rs/google-safebrowsing4/1.0.6+20170921/google_safebrowsing4/trait.CallBuilder.html) before making the final `doit()` call.
Respective methods will be called to provide progress information, as well as determine whether the system should
retry on failure.
The [delegate trait](https://docs.rs/google-safebrowsing4/1.0.6+20170509/google_safebrowsing4/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort.
The [delegate trait](https://docs.rs/google-safebrowsing4/1.0.6+20170921/google_safebrowsing4/trait.Delegate.html) is default-implemented, allowing you to customize it with minimal effort.
## Optional Parts in Server-Requests
All structures provided by this library are made to be [enocodable](https://docs.rs/google-safebrowsing4/1.0.6+20170509/google_safebrowsing4/trait.RequestValue.html) and
[decodable](https://docs.rs/google-safebrowsing4/1.0.6+20170509/google_safebrowsing4/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses
All structures provided by this library are made to be [enocodable](https://docs.rs/google-safebrowsing4/1.0.6+20170921/google_safebrowsing4/trait.RequestValue.html) and
[decodable](https://docs.rs/google-safebrowsing4/1.0.6+20170921/google_safebrowsing4/trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses
are valid.
Most optionals are are considered [Parts](https://docs.rs/google-safebrowsing4/1.0.6+20170509/google_safebrowsing4/trait.Part.html) which are identifiable by name, which will be sent to
Most optionals are are considered [Parts](https://docs.rs/google-safebrowsing4/1.0.6+20170921/google_safebrowsing4/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
Using [method builders](https://docs.rs/google-safebrowsing4/1.0.6+20170509/google_safebrowsing4/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods.
Using [method builders](https://docs.rs/google-safebrowsing4/1.0.6+20170921/google_safebrowsing4/trait.CallBuilder.html), you are able to prepare an action call by repeatedly calling it's methods.
These will always take a single argument, for which the following statements are true.
* [PODs][wiki-pod] are handed by copy
* strings are passed as `&str`
* [request values](https://docs.rs/google-safebrowsing4/1.0.6+20170509/google_safebrowsing4/trait.RequestValue.html) are moved
* [request values](https://docs.rs/google-safebrowsing4/1.0.6+20170921/google_safebrowsing4/trait.RequestValue.html) are moved
Arguments will always be copied or cloned into the builder, to make them independent of their original life times.

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 *safebrowsing* crate version *1.0.6+20170509*, where *20170509* is the exact revision of the *safebrowsing:v4* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.6*.
//! This documentation was generated from *safebrowsing* crate version *1.0.6+20170921*, where *20170921* is the exact revision of the *safebrowsing:v4* schema built by the [mako](http://www.makotemplates.org/) code generator *v1.0.6*.
//!
//! Everything else about the *safebrowsing* *v4* API can be found at the
//! [official documentation site](https://developers.google.com/safe-browsing/).
@@ -450,17 +450,25 @@ pub struct Checksum {
impl Part for Checksum {}
/// A set of raw indices to remove from a local list.
/// Request to check entries against lists.
///
/// This type is not used in any activity, and only used as *part* of another schema.
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [find threat matches](struct.ThreatMatcheFindCall.html) (request)
///
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct RawIndices {
/// The indices to remove from a lexicographically-sorted local list.
pub indices: Option<Vec<i32>>,
pub struct FindThreatMatchesRequest {
/// The client metadata.
pub client: Option<ClientInfo>,
/// The lists and entries to be checked for matches.
#[serde(rename="threatInfo")]
pub threat_info: Option<ThreatInfo>,
}
impl Part for RawIndices {}
impl RequestValue for FindThreatMatchesRequest {}
/// A set of threats that should be added or removed from a client's local
@@ -610,13 +618,13 @@ impl Part for ThreatMatch {}
///
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct ClientInfo {
/// The version of the client implementation.
#[serde(rename="clientVersion")]
pub client_version: Option<String>,
/// A client ID that (hopefully) uniquely identifies the client implementation
/// of the Safe Browsing API.
#[serde(rename="clientId")]
pub client_id: Option<String>,
/// The version of the client implementation.
#[serde(rename="clientVersion")]
pub client_version: Option<String>,
}
impl Part for ClientInfo {}
@@ -717,10 +725,10 @@ impl Part for ThreatEntry {}
///
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct MetadataEntry {
/// The metadata entry value. For JSON requests, the value is base64-encoded.
pub value: Option<String>,
/// The metadata entry key. For JSON requests, the key is base64-encoded.
pub key: Option<String>,
/// The metadata entry value. For JSON requests, the value is base64-encoded.
pub value: Option<String>,
}
impl Part for MetadataEntry {}
@@ -769,25 +777,17 @@ pub struct ListThreatListsResponse {
impl ResponseResult for ListThreatListsResponse {}
/// Request to check entries against lists.
/// A set of raw indices to remove from a local list.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [find threat matches](struct.ThreatMatcheFindCall.html) (request)
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct FindThreatMatchesRequest {
/// The client metadata.
pub client: Option<ClientInfo>,
/// The lists and entries to be checked for matches.
#[serde(rename="threatInfo")]
pub threat_info: Option<ThreatInfo>,
pub struct RawIndices {
/// The indices to remove from a lexicographically-sorted local list.
pub indices: Option<Vec<i32>>,
}
impl RequestValue for FindThreatMatchesRequest {}
impl Part for RawIndices {}
/// Describes a Safe Browsing API update request. Clients can request updates for
@@ -1455,12 +1455,12 @@ impl<'a, C, A> EncodedFullHasheGetCall<'a, C, A> where C: BorrowMut<hyper::Clien
/// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks.
/// * *bearer_token* (query-string) - OAuth bearer token.
/// * *access_token* (query-string) - OAuth access token.
/// * *fields* (query-string) - Selector specifying which fields to include in a partial response.
/// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart").
/// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
/// * *callback* (query-string) - JSONP
/// * *oauth_token* (query-string) - OAuth 2.0 token for the current user.
/// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
/// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart").
/// * *fields* (query-string) - Selector specifying which fields to include in a partial response.
/// * *alt* (query-string) - Data format for response.
/// * *$.xgafv* (query-string) - V1 error format.
pub fn param<T>(mut self, name: T, value: T) -> EncodedFullHasheGetCall<'a, C, A>
@@ -1673,12 +1673,12 @@ impl<'a, C, A> FullHasheFindCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
/// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks.
/// * *bearer_token* (query-string) - OAuth bearer token.
/// * *access_token* (query-string) - OAuth access token.
/// * *fields* (query-string) - Selector specifying which fields to include in a partial response.
/// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart").
/// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
/// * *callback* (query-string) - JSONP
/// * *oauth_token* (query-string) - OAuth 2.0 token for the current user.
/// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
/// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart").
/// * *fields* (query-string) - Selector specifying which fields to include in a partial response.
/// * *alt* (query-string) - Data format for response.
/// * *$.xgafv* (query-string) - V1 error format.
pub fn param<T>(mut self, name: T, value: T) -> FullHasheFindCall<'a, C, A>
@@ -1892,12 +1892,12 @@ impl<'a, C, A> ThreatListUpdateFetchCall<'a, C, A> where C: BorrowMut<hyper::Cli
/// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks.
/// * *bearer_token* (query-string) - OAuth bearer token.
/// * *access_token* (query-string) - OAuth access token.
/// * *fields* (query-string) - Selector specifying which fields to include in a partial response.
/// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart").
/// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
/// * *callback* (query-string) - JSONP
/// * *oauth_token* (query-string) - OAuth 2.0 token for the current user.
/// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
/// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart").
/// * *fields* (query-string) - Selector specifying which fields to include in a partial response.
/// * *alt* (query-string) - Data format for response.
/// * *$.xgafv* (query-string) - V1 error format.
pub fn param<T>(mut self, name: T, value: T) -> ThreatListUpdateFetchCall<'a, C, A>
@@ -2137,12 +2137,12 @@ impl<'a, C, A> EncodedUpdateGetCall<'a, C, A> where C: BorrowMut<hyper::Client>,
/// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks.
/// * *bearer_token* (query-string) - OAuth bearer token.
/// * *access_token* (query-string) - OAuth access token.
/// * *fields* (query-string) - Selector specifying which fields to include in a partial response.
/// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart").
/// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
/// * *callback* (query-string) - JSONP
/// * *oauth_token* (query-string) - OAuth 2.0 token for the current user.
/// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
/// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart").
/// * *fields* (query-string) - Selector specifying which fields to include in a partial response.
/// * *alt* (query-string) - Data format for response.
/// * *$.xgafv* (query-string) - V1 error format.
pub fn param<T>(mut self, name: T, value: T) -> EncodedUpdateGetCall<'a, C, A>
@@ -2324,12 +2324,12 @@ impl<'a, C, A> ThreatListListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A
/// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks.
/// * *bearer_token* (query-string) - OAuth bearer token.
/// * *access_token* (query-string) - OAuth access token.
/// * *fields* (query-string) - Selector specifying which fields to include in a partial response.
/// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart").
/// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
/// * *callback* (query-string) - JSONP
/// * *oauth_token* (query-string) - OAuth 2.0 token for the current user.
/// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
/// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart").
/// * *fields* (query-string) - Selector specifying which fields to include in a partial response.
/// * *alt* (query-string) - Data format for response.
/// * *$.xgafv* (query-string) - V1 error format.
pub fn param<T>(mut self, name: T, value: T) -> ThreatListListCall<'a, C, A>
@@ -2542,12 +2542,12 @@ impl<'a, C, A> ThreatMatcheFindCall<'a, C, A> where C: BorrowMut<hyper::Client>,
/// * *prettyPrint* (query-boolean) - Returns response with indentations and line breaks.
/// * *bearer_token* (query-string) - OAuth bearer token.
/// * *access_token* (query-string) - OAuth access token.
/// * *fields* (query-string) - Selector specifying which fields to include in a partial response.
/// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart").
/// * *quotaUser* (query-string) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
/// * *callback* (query-string) - JSONP
/// * *oauth_token* (query-string) - OAuth 2.0 token for the current user.
/// * *key* (query-string) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
/// * *uploadType* (query-string) - Legacy upload protocol for media (e.g. "media", "multipart").
/// * *fields* (query-string) - Selector specifying which fields to include in a partial response.
/// * *alt* (query-string) - Data format for response.
/// * *$.xgafv* (query-string) - V1 error format.
pub fn param<T>(mut self, name: T, value: T) -> ThreatMatcheFindCall<'a, C, A>